From 75e42e62271e0e3aa754916f254dccfc24625161 Mon Sep 17 00:00:00 2001 From: colin combe Date: Wed, 22 May 2024 16:28:55 +0100 Subject: [PATCH] undo damage, this branch gets auto deployed --- static/network.html | 6 +++--- static/xiview.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/static/network.html b/static/network.html index 8ec98b9..acb22af 100644 --- a/static/network.html +++ b/static/network.html @@ -17,7 +17,7 @@ - + network @@ -164,8 +164,8 @@ diff --git a/static/xiview.js b/static/xiview.js index 7b1b82f..2c49f98 100644 --- a/static/xiview.js +++ b/static/xiview.js @@ -1,2 +1,2 @@ /*! For license information please see xiview.js.LICENSE.txt */ -!function(A,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.xiview=t():A.xiview=t()}(this,(()=>(()=>{var A={2075:function(A){!function(t,e){"use strict";"object"!=typeof A.exports?e(t):A.exports=t.document?e(t):function(A){if(!A.document)throw new Error("jscolor needs a window with document");return e(A)}}("undefined"!=typeof window?window:this,(function(A){"use strict";var t,e,i,n,I=(n={initialized:!1,instances:[],readyQueue:[],register:function(){void 0!==A&&A.document&&("loading"!==A.document.readyState?n.pub.init():A.document.addEventListener("DOMContentLoaded",n.pub.init,!1))},installBySelector:function(t,e){if(!(e=e?n.node(e):A.document))throw new Error("Missing root node");for(var i=e.querySelectorAll(t),I=new RegExp("(^|\\s)("+n.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r-1},isButtonEmpty:function(A){switch(n.nodeName(A)){case"input":return!A.value||""===A.value.trim();case"button":return""===A.textContent.trim()}return null},isPassiveEventSupported:function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});A.addEventListener("testPassive",null,e),A.removeEventListener("testPassive",null,e)}catch(A){}return t}(),isColorAttrSupported:(i=A.document.createElement("input"),!(!i.setAttribute||(i.setAttribute("type","color"),"color"!=i.type.toLowerCase()))),dataProp:"_data_jscolor",setData:function(){var A=arguments[0];if(3===arguments.length){var t=A.hasOwnProperty(n.dataProp)?A[n.dataProp]:A[n.dataProp]={},e=arguments[2];return t[I=arguments[1]]=e,!0}if(2===arguments.length&&"object"==typeof arguments[1]){t=A.hasOwnProperty(n.dataProp)?A[n.dataProp]:A[n.dataProp]={};var i=arguments[1];for(var I in i)i.hasOwnProperty(I)&&(t[I]=i[I]);return!0}throw new Error("Invalid arguments")},removeData:function(){var A=arguments[0];if(!A.hasOwnProperty(n.dataProp))return!0;for(var t=1;t=3&&(i=o[0].match(g))&&(n=o[1].match(g))&&(I=o[2].match(g)))return e.format="rgb",e.rgba=[parseFloat(i[1])||0,parseFloat(n[1])||0,parseFloat(I[1])||0,null],o.length>=4&&(r=o[3].match(g))&&(e.format="rgba",e.rgba[3]=parseFloat(r[1])||0),e}return!1},parsePaletteValue:function(A){var t=[];"string"==typeof A?A.replace(/#[0-9A-F]{3}\b|#[0-9A-F]{6}([0-9A-F]{2})?\b|rgba?\(([^)]*)\)/gi,(function(A){t.push(A)})):Array.isArray(A)&&(t=A);for(var e=[],i=0;ia[I]&&-i[I]+e[I]+g[I]/2>a[I]/2&&e[I]+g[I]-s[I]>=0?e[I]+g[I]-s[I]:e[I],-i[r]+e[r]+g[r]+s[r]-c+c*o>a[r]?-i[r]+e[r]+g[r]/2>a[r]/2&&e[r]+g[r]-c-c*o>=0?e[r]+g[r]-c-c*o:e[r]+g[r]-c+c*o:e[r]+g[r]-c+c*o>=0?e[r]+g[r]-c+c*o:e[r]+g[r]-c-c*o];else var u=[e[I],e[r]+g[r]-c+c*o];var l=u[I],C=u[r],T=t.fixed?"fixed":"absolute",h=(u[0]+s[0]>e[0]||u[0]0?Math.ceil(o/e):0,n=Math.max(1,Math.floor((t-(e-1)*A.paletteSpacing)/e)),I=A.paletteHeight?Math.min(A.paletteHeight,n):n),i&&(r=i*I+(i-1)*A.paletteSpacing),{cols:e,rows:i,cellW:n,cellH:I,width:t,height:r}},getControlPadding:function(A){return Math.max(A.padding/2,2*A.pointerBorderWidth+A.pointerThickness-A.controlBorderWidth)},getPadYChannel:function(A){return"v"===A.mode.charAt(1).toLowerCase()?"v":"s"},getSliderChannel:function(A){if(A.mode.length>2)switch(A.mode.charAt(2).toLowerCase()){case"s":return"s";case"v":return"v"}return null},triggerCallback:function(A,t){if(A[t]){var e=null;if("string"==typeof A[t])try{e=new Function(A[t])}catch(A){console.error(A)}else e=A[t];e&&e.call(A)}},triggerGlobal:function(A){for(var t=n.getInstances(),e=0;e0)for(var a=0;a=2&&"string"==typeof arguments[0]){try{if(!I(arguments[0],arguments[1]))return!1}catch(A){return console.warn(A),!1}return this.redraw(),this.exposeColor(),!0}if(1===arguments.length&&"object"==typeof arguments[0]){var A=arguments[0],t=!0;for(var e in A)if(A.hasOwnProperty(e))try{I(e,A[e])||(t=!1)}catch(A){console.warn(A),t=!1}return this.redraw(),this.exposeColor(),t}throw new Error("Invalid arguments")},this.channel=function(A,t){if("string"!=typeof A)throw new Error("Invalid value for channel name: "+A);if(void 0===t)return this.channels.hasOwnProperty(A.toLowerCase())?this.channels[A.toLowerCase()]:(console.warn("Getting unknown channel: "+A),!1);var e=!1;switch(A.toLowerCase()){case"r":e=this.fromRGBA(t,null,null,null);break;case"g":e=this.fromRGBA(null,t,null,null);break;case"b":e=this.fromRGBA(null,null,t,null);break;case"h":e=this.fromHSVA(t,null,null,null);break;case"s":e=this.fromHSVA(null,t,null,null);break;case"v":e=this.fromHSVA(null,null,t,null);break;case"a":e=this.fromHSVA(null,null,null,t);break;default:return console.warn("Setting unknown channel: "+A),!1}return!!e&&(this.redraw(),!0)},this.trigger=function(A){for(var t=n.strList(A),e=0;e127.5},this.hide=function(){M()&&(n.removeClass(i.targetElement,n.pub.activeClassName),n.picker.wrap.parentNode.removeChild(n.picker.wrap),delete n.picker.owner)},this.show=function(){r()},this.redraw=function(){M()&&r()},this.getFormat=function(){return this._currentFormat},this._setFormat=function(A){this._currentFormat=A.toLowerCase()},this.hasAlphaChannel=function(){return"auto"===this.alphaChannel?"any"===this.format.toLowerCase()||n.isAlphaFormat(this.getFormat())||void 0!==this.alpha||void 0!==this.alphaElement:this.alphaChannel},this.processValueInput=function(A){this.fromString(A)||this.exposeColor()},this.processAlphaInput=function(A){this.fromHSVA(null,null,null,parseFloat(A))||this.exposeColor()},this.exposeColor=function(A){var t=this.toString(),e=this.getFormat();if(n.setDataAttr(this.targetElement,"current-color",t),A&n.flags.leaveValue||!this.valueElement||("hex"!==e&&"hexa"!==e||(this.uppercase||(t=t.toLowerCase()),this.hash||(t=t.replace(/^#/,""))),this.setValueElementValue(t)),!(A&n.flags.leaveAlpha)&&this.alphaElement){var i=Math.round(100*this.channels.a)/100;this.setAlphaElementValue(i)}A&n.flags.leavePreview||!this.previewElement||((n.isTextInput(this.previewElement)||n.isButton(this.previewElement)&&!n.isButtonEmpty(this.previewElement))&&this.previewPosition,this.setPreviewElementBg(this.toRGBAString())),M()&&(o(),g(),a())},this.setPreviewElementBg=function(A){if(this.previewElement){var t=null,e=null;(n.isTextInput(this.previewElement)||n.isButton(this.previewElement)&&!n.isButtonEmpty(this.previewElement))&&(t=this.previewPosition,e=this.previewSize);var i=[];if(A){i.push({image:n.genColorPreviewGradient(A,t,e?e-n.pub.previewSeparator.length:null),position:"left top",size:"auto",repeat:t?"repeat-y":"repeat",origin:"padding-box"});var I=n.genColorPreviewCanvas("rgba(0,0,0,0)",t?{left:"right",right:"left"}[t]:null,e,!0);i.push({image:"url('"+I.canvas.toDataURL()+"')",position:(t||"left")+" top",size:I.width+"px "+I.height+"px",repeat:t?"repeat-y":"repeat",origin:"padding-box"})}else i.push({image:"none",position:"left top",size:"auto",repeat:"no-repeat",origin:"padding-box"});for(var r={image:[],position:[],size:[],repeat:[],origin:[]},o=0;o=0;u-=1){var l=c[u];if(l)if(n.pub.presets.hasOwnProperty(l)){for(var s in n.pub.presets[l])if(n.pub.presets[l].hasOwnProperty(s))try{I(s,n.pub.presets[l][s])}catch(A){console.warn(A)}}else console.warn("Unknown preset: %s",l)}var C=["preset"];for(var s in e)if(e.hasOwnProperty(s)&&-1===C.indexOf(s))try{I(s,e[s])}catch(A){console.warn(A)}if(void 0===this.container?this.container=A.document.body:this.container=n.node(this.container),!this.container)throw new Error("Cannot instantiate color picker without a container element");if(this.targetElement=n.node(t),!this.targetElement){if("string"==typeof t&&/^[a-zA-Z][\w:.-]*$/.test(t))throw new Error("If '"+t+"' is supposed to be an ID, please use '#"+t+"' or any valid CSS selector.");throw new Error("Cannot instantiate color picker without a target element")}if(this.targetElement.jscolor&&this.targetElement.jscolor instanceof n.pub)throw new Error("Color picker already installed on this element");if(this.targetElement.jscolor=this,n.addClass(this.targetElement,n.pub.className),n.instances.push(this),n.isButton(this.targetElement)&&("button"!==this.targetElement.type.toLowerCase()&&(this.targetElement.type="button"),n.isButtonEmpty(this.targetElement))){n.removeChildren(this.targetElement),this.targetElement.appendChild(A.document.createTextNode(" "));var T=n.getCompStyle(this.targetElement);(parseFloat(T["min-width"])||0)-1){var y=n.parseColorString(N);this._currentFormat=y?y.format:"hex"}else this._currentFormat=this.format.toLowerCase();this.processValueInput(N),void 0!==d&&this.processAlphaInput(d),this.random&&this.randomize.apply(this,Array.isArray(this.random)?this.random:[])}},n.pub.className="jscolor",n.pub.activeClassName="jscolor-active",n.pub.looseJSON=!0,n.pub.presets={},n.pub.presets.default={},n.pub.presets.light={backgroundColor:"rgba(255,255,255,1)",controlBorderColor:"rgba(187,187,187,1)",buttonColor:"rgba(0,0,0,1)"},n.pub.presets.dark={backgroundColor:"rgba(51,51,51,1)",controlBorderColor:"rgba(153,153,153,1)",buttonColor:"rgba(240,240,240,1)"},n.pub.presets.small={width:101,height:101,padding:10,sliderSize:14,paletteCols:8},n.pub.presets.medium={width:181,height:101,padding:12,sliderSize:16,paletteCols:10},n.pub.presets.large={width:271,height:151,padding:12,sliderSize:24,paletteCols:15},n.pub.presets.thin={borderWidth:1,controlBorderWidth:1,pointerBorderWidth:1},n.pub.presets.thick={borderWidth:2,controlBorderWidth:2,pointerBorderWidth:2},n.pub.sliderInnerSpace=3,n.pub.chessboardSize=8,n.pub.chessboardColor1="#666666",n.pub.chessboardColor2="#999999",n.pub.previewSeparator=["rgba(255,255,255,.65)","rgba(128,128,128,.65)"],n.pub.init=function(){if(!n.initialized)for(A.document.addEventListener("mousedown",n.onDocumentMouseDown,!1),A.document.addEventListener("keyup",n.onDocumentKeyUp,!1),A.addEventListener("resize",n.onWindowResize,!1),A.addEventListener("scroll",n.onWindowScroll,!1),n.appendDefaultCss(),n.pub.install(),n.initialized=!0;n.readyQueue.length;)n.readyQueue.shift()()},n.pub.install=function(A){var t=!0;try{n.installBySelector("[data-jscolor]",A)}catch(A){t=!1,console.warn(A)}if(n.pub.lookupClass)try{n.installBySelector("input."+n.pub.lookupClass+", button."+n.pub.lookupClass,A)}catch(A){}return t},n.pub.ready=function(A){return"function"!=typeof A?(console.warn("Passed value is not a function"),!1):(n.initialized?A():n.readyQueue.push(A),!0)},n.pub.trigger=function(A){var t=function(){n.triggerGlobal(A)};n.initialized?t():n.pub.ready(t)},n.pub.hide=function(){n.picker&&n.picker.owner&&n.picker.owner.hide()},n.pub.chessboard=function(A){return A||(A="rgba(0,0,0,0)"),n.genColorPreviewCanvas(A).canvas.toDataURL()},n.pub.background=function(A){var t=[];t.push(n.genColorPreviewGradient(A));var e=n.genColorPreviewCanvas();return t.push(["url('"+e.canvas.toDataURL()+"')","left top","repeat"].join(" ")),t.join(", ")},n.pub.options={},n.pub.lookupClass="jscolor",n.pub.installByClassName=function(){return console.error('jscolor.installByClassName() is DEPRECATED. Use data-jscolor="" attribute instead of a class name.'+n.docsRef),!1},n.register(),n.pub);return void 0===A.jscolor&&(A.jscolor=A.JSColor=I),I}))},4529:(A,t,e)=>{"use strict";var i=e(1514)();function n(A,t){if(A===t)return 0;for(var e=A.length,i=t.length,n=0,I=Math.min(e,i);n=0;a--)if(M[a]!==s[a])return!1;for(a=M.length-1;a>=0;a--)if(!d(A[o=M[a]],t[o],e,i))return!1;return!0}(A,t,e,i))}return e?A===t:A==t}function y(A){return"[object Arguments]"==Object.prototype.toString.call(A)}function E(A,t){if(!A||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(A);try{if(A instanceof t)return!0}catch(A){}return!Error.isPrototypeOf(t)&&!0===t.call({},A)}function D(A,t,e,i){var n;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof e&&(i=e,e=null),n=function(A){var t;try{A()}catch(A){t=A}return t}(t),i=(e&&e.name?" ("+e.name+").":".")+(i?" "+i:"."),A&&!n&&h(n,e,"Missing expected exception"+i);var I="string"==typeof i,o=!A&&n&&!e;if((!A&&r.isError(n)&&I&&E(n,e)||o)&&h(n,e,"Got unwanted exception"+i),A&&n&&e&&!E(n,e)||!A&&n)throw n}c.AssertionError=function(A){this.name="AssertionError",this.actual=A.actual,this.expected=A.expected,this.operator=A.operator,A.message?(this.message=A.message,this.generatedMessage=!1):(this.message=function(A){return C(T(A.actual),128)+" "+A.operator+" "+C(T(A.expected),128)}(this),this.generatedMessage=!0);var t=A.stackStartFunction||h;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var e=new Error;if(e.stack){var i=e.stack,n=l(t),I=i.indexOf("\n"+n);if(I>=0){var r=i.indexOf("\n",I+1);i=i.substring(r+1)}this.stack=i}}},r.inherits(c.AssertionError,Error),c.fail=h,c.ok=N,c.equal=function(A,t,e){A!=t&&h(A,t,e,"==",c.equal)},c.notEqual=function(A,t,e){A==t&&h(A,t,e,"!=",c.notEqual)},c.deepEqual=function(A,t,e){d(A,t,!1)||h(A,t,e,"deepEqual",c.deepEqual)},c.deepStrictEqual=function(A,t,e){d(A,t,!0)||h(A,t,e,"deepStrictEqual",c.deepStrictEqual)},c.notDeepEqual=function(A,t,e){d(A,t,!1)&&h(A,t,e,"notDeepEqual",c.notDeepEqual)},c.notDeepStrictEqual=function A(t,e,i){d(t,e,!0)&&h(t,e,i,"notDeepStrictEqual",A)},c.strictEqual=function(A,t,e){A!==t&&h(A,t,e,"===",c.strictEqual)},c.notStrictEqual=function(A,t,e){A===t&&h(A,t,e,"!==",c.notStrictEqual)},c.throws=function(A,t,e){D(!0,A,t,e)},c.doesNotThrow=function(A,t,e){D(!1,A,t,e)},c.ifError=function(A){if(A)throw A},c.strict=i((function A(t,e){t||h(t,!0,e,"==",A)}),c,{equal:c.strictEqual,deepEqual:c.deepStrictEqual,notEqual:c.notStrictEqual,notDeepEqual:c.notDeepStrictEqual}),c.strict.strict=c.strict;var j=Object.keys||function(A){var t=[];for(var e in A)o.call(A,e)&&t.push(e);return t}},6100:A=>{"function"==typeof Object.create?A.exports=function(A,t){A.super_=t,A.prototype=Object.create(t.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}})}:A.exports=function(A,t){A.super_=t;var e=function(){};e.prototype=t.prototype,A.prototype=new e,A.prototype.constructor=A}},3845:A=>{A.exports=function(A){return A&&"object"==typeof A&&"function"==typeof A.copy&&"function"==typeof A.fill&&"function"==typeof A.readUInt8}},4591:(A,t,e)=>{var i=/%[sdj%]/g;t.format=function(A){if(!T(A)){for(var t=[],e=0;e=I)return A;switch(A){case"%s":return String(n[e++]);case"%d":return Number(n[e++]);case"%j":try{return JSON.stringify(n[e++])}catch(A){return"[Circular]"}default:return A}})),g=n[e];e=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),u(e)?i.showHidden=e:e&&t._extend(i,e),h(i.showHidden)&&(i.showHidden=!1),h(i.depth)&&(i.depth=2),h(i.colors)&&(i.colors=!1),h(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=o),a(i,A,i.depth)}function o(A,t){var e=r.styles[t];return e?"["+r.colors[e][0]+"m"+A+"["+r.colors[e][1]+"m":A}function g(A,t){return A}function a(A,e,i){if(A.customInspect&&e&&D(e.inspect)&&e.inspect!==t.inspect&&(!e.constructor||e.constructor.prototype!==e)){var n=e.inspect(i,A);return T(n)||(n=a(A,n,i)),n}var I=function(A,t){if(h(t))return A.stylize("undefined","undefined");if(T(t)){var e="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return A.stylize(e,"string")}return C(t)?A.stylize(""+t,"number"):u(t)?A.stylize(""+t,"boolean"):l(t)?A.stylize("null","null"):void 0}(A,e);if(I)return I;var r=Object.keys(e),o=function(A){var t={};return A.forEach((function(A,e){t[A]=!0})),t}(r);if(A.showHidden&&(r=Object.getOwnPropertyNames(e)),E(e)&&(r.indexOf("message")>=0||r.indexOf("description")>=0))return M(e);if(0===r.length){if(D(e)){var g=e.name?": "+e.name:"";return A.stylize("[Function"+g+"]","special")}if(N(e))return A.stylize(RegExp.prototype.toString.call(e),"regexp");if(y(e))return A.stylize(Date.prototype.toString.call(e),"date");if(E(e))return M(e)}var d,j="",B=!1,x=["{","}"];return c(e)&&(B=!0,x=["[","]"]),D(e)&&(j=" [Function"+(e.name?": "+e.name:"")+"]"),N(e)&&(j=" "+RegExp.prototype.toString.call(e)),y(e)&&(j=" "+Date.prototype.toUTCString.call(e)),E(e)&&(j=" "+M(e)),0!==r.length||B&&0!=e.length?i<0?N(e)?A.stylize(RegExp.prototype.toString.call(e),"regexp"):A.stylize("[Object]","special"):(A.seen.push(e),d=B?function(A,t,e,i,n){for(var I=[],r=0,o=t.length;r60?e[0]+(""===t?"":t+"\n ")+" "+A.join(",\n ")+" "+e[1]:e[0]+t+" "+A.join(", ")+" "+e[1]}(d,j,x)):x[0]+j+x[1]}function M(A){return"["+Error.prototype.toString.call(A)+"]"}function s(A,t,e,i,n,I){var r,o,g;if((g=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?o=g.set?A.stylize("[Getter/Setter]","special"):A.stylize("[Getter]","special"):g.set&&(o=A.stylize("[Setter]","special")),p(i,n)||(r="["+n+"]"),o||(A.seen.indexOf(g.value)<0?(o=l(e)?a(A,g.value,null):a(A,g.value,e-1)).indexOf("\n")>-1&&(o=I?o.split("\n").map((function(A){return" "+A})).join("\n").substr(2):"\n"+o.split("\n").map((function(A){return" "+A})).join("\n")):o=A.stylize("[Circular]","special")),h(r)){if(I&&n.match(/^\d+$/))return o;(r=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(r=r.substr(1,r.length-2),r=A.stylize(r,"name")):(r=r.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),r=A.stylize(r,"string"))}return r+": "+o}function c(A){return Array.isArray(A)}function u(A){return"boolean"==typeof A}function l(A){return null===A}function C(A){return"number"==typeof A}function T(A){return"string"==typeof A}function h(A){return void 0===A}function N(A){return d(A)&&"[object RegExp]"===j(A)}function d(A){return"object"==typeof A&&null!==A}function y(A){return d(A)&&"[object Date]"===j(A)}function E(A){return d(A)&&("[object Error]"===j(A)||A instanceof Error)}function D(A){return"function"==typeof A}function j(A){return Object.prototype.toString.call(A)}function B(A){return A<10?"0"+A.toString(10):A.toString(10)}t.debuglog=function(A){if(h(n)&&(n=process.env.NODE_DEBUG||""),A=A.toUpperCase(),!I[A])if(new RegExp("\\b"+A+"\\b","i").test(n)){var e=process.pid;I[A]=function(){var i=t.format.apply(t,arguments);console.error("%s %d: %s",A,e,i)}}else I[A]=function(){};return I[A]},t.inspect=r,r.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},r.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=c,t.isBoolean=u,t.isNull=l,t.isNullOrUndefined=function(A){return null==A},t.isNumber=C,t.isString=T,t.isSymbol=function(A){return"symbol"==typeof A},t.isUndefined=h,t.isRegExp=N,t.isObject=d,t.isDate=y,t.isError=E,t.isFunction=D,t.isPrimitive=function(A){return null===A||"boolean"==typeof A||"number"==typeof A||"string"==typeof A||"symbol"==typeof A||void 0===A},t.isBuffer=e(3845);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function p(A,t){return Object.prototype.hasOwnProperty.call(A,t)}t.log=function(){var A,e;console.log("%s - %s",(e=[B((A=new Date).getHours()),B(A.getMinutes()),B(A.getSeconds())].join(":"),[A.getDate(),x[A.getMonth()],e].join(" ")),t.format.apply(t,arguments))},t.inherits=e(6100),t._extend=function(A,t){if(!t||!d(t))return A;for(var e=Object.keys(t),i=e.length;i--;)A[e[i]]=t[e[i]];return A}},8650:(A,t)=>{var e,i,n,I;function r(A){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},r(A)}I=function(){return function A(t,e,i){function n(r,o){if(!e[r]){if(!t[r]){if(I)return I(r,!0);var g=new Error("Cannot find module '"+r+"'");throw g.code="MODULE_NOT_FOUND",g}var a=e[r]={exports:{}};t[r][0].call(a.exports,(function(A){return n(t[r][1][A]||A)}),a,a.exports,A,t,e,i)}return e[r].exports}for(var I=void 0,r=0;ro;){var g=t[o][r];g>0&&g1e-9)break;var u=this.offsetDir();for(i=0;i1&&l>C||!isFinite(C))for(i=0;i1&&(T=1);var h=C*C,N=2*T*(l-C)/(h*l),d=s*l,y=2*-T/(h*d);for(isFinite(N)||console.log(N),i=0;i0?p-(z+1)*D:p-(z-1)*D;-E0;)for(var n=t;n-- >0;)e(i,n)},A.prototype.matrixApply=function(t){A.mApply(this.k,this.n,t)},A.prototype.computeNextPosition=function(A,t){var e=this;this.computeDerivatives(A);var i=this.computeStepSize(this.g);if(this.stepAndProject(A,t,this.g,i),this.project){this.matrixApply((function(i,n){return e.e[i][n]=A[i][n]-t[i][n]}));var n=this.computeStepSize(this.e);n=Math.max(.2,Math.min(n,1)),this.stepAndProject(A,t,this.e,n)}},A.prototype.run=function(A){for(var t=Number.MAX_VALUE,e=!1;!e&&A-- >0;){var i=this.rungeKutta();e=Math.abs(t/i-1)>16)/this.range},A.prototype.getNextBetween=function(A,t){return A+this.getNext()*(t-A)},A}();e.PseudoRandom=I},{}],8:[function(A,t,e){"use strict";var i,n=this&&this.__extends||(i=function(A,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,t){A.__proto__=t}||function(A,t){for(var e in t)t.hasOwnProperty(e)&&(A[e]=t[e])},i(A,t)},function(A,t){function e(){this.constructor=A}i(A,t),A.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0});var I=A("./rectangle"),r=function(){};e.Point=r;var o=function(A,t,e,i){this.x1=A,this.y1=t,this.x2=e,this.y2=i};e.LineSegment=o;var g=function(A){function t(){return null!==A&&A.apply(this,arguments)||this}return n(t,A),t}(r);function a(A,t,e){return(t.x-A.x)*(e.y-A.y)-(e.x-A.x)*(t.y-A.y)}function M(A,t,e){return a(A,t,e)>0}function s(A,t,e){return a(A,t,e)<0}function c(A,t){var e,i,n,I,r=t.length-1;if(s(A,t[1],t[0])&&!M(A,t[r-1],t[0]))return 0;for(e=0,i=r;;){if(i-e==1)return M(A,t[e],t[i])?e:i;if((I=s(A,t[(n=Math.floor((e+i)/2))+1],t[n]))&&!M(A,t[n-1],t[n]))return n;M(A,t[e+1],t[e])?I||M(A,t[e],t[n])?i=n:e=n:I&&s(A,t[e],t[n])?i=n:e=n}}function u(A,t){var e,i,n,I,r=t.length-1;if(M(A,t[r-1],t[0])&&!s(A,t[1],t[0]))return 0;for(e=0,i=r;;){if(i-e==1)return s(A,t[e],t[i])?e:i;if(I=s(A,t[(n=Math.floor((e+i)/2))+1],t[n]),M(A,t[n-1],t[n])&&!I)return n;s(A,t[e+1],t[e])?I?s(A,t[e],t[n])?i=n:e=n:i=n:I?e=n:M(A,t[e],t[n])?i=n:e=n}}function l(A,t,e,i,n,I){var r,o;o=i(A[r=e(t[0],A)],t);for(var g=!1;!g;){for(g=!0;r===A.length-1&&(r=0),!n(t[o],A[r],A[r+1]);)++r;for(;0===o&&(o=t.length-1),!I(A[r],t[o],t[o-1]);)--o,g=!1}return{t1:r,t2:o}}function C(A,t){return l(A,t,c,u,M,s)}e.PolyPoint=g,e.isLeft=a,e.ConvexHull=function(A){var t,e=A.slice(0).sort((function(A,t){return A.x!==t.x?t.x-A.x:t.y-A.y})),i=A.length,n=e[0].x;for(t=1;t=0&&e[t].x===M;t--);for(o=t+1,t=I;++t<=o;)if(!(a(e[0],e[o],e[t])>=0&&t1&&!(a(r[r.length-2],r[r.length-1],e[t])>0);)r.length-=1;0!=t&&r.push(e[t])}g!=o&&r.push(e[g]);var s=r.length;for(t=o;--t>=I;)if(!(a(e[g],e[I],e[t])>=0&&t>I)){for(;r.length>s&&!(a(r[r.length-2],r[r.length-1],e[t])>0);)r.length-=1;0!=t&&r.push(e[t])}}return r},e.clockwiseRadialSweep=function(A,t,e){t.slice(0).sort((function(t,e){return Math.atan2(t.y-A.y,t.x-A.x)-Math.atan2(e.y-A.y,e.x-A.x)})).forEach(e)},e.tangent_PolyPolyC=l,e.LRtangent_PolyPolyC=function(A,t){var e=C(t,A);return{t1:e.t2,t2:e.t1}},e.RLtangent_PolyPolyC=C,e.LLtangent_PolyPolyC=function(A,t){return l(A,t,u,u,s,s)},e.RRtangent_PolyPolyC=function(A,t){return l(A,t,c,c,M,M)};var T=function(A,t){this.t1=A,this.t2=t};e.BiTangent=T;var h=function(){};e.BiTangents=h;var N=function(A){function t(){return null!==A&&A.apply(this,arguments)||this}return n(t,A),t}(r);e.TVGPoint=N;var d=function(A,t,e,i){this.id=A,this.polyid=t,this.polyvertid=e,this.p=i,i.vv=this};e.VisibilityVertex=d;var y=function(){function A(A,t){this.source=A,this.target=t}return A.prototype.length=function(){var A=this.source.p.x-this.target.p.x,t=this.source.p.y-this.target.p.y;return Math.sqrt(A*A+t*t)},A}();e.VisibilityEdge=y;var E=function(){function A(A,t){if(this.P=A,this.V=[],this.E=[],t)this.V=t.V.slice(0),this.E=t.E.slice(0);else{for(var e=A.length,i=0;i0&&this.E.push(new y(n[I-1].vv,o))}n.length>1&&this.E.push(new y(n[0].vv,n[n.length-1].vv))}for(i=0;i0)return!0;return!1},A}();function D(A,t){for(var e=[],i=1,n=t.length;i=0&&C>=0&&N<0&&d>=0&&y>=0&&E<0?n.ll=new T(I,r):l<=0&&C<=0&&N>0&&d<=0&&y<=0&&E>0?n.rr=new T(I,r):l<=0&&C>0&&N<=0&&d>=0&&y<0&&E>=0?n.rl=new T(I,r):l>=0&&C<0&&N>=0&&d<=0&&y>0&&E<=0&&(n.lr=new T(I,r))}return n}function B(A,t){return!A.every((function(A){return!function(A,t){for(var e=1,i=t.length;e0)return!0}return!1}},{"./rectangle":17}],9:[function(A,t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=A("./rectangle"),n=A("./vpsc"),I=A("./shortestpaths"),r=function(A,t,e){this.id=A,this.rect=t,this.children=e,this.leaf=void 0===e||0===e.length};e.NodeWrapper=r;var o=function(A,t,e,i,n){void 0===i&&(i=null),void 0===n&&(n=null),this.id=A,this.x=t,this.y=e,this.node=i,this.line=n};e.Vert=o;var g=function(){function A(t,e){this.s=t,this.t=e;var i=A.findMatch(t,e),n=e.slice(0).reverse(),I=A.findMatch(t,n);i.length>=I.length?(this.length=i.length,this.si=i.si,this.ti=i.ti,this.reversed=!1):(this.length=I.length,this.si=I.si,this.ti=e.length-I.ti-I.length,this.reversed=!0)}return A.findMatch=function(A,t){for(var e=A.length,i=t.length,n={length:0,si:-1,ti:-1},I=new Array(e),r=0;rn.length&&(n.length=g,n.si=r-g+1,n.ti=o-g+1)}else I[r][o]=0}return n},A.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},A}();e.LongestCommonSubsequence=g;var a=function(){function A(A,t,e){var n=this;void 0===e&&(e=12),this.originalnodes=A,this.groupPadding=e,this.leaves=null,this.nodes=A.map((function(A,e){return new r(e,t.getBounds(A),t.getChildren(A))})),this.leaves=this.nodes.filter((function(A){return A.leaf})),this.groups=this.nodes.filter((function(A){return!A.leaf})),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach((function(A){return A.children.forEach((function(t){return n.nodes[t].parent=A}))})),this.root={children:[]},this.nodes.forEach((function(A){void 0===A.parent&&(A.parent=n.root,n.root.children.push(A.id)),A.ports=[]})),this.backToFront=this.nodes.slice(0),this.backToFront.sort((function(A,t){return n.getDepth(A)-n.getDepth(t)})),this.backToFront.slice(0).reverse().filter((function(A){return!A.leaf})).forEach((function(A){var t=i.Rectangle.empty();A.children.forEach((function(A){return t=t.union(n.nodes[A].rect)})),A.rect=t.inflate(n.groupPadding)}));var I=this.midPoints(this.cols.map((function(A){return A.pos}))),g=this.midPoints(this.rows.map((function(A){return A.pos}))),a=I[0],M=I[I.length-1],s=g[0],c=g[g.length-1],u=this.rows.map((function(A){return{x1:a,x2:M,y1:A.pos,y2:A.pos}})).concat(g.map((function(A){return{x1:a,x2:M,y1:A,y2:A}}))),l=this.cols.map((function(A){return{x1:A.pos,x2:A.pos,y1:s,y2:c}})).concat(I.map((function(A){return{x1:A,x2:A,y1:s,y2:c}}))),C=u.concat(l);C.forEach((function(A){return A.verts=[]})),this.verts=[],this.edges=[],u.forEach((function(A){return l.forEach((function(t){var e=new o(n.verts.length,t.x1,A.y1);A.verts.push(e),t.verts.push(e),n.verts.push(e);for(var i=n.backToFront.length;i-- >0;){var I=n.backToFront[i],r=I.rect,g=Math.abs(e.x-r.cx()),a=Math.abs(e.y-r.cy());if(g0;){var i=e.filter((function(t){return t.rect["overlap"+A.toUpperCase()](e[0].rect)})),n={nodes:i,pos:this.avg(i.map((function(t){return t.rect["c"+A]()})))};t.push(n),n.nodes.forEach((function(A){return e.splice(e.indexOf(A),1)}))}return t.sort((function(A,t){return A.pos-t.pos})),t},A.prototype.getDepth=function(A){for(var t=0;A.parent!==this.root;)t++,A=A.parent;return t},A.prototype.midPoints=function(A){for(var t=A[1]-A[0],e=[A[0]-t/2],i=1;i.1)&&(a={pos:s[0][t],segments:[]},g.push(a)),a.segments.push(s)}return g},A.nudgeSegs=function(A,t,e,i,I,r){var o=i.length;if(!(o<=1)){for(var g=i.map((function(t){return new n.Variable(t[0][A])})),a=[],M=0;M=0&&a.push(new n.Constraint(g[T],g[h],r))}new n.Solver(g,a).solve(),g.forEach((function(t,n){var I=i[n],r=t.position();I[0][A]=I[1][A]=r;var o=e[I.edgeid];I.i>0&&(o[I.i-1][1][A]=r),I.iMath.PI||n<-Math.PI)&&(n=i-e),n},A.isLeft=function(A,t,e){return(t.x-A.x)*(e.y-A.y)-(t.y-A.y)*(e.x-A.x)<=0},A.getOrder=function(A){for(var t={},e=0;e=a.length||s.ti+s.length>=M.length)?e.push({l:i,r:n}):(s.si+s.length>=a.length||s.ti+s.length>=M.length?(I=a[s.si+1],o=a[s.si-1],r=M[s.ti-1]):(I=a[s.si+s.length-2],r=a[s.si+s.length],o=M[s.ti+s.length]),A.isLeft(I,r,o)?e.push({l:n,r:i}):e.push({l:i,r:n})))}return A.getOrder(e)},A.makeSegments=function(A){function t(A){return{x:A.x,y:A.y}}for(var e=function(A,t,e){return Math.abs((t.x-A.x)*(e.y-A.y)-(t.y-A.y)*(e.x-A.x))<.001},i=[],n=t(A[0]),I=1;I1&&M>1?1e3:0})),s=M.reverse().map((function(A){return e.verts[A]}));return s.push(this.nodes[n.id].ports[0]),s.filter((function(A,t){return!(t0&&A.node===n&&s[t-1].node===n)}))},A.getRoutePath=function(t,e,i,n){var I,r,o,g={routepath:"M "+t[0][0].x+" "+t[0][0].y+" ",arrowpath:""};if(t.length>1)for(var a=0;a0?M-=c/Math.abs(c)*e:s-=u/Math.abs(u)*e,g.routepath+="L "+M+" "+s+" ";var l=t[a+1],C=l[0].x,T=l[0].y;c=l[1].x-C,u=l[1].y-T;var h,N,d=A.angleBetween2Lines(I,l)<0?1:0;Math.abs(c)>0?(h=C+c/Math.abs(c)*e,N=T):(h=C,N=T+u/Math.abs(u)*e);var y=Math.abs(h-M),E=Math.abs(N-s);g.routepath+="A "+y+" "+E+" 0 0 "+d+" "+h+" "+N+" "}else{var D=[M,s];Math.abs(c)>0?(r=[M-=c/Math.abs(c)*n,s+i],o=[M,s-i]):(r=[M+i,s-=u/Math.abs(u)*n],o=[M-i,s]),g.routepath+="L "+M+" "+s+" ",n>0&&(g.arrowpath="M "+D[0]+" "+D[1]+" L "+r[0]+" "+r[1]+" L "+o[0]+" "+o[1])}}else M=(I=t[0])[1].x,s=I[1].y,c=M-I[0].x,u=s-I[0].y,D=[M,s],Math.abs(c)>0?(r=[M-=c/Math.abs(c)*n,s+i],o=[M,s-i]):(r=[M+i,s-=u/Math.abs(u)*n],o=[M-i,s]),g.routepath+="L "+M+" "+s+" ",n>0&&(g.arrowpath="M "+D[0]+" "+D[1]+" L "+r[0]+" "+r[1]+" L "+o[0]+" "+o[1]);return g},A}();e.GridRouter=a},{"./rectangle":17,"./shortestpaths":18,"./vpsc":19}],10:[function(A,t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=10,n=(1+Math.sqrt(5))/2,I=1e-4;e.applyPacking=function(A,t,e,r,o,g){void 0===o&&(o=1),void 0===g&&(g=!0);var a=0,M=0,s=t,c=e,u=(o=void 0!==o?o:1,r=void 0!==r?r:0,0),l=0,C=0,T=0,h=[];function N(A,t){h=[],u=0,l=0,T=M;for(var e=0;e=A.height&&h[n].x+h[n].width+A.width+i-t<=I){e=h[n];break}h.push(A),void 0!==e?(A.x=e.x+e.width+i,A.y=e.bottom,A.space_left=A.height,A.bottom=A.y,e.space_left-=A.height+i,e.bottom+=A.height+i):(A.y=T,T+=A.height+i,A.x=a,A.bottom=A.y,A.space_left=A.height),A.y+A.height-l>-1e-4&&(l=A.y+A.height-M),A.x+A.width-u>-1e-4&&(u=A.x+A.width-a)}0!=A.length&&(function(A){A.forEach((function(A){var t,e,i,n,I;t=A,e=Number.MAX_VALUE,i=Number.MAX_VALUE,n=0,I=0,t.array.forEach((function(A){var t=void 0!==A.width?A.width:r,o=void 0!==A.height?A.height:r;t/=2,o/=2,n=Math.max(A.x+t,n),e=Math.min(A.x-t,e),I=Math.max(A.y+o,I),i=Math.min(A.y-o,i)})),t.width=n-e,t.height=I-i}))}(A),function(A,t){var e=Number.POSITIVE_INFINITY,r=0;A.sort((function(A,t){return t.height-A.height}));for(var o=T=C=A.reduce((function(A,t){return A.widthC||l>I;){if(1!=c){var T=g-(g-o)/n;M=N(A,T)}if(0!=c){var h=o+(g-o)/n;s=N(A,h)}if(u=Math.abs(T-h),l=Math.abs(M-s),Ms?(o=T,T=h,M=s,c=1):(g=h,h=T,s=M,c=0),a++>100)break}N(A,r)}(A),g&&function(A){A.forEach((function(A){var t={x:0,y:0};A.array.forEach((function(A){t.x+=A.x,t.y+=A.y})),t.x/=A.array.length,t.y/=A.array.length;var e=t.x-A.width/2,i=t.y-A.height/2,n=A.x-e+s/2-u/2,I=A.y-i+c/2-l/2;A.array.forEach((function(A){A.x+=n,A.y+=I}))}))}(A))},e.separateGraphs=function(A,t){for(var e={},i={},n=[],I=0,r=0;r0){var t=0;this._links.forEach((function(A){t=Math.max(t,A.source,A.target)})),this._nodes=new Array(++t);for(var e=0;e0?A:0:A>0&&(this._running||(this._running=!0,this.trigger({type:i.start,alpha:this._alpha=A}),this.kick())),this):this._alpha},A.prototype.getLinkLength=function(A){return"function"==typeof this._linkDistance?+this._linkDistance(A):this._linkDistance},A.setLinkLength=function(A,t){A.length=t},A.prototype.getLinkType=function(A){return"function"==typeof this._linkType?this._linkType(A):0},A.prototype.symmetricDiffLinkLengths=function(A,t){var e=this;return void 0===t&&(t=1),this.linkDistance((function(t){return A*t.length})),this._linkLengthCalculator=function(){return I.symmetricDiffLinkLengths(e._links,e.linkAccessor,t)},this},A.prototype.jaccardLinkLengths=function(A,t){var e=this;return void 0===t&&(t=1),this.linkDistance((function(t){return A*t.length})),this._linkLengthCalculator=function(){return I.jaccardLinkLengths(e._links,e.linkAccessor,t)},this},A.prototype.start=function(t,e,i,n,a,M){var s=this;void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===a&&(a=!0),void 0===M&&(M=!0);var c,u=this.nodes().length,l=u+2*this._groups.length,C=(this._links.length,this._canvasSize[0]),T=this._canvasSize[1],h=new Array(l),N=new Array(l),d=null,y=this._avoidOverlaps;this._nodes.forEach((function(A,t){A.index=t,void 0===A.x&&(A.x=C/2,A.y=T/2),h[t]=A.x,N[t]=A.y})),this._linkLengthCalculator&&this._linkLengthCalculator(),this._distanceMatrix?c=this._distanceMatrix:(c=new g.Calculator(l,this._links,A.getSourceIndex,A.getTargetIndex,(function(A){return s.getLinkLength(A)})).DistanceMatrix(),d=r.Descent.createSquareMatrix(l,(function(){return 2})),this._links.forEach((function(A){"number"==typeof A.source&&(A.source=s._nodes[A.source]),"number"==typeof A.target&&(A.target=s._nodes[A.target])})),this._links.forEach((function(t){var e=A.getSourceIndex(t),i=A.getTargetIndex(t);d[e][i]=d[i][e]=t.weight||1})));var E=r.Descent.createSquareMatrix(l,(function(A,t){return c[A][t]}));if(this._rootGroup&&void 0!==this._rootGroup.groups){var D=u;this._groups.forEach((function(A){!function(A,t,e,i){d[A][t]=d[t][A]=e,E[A][t]=E[t][A]=.1}(D,D+1,s._groupCompactness),h[D]=0,N[D++]=0,h[D]=0,N[D++]=0}))}else this._rootGroup={leaves:this._nodes,groups:[]};var j=this._constraints||[];for(this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,j=j.concat(I.generateDirectedEdgeConstraints(u,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new r.Descent([h,N],E),this._descent.locks.clear(),D=0;D0&&(this._descent.project=new o.Projection(this._nodes,this._groups,this._rootGroup,j).projectFunctions()),this._descent.run(e),this.separateOverlappingComponents(C,T,M),this.avoidOverlaps(y),y&&(this._nodes.forEach((function(A,t){A.x=h[t],A.y=N[t]})),this._descent.project=new o.Projection(this._nodes,this._groups,this._rootGroup,j,!0).projectFunctions(),this._nodes.forEach((function(A,t){h[t]=A.x,N[t]=A.y}))),this._descent.G=d,this._descent.run(i),n){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=u,this._descent.scaleSnapByMaxH=u!=l;var p=r.Descent.createSquareMatrix(l,(function(A,t){return A>=u||t>=u?d[A][t]:0}));this._descent.G=p,this._descent.run(n)}return this.updateNodePositions(),this.separateOverlappingComponents(C,T,M),a?this.resume():this},A.prototype.initialLayout=function(t,e,i){if(this._groups.length>0&&t>0){var n=this._nodes.length,I=this._links.map((function(A){return{source:A.source.index,target:A.target.index}})),r=this._nodes.map((function(A){return{index:A.index}}));this._groups.forEach((function(A,t){r.push({index:A.index=n+t})})),this._groups.forEach((function(A,t){void 0!==A.leaves&&A.leaves.forEach((function(t){return I.push({source:A.index,target:t.index})})),void 0!==A.groups&&A.groups.forEach((function(t){return I.push({source:A.index,target:t.index})}))})),(new A).size(this.size()).nodes(r).links(I).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(t,0,0,0,!1),this._nodes.forEach((function(A){e[A.index]=r[A.index].x,i[A.index]=r[A.index].y}))}else this._descent.run(t)},A.prototype.separateOverlappingComponents=function(A,t,e){var i=this;if(void 0===e&&(e=!0),!this._distanceMatrix&&this._handleDisconnected){var n=this._descent.x[0],I=this._descent.x[1];this._nodes.forEach((function(A,t){A.x=n[t],A.y=I[t]}));var r=M.separateGraphs(this._nodes,this._links);M.applyPacking(r,A,t,this._defaultNodeSize,t/A,e),this._nodes.forEach((function(A,t){i._descent.x[0][t]=A.x,i._descent.x[1][t]=A.y,A.bounds&&(A.bounds.setXCentre(A.x),A.bounds.setYCentre(A.y))}))}},A.prototype.resume=function(){return this.alpha(.1)},A.prototype.stop=function(){return this.alpha(0)},A.prototype.prepareEdgeRouting=function(A){void 0===A&&(A=0),this._visibilityGraph=new a.TangentVisibilityGraph(this._nodes.map((function(t){return t.bounds.inflate(-A).vertices()})))},A.prototype.routeEdge=function(A,t,e){void 0===t&&(t=5);var i=[],n=new a.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),I={x:A.source.x,y:A.source.y},r={x:A.target.x,y:A.target.y},M=n.addPoint(I,A.source.index),s=n.addPoint(r,A.target.index);n.addEdgeIfVisible(I,r,A.source.index,A.target.index),void 0!==e&&e(n);var c=new g.Calculator(n.V.length,n.E,(function(A){return A.source.id}),(function(A){return A.target.id}),(function(A){return A.length()})).PathFromNodeToNode(M.id,s.id);if(1===c.length||c.length===n.V.length){var u=o.makeEdgeBetween(A.source.innerBounds,A.target.innerBounds,t);i=[u.sourceIntersection,u.arrowStart]}else{for(var l=c.length-2,C=n.V[c[l]].p,T=n.V[c[0]].p,h=(i=[A.source.innerBounds.rayIntersection(C.x,C.y)],l);h>=0;--h)i.push(n.V[c[h]].p);i.push(o.makeEdgeTo(T,A.target.innerBounds,t))}return i},A.getSourceIndex=function(A){return"number"==typeof A.source?A.source:A.source.index},A.getTargetIndex=function(A){return"number"==typeof A.target?A.target:A.target.index},A.linkId=function(t){return A.getSourceIndex(t)+"-"+A.getTargetIndex(t)},A.dragStart=function(t){s(t)?A.storeOffset(t,A.dragOrigin(t)):(A.stopNode(t),t.fixed|=2)},A.stopNode=function(A){A.px=A.x,A.py=A.y},A.storeOffset=function(t,e){void 0!==t.leaves&&t.leaves.forEach((function(t){t.fixed|=2,A.stopNode(t),t._dragGroupOffsetX=t.x-e.x,t._dragGroupOffsetY=t.y-e.y})),void 0!==t.groups&&t.groups.forEach((function(t){return A.storeOffset(t,e)}))},A.dragOrigin=function(A){return s(A)?{x:A.bounds.cx(),y:A.bounds.cy()}:A},A.drag=function(t,e){s(t)?(void 0!==t.leaves&&t.leaves.forEach((function(A){t.bounds.setXCentre(e.x),t.bounds.setYCentre(e.y),A.px=A._dragGroupOffsetX+e.x,A.py=A._dragGroupOffsetY+e.y})),void 0!==t.groups&&t.groups.forEach((function(t){return A.drag(t,e)}))):(t.px=e.x,t.py=e.y)},A.dragEnd=function(t){s(t)?(void 0!==t.leaves&&t.leaves.forEach((function(t){A.dragEnd(t),delete t._dragGroupOffsetX,delete t._dragGroupOffsetY})),void 0!==t.groups&&t.groups.forEach(A.dragEnd)):t.fixed&=-7},A.mouseOver=function(A){A.fixed|=4,A.px=A.x,A.py=A.y},A.mouseOut=function(A){A.fixed&=-5},A}();e.Layout=c},{"./descent":7,"./geom":8,"./handledisconnected":10,"./linklengths":13,"./powergraph":14,"./rectangle":17,"./shortestpaths":18}],12:[function(A,t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=A("./shortestpaths"),n=A("./descent"),I=A("./rectangle"),r=A("./linklengths"),o=function(){function A(A,t){this.source=A,this.target=t}return A.prototype.actualLength=function(A){var t=this;return Math.sqrt(A.reduce((function(A,e){var i=e[t.target]-e[t.source];return A+i*i}),0))},A}();e.Link3D=o;e.Node3D=function(A,t,e){void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e=0),this.x=A,this.y=t,this.z=e};var g=function(){function A(t,e,i){var n=this;void 0===i&&(i=1),this.nodes=t,this.links=e,this.idealLinkLength=i,this.constraints=null,this.useJaccardLinkLengths=!0,this.result=new Array(A.k);for(var I=0;I=this.R))return this.merge(t.a,t.b,A),!0}},A.prototype.nEdges=function(A,t){var e=A.incoming.intersection(t.incoming),i=A.outgoing.intersection(t.outgoing);return this.R-e.count()-i.count()},A.prototype.getGroupHierarchy=function(A){var t=this,e=[];return I(this.roots[0],{},e),this.allEdges().forEach((function(n){var I=t.modules[n.source],r=t.modules[n.target];A.push(new i(void 0===I.gid?n.source:e[I.gid],void 0===r.gid?n.target:e[r.gid],n.type))})),e},A.prototype.allEdges=function(){var t=[];return A.getEdges(this.roots[0],t),t},A.getEdges=function(t,e){t.forAll((function(t){t.getEdges(e),A.getEdges(t.children,e)}))},A}();function I(A,t,e){A.forAll((function(A){if(A.isLeaf())t.leaves||(t.leaves=[]),t.leaves.push(A.id);else{var i=t;if(A.gid=e.length,!A.isIsland()||A.isPredefined()){if(i={id:A.gid},A.isPredefined())for(var n in A.definition)i[n]=A.definition[n];t.groups||(t.groups=[]),t.groups.push(A.gid),e.push(i)}I(A.children,i,e)}}))}e.Configuration=n;var r=function(){function A(A,t,e,i,n){void 0===t&&(t=new g),void 0===e&&(e=new g),void 0===i&&(i=new o),this.id=A,this.outgoing=t,this.incoming=e,this.children=i,this.definition=n}return A.prototype.getEdges=function(A){var t=this;this.outgoing.forAll((function(e,n){e.forAll((function(e){A.push(new i(t.id,e.id,n))}))}))},A.prototype.isLeaf=function(){return 0===this.children.count()},A.prototype.isIsland=function(){return 0===this.outgoing.count()&&0===this.incoming.count()},A.prototype.isPredefined=function(){return void 0!==this.definition},A}();e.Module=r;var o=function(){function A(){this.table={}}return A.prototype.count=function(){return Object.keys(this.table).length},A.prototype.intersection=function(t){var e=new A;return e.table=function(A,t){var e={};for(var i in A)i in t&&(e[i]=A[i]);return e}(this.table,t.table),e},A.prototype.intersectionCount=function(A){return this.intersection(A).count()},A.prototype.contains=function(A){return A in this.table},A.prototype.add=function(A){this.table[A.id]=A},A.prototype.remove=function(A){delete this.table[A.id]},A.prototype.forAll=function(A){for(var t in this.table)A(this.table[t])},A.prototype.modules=function(){var A=[];return this.forAll((function(t){t.isPredefined()||A.push(t)})),A},A}();e.ModuleSet=o;var g=function(){function A(){this.sets={},this.n=0}return A.prototype.count=function(){return this.n},A.prototype.contains=function(A){var t=!1;return this.forAllModules((function(e){t||e.id!=A||(t=!0)})),t},A.prototype.add=function(A,t){(A in this.sets?this.sets[A]:this.sets[A]=new o).add(t),++this.n},A.prototype.remove=function(A,t){var e=this.sets[A];e.remove(t),0===e.count()&&delete this.sets[A],--this.n},A.prototype.forAll=function(A){for(var t in this.sets)A(this.sets[t],Number(t))},A.prototype.forAllModules=function(A){this.forAll((function(t,e){return t.forAll(A)}))},A.prototype.intersection=function(t){var e=new A;return this.forAll((function(A,i){if(i in t.sets){var n=A.intersection(t.sets[i]),I=n.count();I>0&&(e.sets[i]=n,e.n+=I)}})),e},A}();e.LinkSets=g,e.getGroups=function(A,t,e,i){for(var I=A.length,r=new n(I,t,e,i);r.greedyMerge(););var o=[],g=r.getGroupHierarchy(o);return o.forEach((function(t){var e=function(e){var i=t[e];"number"==typeof i&&(t[e]=A[i])};e("source"),e("target")})),{groups:g,powerEdges:o}}},{}],15:[function(A,t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function A(A){this.elem=A,this.subheaps=[]}return A.prototype.toString=function(A){for(var t="",e=!1,i=0;i0)}return null}}return A.prototype.clear=function(){this._root=null,this.size=0},A.prototype.find=function(A){for(var t=this._root;null!==t;){var e=this._comparator(A,t.data);if(0===e)return t.data;t=t.get_child(e>0)}return null},A.prototype.lowerBound=function(A){return this._bound(A,this._comparator)},A.prototype.upperBound=function(A){var t=this._comparator;return this._bound(A,(function(A,e){return t(e,A)}))},A.prototype.min=function(){var A=this._root;if(null===A)return null;for(;null!==A.left;)A=A.left;return A.data},A.prototype.max=function(){var A=this._root;if(null===A)return null;for(;null!==A.right;)A=A.right;return A.data},A.prototype.iterator=function(){return new r(this)},A.prototype.each=function(A){for(var t,e=this.iterator();null!==(t=e.next());)A(t)},A.prototype.reach=function(A){for(var t,e=this.iterator();null!==(t=e.prev());)A(t)},A.prototype._bound=function(A,t){for(var e=this._root,i=this.iterator();null!==e;){var n=this._comparator(A,e.data);if(0===n)return i._cursor=e,i;i._ancestors.push(e),e=e.get_child(n>0)}for(var I=i._ancestors.length-1;I>=0;--I)if(t(A,(e=i._ancestors[I]).data)>0)return i._cursor=e,i._ancestors.length=I,i;return i._ancestors.length=0,i},A}();e.TreeBase=I;var r=function(){function A(A){this._tree=A,this._ancestors=[],this._cursor=null}return A.prototype.data=function(){return null!==this._cursor?this._cursor.data:null},A.prototype.next=function(){if(null===this._cursor){var A=this._tree._root;null!==A&&this._minNode(A)}else{var t;if(null===this._cursor.right)do{if(t=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.right===t);else this._ancestors.push(this._cursor),this._minNode(this._cursor.right)}return null!==this._cursor?this._cursor.data:null},A.prototype.prev=function(){if(null===this._cursor){var A=this._tree._root;null!==A&&this._maxNode(A)}else{var t;if(null===this._cursor.left)do{if(t=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.left===t);else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left)}return null!==this._cursor?this._cursor.data:null},A.prototype._minNode=function(A){for(;null!==A.left;)this._ancestors.push(A),A=A.left;this._cursor=A},A.prototype._maxNode=function(A){for(;null!==A.right;)this._ancestors.push(A),A=A.right;this._cursor=A},A}();e.Iterator=r;var o=function(){function A(A){this.data=A,this.left=null,this.right=null,this.red=!0}return A.prototype.get_child=function(A){return A?this.right:this.left},A.prototype.set_child=function(A,t){A?this.right=t:this.left=t},A}(),g=function(A){function t(t){var e=A.call(this)||this;return e._root=null,e._comparator=t,e.size=0,e}return n(t,A),t.prototype.insert=function(A){var e=!1;if(null===this._root)this._root=new o(A),e=!0,this.size++;else{var i=new o(void 0),n=!1,I=!1,r=null,g=i,a=null,M=this._root;for(g.right=this._root;;){if(null===M?(M=new o(A),a.set_child(n,M),e=!0,this.size++):t.is_red(M.left)&&t.is_red(M.right)&&(M.red=!0,M.left.red=!1,M.right.red=!1),t.is_red(M)&&t.is_red(a)){var s=g.right===r;M===a.get_child(I)?g.set_child(s,t.single_rotate(r,!I)):g.set_child(s,t.double_rotate(r,!I))}var c=this._comparator(M.data,A);if(0===c)break;I=n,n=c<0,null!==r&&(g=r),r=a,a=M,M=M.get_child(n)}this._root=i.right}return this._root.red=!1,e},t.prototype.remove=function(A){if(null===this._root)return!1;var e=new o(void 0),i=e;i.right=this._root;for(var n=null,I=null,r=null,g=!0;null!==i.get_child(g);){var a=g;I=n,n=i,i=i.get_child(g);var M=this._comparator(A,i.data);if(g=M>0,0===M&&(r=i),!t.is_red(i)&&!t.is_red(i.get_child(g)))if(t.is_red(i.get_child(!g))){var s=t.single_rotate(i,g);n.set_child(a,s),n=s}else if(!t.is_red(i.get_child(!g))){var c=n.get_child(!a);if(null!==c)if(t.is_red(c.get_child(!a))||t.is_red(c.get_child(a))){var u=I.right===n;t.is_red(c.get_child(a))?I.set_child(u,t.double_rotate(n,a)):t.is_red(c.get_child(!a))&&I.set_child(u,t.single_rotate(n,a));var l=I.get_child(u);l.red=!0,i.red=!0,l.left.red=!1,l.right.red=!1}else n.red=!1,c.red=!0,i.red=!0}}return null!==r&&(r.data=i.data,n.set_child(n.right===i,i.get_child(null===i.left)),this.size--),this._root=e.right,null!==this._root&&(this._root.red=!1),null!==r},t.is_red=function(A){return null!==A&&A.red},t.single_rotate=function(A,t){var e=A.get_child(!t);return A.set_child(!t,e.get_child(t)),e.set_child(t,A),A.red=!0,e.red=!1,e},t.double_rotate=function(A,e){return A.set_child(!e,t.single_rotate(A.get_child(!e),!e)),t.single_rotate(A,e)},t}(I);e.RBTree=g},{}],17:[function(A,t,e){"use strict";var i,n=this&&this.__extends||(i=function(A,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,t){A.__proto__=t}||function(A,t){for(var e in t)t.hasOwnProperty(e)&&(A[e]=t[e])},i(A,t)},function(A,t){function e(){this.constructor=A}i(A,t),A.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0});var I=A("./vpsc"),r=A("./rbtree");function o(A){return A.bounds=void 0!==A.leaves?A.leaves.reduce((function(A,t){return t.bounds.union(A)}),g.empty()):g.empty(),void 0!==A.groups&&(A.bounds=A.groups.reduce((function(A,t){return o(t).union(A)}),A.bounds)),A.bounds=A.bounds.inflate(A.padding),A.bounds}e.computeGroupBounds=o;var g=function(){function A(A,t,e,i){this.x=A,this.X=t,this.y=e,this.Y=i}return A.empty=function(){return new A(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},A.prototype.cx=function(){return(this.x+this.X)/2},A.prototype.cy=function(){return(this.y+this.Y)/2},A.prototype.overlapX=function(A){var t=this.cx(),e=A.cx();return t<=e&&A.x0?e[0]:null},A.prototype.vertices=function(){return[{x:this.x,y:this.y},{x:this.X,y:this.y},{x:this.X,y:this.Y},{x:this.x,y:this.Y}]},A.lineIntersection=function(A,t,e,i,n,I,r,o){var g=e-A,a=r-n,M=i-t,s=o-I,c=s*g-a*M;if(0==c)return null;var u=A-n,l=t-I,C=(a*l-s*u)/c,T=(g*l-M*u)/c;return C>=0&&C<=1&&T>=0&&T<=1?{x:A+C*g,y:t+C*M}:null},A.prototype.inflate=function(t){return new A(this.x-t,this.X+t,this.y-t,this.Y+t)},A}();e.Rectangle=g,e.makeEdgeBetween=function(A,t,e){var i=A.rayIntersection(t.cx(),t.cy())||{x:A.cx(),y:A.cy()},n=t.rayIntersection(A.cx(),A.cy())||{x:t.cx(),y:t.cy()},I=n.x-i.x,r=n.y-i.y,o=Math.sqrt(I*I+r*r),g=o-e;return{sourceIntersection:i,targetIntersection:n,arrowStart:{x:i.x+g*I/o,y:i.y+g*r/o}}},e.makeEdgeTo=function(A,t,e){var i=t.rayIntersection(A.x,A.y);i||(i={x:t.cx(),y:t.cy()});var n=i.x-A.x,I=i.y-A.y,r=Math.sqrt(n*n+I*I);return{x:i.x-e*n/r,y:i.y-e*I/r}};var a=function(A,t,e){this.v=A,this.r=t,this.pos=e,this.prev=c(),this.next=c()},M=function(A,t,e){this.isOpen=A,this.v=t,this.pos=e};function s(A,t){return A.pos>t.pos?1:A.pos0&&(A[e].insert(n),n[i].insert(A))};e("next","prev"),e("prev","next")}};function C(A,t,e,i){void 0===i&&(i=!1);var n=A.padding,I=void 0!==A.groups?A.groups.length:0,r=void 0!==A.leaves?A.leaves.length:0,o=I?A.groups.reduce((function(A,i){return A.concat(C(i,t,e,!0))}),[]):[],g=(i?2:0)+r+I,a=new Array(g),M=new Array(g),s=0,c=function(A,t){M[s]=A,a[s++]=t};if(i){var u=A.bounds,l=t.getCentre(u),h=t.getSize(u)/2,N=t.getOpen(u),d=t.getClose(u),y=l-h+n/2,E=l+h-n/2;A.minVar.desiredPosition=y,c(t.makeRect(N,d,y,n),A.minVar),A.maxVar.desiredPosition=E,c(t.makeRect(N,d,E,n),A.maxVar)}r&&A.leaves.forEach((function(A){return c(A.bounds,A.variable)})),I&&A.groups.forEach((function(A){var e=A.bounds;c(t.makeRect(t.getOpen(e),t.getClose(e),t.getCentre(e),t.getSize(e)),A.minVar)}));var D=T(M,a,t,e);return I&&(a.forEach((function(A){A.cOut=[],A.cIn=[]})),D.forEach((function(A){A.left.cOut.push(A),A.right.cIn.push(A)})),A.groups.forEach((function(A){var e=(A.padding-t.getSize(A.bounds))/2;A.minVar.cIn.forEach((function(A){return A.gap+=e})),A.minVar.cOut.forEach((function(t){t.left=A.maxVar,t.gap+=e}))}))),o.concat(D)}function T(A,t,e,i){var n,r=A.length,o=2*r;console.assert(t.length>=r);var g=new Array(o);for(n=0;nA[e]&&(A[e]=t)}I=A}))}},A.prototype.createAlignment=function(A){var t=this,e=this.nodes[A.offsets[0].node].variable;this.makeFeasible(A);var i="x"===A.axis?this.xConstraints:this.yConstraints;A.offsets.slice(1).forEach((function(A){var n=t.nodes[A.node].variable;i.push(new I.Constraint(e,n,A.offset,!0))}))},A.prototype.createConstraints=function(A){var t=this,e=function(A){return void 0===A.type||"separation"===A.type};this.xConstraints=A.filter((function(A){return"x"===A.axis&&e(A)})).map((function(A){return t.createSeparation(A)})),this.yConstraints=A.filter((function(A){return"y"===A.axis&&e(A)})).map((function(A){return t.createSeparation(A)})),A.filter((function(A){return"alignment"===A.type})).forEach((function(A){return t.createAlignment(A)}))},A.prototype.setupVariablesAndBounds=function(A,t,e,i){this.nodes.forEach((function(n,I){n.fixed?(n.variable.weight=n.fixedWeight?n.fixedWeight:1e3,e[I]=i(n)):n.variable.weight=1;var r=(n.width||0)/2,o=(n.height||0)/2,a=A[I],M=t[I];n.bounds=new g(a-r,a+r,M-o,M+o)}))},A.prototype.xProject=function(A,t,e){(this.rootGroup||this.avoidOverlaps||this.xConstraints)&&this.project(A,t,A,e,(function(A){return A.px}),this.xConstraints,d,(function(A){return A.bounds.setXCentre(e[A.variable.index]=A.variable.position())}),(function(A){var t=e[A.minVar.index]=A.minVar.position(),i=e[A.maxVar.index]=A.maxVar.position(),n=A.padding/2;A.bounds.x=t-n,A.bounds.X=i+n}))},A.prototype.yProject=function(A,t,e){(this.rootGroup||this.yConstraints)&&this.project(A,t,t,e,(function(A){return A.py}),this.yConstraints,y,(function(A){return A.bounds.setYCentre(e[A.variable.index]=A.variable.position())}),(function(A){var t=e[A.minVar.index]=A.minVar.position(),i=e[A.maxVar.index]=A.maxVar.position(),n=A.padding/2;A.bounds.y=t-n,A.bounds.Y=i+n}))},A.prototype.projectFunctions=function(){var A=this;return[function(t,e,i){return A.xProject(t,e,i)},function(t,e,i){return A.yProject(t,e,i)}]},A.prototype.project=function(A,t,e,i,n,I,r,g,a){this.setupVariablesAndBounds(A,t,i,n),this.rootGroup&&this.avoidOverlaps&&(o(this.rootGroup),I=I.concat(r(this.rootGroup))),this.solve(this.variables,I,e,i),this.nodes.forEach(g),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach(a),o(this.rootGroup))},A.prototype.solve=function(A,t,e,i){var n=new I.Solver(A,t);n.setStartingPositions(e),n.setDesiredPositions(i),n.solve()},A}();e.Projection=D},{"./rbtree":16,"./vpsc":19}],18:[function(A,t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=A("./pqueue"),n=function(A,t){this.id=A,this.distance=t},I=function(A){this.id=A,this.neighbours=[]},r=function(A,t,e){this.node=A,this.prev=t,this.d=e},o=function(){function A(A,t,e,i,r){this.n=A,this.es=t,this.neighbours=new Array(this.n);for(var o=this.n;o--;)this.neighbours[o]=new I(o);for(o=this.es.length;o--;){var g=this.es[o],a=e(g),M=i(g),s=r(g);this.neighbours[a].neighbours.push(new n(M,s)),this.neighbours[M].neighbours.push(new n(a,s))}}return A.prototype.DistanceMatrix=function(){for(var A=new Array(this.n),t=0;ts&&(a.d=s,a.prev=o,e.reduceKey(a.q,a,(function(A,t){return A.q=t})))}}return I},A}();e.Calculator=o},{"./pqueue":15}],19:[function(A,t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function A(A){this.scale=A,this.AB=0,this.AD=0,this.A2=0}return A.prototype.addVariable=function(A){var t=this.scale/A.scale,e=A.offset/A.scale,i=A.weight;this.AB+=i*t*e,this.AD+=i*t*A.desiredPosition,this.A2+=i*t*t},A.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},A}();e.PositionStats=i;var n=function(){function A(A,t,e,i){void 0===i&&(i=!1),this.left=A,this.right=t,this.gap=e,this.equality=i,this.active=!1,this.unsatisfiable=!1,this.left=A,this.right=t,this.gap=e,this.equality=i}return A.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},A}();e.Constraint=n;var I=function(){function A(A,t,e){void 0===t&&(t=1),void 0===e&&(e=1),this.desiredPosition=A,this.weight=t,this.scale=e,this.offset=0}return A.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},A.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},A.prototype.visitNeighbours=function(A,t){var e=function(e,i){return e.active&&A!==i&&t(e,i)};this.cOut.forEach((function(A){return e(A,A.right)})),this.cIn.forEach((function(A){return e(A,A.left)}))},A}();e.Variable=I;var r=function(){function A(A){this.vars=[],A.offset=0,this.ps=new i(A.scale),this.addVariable(A)}return A.prototype.addVariable=function(A){A.block=this,this.vars.push(A),this.ps.addVariable(A),this.posn=this.ps.getPosn()},A.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var A=0,t=this.vars.length;A=0?this.inactive.push(t):this.bs.merge(t)}}},A.prototype.solve=function(){this.satisfy();for(var A=Number.MAX_VALUE,t=this.bs.cost();Math.abs(A-t)>1e-4;)this.satisfy(),A=t,t=this.bs.cost();return t},A.LAGRANGIAN_TOLERANCE=-1e-4,A.ZERO_UPPERBOUND=-1e-10,A}();e.Solver=g,e.removeOverlapInOneDimension=function(A,t,e){for(var i=A.map((function(A){return new I(A.desiredCenter)})),r=[],o=A.length,a=0;a/g,">"):A},y=function(A){var t=A.getBoundingClientRect(),e=[A.pathSegList.getItem(0),A.pathSegList.getItem(1)];return{x:e[0].x,y:Math.min(e[0].y,e[1].y),width:t.width,height:t.height}};function E(A,t){var e=this;e.component=A,e.params=t||{},e.d3=A.d3,e.scale=e.d3.scale.linear(),e.range,e.orient="bottom",e.innerTickSize=6,e.outerTickSize=this.params.withOuterTick?6:0,e.tickPadding=3,e.tickValues=null,e.tickFormat,e.tickArguments,e.tickOffset=0,e.tickCulling=!0,e.tickCentered,e.tickTextCharSize,e.tickTextRotate=e.params.tickTextRotate,e.tickLength,e.axis=e.generateAxis()}(t=E.prototype).axisX=function(A,t,e){A.attr("transform",(function(A){return"translate("+Math.ceil(t(A)+e)+", 0)"}))},t.axisY=function(A,t){A.attr("transform",(function(A){return"translate(0,"+Math.ceil(t(A))+")"}))},t.scaleExtent=function(A){var t=A[0],e=A[A.length-1];return t0&&i[0]>0&&i.unshift(i[0]-(i[1]-i[0])),i},t.copyScale=function(){var A,t=this,e=t.scale.copy();return t.params.isCategory&&(A=t.scale.domain(),e.domain([A[0],A[1]-1])),e},t.textFormatted=function(A){var t=this.tickFormat?this.tickFormat(A):A;return void 0!==t?t:""},t.updateRange=function(){var A=this;return A.range=A.scale.rangeExtent?A.scale.rangeExtent():A.scaleExtent(A.scale.range()),A.range},t.updateTickTextCharSize=function(A){var t=this;if(t.tickTextCharSize)return t.tickTextCharSize;var e={h:11.5,w:5.5};return A.select("text").text((function(A){return t.textFormatted(A)})).each((function(A){var i=this.getBoundingClientRect(),n=t.textFormatted(A),I=i.height,r=n?i.width/n.length:void 0;I&&r&&(e.h=I,e.w=r)})).text(""),t.tickTextCharSize=e,e},t.transitionise=function(A){return this.params.withoutTransition?A:this.d3.transition(A)},t.isVertical=function(){return"left"===this.orient||"right"===this.orient},t.tspanData=function(A,t,e,i){var n=this,I=n.params.tickMultiline?n.splitTickText(A,e,i):[].concat(n.textFormatted(A));return n.params.tickMultiline&&n.params.tickMultilineMax>0&&(I=n.ellipsify(I,n.params.tickMultilineMax)),I.map((function(A){return{index:t,splitted:A,length:I.length}}))},t.splitTickText=function(A,t,e){var i,n,I,r=this,o=r.textFormatted(A),g=r.params.tickWidth;return"[object Array]"===Object.prototype.toString.call(o)?o:((!g||g<=0)&&(g=r.isVertical()?95:r.params.isCategory?Math.ceil(e(t[1])-e(t[0]))-12:110),function A(t,e){n=void 0;for(var o=1;o=0;n--){var I=e[n].length;if(e[n]=e[n].substr(0,I-i).padEnd(I,"."),(i-=I)<=0)break}return e},t.updateTickLength=function(){var A=this;A.tickLength=Math.max(A.innerTickSize,0)+A.tickPadding},t.lineY2=function(A){var t=this,e=t.scale(A)+(t.tickCentered?0:t.tickOffset);return t.range[0]0?1:-1):this.tickLength},t.textTransform=function(){var A=this.tickTextRotate;return A?"rotate("+A+")":""},t.textTextAnchor=function(){var A=this.tickTextRotate;return A?A>0?"start":"end":"middle"},t.tspanDx=function(){var A=this.tickTextRotate;return A?8*Math.sin(Math.PI*(A/180)):0},t.tspanDy=function(A,t){var e=this,i=e.tickTextCharSize.h;return 0===t&&(i=e.isVertical()?-((A.length-1)*(e.tickTextCharSize.h/2)-3):".71em"),i},t.generateAxis=function(){var A=this,t=A.d3,e=A.params;function i(n){n.each((function(){var n,I,r,o=i.g=t.select(this),g=this.__chart__||A.scale,a=this.__chart__=A.copyScale(),M=A.tickValues?A.tickValues:A.generateTicks(a),s=o.selectAll(".tick").data(M,a),c=s.enter().insert("g",".domain").attr("class","tick").style("opacity",1e-6),u=s.exit().remove(),l=A.transitionise(s).style("opacity",1);e.isCategory?(A.tickOffset=Math.ceil((a(1)-a(0))/2),I=A.tickCentered?0:A.tickOffset,r=A.tickCentered?A.tickOffset:0):A.tickOffset=I=0,c.append("line"),c.append("text"),A.updateRange(),A.updateTickLength(),A.updateTickTextCharSize(o.select(".tick"));var C=l.select("line"),T=l.select("text"),h=s.select("text").selectAll("tspan").data((function(t,e){return A.tspanData(t,e,M,a)}));h.enter().append("tspan"),h.exit().remove(),h.text((function(A){return A.splitted}));var N=o.selectAll(".domain").data([0]),d=(N.enter().append("path").attr("class","domain"),A.transitionise(N));switch(A.orient){case"bottom":n=A.axisX,C.attr("x1",I).attr("x2",I).attr("y2",(function(t,e){return A.lineY2(t,e)})),T.attr("x",0).attr("y",(function(t,e){return A.textY(t,e)})).attr("transform",(function(t,e){return A.textTransform(t,e)})).style("text-anchor",(function(t,e){return A.textTextAnchor(t,e)})),h.attr("x",0).attr("dy",(function(t,e){return A.tspanDy(t,e)})).attr("dx",(function(t,e){return A.tspanDx(t,e)})),d.attr("d","M"+A.range[0]+","+A.outerTickSize+"V0H"+A.range[1]+"V"+A.outerTickSize);break;case"top":n=A.axisX,C.attr("x1",I).attr("x2",I).attr("y2",(function(t,e){return-1*A.lineY2(t,e)})),T.attr("x",0).attr("y",(function(t,i){return-1*A.textY(t,i)-(e.isCategory?2:A.tickLength-2)})).attr("transform",(function(t,e){return A.textTransform(t,e)})).style("text-anchor",(function(t,e){return A.textTextAnchor(t,e)})),h.attr("x",0).attr("dy",(function(t,e){return A.tspanDy(t,e)})).attr("dx",(function(t,e){return A.tspanDx(t,e)})),d.attr("d","M"+A.range[0]+","+-A.outerTickSize+"V0H"+A.range[1]+"V"+-A.outerTickSize);break;case"left":n=A.axisY,C.attr("x2",-A.innerTickSize).attr("y1",r).attr("y2",r),T.attr("x",-A.tickLength).attr("y",A.tickOffset).style("text-anchor","end"),h.attr("x",-A.tickLength).attr("dy",(function(t,e){return A.tspanDy(t,e)})),d.attr("d","M"+-A.outerTickSize+","+A.range[0]+"H0V"+A.range[1]+"H"+-A.outerTickSize);break;case"right":n=A.axisY,C.attr("x2",A.innerTickSize).attr("y1",r).attr("y2",r),T.attr("x",A.tickLength).attr("y",A.tickOffset).style("text-anchor","start"),h.attr("x",A.tickLength).attr("dy",(function(t,e){return A.tspanDy(t,e)})),d.attr("d","M"+A.outerTickSize+","+A.range[0]+"H0V"+A.range[1]+"H"+A.outerTickSize)}if(a.rangeBand){var y=a,E=y.rangeBand()/2;g=a=function(A){return y(A)+E}}else g.rangeBand?g=a:u.call(n,a,A.tickOffset);c.call(n,g,A.tickOffset),l.call(n,a,A.tickOffset)}))}return i.scale=function(t){return arguments.length?(A.scale=t,i):A.scale},i.orient=function(t){return arguments.length?(A.orient=t in{top:1,right:1,bottom:1,left:1}?t+"":"bottom",i):A.orient},i.tickFormat=function(t){return arguments.length?(A.tickFormat=t,i):A.tickFormat},i.tickCentered=function(t){return arguments.length?(A.tickCentered=t,i):A.tickCentered},i.tickOffset=function(){return A.tickOffset},i.tickInterval=function(){var t,n;return e.isCategory?t=2*A.tickOffset:(n=i.g.select("path.domain").attr("d").split(/[A-Z]/).reduce((function(A,t){var e=t.split(/[ ,]+/);return 1===e.length?A+Math.abs(+e[0]):A+Math.sqrt(e.reduce((function(A,t){return A+t*t}),0))}),0),t=(n-=2*A.outerTickSize)/i.g.selectAll("line").size()),t===1/0?0:t},i.ticks=function(){return arguments.length?(A.tickArguments=arguments,i):A.tickArguments},i.tickCulling=function(t){return arguments.length?(A.tickCulling=t,i):A.tickCulling},i.tickValues=function(t){if("function"==typeof t)A.tickValues=function(){return t(A.scale.domain())};else{if(!arguments.length)return A.tickValues;A.tickValues=t}return i},i};var D=function(e){function i(e){!function(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var n={fn:A,internal:{fn:t}},I=function(A,t){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==r(t)&&"function"!=typeof t?A:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,"axis",n));return I.d3=e.d3,I.internal=E,I}return function(A,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+r(t));A.prototype=Object.create(t&&t.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(A,t):A.__proto__=t)}(i,(function(A,t,e){this.owner=A,x.chart.internal[t]=e})),i}();(A=D.prototype).init=function(){var A=this.owner,t=A.config,e=A.main;A.axes.x=e.append("g").attr("class",i.axis+" "+i.axisX).attr("clip-path",t.axis_x_inner?"":A.clipPathForXAxis).attr("transform",A.getTranslate("x")).style("visibility",t.axis_x_show?"visible":"hidden"),A.axes.x.append("text").attr("class",i.axisXLabel).attr("transform",t.axis_rotated?"rotate(-90)":"").style("text-anchor",this.textAnchorForXAxisLabel.bind(this)),A.axes.y=e.append("g").attr("class",i.axis+" "+i.axisY).attr("clip-path",t.axis_y_inner?"":A.clipPathForYAxis).attr("transform",A.getTranslate("y")).style("visibility",t.axis_y_show?"visible":"hidden"),A.axes.y.append("text").attr("class",i.axisYLabel).attr("transform",t.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForYAxisLabel.bind(this)),A.axes.y2=e.append("g").attr("class",i.axis+" "+i.axisY2).attr("transform",A.getTranslate("y2")).style("visibility",t.axis_y2_show?"visible":"hidden"),A.axes.y2.append("text").attr("class",i.axisY2Label).attr("transform",t.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForY2AxisLabel.bind(this))},A.getXAxis=function(A,t,e,i,n,I,r){var o=this.owner,g=o.config,a={isCategory:o.isCategorized(),withOuterTick:n,tickMultiline:g.axis_x_tick_multiline,tickMultilineMax:g.axis_x_tick_multiline?Number(g.axis_x_tick_multilineMax):0,tickWidth:g.axis_x_tick_width,tickTextRotate:r?0:g.axis_x_tick_rotate,withoutTransition:I},M=new this.internal(this,a).axis.scale(A).orient(t);return o.isTimeSeries()&&i&&"function"!=typeof i&&(i=i.map((function(A){return o.parseDate(A)}))),M.tickFormat(e).tickValues(i),o.isCategorized()&&(M.tickCentered(g.axis_x_tick_centered),C(g.axis_x_tick_culling)&&(g.axis_x_tick_culling=!1)),M},A.updateXAxisTickValues=function(A,t){var e,i=this.owner,n=i.config;return(n.axis_x_tick_fit||n.axis_x_tick_count)&&(e=this.generateTickValues(i.mapTargetsToUniqueXs(A),n.axis_x_tick_count,i.isTimeSeries())),t?t.tickValues(e):(i.xAxis.tickValues(e),i.subXAxis.tickValues(e)),e},A.getYAxis=function(A,t,e,i,n,I,r){var o=this.owner,g=o.config,a={withOuterTick:n,withoutTransition:I,tickTextRotate:r?0:g.axis_y_tick_rotate},M=new this.internal(this,a).axis.scale(A).orient(t).tickFormat(e);return o.isTimeSeriesY()?M.ticks(o.d3.time[g.axis_y_tick_time_value],g.axis_y_tick_time_interval):M.tickValues(i),M},A.getId=function(A){var t=this.owner.config;return A in t.data_axes?t.data_axes[A]:"y"},A.getXAxisTickFormat=function(){var A=this.owner,t=A.config,e=A.isTimeSeries()?A.defaultAxisTimeFormat:A.isCategorized()?A.categoryName:function(A){return A<0?A.toFixed(0):A};return t.axis_x_tick_format&&(o(t.axis_x_tick_format)?e=t.axis_x_tick_format:A.isTimeSeries()&&(e=function(e){return e?A.axisTimeFormat(t.axis_x_tick_format)(e):""})),o(e)?function(t){return e.call(A,t)}:e},A.getTickValues=function(A,t){return A||(t?t.tickValues():void 0)},A.getXAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_x_tick_values,this.owner.xAxis)},A.getYAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y_tick_values,this.owner.yAxis)},A.getY2AxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y2_tick_values,this.owner.y2Axis)},A.getLabelOptionByAxisId=function(A){var t,e=this.owner.config;return"y"===A?t=e.axis_y_label:"y2"===A?t=e.axis_y2_label:"x"===A&&(t=e.axis_x_label),t},A.getLabelText=function(A){var t=this.getLabelOptionByAxisId(A);return a(t)?t:t?t.text:null},A.setLabelText=function(A,t){var e=this.owner.config,i=this.getLabelOptionByAxisId(A);a(i)?"y"===A?e.axis_y_label=t:"y2"===A?e.axis_y2_label=t:"x"===A&&(e.axis_x_label=t):i&&(i.text=t)},A.getLabelPosition=function(A,t){var e=this.getLabelOptionByAxisId(A),i=e&&"object"===(void 0===e?"undefined":n(e))&&e.position?e.position:t;return{isInner:i.indexOf("inner")>=0,isOuter:i.indexOf("outer")>=0,isLeft:i.indexOf("left")>=0,isCenter:i.indexOf("center")>=0,isRight:i.indexOf("right")>=0,isTop:i.indexOf("top")>=0,isMiddle:i.indexOf("middle")>=0,isBottom:i.indexOf("bottom")>=0}},A.getXAxisLabelPosition=function(){return this.getLabelPosition("x",this.owner.config.axis_rotated?"inner-top":"inner-right")},A.getYAxisLabelPosition=function(){return this.getLabelPosition("y",this.owner.config.axis_rotated?"inner-right":"inner-top")},A.getY2AxisLabelPosition=function(){return this.getLabelPosition("y2",this.owner.config.axis_rotated?"inner-right":"inner-top")},A.getLabelPositionById=function(A){return"y2"===A?this.getY2AxisLabelPosition():"y"===A?this.getYAxisLabelPosition():this.getXAxisLabelPosition()},A.textForXAxisLabel=function(){return this.getLabelText("x")},A.textForYAxisLabel=function(){return this.getLabelText("y")},A.textForY2AxisLabel=function(){return this.getLabelText("y2")},A.xForAxisLabel=function(A,t){var e=this.owner;return A?t.isLeft?0:t.isCenter?e.width/2:e.width:t.isBottom?-e.height:t.isMiddle?-e.height/2:0},A.dxForAxisLabel=function(A,t){return A?t.isLeft?"0.5em":t.isRight?"-0.5em":"0":t.isTop?"-0.5em":t.isBottom?"0.5em":"0"},A.textAnchorForAxisLabel=function(A,t){return A?t.isLeft?"start":t.isCenter?"middle":"end":t.isBottom?"start":t.isMiddle?"middle":"end"},A.xForXAxisLabel=function(){return this.xForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},A.xForYAxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},A.xForY2AxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},A.dxForXAxisLabel=function(){return this.dxForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},A.dxForYAxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},A.dxForY2AxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},A.dyForXAxisLabel=function(){var A=this.owner,t=A.config,e=this.getXAxisLabelPosition();return t.axis_rotated?e.isInner?"1.2em":-25-(A.config.axis_x_inner?0:this.getMaxTickWidth("x")):e.isInner?"-0.5em":t.axis_x_height?t.axis_x_height-10:"3em"},A.dyForYAxisLabel=function(){var A=this.owner,t=this.getYAxisLabelPosition();return A.config.axis_rotated?t.isInner?"-0.5em":"3em":t.isInner?"1.2em":-10-(A.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)},A.dyForY2AxisLabel=function(){var A=this.owner,t=this.getY2AxisLabelPosition();return A.config.axis_rotated?t.isInner?"1.2em":"-2.2em":t.isInner?"-0.5em":15+(A.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)},A.textAnchorForXAxisLabel=function(){var A=this.owner;return this.textAnchorForAxisLabel(!A.config.axis_rotated,this.getXAxisLabelPosition())},A.textAnchorForYAxisLabel=function(){var A=this.owner;return this.textAnchorForAxisLabel(A.config.axis_rotated,this.getYAxisLabelPosition())},A.textAnchorForY2AxisLabel=function(){var A=this.owner;return this.textAnchorForAxisLabel(A.config.axis_rotated,this.getY2AxisLabelPosition())},A.getMaxTickWidth=function(A,t){var e,i,n,I,r=this.owner,o=r.config,g=0;return t&&r.currentMaxTickWidths[A]||(r.svg&&(e=r.filterTargetsToShow(r.data.targets),"y"===A?(i=r.y.copy().domain(r.getYDomain(e,"y")),n=this.getYAxis(i,r.yOrient,o.axis_y_tick_format,r.yAxisTickValues,!1,!0,!0)):"y2"===A?(i=r.y2.copy().domain(r.getYDomain(e,"y2")),n=this.getYAxis(i,r.y2Orient,o.axis_y2_tick_format,r.y2AxisTickValues,!1,!0,!0)):(i=r.x.copy().domain(r.getXDomain(e)),n=this.getXAxis(i,r.xOrient,r.xAxisTickFormat,r.xAxisTickValues,!1,!0,!0),this.updateXAxisTickValues(e,n)),(I=r.d3.select("body").append("div").classed("c3",!0)).append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0).append("g").call(n).each((function(){r.d3.select(this).selectAll("text").each((function(){var A=this.getBoundingClientRect();g2){for(r=i-2,n=A[0],g=((I=A[A.length-1])-n)/(r+1),s=[n],a=0;a0&&A(t[n],e[n],i)}))}(j,this,this)}function L(A){var t=this;t.d3=window.d3?window.d3:e(4143),t.api=A,t.config=t.getDefaultConfig(),t.data={},t.cache={},t.axes={}}return x.generate=function(A){return new p(A)},x.chart={fn:p.prototype,internal:{fn:L.prototype}},j=x.chart.fn,(B=x.chart.internal.fn).beforeInit=function(){},B.afterInit=function(){},B.init=function(){var A=this,t=A.config;if(A.initParams(),t.data_url)A.convertUrlToData(t.data_url,t.data_mimeType,t.data_headers,t.data_keys,A.initWithData);else if(t.data_json)A.initWithData(A.convertJsonToData(t.data_json,t.data_keys));else if(t.data_rows)A.initWithData(A.convertRowsToData(t.data_rows));else{if(!t.data_columns)throw Error("url or json or rows or columns is required.");A.initWithData(A.convertColumnsToData(t.data_columns))}},B.initParams=function(){var A=this,t=A.d3,e=A.config;A.clipId="c3-"+ +new Date+"-clip",A.clipIdForXAxis=A.clipId+"-xaxis",A.clipIdForYAxis=A.clipId+"-yaxis",A.clipIdForGrid=A.clipId+"-grid",A.clipIdForSubchart=A.clipId+"-subchart",A.clipPath=A.getClipPath(A.clipId),A.clipPathForXAxis=A.getClipPath(A.clipIdForXAxis),A.clipPathForYAxis=A.getClipPath(A.clipIdForYAxis),A.clipPathForGrid=A.getClipPath(A.clipIdForGrid),A.clipPathForSubchart=A.getClipPath(A.clipIdForSubchart),A.dragStart=null,A.dragging=!1,A.flowing=!1,A.cancelClick=!1,A.mouseover=!1,A.transiting=!1,A.color=A.generateColor(),A.levelColor=A.generateLevelColor(),A.dataTimeFormat=e.data_xLocaltime?t.time.format:t.time.format.utc,A.axisTimeFormat=e.axis_x_localtime?t.time.format:t.time.format.utc,A.defaultAxisTimeFormat=A.axisTimeFormat.multi([[".%L",function(A){return A.getMilliseconds()}],[":%S",function(A){return A.getSeconds()}],["%I:%M",function(A){return A.getMinutes()}],["%I %p",function(A){return A.getHours()}],["%-m/%-d",function(A){return A.getDay()&&1!==A.getDate()}],["%-m/%-d",function(A){return 1!==A.getDate()}],["%-m/%-d",function(A){return A.getMonth()}],["%Y/%-m/%-d",function(){return!0}]]),A.hiddenTargetIds=[],A.hiddenLegendIds=[],A.focusedTargetIds=[],A.defocusedTargetIds=[],A.xOrient=e.axis_rotated?e.axis_x_inner?"right":"left":e.axis_x_inner?"top":"bottom",A.yOrient=e.axis_rotated?e.axis_y_inner?"top":"bottom":e.axis_y_inner?"right":"left",A.y2Orient=e.axis_rotated?e.axis_y2_inner?"bottom":"top":e.axis_y2_inner?"left":"right",A.subXOrient=e.axis_rotated?"left":"bottom",A.isLegendRight="right"===e.legend_position,A.isLegendInset="inset"===e.legend_position,A.isLegendTop="top-left"===e.legend_inset_anchor||"top-right"===e.legend_inset_anchor,A.isLegendLeft="top-left"===e.legend_inset_anchor||"bottom-left"===e.legend_inset_anchor,A.legendStep=0,A.legendItemWidth=0,A.legendItemHeight=0,A.currentMaxTickWidths={x:0,y:0,y2:0},A.rotated_padding_left=30,A.rotated_padding_right=e.axis_rotated&&!e.axis_x_show?0:30,A.rotated_padding_top=5,A.withoutFadeIn={},A.intervalForObserveInserted=void 0,A.axes.subx=t.selectAll([])},B.initChartElements=function(){this.initBar&&this.initBar(),this.initLine&&this.initLine(),this.initArc&&this.initArc(),this.initGauge&&this.initGauge(),this.initText&&this.initText()},B.initWithData=function(A){var t,e,n=this,I=n.d3,r=n.config,o=!0;n.axis=new D(n),n.initPie&&n.initPie(),n.initBrush&&n.initBrush(),n.initZoom&&n.initZoom(),r.bindto?"function"==typeof r.bindto.node?n.selectChart=r.bindto:n.selectChart=I.select(r.bindto):n.selectChart=I.selectAll([]),n.selectChart.empty()&&(n.selectChart=I.select(document.createElement("div")).style("opacity",0),n.observeInserted(n.selectChart),o=!1),n.selectChart.html("").classed("c3",!0),n.data.xs={},n.data.targets=n.convertDataToTargets(A),r.data_filter&&(n.data.targets=n.data.targets.filter(r.data_filter)),r.data_hide&&n.addHiddenTargetIds(!0===r.data_hide?n.mapToIds(n.data.targets):r.data_hide),r.legend_hide&&n.addHiddenLegendIds(!0===r.legend_hide?n.mapToIds(n.data.targets):r.legend_hide),n.updateSizes(),n.updateScales(),n.x.domain(I.extent(n.getXDomain(n.data.targets))),n.y.domain(n.getYDomain(n.data.targets,"y")),n.y2.domain(n.getYDomain(n.data.targets,"y2")),n.subX.domain(n.x.domain()),n.subY.domain(n.y.domain()),n.subY2.domain(n.y2.domain()),n.orgXDomain=n.x.domain(),n.brush&&n.brush.scale(n.subX),r.zoom_enabled&&n.zoom.scale(n.x),n.svg=n.selectChart.append("svg").style("overflow","hidden").on("mouseenter",(function(){return r.onmouseover.call(n)})).on("mouseleave",(function(){return r.onmouseout.call(n)})),n.config.svg_classname&&n.svg.attr("class",n.config.svg_classname),t=n.svg.append("defs"),n.clipChart=n.appendClip(t,n.clipId),n.clipXAxis=n.appendClip(t,n.clipIdForXAxis),n.clipYAxis=n.appendClip(t,n.clipIdForYAxis),n.clipGrid=n.appendClip(t,n.clipIdForGrid),n.clipSubchart=n.appendClip(t,n.clipIdForSubchart),n.updateSvgSize(),e=n.main=n.svg.append("g").attr("transform",n.getTranslate("main")),n.initSubchart&&n.initSubchart(),n.initTooltip&&n.initTooltip(),n.initLegend&&n.initLegend(),n.initTitle&&n.initTitle(),e.append("text").attr("class",i.text+" "+i.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),n.initRegion(),n.initGrid(),e.append("g").attr("clip-path",n.clipPath).attr("class",i.chart),r.grid_lines_front&&n.initGridLines(),n.initEventRect(),n.initChartElements(),e.insert("rect",r.zoom_privileged?null:"g."+i.regions).attr("class",i.zoomRect).attr("width",n.width).attr("height",n.height).style("opacity",0).on("dblclick.zoom",null),r.axis_x_extent&&n.brush.extent(n.getDefaultExtent()),n.axis.init(),n.updateTargets(n.data.targets),o&&(n.updateDimension(),n.config.oninit.call(n),n.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1})),n.bindResize(),n.api.element=n.selectChart.node()},B.smoothLines=function(A,t){var e=this;"grid"===t&&A.each((function(){var A=e.d3.select(this),t=A.attr("x1"),i=A.attr("x2"),n=A.attr("y1"),I=A.attr("y2");A.attr({x1:Math.ceil(t),x2:Math.ceil(i),y1:Math.ceil(n),y2:Math.ceil(I)})}))},B.updateSizes=function(){var A=this,t=A.config,e=A.legend?A.getLegendHeight():0,i=A.legend?A.getLegendWidth():0,n=A.isLegendRight||A.isLegendInset?0:e,I=A.hasArcType(),r=t.axis_rotated||I?0:A.getHorizontalAxisHeight("x"),o=t.subchart_show&&!I?t.subchart_size_height+r:0;A.currentWidth=A.getCurrentWidth(),A.currentHeight=A.getCurrentHeight();var g=A.getCurrentPaddingTop();A.margin=t.axis_rotated?{top:A.getHorizontalAxisHeight("y2")+g,right:I?0:A.getCurrentPaddingRight(),bottom:A.getHorizontalAxisHeight("y")+n+A.getCurrentPaddingBottom(),left:o+(I?0:A.getCurrentPaddingLeft())}:{top:4+g,right:I?0:A.getCurrentPaddingRight(),bottom:r+o+n+A.getCurrentPaddingBottom(),left:I?0:A.getCurrentPaddingLeft()},A.margin2=t.axis_rotated?{top:A.margin.top,right:NaN,bottom:20+n,left:A.rotated_padding_left}:{top:A.currentHeight-o-n,right:NaN,bottom:r+n,left:A.margin.left},A.margin3={top:0,right:NaN,bottom:0,left:0},A.updateSizeForLegend&&A.updateSizeForLegend(e,i,{topPad:g}),A.width=A.currentWidth-A.margin.left-A.margin.right,A.height=A.currentHeight-A.margin.top-A.margin.bottom,A.width<0&&(A.width=0),A.height<0&&(A.height=0),A.width2=t.axis_rotated?A.margin.left-A.rotated_padding_left-A.rotated_padding_right:A.width,A.height2=t.axis_rotated?A.height:A.currentHeight-A.margin2.top-A.margin2.bottom,A.width2<0&&(A.width2=0),A.height2<0&&(A.height2=0),A.arcWidth=A.width-(A.isLegendRight?i+10:0),A.arcHeight=A.height-(A.isLegendRight?0:10),A.hasType("gauge")&&!t.gauge_fullCircle&&(A.arcHeight+=A.height-A.getGaugeLabelHeight()),A.updateRadius&&A.updateRadius(),A.isLegendRight&&I&&(A.margin3.left=A.arcWidth/2+1.1*A.radiusExpanded)},B.updateTargets=function(A){var t=this;t.updateTargetsForText(A),t.updateTargetsForBar(A),t.updateTargetsForLine(A),t.hasArcType()&&t.updateTargetsForArc&&t.updateTargetsForArc(A),t.updateTargetsForSubchart&&t.updateTargetsForSubchart(A),t.showTargets()},B.showTargets=function(){var A=this;A.svg.selectAll("."+i.target).filter((function(t){var e=d3.select(this).style("opacity");return A.isTargetToShow(t.id)!==!!+e})).transition().duration(A.config.transition_duration).style("opacity",(function(t){return A.isTargetToShow(t.id)?1:0}))},B.redraw=function(A,t){var e,n,I,r,o,g,a,M,s,c,u,l,C,T,N,d,y,E,D,j,B,x,p,L,f,z,w,m,Q,S=this,Y=S.main,O=S.d3,v=S.config,U=S.getShapeIndices(S.isAreaType),b=S.getShapeIndices(S.isBarType),P=S.getShapeIndices(S.isLineType),k=S.hasArcType(),G=S.filterTargetsToShow(S.data.targets),F=S.xv.bind(S);e=h(A=A||{},"withY",!0),n=h(A,"withSubchart",!0),I=h(A,"withTransition",!0),g=h(A,"withTransform",!1),a=h(A,"withUpdateXDomain",!1),M=h(A,"withUpdateOrgXDomain",!1),s=h(A,"withTrimXDomain",!0),C=h(A,"withUpdateXAxis",a),c=h(A,"withLegend",!1),u=h(A,"withEventRect",!0),l=h(A,"withDimension",!0),r=h(A,"withTransitionForExit",I),o=h(A,"withTransitionForAxis",I);var J=h(A,"withTheseAxes",null);if(c&&(J=null),D=I?v.transition_duration:0,j=r?D:0,B=o?D:0,t=t||S.axis.generateTransitions(B),c&&v.legend_show?S.updateLegend(S.mapToIds(S.data.targets),A,t):l&&S.updateDimension(!0),S.isCategorized()&&0===G.length&&S.x.domain([0,S.axes.x.selectAll(".tick").size()]),G.length?(S.updateXDomain(G,a,M,s),v.axis_x_tick_values||(L=S.axis.updateXAxisTickValues(G))):(S.xAxis.tickValues([]),S.subXAxis.tickValues([])),v.zoom_rescale&&!A.flow&&(w=S.x.orgDomain()),S.y.domain(S.getYDomain(G,"y",w)),S.y2.domain(S.getYDomain(G,"y2",w)),!v.axis_y_tick_values&&v.axis_y_tick_count&&S.yAxis.tickValues(S.axis.generateTickValues(S.y.domain(),v.axis_y_tick_count)),!v.axis_y2_tick_values&&v.axis_y2_tick_count&&S.y2Axis.tickValues(S.axis.generateTickValues(S.y2.domain(),v.axis_y2_tick_count)),S.axis.redraw(t,k,J),S.axis.updateLabels(I),(a||C)&&G.length)if(v.axis_x_tick_culling&&L){for(f=1;f=0&&O.select(this).style("display",t%z?"none":"block")}))}else S.svg.selectAll("."+i.axisX+" .tick text").style("display","block");T=S.generateDrawArea?S.generateDrawArea(U,!1):void 0,N=S.generateDrawBar?S.generateDrawBar(b):void 0,d=S.generateDrawLine?S.generateDrawLine(P,!1):void 0,y=S.generateXYForText(U,b,P,!0),E=S.generateXYForText(U,b,P,!1),e&&(S.subY.domain(S.getYDomain(G,"y")),S.subY2.domain(S.getYDomain(G,"y2"))),S.updateXgridFocus(),Y.select("text."+i.text+"."+i.empty).attr("x",S.width/2).attr("y",S.height/2).text(v.data_empty_label_text).transition().style("opacity",G.length?0:1),S.updateGrid(D),S.updateRegion(D),S.updateBar(j),S.updateLine(j),S.updateArea(j),S.updateCircle(),S.hasDataLabel()&&S.updateText(j),S.redrawTitle&&S.redrawTitle(),S.redrawArc&&S.redrawArc(D,j,g),S.redrawSubchart&&S.redrawSubchart(n,t,D,j,U,b,P),Y.selectAll("."+i.selectedCircles).filter(S.isBarType.bind(S)).selectAll("circle").remove(),v.interaction_enabled&&!A.flow&&u&&(S.redrawEventRect(),S.updateZoom&&S.updateZoom()),S.updateCircleY(),m=(S.config.axis_rotated?S.circleY:S.circleX).bind(S),Q=(S.config.axis_rotated?S.circleX:S.circleY).bind(S),A.flow&&(p=S.generateFlow({targets:G,flow:A.flow,duration:A.flow.duration,drawBar:N,drawLine:d,drawArea:T,cx:m,cy:Q,xv:F,xForText:y,yForText:E})),(D||p)&&S.isTabVisible()?O.transition().duration(D).each((function(){var t=[];[S.redrawBar(N,!0),S.redrawLine(d,!0),S.redrawArea(T,!0),S.redrawCircle(m,Q,!0),S.redrawText(y,E,A.flow,!0),S.redrawRegion(!0),S.redrawGrid(!0)].forEach((function(A){A.forEach((function(A){t.push(A)}))})),x=S.generateWait(),t.forEach((function(A){x.add(A)}))})).call(x,(function(){p&&p(),v.onrendered&&v.onrendered.call(S)})):(S.redrawBar(N),S.redrawLine(d),S.redrawArea(T),S.redrawCircle(m,Q),S.redrawText(y,E,A.flow),S.redrawRegion(),S.redrawGrid(),v.onrendered&&v.onrendered.call(S)),S.mapToIds(S.data.targets).forEach((function(A){S.withoutFadeIn[A]=!0}))},B.updateAndRedraw=function(A){var t,e=this,i=e.config;(A=A||{}).withTransition=h(A,"withTransition",!0),A.withTransform=h(A,"withTransform",!1),A.withLegend=h(A,"withLegend",!1),A.withUpdateXDomain=!0,A.withUpdateOrgXDomain=!0,A.withTransitionForExit=!1,A.withTransitionForTransform=h(A,"withTransitionForTransform",A.withTransition),e.updateSizes(),A.withLegend&&i.legend_show||(t=e.axis.generateTransitions(A.withTransitionForAxis?i.transition_duration:0),e.updateScales(),e.updateSvgSize(),e.transformAll(A.withTransitionForTransform,t)),e.redraw(A,t)},B.redrawWithoutRescale=function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})},B.isTimeSeries=function(){return"timeseries"===this.config.axis_x_type},B.isCategorized=function(){return this.config.axis_x_type.indexOf("categor")>=0},B.isCustomX=function(){var A=this.config;return!this.isTimeSeries()&&(A.data_x||T(A.data_xs))},B.isTimeSeriesY=function(){return"timeseries"===this.config.axis_y_type},B.getTranslate=function(A){var t,e,i=this,n=i.config;return"main"===A?(t=u(i.margin.left),e=u(i.margin.top)):"context"===A?(t=u(i.margin2.left),e=u(i.margin2.top)):"legend"===A?(t=i.margin3.left,e=i.margin3.top):"x"===A?(t=0,e=n.axis_rotated?0:i.height):"y"===A?(t=0,e=n.axis_rotated?i.height:0):"y2"===A?(t=n.axis_rotated?0:i.width,e=n.axis_rotated?1:0):"subx"===A?(t=0,e=n.axis_rotated?0:i.height2):"arc"===A&&(t=i.arcWidth/2,e=i.arcHeight/2-(i.hasType("gauge")?6:0)),"translate("+t+","+e+")"},B.initialOpacity=function(A){return null!==A.value&&this.withoutFadeIn[A.id]?1:0},B.initialOpacityForCircle=function(A){return null!==A.value&&this.withoutFadeIn[A.id]?this.opacityForCircle(A):0},B.opacityForCircle=function(A){var t=(o(this.config.point_show)?this.config.point_show(A):this.config.point_show)?1:0;return I(A.value)?this.isScatterType(A)?.5:t:0},B.opacityForText=function(){return this.hasDataLabel()?1:0},B.xx=function(A){return A?this.x(A.x):null},B.xv=function(A){var t=this,e=A.value;return t.isTimeSeries()?e=t.parseDate(A.value):t.isCategorized()&&"string"==typeof A.value&&(e=t.config.axis_x_categories.indexOf(A.value)),Math.ceil(t.x(e))},B.yv=function(A){var t=A.axis&&"y2"===A.axis?this.y2:this.y;return Math.ceil(t(A.value))},B.subxx=function(A){return A?this.subX(A.x):null},B.transformMain=function(A,t){var e,n,I,r=this;t&&t.axisX?e=t.axisX:(e=r.main.select("."+i.axisX),A&&(e=e.transition())),t&&t.axisY?n=t.axisY:(n=r.main.select("."+i.axisY),A&&(n=n.transition())),t&&t.axisY2?I=t.axisY2:(I=r.main.select("."+i.axisY2),A&&(I=I.transition())),(A?r.main.transition():r.main).attr("transform",r.getTranslate("main")),e.attr("transform",r.getTranslate("x")),n.attr("transform",r.getTranslate("y")),I.attr("transform",r.getTranslate("y2")),r.main.select("."+i.chartArcs).attr("transform",r.getTranslate("arc"))},B.transformAll=function(A,t){var e=this;e.transformMain(A,t),e.config.subchart_show&&e.transformContext(A,t),e.legend&&e.transformLegend(A)},B.updateSvgSize=function(){var A=this,t=A.svg.select(".c3-brush .background");A.svg.attr("width",A.currentWidth).attr("height",A.currentHeight),A.svg.selectAll(["#"+A.clipId,"#"+A.clipIdForGrid]).select("rect").attr("width",A.width).attr("height",A.height),A.svg.select("#"+A.clipIdForXAxis).select("rect").attr("x",A.getXAxisClipX.bind(A)).attr("y",A.getXAxisClipY.bind(A)).attr("width",A.getXAxisClipWidth.bind(A)).attr("height",A.getXAxisClipHeight.bind(A)),A.svg.select("#"+A.clipIdForYAxis).select("rect").attr("x",A.getYAxisClipX.bind(A)).attr("y",A.getYAxisClipY.bind(A)).attr("width",A.getYAxisClipWidth.bind(A)).attr("height",A.getYAxisClipHeight.bind(A)),A.svg.select("#"+A.clipIdForSubchart).select("rect").attr("width",A.width).attr("height",t.size()&&t.attr("height")||0),A.svg.select("."+i.zoomRect).attr("width",A.width).attr("height",A.height),A.selectChart.style("max-height",A.currentHeight+"px")},B.updateDimension=function(A){var t=this;A||(t.config.axis_rotated?(t.axes.x.call(t.xAxis),t.axes.subx.call(t.subXAxis)):(t.axes.y.call(t.yAxis),t.axes.y2.call(t.y2Axis))),t.updateSizes(),t.updateScales(),t.updateSvgSize(),t.transformAll(!1)},B.observeInserted=function(A){var t,e=this;"undefined"!=typeof MutationObserver?(t=new MutationObserver((function(i){i.forEach((function(i){"childList"===i.type&&i.previousSibling&&(t.disconnect(),e.intervalForObserveInserted=window.setInterval((function(){A.node().parentNode&&(window.clearInterval(e.intervalForObserveInserted),e.updateDimension(),e.brush&&e.brush.update(),e.config.oninit.call(e),e.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),A.transition().style("opacity",1))}),10))}))}))).observe(A.node(),{attributes:!0,childList:!0,characterData:!0}):window.console.error("MutationObserver not defined.")},B.bindResize=function(){var A=this,t=A.config;if(A.resizeFunction=A.generateResize(),A.resizeFunction.add((function(){t.onresize.call(A)})),t.resize_auto&&A.resizeFunction.add((function(){void 0!==A.resizeTimeout&&window.clearTimeout(A.resizeTimeout),A.resizeTimeout=window.setTimeout((function(){delete A.resizeTimeout,A.api.flush()}),100)})),A.resizeFunction.add((function(){t.onresized.call(A)})),A.resizeIfElementDisplayed=function(){null!=A.api&&A.api.element.offsetParent&&A.resizeFunction()},window.attachEvent)window.attachEvent("onresize",A.resizeIfElementDisplayed);else if(window.addEventListener)window.addEventListener("resize",A.resizeIfElementDisplayed,!1);else{var e=window.onresize;e?e.add&&e.remove||(e=A.generateResize()).add(window.onresize):e=A.generateResize(),e.add(A.resizeFunction),window.onresize=function(){A.api.element.offsetParent&&e()}}},B.generateResize=function(){var A=[];function t(){A.forEach((function(A){A()}))}return t.add=function(t){A.push(t)},t.remove=function(t){for(var e=0;et.getTotalLength())break;e--}while(e>0);return e})),"SVGPathSegList"in window||(window.SVGPathSegList=function(A){this._pathElement=A,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(A){if(this._pathElement){var t=!1;A.forEach((function(A){"d"==A.attributeName&&(t=!0)})),t&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))}},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(A){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach((function(A){A._owningPathSegList=null})),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(A){return this._checkPathSynchronizedToList(),this._list=[A],A._owningPathSegList=this,this._writeListToPath(),A},window.SVGPathSegList.prototype._checkValidIndex=function(A){if(isNaN(A)||A<0||A>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(A){return this._checkPathSynchronizedToList(),this._checkValidIndex(A),this._list[A]},window.SVGPathSegList.prototype.insertItemBefore=function(A,t){return this._checkPathSynchronizedToList(),t>this.numberOfItems&&(t=this.numberOfItems),A._owningPathSegList&&(A=A.clone()),this._list.splice(t,0,A),A._owningPathSegList=this,this._writeListToPath(),A},window.SVGPathSegList.prototype.replaceItem=function(A,t){return this._checkPathSynchronizedToList(),A._owningPathSegList&&(A=A.clone()),this._checkValidIndex(t),this._list[t]=A,A._owningPathSegList=this,this._writeListToPath(),A},window.SVGPathSegList.prototype.removeItem=function(A){this._checkPathSynchronizedToList(),this._checkValidIndex(A);var t=this._list[A];return this._list.splice(A,1),this._writeListToPath(),t},window.SVGPathSegList.prototype.appendItem=function(A){return this._checkPathSynchronizedToList(),A._owningPathSegList&&(A=A.clone()),this._list.push(A),A._owningPathSegList=this,this._writeListToPath(),A},window.SVGPathSegList._pathSegArrayAsString=function(A){var t="",e=!0;return A.forEach((function(A){e?(e=!1,t+=A._asPathString()):t+=" "+A._asPathString()})),t},window.SVGPathSegList.prototype._parsePath=function(A){if(!A||0==A.length)return[];var t=this,e=function(){this.pathSegList=[]};e.prototype.appendSegment=function(A){this.pathSegList.push(A)};var i=function(A){this._string=A,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};i.prototype._isCurrentSpace=function(){var A=this._string[this._currentIndex];return A<=" "&&(" "==A||"\n"==A||"\t"==A||"\r"==A||"\f"==A)},i.prototype._skipOptionalSpaces=function(){for(;this._currentIndex="0"&&A<="9")&&t!=window.SVGPathSeg.PATHSEG_CLOSEPATH?t==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:t==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:t:window.SVGPathSeg.PATHSEG_UNKNOWN},i.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;var A=this.peekSegmentType();return A==window.SVGPathSeg.PATHSEG_MOVETO_ABS||A==window.SVGPathSeg.PATHSEG_MOVETO_REL},i.prototype._parseNumber=function(){var A=0,t=0,e=1,i=0,n=1,I=1,r=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex"9")&&"."!=this._string.charAt(this._currentIndex))){for(var o=this._currentIndex;this._currentIndex="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=o)for(var g=this._currentIndex-1,a=1;g>=o;)t+=a*(this._string.charAt(g--)-"0"),a*=10;if(this._currentIndex=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex="0"&&this._string.charAt(this._currentIndex)<="9";)e*=10,i+=(this._string.charAt(this._currentIndex)-"0")/e,this._currentIndex+=1}if(this._currentIndex!=r&&this._currentIndex+1=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex="0"&&this._string.charAt(this._currentIndex)<="9";)A*=10,A+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}var M=t+i;if(M*=n,A&&(M*=Math.pow(10,I*A)),r!=this._currentIndex)return this._skipOptionalSpacesOrDelimiter(),M}},i.prototype._parseArcFlag=function(){if(!(this._currentIndex>=this._endIndex)){var A=!1,t=this._string.charAt(this._currentIndex++);if("0"==t)A=!1;else{if("1"!=t)return;A=!0}return this._skipOptionalSpacesOrDelimiter(),A}},i.prototype.parseSegment=function(){var A=this._string[this._currentIndex],e=this._pathSegTypeFromChar(A);if(e==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if((e=this._nextCommandHelper(A,this._previousCommand))==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=e,e){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(t,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(t,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(t,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(t,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(t);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:var i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicRel(t,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicAbs(t,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothRel(t,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothAbs(t,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticRel(t,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticAbs(t,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcRel(t,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcAbs(t,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);default:throw"Unknown path seg type."}};var n=new e,I=new i(A);if(!I.initialCommandIsMoveTo())return[];for(;I.hasMoreData();){var r=I.parseSegment();if(!r)return[];n.appendSegment(r)}return n.pathSegList}),String.prototype.padEnd||(String.prototype.padEnd=function(A,t){return A>>=0,t=String(void 0!==t?t:" "),this.length>A?String(this):((A-=this.length)>t.length&&(t+=t.repeat(A/t.length)),String(this)+t.slice(0,A))}),j.axis=function(){},j.axis.labels=function(A){var t=this.internal;arguments.length&&(Object.keys(A).forEach((function(e){t.axis.setLabelText(e,A[e])})),t.axis.updateLabels())},j.axis.max=function(A){var t=this.internal,e=t.config;if(!arguments.length)return{x:e.axis_x_max,y:e.axis_y_max,y2:e.axis_y2_max};"object"===(void 0===A?"undefined":n(A))?(I(A.x)&&(e.axis_x_max=A.x),I(A.y)&&(e.axis_y_max=A.y),I(A.y2)&&(e.axis_y2_max=A.y2)):e.axis_y_max=e.axis_y2_max=A,t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})},j.axis.min=function(A){var t=this.internal,e=t.config;if(!arguments.length)return{x:e.axis_x_min,y:e.axis_y_min,y2:e.axis_y2_min};"object"===(void 0===A?"undefined":n(A))?(I(A.x)&&(e.axis_x_min=A.x),I(A.y)&&(e.axis_y_min=A.y),I(A.y2)&&(e.axis_y2_min=A.y2)):e.axis_y_min=e.axis_y2_min=A,t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})},j.axis.range=function(A){if(!arguments.length)return{max:this.axis.max(),min:this.axis.min()};s(A.max)&&this.axis.max(A.max),s(A.min)&&this.axis.min(A.min)},j.category=function(A,t){var e=this.internal,i=e.config;return arguments.length>1&&(i.axis_x_categories[A]=t,e.redraw()),i.axis_x_categories[A]},j.categories=function(A){var t=this.internal,e=t.config;return arguments.length?(e.axis_x_categories=A,t.redraw(),e.axis_x_categories):e.axis_x_categories},j.resize=function(A){var t=this.internal.config;t.size_width=A?A.width:null,t.size_height=A?A.height:null,this.flush()},j.flush=function(){this.internal.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},j.destroy=function(){var A=this.internal;if(window.clearInterval(A.intervalForObserveInserted),void 0!==A.resizeTimeout&&window.clearTimeout(A.resizeTimeout),window.detachEvent)window.detachEvent("onresize",A.resizeIfElementDisplayed);else if(window.removeEventListener)window.removeEventListener("resize",A.resizeIfElementDisplayed);else{var t=window.onresize;t&&t.add&&t.remove&&t.remove(A.resizeFunction)}return A.resizeFunction.remove(),A.selectChart.classed("c3",!1).html(""),Object.keys(A).forEach((function(t){A[t]=null})),null},j.color=function(A){return this.internal.color(A)},j.data=function(A){var t=this.internal.data.targets;return void 0===A?t:t.filter((function(t){return[].concat(A).indexOf(t.id)>=0}))},j.data.shown=function(A){return this.internal.filterTargetsToShow(this.data(A))},j.data.values=function(A){var t,e=null;return A&&(e=(t=this.data(A))[0]?t[0].values.map((function(A){return A.value})):null),e},j.data.names=function(A){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes("names",A)},j.data.colors=function(A){return this.internal.updateDataAttributes("colors",A)},j.data.axes=function(A){return this.internal.updateDataAttributes("axes",A)},j.flow=function(A){var t,e,i,n,r,o,g,a=this.internal,M=[],c=a.getMaxDataCount(),u=0,l=0;if(A.json)e=a.convertJsonToData(A.json,A.keys);else if(A.rows)e=a.convertRowsToData(A.rows);else{if(!A.columns)return;e=a.convertColumnsToData(A.columns)}t=a.convertDataToTargets(e,!0),a.data.targets.forEach((function(A){var e,i,n=!1;for(e=0;e1?n.values[n.values.length-1].x-r.x:r.x-a.getXDomain(a.data.targets)[0]:1,i=[r.x-o,r.x],a.updateXDomain(null,!0,!0,!1,i)),a.updateTargets(a.data.targets),a.redraw({flow:{index:r.index,length:u,duration:I(A.duration)?A.duration:a.config.transition_duration,done:A.done,orgDataCount:c},withLegend:!0,withTransition:c>1,withTrimXDomain:!1,withUpdateXAxis:!0})},B.generateFlow=function(A){var t=this,e=t.config,n=t.d3;return function(){var I,r,o,g,a=A.targets,M=A.flow,s=A.drawBar,c=A.drawLine,u=A.drawArea,C=A.cx,T=A.cy,h=A.xv,N=A.xForText,d=A.yForText,y=A.duration,E=M.index,D=M.length,j=t.getValueOnIndex(t.data.targets[0].values,E),B=t.getValueOnIndex(t.data.targets[0].values,E+D),x=t.x.domain(),p=M.duration||y,L=M.done||function(){},f=t.generateWait(),z=t.xgrid||n.selectAll([]),w=t.xgridLines||n.selectAll([]),m=t.mainRegion||n.selectAll([]),Q=t.mainText||n.selectAll([]),S=t.mainBar||n.selectAll([]),Y=t.mainLine||n.selectAll([]),O=t.mainArea||n.selectAll([]),v=t.mainCircle||n.selectAll([]);t.flowing=!0,t.data.targets.forEach((function(A){A.values.splice(0,D)})),g=t.updateXDomain(a,!0,!0),t.updateXGrid&&t.updateXGrid(!0),M.orgDataCount?I=1===M.orgDataCount||(j&&j.x)===(B&&B.x)||t.isTimeSeries()?t.x(x[0])-t.x(g[0]):t.x(j.x)-t.x(B.x):1!==t.data.targets[0].values.length?I=t.x(x[0])-t.x(g[0]):t.isTimeSeries()?(j=t.getValueOnIndex(t.data.targets[0].values,0),B=t.getValueOnIndex(t.data.targets[0].values,t.data.targets[0].values.length-1),I=t.x(j.x)-t.x(B.x)):I=l(g)/2,r=l(x)/l(g),o="translate("+I+",0) scale("+r+",1)",t.hideXGridFocus(),n.transition().ease("linear").duration(p).each((function(){f.add(t.axes.x.transition().call(t.xAxis)),f.add(S.transition().attr("transform",o)),f.add(Y.transition().attr("transform",o)),f.add(O.transition().attr("transform",o)),f.add(v.transition().attr("transform",o)),f.add(Q.transition().attr("transform",o)),f.add(m.filter(t.isRegionOnX).transition().attr("transform",o)),f.add(z.transition().attr("transform",o)),f.add(w.transition().attr("transform",o))})).call(f,(function(){var A,n=[],I=[],r=[];if(D){for(A=0;A=0&&(t=!0)})),!t)})),r.regions},j.selected=function(A){var t=this.internal,e=t.d3;return e.merge(t.main.selectAll("."+i.shapes+t.getTargetSelectorSuffix(A)).selectAll("."+i.shape).filter((function(){return e.select(this).classed(i.SELECTED)})).map((function(A){return A.map((function(A){var t=A.__data__;return t.data?t.data:t}))})))},j.select=function(A,t,e){var n=this.internal,I=n.d3,r=n.config;r.data_selection_enabled&&n.main.selectAll("."+i.shapes).selectAll("."+i.shape).each((function(o,g){var a=I.select(this),M=o.data?o.data.id:o.id,c=n.getToggle(this,o).bind(n),u=r.data_selection_grouped||!A||A.indexOf(M)>=0,l=!t||t.indexOf(g)>=0,C=a.classed(i.SELECTED);a.classed(i.line)||a.classed(i.area)||(u&&l?r.data_selection_isselectable(o)&&!C&&c(!0,a.classed(i.SELECTED,!0),o,g):s(e)&&e&&C&&c(!1,a.classed(i.SELECTED,!1),o,g))}))},j.unselect=function(A,t){var e=this.internal,n=e.d3,I=e.config;I.data_selection_enabled&&e.main.selectAll("."+i.shapes).selectAll("."+i.shape).each((function(r,o){var g=n.select(this),a=r.data?r.data.id:r.id,M=e.getToggle(this,r).bind(e),s=I.data_selection_grouped||!A||A.indexOf(a)>=0,c=!t||t.indexOf(o)>=0,u=g.classed(i.SELECTED);g.classed(i.line)||g.classed(i.area)||s&&c&&I.data_selection_isselectable(r)&&u&&M(!1,g.classed(i.SELECTED,!1),r,o)}))},j.show=function(A,t){var e,i=this.internal;A=i.mapToTargetIds(A),t=t||{},i.removeHiddenTargetIds(A),(e=i.svg.selectAll(i.selectorTargets(A))).transition().style("opacity",1,"important").call(i.endall,(function(){e.style("opacity",null).style("opacity",1)})),t.withLegend&&i.showLegend(A),i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},j.hide=function(A,t){var e,i=this.internal;A=i.mapToTargetIds(A),t=t||{},i.addHiddenTargetIds(A),(e=i.svg.selectAll(i.selectorTargets(A))).transition().style("opacity",0,"important").call(i.endall,(function(){e.style("opacity",null).style("opacity",0)})),t.withLegend&&i.hideLegend(A),i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},j.toggle=function(A,t){var e=this,i=this.internal;i.mapToTargetIds(A).forEach((function(A){i.isTargetToShow(A)?e.hide(A,t):e.show(A,t)}))},j.tooltip=function(){},j.tooltip.show=function(A){var t,e,i=this.internal;A.mouse&&(e=A.mouse),A.data?i.isMultipleX()?(e=[i.x(A.data.x),i.getYScale(A.data.id)(A.data.value)],t=null):t=I(A.data.index)?A.data.index:i.getIndexByX(A.data.x):void 0!==A.x?t=i.getIndexByX(A.x):void 0!==A.index&&(t=A.index),i.dispatchEvent("mouseover",t,e),i.dispatchEvent("mousemove",t,e),i.config.tooltip_onshow.call(i,A.data)},j.tooltip.hide=function(){this.internal.dispatchEvent("mouseout",0),this.internal.config.tooltip_onhide.call(this)},j.transform=function(A,t){var e=this.internal,i=["pie","donut"].indexOf(A)>=0?{withTransform:!0}:null;e.transformTo(t,A,i)},B.transformTo=function(A,t,e){var i=this,n=!i.hasArcType(),I=e||{withTransitionForAxis:n};I.withTransitionForTransform=!1,i.transiting=!1,i.setTargetType(A,t),i.updateTargets(i.data.targets),i.updateAndRedraw(I)},j.x=function(A){var t=this.internal;return arguments.length&&(t.updateTargetX(t.data.targets,A),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),t.data.xs},j.xs=function(A){var t=this.internal;return arguments.length&&(t.updateTargetXs(t.data.targets,A),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),t.data.xs},j.zoom=function(A){var t=this.internal;return A&&(t.isTimeSeries()&&(A=A.map((function(A){return t.parseDate(A)}))),t.brush.extent(A),t.redraw({withUpdateXDomain:!0,withY:t.config.zoom_rescale}),t.config.zoom_onzoom.call(this,t.x.orgDomain())),t.brush.extent()},j.zoom.enable=function(A){var t=this.internal;t.config.zoom_enabled=A,t.updateAndRedraw()},j.unzoom=function(){var A=this.internal;A.brush.clear().update(),A.redraw({withUpdateXDomain:!0})},j.zoom.max=function(A){var t=this.internal,e=t.config,i=t.d3;if(0!==A&&!A)return e.zoom_x_max;e.zoom_x_max=i.max([t.orgXDomain[1],A])},j.zoom.min=function(A){var t=this.internal,e=t.config,i=t.d3;if(0!==A&&!A)return e.zoom_x_min;e.zoom_x_min=i.min([t.orgXDomain[0],A])},j.zoom.range=function(A){if(!arguments.length)return{max:this.domain.max(),min:this.domain.min()};s(A.max)&&this.domain.max(A.max),s(A.min)&&this.domain.min(A.min)},B.initPie=function(){var A=this,t=A.d3;A.pie=t.layout.pie().value((function(A){return A.values.reduce((function(A,t){return A+t.value}),0)})),A.pie.sort(A.getOrderFunction()||null)},B.updateRadius=function(){var A=this,t=A.config,e=t.gauge_width||t.donut_width,i=A.filterTargetsToShow(A.data.targets).length*A.config.gauge_arcs_minWidth;A.radiusExpanded=Math.min(A.arcWidth,A.arcHeight)/2*(A.hasType("gauge")?.85:1),A.radius=.95*A.radiusExpanded,A.innerRadiusRatio=e?(A.radius-e)/A.radius:.6,A.innerRadius=A.hasType("donut")||A.hasType("gauge")?A.radius*A.innerRadiusRatio:0,A.gaugeArcWidth=e||(i<=A.radius-A.innerRadius?A.radius-A.innerRadius:i<=A.radius?i:A.radius)},B.updateArc=function(){var A=this;A.svgArc=A.getSvgArc(),A.svgArcExpanded=A.getSvgArcExpanded(),A.svgArcExpandedSub=A.getSvgArcExpanded(.98)},B.updateAngle=function(A){var t,e,i,n,I=this,r=I.config,o=!1,g=0;return r?(I.pie(I.filterTargetsToShow(I.data.targets)).forEach((function(t){o||t.data.id!==A.data.id||(o=!0,(A=t).index=g),g++})),isNaN(A.startAngle)&&(A.startAngle=0),isNaN(A.endAngle)&&(A.endAngle=A.startAngle),I.isGaugeType(A.data)&&(t=r.gauge_min,e=r.gauge_max,i=Math.PI*(r.gauge_fullCircle?2:1)/(e-t),n=A.value.375?1.175-36/r.radius:.8)*r.radius/n:0)+","+i*I+")";else if(a&&s&&r.filterTargetsToShow(r.data.targets).length>1){var c=Math.sin(a.endAngle-Math.PI/2);M="translate("+(e=Math.cos(a.endAngle-Math.PI/2)*(r.radiusExpanded+25))+","+(i=c*(r.radiusExpanded+15-Math.abs(10*c))+3)+")"}return M},B.getArcRatio=function(A){var t=this.config,e=Math.PI*(this.hasType("gauge")&&!t.gauge_fullCircle?1:2);return A?(A.endAngle-A.startAngle)/e:null},B.convertToArcData=function(A){return this.addName({id:A.data.id,value:A.value,ratio:this.getArcRatio(A),index:A.index})},B.textForArcLabel=function(A){var t,e,i,n,I,r=this;return r.shouldShowArcLabel()?(e=(t=r.updateAngle(A))?t.value:null,i=r.getArcRatio(t),n=A.data.id,r.hasType("gauge")||r.meetsArcLabelThreshold(i)?(I=r.getArcLabelFormat())?I(e,i,n):r.defaultArcValueFormat(e,i):""):""},B.textForGaugeMinMax=function(A,t){var e=this.getGaugeLabelExtents();return e?e(A,t):A},B.expandArc=function(A){var t,e=this;e.transiting?t=window.setInterval((function(){e.transiting||(window.clearInterval(t),e.legend.selectAll(".c3-legend-item-focused").size()>0&&e.expandArc(A))}),10):(A=e.mapToTargetIds(A),e.svg.selectAll(e.selectorTargets(A,"."+i.chartArc)).each((function(A){e.shouldExpand(A.data.id)&&e.d3.select(this).selectAll("path").transition().duration(e.expandDuration(A.data.id)).attr("d",e.svgArcExpanded).transition().duration(2*e.expandDuration(A.data.id)).attr("d",e.svgArcExpandedSub).each((function(A){e.isDonutType(A.data)}))})))},B.unexpandArc=function(A){var t=this;t.transiting||(A=t.mapToTargetIds(A),t.svg.selectAll(t.selectorTargets(A,"."+i.chartArc)).selectAll("path").transition().duration((function(A){return t.expandDuration(A.data.id)})).attr("d",t.svgArc),t.svg.selectAll("."+i.arc))},B.expandDuration=function(A){var t=this,e=t.config;return t.isDonutType(A)?e.donut_expand_duration:t.isGaugeType(A)?e.gauge_expand_duration:t.isPieType(A)?e.pie_expand_duration:50},B.shouldExpand=function(A){var t=this,e=t.config;return t.isDonutType(A)&&e.donut_expand||t.isGaugeType(A)&&e.gauge_expand||t.isPieType(A)&&e.pie_expand},B.shouldShowArcLabel=function(){var A=this,t=A.config,e=!0;return A.hasType("donut")?e=t.donut_label_show:A.hasType("pie")&&(e=t.pie_label_show),e},B.meetsArcLabelThreshold=function(A){var t=this.config;return A>=(this.hasType("donut")?t.donut_label_threshold:t.pie_label_threshold)},B.getArcLabelFormat=function(){var A=this,t=A.config,e=t.pie_label_format;return A.hasType("gauge")?e=t.gauge_label_format:A.hasType("donut")&&(e=t.donut_label_format),e},B.getGaugeLabelExtents=function(){return this.config.gauge_label_extents},B.getArcTitle=function(){return this.hasType("donut")?this.config.donut_title:""},B.updateTargetsForArc=function(A){var t,e=this,n=e.main,I=e.classChartArc.bind(e),r=e.classArcs.bind(e),o=e.classFocus.bind(e);(t=n.select("."+i.chartArcs).selectAll("."+i.chartArc).data(e.pie(A)).attr("class",(function(A){return I(A)+o(A.data)})).enter().append("g").attr("class",I)).append("g").attr("class",r),t.append("text").attr("dy",e.hasType("gauge")?"-.1em":".35em").style("opacity",0).style("text-anchor","middle").style("pointer-events","none")},B.initArc=function(){var A=this;A.arcs=A.main.select("."+i.chart).append("g").attr("class",i.chartArcs).attr("transform",A.getTranslate("arc")),A.arcs.append("text").attr("class",i.chartArcsTitle).style("text-anchor","middle").text(A.getArcTitle())},B.redrawArc=function(A,t,e){var n,I,r,o=this,g=o.d3,a=o.config,M=o.main,s=o.hasType("gauge");if((n=M.selectAll("."+i.arcs).selectAll("."+i.arc).data(o.arcData.bind(o))).enter().append("path").attr("class",o.classArc.bind(o)).style("fill",(function(A){return o.color(A.data)})).style("cursor",(function(A){return a.interaction_enabled&&a.data_selection_isselectable(A)?"pointer":null})).each((function(A){o.isGaugeType(A.data)&&(A.startAngle=A.endAngle=a.gauge_startingAngle),this._current=A})),s&&((r=M.selectAll("."+i.arcs).selectAll("."+i.arcLabelLine).data(o.arcData.bind(o))).enter().append("rect").attr("class",(function(A){return i.arcLabelLine+" "+i.target+" "+i.target+"-"+A.data.id})),1===o.filterTargetsToShow(o.data.targets).length?r.style("display","none"):r.style("fill",(function(A){return a.color_pattern.length>0?o.levelColor(A.data.values[0].value):o.color(A.data)})).style("display",a.gauge_labelLine_show?"":"none").each((function(A){var t=0,e=0,i=0,n="";if(o.hiddenTargetIds.indexOf(A.data.id)<0){var I=o.updateAngle(A),r=o.gaugeArcWidth/o.filterTargetsToShow(o.data.targets).length*(I.index+1),a=I.endAngle-Math.PI/2,M=o.radius-r,s=a-(0===M?0:1/M);t=o.radiusExpanded-o.radius+r,e=Math.cos(s)*M,i=Math.sin(s)*M,n="rotate("+180*a/Math.PI+", "+e+", "+i+")"}g.select(this).attr({x:e,y:i,width:t,height:2,transform:n}).style("stroke-dasharray","0, "+(t+2)+", 0")}))),n.attr("transform",(function(A){return!o.isGaugeType(A.data)&&e?"scale(0)":""})).on("mouseover",a.interaction_enabled?function(A){var t,e;o.transiting||(t=o.updateAngle(A))&&(e=o.convertToArcData(t),o.expandArc(t.data.id),o.api.focus(t.data.id),o.toggleFocusLegend(t.data.id,!0),o.config.data_onmouseover(e,this))}:null).on("mousemove",a.interaction_enabled?function(A){var t,e=o.updateAngle(A);e&&(t=[o.convertToArcData(e)],o.showTooltip(t,this))}:null).on("mouseout",a.interaction_enabled?function(A){var t,e;o.transiting||(t=o.updateAngle(A))&&(e=o.convertToArcData(t),o.unexpandArc(t.data.id),o.api.revert(),o.revertLegend(),o.hideTooltip(),o.config.data_onmouseout(e,this))}:null).on("click",a.interaction_enabled?function(A,t){var e,i=o.updateAngle(A);i&&(e=o.convertToArcData(i),o.toggleShape&&o.toggleShape(this,e,t),o.config.data_onclick.call(o.api,e,this))}:null).each((function(){o.transiting=!0})).transition().duration(A).attrTween("d",(function(A){var t,e=o.updateAngle(A);return e?(isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle),t=g.interpolate(this._current,e),this._current=t(0),function(e){var i=t(e);return i.data=A.data,o.getArc(i,!0)}):function(){return"M 0 0"}})).attr("transform",e?"scale(1)":"").style("fill",(function(A){return o.levelColor?o.levelColor(A.data.values[0].value):o.color(A.data.id)})).call(o.endall,(function(){o.transiting=!1})),n.exit().transition().duration(t).style("opacity",0).remove(),M.selectAll("."+i.chartArc).select("text").style("opacity",0).attr("class",(function(A){return o.isGaugeType(A.data)?i.gaugeValue:""})).text(o.textForArcLabel.bind(o)).attr("transform",o.transformForArcLabel.bind(o)).style("font-size",(function(A){return o.isGaugeType(A.data)&&1===o.filterTargetsToShow(o.data.targets).length?Math.round(o.radius/5)+"px":""})).transition().duration(A).style("opacity",(function(A){return o.isTargetToShow(A.data.id)&&o.isArcType(A.data)?1:0})),M.select("."+i.chartArcsTitle).style("opacity",o.hasType("donut")||s?1:0),s){var c=0;(I=o.arcs.select("g."+i.chartArcsBackground).selectAll("path."+i.chartArcsBackground).data(o.data.targets)).enter().append("path"),I.attr("class",(function(A,t){return i.chartArcsBackground+" "+i.chartArcsBackground+"-"+t})).attr("d",(function(A){if(o.hiddenTargetIds.indexOf(A.id)>=0)return"M 0 0";var t={data:[{value:a.gauge_max}],startAngle:a.gauge_startingAngle,endAngle:-1*a.gauge_startingAngle*(a.gauge_fullCircle?Math.PI:1),index:c++};return o.getArc(t,!0,!0)})),I.exit().remove(),o.arcs.select("."+i.chartArcsGaugeUnit).attr("dy",".75em").text(a.gauge_label_show?a.gauge_units:""),o.arcs.select("."+i.chartArcsGaugeMin).attr("dx",-1*(o.innerRadius+(o.radius-o.innerRadius)/(a.gauge_fullCircle?1:2))+"px").attr("dy","1.2em").text(a.gauge_label_show?o.textForGaugeMinMax(a.gauge_min,!1):""),o.arcs.select("."+i.chartArcsGaugeMax).attr("dx",o.innerRadius+(o.radius-o.innerRadius)/(a.gauge_fullCircle?1:2)+"px").attr("dy","1.2em").text(a.gauge_label_show?o.textForGaugeMinMax(a.gauge_max,!0):"")}},B.initGauge=function(){var A=this.arcs;this.hasType("gauge")&&(A.append("g").attr("class",i.chartArcsBackground),A.append("text").attr("class",i.chartArcsGaugeUnit).style("text-anchor","middle").style("pointer-events","none"),A.append("text").attr("class",i.chartArcsGaugeMin).style("text-anchor","middle").style("pointer-events","none"),A.append("text").attr("class",i.chartArcsGaugeMax).style("text-anchor","middle").style("pointer-events","none"))},B.getGaugeLabelHeight=function(){return this.config.gauge_label_show?20:0},B.hasCaches=function(A){for(var t=0;t=0?i.focused:"")},B.classDefocused=function(A){return" "+(this.defocusedTargetIds.indexOf(A.id)>=0?i.defocused:"")},B.classChartText=function(A){return i.chartText+this.classTarget(A.id)},B.classChartLine=function(A){return i.chartLine+this.classTarget(A.id)},B.classChartBar=function(A){return i.chartBar+this.classTarget(A.id)},B.classChartArc=function(A){return i.chartArc+this.classTarget(A.data.id)},B.getTargetSelectorSuffix=function(A){return A||0===A?("-"+A).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""},B.selectorTarget=function(A,t){return(t||"")+"."+i.target+this.getTargetSelectorSuffix(A)},B.selectorTargets=function(A,t){var e=this;return(A=A||[]).length?A.map((function(A){return e.selectorTarget(A,t)})):null},B.selectorLegend=function(A){return"."+i.legendItem+this.getTargetSelectorSuffix(A)},B.selectorLegends=function(A){var t=this;return A&&A.length?A.map((function(A){return t.selectorLegend(A)})):null},B.getClipPath=function(A){return"url("+(window.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0?"":document.URL.split("#")[0])+"#"+A+")"},B.appendClip=function(A,t){return A.append("clipPath").attr("id",t).append("rect")},B.getAxisClipX=function(A){var t=Math.max(30,this.margin.left);return A?-(1+t):-(t-1)},B.getAxisClipY=function(A){return A?-20:-this.margin.top},B.getXAxisClipX=function(){return this.getAxisClipX(!this.config.axis_rotated)},B.getXAxisClipY=function(){return this.getAxisClipY(!this.config.axis_rotated)},B.getYAxisClipX=function(){var A=this;return A.config.axis_y_inner?-1:A.getAxisClipX(A.config.axis_rotated)},B.getYAxisClipY=function(){return this.getAxisClipY(this.config.axis_rotated)},B.getAxisClipWidth=function(A){var t=this,e=Math.max(30,t.margin.left),i=Math.max(30,t.margin.right);return A?t.width+2+e+i:t.margin.left+20},B.getAxisClipHeight=function(A){return(A?this.margin.bottom:this.margin.top+this.height)+20},B.getXAxisClipWidth=function(){return this.getAxisClipWidth(!this.config.axis_rotated)},B.getXAxisClipHeight=function(){return this.getAxisClipHeight(!this.config.axis_rotated)},B.getYAxisClipWidth=function(){var A=this;return A.getAxisClipWidth(A.config.axis_rotated)+(A.config.axis_y_inner?20:0)},B.getYAxisClipHeight=function(){return this.getAxisClipHeight(this.config.axis_rotated)},B.generateColor=function(){var A=this.config,t=this.d3,e=A.data_colors,i=T(A.color_pattern)?A.color_pattern:t.scale.category10().range(),n=A.data_color,I=[];return function(A){var t,r=A.id||A.data&&A.data.id||A;return e[r]instanceof Function?t=e[r](A):e[r]?t=e[r]:(I.indexOf(r)<0&&I.push(r),t=i[I.indexOf(r)%i.length],e[r]=t),n instanceof Function?n(t,A):t}},B.generateLevelColor=function(){var A=this.config,t=A.color_pattern,e=A.color_threshold,i="value"===e.unit,n=e.values&&e.values.length?e.values:[],I=e.max||100;return T(A.color_threshold)?function(A){var e,r=t[t.length-1];for(e=0;e=0?i.data.xs[e]=(t&&i.data.xs[e]?i.data.xs[e]:[]).concat(A.map((function(A){return A[r]})).filter(I).map((function(A,t){return i.generateTargetX(A,e,t)}))):n.data_x?i.data.xs[e]=i.getOtherTargetXs():T(n.data_xs)&&(i.data.xs[e]=i.getXValuesOfXKey(r,i.data.targets)):i.data.xs[e]=A.map((function(A,t){return t}))})),r.forEach((function(A){if(!i.data.xs[A])throw new Error('x is not defined for id = "'+A+'".')})),(e=r.map((function(t,e){var I=n.data_idConverter(t);return{id:I,id_org:t,values:A.map((function(A,r){var o,g=A[i.getXKey(t)],a=null===A[t]||isNaN(A[t])?null:+A[t];return i.isCustomX()&&i.isCategorized()&&!M(g)?(0===e&&0===r&&(n.axis_x_categories=[]),-1===(o=n.axis_x_categories.indexOf(g))&&(o=n.axis_x_categories.length,n.axis_x_categories.push(g))):o=i.generateTargetX(g,t,r),(M(A[t])||i.data.xs[t].length<=r)&&(o=void 0),{x:o,value:a,id:I}})).filter((function(A){return s(A.x)}))}}))).forEach((function(A){var t;n.data_xSort&&(A.values=A.values.sort((function(A,t){return(A.x||0===A.x?A.x:1/0)-(t.x||0===t.x?t.x:1/0)}))),t=0,A.values.forEach((function(A){A.index=t++})),i.data.xs[A.id].sort((function(A,t){return A-t}))})),i.hasNegativeValue=i.hasNegativeValueInTargets(e),i.hasPositiveValue=i.hasPositiveValueInTargets(e),n.data_type&&i.setTargetType(i.mapToIds(e).filter((function(A){return!(A in n.data_types)})),n.data_type),e.forEach((function(A){i.addCache(A.id_org,A)})),e},B.isX=function(A){var t=this.config;return t.data_x&&A===t.data_x||T(t.data_xs)&&N(t.data_xs,A)},B.isNotX=function(A){return!this.isX(A)},B.getXKey=function(A){var t=this.config;return t.data_x?t.data_x:T(t.data_xs)?t.data_xs[A]:null},B.getXValuesOfXKey=function(A,t){var e,i=this;return(t&&T(t)?i.mapToIds(t):[]).forEach((function(t){i.getXKey(t)===A&&(e=i.data.xs[t])})),e},B.getIndexByX=function(A){var t=this.filterByX(this.data.targets,A);return t.length?t[0].index:null},B.getXValue=function(A,t){var e=this;return A in e.data.xs&&e.data.xs[A]&&I(e.data.xs[A][t])?e.data.xs[A][t]:t},B.getOtherTargetXs=function(){var A=Object.keys(this.data.xs);return A.length?this.data.xs[A[0]]:null},B.getOtherTargetX=function(A){var t=this.getOtherTargetXs();return t&&A1},B.isMultipleX=function(){return T(this.config.data_xs)||!this.config.data_xSort||this.hasType("scatter")},B.addName=function(A){var t;return A&&(t=this.config.data_names[A.id],A.name=void 0!==t?t:A.id),A},B.getValueOnIndex=function(A,t){var e=A.filter((function(A){return A.index===t}));return e.length?e[0]:null},B.updateTargetX=function(A,t){var e=this;A.forEach((function(A){A.values.forEach((function(i,n){i.x=e.generateTargetX(t[n],A.id,n)})),e.data.xs[A.id]=t}))},B.updateTargetXs=function(A,t){var e=this;A.forEach((function(A){t[A.id]&&e.updateTargetX([A],t[A.id])}))},B.generateTargetX=function(A,t,e){var i=this;return i.isTimeSeries()?A?i.parseDate(A):i.parseDate(i.getXValue(t,e)):i.isCustomX()&&!i.isCategorized()?I(A)?+A:i.getXValue(t,e):e},B.cloneTarget=function(A){return{id:A.id,id_org:A.id_org,values:A.values.map((function(A){return{x:A.x,value:A.value,id:A.id}}))}},B.updateXs=function(){var A=this;A.data.targets.length&&(A.xs=[],A.data.targets[0].values.forEach((function(t){A.xs[t.index]=t.x})))},B.getPrevX=function(A){var t=this.xs[A-1];return void 0!==t?t:null},B.getNextX=function(A){var t=this.xs[A+1];return void 0!==t?t:null},B.getMaxDataCount=function(){return this.d3.max(this.data.targets,(function(A){return A.values.length}))},B.getMaxDataCountTarget=function(A){var t,e=A.length,i=0;return e>1?A.forEach((function(A){A.values.length>i&&(t=A,i=A.values.length)})):t=e?A[0]:null,t},B.getEdgeX=function(A){return A.length?[this.d3.min(A,(function(A){return A.values[0].x})),this.d3.max(A,(function(A){return A.values[A.values.length-1].x}))]:[0,0]},B.mapToIds=function(A){return A.map((function(A){return A.id}))},B.mapToTargetIds=function(A){return A?[].concat(A):this.mapToIds(this.data.targets)},B.hasTarget=function(A,t){var e,i=this.mapToIds(A);for(e=0;et?1:A>=t?0:NaN}))},B.addHiddenTargetIds=function(A){A=A instanceof Array?A:new Array(A);for(var t=0;t0}))},B.isOrderDesc=function(){var A=this.config;return"string"==typeof A.data_order&&"desc"===A.data_order.toLowerCase()},B.isOrderAsc=function(){var A=this.config;return"string"==typeof A.data_order&&"asc"===A.data_order.toLowerCase()},B.getOrderFunction=function(){var A=this,t=A.config,e=A.isOrderAsc(),i=A.isOrderDesc();if(e||i)return function(A,t){var e=function(A,t){return A+Math.abs(t.value)},n=A.values.reduce(e,0),I=t.values.reduce(e,0);return i?I-n:n-I};if(o(t.data_order))return t.data_order;if(g(t.data_order)){var n=t.data_order;return function(A,t){return n.indexOf(A.id)-n.indexOf(t.id)}}},B.orderTargets=function(A){var t=this.getOrderFunction();return t&&(A.sort(t),(this.isOrderAsc()||this.isOrderDesc())&&A.reverse()),A},B.filterByX=function(A,t){return this.d3.merge(A.map((function(A){return A.values}))).filter((function(A){return A.x-t==0}))},B.filterRemoveNull=function(A){return A.filter((function(A){return I(A.value)}))},B.filterByXDomain=function(A,t){return A.map((function(A){return{id:A.id,id_org:A.id_org,values:A.values.filter((function(A){return t[0]<=A.x&&A.x<=t[1]}))}}))},B.hasDataLabel=function(){var A=this.config;return!("boolean"!=typeof A.data_labels||!A.data_labels)||!("object"!==n(A.data_labels)||!T(A.data_labels))},B.getDataLabelLength=function(A,t,e){var i=this,n=[0,0];return i.selectChart.select("svg").selectAll(".dummy").data([A,t]).enter().append("text").text((function(A){return i.dataLabelFormat(A.id)(A)})).each((function(A,t){n[t]=1.3*this.getBoundingClientRect()[e]})).remove(),n},B.isNoneArc=function(A){return this.hasTarget(this.data.targets,A.id)},B.isArc=function(A){return"data"in A&&this.hasTarget(this.data.targets,A.data.id)},B.findSameXOfValues=function(A,t){var e,i=A[t].x,n=[];for(e=t-1;e>=0&&i===A[e].x;e--)n.push(A[e]);for(e=t;e0)for(r=o.hasNegativeValueInTargets(A),t=0;t=0})),0!==n.length)for(i=n[0],r&&M[i]&&M[i].forEach((function(A,t){M[i][t]=A<0?A:0})),e=1;e0||(M[i][t]+=+A)}));return o.d3.min(Object.keys(M).map((function(A){return o.d3.min(M[A])})))},B.getYDomainMax=function(A){var t,e,i,n,I,r,o=this,g=o.config,a=o.mapToIds(A),M=o.getValuesAsIdKeyed(A);if(g.data_groups.length>0)for(r=o.hasPositiveValueInTargets(A),t=0;t=0})),0!==n.length)for(i=n[0],r&&M[i]&&M[i].forEach((function(A,t){M[i][t]=A>0?A:0})),e=1;e=0&&j>=0,u=D<=0&&j<=0,(I(y)&&c||I(E)&&u)&&(x=!1),x&&(c&&(D=0),u&&(j=0)),r=o=.1*(n=Math.abs(j-D)),void 0!==B&&(j=B+(g=Math.max(Math.abs(D),Math.abs(j))),D=B-g),L?(a=C.getDataLabelLength(D,j,"width"),M=l(C.y.range()),r+=n*((s=[a[0]/M,a[1]/M])[1]/(1-s[0]-s[1])),o+=n*(s[0]/(1-s[0]-s[1]))):f&&(a=C.getDataLabelLength(D,j,"height"),r+=C.axis.convertPixelsToAxisPadding(a[1],n),o+=C.axis.convertPixelsToAxisPadding(a[0],n)),"y"===t&&T(h.axis_y_padding)&&(r=C.axis.getPadding(h.axis_y_padding,"top",r,n),o=C.axis.getPadding(h.axis_y_padding,"bottom",o,n)),"y2"===t&&T(h.axis_y2_padding)&&(r=C.axis.getPadding(h.axis_y2_padding,"top",r,n),o=C.axis.getPadding(h.axis_y2_padding,"bottom",o,n)),x&&(c&&(o=D),u&&(r=-j)),i=[D-o,j+r],p?i.reverse():i)},B.getXDomainMin=function(A){var t=this,e=t.config;return s(e.axis_x_min)?t.isTimeSeries()?this.parseDate(e.axis_x_min):e.axis_x_min:t.d3.min(A,(function(A){return t.d3.min(A.values,(function(A){return A.x}))}))},B.getXDomainMax=function(A){var t=this,e=t.config;return s(e.axis_x_max)?t.isTimeSeries()?this.parseDate(e.axis_x_max):e.axis_x_max:t.d3.max(A,(function(A){return t.d3.max(A.values,(function(A){return A.x}))}))},B.getXDomainPadding=function(A){var t,e,i,r,o=this,g=o.config,a=A[1]-A[0];return e=o.isCategorized()?0:o.hasType("bar")?(t=o.getMaxDataCount())>1?a/(t-1)/2:.5:.01*a,"object"===n(g.axis_x_padding)&&T(g.axis_x_padding)?(i=I(g.axis_x_padding.left)?g.axis_x_padding.left:e,r=I(g.axis_x_padding.right)?g.axis_x_padding.right:e):i=r="number"==typeof g.axis_x_padding?g.axis_x_padding:e,{left:i,right:r}},B.getXDomain=function(A){var t=this,e=[t.getXDomainMin(A),t.getXDomainMax(A)],i=e[0],n=e[1],I=t.getXDomainPadding(e),r=0,o=0;return i-n!=0||t.isCategorized()||(t.isTimeSeries()?(i=new Date(.5*i.getTime()),n=new Date(1.5*n.getTime())):(i=0===i?1:.5*i,n=0===n?-1:1.5*n)),(i||0===i)&&(r=t.isTimeSeries()?new Date(i.getTime()-I.left):i-I.left),(n||0===n)&&(o=t.isTimeSeries()?new Date(n.getTime()+I.right):n+I.right),[r,o]},B.updateXDomain=function(A,t,e,i,n){var I=this,r=I.config;return e&&(I.x.domain(n||I.d3.extent(I.getXDomain(A))),I.orgXDomain=I.x.domain(),r.zoom_enabled&&I.zoom.scale(I.x).updateScaleExtent(),I.subX.domain(I.x.domain()),I.brush&&I.brush.scale(I.subX)),t&&(I.x.domain(n||(!I.brush||I.brush.empty()?I.orgXDomain:I.brush.extent())),r.zoom_enabled&&I.zoom.scale(I.x).updateScaleExtent()),i&&I.x.domain(I.trimXDomain(I.x.orgDomain())),I.x.domain()},B.trimXDomain=function(A){var t=this.getZoomDomain(),e=t[0],i=t[1];return A[0]<=e&&(A[1]=+A[1]+(e-A[0]),A[0]=e),i<=A[1]&&(A[0]=+A[0]-(A[1]-i),A[1]=i),A},B.drag=function(A){var t,e,n,I,r,o,g,a,M=this,s=M.config,c=M.main,u=M.d3;M.hasArcType()||s.data_selection_enabled&&(s.zoom_enabled&&!M.zoom.altDomain||s.data_selection_multiple&&(t=M.dragStart[0],e=M.dragStart[1],n=A[0],I=A[1],r=Math.min(t,n),o=Math.max(t,n),g=s.data_selection_grouped?M.margin.top:Math.min(e,I),a=s.data_selection_grouped?M.height:Math.max(e,I),c.select("."+i.dragarea).attr("x",r).attr("y",g).attr("width",o-r).attr("height",a-g),c.selectAll("."+i.shapes).selectAll("."+i.shape).filter((function(A){return s.data_selection_isselectable(A)})).each((function(A,t){var e,n,I,s,c,l,C=u.select(this),T=C.classed(i.SELECTED),h=C.classed(i.INCLUDED),N=!1;if(C.classed(i.circle))e=1*C.attr("cx"),n=1*C.attr("cy"),c=M.togglePoint,N=rg&&(o=o.filter((function(A){return(""+A).indexOf(".")<0})));return o},B.getGridFilterToRemove=function(A){return A?function(t){var e=!1;return[].concat(A).forEach((function(A){("value"in A&&t.value===A.value||"class"in A&&t.class===A.class)&&(e=!0)})),e}:function(){return!0}},B.removeGridLines=function(A,t){var e=this,n=e.config,I=e.getGridFilterToRemove(A),r=function(A){return!I(A)},o=t?i.xgridLines:i.ygridLines,g=t?i.xgridLine:i.ygridLine;e.main.select("."+o).selectAll("."+g).filter(I).transition().duration(n.transition_duration).style("opacity",0).remove(),t?n.grid_x_lines=n.grid_x_lines.filter(r):n.grid_y_lines=n.grid_y_lines.filter(r)},B.initEventRect=function(){this.main.select("."+i.chart).append("g").attr("class",i.eventRects).style("fill-opacity",0)},B.redrawEventRect=function(){var A,t,e=this,n=e.config,I=e.isMultipleX(),r=e.main.select("."+i.eventRects).style("cursor",n.zoom_enabled?n.axis_rotated?"ns-resize":"ew-resize":null).classed(i.eventRectsMultiple,I).classed(i.eventRectsSingle,!I);r.selectAll("."+i.eventRect).remove(),e.eventRect=r.selectAll("."+i.eventRect),I?(A=e.eventRect.data([0]),e.generateEventRectsForMultipleXs(A.enter()),e.updateEventRect(A)):(t=e.getMaxDataCountTarget(e.data.targets),r.datum(t?t.values:[]),e.eventRect=r.selectAll("."+i.eventRect),A=e.eventRect.data((function(A){return A})),e.generateEventRectsForSingleX(A.enter()),e.updateEventRect(A),A.exit().remove())},B.updateEventRect=function(A){var t,e,i,n,I,r,o=this,g=o.config;A=A||o.eventRect.data((function(A){return A})),o.isMultipleX()?(t=0,e=0,i=o.width,n=o.height):(!o.isCustomX()&&!o.isTimeSeries()||o.isCategorized()?(I=o.getEventRectWidth(),r=function(A){return o.x(A.x)-I/2}):(o.updateXs(),I=function(A){var t=o.getPrevX(A.index),e=o.getNextX(A.index);return null===t&&null===e?g.axis_rotated?o.height:o.width:(null===t&&(t=o.x.domain()[0]),null===e&&(e=o.x.domain()[1]),Math.max(0,(o.x(e)-o.x(t))/2))},r=function(A){var t=o.getPrevX(A.index),e=o.getNextX(A.index),i=o.data.xs[A.id][A.index];return null===t&&null===e?0:(null===t&&(t=o.x.domain()[0]),(o.x(i)+o.x(t))/2)}),t=g.axis_rotated?0:r,e=g.axis_rotated?r:0,i=g.axis_rotated?o.width:I,n=g.axis_rotated?I:o.height),A.attr("class",o.classEvent.bind(o)).attr("x",t).attr("y",e).attr("width",i).attr("height",n)},B.generateEventRectsForSingleX=function(A){var t=this,e=t.d3,n=t.config;A.append("rect").attr("class",t.classEvent.bind(t)).style("cursor",n.data_selection_enabled&&n.data_selection_grouped?"pointer":null).on("mouseover",(function(A){var e=A.index;t.dragging||t.flowing||t.hasArcType()||(n.point_focus_expand_enabled&&t.expandCircles(e,null,!0),t.expandBars(e,null,!0),t.main.selectAll("."+i.shape+"-"+e).each((function(A){n.data_onmouseover.call(t.api,A)})))})).on("mouseout",(function(A){var e=A.index;t.config&&(t.hasArcType()||(t.hideXGridFocus(),t.hideTooltip(),t.unexpandCircles(),t.unexpandBars(),t.main.selectAll("."+i.shape+"-"+e).each((function(A){n.data_onmouseout.call(t.api,A)}))))})).on("mousemove",(function(A){var I,r=A.index,o=t.svg.select("."+i.eventRect+"-"+r);t.dragging||t.flowing||t.hasArcType()||(t.isStepType(A)&&"step-after"===t.config.line_step_type&&e.mouse(this)[0]=0})).classed(i.legendItemFocused,t).transition().duration(100).style("opacity",(function(){return(t?e.opacityForLegend:e.opacityForUnfocusedLegend).call(e,e.d3.select(this))}))},B.revertLegend=function(){var A=this,t=A.d3;A.legend.selectAll("."+i.legendItem).classed(i.legendItemFocused,!1).transition().duration(100).style("opacity",(function(){return A.opacityForLegend(t.select(this))}))},B.showLegend=function(A){var t=this,e=t.config;e.legend_show||(e.legend_show=!0,t.legend.style("visibility","visible"),t.legendHasRendered||t.updateLegendWithDefaults()),t.removeHiddenLegendIds(A),t.legend.selectAll(t.selectorLegends(A)).style("visibility","visible").transition().style("opacity",(function(){return t.opacityForLegend(t.d3.select(this))}))},B.hideLegend=function(A){var t=this,e=t.config;e.legend_show&&C(A)&&(e.legend_show=!1,t.legend.style("visibility","hidden")),t.addHiddenLegendIds(A),t.legend.selectAll(t.selectorLegends(A)).style("opacity",0).style("visibility","hidden")},B.clearLegendItemTextBoxCache=function(){this.legendItemTextBox={}},B.updateLegend=function(A,t,e){var n,I,r,o,g,a,M,c,u,l,C,T,N,d,y,E,D=this,j=D.config,B=0,x=0,p=j.legend_item_tile_width+5,L=0,f={},z={},w={},m=[0],Q={},S=0;function Y(t,e,n){var I,r,o=0===n,g=n===A.length-1,a=function(A,t){return D.legendItemTextBox[t]||(D.legendItemTextBox[t]=D.getTextRect(A.textContent,i.legendItem,A)),D.legendItemTextBox[t]}(t,e),M=a.width+p+(!g||D.isLegendRight||D.isLegendInset?10:0)+j.legend_padding,s=a.height+4,c=D.isLegendRight||D.isLegendInset?s:M,u=D.isLegendRight||D.isLegendInset?D.getLegendHeight():D.getLegendWidth();function l(A,t){t||(I=(u-L-c)/2)<10&&(I=(u-c)/2,L=0,S++),Q[A]=S,m[S]=D.isLegendInset?10:I,f[A]=L,L+=c}o&&(L=0,S=0,B=0,x=0),!j.legend_show||D.isLegendToShow(e)?(z[e]=M,w[e]=s,(!B||M>=B)&&(B=M),(!x||s>=x)&&(x=s),r=D.isLegendRight||D.isLegendInset?x:B,j.legend_equally?(Object.keys(z).forEach((function(A){z[A]=B})),Object.keys(w).forEach((function(A){w[A]=x})),(I=(u-r*A.length)/2)<10?(L=0,S=0,A.forEach((function(A){l(A)}))):l(e,!0)):l(e)):z[e]=w[e]=Q[e]=f[e]=0}A=A.filter((function(A){return!s(j.data_names[A])||null!==j.data_names[A]})),C=h(t=t||{},"withTransition",!0),T=h(t,"withTransitionForTransform",!0),D.isLegendInset&&(S=j.legend_inset_step?j.legend_inset_step:A.length,D.updateLegendStep(S)),D.isLegendRight?(n=function(A){return B*Q[A]},o=function(A){return m[Q[A]]+f[A]}):D.isLegendInset?(n=function(A){return B*Q[A]+10},o=function(A){return m[Q[A]]+f[A]}):(n=function(A){return m[Q[A]]+f[A]},o=function(A){return x*Q[A]}),I=function(A,t){return n(A,t)+4+j.legend_item_tile_width},g=function(A,t){return o(A,t)+9},r=function(A,t){return n(A,t)},a=function(A,t){return o(A,t)-5},M=function(A,t){return n(A,t)-2},c=function(A,t){return n(A,t)-2+j.legend_item_tile_width},u=function(A,t){return o(A,t)+4},(l=D.legend.selectAll("."+i.legendItem).data(A).enter().append("g").attr("class",(function(A){return D.generateClass(i.legendItem,A)})).style("visibility",(function(A){return D.isLegendToShow(A)?"visible":"hidden"})).style("cursor","pointer").on("click",(function(A){j.legend_item_onclick?j.legend_item_onclick.call(D,A):D.d3.event.altKey?(D.api.hide(),D.api.show(A)):(D.api.toggle(A),D.isTargetToShow(A)?D.api.focus(A):D.api.revert())})).on("mouseover",(function(A){j.legend_item_onmouseover?j.legend_item_onmouseover.call(D,A):(D.d3.select(this).classed(i.legendItemFocused,!0),!D.transiting&&D.isTargetToShow(A)&&D.api.focus(A))})).on("mouseout",(function(A){j.legend_item_onmouseout?j.legend_item_onmouseout.call(D,A):(D.d3.select(this).classed(i.legendItemFocused,!1),D.api.revert())}))).append("text").text((function(A){return s(j.data_names[A])?j.data_names[A]:A})).each((function(A,t){Y(this,A,t)})).style("pointer-events","none").attr("x",D.isLegendRight||D.isLegendInset?I:-200).attr("y",D.isLegendRight||D.isLegendInset?-200:g),l.append("rect").attr("class",i.legendItemEvent).style("fill-opacity",0).attr("x",D.isLegendRight||D.isLegendInset?r:-200).attr("y",D.isLegendRight||D.isLegendInset?-200:a),l.append("line").attr("class",i.legendItemTile).style("stroke",D.color).style("pointer-events","none").attr("x1",D.isLegendRight||D.isLegendInset?M:-200).attr("y1",D.isLegendRight||D.isLegendInset?-200:u).attr("x2",D.isLegendRight||D.isLegendInset?c:-200).attr("y2",D.isLegendRight||D.isLegendInset?-200:u).attr("stroke-width",j.legend_item_tile_height),E=D.legend.select("."+i.legendBackground+" rect"),D.isLegendInset&&B>0&&0===E.size()&&(E=D.legend.insert("g","."+i.legendItem).attr("class",i.legendBackground).append("rect")),N=D.legend.selectAll("text").data(A).text((function(A){return s(j.data_names[A])?j.data_names[A]:A})).each((function(A,t){Y(this,A,t)})),(C?N.transition():N).attr("x",I).attr("y",g),d=D.legend.selectAll("rect."+i.legendItemEvent).data(A),(C?d.transition():d).attr("width",(function(A){return z[A]})).attr("height",(function(A){return w[A]})).attr("x",r).attr("y",a),y=D.legend.selectAll("line."+i.legendItemTile).data(A),(C?y.transition():y).style("stroke",D.levelColor?function(A){return D.levelColor(D.cache[A].values[0].value)}:D.color).attr("x1",M).attr("y1",u).attr("x2",c).attr("y2",u),E&&(C?E.transition():E).attr("height",D.getLegendHeight()-12).attr("width",B*(S+1)+10),D.legend.selectAll("."+i.legendItem).classed(i.legendItemHidden,(function(A){return!D.isTargetToShow(A)})),D.updateLegendItemWidth(B),D.updateLegendItemHeight(x),D.updateLegendStep(S),D.updateSizes(),D.updateScales(),D.updateSvgSize(),D.transformAll(T,e),D.legendHasRendered=!0},B.initRegion=function(){var A=this;A.region=A.main.append("g").attr("clip-path",A.clipPath).attr("class",i.regions)},B.updateRegion=function(A){var t=this,e=t.config;t.region.style("visibility",t.hasArcType()?"hidden":"visible"),t.mainRegion=t.main.select("."+i.regions).selectAll("."+i.region).data(e.regions),t.mainRegion.enter().append("g").append("rect").style("fill-opacity",0),t.mainRegion.attr("class",t.classRegion.bind(t)),t.mainRegion.exit().transition().duration(A).style("opacity",0).remove()},B.redrawRegion=function(A){var t=this,e=t.mainRegion.select("rect"),i=t.regionX.bind(t),n=t.regionY.bind(t),r=t.regionWidth.bind(t),o=t.regionHeight.bind(t);return[(A?e.transition():e).attr("x",i).attr("y",n).attr("width",r).attr("height",o).style("fill-opacity",(function(A){return I(A.opacity)?A.opacity:.1}))]},B.regionX=function(A){var t=this,e=t.config,i="y"===A.axis?t.y:t.y2;return"y"===A.axis||"y2"===A.axis?e.axis_rotated&&"start"in A?i(A.start):0:e.axis_rotated?0:"start"in A?t.x(t.isTimeSeries()?t.parseDate(A.start):A.start):0},B.regionY=function(A){var t=this,e=t.config,i="y"===A.axis?t.y:t.y2;return"y"===A.axis||"y2"===A.axis?e.axis_rotated?0:"end"in A?i(A.end):0:e.axis_rotated&&"start"in A?t.x(t.isTimeSeries()?t.parseDate(A.start):A.start):0},B.regionWidth=function(A){var t,e=this,i=e.config,n=e.regionX(A),I="y"===A.axis?e.y:e.y2;return(t="y"===A.axis||"y2"===A.axis?i.axis_rotated&&"end"in A?I(A.end):e.width:i.axis_rotated?e.width:"end"in A?e.x(e.isTimeSeries()?e.parseDate(A.end):A.end):e.width)e.bar_width_max?e.bar_width_max:i},B.getBars=function(A,t){var e=this;return(t?e.main.selectAll("."+i.bars+e.getTargetSelectorSuffix(t)):e.main).selectAll("."+i.bar+(I(A)?"-"+A:""))},B.expandBars=function(A,t,e){e&&this.unexpandBars(),this.getBars(A,t).classed(i.EXPANDED,!0)},B.unexpandBars=function(A){this.getBars(A).classed(i.EXPANDED,!1)},B.generateDrawBar=function(A,t){var e=this.config,i=this.generateGetBarPoints(A,t);return function(A,t){var n=i(A,t),I=e.axis_rotated?1:0,r=e.axis_rotated?0:1;return"M "+n[0][I]+","+n[0][r]+" L"+n[1][I]+","+n[1][r]+" L"+n[2][I]+","+n[2][r]+" L"+n[3][I]+","+n[3][r]+" z"}},B.generateGetBarPoints=function(A,t){var e=this,i=t?e.subXAxis:e.xAxis,n=A.__max__+1,I=e.getBarW(i,n),r=e.getShapeX(I,n,A,!!t),o=e.getShapeY(!!t),g=e.getShapeOffset(e.isBarType,A,!!t),a=I*(e.config.bar_space/2),M=t?e.getSubYScale:e.getYScale;return function(A,t){var i=M.call(e,A.id)(0),n=g(A,t)||i,s=r(A),c=o(A);return e.config.axis_rotated&&(0=0&&(a+=o(n[r].value)-g))})),a}},B.isWithinShape=function(A,t){var e,n=this,I=n.d3.select(A);return n.isTargetToShow(t.id)?"circle"===A.nodeName?e=n.isStepType(t)?n.isWithinStep(A,n.getYScale(t.id)(t.value)):n.isWithinCircle(A,1.5*n.pointSelectR(t)):"path"===A.nodeName&&(e=!I.classed(i.bar)||n.isWithinBar(A)):e=!1,e},B.getInterpolate=function(A){var t=this,e=t.isInterpolationType(t.config.spline_interpolation_type)?t.config.spline_interpolation_type:"cardinal";return t.isSplineType(A)?e:t.isStepType(A)?t.config.line_step_type:"linear"},B.initLine=function(){this.main.select("."+i.chart).append("g").attr("class",i.chartLines)},B.updateTargetsForLine=function(A){var t,e=this,n=e.config,I=e.classChartLine.bind(e),r=e.classLines.bind(e),o=e.classAreas.bind(e),g=e.classCircles.bind(e),a=e.classFocus.bind(e);(t=e.main.select("."+i.chartLines).selectAll("."+i.chartLine).data(A).attr("class",(function(A){return I(A)+a(A)})).enter().append("g").attr("class",I).style("opacity",0).style("pointer-events","none")).append("g").attr("class",r),t.append("g").attr("class",o),t.append("g").attr("class",(function(A){return e.generateClass(i.selectedCircles,A.id)})),t.append("g").attr("class",g).style("cursor",(function(A){return n.data_selection_isselectable(A)?"pointer":null})),A.forEach((function(A){e.main.selectAll("."+i.selectedCircles+e.getTargetSelectorSuffix(A.id)).selectAll("."+i.selectedCircle).each((function(t){t.value=A.values[t.index].value}))}))},B.updateLine=function(A){var t=this;t.mainLine=t.main.selectAll("."+i.lines).selectAll("."+i.line).data(t.lineData.bind(t)),t.mainLine.enter().append("path").attr("class",t.classLine.bind(t)).style("stroke",t.color),t.mainLine.style("opacity",t.initialOpacity.bind(t)).style("shape-rendering",(function(A){return t.isStepType(A)?"crispEdges":""})).attr("transform",null),t.mainLine.exit().transition().duration(A).style("opacity",0).remove()},B.redrawLine=function(A,t){return[(t?this.mainLine.transition(Math.random().toString()):this.mainLine).attr("d",A).style("stroke",this.color).style("opacity",1)]},B.generateDrawLine=function(A,t){var e=this,i=e.config,n=e.d3.svg.line(),I=e.generateGetLinePoints(A,t),r=t?e.getSubYScale:e.getYScale,o=function(A){return(t?e.subxx:e.xx).call(e,A)},g=function(A,t){return i.data_groups.length>0?I(A,t)[0][1]:r.call(e,A.id)(A.value)};return n=i.axis_rotated?n.x(g).y(o):n.x(o).y(g),i.line_connectNull||(n=n.defined((function(A){return null!=A.value}))),function(A){var I,o=i.line_connectNull?e.filterRemoveNull(A.values):A.values,g=t?e.x:e.subX,a=r.call(e,A.id),M=0,s=0;return e.isLineType(A)?i.data_regions[A.id]?I=e.lineWithRegions(o,g,a,i.data_regions[A.id]):(e.isStepType(A)&&(o=e.convertValuesToStep(o)),I=n.interpolate(e.getInterpolate(A))(o)):(o[0]&&(M=g(o[0].x),s=a(o[0].value)),I=i.axis_rotated?"M "+s+" "+M:"M "+M+" "+s),I||"M 0 0"}},B.generateGetLinePoints=function(A,t){var e=this,i=e.config,n=A.__max__+1,I=e.getShapeX(0,n,A,!!t),r=e.getShapeY(!!t),o=e.getShapeOffset(e.isLineType,A,!!t),g=t?e.getSubYScale:e.getYScale;return function(A,t){var n=g.call(e,A.id)(0),a=o(A,t)||n,M=I(A),s=r(A);return i.axis_rotated&&(00?I(A,t)[0][1]:r.call(e,A.id)(e.getAreaBaseValue(A.id))},a=function(A,t){return i.data_groups.length>0?I(A,t)[1][1]:r.call(e,A.id)(A.value)};return n=i.axis_rotated?n.x0(g).x1(a).y(o):n.x(o).y0(i.area_above?0:g).y1(a),i.line_connectNull||(n=n.defined((function(A){return null!==A.value}))),function(A){var t,I=i.line_connectNull?e.filterRemoveNull(A.values):A.values,r=0,o=0;return e.isAreaType(A)?(e.isStepType(A)&&(I=e.convertValuesToStep(I)),t=n.interpolate(e.getInterpolate(A))(I)):(I[0]&&(r=e.x(I[0].x),o=e.getYScale(A.id)(I[0].value)),t=i.axis_rotated?"M "+o+" "+r:"M "+r+" "+o),t||"M 0 0"}},B.getAreaBaseValue=function(){return 0},B.generateGetAreaPoints=function(A,t){var e=this,i=e.config,n=A.__max__+1,I=e.getShapeX(0,n,A,!!t),r=e.getShapeY(!!t),o=e.getShapeOffset(e.isAreaType,A,!!t),g=t?e.getSubYScale:e.getYScale;return function(A,t){var n=g.call(e,A.id)(0),a=o(A,t)||n,M=I(A),s=r(A);return i.axis_rotated&&(00?(A=e.getShapeIndices(e.isLineType),t=e.generateGetLinePoints(A),e.circleY=function(A,e){return t(A,e)[0][1]}):e.circleY=function(A){return e.getYScale(A.id)(A.value)}},B.getCircles=function(A,t){var e=this;return(t?e.main.selectAll("."+i.circles+e.getTargetSelectorSuffix(t)):e.main).selectAll("."+i.circle+(I(A)?"-"+A:""))},B.expandCircles=function(A,t,e){var n=this,I=n.pointExpandedR.bind(n);e&&n.unexpandCircles(),n.getCircles(A,t).classed(i.EXPANDED,!0).attr("r",I)},B.unexpandCircles=function(A){var t=this,e=t.pointR.bind(t);t.getCircles(A).filter((function(){return t.d3.select(this).classed(i.EXPANDED)})).classed(i.EXPANDED,!1).attr("r",e)},B.pointR=function(A){var t=this.config;return this.isStepType(A)?0:o(t.point_r)?t.point_r(A):t.point_r},B.pointExpandedR=function(A){var t=this,e=t.config;return e.point_focus_expand_enabled?o(e.point_focus_expand_r)?e.point_focus_expand_r(A):e.point_focus_expand_r?e.point_focus_expand_r:1.75*t.pointR(A):t.pointR(A)},B.pointSelectR=function(A){var t=this.config;return o(t.point_select_r)?t.point_select_r(A):t.point_select_r?t.point_select_r:4*this.pointR(A)},B.isWithinCircle=function(A,t){var e=this.d3,i=e.mouse(A),n=e.select(A),I=+n.attr("cx"),r=+n.attr("cy");return Math.sqrt(Math.pow(I-i[0],2)+Math.pow(r-i[1],2))0?e:320/(A.hasType("gauge")&&!t.gauge_fullCircle?2:1)},B.getCurrentPaddingTop=function(){var A=this,t=A.config,e=I(t.padding_top)?t.padding_top:0;return A.title&&A.title.node()&&(e+=A.getTitlePadding()),e},B.getCurrentPaddingBottom=function(){var A=this.config;return I(A.padding_bottom)?A.padding_bottom:0},B.getCurrentPaddingLeft=function(A){var t=this,e=t.config;return I(e.padding_left)?e.padding_left:e.axis_rotated?!e.axis_x_show||e.axis_x_inner?1:Math.max(c(t.getAxisWidthByAxisId("x",A)),40):!e.axis_y_show||e.axis_y_inner?t.axis.getYAxisLabelPosition().isOuter?30:1:c(t.getAxisWidthByAxisId("y",A))},B.getCurrentPaddingRight=function(){var A=this,t=A.config,e=A.isLegendRight?A.getLegendWidth()+20:0;return I(t.padding_right)?t.padding_right+1:t.axis_rotated?10+e:!t.axis_y2_show||t.axis_y2_inner?2+e+(A.axis.getY2AxisLabelPosition().isOuter?20:0):c(A.getAxisWidthByAxisId("y2"))+e},B.getParentRectValue=function(A){for(var t,e=this.selectChart.node();e&&"BODY"!==e.tagName;){try{t=e.getBoundingClientRect()[A]}catch(i){"width"===A&&(t=e.offsetWidth)}if(t)break;e=e.parentNode}return t},B.getParentWidth=function(){return this.getParentRectValue("width")},B.getParentHeight=function(){var A=this.selectChart.style("height");return A.indexOf("px")>0?+A.replace("px",""):0},B.getSvgLeft=function(A){var t=this,e=t.config,n=e.axis_rotated||!e.axis_rotated&&!e.axis_y_inner,I=e.axis_rotated?i.axisX:i.axisY,r=t.main.select("."+I).node(),o=r&&n?r.getBoundingClientRect():{right:0},g=t.selectChart.node().getBoundingClientRect(),a=t.hasArcType(),M=o.right-g.left-(a?0:t.getCurrentPaddingLeft(A));return M>0?M:0},B.getAxisWidthByAxisId=function(A,t){var e=this.axis.getLabelPositionById(A);return this.axis.getMaxTickWidth(A,t)+(e.isInner?20:40)},B.getHorizontalAxisHeight=function(A){var t=this,e=t.config,i=30;return"x"!==A||e.axis_x_show?"x"===A&&e.axis_x_height?e.axis_x_height:"y"!==A||e.axis_y_show?"y2"!==A||e.axis_y2_show?("x"===A&&!e.axis_rotated&&e.axis_x_tick_rotate&&(i=30+t.axis.getMaxTickWidth(A)*Math.cos(Math.PI*(90-e.axis_x_tick_rotate)/180)),"y"===A&&e.axis_rotated&&e.axis_y_tick_rotate&&(i=30+t.axis.getMaxTickWidth(A)*Math.cos(Math.PI*(90-e.axis_y_tick_rotate)/180)),i+(t.axis.getLabelPositionById(A).isInner?0:10)+("y2"===A?-10:0)):t.rotated_padding_top:!e.legend_show||t.isLegendRight||t.isLegendInset?1:10:8},B.getEventRectWidth=function(){return Math.max(0,this.xAxis.tickInterval())},B.initBrush=function(){var A=this,t=A.d3;A.brush=t.svg.brush().on("brush",(function(){A.redrawForBrush()})),A.brush.update=function(){return A.context&&A.context.select("."+i.brush).call(this),this},A.brush.scale=function(t){return A.config.axis_rotated?this.y(t):this.x(t)}},B.initSubchart=function(){var A=this,t=A.config,e=A.context=A.svg.append("g").attr("transform",A.getTranslate("context")),n=t.subchart_show?"visible":"hidden";e.style("visibility",n),e.append("g").attr("clip-path",A.clipPathForSubchart).attr("class",i.chart),e.select("."+i.chart).append("g").attr("class",i.chartBars),e.select("."+i.chart).append("g").attr("class",i.chartLines),e.append("g").attr("clip-path",A.clipPathForSubchart).attr("class",i.brush).call(A.brush),A.axes.subx=e.append("g").attr("class",i.axisX).attr("transform",A.getTranslate("subx")).attr("clip-path",t.axis_rotated?"":A.clipPathForXAxis).style("visibility",t.subchart_axis_x_show?n:"hidden")},B.updateTargetsForSubchart=function(A){var t,e=this,n=e.context,I=e.config,r=e.classChartBar.bind(e),o=e.classBars.bind(e),g=e.classChartLine.bind(e),a=e.classLines.bind(e),M=e.classAreas.bind(e);I.subchart_show&&(n.select("."+i.chartBars).selectAll("."+i.chartBar).data(A).attr("class",r).enter().append("g").style("opacity",0).attr("class",r).append("g").attr("class",o),(t=n.select("."+i.chartLines).selectAll("."+i.chartLine).data(A).attr("class",g).enter().append("g").style("opacity",0).attr("class",g)).append("g").attr("class",a),t.append("g").attr("class",M),n.selectAll("."+i.brush+" rect").attr(I.axis_rotated?"width":"height",I.axis_rotated?e.width2:e.height2))},B.updateBarForSubchart=function(A){var t=this;t.contextBar=t.context.selectAll("."+i.bars).selectAll("."+i.bar).data(t.barData.bind(t)),t.contextBar.enter().append("path").attr("class",t.classBar.bind(t)).style("stroke","none").style("fill",t.color),t.contextBar.style("opacity",t.initialOpacity.bind(t)),t.contextBar.exit().transition().duration(A).style("opacity",0).remove()},B.redrawBarForSubchart=function(A,t,e){(t?this.contextBar.transition(Math.random().toString()).duration(e):this.contextBar).attr("d",A).style("opacity",1)},B.updateLineForSubchart=function(A){var t=this;t.contextLine=t.context.selectAll("."+i.lines).selectAll("."+i.line).data(t.lineData.bind(t)),t.contextLine.enter().append("path").attr("class",t.classLine.bind(t)).style("stroke",t.color),t.contextLine.style("opacity",t.initialOpacity.bind(t)),t.contextLine.exit().transition().duration(A).style("opacity",0).remove()},B.redrawLineForSubchart=function(A,t,e){(t?this.contextLine.transition(Math.random().toString()).duration(e):this.contextLine).attr("d",A).style("opacity",1)},B.updateAreaForSubchart=function(A){var t=this,e=t.d3;t.contextArea=t.context.selectAll("."+i.areas).selectAll("."+i.area).data(t.lineData.bind(t)),t.contextArea.enter().append("path").attr("class",t.classArea.bind(t)).style("fill",t.color).style("opacity",(function(){return t.orgAreaOpacity=+e.select(this).style("opacity"),0})),t.contextArea.style("opacity",0),t.contextArea.exit().transition().duration(A).style("opacity",0).remove()},B.redrawAreaForSubchart=function(A,t,e){(t?this.contextArea.transition(Math.random().toString()).duration(e):this.contextArea).attr("d",A).style("fill",this.color).style("opacity",this.orgAreaOpacity)},B.redrawSubchart=function(A,t,e,i,n,I,r){var o,g,a,M=this,s=M.d3,c=M.config;M.context.style("visibility",c.subchart_show?"visible":"hidden"),c.subchart_show&&(s.event&&"zoom"===s.event.type&&M.brush.extent(M.x.orgDomain()).update(),A&&(M.brush.empty()||M.brush.extent(M.x.orgDomain()).update(),o=M.generateDrawArea(n,!0),g=M.generateDrawBar(I,!0),a=M.generateDrawLine(r,!0),M.updateBarForSubchart(e),M.updateLineForSubchart(e),M.updateAreaForSubchart(e),M.redrawBarForSubchart(g,e,e),M.redrawLineForSubchart(a,e,e),M.redrawAreaForSubchart(o,e,e)))},B.redrawForBrush=function(){var A=this,t=A.x;if("none"!==A.main.style("display"))A.redraw({withTransition:!1,withY:A.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1});else{var e=A.filterTargetsToShow(A.data.targets);e.length&&A.updateXDomain(e,!0,!1,!0)}A.config.subchart_onbrush.call(A.api,t.orgDomain())},B.transformContext=function(A,t){var e,n=this;t&&t.axisSubX?e=t.axisSubX:(e=n.context.select("."+i.axisX),A&&(e=e.transition())),n.context.attr("transform",n.getTranslate("context")),e.attr("transform",n.getTranslate("subx"))},B.getDefaultExtent=function(){var A=this,t=A.config,e=o(t.axis_x_extent)?t.axis_x_extent(A.getXDomain(A.data.targets)):t.axis_x_extent;return A.isTimeSeries()&&(e=[A.parseDate(e[0]),A.parseDate(e[1])]),e},B.initText=function(){var A=this;A.main.select("."+i.chart).append("g").attr("class",i.chartTexts),A.mainText=A.d3.selectAll([])},B.updateTargetsForText=function(A){var t=this,e=t.classChartText.bind(t),n=t.classTexts.bind(t),I=t.classFocus.bind(t);t.main.select("."+i.chartTexts).selectAll("."+i.chartText).data(A).attr("class",(function(A){return e(A)+I(A)})).enter().append("g").attr("class",e).style("opacity",0).style("pointer-events","none").append("g").attr("class",n)},B.updateText=function(A){var t=this,e=t.config,n=t.barOrLineData.bind(t),I=t.classText.bind(t);t.mainText=t.main.selectAll("."+i.texts).selectAll("."+i.text).data(n),t.mainText.enter().append("text").attr("class",I).attr("text-anchor",(function(A){return e.axis_rotated?A.value<0?"end":"start":"middle"})).style("stroke","none").style("fill",(function(A){return t.color(A)})).style("fill-opacity",0),t.mainText.text((function(A,e,i){return t.dataLabelFormat(A.id)(A.value,A.id,e,i)})),t.mainText.exit().transition().duration(A).style("fill-opacity",0).remove()},B.redrawText=function(A,t,e,i){return[(i?this.mainText.transition():this.mainText).attr("x",A).attr("y",t).style("fill",this.color).style("fill-opacity",e?0:this.opacityForText.bind(this))]},B.getTextRect=function(A,t,e){var i,n=this.svg,I=n.select("text.dummy"),r=this.d3.select(e).style("font");return I.empty()&&(n.append("text").attr("class","dummy"),I=n.select("text.dummy")),I.style("visibility","hidden").style("font",r).classed(t||"",!0).text(A).each((function(){i=this.getBoundingClientRect()})),i},B.generateXYForText=function(A,t,e,i){var n=this,I=n.generateGetAreaPoints(A,!1),r=n.generateGetBarPoints(t,!1),o=n.generateGetLinePoints(e,!1),g=i?n.getXForText:n.getYForText;return function(A,t){var e=n.isAreaType(A)?I:n.isBarType(A)?r:o;return g.call(n,e(A,t),A,this)}},B.getXForText=function(A,t,e){var i,n,I=this,r=e.getBoundingClientRect();return I.config.axis_rotated?(n=I.isBarType(t)?4:6,i=A[2][1]+n*(t.value<0?-1:1)):i=I.hasType("bar")?(A[2][0]+A[0][0])/2:A[0][0],null===t.value&&(i>I.width?i=I.width-r.width:i<0&&(i=4)),i},B.getYForText=function(A,t,e){var i,n=this,I=e.getBoundingClientRect();return n.config.axis_rotated?i=(A[0][0]+A[2][0]+.6*I.height)/2:(i=A[2][1],t.value<0||0===t.value&&!n.hasPositiveValue?(i+=I.height,n.isBarType(t)&&n.isSafari()?i-=3:!n.isBarType(t)&&n.isChrome()&&(i+=3)):i+=n.isBarType(t)?-3:-6),null!==t.value||n.config.axis_rotated||(ithis.height&&(i=this.height-4)),i},B.initTitle=function(){var A=this;A.title=A.svg.append("text").text(A.config.title_text).attr("class",A.CLASS.title)},B.redrawTitle=function(){var A=this;if(A.title.node().textContent){var t=A.getTextRect(A.title.node().textContent,A.CLASS.title,A.title.node());A.title.attr("x",A.xForTitle.bind(A,t)).attr("y",A.yForTitle.bind(A,t))}},B.xForTitle=function(A){var t=this,e=t.config,i=e.title_position||"left";return i.indexOf("right")>=0?t.currentWidth-(A||t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node())).width-e.title_padding.right:i.indexOf("center")>=0?(t.currentWidth-(A||t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node())).width)/2:e.title_padding.left},B.yForTitle=function(A){var t=this;return t.config.title_padding.top+(A||t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node())).height},B.getTitlePadding=function(){return this.yForTitle()+this.config.title_padding.bottom},B.initTooltip=function(){var A,t=this,e=t.config;if(t.tooltip=t.selectChart.style("position","relative").append("div").attr("class",i.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none"),e.tooltip_init_show){if(t.isTimeSeries()&&a(e.tooltip_init_x)){for(e.tooltip_init_x=t.parseDate(e.tooltip_init_x),A=0;A"+(r||0===r?""+r+"":"")),l(A[I].value,A[I].ratio,A[I].id,A[I].index,A),void 0!==(o=d(l(A[I].value,A[I].ratio,A[I].id,A[I].index,A))))){if(null===A[I].name)continue;g=d(u(A[I].name,A[I].ratio,A[I].id,A[I].index)),a=M.levelColor?M.levelColor(A[I].value):i(A[I].id),n+="",n+=""+g+"",n+=""+o+"",n+=""}return n+""},B.tooltipPosition=function(A,t,e,i){var n,I,r,o,g,a=this,M=a.config,s=a.d3,c=a.hasArcType(),u=s.mouse(i);return c?(I=(a.width-(a.isLegendRight?a.getLegendWidth():0))/2+u[0],o=(a.hasType("gauge")?a.height:a.height/2)+u[1]+20):(n=a.getSvgLeft(!0),M.axis_rotated?(r=(I=n+u[0]+100)+t,g=a.currentWidth-a.getCurrentPaddingRight(),o=a.x(A[0].x)+20):(r=(I=n+a.getCurrentPaddingLeft(!0)+a.x(A[0].x)+20)+t,g=n+a.currentWidth-a.getCurrentPaddingRight(),o=u[1]+15),r>g&&(I-=r-g+20),o+e>a.currentHeight&&(o-=e+30)),o<0&&(o=0),{top:o,left:I}},B.showTooltip=function(A,t){var e,i,n,r=this,o=r.config,g=r.hasArcType(),a=A.filter((function(A){return A&&I(A.value)})),M=o.tooltip_position||B.tooltipPosition;0!==a.length&&o.tooltip_show&&(r.tooltip.html(o.tooltip_contents.call(r,A,r.axis.getXAxisTickFormat(),r.getYFormat(g),r.color)).style("display","block"),e=r.tooltip.property("offsetWidth"),i=r.tooltip.property("offsetHeight"),n=M.call(this,a,e,i,t),r.tooltip.style("top",n.top+"px").style("left",n.left+"px"))},B.hideTooltip=function(){this.tooltip.style("display","none")},B.setTargetType=function(A,t){var e=this,i=e.config;e.mapToTargetIds(A).forEach((function(A){e.withoutFadeIn[A]=t===i.data_types[A],i.data_types[A]=t})),A||(i.data_type=t)},B.hasType=function(A,t){var e=this,i=e.config.data_types,n=!1;return(t=t||e.data.targets)&&t.length?t.forEach((function(t){var e=i[t.id];(e&&e.indexOf(A)>=0||!e&&"line"===A)&&(n=!0)})):Object.keys(i).length?Object.keys(i).forEach((function(t){i[t]===A&&(n=!0)})):n=e.config.data_type===A,n},B.hasArcType=function(A){return this.hasType("pie",A)||this.hasType("donut",A)||this.hasType("gauge",A)},B.isLineType=function(A){var t=this.config,e=a(A)?A:A.id;return!t.data_types[e]||["line","spline","area","area-spline","step","area-step"].indexOf(t.data_types[e])>=0},B.isStepType=function(A){var t=a(A)?A:A.id;return["step","area-step"].indexOf(this.config.data_types[t])>=0},B.isSplineType=function(A){var t=a(A)?A:A.id;return["spline","area-spline"].indexOf(this.config.data_types[t])>=0},B.isAreaType=function(A){var t=a(A)?A:A.id;return["area","area-spline","area-step"].indexOf(this.config.data_types[t])>=0},B.isBarType=function(A){var t=a(A)?A:A.id;return"bar"===this.config.data_types[t]},B.isScatterType=function(A){var t=a(A)?A:A.id;return"scatter"===this.config.data_types[t]},B.isPieType=function(A){var t=a(A)?A:A.id;return"pie"===this.config.data_types[t]},B.isGaugeType=function(A){var t=a(A)?A:A.id;return"gauge"===this.config.data_types[t]},B.isDonutType=function(A){var t=a(A)?A:A.id;return"donut"===this.config.data_types[t]},B.isArcType=function(A){return this.isPieType(A)||this.isDonutType(A)||this.isGaugeType(A)},B.lineData=function(A){return this.isLineType(A)?[A]:[]},B.arcData=function(A){return this.isArcType(A.data)?[A]:[]},B.barData=function(A){return this.isBarType(A)?A.values:[]},B.lineOrScatterData=function(A){return this.isLineType(A)||this.isScatterType(A)?A.values:[]},B.barOrLineData=function(A){return this.isBarType(A)||this.isLineType(A)?A.values:[]},B.isInterpolationType=function(A){return["linear","linear-closed","basis","basis-open","basis-closed","bundle","cardinal","cardinal-open","cardinal-closed","monotone"].indexOf(A)>=0},B.isSafari=function(){var A=window.navigator.userAgent;return A.indexOf("Safari")>=0&&A.indexOf("Chrome")<0},B.isChrome=function(){return window.navigator.userAgent.indexOf("Chrome")>=0},B.initZoom=function(){var A,t=this,e=t.d3,i=t.config;t.zoom=e.behavior.zoom().on("zoomstart",(function(){A=e.event.sourceEvent,t.zoom.altDomain=e.event.sourceEvent.altKey?t.x.orgDomain():null,i.zoom_onzoomstart.call(t.api,e.event.sourceEvent)})).on("zoom",(function(){t.redrawForZoom.call(t)})).on("zoomend",(function(){var n=e.event.sourceEvent;n&&A.clientX===n.clientX&&A.clientY===n.clientY||(t.redrawEventRect(),t.updateZoom(),i.zoom_onzoomend.call(t.api,t.x.orgDomain()))})),t.zoom.scale=function(A){return i.axis_rotated?this.y(A):this.x(A)},t.zoom.orgScaleExtent=function(){var A=i.zoom_extent?i.zoom_extent:[1,10];return[A[0],Math.max(t.getMaxDataCount()/A[1],A[1])]},t.zoom.updateScaleExtent=function(){var A=l(t.x.orgDomain())/l(t.getZoomDomain()),e=this.orgScaleExtent();return this.scaleExtent([e[0]*A,e[1]*A]),this}},B.getZoomDomain=function(){var A=this,t=A.config,e=A.d3;return[e.min([A.orgXDomain[0],t.zoom_x_min]),e.max([A.orgXDomain[1],t.zoom_x_max])]},B.updateZoom=function(){var A=this,t=A.config.zoom_enabled?A.zoom:function(){};A.main.select("."+i.zoomRect).call(t).on("dblclick.zoom",null),A.main.selectAll("."+i.eventRect).call(t).on("dblclick.zoom",null)},B.redrawForZoom=function(){var A=this,t=A.d3,e=A.config,i=A.zoom,n=A.x;if(e.zoom_enabled&&0!==A.filterTargetsToShow(A.data.targets).length){if("mousemove"===t.event.sourceEvent.type&&i.altDomain)return n.domain(i.altDomain),void i.scale(n).updateScaleExtent();A.isCategorized()&&n.orgDomain()[0]===A.orgXDomain[0]&&n.domain([A.orgXDomain[0]-1e-10,n.orgDomain()[1]]),A.redraw({withTransition:!1,withY:e.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),"mousemove"===t.event.sourceEvent.type&&(A.cancelClick=!0),e.zoom_onzoom.call(A.api,n.orgDomain())}},x},"object"===r(t)?A.exports=I():void 0===(n="function"==typeof(i=I)?i.call(t,e,t,A):i)||(A.exports=n)},4844:function(A,t){var e,i,n,I;function r(A){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},r(A)}I=function(A){"use strict";function t(A,t,e,i,n){if(isNaN(t)||isNaN(e)||isNaN(i))return A;var I,r,o,g,a,M,s,c,u,l,C,T,h=A._root,N={data:n},d=A._x0,y=A._y0,E=A._z0,D=A._x1,j=A._y1,B=A._z1;if(!h)return A._root=N,A;for(;h.length;)if((c=t>=(r=(d+D)/2))?d=r:D=r,(u=e>=(o=(y+j)/2))?y=o:j=o,(l=i>=(g=(E+B)/2))?E=g:B=g,I=h,!(h=h[C=l<<2|u<<1|c]))return I[C]=N,A;if(a=+A._x.call(null,h.data),M=+A._y.call(null,h.data),s=+A._z.call(null,h.data),t===a&&e===M&&i===s)return N.next=h,I?I[C]=N:A._root=N,A;do{I=I?I[C]=new Array(8):A._root=new Array(8),(c=t>=(r=(d+D)/2))?d=r:D=r,(u=e>=(o=(y+j)/2))?y=o:j=o,(l=i>=(g=(E+B)/2))?E=g:B=g}while((C=l<<2|u<<1|c)==(T=(s>=g)<<2|(M>=o)<<1|a>=r));return I[T]=h,I[C]=N,A}function e(A,t,e,i,n,I,r){this.node=A,this.x0=t,this.y0=e,this.z0=i,this.x1=n,this.y1=I,this.z1=r}function i(A){return A[0]}function n(A){return A[1]}function I(A){return A[2]}function r(A,t,e,r){var g=new o(null==t?i:t,null==e?n:e,null==r?I:r,NaN,NaN,NaN,NaN,NaN,NaN);return null==A?g:g.addAll(A)}function o(A,t,e,i,n,I,r,o,g){this._x=A,this._y=t,this._z=e,this._x0=i,this._y0=n,this._z0=I,this._x1=r,this._y1=o,this._z1=g,this._root=void 0}function g(A){for(var t={data:A.data},e=t;A=A.next;)e=e.next={data:A.data};return t}var a=r.prototype=o.prototype;a.copy=function(){var A,t,e=new o(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),i=this._root;if(!i)return e;if(!i.length)return e._root=g(i),e;for(A=[{source:i,target:e._root=new Array(8)}];i=A.pop();)for(var n=0;n<8;++n)(t=i.source[n])&&(t.length?A.push({source:t,target:i.target[n]=new Array(8)}):i.target[n]=g(t));return e},a.add=function(A){var e=+this._x.call(null,A),i=+this._y.call(null,A),n=+this._z.call(null,A);return t(this.cover(e,i,n),e,i,n,A)},a.addAll=function(A){var e,i,n,I,r,o=A.length,g=new Array(o),a=new Array(o),M=new Array(o),s=1/0,c=1/0,u=1/0,l=-1/0,C=-1/0,T=-1/0;for(i=0;il&&(l=n),IC&&(C=I),rT&&(T=r));for(lA||A>r||n>t||t>o||I>e||e>g))return this;var a,M,s=r-i,c=this._root;switch(M=(e<(I+g)/2)<<2|(t<(n+o)/2)<<1|A<(i+r)/2){case 0:do{(a=new Array(8))[M]=c,c=a}while(o=n+(s*=2),g=I+s,A>(r=i+s)||t>o||e>g);break;case 1:do{(a=new Array(8))[M]=c,c=a}while(o=n+(s*=2),g=I+s,(i=r-s)>A||t>o||e>g);break;case 2:do{(a=new Array(8))[M]=c,c=a}while(n=o-(s*=2),g=I+s,A>(r=i+s)||n>t||e>g);break;case 3:do{(a=new Array(8))[M]=c,c=a}while(n=o-(s*=2),g=I+s,(i=r-s)>A||n>t||e>g);break;case 4:do{(a=new Array(8))[M]=c,c=a}while(o=n+(s*=2),I=g-s,A>(r=i+s)||t>o||I>e);break;case 5:do{(a=new Array(8))[M]=c,c=a}while(o=n+(s*=2),I=g-s,(i=r-s)>A||t>o||I>e);break;case 6:do{(a=new Array(8))[M]=c,c=a}while(n=o-(s*=2),I=g-s,A>(r=i+s)||n>t||I>e);break;case 7:do{(a=new Array(8))[M]=c,c=a}while(n=o-(s*=2),I=g-s,(i=r-s)>A||n>t||I>e)}this._root&&this._root.length&&(this._root=c)}return this._x0=i,this._y0=n,this._z0=I,this._x1=r,this._y1=o,this._z1=g,this},a.data=function(){var A=[];return this.visit((function(t){if(!t.length)do{A.push(t.data)}while(t=t.next)})),A},a.extent=function(A){return arguments.length?this.cover(+A[0][0],+A[0][1],+A[0][2]).cover(+A[1][0],+A[1][1],+A[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]},a.find=function(A,t,i,n,I,r){var o,g,a,M,s,c,u,l,C,T=this._x0,h=this._y0,N=this._z0,d=this._x1,y=this._y1,E=this._z1,D=[],j=this._root;for(j&&D.push(new e(j,T,h,N,d,y,E)),null==n?n=1/0:(T=A-n,h=t-n,N=i-n,d=A+n,y=t+n,E=i+n,n*=n);l=D.pop();)if(!(!(j=l.node)||(g=l.x0)>d||(a=l.y0)>y||(M=l.z0)>E||(s=l.x1)=p)<<2|(t>=x)<<1|A>=B)&&(l=D[D.length-1],D[D.length-1]=D[D.length-1-C],D[D.length-1-C]=l)}else{var L=A-+this._x.call(null,j.data),f=t-+this._y.call(null,j.data),z=i-+this._z.call(null,j.data),w=L*L+f*f+z*z;if(w=(g=(h+y)/2))?h=g:y=g,(c=r>=(a=(N+E)/2))?N=a:E=a,(u=o>=(M=(d+D)/2))?d=M:D=M,t=T,!(T=T[l=u<<2|c<<1|s]))return this;if(!T.length)break;(t[l+1&7]||t[l+2&7]||t[l+3&7]||t[l+4&7]||t[l+5&7]||t[l+6&7]||t[l+7&7])&&(e=t,C=l)}for(;T.data!==A;)if(i=T,!(T=T.next))return this;return(n=T.next)&&delete T.next,i?(n?i.next=n:delete i.next,this):t?(n?t[l]=n:delete t[l],(T=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&T===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!T.length&&(e?e[C]=T:this._root=T),this):(this._root=n,this)},a.removeAll=function(A){for(var t=0,e=A.length;t>2,r=new Uint8Array(n),o=new Uint32Array(r.buffer,0,I),g=0,a=0;g0?1:-1}),Number.isInteger||(Number.isInteger=function(A){return"number"==typeof A&&isFinite(A)&&A>-9007199254740992&&A<9007199254740992&&Math.floor(A)===A}),Number.isNaN||(Number.isNaN=function(A){return A!=A}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(A){var t=arguments;if(null==A)throw new TypeError("Cannot convert first argument to object");for(var e,i=Object(A),n=!1,I=1;I1?arguments[1]:void 0,o=r?Number(r):0;Number.isNaN(o)&&(o=0);var g=Math.min(Math.max(o,0),i);if(I+g>i)return!1;for(var a=-1;++ae.length)&&(t=e.length),t-=A.length;var i=e.indexOf(A,t);return-1!==i&&i===t}),String.prototype.repeat||(String.prototype.repeat=function(A){if(null===this)throw new TypeError("can't convert "+this+" to object");var t=""+this;if(A=+A,Number.isNaN(A)&&(A=0),A<0)throw new RangeError("repeat count must be non-negative");if(A===1/0)throw new RangeError("repeat count must be less than infinity");if(A=Math.floor(A),0===t.length||0===A)return"";if(t.length*A>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");for(var e="";1==(1&A)&&(e+=t),0!=(A>>>=1);)t+=t;return e}),String.prototype.includes||(String.prototype.includes=function(A,t){return"number"!=typeof t&&(t=0),!(t+A.length>this.length)&&-1!==this.indexOf(A,t)}),Array.prototype.includes||(Array.prototype.includes=function(A){if(null==this)throw new TypeError("Array.prototype.includes called on null or undefined");var t=Object(this),e=parseInt(t.length,10)||0;if(0===e)return!1;var i,n,I=parseInt(arguments[1],10)||0;for(I>=0?i=I:(i=e+I)<0&&(i=0);i0?1:-1)*Math.floor(Math.abs(t)):t}(A);return Math.min(Math.max(t,0),n)},function(A){var t=Object(A);if(null==A)throw new TypeError("Array.from requires an array-like object - not null or undefined");var e,n=arguments.length>1?arguments[1]:void 0;if(void 0!==n){if(!i(n))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(e=arguments[2])}for(var r,o=I(t.length),g=i(this)?Object(new this(o)):new Array(o),a=0;a0?1:+A}),"name"in Function.prototype==0&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(A){var t=arguments;if(null==A)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(A),i=1;i>8&255]+oe[A>>16&255]+oe[A>>24&255]+"-"+oe[255&t]+oe[t>>8&255]+"-"+oe[t>>16&15|64]+oe[t>>24&255]+"-"+oe[63&e|128]+oe[e>>8&255]+"-"+oe[e>>16&255]+oe[e>>24&255]+oe[255&i]+oe[i>>8&255]+oe[i>>16&255]+oe[i>>24&255]).toUpperCase()},clamp:function(A,t,e){return Math.max(t,Math.min(e,A))},euclideanModulo:function(A,t){return(A%t+t)%t},mapLinear:function(A,t,e,i,n){return i+(A-t)*(n-i)/(e-t)},lerp:function(A,t,e){return(1-e)*A+e*t},smoothstep:function(A,t,e){return A<=t?0:A>=e?1:(A=(A-t)/(e-t))*A*(3-2*A)},smootherstep:function(A,t,e){return A<=t?0:A>=e?1:(A=(A-t)/(e-t))*A*A*(A*(6*A-15)+10)},randInt:function(A,t){return A+Math.floor(Math.random()*(t-A+1))},randFloat:function(A,t){return A+Math.random()*(t-A)},randFloatSpread:function(A){return A*(.5-Math.random())},degToRad:function(A){return A*Me.DEG2RAD},radToDeg:function(A){return A*Me.RAD2DEG},isPowerOfTwo:function(A){return 0==(A&A-1)&&0!==A},ceilPowerOfTwo:function(A){return Math.pow(2,Math.ceil(Math.log(A)/Math.LN2))},floorPowerOfTwo:function(A){return Math.pow(2,Math.floor(Math.log(A)/Math.LN2))},setQuaternionFromProperEuler:function(A,t,e,i,n){var I=Math.cos,r=Math.sin,o=I(e/2),g=r(e/2),a=I((t+i)/2),M=r((t+i)/2),s=I((t-i)/2),c=r((t-i)/2),u=I((i-t)/2),l=r((i-t)/2);switch(n){case"XYX":A.set(o*M,g*s,g*c,o*a);break;case"YZY":A.set(g*c,o*M,g*s,o*a);break;case"ZXZ":A.set(g*s,g*c,o*M,o*a);break;case"XZX":A.set(o*M,g*l,g*u,o*a);break;case"YXY":A.set(g*u,o*M,g*l,o*a);break;case"ZYZ":A.set(g*l,g*u,o*M,o*a);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+n)}}};function se(A,t){void 0===A&&(A=0),void 0===t&&(t=0),this.x=A,this.y=t}function ce(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(se.prototype,{width:{get:function(){return this.x},set:function(A){this.x=A}},height:{get:function(){return this.y},set:function(A){this.y=A}}}),Object.assign(se.prototype,{isVector2:!0,set:function(A,t){return this.x=A,this.y=t,this},setScalar:function(A){return this.x=A,this.y=A,this},setX:function(A){return this.x=A,this},setY:function(A){return this.y=A,this},setComponent:function(A,t){switch(A){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+A)}return this},getComponent:function(A){switch(A){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+A)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(A){return this.x=A.x,this.y=A.y,this},add:function(A,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(A,t)):(this.x+=A.x,this.y+=A.y,this)},addScalar:function(A){return this.x+=A,this.y+=A,this},addVectors:function(A,t){return this.x=A.x+t.x,this.y=A.y+t.y,this},addScaledVector:function(A,t){return this.x+=A.x*t,this.y+=A.y*t,this},sub:function(A,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(A,t)):(this.x-=A.x,this.y-=A.y,this)},subScalar:function(A){return this.x-=A,this.y-=A,this},subVectors:function(A,t){return this.x=A.x-t.x,this.y=A.y-t.y,this},multiply:function(A){return this.x*=A.x,this.y*=A.y,this},multiplyScalar:function(A){return this.x*=A,this.y*=A,this},divide:function(A){return this.x/=A.x,this.y/=A.y,this},divideScalar:function(A){return this.multiplyScalar(1/A)},applyMatrix3:function(A){var t=this.x,e=this.y,i=A.elements;return this.x=i[0]*t+i[3]*e+i[6],this.y=i[1]*t+i[4]*e+i[7],this},min:function(A){return this.x=Math.min(this.x,A.x),this.y=Math.min(this.y,A.y),this},max:function(A){return this.x=Math.max(this.x,A.x),this.y=Math.max(this.y,A.y),this},clamp:function(A,t){return this.x=Math.max(A.x,Math.min(t.x,this.x)),this.y=Math.max(A.y,Math.min(t.y,this.y)),this},clampScalar:function(A,t){return this.x=Math.max(A,Math.min(t,this.x)),this.y=Math.max(A,Math.min(t,this.y)),this},clampLength:function(A,t){var e=this.length();return this.divideScalar(e||1).multiplyScalar(Math.max(A,Math.min(t,e)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(A){return this.x*A.x+this.y*A.y},cross:function(A){return this.x*A.y-this.y*A.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){return Math.atan2(-this.y,-this.x)+Math.PI},distanceTo:function(A){return Math.sqrt(this.distanceToSquared(A))},distanceToSquared:function(A){var t=this.x-A.x,e=this.y-A.y;return t*t+e*e},manhattanDistanceTo:function(A){return Math.abs(this.x-A.x)+Math.abs(this.y-A.y)},setLength:function(A){return this.normalize().multiplyScalar(A)},lerp:function(A,t){return this.x+=(A.x-this.x)*t,this.y+=(A.y-this.y)*t,this},lerpVectors:function(A,t,e){return this.x=A.x+(t.x-A.x)*e,this.y=A.y+(t.y-A.y)*e,this},equals:function(A){return A.x===this.x&&A.y===this.y},fromArray:function(A,t){return void 0===t&&(t=0),this.x=A[t],this.y=A[t+1],this},toArray:function(A,t){return void 0===A&&(A=[]),void 0===t&&(t=0),A[t]=this.x,A[t+1]=this.y,A},fromBufferAttribute:function(A,t,e){return void 0!==e&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=A.getX(t),this.y=A.getY(t),this},rotateAround:function(A,t){var e=Math.cos(t),i=Math.sin(t),n=this.x-A.x,I=this.y-A.y;return this.x=n*e-I*i+A.x,this.y=n*i+I*e+A.y,this},random:function(){return this.x=Math.random(),this.y=Math.random(),this}}),Object.assign(ce.prototype,{isMatrix3:!0,set:function(A,t,e,i,n,I,r,o,g){var a=this.elements;return a[0]=A,a[1]=i,a[2]=r,a[3]=t,a[4]=n,a[5]=o,a[6]=e,a[7]=I,a[8]=g,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(A){var t=this.elements,e=A.elements;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],this},extractBasis:function(A,t,e){return A.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),e.setFromMatrix3Column(this,2),this},setFromMatrix4:function(A){var t=A.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},multiply:function(A){return this.multiplyMatrices(this,A)},premultiply:function(A){return this.multiplyMatrices(A,this)},multiplyMatrices:function(A,t){var e=A.elements,i=t.elements,n=this.elements,I=e[0],r=e[3],o=e[6],g=e[1],a=e[4],M=e[7],s=e[2],c=e[5],u=e[8],l=i[0],C=i[3],T=i[6],h=i[1],N=i[4],d=i[7],y=i[2],E=i[5],D=i[8];return n[0]=I*l+r*h+o*y,n[3]=I*C+r*N+o*E,n[6]=I*T+r*d+o*D,n[1]=g*l+a*h+M*y,n[4]=g*C+a*N+M*E,n[7]=g*T+a*d+M*D,n[2]=s*l+c*h+u*y,n[5]=s*C+c*N+u*E,n[8]=s*T+c*d+u*D,this},multiplyScalar:function(A){var t=this.elements;return t[0]*=A,t[3]*=A,t[6]*=A,t[1]*=A,t[4]*=A,t[7]*=A,t[2]*=A,t[5]*=A,t[8]*=A,this},determinant:function(){var A=this.elements,t=A[0],e=A[1],i=A[2],n=A[3],I=A[4],r=A[5],o=A[6],g=A[7],a=A[8];return t*I*a-t*r*g-e*n*a+e*r*o+i*n*g-i*I*o},getInverse:function(A,t){void 0!==t&&console.warn("THREE.Matrix3: .getInverse() can no longer be configured to throw on degenerate.");var e=A.elements,i=this.elements,n=e[0],I=e[1],r=e[2],o=e[3],g=e[4],a=e[5],M=e[6],s=e[7],c=e[8],u=c*g-a*s,l=a*M-c*o,C=s*o-g*M,T=n*u+I*l+r*C;if(0===T)return this.set(0,0,0,0,0,0,0,0,0);var h=1/T;return i[0]=u*h,i[1]=(r*s-c*I)*h,i[2]=(a*I-r*g)*h,i[3]=l*h,i[4]=(c*n-r*M)*h,i[5]=(r*o-a*n)*h,i[6]=C*h,i[7]=(I*M-s*n)*h,i[8]=(g*n-I*o)*h,this},transpose:function(){var A,t=this.elements;return A=t[1],t[1]=t[3],t[3]=A,A=t[2],t[2]=t[6],t[6]=A,A=t[5],t[5]=t[7],t[7]=A,this},getNormalMatrix:function(A){return this.setFromMatrix4(A).getInverse(this).transpose()},transposeIntoArray:function(A){var t=this.elements;return A[0]=t[0],A[1]=t[3],A[2]=t[6],A[3]=t[1],A[4]=t[4],A[5]=t[7],A[6]=t[2],A[7]=t[5],A[8]=t[8],this},setUvTransform:function(A,t,e,i,n,I,r){var o=Math.cos(n),g=Math.sin(n);this.set(e*o,e*g,-e*(o*I+g*r)+I+A,-i*g,i*o,-i*(-g*I+o*r)+r+t,0,0,1)},scale:function(A,t){var e=this.elements;return e[0]*=A,e[3]*=A,e[6]*=A,e[1]*=t,e[4]*=t,e[7]*=t,this},rotate:function(A){var t=Math.cos(A),e=Math.sin(A),i=this.elements,n=i[0],I=i[3],r=i[6],o=i[1],g=i[4],a=i[7];return i[0]=t*n+e*o,i[3]=t*I+e*g,i[6]=t*r+e*a,i[1]=-e*n+t*o,i[4]=-e*I+t*g,i[7]=-e*r+t*a,this},translate:function(A,t){var e=this.elements;return e[0]+=A*e[2],e[3]+=A*e[5],e[6]+=A*e[8],e[1]+=t*e[2],e[4]+=t*e[5],e[7]+=t*e[8],this},equals:function(A){for(var t=this.elements,e=A.elements,i=0;i<9;i++)if(t[i]!==e[i])return!1;return!0},fromArray:function(A,t){void 0===t&&(t=0);for(var e=0;e<9;e++)this.elements[e]=A[e+t];return this},toArray:function(A,t){void 0===A&&(A=[]),void 0===t&&(t=0);var e=this.elements;return A[t]=e[0],A[t+1]=e[1],A[t+2]=e[2],A[t+3]=e[3],A[t+4]=e[4],A[t+5]=e[5],A[t+6]=e[6],A[t+7]=e[7],A[t+8]=e[8],A}});var ue={getDataURL:function(A){if(/^data:/i.test(A.src))return A.src;if("undefined"==typeof HTMLCanvasElement)return A.src;var t;if(A instanceof HTMLCanvasElement)t=A;else{void 0===ae&&(ae=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),ae.width=A.width,ae.height=A.height;var e=ae.getContext("2d");A instanceof ImageData?e.putImageData(A,0,0):e.drawImage(A,0,0,A.width,A.height),t=ae}return t.width>2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}},le=0;function Ce(A,t,e,i,n,I,r,o,g,a){Object.defineProperty(this,"id",{value:le++}),this.uuid=Me.generateUUID(),this.name="",this.image=void 0!==A?A:Ce.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:Ce.DEFAULT_MAPPING,this.wrapS=void 0!==e?e:dA,this.wrapT=void 0!==i?i:dA,this.magFilter=void 0!==n?n:BA,this.minFilter=void 0!==I?I:pA,this.anisotropy=void 0!==g?g:1,this.format=void 0!==r?r:GA,this.internalFormat=null,this.type=void 0!==o?o:LA,this.offset=new se(0,0),this.repeat=new se(1,1),this.center=new se(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new ce,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==a?a:Ht,this.version=0,this.onUpdate=null}function Te(A,t,e,i){void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=1),this.x=A,this.y=t,this.z=e,this.w=i}function he(A,t,e){this.width=A,this.height=t,this.scissor=new Te(0,0,A,t),this.scissorTest=!1,this.viewport=new Te(0,0,A,t),e=e||{},this.texture=new Ce(void 0,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding),this.texture.image={},this.texture.image.width=A,this.texture.image.height=t,this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:BA,this.depthBuffer=void 0===e.depthBuffer||e.depthBuffer,this.stencilBuffer=void 0===e.stencilBuffer||e.stencilBuffer,this.depthTexture=void 0!==e.depthTexture?e.depthTexture:null}function Ne(A,t,e){he.call(this,A,t,e),this.samples=4}function de(A,t,e,i){void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=1),this._x=A,this._y=t,this._z=e,this._w=i}Ce.DEFAULT_IMAGE=void 0,Ce.DEFAULT_MAPPING=300,Ce.prototype=Object.assign(Object.create(re.prototype),{constructor:Ce,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(A){return this.name=A.name,this.image=A.image,this.mipmaps=A.mipmaps.slice(0),this.mapping=A.mapping,this.wrapS=A.wrapS,this.wrapT=A.wrapT,this.magFilter=A.magFilter,this.minFilter=A.minFilter,this.anisotropy=A.anisotropy,this.format=A.format,this.internalFormat=A.internalFormat,this.type=A.type,this.offset.copy(A.offset),this.repeat.copy(A.repeat),this.center.copy(A.center),this.rotation=A.rotation,this.matrixAutoUpdate=A.matrixAutoUpdate,this.matrix.copy(A.matrix),this.generateMipmaps=A.generateMipmaps,this.premultiplyAlpha=A.premultiplyAlpha,this.flipY=A.flipY,this.unpackAlignment=A.unpackAlignment,this.encoding=A.encoding,this},toJSON:function(A){var t=void 0===A||"string"==typeof A;if(!t&&void 0!==A.textures[this.uuid])return A.textures[this.uuid];var e={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){var i=this.image;if(void 0===i.uuid&&(i.uuid=Me.generateUUID()),!t&&void 0===A.images[i.uuid]){var n;if(Array.isArray(i)){n=[];for(var I=0,r=i.length;I1)switch(this.wrapS){case NA:A.x=A.x-Math.floor(A.x);break;case dA:A.x=A.x<0?0:1;break;case yA:1===Math.abs(Math.floor(A.x)%2)?A.x=Math.ceil(A.x)-A.x:A.x=A.x-Math.floor(A.x)}if(A.y<0||A.y>1)switch(this.wrapT){case NA:A.y=A.y-Math.floor(A.y);break;case dA:A.y=A.y<0?0:1;break;case yA:1===Math.abs(Math.floor(A.y)%2)?A.y=Math.ceil(A.y)-A.y:A.y=A.y-Math.floor(A.y)}return this.flipY&&(A.y=1-A.y),A}}),Object.defineProperty(Ce.prototype,"needsUpdate",{set:function(A){!0===A&&this.version++}}),Object.defineProperties(Te.prototype,{width:{get:function(){return this.z},set:function(A){this.z=A}},height:{get:function(){return this.w},set:function(A){this.w=A}}}),Object.assign(Te.prototype,{isVector4:!0,set:function(A,t,e,i){return this.x=A,this.y=t,this.z=e,this.w=i,this},setScalar:function(A){return this.x=A,this.y=A,this.z=A,this.w=A,this},setX:function(A){return this.x=A,this},setY:function(A){return this.y=A,this},setZ:function(A){return this.z=A,this},setW:function(A){return this.w=A,this},setComponent:function(A,t){switch(A){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+A)}return this},getComponent:function(A){switch(A){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+A)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(A){return this.x=A.x,this.y=A.y,this.z=A.z,this.w=void 0!==A.w?A.w:1,this},add:function(A,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(A,t)):(this.x+=A.x,this.y+=A.y,this.z+=A.z,this.w+=A.w,this)},addScalar:function(A){return this.x+=A,this.y+=A,this.z+=A,this.w+=A,this},addVectors:function(A,t){return this.x=A.x+t.x,this.y=A.y+t.y,this.z=A.z+t.z,this.w=A.w+t.w,this},addScaledVector:function(A,t){return this.x+=A.x*t,this.y+=A.y*t,this.z+=A.z*t,this.w+=A.w*t,this},sub:function(A,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(A,t)):(this.x-=A.x,this.y-=A.y,this.z-=A.z,this.w-=A.w,this)},subScalar:function(A){return this.x-=A,this.y-=A,this.z-=A,this.w-=A,this},subVectors:function(A,t){return this.x=A.x-t.x,this.y=A.y-t.y,this.z=A.z-t.z,this.w=A.w-t.w,this},multiplyScalar:function(A){return this.x*=A,this.y*=A,this.z*=A,this.w*=A,this},applyMatrix4:function(A){var t=this.x,e=this.y,i=this.z,n=this.w,I=A.elements;return this.x=I[0]*t+I[4]*e+I[8]*i+I[12]*n,this.y=I[1]*t+I[5]*e+I[9]*i+I[13]*n,this.z=I[2]*t+I[6]*e+I[10]*i+I[14]*n,this.w=I[3]*t+I[7]*e+I[11]*i+I[15]*n,this},divideScalar:function(A){return this.multiplyScalar(1/A)},setAxisAngleFromQuaternion:function(A){this.w=2*Math.acos(A.w);var t=Math.sqrt(1-A.w*A.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=A.x/t,this.y=A.y/t,this.z=A.z/t),this},setAxisAngleFromRotationMatrix:function(A){var t,e,i,n,I=.01,r=.1,o=A.elements,g=o[0],a=o[4],M=o[8],s=o[1],c=o[5],u=o[9],l=o[2],C=o[6],T=o[10];if(Math.abs(a-s)N&&h>d?hd?N=0?1:-1,N=1-T*T;if(N>Number.EPSILON){var d=Math.sqrt(N),y=Math.atan2(d,T*h);C=Math.sin(C*y)/d,r=Math.sin(r*y)/d}var E=r*h;if(o=o*C+s*E,g=g*C+c*E,a=a*C+u*E,M=M*C+l*E,C===1-r){var D=1/Math.sqrt(o*o+g*g+a*a+M*M);o*=D,g*=D,a*=D,M*=D}}A[t]=o,A[t+1]=g,A[t+2]=a,A[t+3]=M},multiplyQuaternionsFlat:function(A,t,e,i,n,I){var r=e[i],o=e[i+1],g=e[i+2],a=e[i+3],M=n[I],s=n[I+1],c=n[I+2],u=n[I+3];return A[t]=r*u+a*M+o*c-g*s,A[t+1]=o*u+a*s+g*M-r*c,A[t+2]=g*u+a*c+r*s-o*M,A[t+3]=a*u-r*M-o*s-g*c,A}}),Object.defineProperties(de.prototype,{x:{get:function(){return this._x},set:function(A){this._x=A,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(A){this._y=A,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(A){this._z=A,this._onChangeCallback()}},w:{get:function(){return this._w},set:function(A){this._w=A,this._onChangeCallback()}}}),Object.assign(de.prototype,{isQuaternion:!0,set:function(A,t,e,i){return this._x=A,this._y=t,this._z=e,this._w=i,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(A){return this._x=A.x,this._y=A.y,this._z=A.z,this._w=A.w,this._onChangeCallback(),this},setFromEuler:function(A,t){if(!A||!A.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var e=A._x,i=A._y,n=A._z,I=A.order,r=Math.cos,o=Math.sin,g=r(e/2),a=r(i/2),M=r(n/2),s=o(e/2),c=o(i/2),u=o(n/2);switch(I){case"XYZ":this._x=s*a*M+g*c*u,this._y=g*c*M-s*a*u,this._z=g*a*u+s*c*M,this._w=g*a*M-s*c*u;break;case"YXZ":this._x=s*a*M+g*c*u,this._y=g*c*M-s*a*u,this._z=g*a*u-s*c*M,this._w=g*a*M+s*c*u;break;case"ZXY":this._x=s*a*M-g*c*u,this._y=g*c*M+s*a*u,this._z=g*a*u+s*c*M,this._w=g*a*M-s*c*u;break;case"ZYX":this._x=s*a*M-g*c*u,this._y=g*c*M+s*a*u,this._z=g*a*u-s*c*M,this._w=g*a*M+s*c*u;break;case"YZX":this._x=s*a*M+g*c*u,this._y=g*c*M+s*a*u,this._z=g*a*u-s*c*M,this._w=g*a*M-s*c*u;break;case"XZY":this._x=s*a*M-g*c*u,this._y=g*c*M-s*a*u,this._z=g*a*u+s*c*M,this._w=g*a*M+s*c*u;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+I)}return!1!==t&&this._onChangeCallback(),this},setFromAxisAngle:function(A,t){var e=t/2,i=Math.sin(e);return this._x=A.x*i,this._y=A.y*i,this._z=A.z*i,this._w=Math.cos(e),this._onChangeCallback(),this},setFromRotationMatrix:function(A){var t=A.elements,e=t[0],i=t[4],n=t[8],I=t[1],r=t[5],o=t[9],g=t[2],a=t[6],M=t[10],s=e+r+M;if(s>0){var c=.5/Math.sqrt(s+1);this._w=.25/c,this._x=(a-o)*c,this._y=(n-g)*c,this._z=(I-i)*c}else if(e>r&&e>M){var u=2*Math.sqrt(1+e-r-M);this._w=(a-o)/u,this._x=.25*u,this._y=(i+I)/u,this._z=(n+g)/u}else if(r>M){var l=2*Math.sqrt(1+r-e-M);this._w=(n-g)/l,this._x=(i+I)/l,this._y=.25*l,this._z=(o+a)/l}else{var C=2*Math.sqrt(1+M-e-r);this._w=(I-i)/C,this._x=(n+g)/C,this._y=(o+a)/C,this._z=.25*C}return this._onChangeCallback(),this},setFromUnitVectors:function(A,t){var e=A.dot(t)+1;return e<1e-6?(e=0,Math.abs(A.x)>Math.abs(A.z)?(this._x=-A.y,this._y=A.x,this._z=0,this._w=e):(this._x=0,this._y=-A.z,this._z=A.y,this._w=e)):(this._x=A.y*t.z-A.z*t.y,this._y=A.z*t.x-A.x*t.z,this._z=A.x*t.y-A.y*t.x,this._w=e),this.normalize()},angleTo:function(A){return 2*Math.acos(Math.abs(Me.clamp(this.dot(A),-1,1)))},rotateTowards:function(A,t){var e=this.angleTo(A);if(0===e)return this;var i=Math.min(1,t/e);return this.slerp(A,i),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},dot:function(A){return this._x*A._x+this._y*A._y+this._z*A._z+this._w*A._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var A=this.length();return 0===A?(this._x=0,this._y=0,this._z=0,this._w=1):(A=1/A,this._x=this._x*A,this._y=this._y*A,this._z=this._z*A,this._w=this._w*A),this._onChangeCallback(),this},multiply:function(A,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(A,t)):this.multiplyQuaternions(this,A)},premultiply:function(A){return this.multiplyQuaternions(A,this)},multiplyQuaternions:function(A,t){var e=A._x,i=A._y,n=A._z,I=A._w,r=t._x,o=t._y,g=t._z,a=t._w;return this._x=e*a+I*r+i*g-n*o,this._y=i*a+I*o+n*r-e*g,this._z=n*a+I*g+e*o-i*r,this._w=I*a-e*r-i*o-n*g,this._onChangeCallback(),this},slerp:function(A,t){if(0===t)return this;if(1===t)return this.copy(A);var e=this._x,i=this._y,n=this._z,I=this._w,r=I*A._w+e*A._x+i*A._y+n*A._z;if(r<0?(this._w=-A._w,this._x=-A._x,this._y=-A._y,this._z=-A._z,r=-r):this.copy(A),r>=1)return this._w=I,this._x=e,this._y=i,this._z=n,this;var o=1-r*r;if(o<=Number.EPSILON){var g=1-t;return this._w=g*I+t*this._w,this._x=g*e+t*this._x,this._y=g*i+t*this._y,this._z=g*n+t*this._z,this.normalize(),this._onChangeCallback(),this}var a=Math.sqrt(o),M=Math.atan2(a,r),s=Math.sin((1-t)*M)/a,c=Math.sin(t*M)/a;return this._w=I*s+this._w*c,this._x=e*s+this._x*c,this._y=i*s+this._y*c,this._z=n*s+this._z*c,this._onChangeCallback(),this},equals:function(A){return A._x===this._x&&A._y===this._y&&A._z===this._z&&A._w===this._w},fromArray:function(A,t){return void 0===t&&(t=0),this._x=A[t],this._y=A[t+1],this._z=A[t+2],this._w=A[t+3],this._onChangeCallback(),this},toArray:function(A,t){return void 0===A&&(A=[]),void 0===t&&(t=0),A[t]=this._x,A[t+1]=this._y,A[t+2]=this._z,A[t+3]=this._w,A},fromBufferAttribute:function(A,t){return this._x=A.getX(t),this._y=A.getY(t),this._z=A.getZ(t),this._w=A.getW(t),this},_onChange:function(A){return this._onChangeCallback=A,this},_onChangeCallback:function(){}});var ye=new De,Ee=new de;function De(A,t,e){void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e=0),this.x=A,this.y=t,this.z=e}Object.assign(De.prototype,{isVector3:!0,set:function(A,t,e){return this.x=A,this.y=t,this.z=e,this},setScalar:function(A){return this.x=A,this.y=A,this.z=A,this},setX:function(A){return this.x=A,this},setY:function(A){return this.y=A,this},setZ:function(A){return this.z=A,this},setComponent:function(A,t){switch(A){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+A)}return this},getComponent:function(A){switch(A){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+A)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(A){return this.x=A.x,this.y=A.y,this.z=A.z,this},add:function(A,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(A,t)):(this.x+=A.x,this.y+=A.y,this.z+=A.z,this)},addScalar:function(A){return this.x+=A,this.y+=A,this.z+=A,this},addVectors:function(A,t){return this.x=A.x+t.x,this.y=A.y+t.y,this.z=A.z+t.z,this},addScaledVector:function(A,t){return this.x+=A.x*t,this.y+=A.y*t,this.z+=A.z*t,this},sub:function(A,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(A,t)):(this.x-=A.x,this.y-=A.y,this.z-=A.z,this)},subScalar:function(A){return this.x-=A,this.y-=A,this.z-=A,this},subVectors:function(A,t){return this.x=A.x-t.x,this.y=A.y-t.y,this.z=A.z-t.z,this},multiply:function(A,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(A,t)):(this.x*=A.x,this.y*=A.y,this.z*=A.z,this)},multiplyScalar:function(A){return this.x*=A,this.y*=A,this.z*=A,this},multiplyVectors:function(A,t){return this.x=A.x*t.x,this.y=A.y*t.y,this.z=A.z*t.z,this},applyEuler:function(A){return A&&A.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Ee.setFromEuler(A))},applyAxisAngle:function(A,t){return this.applyQuaternion(Ee.setFromAxisAngle(A,t))},applyMatrix3:function(A){var t=this.x,e=this.y,i=this.z,n=A.elements;return this.x=n[0]*t+n[3]*e+n[6]*i,this.y=n[1]*t+n[4]*e+n[7]*i,this.z=n[2]*t+n[5]*e+n[8]*i,this},applyNormalMatrix:function(A){return this.applyMatrix3(A).normalize()},applyMatrix4:function(A){var t=this.x,e=this.y,i=this.z,n=A.elements,I=1/(n[3]*t+n[7]*e+n[11]*i+n[15]);return this.x=(n[0]*t+n[4]*e+n[8]*i+n[12])*I,this.y=(n[1]*t+n[5]*e+n[9]*i+n[13])*I,this.z=(n[2]*t+n[6]*e+n[10]*i+n[14])*I,this},applyQuaternion:function(A){var t=this.x,e=this.y,i=this.z,n=A.x,I=A.y,r=A.z,o=A.w,g=o*t+I*i-r*e,a=o*e+r*t-n*i,M=o*i+n*e-I*t,s=-n*t-I*e-r*i;return this.x=g*o+s*-n+a*-r-M*-I,this.y=a*o+s*-I+M*-n-g*-r,this.z=M*o+s*-r+g*-I-a*-n,this},project:function(A){return this.applyMatrix4(A.matrixWorldInverse).applyMatrix4(A.projectionMatrix)},unproject:function(A){return this.applyMatrix4(A.projectionMatrixInverse).applyMatrix4(A.matrixWorld)},transformDirection:function(A){var t=this.x,e=this.y,i=this.z,n=A.elements;return this.x=n[0]*t+n[4]*e+n[8]*i,this.y=n[1]*t+n[5]*e+n[9]*i,this.z=n[2]*t+n[6]*e+n[10]*i,this.normalize()},divide:function(A){return this.x/=A.x,this.y/=A.y,this.z/=A.z,this},divideScalar:function(A){return this.multiplyScalar(1/A)},min:function(A){return this.x=Math.min(this.x,A.x),this.y=Math.min(this.y,A.y),this.z=Math.min(this.z,A.z),this},max:function(A){return this.x=Math.max(this.x,A.x),this.y=Math.max(this.y,A.y),this.z=Math.max(this.z,A.z),this},clamp:function(A,t){return this.x=Math.max(A.x,Math.min(t.x,this.x)),this.y=Math.max(A.y,Math.min(t.y,this.y)),this.z=Math.max(A.z,Math.min(t.z,this.z)),this},clampScalar:function(A,t){return this.x=Math.max(A,Math.min(t,this.x)),this.y=Math.max(A,Math.min(t,this.y)),this.z=Math.max(A,Math.min(t,this.z)),this},clampLength:function(A,t){var e=this.length();return this.divideScalar(e||1).multiplyScalar(Math.max(A,Math.min(t,e)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(A){return this.x*A.x+this.y*A.y+this.z*A.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(A){return this.normalize().multiplyScalar(A)},lerp:function(A,t){return this.x+=(A.x-this.x)*t,this.y+=(A.y-this.y)*t,this.z+=(A.z-this.z)*t,this},lerpVectors:function(A,t,e){return this.x=A.x+(t.x-A.x)*e,this.y=A.y+(t.y-A.y)*e,this.z=A.z+(t.z-A.z)*e,this},cross:function(A,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(A,t)):this.crossVectors(this,A)},crossVectors:function(A,t){var e=A.x,i=A.y,n=A.z,I=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*I-e*o,this.z=e*r-i*I,this},projectOnVector:function(A){var t=A.lengthSq();if(0===t)return this.set(0,0,0);var e=A.dot(this)/t;return this.copy(A).multiplyScalar(e)},projectOnPlane:function(A){return ye.copy(this).projectOnVector(A),this.sub(ye)},reflect:function(A){return this.sub(ye.copy(A).multiplyScalar(2*this.dot(A)))},angleTo:function(A){var t=Math.sqrt(this.lengthSq()*A.lengthSq());if(0===t)return Math.PI/2;var e=this.dot(A)/t;return Math.acos(Me.clamp(e,-1,1))},distanceTo:function(A){return Math.sqrt(this.distanceToSquared(A))},distanceToSquared:function(A){var t=this.x-A.x,e=this.y-A.y,i=this.z-A.z;return t*t+e*e+i*i},manhattanDistanceTo:function(A){return Math.abs(this.x-A.x)+Math.abs(this.y-A.y)+Math.abs(this.z-A.z)},setFromSpherical:function(A){return this.setFromSphericalCoords(A.radius,A.phi,A.theta)},setFromSphericalCoords:function(A,t,e){var i=Math.sin(t)*A;return this.x=i*Math.sin(e),this.y=Math.cos(t)*A,this.z=i*Math.cos(e),this},setFromCylindrical:function(A){return this.setFromCylindricalCoords(A.radius,A.theta,A.y)},setFromCylindricalCoords:function(A,t,e){return this.x=A*Math.sin(t),this.y=e,this.z=A*Math.cos(t),this},setFromMatrixPosition:function(A){var t=A.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(A){var t=this.setFromMatrixColumn(A,0).length(),e=this.setFromMatrixColumn(A,1).length(),i=this.setFromMatrixColumn(A,2).length();return this.x=t,this.y=e,this.z=i,this},setFromMatrixColumn:function(A,t){return this.fromArray(A.elements,4*t)},setFromMatrix3Column:function(A,t){return this.fromArray(A.elements,3*t)},equals:function(A){return A.x===this.x&&A.y===this.y&&A.z===this.z},fromArray:function(A,t){return void 0===t&&(t=0),this.x=A[t],this.y=A[t+1],this.z=A[t+2],this},toArray:function(A,t){return void 0===A&&(A=[]),void 0===t&&(t=0),A[t]=this.x,A[t+1]=this.y,A[t+2]=this.z,A},fromBufferAttribute:function(A,t,e){return void 0!==e&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=A.getX(t),this.y=A.getY(t),this.z=A.getZ(t),this},random:function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}});var je=new De,Be=new we,xe=new De(0,0,0),pe=new De(1,1,1),Le=new De,fe=new De,ze=new De;function we(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}Object.assign(we.prototype,{isMatrix4:!0,set:function(A,t,e,i,n,I,r,o,g,a,M,s,c,u,l,C){var T=this.elements;return T[0]=A,T[4]=t,T[8]=e,T[12]=i,T[1]=n,T[5]=I,T[9]=r,T[13]=o,T[2]=g,T[6]=a,T[10]=M,T[14]=s,T[3]=c,T[7]=u,T[11]=l,T[15]=C,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new we).fromArray(this.elements)},copy:function(A){var t=this.elements,e=A.elements;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[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],this},copyPosition:function(A){var t=this.elements,e=A.elements;return t[12]=e[12],t[13]=e[13],t[14]=e[14],this},extractBasis:function(A,t,e){return A.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),e.setFromMatrixColumn(this,2),this},makeBasis:function(A,t,e){return this.set(A.x,t.x,e.x,0,A.y,t.y,e.y,0,A.z,t.z,e.z,0,0,0,0,1),this},extractRotation:function(A){var t=this.elements,e=A.elements,i=1/je.setFromMatrixColumn(A,0).length(),n=1/je.setFromMatrixColumn(A,1).length(),I=1/je.setFromMatrixColumn(A,2).length();return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=0,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=0,t[8]=e[8]*I,t[9]=e[9]*I,t[10]=e[10]*I,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromEuler:function(A){A&&A.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,e=A.x,i=A.y,n=A.z,I=Math.cos(e),r=Math.sin(e),o=Math.cos(i),g=Math.sin(i),a=Math.cos(n),M=Math.sin(n);if("XYZ"===A.order){var s=I*a,c=I*M,u=r*a,l=r*M;t[0]=o*a,t[4]=-o*M,t[8]=g,t[1]=c+u*g,t[5]=s-l*g,t[9]=-r*o,t[2]=l-s*g,t[6]=u+c*g,t[10]=I*o}else if("YXZ"===A.order){var C=o*a,T=o*M,h=g*a,N=g*M;t[0]=C+N*r,t[4]=h*r-T,t[8]=I*g,t[1]=I*M,t[5]=I*a,t[9]=-r,t[2]=T*r-h,t[6]=N+C*r,t[10]=I*o}else if("ZXY"===A.order){var d=o*a,y=o*M,E=g*a,D=g*M;t[0]=d-D*r,t[4]=-I*M,t[8]=E+y*r,t[1]=y+E*r,t[5]=I*a,t[9]=D-d*r,t[2]=-I*g,t[6]=r,t[10]=I*o}else if("ZYX"===A.order){var j=I*a,B=I*M,x=r*a,p=r*M;t[0]=o*a,t[4]=x*g-B,t[8]=j*g+p,t[1]=o*M,t[5]=p*g+j,t[9]=B*g-x,t[2]=-g,t[6]=r*o,t[10]=I*o}else if("YZX"===A.order){var L=I*o,f=I*g,z=r*o,w=r*g;t[0]=o*a,t[4]=w-L*M,t[8]=z*M+f,t[1]=M,t[5]=I*a,t[9]=-r*a,t[2]=-g*a,t[6]=f*M+z,t[10]=L-w*M}else if("XZY"===A.order){var m=I*o,Q=I*g,S=r*o,Y=r*g;t[0]=o*a,t[4]=-M,t[8]=g*a,t[1]=m*M+Y,t[5]=I*a,t[9]=Q*M-S,t[2]=S*M-Q,t[6]=r*a,t[10]=Y*M+m}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromQuaternion:function(A){return this.compose(xe,A,pe)},lookAt:function(A,t,e){var i=this.elements;return ze.subVectors(A,t),0===ze.lengthSq()&&(ze.z=1),ze.normalize(),Le.crossVectors(e,ze),0===Le.lengthSq()&&(1===Math.abs(e.z)?ze.x+=1e-4:ze.z+=1e-4,ze.normalize(),Le.crossVectors(e,ze)),Le.normalize(),fe.crossVectors(ze,Le),i[0]=Le.x,i[4]=fe.x,i[8]=ze.x,i[1]=Le.y,i[5]=fe.y,i[9]=ze.y,i[2]=Le.z,i[6]=fe.z,i[10]=ze.z,this},multiply:function(A,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(A,t)):this.multiplyMatrices(this,A)},premultiply:function(A){return this.multiplyMatrices(A,this)},multiplyMatrices:function(A,t){var e=A.elements,i=t.elements,n=this.elements,I=e[0],r=e[4],o=e[8],g=e[12],a=e[1],M=e[5],s=e[9],c=e[13],u=e[2],l=e[6],C=e[10],T=e[14],h=e[3],N=e[7],d=e[11],y=e[15],E=i[0],D=i[4],j=i[8],B=i[12],x=i[1],p=i[5],L=i[9],f=i[13],z=i[2],w=i[6],m=i[10],Q=i[14],S=i[3],Y=i[7],O=i[11],v=i[15];return n[0]=I*E+r*x+o*z+g*S,n[4]=I*D+r*p+o*w+g*Y,n[8]=I*j+r*L+o*m+g*O,n[12]=I*B+r*f+o*Q+g*v,n[1]=a*E+M*x+s*z+c*S,n[5]=a*D+M*p+s*w+c*Y,n[9]=a*j+M*L+s*m+c*O,n[13]=a*B+M*f+s*Q+c*v,n[2]=u*E+l*x+C*z+T*S,n[6]=u*D+l*p+C*w+T*Y,n[10]=u*j+l*L+C*m+T*O,n[14]=u*B+l*f+C*Q+T*v,n[3]=h*E+N*x+d*z+y*S,n[7]=h*D+N*p+d*w+y*Y,n[11]=h*j+N*L+d*m+y*O,n[15]=h*B+N*f+d*Q+y*v,this},multiplyScalar:function(A){var t=this.elements;return t[0]*=A,t[4]*=A,t[8]*=A,t[12]*=A,t[1]*=A,t[5]*=A,t[9]*=A,t[13]*=A,t[2]*=A,t[6]*=A,t[10]*=A,t[14]*=A,t[3]*=A,t[7]*=A,t[11]*=A,t[15]*=A,this},determinant:function(){var A=this.elements,t=A[0],e=A[4],i=A[8],n=A[12],I=A[1],r=A[5],o=A[9],g=A[13],a=A[2],M=A[6],s=A[10],c=A[14];return A[3]*(+n*o*M-i*g*M-n*r*s+e*g*s+i*r*c-e*o*c)+A[7]*(+t*o*c-t*g*s+n*I*s-i*I*c+i*g*a-n*o*a)+A[11]*(+t*g*M-t*r*c-n*I*M+e*I*c+n*r*a-e*g*a)+A[15]*(-i*r*a-t*o*M+t*r*s+i*I*M-e*I*s+e*o*a)},transpose:function(){var A,t=this.elements;return A=t[1],t[1]=t[4],t[4]=A,A=t[2],t[2]=t[8],t[8]=A,A=t[6],t[6]=t[9],t[9]=A,A=t[3],t[3]=t[12],t[12]=A,A=t[7],t[7]=t[13],t[13]=A,A=t[11],t[11]=t[14],t[14]=A,this},setPosition:function(A,t,e){var i=this.elements;return A.isVector3?(i[12]=A.x,i[13]=A.y,i[14]=A.z):(i[12]=A,i[13]=t,i[14]=e),this},getInverse:function(A,t){void 0!==t&&console.warn("THREE.Matrix4: .getInverse() can no longer be configured to throw on degenerate.");var e=this.elements,i=A.elements,n=i[0],I=i[1],r=i[2],o=i[3],g=i[4],a=i[5],M=i[6],s=i[7],c=i[8],u=i[9],l=i[10],C=i[11],T=i[12],h=i[13],N=i[14],d=i[15],y=u*N*s-h*l*s+h*M*C-a*N*C-u*M*d+a*l*d,E=T*l*s-c*N*s-T*M*C+g*N*C+c*M*d-g*l*d,D=c*h*s-T*u*s+T*a*C-g*h*C-c*a*d+g*u*d,j=T*u*M-c*h*M-T*a*l+g*h*l+c*a*N-g*u*N,B=n*y+I*E+r*D+o*j;if(0===B)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);var x=1/B;return e[0]=y*x,e[1]=(h*l*o-u*N*o-h*r*C+I*N*C+u*r*d-I*l*d)*x,e[2]=(a*N*o-h*M*o+h*r*s-I*N*s-a*r*d+I*M*d)*x,e[3]=(u*M*o-a*l*o-u*r*s+I*l*s+a*r*C-I*M*C)*x,e[4]=E*x,e[5]=(c*N*o-T*l*o+T*r*C-n*N*C-c*r*d+n*l*d)*x,e[6]=(T*M*o-g*N*o-T*r*s+n*N*s+g*r*d-n*M*d)*x,e[7]=(g*l*o-c*M*o+c*r*s-n*l*s-g*r*C+n*M*C)*x,e[8]=D*x,e[9]=(T*u*o-c*h*o-T*I*C+n*h*C+c*I*d-n*u*d)*x,e[10]=(g*h*o-T*a*o+T*I*s-n*h*s-g*I*d+n*a*d)*x,e[11]=(c*a*o-g*u*o-c*I*s+n*u*s+g*I*C-n*a*C)*x,e[12]=j*x,e[13]=(c*h*r-T*u*r+T*I*l-n*h*l-c*I*N+n*u*N)*x,e[14]=(T*a*r-g*h*r-T*I*M+n*h*M+g*I*N-n*a*N)*x,e[15]=(g*u*r-c*a*r+c*I*M-n*u*M-g*I*l+n*a*l)*x,this},scale:function(A){var t=this.elements,e=A.x,i=A.y,n=A.z;return t[0]*=e,t[4]*=i,t[8]*=n,t[1]*=e,t[5]*=i,t[9]*=n,t[2]*=e,t[6]*=i,t[10]*=n,t[3]*=e,t[7]*=i,t[11]*=n,this},getMaxScaleOnAxis:function(){var A=this.elements,t=A[0]*A[0]+A[1]*A[1]+A[2]*A[2],e=A[4]*A[4]+A[5]*A[5]+A[6]*A[6],i=A[8]*A[8]+A[9]*A[9]+A[10]*A[10];return Math.sqrt(Math.max(t,e,i))},makeTranslation:function(A,t,e){return this.set(1,0,0,A,0,1,0,t,0,0,1,e,0,0,0,1),this},makeRotationX:function(A){var t=Math.cos(A),e=Math.sin(A);return this.set(1,0,0,0,0,t,-e,0,0,e,t,0,0,0,0,1),this},makeRotationY:function(A){var t=Math.cos(A),e=Math.sin(A);return this.set(t,0,e,0,0,1,0,0,-e,0,t,0,0,0,0,1),this},makeRotationZ:function(A){var t=Math.cos(A),e=Math.sin(A);return this.set(t,-e,0,0,e,t,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(A,t){var e=Math.cos(t),i=Math.sin(t),n=1-e,I=A.x,r=A.y,o=A.z,g=n*I,a=n*r;return this.set(g*I+e,g*r-i*o,g*o+i*r,0,g*r+i*o,a*r+e,a*o-i*I,0,g*o-i*r,a*o+i*I,n*o*o+e,0,0,0,0,1),this},makeScale:function(A,t,e){return this.set(A,0,0,0,0,t,0,0,0,0,e,0,0,0,0,1),this},makeShear:function(A,t,e){return this.set(1,t,e,0,A,1,e,0,A,t,1,0,0,0,0,1),this},compose:function(A,t,e){var i=this.elements,n=t._x,I=t._y,r=t._z,o=t._w,g=n+n,a=I+I,M=r+r,s=n*g,c=n*a,u=n*M,l=I*a,C=I*M,T=r*M,h=o*g,N=o*a,d=o*M,y=e.x,E=e.y,D=e.z;return i[0]=(1-(l+T))*y,i[1]=(c+d)*y,i[2]=(u-N)*y,i[3]=0,i[4]=(c-d)*E,i[5]=(1-(s+T))*E,i[6]=(C+h)*E,i[7]=0,i[8]=(u+N)*D,i[9]=(C-h)*D,i[10]=(1-(s+l))*D,i[11]=0,i[12]=A.x,i[13]=A.y,i[14]=A.z,i[15]=1,this},decompose:function(A,t,e){var i=this.elements,n=je.set(i[0],i[1],i[2]).length(),I=je.set(i[4],i[5],i[6]).length(),r=je.set(i[8],i[9],i[10]).length();this.determinant()<0&&(n=-n),A.x=i[12],A.y=i[13],A.z=i[14],Be.copy(this);var o=1/n,g=1/I,a=1/r;return Be.elements[0]*=o,Be.elements[1]*=o,Be.elements[2]*=o,Be.elements[4]*=g,Be.elements[5]*=g,Be.elements[6]*=g,Be.elements[8]*=a,Be.elements[9]*=a,Be.elements[10]*=a,t.setFromRotationMatrix(Be),e.x=n,e.y=I,e.z=r,this},makePerspective:function(A,t,e,i,n,I){void 0===I&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var r=this.elements,o=2*n/(t-A),g=2*n/(e-i),a=(t+A)/(t-A),M=(e+i)/(e-i),s=-(I+n)/(I-n),c=-2*I*n/(I-n);return r[0]=o,r[4]=0,r[8]=a,r[12]=0,r[1]=0,r[5]=g,r[9]=M,r[13]=0,r[2]=0,r[6]=0,r[10]=s,r[14]=c,r[3]=0,r[7]=0,r[11]=-1,r[15]=0,this},makeOrthographic:function(A,t,e,i,n,I){var r=this.elements,o=1/(t-A),g=1/(e-i),a=1/(I-n),M=(t+A)*o,s=(e+i)*g,c=(I+n)*a;return r[0]=2*o,r[4]=0,r[8]=0,r[12]=-M,r[1]=0,r[5]=2*g,r[9]=0,r[13]=-s,r[2]=0,r[6]=0,r[10]=-2*a,r[14]=-c,r[3]=0,r[7]=0,r[11]=0,r[15]=1,this},equals:function(A){for(var t=this.elements,e=A.elements,i=0;i<16;i++)if(t[i]!==e[i])return!1;return!0},fromArray:function(A,t){void 0===t&&(t=0);for(var e=0;e<16;e++)this.elements[e]=A[e+t];return this},toArray:function(A,t){void 0===A&&(A=[]),void 0===t&&(t=0);var e=this.elements;return A[t]=e[0],A[t+1]=e[1],A[t+2]=e[2],A[t+3]=e[3],A[t+4]=e[4],A[t+5]=e[5],A[t+6]=e[6],A[t+7]=e[7],A[t+8]=e[8],A[t+9]=e[9],A[t+10]=e[10],A[t+11]=e[11],A[t+12]=e[12],A[t+13]=e[13],A[t+14]=e[14],A[t+15]=e[15],A}});var me=new we,Qe=new de;function Se(A,t,e,i){void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=Se.DefaultOrder),this._x=A,this._y=t,this._z=e,this._order=i}function Ye(){this.mask=1}Se.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],Se.DefaultOrder="XYZ",Object.defineProperties(Se.prototype,{x:{get:function(){return this._x},set:function(A){this._x=A,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(A){this._y=A,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(A){this._z=A,this._onChangeCallback()}},order:{get:function(){return this._order},set:function(A){this._order=A,this._onChangeCallback()}}}),Object.assign(Se.prototype,{isEuler:!0,set:function(A,t,e,i){return this._x=A,this._y=t,this._z=e,this._order=i||this._order,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(A){return this._x=A._x,this._y=A._y,this._z=A._z,this._order=A._order,this._onChangeCallback(),this},setFromRotationMatrix:function(A,t,e){var i=Me.clamp,n=A.elements,I=n[0],r=n[4],o=n[8],g=n[1],a=n[5],M=n[9],s=n[2],c=n[6],u=n[10];switch(t=t||this._order){case"XYZ":this._y=Math.asin(i(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-M,u),this._z=Math.atan2(-r,I)):(this._x=Math.atan2(c,a),this._z=0);break;case"YXZ":this._x=Math.asin(-i(M,-1,1)),Math.abs(M)<.9999999?(this._y=Math.atan2(o,u),this._z=Math.atan2(g,a)):(this._y=Math.atan2(-s,I),this._z=0);break;case"ZXY":this._x=Math.asin(i(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(-s,u),this._z=Math.atan2(-r,a)):(this._y=0,this._z=Math.atan2(g,I));break;case"ZYX":this._y=Math.asin(-i(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(c,u),this._z=Math.atan2(g,I)):(this._x=0,this._z=Math.atan2(-r,a));break;case"YZX":this._z=Math.asin(i(g,-1,1)),Math.abs(g)<.9999999?(this._x=Math.atan2(-M,a),this._y=Math.atan2(-s,I)):(this._x=0,this._y=Math.atan2(o,u));break;case"XZY":this._z=Math.asin(-i(r,-1,1)),Math.abs(r)<.9999999?(this._x=Math.atan2(c,a),this._y=Math.atan2(o,I)):(this._x=Math.atan2(-M,u),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!1!==e&&this._onChangeCallback(),this},setFromQuaternion:function(A,t,e){return me.makeRotationFromQuaternion(A),this.setFromRotationMatrix(me,t,e)},setFromVector3:function(A,t){return this.set(A.x,A.y,A.z,t||this._order)},reorder:function(A){return Qe.setFromEuler(this),this.setFromQuaternion(Qe,A)},equals:function(A){return A._x===this._x&&A._y===this._y&&A._z===this._z&&A._order===this._order},fromArray:function(A){return this._x=A[0],this._y=A[1],this._z=A[2],void 0!==A[3]&&(this._order=A[3]),this._onChangeCallback(),this},toArray:function(A,t){return void 0===A&&(A=[]),void 0===t&&(t=0),A[t]=this._x,A[t+1]=this._y,A[t+2]=this._z,A[t+3]=this._order,A},toVector3:function(A){return A?A.set(this._x,this._y,this._z):new De(this._x,this._y,this._z)},_onChange:function(A){return this._onChangeCallback=A,this},_onChangeCallback:function(){}}),Object.assign(Ye.prototype,{set:function(A){this.mask=1<1){for(var e=0;e1){for(var e=0;e0){i.children=[];for(var u=0;u0&&(e.geometries=l),C.length>0&&(e.materials=C),T.length>0&&(e.textures=T),h.length>0&&(e.images=h),N.length>0&&(e.shapes=N)}return e.object=i,e;function d(A){var t=[];for(var e in A){var i=A[e];delete i.metadata,t.push(i)}return t}},clone:function(A){return(new this.constructor).copy(this,A)},copy:function(A,t){if(void 0===t&&(t=!0),this.name=A.name,this.up.copy(A.up),this.position.copy(A.position),this.quaternion.copy(A.quaternion),this.scale.copy(A.scale),this.matrix.copy(A.matrix),this.matrixWorld.copy(A.matrixWorld),this.matrixAutoUpdate=A.matrixAutoUpdate,this.matrixWorldNeedsUpdate=A.matrixWorldNeedsUpdate,this.layers.mask=A.layers.mask,this.visible=A.visible,this.castShadow=A.castShadow,this.receiveShadow=A.receiveShadow,this.frustumCulled=A.frustumCulled,this.renderOrder=A.renderOrder,this.userData=JSON.parse(JSON.stringify(A.userData)),!0===t)for(var e=0;eo)return!1}return!0}Object.assign(ai.prototype,{isBox3:!0,set:function(A,t){return this.min.copy(A),this.max.copy(t),this},setFromArray:function(A){for(var t=1/0,e=1/0,i=1/0,n=-1/0,I=-1/0,r=-1/0,o=0,g=A.length;on&&(n=a),M>I&&(I=M),s>r&&(r=s)}return this.min.set(t,e,i),this.max.set(n,I,r),this},setFromBufferAttribute:function(A){for(var t=1/0,e=1/0,i=1/0,n=-1/0,I=-1/0,r=-1/0,o=0,g=A.count;on&&(n=a),M>I&&(I=M),s>r&&(r=s)}return this.min.set(t,e,i),this.max.set(n,I,r),this},setFromPoints:function(A){this.makeEmpty();for(var t=0,e=A.length;tthis.max.x||A.ythis.max.y||A.zthis.max.z)},containsBox:function(A){return this.min.x<=A.min.x&&A.max.x<=this.max.x&&this.min.y<=A.min.y&&A.max.y<=this.max.y&&this.min.z<=A.min.z&&A.max.z<=this.max.z},getParameter:function(A,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new De),t.set((A.x-this.min.x)/(this.max.x-this.min.x),(A.y-this.min.y)/(this.max.y-this.min.y),(A.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(A){return!(A.max.xthis.max.x||A.max.ythis.max.y||A.max.zthis.max.z)},intersectsSphere:function(A){return this.clampPoint(A.center,_e),_e.distanceToSquared(A.center)<=A.radius*A.radius},intersectsPlane:function(A){var t,e;return A.normal.x>0?(t=A.normal.x*this.min.x,e=A.normal.x*this.max.x):(t=A.normal.x*this.max.x,e=A.normal.x*this.min.x),A.normal.y>0?(t+=A.normal.y*this.min.y,e+=A.normal.y*this.max.y):(t+=A.normal.y*this.max.y,e+=A.normal.y*this.min.y),A.normal.z>0?(t+=A.normal.z*this.min.z,e+=A.normal.z*this.max.z):(t+=A.normal.z*this.max.z,e+=A.normal.z*this.min.z),t<=-A.constant&&e>=-A.constant},intersectsTriangle:function(A){if(this.isEmpty())return!1;this.getCenter(Ii),ri.subVectors(this.max,Ii),$e.subVectors(A.a,Ii),Ai.subVectors(A.b,Ii),ti.subVectors(A.c,Ii),ei.subVectors(Ai,$e),ii.subVectors(ti,Ai),ni.subVectors($e,ti);var t=[0,-ei.z,ei.y,0,-ii.z,ii.y,0,-ni.z,ni.y,ei.z,0,-ei.x,ii.z,0,-ii.x,ni.z,0,-ni.x,-ei.y,ei.x,0,-ii.y,ii.x,0,-ni.y,ni.x,0];return!!Mi(t,$e,Ai,ti,ri)&&!!Mi(t=[1,0,0,0,1,0,0,0,1],$e,Ai,ti,ri)&&(oi.crossVectors(ei,ii),Mi(t=[oi.x,oi.y,oi.z],$e,Ai,ti,ri))},clampPoint:function(A,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new De),t.copy(A).clamp(this.min,this.max)},distanceToPoint:function(A){return _e.copy(A).clamp(this.min,this.max).sub(A).length()},getBoundingSphere:function(A){return void 0===A&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(A.center),A.radius=.5*this.getSize(_e).length(),A},intersect:function(A){return this.min.max(A.min),this.max.min(A.max),this.isEmpty()&&this.makeEmpty(),this},union:function(A){return this.min.min(A.min),this.max.max(A.max),this},applyMatrix4:function(A){return this.isEmpty()||(Ke[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(A),Ke[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(A),Ke[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(A),Ke[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(A),Ke[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(A),Ke[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(A),Ke[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(A),Ke[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(A),this.setFromPoints(Ke)),this},translate:function(A){return this.min.add(A),this.max.add(A),this},equals:function(A){return A.min.equals(this.min)&&A.max.equals(this.max)}});var si=new ai;function ci(A,t){this.center=void 0!==A?A:new De,this.radius=void 0!==t?t:-1}Object.assign(ci.prototype,{set:function(A,t){return this.center.copy(A),this.radius=t,this},setFromPoints:function(A,t){var e=this.center;void 0!==t?e.copy(t):si.setFromPoints(A).getCenter(e);for(var i=0,n=0,I=A.length;nthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t},getBoundingBox:function(A){return void 0===A&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),A=new ai),this.isEmpty()?(A.makeEmpty(),A):(A.set(this.center,this.center),A.expandByScalar(this.radius),A)},applyMatrix4:function(A){return this.center.applyMatrix4(A),this.radius=this.radius*A.getMaxScaleOnAxis(),this},translate:function(A){return this.center.add(A),this},equals:function(A){return A.center.equals(this.center)&&A.radius===this.radius}});var ui=new De,li=new De,Ci=new De,Ti=new De,hi=new De,Ni=new De,di=new De;function yi(A,t){this.origin=void 0!==A?A:new De,this.direction=void 0!==t?t:new De(0,0,-1)}Object.assign(yi.prototype,{set:function(A,t){return this.origin.copy(A),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(A){return this.origin.copy(A.origin),this.direction.copy(A.direction),this},at:function(A,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new De),t.copy(this.direction).multiplyScalar(A).add(this.origin)},lookAt:function(A){return this.direction.copy(A).sub(this.origin).normalize(),this},recast:function(A){return this.origin.copy(this.at(A,ui)),this},closestPointToPoint:function(A,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new De),t.subVectors(A,this.origin);var e=t.dot(this.direction);return e<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(e).add(this.origin)},distanceToPoint:function(A){return Math.sqrt(this.distanceSqToPoint(A))},distanceSqToPoint:function(A){var t=ui.subVectors(A,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(A):(ui.copy(this.direction).multiplyScalar(t).add(this.origin),ui.distanceToSquared(A))},distanceSqToSegment:function(A,t,e,i){li.copy(A).add(t).multiplyScalar(.5),Ci.copy(t).sub(A).normalize(),Ti.copy(this.origin).sub(li);var n,I,r,o,g=.5*A.distanceTo(t),a=-this.direction.dot(Ci),M=Ti.dot(this.direction),s=-Ti.dot(Ci),c=Ti.lengthSq(),u=Math.abs(1-a*a);if(u>0)if(I=a*M-s,o=g*u,(n=a*s-M)>=0)if(I>=-o)if(I<=o){var l=1/u;r=(n*=l)*(n+a*(I*=l)+2*M)+I*(a*n+I+2*s)+c}else I=g,r=-(n=Math.max(0,-(a*I+M)))*n+I*(I+2*s)+c;else I=-g,r=-(n=Math.max(0,-(a*I+M)))*n+I*(I+2*s)+c;else I<=-o?r=-(n=Math.max(0,-(-a*g+M)))*n+(I=n>0?-g:Math.min(Math.max(-g,-s),g))*(I+2*s)+c:I<=o?(n=0,r=(I=Math.min(Math.max(-g,-s),g))*(I+2*s)+c):r=-(n=Math.max(0,-(a*g+M)))*n+(I=n>0?g:Math.min(Math.max(-g,-s),g))*(I+2*s)+c;else I=a>0?-g:g,r=-(n=Math.max(0,-(a*I+M)))*n+I*(I+2*s)+c;return e&&e.copy(this.direction).multiplyScalar(n).add(this.origin),i&&i.copy(Ci).multiplyScalar(I).add(li),r},intersectSphere:function(A,t){ui.subVectors(A.center,this.origin);var e=ui.dot(this.direction),i=ui.dot(ui)-e*e,n=A.radius*A.radius;if(i>n)return null;var I=Math.sqrt(n-i),r=e-I,o=e+I;return r<0&&o<0?null:r<0?this.at(o,t):this.at(r,t)},intersectsSphere:function(A){return this.distanceSqToPoint(A.center)<=A.radius*A.radius},distanceToPlane:function(A){var t=A.normal.dot(this.direction);if(0===t)return 0===A.distanceToPoint(this.origin)?0:null;var e=-(this.origin.dot(A.normal)+A.constant)/t;return e>=0?e:null},intersectPlane:function(A,t){var e=this.distanceToPlane(A);return null===e?null:this.at(e,t)},intersectsPlane:function(A){var t=A.distanceToPoint(this.origin);return 0===t||A.normal.dot(this.direction)*t<0},intersectBox:function(A,t){var e,i,n,I,r,o,g=1/this.direction.x,a=1/this.direction.y,M=1/this.direction.z,s=this.origin;return g>=0?(e=(A.min.x-s.x)*g,i=(A.max.x-s.x)*g):(e=(A.max.x-s.x)*g,i=(A.min.x-s.x)*g),a>=0?(n=(A.min.y-s.y)*a,I=(A.max.y-s.y)*a):(n=(A.max.y-s.y)*a,I=(A.min.y-s.y)*a),e>I||n>i?null:((n>e||e!=e)&&(e=n),(I=0?(r=(A.min.z-s.z)*M,o=(A.max.z-s.z)*M):(r=(A.max.z-s.z)*M,o=(A.min.z-s.z)*M),e>o||r>i?null:((r>e||e!=e)&&(e=r),(o=0?e:i,t)))},intersectsBox:function(A){return null!==this.intersectBox(A,ui)},intersectTriangle:function(A,t,e,i,n){hi.subVectors(t,A),Ni.subVectors(e,A),di.crossVectors(hi,Ni);var I,r=this.direction.dot(di);if(r>0){if(i)return null;I=1}else{if(!(r<0))return null;I=-1,r=-r}Ti.subVectors(this.origin,A);var o=I*this.direction.dot(Ni.crossVectors(Ti,Ni));if(o<0)return null;var g=I*this.direction.dot(hi.cross(Ti));if(g<0)return null;if(o+g>r)return null;var a=-I*Ti.dot(di);return a<0?null:this.at(a/r,n)},applyMatrix4:function(A){return this.origin.applyMatrix4(A),this.direction.transformDirection(A),this},equals:function(A){return A.origin.equals(this.origin)&&A.direction.equals(this.direction)}});var Ei=new De,Di=new De,ji=new ce;function Bi(A,t){this.normal=void 0!==A?A:new De(1,0,0),this.constant=void 0!==t?t:0}Object.assign(Bi.prototype,{isPlane:!0,set:function(A,t){return this.normal.copy(A),this.constant=t,this},setComponents:function(A,t,e,i){return this.normal.set(A,t,e),this.constant=i,this},setFromNormalAndCoplanarPoint:function(A,t){return this.normal.copy(A),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:function(A,t,e){var i=Ei.subVectors(e,t).cross(Di.subVectors(A,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,A),this},clone:function(){return(new this.constructor).copy(this)},copy:function(A){return this.normal.copy(A.normal),this.constant=A.constant,this},normalize:function(){var A=1/this.normal.length();return this.normal.multiplyScalar(A),this.constant*=A,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(A){return this.normal.dot(A)+this.constant},distanceToSphere:function(A){return this.distanceToPoint(A.center)-A.radius},projectPoint:function(A,t){return void 0===t&&(console.warn("THREE.Plane: .projectPoint() target is now required"),t=new De),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(A)).add(A)},intersectLine:function(A,t){void 0===t&&(console.warn("THREE.Plane: .intersectLine() target is now required"),t=new De);var e=A.delta(Ei),i=this.normal.dot(e);if(0===i)return 0===this.distanceToPoint(A.start)?t.copy(A.start):void 0;var n=-(A.start.dot(this.normal)+this.constant)/i;return n<0||n>1?void 0:t.copy(e).multiplyScalar(n).add(A.start)},intersectsLine:function(A){var t=this.distanceToPoint(A.start),e=this.distanceToPoint(A.end);return t<0&&e>0||e<0&&t>0},intersectsBox:function(A){return A.intersectsPlane(this)},intersectsSphere:function(A){return A.intersectsPlane(this)},coplanarPoint:function(A){return void 0===A&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),A=new De),A.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(A,t){var e=t||ji.getNormalMatrix(A),i=this.coplanarPoint(Ei).applyMatrix4(A),n=this.normal.applyMatrix3(e).normalize();return this.constant=-i.dot(n),this},translate:function(A){return this.constant-=A.dot(this.normal),this},equals:function(A){return A.normal.equals(this.normal)&&A.constant===this.constant}});var xi=new De,pi=new De,Li=new De,fi=new De,zi=new De,wi=new De,mi=new De,Qi=new De,Si=new De,Yi=new De;function Oi(A,t,e){this.a=void 0!==A?A:new De,this.b=void 0!==t?t:new De,this.c=void 0!==e?e:new De}Object.assign(Oi,{getNormal:function(A,t,e,i){void 0===i&&(console.warn("THREE.Triangle: .getNormal() target is now required"),i=new De),i.subVectors(e,t),xi.subVectors(A,t),i.cross(xi);var n=i.lengthSq();return n>0?i.multiplyScalar(1/Math.sqrt(n)):i.set(0,0,0)},getBarycoord:function(A,t,e,i,n){xi.subVectors(i,t),pi.subVectors(e,t),Li.subVectors(A,t);var I=xi.dot(xi),r=xi.dot(pi),o=xi.dot(Li),g=pi.dot(pi),a=pi.dot(Li),M=I*g-r*r;if(void 0===n&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),n=new De),0===M)return n.set(-2,-1,-1);var s=1/M,c=(g*o-r*a)*s,u=(I*a-r*o)*s;return n.set(1-c-u,u,c)},containsPoint:function(A,t,e,i){return Oi.getBarycoord(A,t,e,i,fi),fi.x>=0&&fi.y>=0&&fi.x+fi.y<=1},getUV:function(A,t,e,i,n,I,r,o){return this.getBarycoord(A,t,e,i,fi),o.set(0,0),o.addScaledVector(n,fi.x),o.addScaledVector(I,fi.y),o.addScaledVector(r,fi.z),o},isFrontFacing:function(A,t,e,i){return xi.subVectors(e,t),pi.subVectors(A,t),xi.cross(pi).dot(i)<0}}),Object.assign(Oi.prototype,{set:function(A,t,e){return this.a.copy(A),this.b.copy(t),this.c.copy(e),this},setFromPointsAndIndices:function(A,t,e,i){return this.a.copy(A[t]),this.b.copy(A[e]),this.c.copy(A[i]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(A){return this.a.copy(A.a),this.b.copy(A.b),this.c.copy(A.c),this},getArea:function(){return xi.subVectors(this.c,this.b),pi.subVectors(this.a,this.b),.5*xi.cross(pi).length()},getMidpoint:function(A){return void 0===A&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),A=new De),A.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(A){return Oi.getNormal(this.a,this.b,this.c,A)},getPlane:function(A){return void 0===A&&(console.warn("THREE.Triangle: .getPlane() target is now required"),A=new Bi),A.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(A,t){return Oi.getBarycoord(A,this.a,this.b,this.c,t)},getUV:function(A,t,e,i,n){return Oi.getUV(A,this.a,this.b,this.c,t,e,i,n)},containsPoint:function(A){return Oi.containsPoint(A,this.a,this.b,this.c)},isFrontFacing:function(A){return Oi.isFrontFacing(this.a,this.b,this.c,A)},intersectsBox:function(A){return A.intersectsTriangle(this)},closestPointToPoint:function(A,t){void 0===t&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),t=new De);var e,i,n=this.a,I=this.b,r=this.c;zi.subVectors(I,n),wi.subVectors(r,n),Qi.subVectors(A,n);var o=zi.dot(Qi),g=wi.dot(Qi);if(o<=0&&g<=0)return t.copy(n);Si.subVectors(A,I);var a=zi.dot(Si),M=wi.dot(Si);if(a>=0&&M<=a)return t.copy(I);var s=o*M-a*g;if(s<=0&&o>=0&&a<=0)return e=o/(o-a),t.copy(n).addScaledVector(zi,e);Yi.subVectors(A,r);var c=zi.dot(Yi),u=wi.dot(Yi);if(u>=0&&c<=u)return t.copy(r);var l=c*g-o*u;if(l<=0&&g>=0&&u<=0)return i=g/(g-u),t.copy(n).addScaledVector(wi,i);var C=a*u-c*M;if(C<=0&&M-a>=0&&c-u>=0)return mi.subVectors(r,I),i=(M-a)/(M-a+(c-u)),t.copy(I).addScaledVector(mi,i);var T=1/(C+l+s);return e=l*T,i=s*T,t.copy(n).addScaledVector(zi,e).addScaledVector(wi,i)},equals:function(A){return A.a.equals(this.a)&&A.b.equals(this.b)&&A.c.equals(this.c)}});var vi={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},Ui={h:0,s:0,l:0},bi={h:0,s:0,l:0};function Pi(A,t,e){return void 0===t&&void 0===e?this.set(A):this.setRGB(A,t,e)}function ki(A,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?A+6*(t-A)*e:e<.5?t:e<2/3?A+6*(t-A)*(2/3-e):A}function Gi(A){return A<.04045?.0773993808*A:Math.pow(.9478672986*A+.0521327014,2.4)}function Fi(A){return A<.0031308?12.92*A:1.055*Math.pow(A,.41666)-.055}function Ji(A,t,e,i,n,I){this.a=A,this.b=t,this.c=e,this.normal=i&&i.isVector3?i:new De,this.vertexNormals=Array.isArray(i)?i:[],this.color=n&&n.isColor?n:new Pi,this.vertexColors=Array.isArray(n)?n:[],this.materialIndex=void 0!==I?I:0}Object.assign(Pi.prototype,{isColor:!0,r:1,g:1,b:1,set:function(A){return A&&A.isColor?this.copy(A):"number"==typeof A?this.setHex(A):"string"==typeof A&&this.setStyle(A),this},setScalar:function(A){return this.r=A,this.g=A,this.b=A,this},setHex:function(A){return A=Math.floor(A),this.r=(A>>16&255)/255,this.g=(A>>8&255)/255,this.b=(255&A)/255,this},setRGB:function(A,t,e){return this.r=A,this.g=t,this.b=e,this},setHSL:function(A,t,e){if(A=Me.euclideanModulo(A,1),t=Me.clamp(t,0,1),e=Me.clamp(e,0,1),0===t)this.r=this.g=this.b=e;else{var i=e<=.5?e*(1+t):e+t-e*t,n=2*e-i;this.r=ki(n,i,A+1/3),this.g=ki(n,i,A),this.b=ki(n,i,A-1/3)}return this},setStyle:function(A){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+A+" will be ignored.")}var e;if(e=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(A)){var i,n=e[1],I=e[2];switch(n){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(I))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,t(i[5]),this;if(i=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(I))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,t(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(I)){var r=parseFloat(i[1])/360,o=parseInt(i[2],10)/100,g=parseInt(i[3],10)/100;return t(i[5]),this.setHSL(r,o,g)}}}else if(e=/^\#([A-Fa-f0-9]+)$/.exec(A)){var a=e[1],M=a.length;if(3===M)return this.r=parseInt(a.charAt(0)+a.charAt(0),16)/255,this.g=parseInt(a.charAt(1)+a.charAt(1),16)/255,this.b=parseInt(a.charAt(2)+a.charAt(2),16)/255,this;if(6===M)return this.r=parseInt(a.charAt(0)+a.charAt(1),16)/255,this.g=parseInt(a.charAt(2)+a.charAt(3),16)/255,this.b=parseInt(a.charAt(4)+a.charAt(5),16)/255,this}return A&&A.length>0?this.setColorName(A):this},setColorName:function(A){var t=vi[A];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+A),this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(A){return this.r=A.r,this.g=A.g,this.b=A.b,this},copyGammaToLinear:function(A,t){return void 0===t&&(t=2),this.r=Math.pow(A.r,t),this.g=Math.pow(A.g,t),this.b=Math.pow(A.b,t),this},copyLinearToGamma:function(A,t){void 0===t&&(t=2);var e=t>0?1/t:1;return this.r=Math.pow(A.r,e),this.g=Math.pow(A.g,e),this.b=Math.pow(A.b,e),this},convertGammaToLinear:function(A){return this.copyGammaToLinear(this,A),this},convertLinearToGamma:function(A){return this.copyLinearToGamma(this,A),this},copySRGBToLinear:function(A){return this.r=Gi(A.r),this.g=Gi(A.g),this.b=Gi(A.b),this},copyLinearToSRGB:function(A){return this.r=Fi(A.r),this.g=Fi(A.g),this.b=Fi(A.b),this},convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(A){void 0===A&&(console.warn("THREE.Color: .getHSL() target is now required"),A={h:0,s:0,l:0});var t,e,i=this.r,n=this.g,I=this.b,r=Math.max(i,n,I),o=Math.min(i,n,I),g=(o+r)/2;if(o===r)t=0,e=0;else{var a=r-o;switch(e=g<=.5?a/(r+o):a/(2-r-o),r){case i:t=(n-I)/a+(n0&&(e.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(e.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(e.wireframe=this.wireframe),this.wireframeLinewidth>1&&(e.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(e.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(e.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(e.morphTargets=!0),!0===this.morphNormals&&(e.morphNormals=!0),!0===this.skinning&&(e.skinning=!0),!1===this.visible&&(e.visible=!1),!1===this.toneMapped&&(e.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(e.userData=this.userData),t){var n=i(A.textures),I=i(A.images);n.length>0&&(e.textures=n),I.length>0&&(e.images=I)}return e},clone:function(){return(new this.constructor).copy(this)},copy:function(A){this.name=A.name,this.fog=A.fog,this.blending=A.blending,this.side=A.side,this.flatShading=A.flatShading,this.vertexColors=A.vertexColors,this.opacity=A.opacity,this.transparent=A.transparent,this.blendSrc=A.blendSrc,this.blendDst=A.blendDst,this.blendEquation=A.blendEquation,this.blendSrcAlpha=A.blendSrcAlpha,this.blendDstAlpha=A.blendDstAlpha,this.blendEquationAlpha=A.blendEquationAlpha,this.depthFunc=A.depthFunc,this.depthTest=A.depthTest,this.depthWrite=A.depthWrite,this.stencilWriteMask=A.stencilWriteMask,this.stencilFunc=A.stencilFunc,this.stencilRef=A.stencilRef,this.stencilFuncMask=A.stencilFuncMask,this.stencilFail=A.stencilFail,this.stencilZFail=A.stencilZFail,this.stencilZPass=A.stencilZPass,this.stencilWrite=A.stencilWrite;var t=A.clippingPlanes,e=null;if(null!==t){var i=t.length;e=new Array(i);for(var n=0;n!==i;++n)e[n]=t[n].clone()}return this.clippingPlanes=e,this.clipIntersection=A.clipIntersection,this.clipShadows=A.clipShadows,this.shadowSide=A.shadowSide,this.colorWrite=A.colorWrite,this.precision=A.precision,this.polygonOffset=A.polygonOffset,this.polygonOffsetFactor=A.polygonOffsetFactor,this.polygonOffsetUnits=A.polygonOffsetUnits,this.dithering=A.dithering,this.alphaTest=A.alphaTest,this.premultipliedAlpha=A.premultipliedAlpha,this.visible=A.visible,this.toneMapped=A.toneMapped,this.userData=JSON.parse(JSON.stringify(A.userData)),this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Ri.prototype,"needsUpdate",{set:function(A){!0===A&&this.version++}}),Xi.prototype=Object.create(Ri.prototype),Xi.prototype.constructor=Xi,Xi.prototype.isMeshBasicMaterial=!0,Xi.prototype.copy=function(A){return Ri.prototype.copy.call(this,A),this.color.copy(A.color),this.map=A.map,this.lightMap=A.lightMap,this.lightMapIntensity=A.lightMapIntensity,this.aoMap=A.aoMap,this.aoMapIntensity=A.aoMapIntensity,this.specularMap=A.specularMap,this.alphaMap=A.alphaMap,this.envMap=A.envMap,this.combine=A.combine,this.reflectivity=A.reflectivity,this.refractionRatio=A.refractionRatio,this.wireframe=A.wireframe,this.wireframeLinewidth=A.wireframeLinewidth,this.wireframeLinecap=A.wireframeLinecap,this.wireframeLinejoin=A.wireframeLinejoin,this.skinning=A.skinning,this.morphTargets=A.morphTargets,this};var Vi=new De,Wi=new se;function Zi(A,t,e){if(Array.isArray(A))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=A,this.itemSize=t,this.count=void 0!==A?A.length/t:0,this.normalized=!0===e,this.usage=ne,this.updateRange={offset:0,count:-1},this.version=0}function Ki(A,t,e){Zi.call(this,new Int8Array(A),t,e)}function _i(A,t,e){Zi.call(this,new Uint8Array(A),t,e)}function qi(A,t,e){Zi.call(this,new Uint8ClampedArray(A),t,e)}function $i(A,t,e){Zi.call(this,new Int16Array(A),t,e)}function An(A,t,e){Zi.call(this,new Uint16Array(A),t,e)}function tn(A,t,e){Zi.call(this,new Int32Array(A),t,e)}function en(A,t,e){Zi.call(this,new Uint32Array(A),t,e)}function nn(A,t,e){Zi.call(this,new Float32Array(A),t,e)}function In(A,t,e){Zi.call(this,new Float64Array(A),t,e)}function rn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function on(A){if(0===A.length)return-1/0;for(var t=A[0],e=1,i=A.length;et&&(t=A[e]);return t}Object.defineProperty(Zi.prototype,"needsUpdate",{set:function(A){!0===A&&this.version++}}),Object.assign(Zi.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(A){return this.usage=A,this},copy:function(A){return this.name=A.name,this.array=new A.array.constructor(A.array),this.itemSize=A.itemSize,this.count=A.count,this.normalized=A.normalized,this.usage=A.usage,this},copyAt:function(A,t,e){A*=this.itemSize,e*=t.itemSize;for(var i=0,n=this.itemSize;i0,r=n[1]&&n[1].length>0,o=A.morphTargets,g=o.length;if(g>0){t=[];for(var a=0;a0){M=[];for(var u=0;u0&&0===e.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(var N=0;N65535?en:An)(A,1):this.index=A},getAttribute:function(A){return this.attributes[A]},setAttribute:function(A,t){return this.attributes[A]=t,this},deleteAttribute:function(A){return delete this.attributes[A],this},addGroup:function(A,t,e){this.groups.push({start:A,count:t,materialIndex:void 0!==e?e:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(A,t){this.drawRange.start=A,this.drawRange.count=t},applyMatrix4:function(A){var t=this.attributes.position;void 0!==t&&(t.applyMatrix4(A),t.needsUpdate=!0);var e=this.attributes.normal;if(void 0!==e){var i=(new ce).getNormalMatrix(A);e.applyNormalMatrix(i),e.needsUpdate=!0}var n=this.attributes.tangent;return void 0!==n&&(n.transformDirection(A),n.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(A){return an.makeRotationX(A),this.applyMatrix4(an),this},rotateY:function(A){return an.makeRotationY(A),this.applyMatrix4(an),this},rotateZ:function(A){return an.makeRotationZ(A),this.applyMatrix4(an),this},translate:function(A,t,e){return an.makeTranslation(A,t,e),this.applyMatrix4(an),this},scale:function(A,t,e){return an.makeScale(A,t,e),this.applyMatrix4(an),this},lookAt:function(A){return Mn.lookAt(A),Mn.updateMatrix(),this.applyMatrix4(Mn.matrix),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(sn).negate(),this.translate(sn.x,sn.y,sn.z),this},setFromObject:function(A){var t=A.geometry;if(A.isPoints||A.isLine){var e=new nn(3*t.vertices.length,3),i=new nn(3*t.colors.length,3);if(this.setAttribute("position",e.copyVector3sArray(t.vertices)),this.setAttribute("color",i.copyColorsArray(t.colors)),t.lineDistances&&t.lineDistances.length===t.vertices.length){var n=new nn(t.lineDistances.length,1);this.setAttribute("lineDistance",n.copyArray(t.lineDistances))}null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone())}else A.isMesh&&t&&t.isGeometry&&this.fromGeometry(t);return this},setFromPoints:function(A){for(var t=[],e=0,i=A.length;e0){var e=new Float32Array(3*A.normals.length);this.setAttribute("normal",new Zi(e,3).copyVector3sArray(A.normals))}if(A.colors.length>0){var i=new Float32Array(3*A.colors.length);this.setAttribute("color",new Zi(i,3).copyColorsArray(A.colors))}if(A.uvs.length>0){var n=new Float32Array(2*A.uvs.length);this.setAttribute("uv",new Zi(n,2).copyVector2sArray(A.uvs))}if(A.uvs2.length>0){var I=new Float32Array(2*A.uvs2.length);this.setAttribute("uv2",new Zi(I,2).copyVector2sArray(A.uvs2))}for(var r in this.groups=A.groups,A.morphTargets){for(var o=[],g=A.morphTargets[r],a=0,M=g.length;a0){var u=new nn(4*A.skinIndices.length,4);this.setAttribute("skinIndex",u.copyVector4sArray(A.skinIndices))}if(A.skinWeights.length>0){var l=new nn(4*A.skinWeights.length,4);this.setAttribute("skinWeight",l.copyVector4sArray(A.skinWeights))}return null!==A.boundingSphere&&(this.boundingSphere=A.boundingSphere.clone()),null!==A.boundingBox&&(this.boundingBox=A.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new ai);var A=this.attributes.position,t=this.morphAttributes.position;if(void 0!==A){if(this.boundingBox.setFromBufferAttribute(A),t)for(var e=0,i=t.length;e0&&(A.userData=this.userData),void 0!==this.parameters){var t=this.parameters;for(var e in t)void 0!==t[e]&&(A[e]=t[e]);return A}A.data={attributes:{}};var i=this.index;null!==i&&(A.data.index={type:i.array.constructor.name,array:Array.prototype.slice.call(i.array)});var n=this.attributes;for(var I in n){var r=n[I],o=r.toJSON(A.data);""!==r.name&&(o.name=r.name),A.data.attributes[I]=o}var g={},a=!1;for(var M in this.morphAttributes){for(var s=this.morphAttributes[M],c=[],u=0,l=s.length;u0&&(g[M]=c,a=!0)}a&&(A.data.morphAttributes=g,A.data.morphTargetsRelative=this.morphTargetsRelative);var h=this.groups;h.length>0&&(A.data.groups=JSON.parse(JSON.stringify(h)));var N=this.boundingSphere;return null!==N&&(A.data.boundingSphere={center:N.center.toArray(),radius:N.radius}),A},clone:function(){return(new Cn).copy(this)},copy:function(A){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;var t={};this.name=A.name;var e=A.index;null!==e&&this.setIndex(e.clone(t));var i=A.attributes;for(var n in i){var I=i[n];this.setAttribute(n,I.clone(t))}var r=A.morphAttributes;for(var o in r){for(var g=[],a=r[o],M=0,s=a.length;Me.far?null:{distance:g,point:Qn.clone(),object:A}}function On(A,t,e,i,n,I,r,o,g,a,M,s){dn.fromBufferAttribute(n,a),yn.fromBufferAttribute(n,M),En.fromBufferAttribute(n,s);var c=A.morphTargetInfluences;if(t.morphTargets&&I&&c){xn.set(0,0,0),pn.set(0,0,0),Ln.set(0,0,0);for(var u=0,l=I.length;u0){var i=t[e[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var n=0,I=i.length;n0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},raycast:function(A,t){var e,i=this.geometry,n=this.material,I=this.matrixWorld;if(void 0!==n&&(null===i.boundingSphere&&i.computeBoundingSphere(),Nn.copy(i.boundingSphere),Nn.applyMatrix4(I),!1!==A.ray.intersectsSphere(Nn)&&(Tn.getInverse(I),hn.copy(A.ray).applyMatrix4(Tn),null===i.boundingBox||!1!==hn.intersectsBox(i.boundingBox))))if(i.isBufferGeometry){var r=i.index,o=i.attributes.position,g=i.morphAttributes.position,a=i.morphTargetsRelative,M=i.attributes.uv,s=i.attributes.uv2,c=i.groups,u=i.drawRange;if(null!==r)if(Array.isArray(n))for(var l=0,C=c.length;l0&&(v=k);for(var G=0,F=P.length;G0)for(var c=0;c0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){this.computeFaceNormals();for(var A=0,t=this.faces.length;A0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){for(var A=0,t=this.faces.length;A=0;l--){var C=g[l];this.faces.splice(C,1);for(var T=0,h=this.faceVertexUvs.length;T0,h=l.vertexNormals.length>0,N=1!==l.color.r||1!==l.color.g||1!==l.color.b,d=l.vertexColors.length>0,y=0;if(y=B(y,0,0),y=B(y,1,!0),y=B(y,2,!1),y=B(y,3,C),y=B(y,4,T),y=B(y,5,h),y=B(y,6,N),y=B(y,7,d),r.push(y),r.push(l.a,l.b,l.c),r.push(l.materialIndex),C){var E=this.faceVertexUvs[0][u];r.push(L(E[0]),L(E[1]),L(E[2]))}if(T&&r.push(x(l.normal)),h){var D=l.vertexNormals;r.push(x(D[0]),x(D[1]),x(D[2]))}if(N&&r.push(p(l.color)),d){var j=l.vertexColors;r.push(p(j[0]),p(j[1]),p(j[2]))}}function B(A,t,e){return e?A|1<0&&(A.data.colors=a),s.length>0&&(A.data.uvs=[s]),A.data.faces=r,A},clone:function(){return(new kn).copy(this)},copy:function(A){this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=A.name;for(var t=A.vertices,e=0,i=t.length;e0?1:-1,M.push(L.x,L.y,L.z),s.push(w/C),s.push(1-f/T),x+=1}for(var Q=0;Q0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;var n={};for(var I in this.extensions)!0===this.extensions[I]&&(n[I]=!0);return Object.keys(n).length>0&&(t.extensions=n),t},Zn.prototype=Object.assign(Object.create(We.prototype),{constructor:Zn,isCamera:!0,copy:function(A,t){return We.prototype.copy.call(this,A,t),this.matrixWorldInverse.copy(A.matrixWorldInverse),this.projectionMatrix.copy(A.projectionMatrix),this.projectionMatrixInverse.copy(A.projectionMatrixInverse),this},getWorldDirection:function(A){void 0===A&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),A=new De),this.updateMatrixWorld(!0);var t=this.matrixWorld.elements;return A.set(-t[8],-t[9],-t[10]).normalize()},updateMatrixWorld:function(A){We.prototype.updateMatrixWorld.call(this,A),this.matrixWorldInverse.getInverse(this.matrixWorld)},updateWorldMatrix:function(A,t){We.prototype.updateWorldMatrix.call(this,A,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Kn.prototype=Object.assign(Object.create(Zn.prototype),{constructor:Kn,isPerspectiveCamera:!0,copy:function(A,t){return Zn.prototype.copy.call(this,A,t),this.fov=A.fov,this.zoom=A.zoom,this.near=A.near,this.far=A.far,this.focus=A.focus,this.aspect=A.aspect,this.view=null===A.view?null:Object.assign({},A.view),this.filmGauge=A.filmGauge,this.filmOffset=A.filmOffset,this},setFocalLength:function(A){var t=.5*this.getFilmHeight()/A;this.fov=2*Me.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var A=Math.tan(.5*Me.DEG2RAD*this.fov);return.5*this.getFilmHeight()/A},getEffectiveFOV:function(){return 2*Me.RAD2DEG*Math.atan(Math.tan(.5*Me.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(A,t,e,i,n,I){this.aspect=A/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=A,this.view.fullHeight=t,this.view.offsetX=e,this.view.offsetY=i,this.view.width=n,this.view.height=I,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var A=this.near,t=A*Math.tan(.5*Me.DEG2RAD*this.fov)/this.zoom,e=2*t,i=this.aspect*e,n=-.5*i,I=this.view;if(null!==this.view&&this.view.enabled){var r=I.fullWidth,o=I.fullHeight;n+=I.offsetX*i/r,t-=I.offsetY*e/o,i*=I.width/r,e*=I.height/o}var g=this.filmOffset;0!==g&&(n+=A*g/this.getFilmWidth()),this.projectionMatrix.makePerspective(n,n+i,t,t-e,A,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(A){var t=We.prototype.toJSON.call(this,A);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}});var _n=90;function qn(A,t,e){if(We.call(this),this.type="CubeCamera",!0===e.isWebGLCubeRenderTarget){this.renderTarget=e;var i=new Kn(_n,1,A,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new De(1,0,0)),this.add(i);var n=new Kn(_n,1,A,t);n.layers=this.layers,n.up.set(0,-1,0),n.lookAt(new De(-1,0,0)),this.add(n);var I=new Kn(_n,1,A,t);I.layers=this.layers,I.up.set(0,0,1),I.lookAt(new De(0,1,0)),this.add(I);var r=new Kn(_n,1,A,t);r.layers=this.layers,r.up.set(0,0,-1),r.lookAt(new De(0,-1,0)),this.add(r);var o=new Kn(_n,1,A,t);o.layers=this.layers,o.up.set(0,-1,0),o.lookAt(new De(0,0,1)),this.add(o);var g=new Kn(_n,1,A,t);g.layers=this.layers,g.up.set(0,-1,0),g.lookAt(new De(0,0,-1)),this.add(g),this.update=function(A,t){null===this.parent&&this.updateMatrixWorld();var a=A.xr.enabled,M=A.getRenderTarget();A.xr.enabled=!1;var s=e.texture.generateMipmaps;e.texture.generateMipmaps=!1,A.setRenderTarget(e,0),A.render(t,i),A.setRenderTarget(e,1),A.render(t,n),A.setRenderTarget(e,2),A.render(t,I),A.setRenderTarget(e,3),A.render(t,r),A.setRenderTarget(e,4),A.render(t,o),e.texture.generateMipmaps=s,A.setRenderTarget(e,5),A.render(t,g),A.setRenderTarget(M),A.xr.enabled=a},this.clear=function(A,t,i,n){for(var I=A.getRenderTarget(),r=0;r<6;r++)A.setRenderTarget(e,r),A.clear(t,i,n);A.setRenderTarget(I)}}else console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.")}function $n(A,t,e){Number.isInteger(t)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),t=e),he.call(this,A,A,t)}function AI(A,t,e,i,n,I,r,o,g,a,M,s){Ce.call(this,null,I,r,o,g,a,i,n,M,s),this.image={data:A||null,width:t||1,height:e||1},this.magFilter=void 0!==g?g:EA,this.minFilter=void 0!==a?a:EA,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}qn.prototype=Object.create(We.prototype),qn.prototype.constructor=qn,$n.prototype=Object.create(he.prototype),$n.prototype.constructor=$n,$n.prototype.isWebGLCubeRenderTarget=!0,$n.prototype.fromEquirectangularTexture=function(A,t){this.texture.type=t.type,this.texture.format=t.format,this.texture.encoding=t.encoding;var e=new Ze,i={uniforms:{tEquirect:{value:null}},vertexShader:["varying vec3 vWorldDirection;","vec3 transformDirection( in vec3 dir, in mat4 matrix ) {","\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );","}","void main() {","\tvWorldDirection = transformDirection( position, modelMatrix );","\t#include ","\t#include ","}"].join("\n"),fragmentShader:["uniform sampler2D tEquirect;","varying vec3 vWorldDirection;","#include ","void main() {","\tvec3 direction = normalize( vWorldDirection );","\tvec2 sampleUV = equirectUv( direction );","\tgl_FragColor = texture2D( tEquirect, sampleUV );","}"].join("\n")},n=new Wn({name:"CubemapFromEquirect",uniforms:Jn(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:x,blending:L});n.uniforms.tEquirect.value=t;var I=new Sn(new Fn(5,5,5),n);return e.add(I),new qn(1,10,this).update(A,e),I.geometry.dispose(),I.material.dispose(),this},AI.prototype=Object.create(Ce.prototype),AI.prototype.constructor=AI,AI.prototype.isDataTexture=!0;var tI=new ci,eI=new De;function iI(A,t,e,i,n,I){this.planes=[void 0!==A?A:new Bi,void 0!==t?t:new Bi,void 0!==e?e:new Bi,void 0!==i?i:new Bi,void 0!==n?n:new Bi,void 0!==I?I:new Bi]}Object.assign(iI.prototype,{set:function(A,t,e,i,n,I){var r=this.planes;return r[0].copy(A),r[1].copy(t),r[2].copy(e),r[3].copy(i),r[4].copy(n),r[5].copy(I),this},clone:function(){return(new this.constructor).copy(this)},copy:function(A){for(var t=this.planes,e=0;e<6;e++)t[e].copy(A.planes[e]);return this},setFromProjectionMatrix:function(A){var t=this.planes,e=A.elements,i=e[0],n=e[1],I=e[2],r=e[3],o=e[4],g=e[5],a=e[6],M=e[7],s=e[8],c=e[9],u=e[10],l=e[11],C=e[12],T=e[13],h=e[14],N=e[15];return t[0].setComponents(r-i,M-o,l-s,N-C).normalize(),t[1].setComponents(r+i,M+o,l+s,N+C).normalize(),t[2].setComponents(r+n,M+g,l+c,N+T).normalize(),t[3].setComponents(r-n,M-g,l-c,N-T).normalize(),t[4].setComponents(r-I,M-a,l-u,N-h).normalize(),t[5].setComponents(r+I,M+a,l+u,N+h).normalize(),this},intersectsObject:function(A){var t=A.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),tI.copy(t.boundingSphere).applyMatrix4(A.matrixWorld),this.intersectsSphere(tI)},intersectsSprite:function(A){return tI.center.set(0,0,0),tI.radius=.7071067811865476,tI.applyMatrix4(A.matrixWorld),this.intersectsSphere(tI)},intersectsSphere:function(A){for(var t=this.planes,e=A.center,i=-A.radius,n=0;n<6;n++)if(t[n].distanceToPoint(e)0?A.max.x:A.min.x,eI.y=i.normal.y>0?A.max.y:A.min.y,eI.z=i.normal.z>0?A.max.z:A.min.z,i.distanceToPoint(eI)<0)return!1}return!0},containsPoint:function(A){for(var t=this.planes,e=0;e<6;e++)if(t[e].distanceToPoint(A)<0)return!1;return!0}});var nI={common:{diffuse:{value:new Pi(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new ce},uv2Transform:{value:new ce},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new se(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Pi(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new Pi(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new ce}},sprite:{diffuse:{value:new Pi(15658734)},opacity:{value:1},center:{value:new se(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new ce}}};function II(){var A=null,t=!1,e=null,i=null;function n(t,I){e(t,I),i=A.requestAnimationFrame(n)}return{start:function(){!0!==t&&null!==e&&(i=A.requestAnimationFrame(n),t=!0)},stop:function(){A.cancelAnimationFrame(i),t=!1},setAnimationLoop:function(A){e=A},setContext:function(t){A=t}}}function rI(A,t){var e=t.isWebGL2,i=new WeakMap;return{get:function(A){return A.isInterleavedBufferAttribute&&(A=A.data),i.get(A)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);var e=i.get(t);e&&(A.deleteBuffer(e.buffer),i.delete(t))},update:function(t,n){t.isInterleavedBufferAttribute&&(t=t.data);var I=i.get(t);void 0===I?i.set(t,function(t,e){var i=t.array,n=t.usage,I=A.createBuffer();A.bindBuffer(e,I),A.bufferData(e,i,n),t.onUploadCallback();var r=5126;return i instanceof Float32Array?r=5126:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?r=5123:i instanceof Int16Array?r=5122:i instanceof Uint32Array?r=5125:i instanceof Int32Array?r=5124:i instanceof Int8Array?r=5120:i instanceof Uint8Array&&(r=5121),{buffer:I,type:r,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(t,n)):I.version 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_maxMipLevel 8.0\n#define cubeUV_minMipLevel 4.0\n#define cubeUV_maxTileSize 256.0\n#define cubeUV_minTileSize 16.0\nfloat getFace(vec3 direction) {\n vec3 absDirection = abs(direction);\n float face = -1.0;\n if (absDirection.x > absDirection.z) {\n if (absDirection.x > absDirection.y)\n face = direction.x > 0.0 ? 0.0 : 3.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n } else {\n if (absDirection.z > absDirection.y)\n face = direction.z > 0.0 ? 2.0 : 5.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n }\n return face;\n}\nvec2 getUV(vec3 direction, float face) {\n vec2 uv;\n if (face == 0.0) {\n uv = vec2(direction.z, direction.y) / abs(direction.x); } else if (face == 1.0) {\n uv = vec2(-direction.x, -direction.z) / abs(direction.y); } else if (face == 2.0) {\n uv = vec2(-direction.x, direction.y) / abs(direction.z); } else if (face == 3.0) {\n uv = vec2(-direction.z, direction.y) / abs(direction.x); } else if (face == 4.0) {\n uv = vec2(-direction.x, direction.z) / abs(direction.y); } else {\n uv = vec2(direction.x, direction.y) / abs(direction.z); }\n return 0.5 * (uv + 1.0);\n}\nvec3 bilinearCubeUV(sampler2D envMap, vec3 direction, float mipInt) {\n float face = getFace(direction);\n float filterInt = max(cubeUV_minMipLevel - mipInt, 0.0);\n mipInt = max(mipInt, cubeUV_minMipLevel);\n float faceSize = exp2(mipInt);\n float texelSize = 1.0 / (3.0 * cubeUV_maxTileSize);\n vec2 uv = getUV(direction, face) * (faceSize - 1.0);\n vec2 f = fract(uv);\n uv += 0.5 - f;\n if (face > 2.0) {\n uv.y += faceSize;\n face -= 3.0;\n }\n uv.x += face * faceSize;\n if(mipInt < cubeUV_maxMipLevel){\n uv.y += 2.0 * cubeUV_maxTileSize;\n }\n uv.y += filterInt * 2.0 * cubeUV_minTileSize;\n uv.x += 3.0 * max(0.0, cubeUV_maxTileSize - 2.0 * faceSize);\n uv *= texelSize;\n vec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n uv.x += texelSize;\n vec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n uv.y += texelSize;\n vec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n uv.x -= texelSize;\n vec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n vec3 tm = mix(tl, tr, f.x);\n vec3 bm = mix(bl, br, f.x);\n return mix(tm, bm, f.y);\n}\n#define r0 1.0\n#define v0 0.339\n#define m0 -2.0\n#define r1 0.8\n#define v1 0.276\n#define m1 -1.0\n#define r4 0.4\n#define v4 0.046\n#define m4 2.0\n#define r5 0.305\n#define v5 0.016\n#define m5 3.0\n#define r6 0.21\n#define v6 0.0038\n#define m6 4.0\nfloat roughnessToMip(float roughness) {\n float mip = 0.0;\n if (roughness >= r1) {\n mip = (r0 - roughness) * (m1 - m0) / (r0 - r1) + m0;\n } else if (roughness >= r4) {\n mip = (r1 - roughness) * (m4 - m1) / (r1 - r4) + m1;\n } else if (roughness >= r5) {\n mip = (r4 - roughness) * (m5 - m4) / (r4 - r5) + m4;\n } else if (roughness >= r6) {\n mip = (r5 - roughness) * (m6 - m5) / (r5 - r6) + m5;\n } else {\n mip = -2.0 * log2(1.16 * roughness); }\n return mip;\n}\nvec4 textureCubeUV(sampler2D envMap, vec3 sampleDir, float roughness) {\n float mip = clamp(roughnessToMip(roughness), m0, cubeUV_maxMipLevel);\n float mipF = fract(mip);\n float mipInt = floor(mip);\n vec3 color0 = bilinearCubeUV(envMap, sampleDir, mipInt);\n if (mipF == 0.0) {\n return vec4(color0, 1.0);\n } else {\n vec3 color1 = bilinearCubeUV(envMap, sampleDir, mipInt + 1.0);\n return vec4(mix(color0, color1, mipF), 1.0);\n }\n}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\t\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec2 sampleUV = equirectUv( reflectVec );\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t vec3 reflectVec = reflect( -viewDir, normal );\n\t\t reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t vec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV = equirectUv( reflectVec );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) { \n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3\tdiffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"#include \nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include \n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_ENVMAP\n\t#include \n\t#include \n\t#include \n\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSPARENCY\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef TRANSPARENCY\n\tuniform float transparency;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#ifdef TRANSPARENCY\n\t\tdiffuseColor.a *= saturate( 1. - transparency + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) );\n\t#endif\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}"},MI={basic:{uniforms:Hn([nI.common,nI.specularmap,nI.envmap,nI.aomap,nI.lightmap,nI.fog]),vertexShader:aI.meshbasic_vert,fragmentShader:aI.meshbasic_frag},lambert:{uniforms:Hn([nI.common,nI.specularmap,nI.envmap,nI.aomap,nI.lightmap,nI.emissivemap,nI.fog,nI.lights,{emissive:{value:new Pi(0)}}]),vertexShader:aI.meshlambert_vert,fragmentShader:aI.meshlambert_frag},phong:{uniforms:Hn([nI.common,nI.specularmap,nI.envmap,nI.aomap,nI.lightmap,nI.emissivemap,nI.bumpmap,nI.normalmap,nI.displacementmap,nI.fog,nI.lights,{emissive:{value:new Pi(0)},specular:{value:new Pi(1118481)},shininess:{value:30}}]),vertexShader:aI.meshphong_vert,fragmentShader:aI.meshphong_frag},standard:{uniforms:Hn([nI.common,nI.envmap,nI.aomap,nI.lightmap,nI.emissivemap,nI.bumpmap,nI.normalmap,nI.displacementmap,nI.roughnessmap,nI.metalnessmap,nI.fog,nI.lights,{emissive:{value:new Pi(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:aI.meshphysical_vert,fragmentShader:aI.meshphysical_frag},toon:{uniforms:Hn([nI.common,nI.aomap,nI.lightmap,nI.emissivemap,nI.bumpmap,nI.normalmap,nI.displacementmap,nI.gradientmap,nI.fog,nI.lights,{emissive:{value:new Pi(0)}}]),vertexShader:aI.meshtoon_vert,fragmentShader:aI.meshtoon_frag},matcap:{uniforms:Hn([nI.common,nI.bumpmap,nI.normalmap,nI.displacementmap,nI.fog,{matcap:{value:null}}]),vertexShader:aI.meshmatcap_vert,fragmentShader:aI.meshmatcap_frag},points:{uniforms:Hn([nI.points,nI.fog]),vertexShader:aI.points_vert,fragmentShader:aI.points_frag},dashed:{uniforms:Hn([nI.common,nI.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:aI.linedashed_vert,fragmentShader:aI.linedashed_frag},depth:{uniforms:Hn([nI.common,nI.displacementmap]),vertexShader:aI.depth_vert,fragmentShader:aI.depth_frag},normal:{uniforms:Hn([nI.common,nI.bumpmap,nI.normalmap,nI.displacementmap,{opacity:{value:1}}]),vertexShader:aI.normal_vert,fragmentShader:aI.normal_frag},sprite:{uniforms:Hn([nI.sprite,nI.fog]),vertexShader:aI.sprite_vert,fragmentShader:aI.sprite_frag},background:{uniforms:{uvTransform:{value:new ce},t2D:{value:null}},vertexShader:aI.background_vert,fragmentShader:aI.background_frag},cube:{uniforms:Hn([nI.envmap,{opacity:{value:1}}]),vertexShader:aI.cube_vert,fragmentShader:aI.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:aI.equirect_vert,fragmentShader:aI.equirect_frag},distanceRGBA:{uniforms:Hn([nI.common,nI.displacementmap,{referencePosition:{value:new De},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:aI.distanceRGBA_vert,fragmentShader:aI.distanceRGBA_frag},shadow:{uniforms:Hn([nI.lights,nI.fog,{color:{value:new Pi(0)},opacity:{value:1}}]),vertexShader:aI.shadow_vert,fragmentShader:aI.shadow_frag}};function sI(A,t,e,i){var n,I,r=new Pi(0),o=0,g=null,a=0,M=null;function s(A,e){t.buffers.color.setClear(A.r,A.g,A.b,e,i)}return{getClearColor:function(){return r},setClearColor:function(A,t){r.set(A),s(r,o=void 0!==t?t:1)},getClearAlpha:function(){return o},setClearAlpha:function(A){s(r,o=A)},render:function(t,i,c,u){var l=!0===i.isScene?i.background:null,C=A.xr,T=C.getSession&&C.getSession();if(T&&"additive"===T.environmentBlendMode&&(l=null),null===l?s(r,o):l&&l.isColor&&(s(l,1),u=!0),(A.autoClear||u)&&A.clear(A.autoClearColor,A.autoClearDepth,A.autoClearStencil),l&&(l.isCubeTexture||l.isWebGLCubeRenderTarget||l.mapping===TA)){void 0===I&&((I=new Sn(new Fn(1,1,1),new Wn({name:"BackgroundCubeMaterial",uniforms:Jn(MI.cube.uniforms),vertexShader:MI.cube.vertexShader,fragmentShader:MI.cube.fragmentShader,side:x,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),I.geometry.deleteAttribute("uv"),I.onBeforeRender=function(A,t,e){this.matrixWorld.copyPosition(e.matrixWorld)},Object.defineProperty(I.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),e.update(I));var h=l.isWebGLCubeRenderTarget?l.texture:l;I.material.uniforms.envMap.value=h,I.material.uniforms.flipEnvMap.value=h.isCubeTexture?-1:1,g===l&&a===h.version&&M===A.toneMapping||(I.material.needsUpdate=!0,g=l,a=h.version,M=A.toneMapping),t.unshift(I,I.geometry,I.material,0,0,null)}else l&&l.isTexture&&(void 0===n&&((n=new Sn(new gI(2,2),new Wn({name:"BackgroundMaterial",uniforms:Jn(MI.background.uniforms),vertexShader:MI.background.vertexShader,fragmentShader:MI.background.fragmentShader,side:B,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(n.material,"map",{get:function(){return this.uniforms.t2D.value}}),e.update(n)),n.material.uniforms.t2D.value=l,!0===l.matrixAutoUpdate&&l.updateMatrix(),n.material.uniforms.uvTransform.value.copy(l.matrix),g===l&&a===l.version&&M===A.toneMapping||(n.material.needsUpdate=!0,g=l,a=l.version,M=A.toneMapping),t.unshift(n,n.geometry,n.material,0,0,null))}}}function cI(A,t,e,i){var n=A.getParameter(34921),I=i.isWebGL2?null:t.get("OES_vertex_array_object"),r=i.isWebGL2||null!==I,o={},g=c(null),a=g;function M(t){return i.isWebGL2?A.bindVertexArray(t):I.bindVertexArrayOES(t)}function s(t){return i.isWebGL2?A.deleteVertexArray(t):I.deleteVertexArrayOES(t)}function c(A){for(var t=[],e=[],i=[],I=0;I=0){var N=g[s];if(void 0!==N){var d=N.normalized,y=N.itemSize,E=e.get(N);if(void 0===E)continue;var D=E.buffer,j=E.type,B=E.bytesPerElement;if(N.isInterleavedBufferAttribute){var x=N.data,p=x.stride,L=N.offset;x&&x.isInstancedInterleavedBuffer?(C(c,x.meshPerAttribute),void 0===o._maxInstanceCount&&(o._maxInstanceCount=x.meshPerAttribute*x.count)):l(c),A.bindBuffer(34962,D),h(c,y,j,d,p*B,L*B)}else N.isInstancedBufferAttribute?(C(c,N.meshPerAttribute),void 0===o._maxInstanceCount&&(o._maxInstanceCount=N.meshPerAttribute*N.count)):l(c),A.bindBuffer(34962,D),h(c,y,j,d,0,0)}else if("instanceMatrix"===s){var f=e.get(n.instanceMatrix);if(void 0===f)continue;var z=f.buffer,w=f.type;C(c+0,1),C(c+1,1),C(c+2,1),C(c+3,1),A.bindBuffer(34962,z),A.vertexAttribPointer(c+0,4,w,!1,64,0),A.vertexAttribPointer(c+1,4,w,!1,64,16),A.vertexAttribPointer(c+2,4,w,!1,64,32),A.vertexAttribPointer(c+3,4,w,!1,64,48)}else if(void 0!==M){var m=M[s];if(void 0!==m)switch(m.length){case 2:A.vertexAttrib2fv(c,m);break;case 3:A.vertexAttrib3fv(c,m);break;case 4:A.vertexAttrib4fv(c,m);break;default:A.vertexAttrib1fv(c,m)}}}}T()}}(n,g,s,N),null!==d&&A.bindBuffer(34963,e.get(d).buffer))},reset:N,resetDefaultState:d,dispose:function(){for(var A in N(),o){var t=o[A];for(var e in t){var i=t[e];for(var n in i)s(i[n].object),delete i[n];delete t[e]}delete o[A]}},releaseStatesOfGeometry:function(A){if(void 0!==o[A.id]){var t=o[A.id];for(var e in t){var i=t[e];for(var n in i)s(i[n].object),delete i[n];delete t[e]}delete o[A.id]}},releaseStatesOfProgram:function(A){for(var t in o){var e=o[t];if(void 0!==e[A.id]){var i=e[A.id];for(var n in i)s(i[n].object),delete i[n];delete e[A.id]}}},initAttributes:u,enableAttribute:l,disableUnusedAttributes:T}}function uI(A,t,e,i){var n,I=i.isWebGL2;this.setMode=function(A){n=A},this.render=function(t,i){A.drawArrays(n,t,i),e.update(i,n)},this.renderInstances=function(i,r,o,g){if(0!==g){var a,M;if(I)a=A,M="drawArraysInstanced";else if(M="drawArraysInstancedANGLE",null===(a=t.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");a[M](n,r,o,g),e.update(o,n,g)}}}function lI(A,t,e){var i;function n(t){if("highp"===t){if(A.getShaderPrecisionFormat(35633,36338).precision>0&&A.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&A.getShaderPrecisionFormat(35633,36337).precision>0&&A.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}var I="undefined"!=typeof WebGL2RenderingContext&&A instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&A instanceof WebGL2ComputeRenderingContext,r=void 0!==e.precision?e.precision:"highp",o=n(r);o!==r&&(console.warn("THREE.WebGLRenderer:",r,"not supported, using",o,"instead."),r=o);var g=!0===e.logarithmicDepthBuffer,a=A.getParameter(34930),M=A.getParameter(35660),s=A.getParameter(3379),c=A.getParameter(34076),u=A.getParameter(34921),l=A.getParameter(36347),C=A.getParameter(36348),T=A.getParameter(36349),h=M>0,N=I||!!t.get("OES_texture_float");return{isWebGL2:I,getMaxAnisotropy:function(){if(void 0!==i)return i;var e=t.get("EXT_texture_filter_anisotropic");return i=null!==e?A.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:n,precision:r,logarithmicDepthBuffer:g,maxTextures:a,maxVertexTextures:M,maxTextureSize:s,maxCubemapSize:c,maxAttributes:u,maxVertexUniforms:l,maxVaryings:C,maxFragmentUniforms:T,vertexTextures:h,floatFragmentTextures:N,floatVertexTextures:h&&N,maxSamples:I?A.getParameter(36183):0}}function CI(){var A=this,t=null,e=0,i=!1,n=!1,I=new Bi,r=new ce,o={value:null,needsUpdate:!1};function g(){o.value!==t&&(o.value=t,o.needsUpdate=e>0),A.numPlanes=e,A.numIntersection=0}function a(t,e,i,n){var g=null!==t?t.length:0,a=null;if(0!==g){if(a=o.value,!0!==n||null===a){var M=i+4*g,s=e.matrixWorldInverse;r.getNormalMatrix(s),(null===a||a.length65535?en:An)(e,1);d.version=r;var y=I.get(A);y&&t.remove(y),I.set(A,d)}return{get:function(A,t){var i=n.get(t);return i||(t.addEventListener("dispose",r),t.isBufferGeometry?i=t:t.isGeometry&&(void 0===t._bufferGeometry&&(t._bufferGeometry=(new Cn).setFromObject(A)),i=t._bufferGeometry),n.set(t,i),e.memory.geometries++,i)},update:function(A){var e=A.attributes;for(var i in e)t.update(e[i],34962);var n=A.morphAttributes;for(var I in n)for(var r=n[I],o=0,g=r.length;o0)return A;var n=t*e,I=mI[n];if(void 0===I&&(I=new Float32Array(n),mI[n]=I),0!==t){i.toArray(I,0);for(var r=1,o=0;r!==t;++r)o+=e,A[r].toArray(I,o)}return I}function UI(A,t){if(A.length!==t.length)return!1;for(var e=0,i=A.length;e/gm;function Qr(A){return A.replace(mr,Sr)}function Sr(A,t){var e=aI[t];if(void 0===e)throw new Error("Can not resolve #include <"+t+">");return Qr(e)}var Yr=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Or=/#pragma unroll_loop_start[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}[\s]+?#pragma unroll_loop_end/g;function vr(A){return A.replace(Or,br).replace(Yr,Ur)}function Ur(A,t,e,i){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),br(0,t,e,i)}function br(A,t,e,i){for(var n="",I=parseInt(t);I0?A.gammaFactor:1,h=e.isWebGL2?"":function(A){return[A.extensionDerivatives||A.envMapCubeUV||A.bumpMap||A.tangentSpaceNormalMap||A.clearcoatNormalMap||A.flatShading||"physical"===A.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(A.extensionFragDepth||A.logarithmicDepthBuffer)&&A.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",A.extensionDrawBuffers&&A.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(A.extensionShaderTextureLOD||A.envMap)&&A.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(fr).join("\n")}(e),N=function(A){var t=[];for(var e in A){var i=A[e];!1!==i&&t.push("#define "+e+" "+i)}return t.join("\n")}(a),d=g.createProgram();if(e.isRawShaderMaterial?((n=[N].filter(fr).join("\n")).length>0&&(n+="\n"),(I=[h,N].filter(fr).join("\n")).length>0&&(I+="\n")):(n=[Pr(e),"#define SHADER_NAME "+e.shaderName,N,e.instancing?"#define USE_INSTANCING":"",e.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+T,"#define MAX_BONES "+e.maxBones,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+l:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.displacementMap&&e.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors?"#define USE_COLOR":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.flatShading?"#define FLAT_SHADED":"",e.skinning?"#define USE_SKINNING":"",e.useVertexTexture?"#define BONE_TEXTURE":"",e.morphTargets?"#define USE_MORPHTARGETS":"",e.morphNormals&&!1===e.flatShading?"#define USE_MORPHNORMALS":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+c:"",e.sizeAttenuation?"#define USE_SIZEATTENUATION":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(fr).join("\n"),I=[h,Pr(e),"#define SHADER_NAME "+e.shaderName,N,e.alphaTest?"#define ALPHATEST "+e.alphaTest+(e.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+T,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.matcap?"#define USE_MATCAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+u:"",e.envMap?"#define "+l:"",e.envMap?"#define "+C:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.sheen?"#define USE_SHEEN":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors?"#define USE_COLOR":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.gradientMap?"#define USE_GRADIENTMAP":"",e.flatShading?"#define FLAT_SHADED":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+c:"",e.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",e.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(e.extensionShaderTextureLOD||e.envMap)&&e.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==rA?"#define TONE_MAPPING":"",e.toneMapping!==rA?aI.tonemapping_pars_fragment:"",e.toneMapping!==rA?Lr("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",aI.encodings_pars_fragment,e.map?pr("mapTexelToLinear",e.mapEncoding):"",e.matcap?pr("matcapTexelToLinear",e.matcapEncoding):"",e.envMap?pr("envMapTexelToLinear",e.envMapEncoding):"",e.emissiveMap?pr("emissiveMapTexelToLinear",e.emissiveMapEncoding):"",e.lightMap?pr("lightMapTexelToLinear",e.lightMapEncoding):"",("linearToOutputTexel",r=e.outputEncoding,o=Br(r),"vec4 linearToOutputTexel( vec4 value ) { return LinearTo"+o[0]+o[1]+"; }"),e.depthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(fr).join("\n")),M=wr(M=zr(M=Qr(M),e),e),s=wr(s=zr(s=Qr(s),e),e),M=vr(M),s=vr(s),e.isWebGL2&&!e.isRawShaderMaterial){var y=!1,B=/^\s*#version\s+300\s+es\s*\n/;e.isShaderMaterial&&null!==M.match(B)&&null!==s.match(B)&&(y=!0,M=M.replace(B,""),s=s.replace(B,"")),n=["#version 300 es\n","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+n,I=["#version 300 es\n","#define varying in",y?"":"out highp vec4 pc_fragColor;",y?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+I}var x,p,L=I+s,f=Dr(g,35633,n+M),z=Dr(g,35632,L);if(g.attachShader(d,f),g.attachShader(d,z),void 0!==e.index0AttributeName?g.bindAttribLocation(d,0,e.index0AttributeName):!0===e.morphTargets&&g.bindAttribLocation(d,0,"position"),g.linkProgram(d),A.debug.checkShaderErrors){var w=g.getProgramInfoLog(d).trim(),m=g.getShaderInfoLog(f).trim(),Q=g.getShaderInfoLog(z).trim(),S=!0,Y=!0;if(!1===g.getProgramParameter(d,35714)){S=!1;var O=xr(g,f,"vertex"),v=xr(g,z,"fragment");console.error("THREE.WebGLProgram: shader error: ",g.getError(),"35715",g.getProgramParameter(d,35715),"gl.getProgramInfoLog",w,O,v)}else""!==w?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",w):""!==m&&""!==Q||(Y=!1);Y&&(this.diagnostics={runnable:S,programLog:w,vertexShader:{log:m,prefix:n},fragmentShader:{log:Q,prefix:I}})}return g.deleteShader(f),g.deleteShader(z),this.getUniforms=function(){return void 0===x&&(x=new Er(g,d)),x},this.getAttributes=function(){return void 0===p&&(p=function(A,t){for(var e={},i=A.getProgramParameter(t,35721),n=0;n0,maxBones:D,useVertexTexture:o,morphTargets:i.morphTargets,morphNormals:i.morphNormals,maxMorphTargets:A.maxMorphTargets,maxMorphNormals:A.maxMorphNormals,numDirLights:n.directional.length,numPointLights:n.point.length,numSpotLights:n.spot.length,numRectAreaLights:n.rectArea.length,numHemiLights:n.hemi.length,numDirLightShadows:n.directionalShadowMap.length,numPointLightShadows:n.pointShadowMap.length,numSpotLightShadows:n.spotShadowMap.length,numClippingPlanes:C,numClipIntersection:T,dithering:i.dithering,shadowMapEnabled:A.shadowMap.enabled&&c.length>0,shadowMapType:A.shadowMap.type,toneMapping:i.toneMapped?A.toneMapping:rA,physicallyCorrectLights:A.physicallyCorrectLights,premultipliedAlpha:i.premultipliedAlpha,alphaTest:i.alphaTest,doubleSided:i.side===p,flipSided:i.side===x,depthPacking:void 0!==i.depthPacking&&i.depthPacking,index0AttributeName:i.index0AttributeName,extensionDerivatives:i.extensions&&i.extensions.derivatives,extensionFragDepth:i.extensions&&i.extensions.fragDepth,extensionDrawBuffers:i.extensions&&i.extensions.drawBuffers,extensionShaderTextureLOD:i.extensions&&i.extensions.shaderTextureLOD,rendererExtensionFragDepth:I||null!==t.get("EXT_frag_depth"),rendererExtensionDrawBuffers:I||null!==t.get("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:I||null!==t.get("EXT_shader_texture_lod"),customProgramCacheKey:i.customProgramCacheKey()}},getProgramCacheKey:function(t){var e=[];if(t.shaderID?e.push(t.shaderID):(e.push(t.fragmentShader),e.push(t.vertexShader)),void 0!==t.defines)for(var i in t.defines)e.push(i),e.push(t.defines[i]);if(void 0===t.isRawShaderMaterial){for(var n=0;n1&&e.sort(A||Jr),i.length>1&&i.sort(t||Hr)}}}function Xr(){var A=new WeakMap;function t(e){var i=e.target;i.removeEventListener("dispose",t),A.delete(i)}return{get:function(e,i){var n,I=A.get(e);return void 0===I?(n=new Rr,A.set(e,new WeakMap),A.get(e).set(i,n),e.addEventListener("dispose",t)):void 0===(n=I.get(i))&&(n=new Rr,I.set(i,n)),n},dispose:function(){A=new WeakMap}}}function Vr(){var A={};return{get:function(t){if(void 0!==A[t.id])return A[t.id];var e;switch(t.type){case"DirectionalLight":e={direction:new De,color:new Pi};break;case"SpotLight":e={position:new De,direction:new De,color:new Pi,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new De,color:new Pi,distance:0,decay:0};break;case"HemisphereLight":e={direction:new De,skyColor:new Pi,groundColor:new Pi};break;case"RectAreaLight":e={color:new Pi,position:new De,halfWidth:new De,halfHeight:new De}}return A[t.id]=e,e}}}var Wr=0;function Zr(A,t){return(t.castShadow?1:0)-(A.castShadow?1:0)}function Kr(){for(var A,t=new Vr,e=(A={},{get:function(t){if(void 0!==A[t.id])return A[t.id];var e;switch(t.type){case"DirectionalLight":case"SpotLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new se};break;case"PointLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new se,shadowCameraNear:1,shadowCameraFar:1e3}}return A[t.id]=e,e}}),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=0;n<9;n++)i.probe.push(new De);var I=new De,r=new we,o=new we;return{setup:function(A,n,g){for(var a=0,M=0,s=0,c=0;c<9;c++)i.probe[c].set(0,0,0);var u=0,l=0,C=0,T=0,h=0,N=0,d=0,y=0,E=g.matrixWorldInverse;A.sort(Zr);for(var D=0,j=A.length;D0);var l=!1;!0===t.isSkinnedMesh&&(!0===i.skinning?l=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",t)),g=s(u,l,!0===t.isInstancedMesh)}else g=c;if(A.localClippingEnabled&&!0===i.clipShadows&&0!==i.clippingPlanes.length){var C=g.uuid,T=i.uuid,d=a[C];void 0===d&&(d={},a[C]=d);var y=d[T];void 0===y&&(y=g.clone(),d[T]=y),g=y}return g.visible=i.visible,g.wireframe=i.wireframe,g.side=o===j?null!==i.shadowSide?i.shadowSide:i.side:null!==i.shadowSide?i.shadowSide:M[i.side],g.clipShadows=i.clipShadows,g.clippingPlanes=i.clippingPlanes,g.clipIntersection=i.clipIntersection,g.wireframeLinewidth=i.wireframeLinewidth,g.linewidth=i.linewidth,!0===n.isPointLight&&!0===g.isMeshDistanceMaterial&&(g.referencePosition.setFromMatrixPosition(n.matrixWorld),g.nearDistance=I,g.farDistance=r),g}function y(e,n,I,r,o){if(!1!==e.visible){if(e.layers.test(n.layers)&&(e.isMesh||e.isLine||e.isPoints)&&(e.castShadow||e.receiveShadow&&o===j)&&(!e.frustumCulled||i.intersectsObject(e))){e.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,e.matrixWorld);var g=t.update(e),a=e.material;if(Array.isArray(a))for(var M=g.groups,s=0,c=M.length;se||n.y>e)&&(n.x>e&&(I.x=Math.floor(e/d.x),n.x=I.x*d.x,N.mapSize.x=I.x),n.y>e&&(I.y=Math.floor(e/d.y),n.y=I.y*d.y,N.mapSize.y=I.y)),null===N.map&&!N.isPointLightShadow&&this.type===j){var E={minFilter:BA,magFilter:BA,format:GA};N.map=new he(n.x,n.y,E),N.map.texture.name=h.name+".shadowMap",N.mapPass=new he(n.x,n.y,E),N.camera.updateProjectionMatrix()}if(null===N.map){var D={minFilter:EA,magFilter:EA,format:GA};N.map=new he(n.x,n.y,D),N.map.texture.name=h.name+".shadowMap",N.camera.updateProjectionMatrix()}A.setRenderTarget(N.map),A.clear();for(var B=N.getViewportCount(),x=0;x=1):-1!==oA.indexOf("OpenGL ES")&&(rA=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(oA)[1]),IA=rA>=2);var gA=null,aA={},MA=new Te,sA=new Te;function cA(t,e,i){var n=new Uint8Array(4),I=A.createTexture();A.bindTexture(t,I),A.texParameteri(t,10241,9728),A.texParameteri(t,10240,9728);for(var r=0;ri||A.height>i)&&(n=i/Math.max(A.width,A.height)),n<1||!0===t){if("undefined"!=typeof HTMLImageElement&&A instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&A instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&A instanceof ImageBitmap){var I=t?Me.floorPowerOfTwo:Math.floor,r=I(n*A.width),g=I(n*A.height);void 0===o&&(o=C(r,g));var a=e?C(r,g):o;return a.width=r,a.height=g,a.getContext("2d").drawImage(A,0,0,r,g),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+A.width+"x"+A.height+") to ("+r+"x"+g+")."),a}return"data"in A&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+A.width+"x"+A.height+")."),A}return A}function h(A){return Me.isPowerOfTwo(A.width)&&Me.isPowerOfTwo(A.height)}function N(A,t){return A.generateMipmaps&&t&&A.minFilter!==EA&&A.minFilter!==BA}function d(t,e,n,I){A.generateMipmap(t),i.get(e).__maxMipLevel=Math.log(Math.max(n,I))*Math.LOG2E}function y(e,i,n){if(!1===g)return i;if(null!==e){if(void 0!==A[e])return A[e];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+e+"'")}var I=i;return 6403===i&&(5126===n&&(I=33326),5131===n&&(I=33325),5121===n&&(I=33321)),6407===i&&(5126===n&&(I=34837),5131===n&&(I=34843),5121===n&&(I=32849)),6408===i&&(5126===n&&(I=34836),5131===n&&(I=34842),5121===n&&(I=32856)),33325!==I&&33326!==I&&34842!==I&&34836!==I||t.get("EXT_color_buffer_float"),I}function E(A){return A===EA||A===DA||A===jA?9728:9729}function D(t){var e=t.target;e.removeEventListener("dispose",D),function(t){var e=i.get(t);void 0!==e.__webglInit&&(A.deleteTexture(e.__webglTexture),i.remove(t))}(e),e.isVideoTexture&&u.delete(e),r.memory.textures--}function j(t){var e=t.target;e.removeEventListener("dispose",j),function(t){var e=i.get(t),n=i.get(t.texture);if(t){if(void 0!==n.__webglTexture&&A.deleteTexture(n.__webglTexture),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLCubeRenderTarget)for(var I=0;I<6;I++)A.deleteFramebuffer(e.__webglFramebuffer[I]),e.__webglDepthbuffer&&A.deleteRenderbuffer(e.__webglDepthbuffer[I]);else A.deleteFramebuffer(e.__webglFramebuffer),e.__webglDepthbuffer&&A.deleteRenderbuffer(e.__webglDepthbuffer),e.__webglMultisampledFramebuffer&&A.deleteFramebuffer(e.__webglMultisampledFramebuffer),e.__webglColorRenderbuffer&&A.deleteRenderbuffer(e.__webglColorRenderbuffer),e.__webglDepthRenderbuffer&&A.deleteRenderbuffer(e.__webglDepthRenderbuffer);i.remove(t.texture),i.remove(t)}}(e),r.memory.textures--}var B=0;function x(A,t){var n=i.get(A);if(A.isVideoTexture&&function(A){var t=r.render.frame;u.get(A)!==t&&(u.set(A,t),A.update())}(A),A.version>0&&n.__version!==A.version){var I=A.image;if(void 0===I)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==I.complete)return void Q(n,A,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.activeTexture(33984+t),e.bindTexture(3553,n.__webglTexture)}function p(t,n){if(6===t.image.length){var r=i.get(t);if(t.version>0&&r.__version!==t.version){m(r,t),e.activeTexture(33984+n),e.bindTexture(34067,r.__webglTexture),A.pixelStorei(37440,t.flipY);for(var o=t&&(t.isCompressedTexture||t.image[0].isCompressedTexture),a=t.image[0]&&t.image[0].isDataTexture,s=[],c=0;c<6;c++)s[c]=o||a?a?t.image[c].image:t.image[c]:T(t.image[c],!1,!0,M);var u,l=s[0],C=h(l)||g,E=I.convert(t.format),D=I.convert(t.type),j=y(t.internalFormat,E,D);if(w(34067,t,C),o){for(var B=0;B<6;B++){u=s[B].mipmaps;for(var x=0;x1||i.get(I).__currentAnisotropy)&&(A.texParameterf(e,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(I.anisotropy,n.getMaxAnisotropy())),i.get(I).__currentAnisotropy=I.anisotropy)}}function m(t,e){void 0===t.__webglInit&&(t.__webglInit=!0,e.addEventListener("dispose",D),t.__webglTexture=A.createTexture(),r.memory.textures++)}function Q(t,i,n){var r=3553;i.isDataTexture2DArray&&(r=35866),i.isDataTexture3D&&(r=32879),m(t,i),e.activeTexture(33984+n),e.bindTexture(r,t.__webglTexture),A.pixelStorei(37440,i.flipY),A.pixelStorei(37441,i.premultiplyAlpha),A.pixelStorei(3317,i.unpackAlignment);var o,a=function(A){return!g&&(A.wrapS!==dA||A.wrapT!==dA||A.minFilter!==EA&&A.minFilter!==BA)}(i)&&!1===h(i.image),M=T(i.image,a,!1,s),c=h(M)||g,u=I.convert(i.format),l=I.convert(i.type),C=y(i.internalFormat,u,l);w(r,i,c);var E=i.mipmaps;if(i.isDepthTexture)C=6402,g?C=i.type===SA?36012:i.type===QA?33190:i.type===bA?35056:33189:i.type===SA&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===HA&&6402===C&&i.type!==wA&&i.type!==QA&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=wA,l=I.convert(i.type)),i.format===RA&&6402===C&&(C=34041,i.type!==bA&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=bA,l=I.convert(i.type))),e.texImage2D(3553,0,C,M.width,M.height,0,u,l,null);else if(i.isDataTexture)if(E.length>0&&c){for(var D=0,j=E.length;D0&&c){for(var p=0,L=E.length;p=a&&console.warn("THREE.WebGLTextures: Trying to use "+A+" texture units while this GPU supports only "+a),B+=1,A},this.resetTextureUnits=function(){B=0},this.setTexture2D=x,this.setTexture2DArray=function(A,t){var n=i.get(A);A.version>0&&n.__version!==A.version?Q(n,A,t):(e.activeTexture(33984+t),e.bindTexture(35866,n.__webglTexture))},this.setTexture3D=function(A,t){var n=i.get(A);A.version>0&&n.__version!==A.version?Q(n,A,t):(e.activeTexture(33984+t),e.bindTexture(32879,n.__webglTexture))},this.setTextureCube=p,this.setTextureCubeDynamic=L,this.setupRenderTarget=function(t){var n=i.get(t),o=i.get(t.texture);t.addEventListener("dispose",j),o.__webglTexture=A.createTexture(),r.memory.textures++;var a=!0===t.isWebGLCubeRenderTarget,M=!0===t.isWebGLMultisampleRenderTarget,s=h(t)||g;if(!g||t.texture.format!==kA||t.texture.type!==SA&&t.texture.type!==YA||(t.texture.format=GA,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),a){n.__webglFramebuffer=[];for(var c=0;c<6;c++)n.__webglFramebuffer[c]=A.createFramebuffer()}else if(n.__webglFramebuffer=A.createFramebuffer(),M)if(g){n.__webglMultisampledFramebuffer=A.createFramebuffer(),n.__webglColorRenderbuffer=A.createRenderbuffer(),A.bindRenderbuffer(36161,n.__webglColorRenderbuffer);var u=I.convert(t.texture.format),l=I.convert(t.texture.type),C=y(t.texture.internalFormat,u,l),T=O(t);A.renderbufferStorageMultisample(36161,T,C,t.width,t.height),A.bindFramebuffer(36160,n.__webglMultisampledFramebuffer),A.framebufferRenderbuffer(36160,36064,36161,n.__webglColorRenderbuffer),A.bindRenderbuffer(36161,null),t.depthBuffer&&(n.__webglDepthRenderbuffer=A.createRenderbuffer(),Y(n.__webglDepthRenderbuffer,t,!0)),A.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(a){e.bindTexture(34067,o.__webglTexture),w(34067,t.texture,s);for(var E=0;E<6;E++)S(n.__webglFramebuffer[E],t,36064,34069+E);N(t.texture,s)&&d(34067,t.texture,t.width,t.height),e.bindTexture(34067,null)}else e.bindTexture(3553,o.__webglTexture),w(3553,t.texture,s),S(n.__webglFramebuffer,t,36064,3553),N(t.texture,s)&&d(3553,t.texture,t.width,t.height),e.bindTexture(3553,null);t.depthBuffer&&function(t){var e=i.get(t),n=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture){if(n)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,e){if(e&&e.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(A.bindFramebuffer(36160,t),!e.depthTexture||!e.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");i.get(e.depthTexture).__webglTexture&&e.depthTexture.image.width===e.width&&e.depthTexture.image.height===e.height||(e.depthTexture.image.width=e.width,e.depthTexture.image.height=e.height,e.depthTexture.needsUpdate=!0),x(e.depthTexture,0);var n=i.get(e.depthTexture).__webglTexture;if(e.depthTexture.format===HA)A.framebufferTexture2D(36160,36096,3553,n,0);else{if(e.depthTexture.format!==RA)throw new Error("Unknown depthTexture format");A.framebufferTexture2D(36160,33306,3553,n,0)}}(e.__webglFramebuffer,t)}else if(n){e.__webglDepthbuffer=[];for(var I=0;I<6;I++)A.bindFramebuffer(36160,e.__webglFramebuffer[I]),e.__webglDepthbuffer[I]=A.createRenderbuffer(),Y(e.__webglDepthbuffer[I],t,!1)}else A.bindFramebuffer(36160,e.__webglFramebuffer),e.__webglDepthbuffer=A.createRenderbuffer(),Y(e.__webglDepthbuffer,t,!1);A.bindFramebuffer(36160,null)}(t)},this.updateRenderTargetMipmap=function(A){var t=A.texture;if(N(t,h(A)||g)){var n=A.isWebGLCubeRenderTarget?34067:3553,I=i.get(t).__webglTexture;e.bindTexture(n,I),d(n,t,A.width,A.height),e.bindTexture(n,null)}},this.updateMultisampleRenderTarget=function(t){if(t.isWebGLMultisampleRenderTarget)if(g){var e=i.get(t);A.bindFramebuffer(36008,e.__webglMultisampledFramebuffer),A.bindFramebuffer(36009,e.__webglFramebuffer);var n=t.width,I=t.height,r=16384;t.depthBuffer&&(r|=256),t.stencilBuffer&&(r|=1024),A.blitFramebuffer(0,0,n,I,0,0,n,I,r,9728),A.bindFramebuffer(36160,e.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(A,t){A&&A.isWebGLRenderTarget&&(!1===v&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),v=!0),A=A.texture),x(A,t)},this.safeSetTextureCube=function(A,t){A&&A.isWebGLCubeRenderTarget&&(!1===U&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),U=!0),A=A.texture),A&&A.isCubeTexture||Array.isArray(A.image)&&6===A.image.length?p(A,t):L(A,t)}}function ro(A,t,e){var i=e.isWebGL2;return{convert:function(A){var e;if(A===LA)return 5121;if(A===OA)return 32819;if(A===vA)return 32820;if(A===UA)return 33635;if(A===fA)return 5120;if(A===zA)return 5122;if(A===wA)return 5123;if(A===mA)return 5124;if(A===QA)return 5125;if(A===SA)return 5126;if(A===YA)return i?5131:null!==(e=t.get("OES_texture_half_float"))?e.HALF_FLOAT_OES:null;if(A===PA)return 6406;if(A===kA)return 6407;if(A===GA)return 6408;if(A===FA)return 6409;if(A===JA)return 6410;if(A===HA)return 6402;if(A===RA)return 34041;if(A===XA)return 6403;if(A===VA)return 36244;if(A===WA)return 33319;if(A===ZA)return 33320;if(A===KA)return 36248;if(A===_A)return 36249;if(A===qA||A===$A||A===At||A===tt){if(null===(e=t.get("WEBGL_compressed_texture_s3tc")))return null;if(A===qA)return e.COMPRESSED_RGB_S3TC_DXT1_EXT;if(A===$A)return e.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(A===At)return e.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(A===tt)return e.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(A===et||A===it||A===nt||A===It){if(null===(e=t.get("WEBGL_compressed_texture_pvrtc")))return null;if(A===et)return e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(A===it)return e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(A===nt)return e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(A===It)return e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(A===rt)return null!==(e=t.get("WEBGL_compressed_texture_etc1"))?e.COMPRESSED_RGB_ETC1_WEBGL:null;if((A===ot||A===gt)&&null!==(e=t.get("WEBGL_compressed_texture_etc"))){if(A===ot)return e.COMPRESSED_RGB8_ETC2;if(A===gt)return e.COMPRESSED_RGBA8_ETC2_EAC}return A===at||A===Mt||A===st||A===ct||A===ut||A===lt||A===Ct||A===Tt||A===ht||A===Nt||A===dt||A===yt||A===Et||A===Dt||A===Bt||A===xt||A===pt||A===Lt||A===ft||A===zt||A===wt||A===mt||A===Qt||A===St||A===Yt||A===Ot||A===vt||A===Ut?null!==(e=t.get("WEBGL_compressed_texture_astc"))?A:null:A===jt?null!==(e=t.get("EXT_texture_compression_bptc"))?A:null:A===bA?i?34042:null!==(e=t.get("WEBGL_depth_texture"))?e.UNSIGNED_INT_24_8_WEBGL:null:void 0}}}function oo(A){Kn.call(this),this.cameras=A||[]}function go(){We.call(this),this.type="Group"}function ao(){this._targetRay=null,this._grip=null}function Mo(A,t){var e=this,i=null,n=1,I=null,r="local-floor",o=null,g=[],a=new Map,M=new Kn;M.layers.enable(1),M.viewport=new Te;var s=new Kn;s.layers.enable(2),s.viewport=new Te;var c=[M,s],u=new oo;u.layers.enable(1),u.layers.enable(2);var l=null,C=null;function T(A){var t=a.get(A.inputSource);t&&t.dispatchEvent({type:A.type})}function h(){a.forEach((function(A,t){A.disconnect(t)})),a.clear(),A.setFramebuffer(null),A.setRenderTarget(A.getRenderTarget()),B.stop(),e.isPresenting=!1,e.dispatchEvent({type:"sessionend"})}function N(A){I=A,B.setContext(i),B.start(),e.isPresenting=!0,e.dispatchEvent({type:"sessionstart"})}function d(A){for(var t=i.inputSources,e=0;e=0&&A.numSupportedMorphTargets++}if(A.morphNormals){A.numSupportedMorphNormals=0;for(var C=0;C=0&&A.numSupportedMorphNormals++}var T=i.uniforms;(A.isShaderMaterial||A.isRawShaderMaterial)&&!0!==A.clipping||(i.numClippingPlanes=O.numPlanes,i.numIntersection=O.numIntersection,T.clippingPlanes=O.uniform),i.environment=A.isMeshStandardMaterial?t.environment:null,i.fog=t.fog,i.needsLights=function(A){return A.isMeshLambertMaterial||A.isMeshToonMaterial||A.isMeshPhongMaterial||A.isMeshStandardMaterial||A.isShadowMaterial||A.isShaderMaterial&&!0===A.lights}(A),i.lightsStateVersion=r,i.needsLights&&(T.ambientLightColor.value=n.state.ambient,T.lightProbe.value=n.state.probe,T.directionalLights.value=n.state.directional,T.directionalLightShadows.value=n.state.directionalShadow,T.spotLights.value=n.state.spot,T.spotLightShadows.value=n.state.spotShadow,T.rectAreaLights.value=n.state.rectArea,T.pointLights.value=n.state.point,T.pointLightShadows.value=n.state.pointShadow,T.hemisphereLights.value=n.state.hemi,T.directionalShadowMap.value=n.state.directionalShadowMap,T.directionalShadowMatrix.value=n.state.directionalShadowMatrix,T.spotShadowMap.value=n.state.spotShadowMap,T.spotShadowMatrix.value=n.state.spotShadowMatrix,T.pointShadowMap.value=n.state.pointShadowMap,T.pointShadowMatrix.value=n.state.pointShadowMatrix);var h=i.program.getUniforms(),N=Er.seqWithValue(h.seq,T);i.uniformsList=N}function xA(A,t,e,i){!0!==t.isScene&&(t=k),V.resetTextureUnits();var n=t.fog,I=e.isMeshStandardMaterial?t.environment:null,r=null===N?u.outputEncoding:N.texture.encoding,o=X.get(e),g=c.state.lights;if(!0===v&&(!0===U||A!==E)){var a=A===E&&e.id===y;O.setState(e.clippingPlanes,e.clipIntersection,e.clipShadows,A,o,a)}e.version===o.__version?void 0===o.program||e.fog&&o.fog!==n||o.environment!==I||o.needsLights&&o.lightsStateVersion!==g.state.version?BA(e,t,i):void 0===o.numClippingPlanes||o.numClippingPlanes===O.numPlanes&&o.numIntersection===O.numIntersection?o.outputEncoding!==r&&BA(e,t,i):BA(e,t,i):(BA(e,t,i),o.__version=e.version);var M=!1,s=!1,l=!1,C=o.program,T=C.getUniforms(),h=o.uniforms;if(H.useProgram(C.program)&&(M=!0,s=!0,l=!0),e.id!==y&&(y=e.id,s=!0),M||E!==A){if(T.setValue(gA,"projectionMatrix",A.projectionMatrix),J.logarithmicDepthBuffer&&T.setValue(gA,"logDepthBufFC",2/(Math.log(A.far+1)/Math.LN2)),E!==A&&(E=A,s=!0,l=!0),e.isShaderMaterial||e.isMeshPhongMaterial||e.isMeshToonMaterial||e.isMeshStandardMaterial||e.envMap){var d=T.map.cameraPosition;void 0!==d&&d.setValue(gA,P.setFromMatrixPosition(A.matrixWorld))}(e.isMeshPhongMaterial||e.isMeshToonMaterial||e.isMeshLambertMaterial||e.isMeshBasicMaterial||e.isMeshStandardMaterial||e.isShaderMaterial)&&T.setValue(gA,"isOrthographic",!0===A.isOrthographicCamera),(e.isMeshPhongMaterial||e.isMeshToonMaterial||e.isMeshLambertMaterial||e.isMeshBasicMaterial||e.isMeshStandardMaterial||e.isShaderMaterial||e.isShadowMaterial||e.skinning)&&T.setValue(gA,"viewMatrix",A.matrixWorldInverse)}if(e.skinning){T.setOptional(gA,i,"bindMatrix"),T.setOptional(gA,i,"bindMatrixInverse");var D=i.skeleton;if(D){var j=D.bones;if(J.floatVertexTextures){if(void 0===D.boneTexture){var B=Math.sqrt(4*j.length);B=Me.ceilPowerOfTwo(B),B=Math.max(B,4);var x=new Float32Array(B*B*4);x.set(D.boneMatrices);var p=new AI(x,B,B,GA,SA);D.boneMatrices=x,D.boneTexture=p,D.boneTextureSize=B}T.setValue(gA,"boneTexture",D.boneTexture,V),T.setValue(gA,"boneTextureSize",D.boneTextureSize)}else T.setOptional(gA,D,"boneMatrices")}}return(s||o.receiveShadow!==i.receiveShadow)&&(o.receiveShadow=i.receiveShadow,T.setValue(gA,"receiveShadow",i.receiveShadow)),s&&(T.setValue(gA,"toneMappingExposure",u.toneMappingExposure),o.needsLights&&function(A,t){A.ambientLightColor.needsUpdate=t,A.lightProbe.needsUpdate=t,A.directionalLights.needsUpdate=t,A.directionalLightShadows.needsUpdate=t,A.pointLights.needsUpdate=t,A.pointLightShadows.needsUpdate=t,A.spotLights.needsUpdate=t,A.spotLightShadows.needsUpdate=t,A.rectAreaLights.needsUpdate=t,A.hemisphereLights.needsUpdate=t}(h,l),n&&e.fog&&q.refreshFogUniforms(h,n),q.refreshMaterialUniforms(h,e,I,f,L),void 0!==h.ltc_1&&(h.ltc_1.value=nI.LTC_1),void 0!==h.ltc_2&&(h.ltc_2.value=nI.LTC_2),Er.upload(gA,o.uniformsList,h,V)),e.isShaderMaterial&&!0===e.uniformsNeedUpdate&&(Er.upload(gA,o.uniformsList,h,V),e.uniformsNeedUpdate=!1),e.isSpriteMaterial&&T.setValue(gA,"center",i.center),T.setValue(gA,"modelViewMatrix",i.modelViewMatrix),T.setValue(gA,"normalMatrix",i.normalMatrix),T.setValue(gA,"modelMatrix",i.matrixWorld),C}yA.setAnimationLoop((function(A){uA.isPresenting||dA&&dA(A)})),"undefined"!=typeof window&&yA.setContext(window),this.setAnimationLoop=function(A){dA=A,uA.setAnimationLoop(A),null===A?yA.stop():yA.start()},this.render=function(A,t){var e,i;if(void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),e=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),i=arguments[3]),void 0===t||!0===t.isCamera){if(!0!==l){oA.resetDefaultState(),y=-1,E=null,!0===A.autoUpdate&&A.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),!0===uA.enabled&&!0===uA.isPresenting&&(t=uA.getCamera(t)),!0===A.isScene&&A.onBeforeRender(u,A,t,e||N),(c=AA.get(A,t)).init(),b.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),Y.setFromProjectionMatrix(b),U=this.localClippingEnabled,v=O.init(this.clippingPlanes,U,t),(s=$.get(A,t)).init(),EA(A,t,0,u.sortObjects),s.finish(),!0===u.sortObjects&&s.sort(z,w),!0===v&&O.beginShadows();var n=c.state.shadowsArray;lA.render(n,A,t),c.setupLights(t),!0===v&&O.endShadows(),!0===this.info.autoReset&&this.info.reset(),void 0!==e&&this.setRenderTarget(e),tA.render(s,A,t,i);var I=s.opaque,r=s.transparent;I.length>0&&DA(I,A,t),r.length>0&&DA(r,A,t),!0===A.isScene&&A.onAfterRender(u,A,t),null!==N&&(V.updateRenderTargetMipmap(N),V.updateMultisampleRenderTarget(N)),H.buffers.depth.setTest(!0),H.buffers.depth.setMask(!0),H.buffers.color.setMask(!0),H.setPolygonOffset(!1),s=null,c=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.setFramebuffer=function(A){C!==A&&null===N&&gA.bindFramebuffer(36160,A),C=A},this.getActiveCubeFace=function(){return T},this.getActiveMipmapLevel=function(){return h},this.getRenderTarget=function(){return N},this.setRenderTarget=function(A,t,e){N=A,T=t,h=e,A&&void 0===X.get(A).__webglFramebuffer&&V.setupRenderTarget(A);var i=C,n=!1;if(A){var I=X.get(A).__webglFramebuffer;A.isWebGLCubeRenderTarget?(i=I[t||0],n=!0):i=A.isWebGLMultisampleRenderTarget?X.get(A).__webglMultisampledFramebuffer:I,j.copy(A.viewport),B.copy(A.scissor),x=A.scissorTest}else j.copy(m).multiplyScalar(f).floor(),B.copy(Q).multiplyScalar(f).floor(),x=S;if(d!==i&&(gA.bindFramebuffer(36160,i),d=i),H.viewport(j),H.scissor(B),H.setScissorTest(x),n){var r=X.get(A.texture);gA.framebufferTexture2D(36160,36064,34069+(t||0),r.__webglTexture,e||0)}},this.readRenderTargetPixels=function(A,t,e,i,n,I,r){if(A&&A.isWebGLRenderTarget){var o=X.get(A).__webglFramebuffer;if(A.isWebGLCubeRenderTarget&&void 0!==r&&(o=o[r]),o){var g=!1;o!==d&&(gA.bindFramebuffer(36160,o),g=!0);try{var a=A.texture,M=a.format,s=a.type;if(M!==GA&&IA.convert(M)!==gA.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(s===LA||IA.convert(s)===gA.getParameter(35738)||s===SA&&(J.isWebGL2||F.get("OES_texture_float")||F.get("WEBGL_color_buffer_float"))||s===YA&&(J.isWebGL2?F.get("EXT_color_buffer_float"):F.get("EXT_color_buffer_half_float"))))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===gA.checkFramebufferStatus(36160)?t>=0&&t<=A.width-i&&e>=0&&e<=A.height-n&&gA.readPixels(t,e,i,n,IA.convert(M),IA.convert(s),I):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{g&&gA.bindFramebuffer(36160,d)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(A,t,e){void 0===e&&(e=0);var i=Math.pow(2,-e),n=Math.floor(t.image.width*i),I=Math.floor(t.image.height*i),r=IA.convert(t.format);V.setTexture2D(t,0),gA.copyTexImage2D(3553,e,r,A.x,A.y,n,I,0),H.unbindTexture()},this.copyTextureToTexture=function(A,t,e,i){void 0===i&&(i=0);var n=t.image.width,I=t.image.height,r=IA.convert(e.format),o=IA.convert(e.type);V.setTexture2D(e,0),gA.pixelStorei(37440,e.flipY),gA.pixelStorei(37441,e.premultiplyAlpha),gA.pixelStorei(3317,e.unpackAlignment),t.isDataTexture?gA.texSubImage2D(3553,i,A.x,A.y,n,I,r,o,t.image.data):t.isCompressedTexture?gA.compressedTexSubImage2D(3553,i,A.x,A.y,t.mipmaps[0].width,t.mipmaps[0].height,r,t.mipmaps[0].data):gA.texSubImage2D(3553,i,A.x,A.y,r,o,t.image),0===i&&e.generateMipmaps&&gA.generateMipmap(3553),H.unbindTexture()},this.initTexture=function(A){V.setTexture2D(A,0),H.unbindTexture()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function uo(A){co.call(this,A)}function lo(A,t){this.name="",this.color=new Pi(A),this.density=void 0!==t?t:25e-5}function Co(A,t,e){this.name="",this.color=new Pi(A),this.near=void 0!==t?t:1,this.far=void 0!==e?e:1e3}function To(A,t){this.array=A,this.stride=t,this.count=void 0!==A?A.length/t:0,this.usage=ne,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Me.generateUUID()}oo.prototype=Object.assign(Object.create(Kn.prototype),{constructor:oo,isArrayCamera:!0}),go.prototype=Object.assign(Object.create(We.prototype),{constructor:go,isGroup:!0}),Object.assign(ao.prototype,{constructor:ao,getTargetRaySpace:function(){return null===this._targetRay&&(this._targetRay=new go,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1),this._targetRay},getGripSpace:function(){return null===this._grip&&(this._grip=new go,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1),this._grip},dispatchEvent:function(A){return null!==this._targetRay&&this._targetRay.dispatchEvent(A),null!==this._grip&&this._grip.dispatchEvent(A),this},disconnect:function(A){return this.dispatchEvent({type:"disconnected",data:A}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),this},update:function(A,t,e){var i=null,n=null,I=this._targetRay,r=this._grip;return A&&(null!==I&&null!==(i=t.getPose(A.targetRaySpace,e))&&(I.matrix.fromArray(i.transform.matrix),I.matrix.decompose(I.position,I.rotation,I.scale)),null!==r&&A.gripSpace&&null!==(n=t.getPose(A.gripSpace,e))&&(r.matrix.fromArray(n.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale))),null!==I&&(I.visible=null!==i),null!==r&&(r.visible=null!==n),this}}),Object.assign(Mo.prototype,re.prototype),uo.prototype=Object.assign(Object.create(co.prototype),{constructor:uo,isWebGL1Renderer:!0}),Object.assign(lo.prototype,{isFogExp2:!0,clone:function(){return new lo(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}),Object.assign(Co.prototype,{isFog:!0,clone:function(){return new Co(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}),Object.defineProperty(To.prototype,"needsUpdate",{set:function(A){!0===A&&this.version++}}),Object.assign(To.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(A){return this.usage=A,this},copy:function(A){return this.array=new A.array.constructor(A.array),this.count=A.count,this.stride=A.stride,this.usage=A.usage,this},copyAt:function(A,t,e){A*=this.stride,e*=t.stride;for(var i=0,n=this.stride;iA.far||t.push({distance:o,point:Do.clone(),uv:Oi.getUV(Do,fo,zo,wo,mo,Qo,So,new se),face:null,object:this})}},copy:function(A){return We.prototype.copy.call(this,A),void 0!==A.center&&this.center.copy(A.center),this.material=A.material,this}});var vo=new De,Uo=new De;function bo(){We.call(this),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}function Po(A,t){A&&A.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),Sn.call(this,A,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new we,this.bindMatrixInverse=new we}bo.prototype=Object.assign(Object.create(We.prototype),{constructor:bo,isLOD:!0,copy:function(A){We.prototype.copy.call(this,A,!1);for(var t=A.levels,e=0,i=t.length;e0){var e,i;for(e=1,i=t.length;e0){vo.setFromMatrixPosition(this.matrixWorld);var e=A.ray.origin.distanceTo(vo);this.getObjectForDistance(e).raycast(A,t)}},update:function(A){var t=this.levels;if(t.length>1){vo.setFromMatrixPosition(A.matrixWorld),Uo.setFromMatrixPosition(this.matrixWorld);var e,i,n=vo.distanceTo(Uo)/A.zoom;for(t[0].object.visible=!0,e=1,i=t.length;e=t[e].distance;e++)t[e-1].object.visible=!1,t[e].object.visible=!0;for(this._currentLevel=e-1;er)){M.applyMatrix4(this.matrixWorld);var d=A.ray.origin.distanceTo(M);dA.far||t.push({distance:d,point:a.clone().applyMatrix4(this.matrixWorld),index:C,face:null,faceIndex:null,object:this})}}else for(var y=0,E=u.length/3-1;yr)){M.applyMatrix4(this.matrixWorld);var D=A.ray.origin.distanceTo(M);DA.far||t.push({distance:D,point:a.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else if(e.isGeometry)for(var j=e.vertices,B=j.length,x=0;xr)){M.applyMatrix4(this.matrixWorld);var p=A.ray.origin.distanceTo(M);pA.far||t.push({distance:p,point:a.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}},updateMorphTargets:function(){var A=this.geometry;if(A.isBufferGeometry){var t=A.morphAttributes,e=Object.keys(t);if(e.length>0){var i=t[e[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var n=0,I=i.length;n0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}});var eg=new De,ig=new De;function ng(A,t){tg.call(this,A,t),this.type="LineSegments"}function Ig(A,t){tg.call(this,A,t),this.type="LineLoop"}function rg(A){Ri.call(this),this.type="PointsMaterial",this.color=new Pi(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(A)}ng.prototype=Object.assign(Object.create(tg.prototype),{constructor:ng,isLineSegments:!0,computeLineDistances:function(){var A=this.geometry;if(A.isBufferGeometry)if(null===A.index){for(var t=A.attributes.position,e=[],i=0,n=t.count;in.far)return;I.push({distance:a,distanceToRay:Math.sqrt(o),point:g,index:t,face:null,object:r})}}function ug(A,t,e,i,n,I,r,o,g){Ce.call(this,A,t,e,i,n,I,r,o,g),this.format=void 0!==r?r:kA,this.minFilter=void 0!==I?I:BA,this.magFilter=void 0!==n?n:BA,this.generateMipmaps=!1}function lg(A,t,e,i,n,I,r,o,g,a,M,s){Ce.call(this,null,I,r,o,g,a,i,n,M,s),this.image={width:t,height:e},this.mipmaps=A,this.flipY=!1,this.generateMipmaps=!1}function Cg(A,t,e,i,n,I,r,o,g){Ce.call(this,A,t,e,i,n,I,r,o,g),this.needsUpdate=!0}function Tg(A,t,e,i,n,I,r,o,g,a){if((a=void 0!==a?a:HA)!==HA&&a!==RA)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===e&&a===HA&&(e=wA),void 0===e&&a===RA&&(e=bA),Ce.call(this,null,i,n,I,r,o,a,e,g),this.image={width:A,height:t},this.magFilter=void 0!==r?r:EA,this.minFilter=void 0!==o?o:EA,this.flipY=!1,this.generateMipmaps=!1}function hg(A){Cn.call(this),this.type="WireframeGeometry";var t=[],e=[0,0],i={},n=["a","b","c"];if(A&&A.isGeometry){for(var I=A.faces,r=0,o=I.length;r=0?(A(h-o,C,M),s.subVectors(a,M)):(A(h+o,C,M),s.subVectors(M,a)),C-o>=0?(A(h,C-o,M),c.subVectors(a,M)):(A(h,C+o,M),c.subVectors(M,a)),g.crossVectors(s,c).normalize(),I.push(g.x,g.y,g.z),r.push(h,C)}for(var N=0;N.9&&r<.1&&(t<.2&&(I[A+0]+=1),e<.2&&(I[A+2]+=1),i<.2&&(I[A+4]+=1))}}()}(),this.setAttribute("position",new nn(n,3)),this.setAttribute("normal",new nn(n.slice(),3)),this.setAttribute("uv",new nn(I,2)),0===i?this.computeVertexNormals():this.normalizeNormals()}function Dg(A,t){kn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:A,detail:t},this.fromBufferGeometry(new jg(A,t)),this.mergeVertices()}function jg(A,t){Eg.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],A,t),this.type="TetrahedronBufferGeometry",this.parameters={radius:A,detail:t}}function Bg(A,t){kn.call(this),this.type="OctahedronGeometry",this.parameters={radius:A,detail:t},this.fromBufferGeometry(new xg(A,t)),this.mergeVertices()}function xg(A,t){Eg.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],A,t),this.type="OctahedronBufferGeometry",this.parameters={radius:A,detail:t}}function pg(A,t){kn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:A,detail:t},this.fromBufferGeometry(new Lg(A,t)),this.mergeVertices()}function Lg(A,t){var e=(1+Math.sqrt(5))/2,i=[-1,e,0,1,e,0,-1,-e,0,1,-e,0,0,-1,e,0,1,e,0,-1,-e,0,1,-e,e,0,-1,e,0,1,-e,0,-1,-e,0,1];Eg.call(this,i,[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],A,t),this.type="IcosahedronBufferGeometry",this.parameters={radius:A,detail:t}}function fg(A,t){kn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:A,detail:t},this.fromBufferGeometry(new zg(A,t)),this.mergeVertices()}function zg(A,t){var e=(1+Math.sqrt(5))/2,i=1/e,n=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-i,-e,0,-i,e,0,i,-e,0,i,e,-i,-e,0,-i,e,0,i,-e,0,i,e,0,-e,0,-i,e,0,-i,-e,0,i,e,0,i];Eg.call(this,n,[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],A,t),this.type="DodecahedronBufferGeometry",this.parameters={radius:A,detail:t}}function wg(A,t,e,i,n,I){kn.call(this),this.type="TubeGeometry",this.parameters={path:A,tubularSegments:t,radius:e,radialSegments:i,closed:n},void 0!==I&&console.warn("THREE.TubeGeometry: taper has been removed.");var r=new mg(A,t,e,i,n);this.tangents=r.tangents,this.normals=r.normals,this.binormals=r.binormals,this.fromBufferGeometry(r),this.mergeVertices()}function mg(A,t,e,i,n){Cn.call(this),this.type="TubeBufferGeometry",this.parameters={path:A,tubularSegments:t,radius:e,radialSegments:i,closed:n},t=t||64,e=e||1,i=i||8,n=n||!1;var I=A.computeFrenetFrames(t,n);this.tangents=I.tangents,this.normals=I.normals,this.binormals=I.binormals;var r=new De,o=new De,g=new se,a=new De,M=[],s=[],c=[],u=[];function l(n){a=A.getPointAt(n/t,a);for(var g=I.normals[n],c=I.binormals[n],u=0;u<=i;u++){var l=u/i*Math.PI*2,C=Math.sin(l),T=-Math.cos(l);o.x=T*g.x+C*c.x,o.y=T*g.y+C*c.y,o.z=T*g.z+C*c.z,o.normalize(),s.push(o.x,o.y,o.z),r.x=a.x+e*o.x,r.y=a.y+e*o.y,r.z=a.z+e*o.z,M.push(r.x,r.y,r.z)}}!function(){for(var A=0;A0){var i=t[e[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var n=0,I=i.length;n0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}),ug.prototype=Object.assign(Object.create(Ce.prototype),{constructor:ug,isVideoTexture:!0,update:function(){var A=this.image;A.readyState>=A.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),lg.prototype=Object.create(Ce.prototype),lg.prototype.constructor=lg,lg.prototype.isCompressedTexture=!0,Cg.prototype=Object.create(Ce.prototype),Cg.prototype.constructor=Cg,Cg.prototype.isCanvasTexture=!0,Tg.prototype=Object.create(Ce.prototype),Tg.prototype.constructor=Tg,Tg.prototype.isDepthTexture=!0,hg.prototype=Object.create(Cn.prototype),hg.prototype.constructor=hg,Ng.prototype=Object.create(kn.prototype),Ng.prototype.constructor=Ng,dg.prototype=Object.create(Cn.prototype),dg.prototype.constructor=dg,yg.prototype=Object.create(kn.prototype),yg.prototype.constructor=yg,Eg.prototype=Object.create(Cn.prototype),Eg.prototype.constructor=Eg,Dg.prototype=Object.create(kn.prototype),Dg.prototype.constructor=Dg,jg.prototype=Object.create(Eg.prototype),jg.prototype.constructor=jg,Bg.prototype=Object.create(kn.prototype),Bg.prototype.constructor=Bg,xg.prototype=Object.create(Eg.prototype),xg.prototype.constructor=xg,pg.prototype=Object.create(kn.prototype),pg.prototype.constructor=pg,Lg.prototype=Object.create(Eg.prototype),Lg.prototype.constructor=Lg,fg.prototype=Object.create(kn.prototype),fg.prototype.constructor=fg,zg.prototype=Object.create(Eg.prototype),zg.prototype.constructor=zg,wg.prototype=Object.create(kn.prototype),wg.prototype.constructor=wg,mg.prototype=Object.create(Cn.prototype),mg.prototype.constructor=mg,mg.prototype.toJSON=function(){var A=Cn.prototype.toJSON.call(this);return A.path=this.parameters.path.toJSON(),A},Qg.prototype=Object.create(kn.prototype),Qg.prototype.constructor=Qg,Sg.prototype=Object.create(Cn.prototype),Sg.prototype.constructor=Sg,Yg.prototype=Object.create(kn.prototype),Yg.prototype.constructor=Yg,Og.prototype=Object.create(Cn.prototype),Og.prototype.constructor=Og;function vg(A,t,e,i,n){var I,r;if(n===function(A,t,e,i){for(var n=0,I=t,r=e-i;I0)for(I=t;I=t;I-=i)r=ia(I,A[I],A[I+1],r);return r&&_g(r,r.next)&&(na(r),r=r.next),r}function Ug(A,t){if(!A)return A;t||(t=A);var e,i=A;do{if(e=!1,i.steiner||!_g(i,i.next)&&0!==Kg(i.prev,i,i.next))i=i.next;else{if(na(i),(i=t=i.prev)===i.next)break;e=!0}}while(e||i!==t);return t}function bg(A,t,e,i,n,I,r){if(A){!r&&I&&function(A,t,e,i){var n=A;do{null===n.z&&(n.z=Xg(n.x,n.y,t,e,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==A);n.prevZ.nextZ=null,n.prevZ=null,function(A){var t,e,i,n,I,r,o,g,a=1;do{for(e=A,A=null,I=null,r=0;e;){for(r++,i=e,o=0,t=0;t0||g>0&&i;)0!==o&&(0===g||!i||e.z<=i.z)?(n=e,e=e.nextZ,o--):(n=i,i=i.nextZ,g--),I?I.nextZ=n:A=n,n.prevZ=I,I=n;e=i}I.nextZ=null,a*=2}while(r>1)}(n)}(A,i,n,I);for(var o,g,a=A;A.prev!==A.next;)if(o=A.prev,g=A.next,I?kg(A,i,n,I):Pg(A))t.push(o.i/e),t.push(A.i/e),t.push(g.i/e),na(A),A=g.next,a=g.next;else if((A=g)===a){r?1===r?bg(A=Gg(Ug(A),t,e),t,e,i,n,I,2):2===r&&Fg(A,t,e,i,n,I):bg(Ug(A),t,e,i,n,I,1);break}}}function Pg(A){var t=A.prev,e=A,i=A.next;if(Kg(t,e,i)>=0)return!1;for(var n=A.next.next;n!==A.prev;){if(Wg(t.x,t.y,e.x,e.y,i.x,i.y,n.x,n.y)&&Kg(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function kg(A,t,e,i){var n=A.prev,I=A,r=A.next;if(Kg(n,I,r)>=0)return!1;for(var o=n.xI.x?n.x>r.x?n.x:r.x:I.x>r.x?I.x:r.x,M=n.y>I.y?n.y>r.y?n.y:r.y:I.y>r.y?I.y:r.y,s=Xg(o,g,t,e,i),c=Xg(a,M,t,e,i),u=A.prevZ,l=A.nextZ;u&&u.z>=s&&l&&l.z<=c;){if(u!==A.prev&&u!==A.next&&Wg(n.x,n.y,I.x,I.y,r.x,r.y,u.x,u.y)&&Kg(u.prev,u,u.next)>=0)return!1;if(u=u.prevZ,l!==A.prev&&l!==A.next&&Wg(n.x,n.y,I.x,I.y,r.x,r.y,l.x,l.y)&&Kg(l.prev,l,l.next)>=0)return!1;l=l.nextZ}for(;u&&u.z>=s;){if(u!==A.prev&&u!==A.next&&Wg(n.x,n.y,I.x,I.y,r.x,r.y,u.x,u.y)&&Kg(u.prev,u,u.next)>=0)return!1;u=u.prevZ}for(;l&&l.z<=c;){if(l!==A.prev&&l!==A.next&&Wg(n.x,n.y,I.x,I.y,r.x,r.y,l.x,l.y)&&Kg(l.prev,l,l.next)>=0)return!1;l=l.nextZ}return!0}function Gg(A,t,e){var i=A;do{var n=i.prev,I=i.next.next;!_g(n,I)&&qg(n,i,i.next,I)&&ta(n,I)&&ta(I,n)&&(t.push(n.i/e),t.push(i.i/e),t.push(I.i/e),na(i),na(i.next),i=A=I),i=i.next}while(i!==A);return Ug(i)}function Fg(A,t,e,i,n,I){var r=A;do{for(var o=r.next.next;o!==r.prev;){if(r.i!==o.i&&Zg(r,o)){var g=ea(r,o);return r=Ug(r,r.next),g=Ug(g,g.next),bg(r,t,e,i,n,I),void bg(g,t,e,i,n,I)}o=o.next}r=r.next}while(r!==A)}function Jg(A,t){return A.x-t.x}function Hg(A,t){if(t=function(A,t){var e,i=t,n=A.x,I=A.y,r=-1/0;do{if(I<=i.y&&I>=i.next.y&&i.next.y!==i.y){var o=i.x+(I-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(o<=n&&o>r){if(r=o,o===n){if(I===i.y)return i;if(I===i.next.y)return i.next}e=i.x=i.x&&i.x>=M&&n!==i.x&&Wg(Ie.x||i.x===e.x&&Rg(e,i)))&&(e=i,c=g)),i=i.next}while(i!==a);return e}(A,t),t){var e=ea(t,A);Ug(t,t.next),Ug(e,e.next)}}function Rg(A,t){return Kg(A.prev,A,t.prev)<0&&Kg(t.next,A,A.next)<0}function Xg(A,t,e,i,n){return(A=1431655765&((A=858993459&((A=252645135&((A=16711935&((A=32767*(A-e)*n)|A<<8))|A<<4))|A<<2))|A<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*n)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Vg(A){var t=A,e=A;do{(t.x=0&&(A-r)*(i-o)-(e-r)*(t-o)>=0&&(e-r)*(I-o)-(n-r)*(i-o)>=0}function Zg(A,t){return A.next.i!==t.i&&A.prev.i!==t.i&&!function(A,t){var e=A;do{if(e.i!==A.i&&e.next.i!==A.i&&e.i!==t.i&&e.next.i!==t.i&&qg(e,e.next,A,t))return!0;e=e.next}while(e!==A);return!1}(A,t)&&(ta(A,t)&&ta(t,A)&&function(A,t){var e=A,i=!1,n=(A.x+t.x)/2,I=(A.y+t.y)/2;do{e.y>I!=e.next.y>I&&e.next.y!==e.y&&n<(e.next.x-e.x)*(I-e.y)/(e.next.y-e.y)+e.x&&(i=!i),e=e.next}while(e!==A);return i}(A,t)&&(Kg(A.prev,A,t.prev)||Kg(A,t.prev,t))||_g(A,t)&&Kg(A.prev,A,A.next)>0&&Kg(t.prev,t,t.next)>0)}function Kg(A,t,e){return(t.y-A.y)*(e.x-t.x)-(t.x-A.x)*(e.y-t.y)}function _g(A,t){return A.x===t.x&&A.y===t.y}function qg(A,t,e,i){var n=Aa(Kg(A,t,e)),I=Aa(Kg(A,t,i)),r=Aa(Kg(e,i,A)),o=Aa(Kg(e,i,t));return n!==I&&r!==o||!(0!==n||!$g(A,e,t))||!(0!==I||!$g(A,i,t))||!(0!==r||!$g(e,A,i))||!(0!==o||!$g(e,t,i))}function $g(A,t,e){return t.x<=Math.max(A.x,e.x)&&t.x>=Math.min(A.x,e.x)&&t.y<=Math.max(A.y,e.y)&&t.y>=Math.min(A.y,e.y)}function Aa(A){return A>0?1:A<0?-1:0}function ta(A,t){return Kg(A.prev,A,A.next)<0?Kg(A,t,A.next)>=0&&Kg(A,A.prev,t)>=0:Kg(A,t,A.prev)<0||Kg(A,A.next,t)<0}function ea(A,t){var e=new Ia(A.i,A.x,A.y),i=new Ia(t.i,t.x,t.y),n=A.next,I=t.prev;return A.next=t,t.prev=A,e.next=n,n.prev=e,i.next=e,e.prev=i,I.next=i,i.prev=I,i}function ia(A,t,e,i){var n=new Ia(A,t,e);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function na(A){A.next.prev=A.prev,A.prev.next=A.next,A.prevZ&&(A.prevZ.nextZ=A.nextZ),A.nextZ&&(A.nextZ.prevZ=A.prevZ)}function Ia(A,t,e){this.i=A,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var ra={area:function(A){for(var t=A.length,e=0,i=t-1,n=0;n80*e){i=I=A[0],n=r=A[1];for(var l=e;lI&&(I=o),g>r&&(r=g);a=0!==(a=Math.max(I-i,r-n))?1/a:0}return bg(c,u,e,i,n,a),u}(e,i),g=0;g2&&A[t-1].equals(A[0])&&A.pop()}function ga(A,t){for(var e=0;eNumber.EPSILON){var c=Math.sqrt(M),u=Math.sqrt(g*g+a*a),l=t.x-o/c,C=t.y+r/c,T=((e.x-a/u-l)*a-(e.y+g/u-C)*g)/(r*a-o*g),h=(i=l+r*T-A.x)*i+(n=C+o*T-A.y)*n;if(h<=2)return new se(i,n);I=Math.sqrt(h/2)}else{var N=!1;r>Number.EPSILON?g>Number.EPSILON&&(N=!0):r<-Number.EPSILON?g<-Number.EPSILON&&(N=!0):Math.sign(o)===Math.sign(a)&&(N=!0),N?(i=-o,n=r,I=Math.sqrt(M)):(i=r,n=o,I=Math.sqrt(M/2))}return new se(i/I,n/I)}for(var U=[],b=0,P=z.length,k=P-1,G=b+1;b=0;hA--){for(var NA=hA/u,dA=M*Math.cos(NA*Math.PI/2),yA=s*Math.sin(NA*Math.PI/2)+c,EA=0,DA=z.length;EA=0;){var i=e,n=e-1;n<0&&(n=A.length-1);for(var I=0,r=o+2*u;I0)&&c.push(B,x,L),(D!==e-1||o0&&h(!0),t>0&&h(!1)),this.setIndex(a),this.setAttribute("position",new nn(M,3)),this.setAttribute("normal",new nn(s,3)),this.setAttribute("uv",new nn(c,2))}function La(A,t,e,i,n,I,r){xa.call(this,0,A,t,e,i,n,I,r),this.type="ConeGeometry",this.parameters={radius:A,height:t,radialSegments:e,heightSegments:i,openEnded:n,thetaStart:I,thetaLength:r}}function fa(A,t,e,i,n,I,r){pa.call(this,0,A,t,e,i,n,I,r),this.type="ConeBufferGeometry",this.parameters={radius:A,height:t,radialSegments:e,heightSegments:i,openEnded:n,thetaStart:I,thetaLength:r}}function za(A,t,e,i){kn.call(this),this.type="CircleGeometry",this.parameters={radius:A,segments:t,thetaStart:e,thetaLength:i},this.fromBufferGeometry(new wa(A,t,e,i)),this.mergeVertices()}function wa(A,t,e,i){Cn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:A,segments:t,thetaStart:e,thetaLength:i},A=A||1,t=void 0!==t?Math.max(3,t):8,e=void 0!==e?e:0,i=void 0!==i?i:2*Math.PI;var n=[],I=[],r=[],o=[],g=new De,a=new se;I.push(0,0,0),r.push(0,0,1),o.push(.5,.5);for(var M=0,s=3;M<=t;M++,s+=3){var c=e+M/t*i;g.x=A*Math.cos(c),g.y=A*Math.sin(c),I.push(g.x,g.y,g.z),r.push(0,0,1),a.x=(I[s]/A+1)/2,a.y=(I[s+1]/A+1)/2,o.push(a.x,a.y)}for(var u=1;u<=t;u++)n.push(u,u+1,0);this.setIndex(n),this.setAttribute("position",new nn(I,3)),this.setAttribute("normal",new nn(r,3)),this.setAttribute("uv",new nn(o,2))}ua.prototype=Object.create(kn.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(Ma.prototype),la.prototype.constructor=la,Ca.prototype=Object.create(kn.prototype),Ca.prototype.constructor=Ca,Ta.prototype=Object.create(Cn.prototype),Ta.prototype.constructor=Ta,ha.prototype=Object.create(kn.prototype),ha.prototype.constructor=ha,Na.prototype=Object.create(Cn.prototype),Na.prototype.constructor=Na,da.prototype=Object.create(kn.prototype),da.prototype.constructor=da,ya.prototype=Object.create(Cn.prototype),ya.prototype.constructor=ya,Ea.prototype=Object.create(kn.prototype),Ea.prototype.constructor=Ea,Ea.prototype.toJSON=function(){var A=kn.prototype.toJSON.call(this);return ja(this.parameters.shapes,A)},Da.prototype=Object.create(Cn.prototype),Da.prototype.constructor=Da,Da.prototype.toJSON=function(){var A=Cn.prototype.toJSON.call(this);return ja(this.parameters.shapes,A)},Ba.prototype=Object.create(Cn.prototype),Ba.prototype.constructor=Ba,xa.prototype=Object.create(kn.prototype),xa.prototype.constructor=xa,pa.prototype=Object.create(Cn.prototype),pa.prototype.constructor=pa,La.prototype=Object.create(xa.prototype),La.prototype.constructor=La,fa.prototype=Object.create(pa.prototype),fa.prototype.constructor=fa,za.prototype=Object.create(kn.prototype),za.prototype.constructor=za,wa.prototype=Object.create(Cn.prototype),wa.prototype.constructor=wa;var ma=Object.freeze({__proto__:null,WireframeGeometry:hg,ParametricGeometry:Ng,ParametricBufferGeometry:dg,TetrahedronGeometry:Dg,TetrahedronBufferGeometry:jg,OctahedronGeometry:Bg,OctahedronBufferGeometry:xg,IcosahedronGeometry:pg,IcosahedronBufferGeometry:Lg,DodecahedronGeometry:fg,DodecahedronBufferGeometry:zg,PolyhedronGeometry:yg,PolyhedronBufferGeometry:Eg,TubeGeometry:wg,TubeBufferGeometry:mg,TorusKnotGeometry:Qg,TorusKnotBufferGeometry:Sg,TorusGeometry:Yg,TorusBufferGeometry:Og,TextGeometry:ua,TextBufferGeometry:la,SphereGeometry:Ca,SphereBufferGeometry:Ta,RingGeometry:ha,RingBufferGeometry:Na,PlaneGeometry:oI,PlaneBufferGeometry:gI,LatheGeometry:da,LatheBufferGeometry:ya,ShapeGeometry:Ea,ShapeBufferGeometry:Da,ExtrudeGeometry:aa,ExtrudeBufferGeometry:Ma,EdgesGeometry:Ba,ConeGeometry:La,ConeBufferGeometry:fa,CylinderGeometry:xa,CylinderBufferGeometry:pa,CircleGeometry:za,CircleBufferGeometry:wa,BoxGeometry:Gn,BoxBufferGeometry:Fn});function Qa(A){Ri.call(this),this.type="ShadowMaterial",this.color=new Pi(0),this.transparent=!0,this.setValues(A)}function Sa(A){Wn.call(this,A),this.type="RawShaderMaterial"}function Ya(A){Ri.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Pi(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ae,this.normalScale=new se(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.vertexTangents=!1,this.setValues(A)}function Oa(A){Ya.call(this),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new se(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,this.sheen=null,this.transparency=0,this.setValues(A)}function va(A){Ri.call(this),this.type="MeshPhongMaterial",this.color=new Pi(16777215),this.specular=new Pi(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ae,this.normalScale=new se(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=iA,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(A)}function Ua(A){Ri.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Pi(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ae,this.normalScale=new se(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(A)}function ba(A){Ri.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ae,this.normalScale=new se(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(A)}function Pa(A){Ri.call(this),this.type="MeshLambertMaterial",this.color=new Pi(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=iA,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(A)}function ka(A){Ri.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Pi(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ae,this.normalScale=new se(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(A)}function Ga(A){Zo.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(A)}Qa.prototype=Object.create(Ri.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isShadowMaterial=!0,Qa.prototype.copy=function(A){return Ri.prototype.copy.call(this,A),this.color.copy(A.color),this},Sa.prototype=Object.create(Wn.prototype),Sa.prototype.constructor=Sa,Sa.prototype.isRawShaderMaterial=!0,Ya.prototype=Object.create(Ri.prototype),Ya.prototype.constructor=Ya,Ya.prototype.isMeshStandardMaterial=!0,Ya.prototype.copy=function(A){return Ri.prototype.copy.call(this,A),this.defines={STANDARD:""},this.color.copy(A.color),this.roughness=A.roughness,this.metalness=A.metalness,this.map=A.map,this.lightMap=A.lightMap,this.lightMapIntensity=A.lightMapIntensity,this.aoMap=A.aoMap,this.aoMapIntensity=A.aoMapIntensity,this.emissive.copy(A.emissive),this.emissiveMap=A.emissiveMap,this.emissiveIntensity=A.emissiveIntensity,this.bumpMap=A.bumpMap,this.bumpScale=A.bumpScale,this.normalMap=A.normalMap,this.normalMapType=A.normalMapType,this.normalScale.copy(A.normalScale),this.displacementMap=A.displacementMap,this.displacementScale=A.displacementScale,this.displacementBias=A.displacementBias,this.roughnessMap=A.roughnessMap,this.metalnessMap=A.metalnessMap,this.alphaMap=A.alphaMap,this.envMap=A.envMap,this.envMapIntensity=A.envMapIntensity,this.refractionRatio=A.refractionRatio,this.wireframe=A.wireframe,this.wireframeLinewidth=A.wireframeLinewidth,this.wireframeLinecap=A.wireframeLinecap,this.wireframeLinejoin=A.wireframeLinejoin,this.skinning=A.skinning,this.morphTargets=A.morphTargets,this.morphNormals=A.morphNormals,this.vertexTangents=A.vertexTangents,this},Oa.prototype=Object.create(Ya.prototype),Oa.prototype.constructor=Oa,Oa.prototype.isMeshPhysicalMaterial=!0,Oa.prototype.copy=function(A){return Ya.prototype.copy.call(this,A),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=A.clearcoat,this.clearcoatMap=A.clearcoatMap,this.clearcoatRoughness=A.clearcoatRoughness,this.clearcoatRoughnessMap=A.clearcoatRoughnessMap,this.clearcoatNormalMap=A.clearcoatNormalMap,this.clearcoatNormalScale.copy(A.clearcoatNormalScale),this.reflectivity=A.reflectivity,A.sheen?this.sheen=(this.sheen||new Pi).copy(A.sheen):this.sheen=null,this.transparency=A.transparency,this},va.prototype=Object.create(Ri.prototype),va.prototype.constructor=va,va.prototype.isMeshPhongMaterial=!0,va.prototype.copy=function(A){return Ri.prototype.copy.call(this,A),this.color.copy(A.color),this.specular.copy(A.specular),this.shininess=A.shininess,this.map=A.map,this.lightMap=A.lightMap,this.lightMapIntensity=A.lightMapIntensity,this.aoMap=A.aoMap,this.aoMapIntensity=A.aoMapIntensity,this.emissive.copy(A.emissive),this.emissiveMap=A.emissiveMap,this.emissiveIntensity=A.emissiveIntensity,this.bumpMap=A.bumpMap,this.bumpScale=A.bumpScale,this.normalMap=A.normalMap,this.normalMapType=A.normalMapType,this.normalScale.copy(A.normalScale),this.displacementMap=A.displacementMap,this.displacementScale=A.displacementScale,this.displacementBias=A.displacementBias,this.specularMap=A.specularMap,this.alphaMap=A.alphaMap,this.envMap=A.envMap,this.combine=A.combine,this.reflectivity=A.reflectivity,this.refractionRatio=A.refractionRatio,this.wireframe=A.wireframe,this.wireframeLinewidth=A.wireframeLinewidth,this.wireframeLinecap=A.wireframeLinecap,this.wireframeLinejoin=A.wireframeLinejoin,this.skinning=A.skinning,this.morphTargets=A.morphTargets,this.morphNormals=A.morphNormals,this},Ua.prototype=Object.create(Ri.prototype),Ua.prototype.constructor=Ua,Ua.prototype.isMeshToonMaterial=!0,Ua.prototype.copy=function(A){return Ri.prototype.copy.call(this,A),this.color.copy(A.color),this.map=A.map,this.gradientMap=A.gradientMap,this.lightMap=A.lightMap,this.lightMapIntensity=A.lightMapIntensity,this.aoMap=A.aoMap,this.aoMapIntensity=A.aoMapIntensity,this.emissive.copy(A.emissive),this.emissiveMap=A.emissiveMap,this.emissiveIntensity=A.emissiveIntensity,this.bumpMap=A.bumpMap,this.bumpScale=A.bumpScale,this.normalMap=A.normalMap,this.normalMapType=A.normalMapType,this.normalScale.copy(A.normalScale),this.displacementMap=A.displacementMap,this.displacementScale=A.displacementScale,this.displacementBias=A.displacementBias,this.alphaMap=A.alphaMap,this.wireframe=A.wireframe,this.wireframeLinewidth=A.wireframeLinewidth,this.wireframeLinecap=A.wireframeLinecap,this.wireframeLinejoin=A.wireframeLinejoin,this.skinning=A.skinning,this.morphTargets=A.morphTargets,this.morphNormals=A.morphNormals,this},ba.prototype=Object.create(Ri.prototype),ba.prototype.constructor=ba,ba.prototype.isMeshNormalMaterial=!0,ba.prototype.copy=function(A){return Ri.prototype.copy.call(this,A),this.bumpMap=A.bumpMap,this.bumpScale=A.bumpScale,this.normalMap=A.normalMap,this.normalMapType=A.normalMapType,this.normalScale.copy(A.normalScale),this.displacementMap=A.displacementMap,this.displacementScale=A.displacementScale,this.displacementBias=A.displacementBias,this.wireframe=A.wireframe,this.wireframeLinewidth=A.wireframeLinewidth,this.skinning=A.skinning,this.morphTargets=A.morphTargets,this.morphNormals=A.morphNormals,this},Pa.prototype=Object.create(Ri.prototype),Pa.prototype.constructor=Pa,Pa.prototype.isMeshLambertMaterial=!0,Pa.prototype.copy=function(A){return Ri.prototype.copy.call(this,A),this.color.copy(A.color),this.map=A.map,this.lightMap=A.lightMap,this.lightMapIntensity=A.lightMapIntensity,this.aoMap=A.aoMap,this.aoMapIntensity=A.aoMapIntensity,this.emissive.copy(A.emissive),this.emissiveMap=A.emissiveMap,this.emissiveIntensity=A.emissiveIntensity,this.specularMap=A.specularMap,this.alphaMap=A.alphaMap,this.envMap=A.envMap,this.combine=A.combine,this.reflectivity=A.reflectivity,this.refractionRatio=A.refractionRatio,this.wireframe=A.wireframe,this.wireframeLinewidth=A.wireframeLinewidth,this.wireframeLinecap=A.wireframeLinecap,this.wireframeLinejoin=A.wireframeLinejoin,this.skinning=A.skinning,this.morphTargets=A.morphTargets,this.morphNormals=A.morphNormals,this},ka.prototype=Object.create(Ri.prototype),ka.prototype.constructor=ka,ka.prototype.isMeshMatcapMaterial=!0,ka.prototype.copy=function(A){return Ri.prototype.copy.call(this,A),this.defines={MATCAP:""},this.color.copy(A.color),this.matcap=A.matcap,this.map=A.map,this.bumpMap=A.bumpMap,this.bumpScale=A.bumpScale,this.normalMap=A.normalMap,this.normalMapType=A.normalMapType,this.normalScale.copy(A.normalScale),this.displacementMap=A.displacementMap,this.displacementScale=A.displacementScale,this.displacementBias=A.displacementBias,this.alphaMap=A.alphaMap,this.skinning=A.skinning,this.morphTargets=A.morphTargets,this.morphNormals=A.morphNormals,this},Ga.prototype=Object.create(Zo.prototype),Ga.prototype.constructor=Ga,Ga.prototype.isLineDashedMaterial=!0,Ga.prototype.copy=function(A){return Zo.prototype.copy.call(this,A),this.scale=A.scale,this.dashSize=A.dashSize,this.gapSize=A.gapSize,this};var Fa=Object.freeze({__proto__:null,ShadowMaterial:Qa,SpriteMaterial:Eo,RawShaderMaterial:Sa,ShaderMaterial:Wn,PointsMaterial:rg,MeshPhysicalMaterial:Oa,MeshStandardMaterial:Ya,MeshPhongMaterial:va,MeshToonMaterial:Ua,MeshNormalMaterial:ba,MeshLambertMaterial:Pa,MeshDepthMaterial:$r,MeshDistanceMaterial:Ao,MeshBasicMaterial:Xi,MeshMatcapMaterial:ka,LineDashedMaterial:Ga,LineBasicMaterial:Zo,Material:Ri}),Ja={arraySlice:function(A,t,e){return Ja.isTypedArray(A)?new A.constructor(A.subarray(t,void 0!==e?e:A.length)):A.slice(t,e)},convertArray:function(A,t,e){return!A||!e&&A.constructor===t?A:"number"==typeof t.BYTES_PER_ELEMENT?new t(A):Array.prototype.slice.call(A)},isTypedArray:function(A){return ArrayBuffer.isView(A)&&!(A instanceof DataView)},getKeyframeOrder:function(A){for(var t=A.length,e=new Array(t),i=0;i!==t;++i)e[i]=i;return e.sort((function(t,e){return A[t]-A[e]})),e},sortedArray:function(A,t,e){for(var i=A.length,n=new A.constructor(i),I=0,r=0;r!==i;++I)for(var o=e[I]*t,g=0;g!==t;++g)n[r++]=A[o+g];return n},flattenJSON:function(A,t,e,i){for(var n=1,I=A[0];void 0!==I&&void 0===I[i];)I=A[n++];if(void 0!==I){var r=I[i];if(void 0!==r)if(Array.isArray(r))do{void 0!==(r=I[i])&&(t.push(I.time),e.push.apply(e,r)),I=A[n++]}while(void 0!==I);else if(void 0!==r.toArray)do{void 0!==(r=I[i])&&(t.push(I.time),r.toArray(e,e.length)),I=A[n++]}while(void 0!==I);else do{void 0!==(r=I[i])&&(t.push(I.time),e.push(r)),I=A[n++]}while(void 0!==I)}},subclip:function(A,t,e,i,n){n=n||30;var I=A.clone();I.name=t;for(var r=[],o=0;o=i)){M.push(g.times[c]);for(var l=0;lI.tracks[T].times[0]&&(C=I.tracks[T].times[0]);for(var h=0;h=i.times[g]){var M=g*o;a=Ja.arraySlice(i.values,M)}else{var s=i.createInterpolant();s.evaluate(I),a=s.resultBuffer}"quaternion"===n&&new de(a[0],a[1],a[2],a[3]).normalize().conjugate().toArray(a);for(var c=r.times.length,u=0;u=n)break A;var o=t[1];A=(n=t[--e-1]))break t}I=e,e=0}for(;e>>1;At;)--I;if(++I,0!==n||I!==i){n>=I&&(n=(I=Math.max(I,1))-1);var r=this.getValueSize();this.times=Ja.arraySlice(e,n,I),this.values=Ja.arraySlice(this.values,n*r,I*r)}return this},validate:function(){var A=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),A=!1);var e=this.times,i=this.values,n=e.length;0===n&&(console.error("THREE.KeyframeTrack: Track is empty.",this),A=!1);for(var I=null,r=0;r!==n;r++){var o=e[r];if("number"==typeof o&&isNaN(o)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,r,o),A=!1;break}if(null!==I&&I>o){console.error("THREE.KeyframeTrack: Out of order keys.",this,r,o,I),A=!1;break}I=o}if(void 0!==i&&Ja.isTypedArray(i))for(var g=0,a=i.length;g!==a;++g){var M=i[g];if(isNaN(M)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,g,M),A=!1;break}}return A},optimize:function(){for(var A=Ja.arraySlice(this.times),t=Ja.arraySlice(this.values),e=this.getValueSize(),i=this.getInterpolation()===kt,n=A.length-1,I=1,r=1;r0){A[I]=A[n];for(var h=n*e,N=I*e,d=0;d!==e;++d)t[N+d]=t[h+d];++I}return I!==A.length?(this.times=Ja.arraySlice(A,0,I),this.values=Ja.arraySlice(t,0,I*e)):(this.times=A,this.values=t),this},clone:function(){var A=Ja.arraySlice(this.times,0),t=Ja.arraySlice(this.values,0),e=new(0,this.constructor)(this.name,A,t);return e.createInterpolant=this.createInterpolant,e}}),Za.prototype=Object.assign(Object.create(Wa.prototype),{constructor:Za,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:bt,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Ka.prototype=Object.assign(Object.create(Wa.prototype),{constructor:Ka,ValueTypeName:"color"}),_a.prototype=Object.assign(Object.create(Wa.prototype),{constructor:_a,ValueTypeName:"number"}),qa.prototype=Object.assign(Object.create(Ha.prototype),{constructor:qa,interpolate_:function(A,t,e,i){for(var n=this.resultBuffer,I=this.sampleValues,r=this.valueSize,o=(e-t)/(i-t),g=A*r,a=g+r;g!==a;g+=4)de.slerpFlat(n,0,I,g-r,I,g,o);return n}}),$a.prototype=Object.assign(Object.create(Wa.prototype),{constructor:$a,ValueTypeName:"quaternion",DefaultInterpolation:Pt,InterpolantFactoryMethodLinear:function(A){return new qa(this.times,this.values,this.getValueSize(),A)},InterpolantFactoryMethodSmooth:void 0}),AM.prototype=Object.assign(Object.create(Wa.prototype),{constructor:AM,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:bt,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),tM.prototype=Object.assign(Object.create(Wa.prototype),{constructor:tM,ValueTypeName:"vector"}),Object.assign(eM,{parse:function(A){for(var t=[],e=A.tracks,i=1/(A.fps||1),n=0,I=e.length;n!==I;++n)t.push(iM(e[n]).scale(i));return new eM(A.name,A.duration,t,A.blendMode)},toJSON:function(A){for(var t=[],e=A.tracks,i={name:A.name,duration:A.duration,tracks:t,uuid:A.uuid,blendMode:A.blendMode},n=0,I=e.length;n!==I;++n)t.push(Wa.toJSON(e[n]));return i},CreateFromMorphTargetSequence:function(A,t,e,i){for(var n=t.length,I=[],r=0;r1){var a=g[1],M=i[a];M||(i[a]=M=[]),M.push(o)}}var s=[];for(var c in i)s.push(eM.CreateFromMorphTargetSequence(c,i[c],t,e));return s},parseAnimation:function(A,t){if(!A)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var e=function(A,t,e,i,n){if(0!==e.length){var I=[],r=[];Ja.flattenJSON(e,I,r,i),0!==I.length&&n.push(new A(t,I,r))}},i=[],n=A.name||"default",I=A.fps||30,r=A.blendMode,o=A.length||-1,g=A.hierarchy||[],a=0;a0||0===A.search(/^data\:image\/jpeg/);n.format=i?kA:GA,n.needsUpdate=!0,void 0!==t&&t(n)}),e,i),n}}),Object.assign(TM.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(A,t){var e=this.getUtoTmapping(A);return this.getPoint(e,t)},getPoints:function(A){void 0===A&&(A=5);for(var t=[],e=0;e<=A;e++)t.push(this.getPoint(e/A));return t},getSpacedPoints:function(A){void 0===A&&(A=5);for(var t=[],e=0;e<=A;e++)t.push(this.getPointAt(e/A));return t},getLength:function(){var A=this.getLengths();return A[A.length-1]},getLengths:function(A){if(void 0===A&&(A=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===A+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,e=[],i=this.getPoint(0),n=0;e.push(0);for(var I=1;I<=A;I++)n+=(t=this.getPoint(I/A)).distanceTo(i),e.push(n),i=t;return this.cacheArcLengths=e,e},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(A,t){var e,i=this.getLengths(),n=0,I=i.length;e=t||A*i[I-1];for(var r,o=0,g=I-1;o<=g;)if((r=i[n=Math.floor(o+(g-o)/2)]-e)<0)o=n+1;else{if(!(r>0)){g=n;break}g=n-1}if(i[n=g]===e)return n/(I-1);var a=i[n];return(n+(e-a)/(i[n+1]-a))/(I-1)},getTangent:function(A,t){var e=1e-4,i=A-e,n=A+e;i<0&&(i=0),n>1&&(n=1);var I=this.getPoint(i),r=this.getPoint(n),o=t||(I.isVector2?new se:new De);return o.copy(r).sub(I).normalize(),o},getTangentAt:function(A,t){var e=this.getUtoTmapping(A);return this.getTangent(e,t)},computeFrenetFrames:function(A,t){for(var e=new De,i=[],n=[],I=[],r=new De,o=new we,g=0;g<=A;g++){var a=g/A;i[g]=this.getTangentAt(a,new De),i[g].normalize()}n[0]=new De,I[0]=new De;var M=Number.MAX_VALUE,s=Math.abs(i[0].x),c=Math.abs(i[0].y),u=Math.abs(i[0].z);s<=M&&(M=s,e.set(1,0,0)),c<=M&&(M=c,e.set(0,1,0)),u<=M&&e.set(0,0,1),r.crossVectors(i[0],e).normalize(),n[0].crossVectors(i[0],r),I[0].crossVectors(i[0],n[0]);for(var l=1;l<=A;l++){if(n[l]=n[l-1].clone(),I[l]=I[l-1].clone(),r.crossVectors(i[l-1],i[l]),r.length()>Number.EPSILON){r.normalize();var C=Math.acos(Me.clamp(i[l-1].dot(i[l]),-1,1));n[l].applyMatrix4(o.makeRotationAxis(r,C))}I[l].crossVectors(i[l],n[l])}if(!0===t){var T=Math.acos(Me.clamp(n[0].dot(n[A]),-1,1));T/=A,i[0].dot(r.crossVectors(n[0],n[A]))>0&&(T=-T);for(var h=1;h<=A;h++)n[h].applyMatrix4(o.makeRotationAxis(i[h],T*h)),I[h].crossVectors(i[h],n[h])}return{tangents:i,normals:n,binormals:I}},clone:function(){return(new this.constructor).copy(this)},copy:function(A){return this.arcLengthDivisions=A.arcLengthDivisions,this},toJSON:function(){var A={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return A.arcLengthDivisions=this.arcLengthDivisions,A.type=this.type,A},fromJSON:function(A){return this.arcLengthDivisions=A.arcLengthDivisions,this}}),hM.prototype=Object.create(TM.prototype),hM.prototype.constructor=hM,hM.prototype.isEllipseCurve=!0,hM.prototype.getPoint=function(A,t){for(var e=t||new se,i=2*Math.PI,n=this.aEndAngle-this.aStartAngle,I=Math.abs(n)i;)n-=i;n0?0:(Math.floor(Math.abs(M)/g)+1)*g:0===s&&M===g-1&&(M=g-2,s=1),this.closed||M>0?e=o[(M-1)%g]:(yM.subVectors(o[0],o[1]).add(o[0]),e=yM),i=o[M%g],n=o[(M+1)%g],this.closed||M+2i.length-2?i.length-1:I+1],M=i[I>i.length-3?i.length-1:I+2];return e.set(xM(r,o.x,g.x,a.x,M.x),xM(r,o.y,g.y,a.y,M.y)),e},YM.prototype.copy=function(A){TM.prototype.copy.call(this,A),this.points=[];for(var t=0,e=A.points.length;t=t){var n=e[i]-t,I=this.curves[i],r=I.getLength(),o=0===r?0:1-n/r;return I.getPointAt(o)}i++}return null},getLength:function(){var A=this.getCurveLengths();return A[A.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var A=[],t=0,e=0,i=this.curves.length;e1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e},copy:function(A){TM.prototype.copy.call(this,A),this.curves=[];for(var t=0,e=A.curves.length;t0){var a=g.getPoint(0);a.equals(this.currentPoint)||this.lineTo(a.x,a.y)}this.curves.push(g);var M=g.getPoint(1);return this.currentPoint.copy(M),this},copy:function(A){return vM.prototype.copy.call(this,A),this.currentPoint.copy(A.currentPoint),this},toJSON:function(){var A=vM.prototype.toJSON.call(this);return A.currentPoint=this.currentPoint.toArray(),A},fromJSON:function(A){return vM.prototype.fromJSON.call(this,A),this.currentPoint.fromArray(A.currentPoint),this}}),bM.prototype=Object.assign(Object.create(UM.prototype),{constructor:bM,getPointsHoles:function(A){for(var t=[],e=0,i=this.holes.length;e0:i.vertexColors=A.vertexColors),void 0!==A.uniforms)for(var n in A.uniforms){var I=A.uniforms[n];switch(i.uniforms[n]={},I.type){case"t":i.uniforms[n].value=e(I.value);break;case"c":i.uniforms[n].value=(new Pi).setHex(I.value);break;case"v2":i.uniforms[n].value=(new se).fromArray(I.value);break;case"v3":i.uniforms[n].value=(new De).fromArray(I.value);break;case"v4":i.uniforms[n].value=(new Te).fromArray(I.value);break;case"m3":i.uniforms[n].value=(new ce).fromArray(I.value);case"m4":i.uniforms[n].value=(new we).fromArray(I.value);break;default:i.uniforms[n].value=I.value}}if(void 0!==A.defines&&(i.defines=A.defines),void 0!==A.vertexShader&&(i.vertexShader=A.vertexShader),void 0!==A.fragmentShader&&(i.fragmentShader=A.fragmentShader),void 0!==A.extensions)for(var r in A.extensions)i.extensions[r]=A.extensions[r];if(void 0!==A.shading&&(i.flatShading=1===A.shading),void 0!==A.size&&(i.size=A.size),void 0!==A.sizeAttenuation&&(i.sizeAttenuation=A.sizeAttenuation),void 0!==A.map&&(i.map=e(A.map)),void 0!==A.matcap&&(i.matcap=e(A.matcap)),void 0!==A.alphaMap&&(i.alphaMap=e(A.alphaMap)),void 0!==A.bumpMap&&(i.bumpMap=e(A.bumpMap)),void 0!==A.bumpScale&&(i.bumpScale=A.bumpScale),void 0!==A.normalMap&&(i.normalMap=e(A.normalMap)),void 0!==A.normalMapType&&(i.normalMapType=A.normalMapType),void 0!==A.normalScale){var o=A.normalScale;!1===Array.isArray(o)&&(o=[o,o]),i.normalScale=(new se).fromArray(o)}return void 0!==A.displacementMap&&(i.displacementMap=e(A.displacementMap)),void 0!==A.displacementScale&&(i.displacementScale=A.displacementScale),void 0!==A.displacementBias&&(i.displacementBias=A.displacementBias),void 0!==A.roughnessMap&&(i.roughnessMap=e(A.roughnessMap)),void 0!==A.metalnessMap&&(i.metalnessMap=e(A.metalnessMap)),void 0!==A.emissiveMap&&(i.emissiveMap=e(A.emissiveMap)),void 0!==A.emissiveIntensity&&(i.emissiveIntensity=A.emissiveIntensity),void 0!==A.specularMap&&(i.specularMap=e(A.specularMap)),void 0!==A.envMap&&(i.envMap=e(A.envMap)),void 0!==A.envMapIntensity&&(i.envMapIntensity=A.envMapIntensity),void 0!==A.reflectivity&&(i.reflectivity=A.reflectivity),void 0!==A.refractionRatio&&(i.refractionRatio=A.refractionRatio),void 0!==A.lightMap&&(i.lightMap=e(A.lightMap)),void 0!==A.lightMapIntensity&&(i.lightMapIntensity=A.lightMapIntensity),void 0!==A.aoMap&&(i.aoMap=e(A.aoMap)),void 0!==A.aoMapIntensity&&(i.aoMapIntensity=A.aoMapIntensity),void 0!==A.gradientMap&&(i.gradientMap=e(A.gradientMap)),void 0!==A.clearcoatMap&&(i.clearcoatMap=e(A.clearcoatMap)),void 0!==A.clearcoatRoughnessMap&&(i.clearcoatRoughnessMap=e(A.clearcoatRoughnessMap)),void 0!==A.clearcoatNormalMap&&(i.clearcoatNormalMap=e(A.clearcoatNormalMap)),void 0!==A.clearcoatNormalScale&&(i.clearcoatNormalScale=(new se).fromArray(A.clearcoatNormalScale)),i},setTextures:function(A){return this.textures=A,this}});var As=function(A){var t=A.lastIndexOf("/");return-1===t?"./":A.substr(0,t+1)};function ts(){Cn.call(this),this.type="InstancedBufferGeometry",this.instanceCount=1/0}function es(A,t,e,i){"number"==typeof e&&(i=e,e=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),Zi.call(this,A,t,e),this.meshPerAttribute=i||1}function is(A){oM.call(this,A)}ts.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ts,isInstancedBufferGeometry:!0,copy:function(A){return Cn.prototype.copy.call(this,A),this.instanceCount=A.instanceCount,this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var A=Cn.prototype.toJSON.call(this);return A.instanceCount=this.instanceCount,A.isInstancedBufferGeometry=!0,A}}),es.prototype=Object.assign(Object.create(Zi.prototype),{constructor:es,isInstancedBufferAttribute:!0,copy:function(A){return Zi.prototype.copy.call(this,A),this.meshPerAttribute=A.meshPerAttribute,this},toJSON:function(){var A=Zi.prototype.toJSON.call(this);return A.meshPerAttribute=this.meshPerAttribute,A.isInstancedBufferAttribute=!0,A}}),is.prototype=Object.assign(Object.create(oM.prototype),{constructor:is,load:function(A,t,e,i){var n=this,I=new aM(n.manager);I.setPath(n.path),I.load(A,(function(e){try{t(n.parse(JSON.parse(e)))}catch(t){i?i(t):console.error(t),n.manager.itemError(A)}}),e,i)},parse:function(A){var t={},e={};function i(A,i){if(void 0!==t[i])return t[i];var n=A.interleavedBuffers[i],I=function(A,t){if(void 0!==e[t])return e[t];var i=A.arrayBuffers[t],n=new Uint32Array(i).buffer;return e[t]=n,n}(A,n.buffer),r=new To(new ns[n.type](I),n.stride);return r.uuid=n.uuid,t[i]=r,r}var n=A.isInstancedBufferGeometry?new ts:new Cn,I=A.data.index;if(void 0!==I){var r=new ns[I.type](I.array);n.setIndex(new Zi(r,1))}var o=A.data.attributes;for(var g in o){var a=o[g],M=void 0;if(a.isInterleavedBufferAttribute)M=new yo(i(A.data,a.data),a.itemSize,a.offset,a.normalized);else{var s=new ns[a.type](a.array);M=new(a.isInstancedBufferAttribute?es:Zi)(s,a.itemSize,a.normalized)}void 0!==a.name&&(M.name=a.name),n.setAttribute(g,M)}var c=A.data.morphAttributes;if(c)for(var u in c){for(var l=c[u],C=[],T=0,h=l.length;T0){var r=new IM(t);(e=new uM(r)).setCrossOrigin(this.crossOrigin);for(var o=0,g=A.length;oNumber.EPSILON){if(a<0&&(r=t[I],g=-g,o=t[n],a=-a),A.yo.y)continue;if(A.y===r.y){if(A.x===r.x)return!0}else{var M=a*(A.x-r.x)-g*(A.y-r.y);if(0===M)return!0;if(M<0)continue;i=!i}}else{if(A.y!==r.y)continue;if(o.x<=A.x&&A.x<=r.x||r.x<=A.x&&A.x<=o.x)return!0}}return i}var n=ra.isClockWise,I=this.subPaths;if(0===I.length)return[];if(!0===t)return e(I);var r,o,g,a=[];if(1===I.length)return o=I[0],(g=new bM).curves=o.curves,a.push(g),a;var M=!n(I[0].getPoints());M=A?!M:M;var s,c,u=[],l=[],C=[],T=0;l[T]=void 0,C[T]=[];for(var h=0,N=I.length;h1){for(var d=!1,y=[],E=0,D=l.length;E0&&(d||(C=u))}for(var w=0,m=l.length;w0){this.source.connect(this.filters[0]);for(var A=1,t=this.filters.length;A0){this.source.disconnect(this.filters[0]);for(var A=1,t=this.filters.length;A0&&this._mixBufferRegionAdditive(e,i,this._addIndex*t,1,t);for(var g=t,a=t+t;g!==a;++g)if(e[g]!==e[g+t]){r.setValue(e,i);break}},saveOriginalState:function(){var A=this.binding,t=this.buffer,e=this.valueSize,i=e*this._origIndex;A.getValue(t,i);for(var n=e,I=i;n!==I;++n)t[n]=t[i+n%e];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0},restoreOriginalState:function(){var A=3*this.valueSize;this.binding.setValue(this.buffer,A)},_setAdditiveIdentityNumeric:function(){for(var A=this._addIndex*this.valueSize,t=A+this.valueSize,e=A;e=.5)for(var I=0;I!==n;++I)A[t+I]=A[e+I]},_slerp:function(A,t,e,i){de.slerpFlat(A,t,A,t,A,e,i)},_slerpAdditive:function(A,t,e,i,n){var I=this._workIndex*n;de.multiplyQuaternionsFlat(A,I,A,t,A,e),de.slerpFlat(A,t,A,t,A,I,i)},_lerp:function(A,t,e,i,n){for(var I=1-i,r=0;r!==n;++r){var o=t+r;A[o]=A[o]*I+A[e+r]*i}},_lerpAdditive:function(A,t,e,i,n){for(var I=0;I!==n;++I){var r=t+I;A[r]=A[r]+A[e+I]*i}}});var vs="\\[\\]\\.:\\/",Us=new RegExp("["+vs+"]","g"),bs="[^"+vs+"]",Ps="[^"+vs.replace("\\.","")+"]",ks=/((?:WC+[\/:])*)/.source.replace("WC",bs),Gs=/(WCOD+)?/.source.replace("WCOD",Ps),Fs=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",bs),Js=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",bs),Hs=new RegExp("^"+ks+Gs+Fs+Js+"$"),Rs=["material","materials","bones"];function Xs(A,t,e){var i=e||Vs.parseTrackName(t);this._targetGroup=A,this._bindings=A.subscribe_(t,i)}function Vs(A,t,e){this.path=t,this.parsedPath=e||Vs.parseTrackName(t),this.node=Vs.findNode(A,this.parsedPath.nodeName)||A,this.rootNode=A}function Ws(A,t,e,i){this._mixer=A,this._clip=t,this._localRoot=e||null,this.blendMode=i||t.blendMode;for(var n=t.tracks,I=n.length,r=new Array(I),o={endingStart:Gt,endingEnd:Gt},g=0;g!==I;++g){var a=n[g].createInterpolant(null);r[g]=a,a.settings=o}this._interpolantSettings=o,this._interpolants=r,this._propertyBindings=new Array(I),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Zs(A){this._root=A,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Ks(A){"string"==typeof A&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),A=arguments[1]),this.value=A}function _s(A,t,e){To.call(this,A,t),this.meshPerAttribute=e||1}function qs(A,t,e,i){this.ray=new yi(A,t),this.near=e||0,this.far=i||1/0,this.camera=null,this.layers=new Ye,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function $s(A,t){return A.distance-t.distance}function Ac(A,t,e,i){if(A.layers.test(t.layers)&&A.raycast(t,e),!0===i)for(var n=A.children,I=0,r=n.length;I=I){var s=I++,c=t[s];e[c.uuid]=M,t[M]=c,e[a]=s,t[s]=g;for(var u=0,l=n;u!==l;++u){var C=i[u],T=C[s],h=C[M];C[M]=T,C[s]=h}}}this.nCachedObjects_=I},uncache:function(){for(var A=arguments,t=this._objects,e=this._indicesByUUID,i=this._bindings,n=i.length,I=this.nCachedObjects_,r=t.length,o=0,g=arguments.length;o!==g;++o){var a=A[o].uuid,M=e[a];if(void 0!==M)if(delete e[a],M0){var g=this._interpolants,a=this._propertyBindings;if(2501===this.blendMode)for(var M=0,s=g.length;M!==s;++M)g[M].evaluate(r),a[M].accumulateAdditive(o);else for(var c=0,u=g.length;c!==u;++c)g[c].evaluate(r),a[c].accumulate(i,o)}}else this._updateWeight(A)},_updateWeight:function(A){var t=0;if(this.enabled){t=this.weight;var e=this._weightInterpolant;if(null!==e){var i=e.evaluate(A)[0];t*=i,A>e.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=t,t},_updateTimeScale:function(A){var t=0;if(!this.paused){t=this.timeScale;var e=this._timeScaleInterpolant;null!==e&&(t*=e.evaluate(A)[0],A>e.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t},_updateTime:function(A){var t=this._clip.duration,e=this.loop,i=this.time+A,n=this._loopCount,I=2202===e;if(0===A)return-1===n?i:I&&1==(1&n)?t-i:i;if(2200===e){-1===n&&(this._loopCount=0,this._setEndings(!0,!0,!1));A:{if(i>=t)i=t;else{if(!(i<0)){this.time=i;break A}i=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:A<0?-1:1})}}else{if(-1===n&&(A>=0?(n=0,this._setEndings(!0,0===this.repetitions,I)):this._setEndings(0===this.repetitions,!0,I)),i>=t||i<0){var r=Math.floor(i/t);i-=t*r,n+=Math.abs(r);var o=this.repetitions-n;if(o<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=A>0?t:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:A>0?1:-1});else{if(1===o){var g=A<0;this._setEndings(g,!g,I)}else this._setEndings(!1,!1,I);this._loopCount=n,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:r})}}else this.time=i;if(I&&1==(1&n))return t-i}return i},_setEndings:function(A,t,e){var i=this._interpolantSettings;e?(i.endingStart=Ft,i.endingEnd=Ft):(i.endingStart=A?this.zeroSlopeAtStart?Ft:Gt:Jt,i.endingEnd=t?this.zeroSlopeAtEnd?Ft:Gt:Jt)},_scheduleFading:function(A,t,e){var i=this._mixer,n=i.time,I=this._weightInterpolant;null===I&&(I=i._lendControlInterpolant(),this._weightInterpolant=I);var r=I.parameterPositions,o=I.sampleValues;return r[0]=n,o[0]=t,r[1]=n+A,o[1]=e,this}}),Zs.prototype=Object.assign(Object.create(re.prototype),{constructor:Zs,_bindAction:function(A,t){var e=A._localRoot||this._root,i=A._clip.tracks,n=i.length,I=A._propertyBindings,r=A._interpolants,o=e.uuid,g=this._bindingsByRootAndName,a=g[o];void 0===a&&(a={},g[o]=a);for(var M=0;M!==n;++M){var s=i[M],c=s.name,u=a[c];if(void 0!==u)I[M]=u;else{if(void 0!==(u=I[M])){null===u._cacheIndex&&(++u.referenceCount,this._addInactiveBinding(u,o,c));continue}var l=t&&t._propertyBindings[M].binding.parsedPath;++(u=new Os(Vs.create(e,c,l),s.ValueTypeName,s.getValueSize())).referenceCount,this._addInactiveBinding(u,o,c),I[M]=u}r[M].resultBuffer=u.buffer}},_activateAction:function(A){if(!this._isActiveAction(A)){if(null===A._cacheIndex){var t=(A._localRoot||this._root).uuid,e=A._clip.uuid,i=this._actionsByClip[e];this._bindAction(A,i&&i.knownActions[0]),this._addInactiveAction(A,e,t)}for(var n=A._propertyBindings,I=0,r=n.length;I!==r;++I){var o=n[I];0==o.useCount++&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(A)}},_deactivateAction:function(A){if(this._isActiveAction(A)){for(var t=A._propertyBindings,e=0,i=t.length;e!==i;++e){var n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(A)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var A=this;this.stats={actions:{get total(){return A._actions.length},get inUse(){return A._nActiveActions}},bindings:{get total(){return A._bindings.length},get inUse(){return A._nActiveBindings}},controlInterpolants:{get total(){return A._controlInterpolants.length},get inUse(){return A._nActiveControlInterpolants}}}},_isActiveAction:function(A){var t=A._cacheIndex;return null!==t&&t=0;--t)A[t].stop();return this},update:function(A){A*=this.timeScale;for(var t=this._actions,e=this._nActiveActions,i=this.time+=A,n=Math.sign(A),I=this._accuIndex^=1,r=0;r!==e;++r)t[r]._update(i,A,n,I);for(var o=this._bindings,g=this._nActiveBindings,a=0;a!==g;++a)o[a].apply(I);return this},setTime:function(A){this.time=0;for(var t=0;tthis.max.x||A.ythis.max.y)},containsBox:function(A){return this.min.x<=A.min.x&&A.max.x<=this.max.x&&this.min.y<=A.min.y&&A.max.y<=this.max.y},getParameter:function(A,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new se),t.set((A.x-this.min.x)/(this.max.x-this.min.x),(A.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(A){return!(A.max.xthis.max.x||A.max.ythis.max.y)},clampPoint:function(A,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new se),t.copy(A).clamp(this.min,this.max)},distanceToPoint:function(A){return tc.copy(A).clamp(this.min,this.max).sub(A).length()},intersect:function(A){return this.min.max(A.min),this.max.min(A.max),this},union:function(A){return this.min.min(A.min),this.max.max(A.max),this},translate:function(A){return this.min.add(A),this.max.add(A),this},equals:function(A){return A.min.equals(this.min)&&A.max.equals(this.max)}});var ic=new De,nc=new De;function Ic(A,t){this.start=void 0!==A?A:new De,this.end=void 0!==t?t:new De}function rc(A){We.call(this),this.material=A,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}Object.assign(Ic.prototype,{set:function(A,t){return this.start.copy(A),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(A){return this.start.copy(A.start),this.end.copy(A.end),this},getCenter:function(A){return void 0===A&&(console.warn("THREE.Line3: .getCenter() target is now required"),A=new De),A.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(A){return void 0===A&&(console.warn("THREE.Line3: .delta() target is now required"),A=new De),A.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(A,t){return void 0===t&&(console.warn("THREE.Line3: .at() target is now required"),t=new De),this.delta(t).multiplyScalar(A).add(this.start)},closestPointToPointParameter:function(A,t){ic.subVectors(A,this.start),nc.subVectors(this.end,this.start);var e=nc.dot(nc),i=nc.dot(ic)/e;return t&&(i=Me.clamp(i,0,1)),i},closestPointToPoint:function(A,t,e){var i=this.closestPointToPointParameter(A,t);return void 0===e&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),e=new De),this.delta(e).multiplyScalar(i).add(this.start)},applyMatrix4:function(A){return this.start.applyMatrix4(A),this.end.applyMatrix4(A),this},equals:function(A){return A.start.equals(this.start)&&A.end.equals(this.end)}}),rc.prototype=Object.create(We.prototype),rc.prototype.constructor=rc,rc.prototype.isImmediateRenderObject=!0;var oc=new De;function gc(A,t){We.call(this),this.light=A,this.light.updateMatrixWorld(),this.matrix=A.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;for(var e=new Cn,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],n=0,I=1;n<32;n++,I++){var r=n/32*Math.PI*2,o=I/32*Math.PI*2;i.push(Math.cos(r),Math.sin(r),1,Math.cos(o),Math.sin(o),1)}e.setAttribute("position",new nn(i,3));var g=new Zo({fog:!1,toneMapped:!1});this.cone=new ng(e,g),this.add(this.cone),this.update()}gc.prototype=Object.create(We.prototype),gc.prototype.constructor=gc,gc.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},gc.prototype.update=function(){this.light.updateMatrixWorld();var A=this.light.distance?this.light.distance:1e3,t=A*Math.tan(this.light.angle);this.cone.scale.set(t,t,A),oc.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(oc),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var ac=new De,Mc=new we,sc=new we;function cc(A){var t=[];A&&A.isBone&&t.push(A);for(var e=0;e.99999)this.quaternion.set(0,0,0,1);else if(A.y<-.99999)this.quaternion.set(1,0,0,0);else{Oc.set(A.z,0,-A.x).normalize();var t=Math.acos(A.y);this.quaternion.setFromAxisAngle(Oc,t)}},vc.prototype.setLength=function(A,t,e){void 0===t&&(t=.2*A),void 0===e&&(e=.2*t),this.line.scale.set(1,Math.max(1e-4,A-t),1),this.line.updateMatrix(),this.cone.scale.set(e,t,e),this.cone.position.y=A,this.cone.updateMatrix()},vc.prototype.setColor=function(A){this.line.material.color.set(A),this.cone.material.color.set(A)},vc.prototype.copy=function(A){return We.prototype.copy.call(this,A,!1),this.line.copy(A.line),this.cone.copy(A.cone),this},vc.prototype.clone=function(){return(new this.constructor).copy(this)},Uc.prototype=Object.create(ng.prototype),Uc.prototype.constructor=Uc;var bc=[.125,.215,.35,.446,.526,.582],Pc=5+bc.length;new XM,function(){for(var A=[],t=[],e=[],i=8,n=0;n4?r=bc[n-8+4-1]:0==n&&(r=0),e.push(r);for(var o=1/(I-1),g=-o/2,a=1+o/2,M=[g,g,a,g,a,a,g,g,a,a,g,a],s=new Float32Array(108),c=new Float32Array(72),u=new Float32Array(36),l=0;l<6;l++){var C=l%3*2/3-1,T=l>2?0:-1,h=[C,T,0,C+2/3,T,0,C+2/3,T+1,0,C,T,0,C+2/3,T+1,0,C,T+1,0];s.set(h,18*l),c.set(M,12*l);var N=[l,l,l,l,l,l];u.set(N,6*l)}var d=new Cn;d.setAttribute("position",new Zi(s,3)),d.setAttribute("uv",new Zi(c,2)),d.setAttribute("faceIndex",new Zi(u,1)),A.push(d),i>4&&i--}}();var kc=(1+Math.sqrt(5))/2,Gc=1/kc;function Fc(A){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),BM.call(this,A),this.type="catmullrom"}function Jc(A){if("undefined"!=typeof window){var t=new RegExp(A+"=([^&#=]*)").exec(window.location.search);return t?decodeURIComponent(t[1]):void 0}}function Hc(A,t){return void 0!==A?A:t}function Rc(A,t){var e=Object.assign({},A);for(var i in t)void 0===A[i]&&(e[i]=t[i]);return e}function Xc(A,t){for(var e in t){var i=t[e];void 0!==i&&(A[e]=i)}return A}function Vc(){var A=window.location.protocol;return null===A.match(/http(s)?:/gi)?"http:":A}function Wc(){if("undefined"==typeof window)return!1;var A=window.navigator.userAgent;return/Opera|OPR/.test(A)?"Opera":/Chrome/i.test(A)?"Chrome":/Firefox/i.test(A)?"Firefox":/Mobile(\/.*)? Safari/i.test(A)?"Mobile Safari":/MSIE/i.test(A)?"Internet Explorer":!!/Safari/i.test(A)&&"Safari"}function Zc(A){window.open(A,"_blank")||(window.location.href=A)}function Kc(A,t){if(void 0===t&&(t="download"),A){var e="Safari"===Wc(),i=/CriOS\/[\d]+/.test(window.navigator.userAgent),n=document.createElement("a");if("undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(A,t);else if((e||i)&&FileReader)if(A instanceof Blob){var I=new FileReader;I.onloadend=function(){o(I.result)},I.readAsDataURL(A)}else o(A);else{var r=!1;A instanceof Blob&&(A=URL.createObjectURL(A),r=!0),"download"in n?(n.style.display="hidden",document.body.appendChild(n),n.href=A,n.download=t,n.target="_blank",n.click(),document.body.removeChild(n)):Zc(A),r&&window.URL.revokeObjectURL(A)}}function o(A){Zc(i?A:A.replace(/^data:[^;]*;/,"data:attachment/file;"))}}function _c(A,t){return At?1:0}function qc(A,t,e){void 0===e&&(e=_c);for(var i=0,n=A.length-1;i<=n;){var I=i+n>>1,r=e(t,A[I]);if(r>0)i=I+1;else{if(!(r<0))return I;n=I-1}}return-i-1}function $c(A,t,e){var i=function(A,t){var e=A.length-1;if(A[e]>1;A[n]>=t?e=n-1:i=n+1}return e+1}(A,t),n=function(A,t){if(A[0]>t)return-1;for(var e=0,i=A.length-1;e<=i;){var n=e+i>>1;A[n]>t?i=n-1:e=n+1}return e-1}(A,e);return-1===i||-1===n||i>n?0:n-i+1}function Au(A){return A.sort().filter((function(A,t,e){return 0===t||A!==e[t-1]}))}function tu(A){var t=28672;if(A.length>t){for(var e=[],i=0;i65535?Uint32Array:Uint16Array)(A)}function nu(A){return A.buffer&&A.buffer instanceof ArrayBuffer?A.buffer:A}function Iu(A,t){return void 0===A?A=new t:Array.isArray(A)&&(A=(new t).fromArray(A)),A}function ru(A){return Iu(A,De)}function ou(A){return Iu(A,we)}function gu(A){return Iu(A,de)}function au(A){return(t=A)instanceof(e=Float32Array)?t:new e(t);var t,e}function Mu(A){return Hc(A,"").toString().toLowerCase()}new De(1,1,1),new De(-1,1,1),new De(1,1,-1),new De(-1,1,-1),new De(0,kc,Gc),new De(0,kc,-Gc),new De(Gc,0,kc),new De(-Gc,0,kc),new De(kc,Gc,0),new De(-kc,Gc,0),TM.create=function(A,t){return console.log("THREE.Curve.create() has been deprecated"),A.prototype=Object.create(TM.prototype),A.prototype.constructor=A,A.prototype.getPoint=t,A},Object.assign(vM.prototype,{createPointsGeometry:function(A){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getPoints(A);return this.createGeometry(t)},createSpacedPointsGeometry:function(A){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getSpacedPoints(A);return this.createGeometry(t)},createGeometry:function(A){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var t=new kn,e=0,i=A.length;e>=4,Cu[e]=lu[19===e?3&A|8:A]);return Cu.join("")}function hu(A,t,e){return Math.max(t,Math.min(e,A))}function Nu(A,t,e){return A+(t-A)*e}function du(A,t,e,i,n,I){var r=(e-A)*I,o=(i-t)*I,g=n*n;return(2*t-2*e+r+o)*(n*g)+(-3*t+3*e-2*r-o)*g+r*n+t}function yu(A,t,e){return e=function(A){return hu(A,0,1)}(function(A,t,e){return(A-t)/(e-t)}(e,A,t)),e*e*(3-2*e)}var Eu="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e.g?e.g:"undefined"!=typeof self?self:{};function Du(A){var t={exports:{}};return A(t,t.exports),t.exports}var ju=Du((function(A,t){(function(){var e,i,n,I,r,o,g,a,M,s,c,u,l,C,T,h,N,d,y,E,D,j,B,x,p,L,f,z,w,m,Q,S,Y,O,v,U,b,P,k,G,F,J,H,R,X,V,W,Z,K,_,q,$,AA,tA,eA,iA,nA,IA,rA,oA,gA,aA,MA,sA,cA,uA,lA,CA,TA,hA,NA,dA,yA,EA,DA,jA,BA,xA,pA,LA,fA=[].slice;jA=function(){var A,t,e,i,n;for(A={},i=0,t=(n="Boolean Number String Function Array Date RegExp Undefined Null".split(" ")).length;ie&&(A=e),A},BA=function(A){return A.length>=3?Array.prototype.slice.call(A):A[0]},D=function(A){var t,e;for(A._clipped=!1,A._unclipped=A.slice(0),t=e=0;e<3;t=++e)t<3?((A[t]<0||A[t]>255)&&(A._clipped=!0),A[t]<0&&(A[t]=0),A[t]>255&&(A[t]=255)):3===t&&(A[t]<0&&(A[t]=0),A[t]>1&&(A[t]=1));return A._clipped||delete A._unclipped,A},I=Math.PI,NA=Math.round,B=Math.cos,z=Math.floor,eA=Math.pow,Z=Math.log,yA=Math.sin,EA=Math.sqrt,C=Math.atan2,q=Math.max,l=Math.abs,g=2*I,r=I/3,i=I/180,o=180/I,E=function(){return arguments[0]instanceof e?arguments[0]:function(A,t,e){e.prototype=A.prototype;var i=new e,n=A.apply(i,t);return Object(n)===n?n:i}(e,arguments,(function(){}))},E.default=E,u=[],null!==A&&null!=A.exports&&(A.exports=E),(null!==t?t:this).chroma=E,E.version="1.4.1",c={},M=[],s=!1,e=function(){function A(){var A,t,e,i,n,I,r,o,g,a=arguments;for(I=this,t=[],o=0,i=arguments.length;o1&&(r=t[t.length-1]),null!=c[r])I._rgb=D(c[r](BA(t.slice(0,-1))));else{for(s||(M=M.sort((function(A,t){return t.p-A.p})),s=!0),g=0,n=M.length;g3?t[3]:1]},LA=function(A){return 255*(A<=.00304?12.92*A:1.055*eA(A,1/2.4)-.055)},H=function(A){return A>n.t1?A*A*A:n.t2*(A-n.t0)},n={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},MA=function(){var A,t,e,i,n,I,r;return e=(i=BA(arguments))[0],t=i[1],A=i[2],I=(n=CA(e,t,A))[0],[116*(r=n[1])-16,500*(I-r),200*(r-n[2])]},TA=function(A){return(A/=255)<=.04045?A/12.92:eA((A+.055)/1.055,2.4)},pA=function(A){return A>n.t3?eA(A,1/3):A/n.t2+n.t0},CA=function(){var A,t,e,i;return e=(i=BA(arguments))[0],t=i[1],A=i[2],e=TA(e),t=TA(t),A=TA(A),[pA((.4124564*e+.3575761*t+.1804375*A)/n.Xn),pA((.2126729*e+.7151522*t+.072175*A)/n.Yn),pA((.0193339*e+.119192*t+.9503041*A)/n.Zn)]},E.lab=function(){return function(A,t,e){e.prototype=A.prototype;var i=new e,n=A.apply(i,t);return Object(n)===n?n:i}(e,fA.call(arguments).concat(["lab"]),(function(){}))},c.lab=J,e.prototype.lab=function(){return MA(this._rgb)},T=function(A){var t,e,i,n,I,r,o,g,a,M,s;return 2===(A=function(){var t,e,i;for(i=[],e=0,t=A.length;e=0&&t[3]<=1?"rgb":void 0}}),c.lrgb=c.rgb,P=function(A,t,i,n){var I,r;return I=A._rgb,r=t._rgb,new e(EA(eA(I[0],2)*(1-i)+eA(r[0],2)*i),EA(eA(I[1],2)*(1-i)+eA(r[1],2)*i),EA(eA(I[2],2)*(1-i)+eA(r[2],2)*i),n)},a=function(A){var t,i,n,I,r;for(t=1/A.length,r=[0,0,0,0],n=0,i=A.length;n1&&(r[3]=1),new e(D(r))},u.push(["lrgb",P]),E.average=function(A,t){var e,i,n,r,o,g,M,s,c,u,l,T,h;if(null==t&&(t="rgb"),c=A.length,A=A.map((function(A){return E(A)})),M=A.splice(0,1)[0],"lrgb"===t)return a(A);for(s in r=[],o=0,g=0,T=M.get(t))T[s]=T[s]||0,r.push(isNaN(T[s])?0:1),"h"!==t.charAt(s)||isNaN(T[s])||(e=T[s]/180*I,o+=B(e),g+=yA(e));for(i=M.alpha(),l=0,u=A.length;l=360;)e-=360;T[s]=e}else T[s]=T[s]/r[s];return E(T,t).alpha(i/c)},m=function(A){var t,e;if(A.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/))return 4!==A.length&&7!==A.length||(A=A.substr(1)),3===A.length&&(A=(A=A.split(""))[0]+A[0]+A[1]+A[1]+A[2]+A[2]),[(e=parseInt(A,16))>>16,e>>8&255,255&e,1];if(A.match(/^#?([A-Fa-f0-9]{8})$/))return 9===A.length&&(A=A.substr(1)),[(e=parseInt(A,16))>>24&255,e>>16&255,e>>8&255,NA((255&e)/255*100)/100];if(null!=c.css&&(t=c.css(A)))return t;throw"unknown color: "+A},rA=function(A,t){var e,i,n,I,r,o;return null==t&&(t="auto"),r=A[0],n=A[1],i=A[2],e=A[3],"auto"===t&&(t=e<1?"rgba":"rgb"),r=Math.round(r),n=Math.round(n),i=Math.round(i),o=(o="000000"+(r<<16|n<<8|i).toString(16)).substr(o.length-6),I=(I="0"+NA(255*e).toString(16)).substr(I.length-2),"#"+function(){switch(t.toLowerCase()){case"rgba":return o+I;case"argb":return I+o;default:return o}}()},c.hex=function(A){return m(A)},E.hex=function(){return function(A,t,e){e.prototype=A.prototype;var i=new e,n=A.apply(i,t);return Object(n)===n?n:i}(e,fA.call(arguments).concat(["hex"]),(function(){}))},e.prototype.hex=function(A){return null==A&&(A="auto"),rA(this._rgb,A)},M.push({p:4,test:function(A){if(1===arguments.length&&"string"===jA(A))return"hex"}}),Y=function(){var A,t,e,i,n,I,r,o,g,a,M,s,c,u;if(n=(A=BA(arguments))[0],M=A[1],r=A[2],0===M)g=i=t=255*r;else{for(e=[0,0,0],s=2*r-(c=r<.5?r*(1+M):r+M-r*M),(u=[0,0,0])[0]=(n/=360)+1/3,u[1]=n,u[2]=n-1/3,I=o=0;o<=2;I=++o)u[I]<0&&(u[I]+=1),u[I]>1&&(u[I]-=1),6*u[I]<1?e[I]=s+6*(c-s)*u[I]:2*u[I]<1?e[I]=c:3*u[I]<2?e[I]=s+(c-s)*(2/3-u[I])*6:e[I]=s;g=(a=[NA(255*e[0]),NA(255*e[1]),NA(255*e[2])])[0],i=a[1],t=a[2]}return A.length>3?[g,i,t,A[3]]:[g,i,t]},gA=function(A,t,e){var i,n,I,r,o;return void 0!==A&&A.length>=3&&(A=(r=A)[0],t=r[1],e=r[2]),A/=255,t/=255,e/=255,I=Math.min(A,t,e),n=((q=Math.max(A,t,e))+I)/2,q===I?(o=0,i=Number.NaN):o=n<.5?(q-I)/(q+I):(q-I)/(2-q-I),A===q?i=(t-e)/(q-I):t===q?i=2+(e-A)/(q-I):e===q&&(i=4+(A-t)/(q-I)),(i*=60)<0&&(i+=360),[i,o,n]},E.hsl=function(){return function(A,t,e){e.prototype=A.prototype;var i=new e,n=A.apply(i,t);return Object(n)===n?n:i}(e,fA.call(arguments).concat(["hsl"]),(function(){}))},c.hsl=Y,e.prototype.hsl=function(){return gA(this._rgb)},O=function(){var A,t,e,i,n,I,r,o,g,a,M,s,c,u,l,C,T,h;if(n=(A=BA(arguments))[0],C=A[1],h=A[2],h*=255,0===C)g=i=t=h;else switch(360===n&&(n=0),n>360&&(n-=360),n<0&&(n+=360),r=h*(1-C),o=h*(1-C*(e=(n/=60)-(I=z(n)))),T=h*(1-C*(1-e)),I){case 0:g=(a=[h,T,r])[0],i=a[1],t=a[2];break;case 1:g=(M=[o,h,r])[0],i=M[1],t=M[2];break;case 2:g=(s=[r,h,T])[0],i=s[1],t=s[2];break;case 3:g=(c=[r,o,h])[0],i=c[1],t=c[2];break;case 4:g=(u=[T,r,h])[0],i=u[1],t=u[2];break;case 5:g=(l=[h,r,o])[0],i=l[1],t=l[2]}return[g,i,t,A.length>3?A[3]:1]},aA=function(){var A,t,e,i,n,I,r,o,g;return I=(r=BA(arguments))[0],e=r[1],A=r[2],n=Math.min(I,e,A),t=(q=Math.max(I,e,A))-n,g=q/255,0===q?(i=Number.NaN,o=0):(o=t/q,I===q&&(i=(e-A)/t),e===q&&(i=2+(A-I)/t),A===q&&(i=4+(I-e)/t),(i*=60)<0&&(i+=360)),[i,o,g]},E.hsv=function(){return function(A,t,e){e.prototype=A.prototype;var i=new e,n=A.apply(i,t);return Object(n)===n?n:i}(e,fA.call(arguments).concat(["hsv"]),(function(){}))},c.hsv=O,e.prototype.hsv=function(){return aA(this._rgb)},AA=function(A){return"number"===jA(A)&&A>=0&&A<=16777215?[A>>16,A>>8&255,255&A,1]:(console.warn("unknown num color: "+A),[0,0,0,1])},uA=function(){var A;return((A=BA(arguments))[0]<<16)+(A[1]<<8)+A[2]},E.num=function(A){return new e(A,"num")},e.prototype.num=function(A){return null==A&&(A="rgb"),uA(this._rgb,A)},c.num=AA,M.push({p:1,test:function(A){if(1===arguments.length&&"number"===jA(A)&&A>=0&&A<=16777215)return"num"}}),w=function(){var A,t,e,i,n,I,r,o,g,a,M,s,c,u,l,C,T,h,N,d;if(o=(e=BA(arguments))[0],n=e[1],t=e[2],r=r/100*255,A=255*(n/=100),0===n)s=r=i=t;else switch(360===o&&(o=0),o>360&&(o-=360),o<0&&(o+=360),M=(a=t*(1-n))+A*(1-(I=(o/=60)-(g=z(o)))),N=a+A*I,d=a+A,g){case 0:s=(c=[d,N,a])[0],r=c[1],i=c[2];break;case 1:s=(u=[M,d,a])[0],r=u[1],i=u[2];break;case 2:s=(l=[a,d,N])[0],r=l[1],i=l[2];break;case 3:s=(C=[a,M,d])[0],r=C[1],i=C[2];break;case 4:s=(T=[N,a,d])[0],r=T[1],i=T[2];break;case 5:s=(h=[d,a,M])[0],r=h[1],i=h[2]}return[s,r,i,e.length>3?e[3]:1]},IA=function(){var A,t,e,i,n,I,r,o,g;return o=(g=BA(arguments))[0],n=g[1],t=g[2],r=Math.min(o,n,t),e=100*(i=(q=Math.max(o,n,t))-r)/255,A=r/(255-i)*100,0===i?I=Number.NaN:(o===q&&(I=(n-t)/i),n===q&&(I=2+(t-o)/i),t===q&&(I=4+(o-n)/i),(I*=60)<0&&(I+=360)),[I,e,A]},E.hcg=function(){return function(A,t,e){e.prototype=A.prototype;var i=new e,n=A.apply(i,t);return Object(n)===n?n:i}(e,fA.call(arguments).concat(["hcg"]),(function(){}))},c.hcg=w,e.prototype.hcg=function(){return IA(this._rgb)},x=function(A){var t,e,i,n,I,r,o,g;if(A=A.toLowerCase(),null!=E.colors&&E.colors[A])return m(E.colors[A]);if(I=A.match(/rgb\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*\)/)){for(o=I.slice(1,4),n=r=0;r<=2;n=++r)o[n]=+o[n];o[3]=1}else if(I=A.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/))for(o=I.slice(1,5),n=g=0;g<=3;n=++g)o[n]=+o[n];else if(I=A.match(/rgb\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){for(o=I.slice(1,4),n=t=0;t<=2;n=++t)o[n]=NA(2.55*o[n]);o[3]=1}else if(I=A.match(/rgba\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){for(o=I.slice(1,5),n=e=0;e<=2;n=++e)o[n]=NA(2.55*o[n]);o[3]=+o[3]}else(I=A.match(/hsl\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/))?((i=I.slice(1,4))[1]*=.01,i[2]*=.01,(o=Y(i))[3]=1):(I=A.match(/hsla\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/))&&((i=I.slice(1,4))[1]*=.01,i[2]*=.01,(o=Y(i))[3]=+I[4]);return o},nA=function(A){var t;return"rgb"==(t=A[3]<1?"rgba":"rgb")?t+"("+A.slice(0,3).map(NA).join(",")+")":"rgba"===t?t+"("+A.slice(0,3).map(NA).join(",")+","+A[3]+")":void 0},hA=function(A){return NA(100*A)/100},S=function(A,t){var e;return e=t<1?"hsla":"hsl",A[0]=hA(A[0]||0),A[1]=hA(100*A[1])+"%",A[2]=hA(100*A[2])+"%","hsla"===e&&(A[3]=t),e+"("+A.join(",")+")"},c.css=function(A){return x(A)},E.css=function(){return function(A,t,e){e.prototype=A.prototype;var i=new e,n=A.apply(i,t);return Object(n)===n?n:i}(e,fA.call(arguments).concat(["css"]),(function(){}))},e.prototype.css=function(A){return null==A&&(A="rgb"),"rgb"===A.slice(0,3)?nA(this._rgb):"hsl"===A.slice(0,3)?S(this.hsl(),this.alpha()):void 0},c.named=function(A){return m(xA[A])},M.push({p:5,test:function(A){if(1===arguments.length&&null!=xA[A])return"named"}}),e.prototype.name=function(A){var t,e;for(e in arguments.length&&(xA[A]&&(this._rgb=m(xA[A])),this._rgb[3]=1),t=this.hex("rgb"),xA)if(t===xA[e])return e;return t},R=function(){var A,t,e,n;return e=(n=BA(arguments))[0],A=n[1],t=n[2],[e,B(t*=i)*A,yA(t)*A]},X=function(){var A,t,e,i,n,I,r,o,g;return r=(e=BA(arguments))[0],n=e[1],I=e[2],A=(o=R(r,n,I))[0],t=o[1],i=o[2],[(g=J(A,t,i))[0],g[1],i=g[2],e.length>3?e[3]:1]},F=function(){var A,t,e,i,n,I;return n=(I=BA(arguments))[0],A=I[1],t=I[2],e=EA(A*A+t*t),i=(C(t,A)*o+360)%360,0===NA(1e4*e)&&(i=Number.NaN),[n,e,i]},sA=function(){var A,t,e,i,n,I,r;return n=(I=BA(arguments))[0],e=I[1],t=I[2],i=(r=MA(n,e,t))[0],A=r[1],t=r[2],F(i,A,t)},E.lch=function(){var A;return A=BA(arguments),new e(A,"lch")},E.hcl=function(){var A;return A=BA(arguments),new e(A,"hcl")},c.lch=X,c.hcl=function(){var A,t,e,i;return t=(i=BA(arguments))[0],A=i[1],e=i[2],X([e,A,t])},e.prototype.lch=function(){return sA(this._rgb)},e.prototype.hcl=function(){return sA(this._rgb).reverse()},iA=function(A){var t,e,i,n,I,r;return null==A&&(A="rgb"),I=(r=BA(arguments))[0],i=r[1],t=r[2],i/=255,t/=255,[(1-(I/=255)-(n=1-Math.max(I,Math.max(i,t))))*(e=n<1?1/(1-n):0),(1-i-n)*e,(1-t-n)*e,n]},j=function(){var A,t,e,i,n,I;return e=(t=BA(arguments))[0],n=t[1],I=t[2],i=t[3],A=t.length>4?t[4]:1,1===i?[0,0,0,A]:[e>=1?0:255*(1-e)*(1-i),n>=1?0:255*(1-n)*(1-i),I>=1?0:255*(1-I)*(1-i),A]},c.cmyk=function(){return j(BA(arguments))},E.cmyk=function(){return function(A,t,e){e.prototype=A.prototype;var i=new e,n=A.apply(i,t);return Object(n)===n?n:i}(e,fA.call(arguments).concat(["cmyk"]),(function(){}))},e.prototype.cmyk=function(){return iA(this._rgb)},c.gl=function(){var A,t,e,i,n;for(i=function(){var A,e;for(t in e=[],A=BA(arguments))n=A[t],e.push(n);return e}.apply(this,arguments),A=e=0;e<=2;A=++e)i[A]*=255;return i},E.gl=function(){return function(A,t,e){e.prototype=A.prototype;var i=new e,n=A.apply(i,t);return Object(n)===n?n:i}(e,fA.call(arguments).concat(["gl"]),(function(){}))},e.prototype.gl=function(){var A;return[(A=this._rgb)[0]/255,A[1]/255,A[2]/255,A[3]]},cA=function(A,t,e){var i;return A=(i=BA(arguments))[0],t=i[1],e=i[2],.2126*(A=K(A))+.7152*(t=K(t))+.0722*K(e)},K=function(A){return(A/=255)<=.03928?A/12.92:eA((A+.055)/1.055,2.4)},G=function(A,t,i,n){var I,r;return I=A._rgb,r=t._rgb,new e(I[0]+i*(r[0]-I[0]),I[1]+i*(r[1]-I[1]),I[2]+i*(r[2]-I[2]),n)},u.push(["rgb",G]),e.prototype.luminance=function(A,t){var e,i,n,I;return null==t&&(t="rgb"),arguments.length?(n=this._rgb,0===A?n=[0,0,0,this._rgb[3]]:1===A?n=[255,255,255,this[3]]:(e=cA(this._rgb),i=20,I=function(e,n){var r,o;return r=(o=e.interpolate(n,.5,t)).luminance(),Math.abs(A-r)<1e-7||!i--?o:r>A?I(e,o):I(o,n)},n=e>A?I(E("black"),this).rgba():I(this,E("white")).rgba()),E(n).alpha(this.alpha())):cA(this._rgb)},DA=function(A){var t,e,i,n;return(n=A/100)<66?(i=255,e=-155.25485562709179-.44596950469579133*(e=n-2)+104.49216199393888*Z(e),t=n<20?0:.8274096064007395*(t=n-10)-254.76935184120902+115.67994401066147*Z(t)):(i=351.97690566805693+.114206453784165*(i=n-55)-40.25366309332127*Z(i),e=325.4494125711974+.07943456536662342*(e=n-50)-28.0852963507957*Z(e),t=255),[i,e,t]},lA=function(){var A,t,e,i,n,I,r;for(i=(n=BA(arguments))[0],A=n[2],e=1e3,t=4e4;t-e>.4;)(I=DA(r=.5*(t+e)))[2]/I[0]>=A/i?t=r:e=r;return NA(r)},E.temperature=E.kelvin=function(){return function(A,t,e){e.prototype=A.prototype;var i=new e,n=A.apply(i,t);return Object(n)===n?n:i}(e,fA.call(arguments).concat(["temperature"]),(function(){}))},c.temperature=c.kelvin=c.K=DA,e.prototype.temperature=function(){return lA(this._rgb)},e.prototype.kelvin=e.prototype.temperature,E.contrast=function(A,t){var i,n,I,r;return"string"!==(I=jA(A))&&"number"!==I||(A=new e(A)),"string"!==(r=jA(t))&&"number"!==r||(t=new e(t)),(i=A.luminance())>(n=t.luminance())?(i+.05)/(n+.05):(n+.05)/(i+.05)},E.distance=function(A,t,i){var n,I,r,o,g,a,M;for(I in null==i&&(i="lab"),"string"!==(g=jA(A))&&"number"!==g||(A=new e(A)),"string"!==(a=jA(t))&&"number"!==a||(t=new e(t)),r=A.get(i),o=t.get(i),M=0,r)M+=(n=(r[I]||0)-(o[I]||0))*n;return Math.sqrt(M)},E.deltaE=function(A,t,i,n){var r,o,g,a,M,s,c,u,T,h,N,d,y,E,D,j,x,p,L,f,z,w,m,Q;for(null==i&&(i=1),null==n&&(n=1),"string"!==(D=jA(A))&&"number"!==D||(A=new e(A)),"string"!==(j=jA(t))&&"number"!==j||(t=new e(t)),r=(x=A.lab())[0],g=x[1],M=x[2],o=(p=t.lab())[0],a=p[1],s=p[2],c=EA(g*g+M*M),u=EA(a*a+s*s),f=r<16?.511:.040975*r/(1+.01765*r),L=.0638*c/(1+.0131*c)+.638,E=c<1e-6?0:180*C(M,g)/I;E<0;)E+=360;for(;E>=360;)E-=360;return z=E>=164&&E<=345?.56+l(.2*B(I*(E+168)/180)):.36+l(.4*B(I*(E+35)/180)),y=EA((T=c*c*c*c)/(T+1900)),EA((w=(r-o)/(i*f))*w+(m=(d=c-u)/(n*L))*m+((h=g-a)*h+(N=M-s)*N-d*d)/((Q=L*(y*z+1-y))*Q))},e.prototype.get=function(A){var t,e,i,n,I;return i=(n=A.split("."))[0],t=n[1],I=this[i](),t?(e=i.indexOf(t))>-1?I[e]:console.warn("unknown channel "+t+" in mode "+i):I},e.prototype.set=function(A,t){var e,i,n,I,r;if(n=(I=A.split("."))[0],e=I[1])if(r=this[n](),(i=n.indexOf(e))>-1)if("string"===jA(t))switch(t.charAt(0)){case"+":case"-":r[i]+=+t;break;case"*":r[i]*=+t.substr(1);break;case"/":r[i]/=+t.substr(1);break;default:r[i]=+t}else r[i]=t;else console.warn("unknown channel "+e+" in mode "+n);else r=t;return E(r,n).alpha(this.alpha())},e.prototype.clipped=function(){return this._rgb._clipped||!1},e.prototype.alpha=function(A){return arguments.length?E.rgb([this._rgb[0],this._rgb[1],this._rgb[2],A]):this._rgb[3]},e.prototype.darken=function(A){var t;return null==A&&(A=1),(t=this.lab())[0]-=n.Kn*A,E.lab(t).alpha(this.alpha())},e.prototype.brighten=function(A){return null==A&&(A=1),this.darken(-A)},e.prototype.darker=e.prototype.darken,e.prototype.brighter=e.prototype.brighten,e.prototype.saturate=function(A){var t;return null==A&&(A=1),(t=this.lch())[1]+=A*n.Kn,t[1]<0&&(t[1]=0),E.lch(t).alpha(this.alpha())},e.prototype.desaturate=function(A){return null==A&&(A=1),this.saturate(-A)},e.prototype.premultiply=function(){var A,t;return t=this.rgb(),A=this.alpha(),E(t[0]*A,t[1]*A,t[2]*A,A)},f=function(A){return function(t,e){var i,n,I;for(I=[],i=n=0;n<=3;i=++n)I[i]=A(t[i],e[i]);return I}},$=function(A,t){return A*t/255},p=function(A,t){return A>t?t:A},V=function(A,t){return A>t?A:t},dA=function(A,t){return 255*(1-(1-A/255)*(1-t/255))},tA=function(A,t){return t<128?2*A*t/255:255*(1-2*(1-A/255)*(1-t/255))},y=function(A,t){return 255*(1-(1-t/255)/(A/255))},L=function(A,t){return 255===A||(A=t/255*255/(1-A/255))>255?255:A},(h=function(A,t,e){if(!h[e])throw"unknown blend mode "+e;return h[e](A,t)}).normal=(N=function(A){return function(t,e){var i,n;return i=E(e).rgb(),n=E(t).rgb(),E(A(i,n),"rgb")}})(f((function(A,t){return A}))),h.multiply=N(f($)),h.screen=N(f(dA)),h.overlay=N(f(tA)),h.darken=N(f(p)),h.lighten=N(f(V)),h.dodge=N(f(L)),h.burn=N(f(y)),E.blend=h,E.analyze=function(A){var t,e,i,n;for(i={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},e=0,t=A.length;ei.max&&(i.max=n),i.count+=1);return i.domain=[i.min,i.max],i.limits=function(A,t){return E.limits(i,A,t)},i},E.scale=function(A,t){var e,i,n,I,r,o,g,a,M,s,c,u,l,C,T,h,N,d,y,D,j;return M="rgb",s=E("#ccc"),C=0,r=[0,1],l=[],u=[0,0],e=!1,n=[],c=!1,a=0,g=1,I=!1,i={},T=!0,o=1,D=function(A){var t,e,i,I,r,o;if(null==A&&(A=["#fff","#000"]),null!=A&&"string"===jA(A)&&null!=E.brewer&&(A=E.brewer[A]||E.brewer[A.toLowerCase()]||A),"array"===jA(A)){for(1===A.length&&(A=[A[0],A[0]]),t=i=0,I=(A=A.slice(0)).length-1;0<=I?i<=I:i>=I;t=0<=I?++i:--i)e=A[t],"string"===jA(e)&&(A[t]=E(e));for(l.length=0,t=o=0,r=A.length-1;0<=r?o<=r:o>=r;t=0<=r?++o:--o)l.push(t/(A.length-1))}return y(),n=A},N=function(A){var t,i;if(null!=e){for(i=e.length-1,t=0;t=e[t];)t++;return t-1}return 0},j=function(A){return A},d=function(A,t){var I,r,c,C,h,d,y;if(null==t&&(t=!1),isNaN(A)||null===A)return s;if(y=t?A:e&&e.length>2?N(A)/(e.length-2):g!==a?(A-a)/(g-a):1,t||(y=j(y)),1!==o&&(y=eA(y,o)),y=u[0]+y*(1-u[0]-u[1]),y=Math.min(1,Math.max(0,y)),c=Math.floor(1e4*y),T&&i[c])I=i[c];else{if("array"===jA(n))for(r=C=0,d=l.length-1;0<=d?C<=d:C>=d;r=0<=d?++C:--C){if(y<=(h=l[r])){I=n[r];break}if(y>=h&&r===l.length-1){I=n[r];break}if(y>h&&y=M;t=0<=M?++s:--s)l.push(t/(i-1));return r=[a,g],h},h.mode=function(A){return arguments.length?(M=A,y(),h):M},h.range=function(A,t){return D(A),h},h.out=function(A){return c=A,h},h.spread=function(A){return arguments.length?(C=A,h):C},h.correctLightness=function(A){return null==A&&(A=!0),I=A,y(),j=I?function(A){var t,e,i,n,I,r,o,g;for(r=(t=d(0,!0).lab()[0])>(e=d(1,!0).lab()[0]),i=d(A,!0).lab()[0]-(n=t+(e-t)*A),o=0,g=1,I=20;Math.abs(i)>.01&&I-- >0;)r&&(i*=-1),i<0?(o=A,A+=.5*(g-A)):(g=A,A+=.5*(o-A)),i=d(A,!0).lab()[0]-n;return A}:function(A){return A},h},h.padding=function(A){return null!=A?("number"===jA(A)&&(A=[A,A]),u=A,h):u},h.colors=function(t,i){var I,o,g,a,M,s,c,u;if(arguments.length<2&&(i="hex"),M=[],0===arguments.length)M=n.slice(0);else if(1===t)M=[h(.5)];else if(t>1)o=r[0],I=r[1]-o,M=function(){s=[];for(var A=0;0<=t?At;0<=t?A++:A--)s.push(A);return s}.apply(this).map((function(A){return h(o+A/(t-1)*I)}));else{if(A=[],c=[],e&&e.length>2)for(g=u=1,a=e.length;1<=a?ua;g=1<=a?++u:--u)c.push(.5*(e[g-1]+e[g]));else c=r;M=c.map((function(A){return h(A)}))}return E[i]&&(M=M.map((function(A){return A[i]()}))),M},h.cache=function(A){return null!=A?(T=A,h):T},h.gamma=function(A){return null!=A?(o=A,h):o},h.nodata=function(A){return null!=A?(s=E(A),h):s},h},null==E.scales&&(E.scales={}),E.scales.cool=function(){return E.scale([E.hsl(180,1,.9),E.hsl(250,.7,.4)])},E.scales.hot=function(){return E.scale(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")},E.analyze=function(A,t,e){var i,n,I,r,o,g;if(o={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},null==e&&(e=function(){return!0}),i=function(A){null==A||isNaN(A)||(o.values.push(A),o.sum+=A,Ao.max&&(o.max=A),o.count+=1)},g=function(A,n){if(e(A,n))return null!=t&&"function"===jA(t)?i(t(A)):null!=t&&"string"===jA(t)||"number"===jA(t)?i(A[t]):i(A)},"array"===jA(A))for(r=0,I=A.length;r=k;B=1<=k?++v:--v)L.push(w+B/e*(q-w));L.push(q)}else if("l"===t.substr(0,1)){if(w<=0)throw"Logarithmic scales are only possible for values > 0";for(m=Math.LOG10E*Z(w),f=Math.LOG10E*Z(q),L.push(w),B=aA=1,G=e-1;1<=G?aA<=G:aA>=G;B=1<=G?++aA:--aA)L.push(eA(10,m+B/e*(f-m)));L.push(q)}else if("q"===t.substr(0,1)){for(L.push(w),B=i=1,V=e-1;1<=V?i<=V:i>=V;B=1<=V?++i:--i)U=(gA.length-1)*B/e,(b=z(U))===U?L.push(gA[b]):(P=U-b,L.push(gA[b]*(1-P)+gA[b+1]*P));L.push(q)}else if("k"===t.substr(0,1)){for(S=gA.length,h=new Array(S),D=new Array(e),nA=!0,Y=0,d=null,(d=[]).push(w),B=n=1,W=e-1;1<=W?n<=W:n>=W;B=1<=W?++n:--n)d.push(w+B/e*(q-w));for(d.push(q);nA;){for(x=I=0,K=e-1;0<=K?I<=K:I>=K;x=0<=K?++I:--I)D[x]=0;for(B=r=0,_=S-1;0<=_?r<=_:r>=_;B=0<=_?++r:--r){for(oA=gA[B],Q=Number.MAX_VALUE,x=o=0,$=e-1;0<=$?o<=$:o>=$;x=0<=$?++o:--o)(j=l(d[x]-oA))=AA;x=0<=AA?++g:--g)O[x]=null;for(B=a=0,tA=S-1;0<=tA?a<=tA:a>=tA;B=0<=tA?++a:--a)null===O[y=h[B]]?O[y]=gA[B]:O[y]+=gA[B];for(x=M=0,iA=e-1;0<=iA?M<=iA:M>=iA;x=0<=iA?++M:--M)O[x]*=1/D[x];for(nA=!1,x=s=0,F=e-1;0<=F?s<=F:s>=F;x=0<=F?++s:--s)if(O[x]!==d[B]){nA=!0;break}d=O,++Y>200&&(nA=!1)}for(p={},x=c=0,J=e-1;0<=J?c<=J:c>=J;x=0<=J?++c:--c)p[x]=[];for(B=u=0,H=S-1;0<=H?u<=H:u>=H;B=0<=H?++u:--u)p[y=h[B]].push(gA[B]);for(IA=[],x=C=0,R=e-1;0<=R?C<=R:C>=R;x=0<=R?++C:--C)IA.push(p[x][0]),IA.push(p[x][p[x].length-1]);for(IA=IA.sort((function(A,t){return A-t})),L.push(IA[0]),B=T=1,X=IA.length-1;T<=X;B=T+=2)rA=IA[B],isNaN(rA)||-1!==L.indexOf(rA)||L.push(rA)}return L},Q=function(A,t,e){var i,n,I,o;return A=(i=BA(arguments))[0],t=i[1],e=i[2],isNaN(A)&&(A=0),(A/=360)<1/3?I=1-((n=(1-t)/3)+(o=(1+t*B(g*A)/B(r-g*A))/3)):A<2/3?n=1-((o=(1-t)/3)+(I=(1+t*B(g*(A-=1/3))/B(r-g*A))/3)):o=1-((I=(1-t)/3)+(n=(1+t*B(g*(A-=2/3))/B(r-g*A))/3)),[255*(o=W(e*o*3)),255*(I=W(e*I*3)),255*(n=W(e*n*3)),i.length>3?i[3]:1]},oA=function(){var A,t,e,i,n,I,r;return n=(I=BA(arguments))[0],t=I[1],A=I[2],g=2*Math.PI,n/=255,t/=255,A/=255,0==(r=1-Math.min(n,t,A)/(i=(n+t+A)/3))?e=0:(e=(n-t+(n-A))/2,e/=Math.sqrt((n-t)*(n-t)+(n-A)*(t-A)),e=Math.acos(e),A>t&&(e=g-e),e/=g),[360*e,r,i]},E.hsi=function(){return function(A,t,e){e.prototype=A.prototype;var i=new e,n=A.apply(i,t);return Object(n)===n?n:i}(e,fA.call(arguments).concat(["hsi"]),(function(){}))},c.hsi=Q,e.prototype.hsi=function(){return oA(this._rgb)},U=function(A,t,e,i){var n,I,r,o,g,a,M,s,c,u;return"hsl"===i?(c=A.hsl(),u=t.hsl()):"hsv"===i?(c=A.hsv(),u=t.hsv()):"hcg"===i?(c=A.hcg(),u=t.hcg()):"hsi"===i?(c=A.hsi(),u=t.hsi()):"lch"!==i&&"hcl"!==i||(i="hcl",c=A.hcl(),u=t.hcl()),"h"===i.substr(0,1)&&(I=c[0],M=c[1],o=c[2],r=u[0],s=u[1],g=u[2]),isNaN(I)||isNaN(r)?isNaN(I)?isNaN(r)?n=Number.NaN:(n=r,1!==o&&0!==o||"hsv"===i||(a=s)):(n=I,1!==g&&0!==g||"hsv"===i||(a=M)):n=I+e*(r>I&&r-I>180?r-(I+360):r180?r+360-I:r-I),null==a&&(a=M+e*(s-M)),E[i](n,a,o+e*(g-o))},k=function(A,t,e,i){var n,I;return n=A.num(),I=t.num(),E.num(n+(I-n)*e,"num")},(u=u.concat(function(){var A,t,e,i;for(i=[],t=0,A=(e=["hsv","hsl","hsi","hcl","lch","hcg"]).length;t>16&255)/255,t[e+1]=(A>>8&255)/255,t[e+2]=(255&A)/255,t},fu.prototype.atomColorToArray=function(A,t,e){return this.colorToArray(this.atomColor?this.atomColor(A):0,t,e)},fu.prototype.bondColor=function(A,t){return this.atomProxy&&this.atomColor?(this.atomProxy.index=t?A.atomIndex1:A.atomIndex2,this.atomColor(this.atomProxy)):0},fu.prototype.bondColorToArray=function(A,t,e,i){return this.colorToArray(this.bondColor(A,t),e,i)},fu.prototype.volumeColorToArray=function(A,t,e){return this.colorToArray(this.volumeColor?this.volumeColor(A):0,t,e)},fu.prototype.positionColorToArray=function(A,t,e){return this.colorToArray(this.positionColor?this.positionColor(A):0,t,e)};var zu,wu=Du((function(A){!function(t){function e(A,t,e,i,n){this._listener=t,this._isOnce=e,this.context=i,this._signal=A,this._priority=n||0}function i(A,t){if("function"!=typeof A)throw new Error("listener is a required param of {fn}() and should be a Function.".replace("{fn}",t))}function n(){this._bindings=[],this._prevParams=null;var A=this;this.dispatch=function(){n.prototype.dispatch.apply(A,arguments)}}e.prototype={active:!0,params:null,execute:function(A){var t,e;return this.active&&this._listener&&(e=this.params?this.params.concat(A):A,t=this._listener.apply(this.context,e),this._isOnce&&this.detach()),t},detach:function(){return this.isBound()?this._signal.remove(this._listener,this.context):null},isBound:function(){return!!this._signal&&!!this._listener},isOnce:function(){return this._isOnce},getListener:function(){return this._listener},getSignal:function(){return this._signal},_destroy:function(){delete this._signal,delete this._listener,delete this.context},toString:function(){return"[SignalBinding isOnce:"+this._isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}},n.prototype={VERSION:"1.0.0",memorize:!1,_shouldPropagate:!0,active:!0,_registerListener:function(A,t,i,n){var I,r=this._indexOfListener(A,i);if(-1!==r){if((I=this._bindings[r]).isOnce()!==t)throw new Error("You cannot add"+(t?"":"Once")+"() then add"+(t?"Once":"")+"() the same listener without removing the relationship first.")}else I=new e(this,A,t,i,n),this._addBinding(I);return this.memorize&&this._prevParams&&I.execute(this._prevParams),I},_addBinding:function(A){var t=this._bindings.length;do{--t}while(this._bindings[t]&&A._priority<=this._bindings[t]._priority);this._bindings.splice(t+1,0,A)},_indexOfListener:function(A,t){for(var e,i=this._bindings.length;i--;)if((e=this._bindings[i])._listener===A&&e.context===t)return i;return-1},has:function(A,t){return-1!==this._indexOfListener(A,t)},add:function(A,t,e){return i(A,"add"),this._registerListener(A,!1,t,e)},addOnce:function(A,t,e){return i(A,"addOnce"),this._registerListener(A,!0,t,e)},remove:function(A,t){i(A,"remove");var e=this._indexOfListener(A,t);return-1!==e&&(this._bindings[e]._destroy(),this._bindings.splice(e,1)),A},removeAll:function(){for(var A=this._bindings.length;A--;)this._bindings[A]._destroy();this._bindings.length=0},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(A){if(this.active){var t,e=Array.prototype.slice.call(arguments),i=this._bindings.length;if(this.memorize&&(this._prevParams=e),i){t=this._bindings.slice(),this._shouldPropagate=!0;do{i--}while(t[i]&&this._shouldPropagate&&!1!==t[i].execute(e))}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),delete this._bindings,delete this._prevParams},toString:function(){return"[Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}};var I=n;I.Signal=n,A.exports?A.exports=I:t.signals=I}(Eu)}));!function(A){A[A.PROTEIN=1]="PROTEIN",A[A.NUCLEIC=2]="NUCLEIC",A[A.RNA=3]="RNA",A[A.DNA=4]="DNA",A[A.POLYMER=5]="POLYMER",A[A.WATER=6]="WATER",A[A.HELIX=7]="HELIX",A[A.SHEET=8]="SHEET",A[A.TURN=9]="TURN",A[A.BACKBONE=10]="BACKBONE",A[A.SIDECHAIN=11]="SIDECHAIN",A[A.ALL=12]="ALL",A[A.HETERO=13]="HETERO",A[A.ION=14]="ION",A[A.SACCHARIDE=15]="SACCHARIDE",A[A.SUGAR=15]="SUGAR",A[A.BONDED=16]="BONDED",A[A.RING=17]="RING",A[A.AROMATICRING=18]="AROMATICRING",A[A.METAL=19]="METAL",A[A.POLARH=20]="POLARH",A[A.NONE=21]="NONE"}(zu||(zu={}));var mu=["*","","ALL"],Qu=["NONE"],Su=[zu.BACKBONE,zu.SIDECHAIN,zu.BONDED,zu.RING,zu.AROMATICRING,zu.METAL,zu.POLARH],Yu=[zu.POLYMER,zu.WATER],Ou=["ALA","GLY","SER"],vu=["CYS","SER","THR"],Uu=["ALA","ILE","LEU","MET","PHE","PRO","TRP","VAL"],bu=["PHE","TRP","TYR","HIS"],Pu=["ASN","GLN"],ku=["ASP","GLU"],Gu=["ARG","HIS","LYS"],Fu=["ARG","ASP","GLU","HIS","LYS"],Ju=["ASN","ARG","ASP","CYS","GLY","GLN","GLU","HIS","LYS","SER","THR","TYR"],Hu=["ALA","ILE","LEU","MET","PHE","PRO","TRP","VAL"],Ru=["HIS","PHE","PRO","TRP","TYR"],Xu=["ALA","GLY","ILE","LEU","VAL"];function Vu(A,t){if(void 0===t.atomname&&void 0===t.element&&void 0===t.altloc&&void 0===t.atomindex&&void 0===t.keyword&&void 0===t.inscode&&void 0===t.resname&&void 0===t.sstruc&&void 0===t.resno&&void 0===t.chainname&&void 0===t.model)return-1;if(void 0!==t.keyword){if(t.keyword===zu.BACKBONE&&!A.isBackbone())return!1;if(t.keyword===zu.SIDECHAIN&&!A.isSidechain())return!1;if(t.keyword===zu.BONDED&&!A.isBonded())return!1;if(t.keyword===zu.RING&&!A.isRing())return!1;if(t.keyword===zu.AROMATICRING&&!A.isAromatic())return!1;if(t.keyword===zu.HETERO&&!A.isHetero())return!1;if(t.keyword===zu.PROTEIN&&!A.isProtein())return!1;if(t.keyword===zu.NUCLEIC&&!A.isNucleic())return!1;if(t.keyword===zu.RNA&&!A.isRna())return!1;if(t.keyword===zu.DNA&&!A.isDna())return!1;if(t.keyword===zu.POLYMER&&!A.isPolymer())return!1;if(t.keyword===zu.WATER&&!A.isWater())return!1;if(t.keyword===zu.HELIX&&!A.isHelix())return!1;if(t.keyword===zu.SHEET&&!A.isSheet())return!1;if(t.keyword===zu.TURN&&!A.isTurn())return!1;if(t.keyword===zu.ION&&!A.isIon())return!1;if(t.keyword===zu.SACCHARIDE&&!A.isSaccharide())return!1;if(t.keyword===zu.METAL&&!A.isMetal())return!1;if(t.keyword===zu.POLARH&&!A.isPolarHydrogen())return!1}if(void 0!==t.atomname&&t.atomname!==A.atomname)return!1;if(void 0!==t.element&&t.element!==A.element)return!1;if(void 0!==t.altloc&&t.altloc!==A.altloc)return!1;if(void 0!==t.atomindex&&qc(t.atomindex,A.index)<0)return!1;if(void 0!==t.resname)if(Array.isArray(t.resname)){if(!t.resname.includes(A.resname))return!1}else if(t.resname!==A.resname)return!1;if(void 0!==t.sstruc&&t.sstruc!==A.sstruc)return!1;if(void 0!==t.resno)if(Array.isArray(t.resno)&&2===t.resno.length){if(t.resno[0]>A.resno||t.resno[1]A.resno||t.resno[1]0?A:null}function $u(A,t){void 0===t&&(t=!1);var e=A;return t&&(e=qu(A,(function(A){return void 0!==A.keyword&&!Su.includes(A.keyword)||void 0!==A.model||void 0!==A.chainname||void 0!==A.resname||void 0!==A.resno||void 0!==A.sstruc}))),_u(e,Vu)}function Al(A,t){void 0===t&&(t=!1);var e=A;return t&&(e=qu(A,(function(A){return!(void 0===A.keyword||!Su.includes(A.keyword))||void 0!==A.model||void 0!==A.chainname||void 0!==A.atomname||void 0!==A.element||void 0!==A.altloc}))),_u(e,Wu)}function tl(A,t){void 0===t&&(t=!1);var e=A;return t&&(e=qu(A,(function(A){return void 0!==A.keyword&&!Yu.includes(A.keyword)||void 0!==A.resname||void 0!==A.resno||void 0!==A.atomname||void 0!==A.element||void 0!==A.altloc||void 0!==A.sstruc||void 0!==A.inscode}))),_u(e,Zu)}function el(A,t){void 0===t&&(t=!1);var e=A;return t&&(e=qu(A,(function(A){return void 0!==A.keyword||void 0!==A.chainname||void 0!==A.resname||void 0!==A.resno||void 0!==A.atomname||void 0!==A.element||void 0!==A.altloc||void 0!==A.sstruc||void 0!==A.inscode}))),_u(e,Ku)}var il=function(A){this.signals={stringChanged:new wu.Signal},this.setString(A)},nl={type:{configurable:!0}};nl.type.get=function(){return"selection"},il.prototype.setString=function(A,t){if(void 0===A&&(A=this.string||""),A!==this.string){try{this.selection=function(A){var t={operator:void 0,rules:[]};if(!A)return t;var e,i,n=t,I=[];"("===(A=A.replace(/\(/g," ( ").replace(/\)/g," ) ").trim()).charAt(0)&&")"===A.substr(-1)&&(A=A.slice(1,-1).trim());for(var r=A.split(/\s+/),o=function(A){e={operator:A,rules:[]},void 0===n?(n=e,t=e):(n.rules.push(e),I.push(n),n=e)},g=function(A){i=n,void 0===(n=I.pop())&&(o(A),a(i))},a=function(A){n.rules.push(A)},M=!1,s=0;s0)if("NOT"===u)M=1;else if(1===M)M=2;else{if(2!==M)throw new Error("something went wrong with 'not'");M=!1,g()}if("AND"!==u)if("OR"!==u)if("NOT"!==c.toUpperCase()){if(+u!=+u){var l=zu[u];if(void 0!==l){a({keyword:l});continue}}if("HYDROGEN"!==u)if("SMALL"!==u)if("NUCLEOPHILIC"!==u)if("HYDROPHOBIC"!==u)if("AROMATIC"!==u)if("AMIDE"!==u)if("ACIDIC"!==u)if("BASIC"!==u)if("CHARGED"!==u)if("POLAR"!==u)if("NONPOLAR"!==u)if("CYCLIC"!==u)if("ALIPHATIC"!==u)if("SIDECHAINATTACHED"!==u)if("APOLARH"!==u)if("LIGAND"!==u)if(-1===mu.indexOf(u))if("@"!==c.charAt(0))if("#"!==c.charAt(0))if("_"!==c.charAt(0))if("["!==c[0]||"]"!==c[c.length-1])if(c.length>=1&&c.length<=4&&"^"!==c[0]&&":"!==c[0]&&"."!==c[0]&&"%"!==c[0]&&"/"!==c[0]&&isNaN(parseInt(c)))a({resname:u});else{var C={operator:"AND",rules:[]},T=c.split("/");if(T.length>1&&T[1]){if(isNaN(parseInt(T[1])))throw new Error("model must be an integer");C.rules.push({model:parseInt(T[1])})}var h=T[0].split("%");h.length>1&&C.rules.push({altloc:h[1]});var N=h[0].split(".");if(N.length>1&&N[1]){if(N[1].length>4)throw new Error("atomname must be one to four characters");C.rules.push({atomname:N[1].substring(0,4).toUpperCase()})}var d=N[0].split(":");d.length>1&&d[1]&&C.rules.push({chainname:d[1]});var y=d[0].split("^");if(y.length>1&&C.rules.push({inscode:y[1]}),y[0]){var E=void 0,D=void 0;"-"===y[0][0]&&(y[0]=y[0].substr(1),E=!0),y[0].includes("--")&&(y[0]=y[0].replace("--","-"),D=!0);var j=y[0].split("-");if(1===j.length){var B=parseInt(j[0]);if(isNaN(B))throw new Error("resi must be an integer");E&&(B*=-1),C.rules.push({resno:B})}else{if(2!==j.length)throw new Error("resi range must contain one '-'");var x=j.map((function(A){return parseInt(A)}));E&&(x[0]*=-1),D&&(x[1]*=-1),C.rules.push({resno:[x[0],x[1]]})}}if(1===C.rules.length)a(C.rules[0]);else{if(!(C.rules.length>1))throw new Error("empty selection chunk");a(C)}}else{var p=u.substr(1,c.length-2).split(","),L=p.length>1?p:p[0];a({resname:L})}else a({element:u.substr(1)});else console.error("# for element selection deprecated, use _"),a({element:u.substr(1)});else{var f=c.substr(1).split(",").map((function(A){return parseInt(A)}));f.sort((function(A,t){return A-t})),a({atomindex:f})}else a({keyword:zu.ALL});else a({operator:"AND",rules:[{operator:"OR",rules:[{operator:"AND",rules:[{keyword:zu.HETERO},{negate:!0,operator:void 0,rules:[{keyword:zu.POLYMER}]}]},{negate:!0,operator:void 0,rules:[{keyword:zu.POLYMER}]}]},{negate:!0,operator:void 0,rules:[{operator:"OR",rules:[{keyword:zu.WATER},{keyword:zu.ION}]}]}]});else a({operator:"AND",negate:!1,rules:[{element:"H"},{negate:!0,operator:void 0,rules:[{keyword:zu.POLARH}]}]});else a({operator:"OR",rules:[{keyword:zu.SIDECHAIN},{operator:"AND",negate:!1,rules:[{keyword:zu.PROTEIN},{operator:"OR",negate:!1,rules:[{atomname:"CA"},{atomname:"BB"}]}]},{operator:"AND",negate:!1,rules:[{resname:"PRO"},{atomname:"N"}]},{operator:"AND",negate:!1,rules:[{keyword:zu.NUCLEIC},{operator:"OR",negate:!0,rules:[{atomname:"P"},{atomname:"OP1"},{atomname:"OP2"},{atomname:"O3'"},{atomname:"O3*"},{atomname:"HO3'"},{atomname:"O5'"},{atomname:"O5*"},{atomname:"HO5'"},{atomname:"C5'"},{atomname:"C5*"},{atomname:"H5'"},{atomname:"H5''"}]}]}]});else a({resname:Xu});else a({resname:Ru});else a({resname:Hu});else a({resname:Ju});else a({resname:Fu});else a({resname:Gu});else a({resname:ku});else a({resname:Pu});else a({resname:bu});else a({resname:Uu});else a({resname:vu});else a({resname:Ou});else a({operator:"OR",rules:[{element:"H"},{element:"D"}]})}else M=1,o(),n.negate=!0;else"AND"===n.operator?g("OR"):n.operator="OR";else if("OR"===n.operator){var z=n.rules.pop();o("AND"),a(z)}else n.operator="AND"}else g(),n.negate&&g();else M=!1,o()}return void 0===t.operator&&1===t.rules.length&&t.rules[0].hasOwnProperty("operator")&&(t=t.rules[0]),t}(A)}catch(A){this.selection={error:A.message}}var e=this.selection;this.string=A,this.test=$u(e),this.residueTest=Al(e),this.chainTest=tl(e),this.modelTest=el(e),this.atomOnlyTest=$u(e,!0),this.residueOnlyTest=Al(e,!0),this.chainOnlyTest=tl(e,!0),this.modelOnlyTest=el(e,!0),t||this.signals.stringChanged.dispatch(this.string)}},il.prototype.isAllSelection=function(){return mu.includes(this.string.toUpperCase())},il.prototype.isNoneSelection=function(){return Qu.includes(this.string.toUpperCase())},Object.defineProperties(il.prototype,nl);var Il=function(A){function t(t){var e=this;A.call(this,t),this.colormakerList=[],this.selectionList=[],(t.dataList||[]).forEach((function(A){var t=A[0],i=A[1],n=A[2];void 0===n&&(n={}),Ll.hasScheme(t)?Object.assign(n,{scheme:t,structure:e.parameters.structure}):Object.assign(n,{scheme:"uniform",value:new Pi(t).getHex()}),e.colormakerList.push(Ll.getScheme(n)),e.selectionList.push(new il(i))}))}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){for(var t=0,e=this.selectionList.length;ti).lines},vl.prototype.chunkCount=function(){return Math.floor(this.data.length/this.chunkSize)+1},vl.prototype.asText=function(){return this.isBinary()?tu(this.data):this.data},vl.prototype.chunkToLines=function(A,t,e){var i=this.newline;if(!this.isBinary()&&A.length===this.data.length)return{lines:A.split(i),partialLine:""};var n=[],I=this.isBinary()?tu(A):A,r=I.lastIndexOf(i);if(-1===r)t+=I;else{var o=t+I.substr(0,r);n=n.concat(o.split(i)),t=r===I.length-i.length?"":I.substr(r+i.length)}return e&&""!==t&&n.push(t),{lines:n,partialLine:t}},vl.prototype.nextChunk=function(){var A=this.__pointer;if(!(A>this.data.length))return this.__pointer+=this.chunkSize,this.chunk(A)},vl.prototype.nextChunkOfLines=function(){var A=this.nextChunk();if(void 0!==A){var t=this.__pointer>this.data.length,e=this.chunkToLines(A,this.__partialLine,t);return this.__partialLine=e.partialLine,e.lines}},vl.prototype.eachChunk=function(A){for(var t=this.chunkSize,e=this.data.length,i=this.chunkCount(),n=0;n1?(a.pop()||"").toLowerCase():"",s=t.match(/^(.+):\/\/(.+)$/);s&&(n=s[1].toLowerCase(),t=s[2]||"");var c=t.substring(0,t.lastIndexOf("/")+1);if(i.includes(M)){e=M;var u=t.length-M.length-1;M=(t.substr(0,u).split(".").pop()||"").toLowerCase();var l=g.length-M.length-1;g=g.substr(0,l)}else e=!1;return{path:t,name:o,ext:M,base:g,dir:c,compressed:e,protocol:n,query:r,src:A}}function Hl(A){var t=Jl(A),e=fl.get(t.protocol);return e&&!(t=Jl(e.getUrl(t.src))).ext&&e.getExt&&(t.ext=e.getExt(A)),t}function Rl(A,t){void 0===t&&(t={});var e,i=Object.assign(Hl(A),t);return wl.names.includes(i.ext)?e=new kl(i.src,i):xl.includes(i.ext)&&(e=new Fl(i.src,i)),e?e.load():Promise.reject(new Error("autoLoad: ext '"+i.ext+"' unknown"))}var Xl=Du((function(A,t){!function(){var A={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(t){return function(t,i){var n,I,r,g,a,M,s,c,u,l=1,C=t.length,T="";for(I=0;I=0),g.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,g.width?parseInt(g.width):0);break;case"e":n=g.precision?parseFloat(n).toExponential(g.precision):parseFloat(n).toExponential();break;case"f":n=g.precision?parseFloat(n).toFixed(g.precision):parseFloat(n);break;case"g":n=g.precision?String(Number(n.toPrecision(g.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=g.precision?n.substring(0,g.precision):n;break;case"t":n=String(!!n),n=g.precision?n.substring(0,g.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=g.precision?n.substring(0,g.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=g.precision?n.substring(0,g.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}A.json.test(g.type)?T+=n:(!A.number.test(g.type)||c&&!g.sign?u="":(u=c?"+":"-",n=n.toString().replace(A.sign,"")),M=g.pad_char?"0"===g.pad_char?"0":g.pad_char.charAt(1):" ",s=g.width-(u+n).length,a=g.width&&s>0?M.repeat(s):"",T+=g.align?u+n+a:"0"===M?u+a+n:a+u+n)}return T}(function(t){if(n[t])return n[t];for(var e,i=t,I=[],r=0;i;){if(null!==(e=A.text.exec(i)))I.push(e[0]);else if(null!==(e=A.modulo.exec(i)))I.push("%");else{if(null===(e=A.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){r|=1;var o=[],g=e[2],a=[];if(null===(a=A.key.exec(g)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(a[1]);""!==(g=g.substring(a[0].length));)if(null!==(a=A.key_access.exec(g)))o.push(a[1]);else{if(null===(a=A.index_access.exec(g)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(a[1])}e[2]=o}else r|=2;if(3===r)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");I.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return n[t]=I}(t),arguments)}function i(A,t){return e.apply(null,[A].concat(t||[]))}var n=Object.create(null);t.sprintf=e,t.vsprintf=i,"undefined"!=typeof window&&(window.sprintf=e,window.vsprintf=i)}()})),Vl=function(){};Vl.prototype.getBlob=function(){return new Blob([this.getData()],{type:this.mimeType})},Vl.prototype.download=function(A,t){A=Hc(A,this.defaultName),t=Hc(t,this.defaultExt),Kc(this.getBlob(),A+"."+t)};var Wl=function(A){function t(t,e){A.call(this),this.mimeType="text/plain",this.defaultName="structure",this.defaultExt="pdb";var i=Object.assign({},e);this.renumberSerial=Hc(i.renumberSerial,!0),this.remarks=function(A){return Array.isArray(A)?A:[A]}(Hc(i.remarks,[])),this.structure=t,this._records=[]}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype._writeRecords=function(){this._records.length=0,this._writeTitle(),this._writeRemarks(),this._writeAtoms()},t.prototype._writeTitle=function(){this._records.push(Xl.sprintf("TITLE %-74s",this.structure.name))},t.prototype._writeRemarks=function(){var A=this;this.remarks.forEach((function(t){A._records.push(Xl.sprintf("REMARK %-73s",t))})),this.structure.trajectory&&(this._records.push(Xl.sprintf("REMARK %-73s","Trajectory '"+this.structure.trajectory.name+"'")),this._records.push(Xl.sprintf("REMARK %-73s","Frame "+this.structure.trajectory.frame)))},t.prototype._writeAtoms=function(){var A=this,t=1,e=1,i=" ",n=" ";this.structure.eachModel((function(I){A._records.push(Xl.sprintf("MODEL %-74d",e++)),I.eachAtom((function(e){var I=e.hetero?"HETATM%5d %-4s %3s %1s%4d %8.3f%8.3f%8.3f%6.2f%6.2f %4s%2s%1s%1s":"ATOM %5d %-4s %3s %1s%4d %8.3f%8.3f%8.3f%6.2f%6.2f %4s%2s%1s%1s",r=A.renumberSerial?t:e.serial,o=e.atomname;(1===o.length||o.length<4&&1===e.element.length&&o[0]===e.element)&&(o=" "+o),e.formalCharge?(i=Math.abs(e.formalCharge).toPrecision(1),n=e.formalCharge>0?"+":"-"):(i=" ",n=" "),A._records.push(Xl.sprintf(I,r,o,e.resname,Hc(e.chainname," "),e.resno,e.x,e.y,e.z,Hc(e.occupancy,1),Hc(e.bfactor,0),"",Hc(e.element,""),i,n)),t+=1}),A.structure.getSelection()),A._records.push(Xl.sprintf("%-80s","ENDMDL")),e+=1})),this._records.push(Xl.sprintf("%-80s","END"))},t.prototype.getString=function(){return console.warn("PdbWriter.getString() is deprecated, use .getData instead"),this.getData()},t.prototype.getData=function(){return this._writeRecords(),this._records.join("\n")},t}(Vl),Zl=function(A){function t(t){A.call(this),this.mimeType="text/plain",this.defaultName="structure",this.defaultExt="sdf",this.structure=t,this._records=[]}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={idString:{configurable:!0},titleString:{configurable:!0},countsString:{configurable:!0},chargeLines:{configurable:!0}};return e.idString.get=function(){return this.structure.id},e.titleString.get=function(){return" "+this.structure.title},e.countsString.get=function(){return Xl.sprintf("%3i%3i 0 0 0 0 0 0 0 0999 V2000",this.structure.atomCount,this.structure.bondCount)},e.chargeLines.get=function(){var A=[];this.structure.eachAtom((function(t){null!=t.formalCharge&&0!==t.formalCharge&&A.push([t.index,t.formalCharge])}));for(var t=[],e=0;e>>0:0,n=A.byteLength-i,I=i;A instanceof ArrayBuffer||(A.byteLength!==A.buffer.byteLength&&(I=A.byteOffset+i),A=A.buffer),this._lastWrittenByte=e?n:0,this.buffer=A,this.length=n,this.byteLength=n,this.byteOffset=I,this._data=new DataView(this.buffer,I,n)};_l.prototype.available=function(A){return void 0===A&&(A=1),this.offset+A<=this.length},_l.prototype.isLittleEndian=function(){return this.littleEndian},_l.prototype.setLittleEndian=function(){return this.littleEndian=!0,this},_l.prototype.isBigEndian=function(){return!this.littleEndian},_l.prototype.setBigEndian=function(){return this.littleEndian=!1,this},_l.prototype.skip=function(A){return void 0===A&&(A=1),this.offset+=A,this},_l.prototype.seek=function(A){return this.offset=A,this},_l.prototype.mark=function(){return this._mark=this.offset,this},_l.prototype.reset=function(){return this.offset=this._mark,this},_l.prototype.pushMark=function(){return this._marks.push(this.offset),this},_l.prototype.popMark=function(){var A=this._marks.pop();if(void 0===A)throw new Error("Mark stack empty");return this.seek(A),this},_l.prototype.rewind=function(){return this.offset=0,this},_l.prototype.ensureAvailable=function(A){if(void 0===A&&(A=1),!this.available(A)){var t=2*(this.offset+A),e=new Uint8Array(t);e.set(new Uint8Array(this.buffer)),this.buffer=e.buffer,this.length=this.byteLength=t,this._data=new DataView(this.buffer)}return this},_l.prototype.readBoolean=function(){return 0!==this.readUint8()},_l.prototype.readInt8=function(){return this._data.getInt8(this.offset++)},_l.prototype.readUint8=function(){return this._data.getUint8(this.offset++)},_l.prototype.readByte=function(){return this.readUint8()},_l.prototype.readBytes=function(A){void 0===A&&(A=1);for(var t=new Uint8Array(A),e=0;ethis._lastWrittenByte&&(this._lastWrittenByte=this.offset)};var ql=function(A){function t(t){A.call(this),this.mimeType="application/vnd.ms-pki.stl",this.defaultName="surface",this.defaultExt="stl",this.surface=t}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.getData=function(){var A=this.surface.index.length/3,t=new _l(2*A+3*A*4*4+80+4);t.skip(80),t.writeUint32(A);for(var e=new De,i=new De,n=new De,I=new De,r=0;rthis.prevFpsTime+1e3&&(this.lastFps=this.frames,this.prevFpsTime=A,this.frames=0),A},ml.add("shader/chunk/fog_fragment.glsl","#ifdef USE_FOG\nfloat depth = length( vViewPosition );\n#ifdef FOG_EXP2\nfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * depth * depth * LOG2 ) );\n#else\nfloat fogFactor = smoothstep( fogNear, fogFar, depth );\n#endif\ngl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif"),ml.add("shader/chunk/interior_fragment.glsl","if( gl_FrontFacing == false ){\n#ifdef USE_INTERIOR_COLOR\noutgoingLight.xyz = interiorColor;\n#else\n#ifdef DIFFUSE_INTERIOR\noutgoingLight.xyz = vColor;\n#endif\n#endif\noutgoingLight.xyz *= 1.0 - interiorDarkening;\n}"),ml.add("shader/chunk/matrix_scale.glsl","float matrixScale( in mat4 m ){\nvec4 r = m[ 0 ];\nreturn sqrt( r[ 0 ] * r[ 0 ] + r[ 1 ] * r[ 1 ] + r[ 2 ] * r[ 2 ] );\n}"),ml.add("shader/chunk/nearclip_vertex.glsl","#ifdef NEAR_CLIP\nif( vViewPosition.z < clipNear - 5.0 )\ngl_Position.z = 2.0 * gl_Position.w;\n#endif"),ml.add("shader/chunk/nearclip_fragment.glsl","#ifdef NEAR_CLIP\nif( vViewPosition.z < clipNear )\ndiscard;\n#endif"),ml.add("shader/chunk/opaque_back_fragment.glsl","#ifdef OPAQUE_BACK\n#ifdef FLIP_SIDED\nif( gl_FrontFacing == true ){\ngl_FragColor.a = 1.0;\n}\n#else\nif( gl_FrontFacing == false ){\ngl_FragColor.a = 1.0;\n}\n#endif\n#endif"),ml.add("shader/chunk/radiusclip_vertex.glsl","#ifdef RADIUS_CLIP\nif( distance( vViewPosition, vClipCenter ) > clipRadius + 5.0 )\ngl_Position.z = 2.0 * gl_Position.w;\n#endif"),ml.add("shader/chunk/radiusclip_fragment.glsl","#ifdef RADIUS_CLIP\nif( distance( vViewPosition, vClipCenter ) > clipRadius )\ndiscard;\n#endif"),ml.add("shader/chunk/unpack_color.glsl","vec3 unpackColor(float f) {\nvec3 color;\ncolor.r = floor(f / 256.0 / 256.0);\ncolor.g = floor((f - color.r * 256.0 * 256.0) / 256.0);\ncolor.b = floor(f - color.r * 256.0 * 256.0 - color.g * 256.0);\nreturn color / 255.0;\n}");var tC=/^(?!\/\/)\s*#include\s+(\S+)/gim,eC={};function iC(A,t){void 0===t&&(t={});var e=A+"|";for(var i in t)e+=i+":"+t[i];if(!eC[e]){var n=function(A){if(void 0===A)return"";var t=[];for(var e in A){var i=A[e];i&&t.push("#define "+e+" "+i)}return t.join("\n")+"\n"}(t),I=ml.get("shader/"+A);if(!I)throw new Error("empty shader, '"+A+"'");I=I.replace(tC,(function(A,t){var e="shader/chunk/"+t+".glsl",i=ml.get(e)||aI[t];if(!i)throw new Error("empty chunk, '"+t+"'");return i})),eC[e]=n+I}return eC[e]}if("undefined"!=typeof WebGLRenderingContext){var nC=WebGLRenderingContext.prototype,IC=nC.getShaderParameter;nC.getShaderParameter=function(){return!A.Debug||IC.apply(this,arguments)};var rC=nC.getShaderInfoLog;nC.getShaderInfoLog=function(){return A.Debug?rC.apply(this,arguments):""};var oC=nC.getProgramParameter;nC.getProgramParameter=function(t,e){return!A.Debug&&e===nC.LINK_STATUS||oC.apply(this,arguments)};var gC=nC.getProgramInfoLog;nC.getProgramInfoLog=function(){return A.Debug?gC.apply(this,arguments):""}}var aC=[[[0,0]],[[4,4],[-4,-4]],[[-2,-6],[6,-2],[-6,2],[2,6]],[[1,-3],[-1,3],[5,1],[-3,-5],[-5,5],[-7,-1],[3,7],[7,-7]],[[1,1],[-1,-3],[-3,2],[4,-1],[-5,-2],[2,5],[5,3],[3,-5],[-2,6],[0,-7],[-4,-6],[-6,4],[-8,0],[7,-4],[6,7],[-7,-8]],[[-4,-7],[-7,-5],[-3,-5],[-5,-4],[-1,-4],[-2,-2],[-6,-1],[-4,0],[-7,1],[-1,2],[-6,3],[-3,3],[-7,6],[-3,6],[-5,7],[-1,7],[5,-7],[1,-6],[6,-5],[4,-4],[2,-3],[7,-2],[1,-1],[4,-1],[2,1],[6,2],[0,4],[4,4],[2,5],[7,5],[5,6],[3,7]]];aC.forEach((function(A){A.forEach((function(A){A[0]*=.0625,A[1]*=.0625}))}));var MC=function(A,t,e,i){this.canvas=document.createElement("canvas"),this._viewer=e,this._factor=Hc(i.factor,2),this._antialias=Hc(i.antialias,!1),this._onProgress=i.onProgress,this._onFinish=i.onFinish,this._antialias&&(this._factor*=2),this._n=this._factor*this._factor,this._width=this._viewer.width,this._height=this._viewer.height,this._antialias?(this.canvas.width=this._width*this._factor/2,this.canvas.height=this._height*this._factor/2):(this.canvas.width=this._width*this._factor,this.canvas.height=this._height*this._factor),this._ctx=this.canvas.getContext("2d"),this._viewerSampleLevel=e.sampleLevel,this._viewer.setSampling(-1)};MC.prototype._renderTile=function(A){var t=this._viewer,e=this._width,i=this._height,n=this._factor,I=A%n*e,r=Math.floor(A/n)*i;if(t.camera.setViewOffset(e*n,i*n,I,r,e,i),t.render(),this._antialias){var o=Math.round((I+e)/2)-Math.round(I/2),g=Math.round((r+i)/2)-Math.round(r/2);this._ctx.drawImage(t.renderer.domElement,Math.round(I/2),Math.round(r/2),o,g)}else this._ctx.drawImage(t.renderer.domElement,Math.floor(I),Math.floor(r),Math.ceil(e),Math.ceil(i));"function"==typeof this._onProgress&&this._onProgress(A+1,this._n,!1)},MC.prototype._finalize=function(){this._viewer.setSampling(this._viewerSampleLevel),this._viewer.camera.view=null,"function"==typeof this._onFinish&&this._onFinish(this._n+1,this._n,!1)},MC.prototype.render=function(){for(var A=0;A<=this._n;++A)A===this._n?this._finalize():this._renderTile(A)},MC.prototype.renderAsync=function(){for(var A=this,t=0,e=this._n,i=function(){t===e?A._finalize():A._renderTile(t),t+=1},n=0;n<=e;++n)setTimeout(i,0)};var sC=2*Math.PI,cC=180/Math.PI;function uC(A,t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=0);var I=n?n.length:A.length/e,r=0,o=0;if(n)for(var g=0;gt&&(t=A[e]);return t}function BC(A){for(var t=1/0,e=0,i=A.length;e=0;r--){for(I=M-1;I>=0;I--)if(s[g=4*(r*M+I)]!==t||s[g+1]!==e||s[g+2]!==i||s[g+3]!==n){o=!0;break}if(o)break}var l=r;for(o=!1,I=M-1;I>=0;I--){for(r=a-1;r>=0;r--)if(s[g=4*(r*M+I)]!==t||s[g+1]!==e||s[g+2]!==i||s[g+3]!==n){o=!0;break}if(o)break}var C=I,T=document.createElement("canvas");return T.width=C-u,T.height=l-c,T.getContext("2d").drawImage(A,u,c,T.width,T.height,0,0,T.width,T.height),T}(A,r?0:255*t.r,r?0:255*t.g,r?0:255*t.b,r?0:255)}return A})(u.canvas).toBlob((function(i){o.setClearAlpha(a),s(!0),A.requestRender(),c(I,I,!0),i?t(i):e("error creating image")}),"image/png")}});o.setClearAlpha(r?0:1),s(),u.renderAsync()}))}var zC=new De,wC=new we,mC=new we,QC=new se,SC=new we,YC=new we;function OC(A,t){SC.getInverse(t.projectionMatrix),YC.copy(t.projectionMatrix).transpose(),A.traverse((function(A){var t=A.material;if(t){var e=t.uniforms;e&&(e.projectionMatrixInverse&&e.projectionMatrixInverse.value.copy(SC),e.projectionMatrixTranspose&&e.projectionMatrixTranspose.value.copy(YC))}}))}function vC(A,t,e){var i=A.createShader(e);if(i)return A.shaderSource(i,t),A.compileShader(i),A.getShaderParameter(i,A.COMPILE_STATUS)?i:(console.log("error compiling shader "+i+": "+A.getShaderInfoLog(i)),A.deleteShader(i),null);console.log("error creating WebGL shader "+e)}function UC(A,t){var e=A.getExtension(t);return e||console.log("extension '"+t+"' not available"),e}var bC=new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]);function PC(A){var t=document.createElement("canvas");t.width=16,t.height=16,t.style.width="16px",t.style.height="16px";var e=t.getContext("webgl")||t.getContext("experimental-webgl");if(!e)return console.log("error creating webgl context for "+A),!1;if(!(e instanceof WebGLRenderingContext))return console.log("Got unexpected type for WebGL rendering context"),!1;UC(e,"OES_texture_float"),UC(e,"OES_texture_half_float"),UC(e,"WEBGL_color_buffer_float");var i=vC(e,"\nattribute vec4 a_position;\n\nvoid main() {\n gl_Position = a_position;\n}",e.VERTEX_SHADER),n=vC(e,"\nprecision mediump float;\nuniform vec4 u_color;\nuniform sampler2D u_texture;\n\nvoid main() {\n gl_FragColor = texture2D(u_texture, vec2(0.5, 0.5)) * u_color;\n}",e.FRAGMENT_SHADER);if(!i||!n)return!1;var I=function(A,t,e,i){var n=A.createProgram();if(n)return t.forEach((function(t){return A.attachShader(n,t)})),A.linkProgram(n),A.getProgramParameter(n,A.LINK_STATUS)?n:(console.log("error linking program: "+A.getProgramInfoLog(n)),A.deleteProgram(n),null);console.log("error creating WebGL program")}(e,[i,n]);if(!I)return console.log("error creating WebGL program"),!1;e.useProgram(I);var r=e.getAttribLocation(I,"a_position"),o=e.getUniformLocation(I,"u_color");if(!o)return console.log("error getting 'u_color' uniform location"),!1;var g=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,g),e.bufferData(e.ARRAY_BUFFER,bC,e.STATIC_DRAW),e.enableVertexAttribArray(r),e.vertexAttribPointer(r,2,e.FLOAT,!1,0,0);var a=e.createTexture(),M=new Uint8Array([255,255,255,255]);e.bindTexture(e.TEXTURE_2D,a),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,M);var s=e.createTexture();e.bindTexture(e.TEXTURE_2D,s),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,A,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST);var c=e.createFramebuffer();if(e.bindFramebuffer(e.FRAMEBUFFER,c),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,s,0),e.checkFramebufferStatus(e.FRAMEBUFFER)!==e.FRAMEBUFFER_COMPLETE)return console.log("error creating framebuffer for "+A),!1;e.bindTexture(e.TEXTURE_2D,a),e.uniform4fv(o,[0,10,20,1]),e.drawArrays(e.TRIANGLES,0,6),e.bindTexture(e.TEXTURE_2D,s),e.bindFramebuffer(e.FRAMEBUFFER,null),e.clearColor(1,0,0,1),e.clear(e.COLOR_BUFFER_BIT),e.uniform4fv(o,[0,.1,.05,1]),e.drawArrays(e.TRIANGLES,0,6);var u=new Uint8Array(4);if(e.readPixels(0,0,1,1,e.RGBA,e.UNSIGNED_BYTE,u),0!==u[0]||u[1]<248||u[2]<248||u[3]<254)return console.log("not able to actually render to "+A+" texture"),!1;if(A===e.FLOAT){e.bindFramebuffer(e.FRAMEBUFFER,c);var l=new Float32Array(4);e.readPixels(0,0,1,1,e.RGBA,e.FLOAT,l);var C=e.getError();if(C)return console.log("error reading pixels as float: '"+function(A,t){switch(t){case A.NO_ERROR:return"no error";case A.INVALID_ENUM:return"invalid enum";case A.INVALID_VALUE:return"invalid value";case A.INVALID_OPERATION:return"invalid operation";case A.INVALID_FRAMEBUFFER_OPERATION:return"invalid framebuffer operation";case A.OUT_OF_MEMORY:return"out of memory";case A.CONTEXT_LOST_WEBGL:return"context lost"}return"unknown error"}(e,C)+"'"),!1}return!0}var kC=new Float32Array(100),GC=new Uint8Array(100),FC=[12,7,13,17,11,6,8,18,16,2,14,22,10,1,3,9,19,23,21,15,5,0,4,24,20],JC=new we;function HC(A,t,e,i,n){var I=n.uniforms,r=[];if(I&&(I.objectId&&(I.objectId.value=dl?this.id:this.id/255,r.push("objectId")),(I.modelViewMatrixInverse||I.modelViewMatrixInverseTranspose||I.modelViewProjectionMatrix||I.modelViewProjectionMatrixInverse)&&this.modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,this.matrixWorld),I.modelViewMatrixInverse&&(I.modelViewMatrixInverse.value.getInverse(this.modelViewMatrix),r.push("modelViewMatrixInverse")),I.modelViewMatrixInverseTranspose&&(I.modelViewMatrixInverse?I.modelViewMatrixInverseTranspose.value.copy(I.modelViewMatrixInverse.value).transpose():I.modelViewMatrixInverseTranspose.value.getInverse(this.modelViewMatrix).transpose(),r.push("modelViewMatrixInverseTranspose")),I.modelViewProjectionMatrix&&(I.modelViewProjectionMatrix.value.multiplyMatrices(e.projectionMatrix,this.modelViewMatrix),r.push("modelViewProjectionMatrix")),I.modelViewProjectionMatrixInverse&&(I.modelViewProjectionMatrix?(JC.copy(I.modelViewProjectionMatrix.value),I.modelViewProjectionMatrixInverse.value.getInverse(JC)):(JC.multiplyMatrices(e.projectionMatrix,this.modelViewMatrix),I.modelViewProjectionMatrixInverse.value.getInverse(JC)),r.push("modelViewProjectionMatrixInverse")),r.length)){var o=A.properties.get(n);if(o.program){var g=A.getContext(),a=o.program;g.useProgram(a.program);var M=a.getUniforms();r.forEach((function(A){M.setValue(g,A,I[A].value)}))}}}var RC=function(A){if(this.boundingBox=new ai,this.boundingBoxSize=new De,this.boundingBoxLength=0,this.info={memory:{programs:0,geometries:0,textures:0},render:{calls:0,vertices:0,faces:0,points:0}},this.distVector=new De,this.signals={ticked:new wu.Signal,rendered:new wu.Signal},"string"==typeof A){var t=document.getElementById(A);this.container=null===t?document.createElement("div"):t}else A instanceof HTMLElement?this.container=A:this.container=document.createElement("div");if(this.container===document.body)this.width=window.innerWidth||1,this.height=window.innerHeight||1;else{var e=this.container.getBoundingClientRect();this.width=e.width||1,this.height=e.height||1,this.container.style.overflow="hidden"}this.wrapper=document.createElement("div"),this.wrapper.style.position="relative",this.container.appendChild(this.wrapper),this._initParams(),this._initStats(),this._initCamera(),this._initScene(),!1!==this._initRenderer()?(this._initHelper(),this.setBackground(),this.setFog(),this.animate=this.animate.bind(this)):jl.error("Viewer: could not initialize renderer")},XC={cameraDistance:{configurable:!0}};function VC(A){var t=A.touches[0].pageX-A.touches[1].pageX,e=A.touches[0].pageY-A.touches[1].pageY;return Math.sqrt(t*t+e*e)}RC.prototype._initParams=function(){this.parameters={fogColor:new Pi(0),fogNear:50,fogFar:100,backgroundColor:new Pi(0),cameraType:"perspective",cameraFov:40,cameraEyeSep:.3,cameraZ:-80,clipNear:0,clipFar:100,clipDist:10,clipMode:"scene",clipScale:"relative",lightColor:new Pi(14540253),lightIntensity:1,ambientColor:new Pi(14540253),ambientIntensity:.2,sampleLevel:0,rendererEncoding:Ht}},RC.prototype._initCamera=function(){var A=new De(0,0,0),t=this.width,e=this.height;this.perspectiveCamera=new Kn(this.parameters.cameraFov,t/e),this.perspectiveCamera.position.z=this.parameters.cameraZ,this.perspectiveCamera.lookAt(A),this.orthographicCamera=new XM(t/-2,t/2,e/2,e/-2),this.orthographicCamera.position.z=this.parameters.cameraZ,this.orthographicCamera.lookAt(A),this.stereoCamera=new Es,this.stereoCamera.aspect=.5,this.stereoCamera.eyeSep=this.parameters.cameraEyeSep;var i=this.parameters.cameraType;if("orthographic"===i)this.camera=this.orthographicCamera;else{if("perspective"!==i&&"stereo"!==i)throw new Error("Unknown cameraType '"+i+"'");this.camera=this.perspectiveCamera}this.camera.updateProjectionMatrix()},RC.prototype._initStats=function(){this.stats=new AC},RC.prototype._initScene=function(){this.scene||(this.scene=new Ze,this.scene.name="scene"),this.rotationGroup=new go,this.rotationGroup.name="rotationGroup",this.scene.add(this.rotationGroup),this.translationGroup=new go,this.translationGroup.name="translationGroup",this.rotationGroup.add(this.translationGroup),this.modelGroup=new go,this.modelGroup.name="modelGroup",this.translationGroup.add(this.modelGroup),this.pickingGroup=new go,this.pickingGroup.name="pickingGroup",this.translationGroup.add(this.pickingGroup),this.backgroundGroup=new go,this.backgroundGroup.name="backgroundGroup",this.translationGroup.add(this.backgroundGroup),this.helperGroup=new go,this.helperGroup.name="helperGroup",this.translationGroup.add(this.helperGroup),this.scene.fog=new Co(this.parameters.fogColor.getHex()),this.spotLight=new JM(this.parameters.lightColor.getHex(),this.parameters.lightIntensity),this.scene.add(this.spotLight),this.ambientLight=new ZM(this.parameters.ambientColor.getHex(),this.parameters.ambientIntensity),this.scene.add(this.ambientLight)},RC.prototype._initRenderer=function(){var t=window.devicePixelRatio,e=this.width,i=this.height;try{this.renderer=new co({preserveDrawingBuffer:!0,alpha:!0,antialias:!0})}catch(A){return this.wrapper.innerHTML='

Your browser/graphics card does not seem to support WebGL.

Find out how to get it here.

',!1}this.renderer.setPixelRatio(t),this.renderer.setSize(e,i),this.renderer.autoClear=!1,this.renderer.sortObjects=!0,this.renderer.outputEncoding=this.parameters.rendererEncoding;var n=this.renderer.getContext();this.renderer.capabilities.isWebGL2?(Dl(!0),yl(this.renderer.extensions.get("EXT_color_buffer_float")),this.supportsHalfFloat=!0):(Dl(this.renderer.extensions.get("EXT_frag_depth")),this.renderer.extensions.get("OES_element_index_uint"),yl(this.renderer.extensions.get("OES_texture_float")&&this.renderer.extensions.get("WEBGL_color_buffer_float")||this.renderer.extensions.get("OES_texture_float")&&PC(n.FLOAT)),this.renderer.extensions.get("OES_texture_float"),this.supportsHalfFloat=this.renderer.extensions.get("OES_texture_half_float")&&PC(36193)),this.wrapper.appendChild(this.renderer.domElement);var I=e*t,r=i*t;A.Debug&&console.log(JSON.stringify({Browser:Cl,OES_texture_float:!!this.renderer.extensions.get("OES_texture_float"),OES_texture_half_float:!!this.renderer.extensions.get("OES_texture_half_float"),WEBGL_color_buffer_float:!!this.renderer.extensions.get("WEBGL_color_buffer_float"),"testTextureSupport Float":PC(n.FLOAT),"testTextureSupport HalfFloat":PC(36193),"this.supportsHalfFloat":this.supportsHalfFloat,SupportsReadPixelsFloat:dl},null,2)),this.pickingTarget=new he(I,r,{minFilter:EA,magFilter:EA,stencilBuffer:!1,format:GA,type:dl?SA:LA}),this.pickingTarget.texture.generateMipmaps=!1,this.pickingTarget.texture.encoding=this.parameters.rendererEncoding,this.renderer.setRenderTarget(this.pickingTarget),this.renderer.clear(),this.renderer.setRenderTarget(null),this.sampleTarget=new he(I,r,{minFilter:BA,magFilter:BA,format:GA}),this.sampleTarget.texture.encoding=this.parameters.rendererEncoding,this.holdTarget=new he(I,r,{minFilter:EA,magFilter:EA,format:GA,type:LA}),this.holdTarget.texture.encoding=this.parameters.rendererEncoding,this.compositeUniforms={tForeground:new Ks(this.sampleTarget.texture),scale:new Ks(1)},this.compositeMaterial=new Wn({uniforms:this.compositeUniforms,vertexShader:iC("Quad.vert"),fragmentShader:iC("Quad.frag"),premultipliedAlpha:!0,transparent:!0,blending:z,depthTest:!1,depthWrite:!1}),this.compositeCamera=new XM(-1,1,1,-1,0,1),this.compositeScene=new Ze,this.compositeScene.name="compositeScene",this.compositeScene.add(new Sn(new oI(2,2),this.compositeMaterial))},RC.prototype._initHelper=function(){var A=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),t=new Float32Array(24),e=new Cn;e.setIndex(new Zi(A,1)),e.setAttribute("position",new Zi(t,3));var i=new Wn({uniforms:{uColor:{value:new Pi("skyblue")}},vertexShader:iC("BasicLine.vert"),fragmentShader:iC("BasicLine.frag")});this.boundingBoxMesh=new ng(e,i),this.helperGroup.add(this.boundingBoxMesh)},RC.prototype.updateHelper=function(){var A=this.boundingBoxMesh.geometry.attributes.position,t=A.array,e=this.boundingBox,i=e.min,n=e.max;t[0]=n.x,t[1]=n.y,t[2]=n.z,t[3]=i.x,t[4]=n.y,t[5]=n.z,t[6]=i.x,t[7]=i.y,t[8]=n.z,t[9]=n.x,t[10]=i.y,t[11]=n.z,t[12]=n.x,t[13]=n.y,t[14]=i.z,t[15]=i.x,t[16]=n.y,t[17]=i.z,t[18]=i.x,t[19]=i.y,t[20]=i.z,t[21]=n.x,t[22]=i.y,t[23]=i.z,A.needsUpdate=!0,this.boundingBox.isEmpty()||this.boundingBoxMesh.geometry.computeBoundingSphere()},XC.cameraDistance.get=function(){return Math.abs(this.camera.position.z)},XC.cameraDistance.set=function(A){this.camera.position.z=-A},RC.prototype.add=function(t,e){var i=this;e?e.forEach((function(A){return i.addBuffer(t,A)})):this.addBuffer(t),t.group.name="meshGroup",t.wireframeGroup.name="wireframeGroup",t.parameters.background?(this.backgroundGroup.add(t.group),this.backgroundGroup.add(t.wireframeGroup)):(this.modelGroup.add(t.group),this.modelGroup.add(t.wireframeGroup)),t.pickable&&this.pickingGroup.add(t.pickingGroup),A.Debug&&this.updateHelper()},RC.prototype.addBuffer=function(A,t){function e(i){i instanceof go?i.children.forEach(e):(i.userData.buffer=A,i.userData.instance=t,i.onBeforeRender=HC)}var i=A.getMesh();t&&i.applyMatrix4(t.matrix),e(i),A.group.add(i);var n=A.getWireframeMesh();if(t&&(n.matrix.copy(i.matrix),n.position.copy(i.position),n.quaternion.copy(i.quaternion),n.scale.copy(i.scale)),e(n),A.wireframeGroup.add(n),A.pickable){var I=A.getPickingMesh();t&&(I.matrix.copy(i.matrix),I.position.copy(i.position),I.quaternion.copy(i.quaternion),I.scale.copy(i.scale)),e(I),A.pickingGroup.add(I)}t?this._updateBoundingBox(A.geometry,A.matrix,t.matrix):this._updateBoundingBox(A.geometry,A.matrix)},RC.prototype.remove=function(t){this.translationGroup.children.forEach((function(A){A.remove(t.group),A.remove(t.wireframeGroup)})),t.pickable&&this.pickingGroup.remove(t.pickingGroup),this.updateBoundingBox(),A.Debug&&this.updateHelper()},RC.prototype._updateBoundingBox=function(A,t,e){var i=this.boundingBox;function n(A,t,e){null==A.boundingBox&&A.computeBoundingBox();var n=A.boundingBox.clone();t&&n.applyMatrix4(t),e&&n.applyMatrix4(e),n.min.equals(n.max)&&n.expandByScalar(5),i.union(n)}function I(A){var t,e;void 0!==A.geometry&&(A.userData.buffer&&(t=A.userData.buffer.matrix),A.userData.instance&&(e=A.userData.instance.matrix),n(A.geometry,t,e))}A?n(A,t,e):(i.makeEmpty(),this.modelGroup.traverse(I),this.backgroundGroup.traverse(I)),i.getSize(this.boundingBoxSize),this.boundingBoxLength=this.boundingBoxSize.length()},RC.prototype.updateBoundingBox=function(){this._updateBoundingBox(),A.Debug&&this.updateHelper()},RC.prototype.getPickingPixels=function(){var A=this.width,t=this.height,e=A*t*4,i=dl?new Float32Array(e):new Uint8Array(e);return this.render(!0),this.renderer.readRenderTargetPixels(this.pickingTarget,0,0,A,t,i),i},RC.prototype.getImage=function(A){var t=this;return new Promise((function(e){if(A){var i=t,n=i.width,I=i.height,r=n*I*4,o=t.getPickingPixels();if(dl){for(var g=new Uint8Array(r),a=0;a500&&!this.isStill&&this.sampleLevel<3&&-1!==this.sampleLevel){var t=this.sampleLevel;this.sampleLevel=3,this.renderPending=!0,this.render(),this.isStill=!0,this.sampleLevel=t,A.Debug&&jl.log("rendered still frame")}this.frameRequest=window.requestAnimationFrame(this.animate)},RC.prototype.pick=function(A,t){if("stereo"===this.parameters.cameraType)return{pid:0,instance:void 0,picker:void 0};A*=window.devicePixelRatio,t*=window.devicePixelRatio,A=Math.max(A-2,0),t=Math.max(t-2,0);var e,i,n=0,I=dl?kC:GC;this.render(!0),this.renderer.readRenderTargetPixels(this.pickingTarget,A,t,5,5,I);for(var r=0;r22&&(this.stats.begin(),this.isStill=!1),this.renderPending=!0,window.requestAnimationFrame((function(){A.render(),A.stats.update()})))},RC.prototype.updateZoom=function(){var A=uu(this.perspectiveCamera.fov),t=2*Math.tan(A/2)*this.cameraDistance;this.orthographicCamera.zoom=this.height/t},RC.prototype.absoluteToRelative=function(A){return 50*(1-A/this.bRadius)},RC.prototype.relativeToAbsolute=function(A){return this.bRadius*(1-A/50)},RC.prototype.__updateClipping=function(){var A=this.parameters;this.bRadius=Math.max(10,.5*this.boundingBoxLength),isFinite(this.bRadius)||(this.bRadius=50),this.camera.getWorldPosition(this.distVector),this.cDist=this.distVector.length(),this.cDist||(this.cameraDistance=Math.abs(A.cameraZ),this.cDist=Math.abs(A.cameraZ));var t=this.scene.fog;if(t.color.set(A.fogColor),"camera"===A.clipMode)this.camera.near=A.clipNear,this.camera.far=A.clipFar,t.near=A.fogNear,t.far=A.fogFar;else if("absolute"===A.clipScale)this.camera.near=this.cDist-A.clipNear,this.camera.far=this.cDist+A.clipFar,t.near=this.cDist-A.fogNear,t.far=this.cDist+A.fogFar;else{var e=(50-A.clipNear)/50,i=-(50-A.clipFar)/50;this.camera.near=this.cDist-this.bRadius*e,this.camera.far=this.cDist+this.bRadius*i;var n=(50-A.fogNear)/50,I=-(50-A.fogFar)/50;t.near=this.cDist-this.bRadius*n,t.far=this.cDist+this.bRadius*I}"camera"!==A.clipMode&&("PerspectiveCamera"===this.camera.type?(this.camera.near=Math.max(.1,A.clipDist,this.camera.near),this.camera.far=Math.max(1,this.camera.far),t.near=Math.max(.1,t.near),t.far=Math.max(1,t.far)):"OrthographicCamera"===this.camera.type&&A.clipDist>0&&(this.camera.near=Math.max(A.clipDist,this.camera.near)))},RC.prototype.__updateCamera=function(){var A=this.camera;A.updateMatrix(),A.updateMatrixWorld(!0),A.updateProjectionMatrix(),function(A,t,e,i,n){var I=new se;e.getSize(I);var r=I.height,o=e.getPixelRatio(),g="OrthographicCamera"===t.type;QC.set(I.width,I.height),SC.getInverse(t.projectionMatrix),YC.copy(t.projectionMatrix).transpose(),A.traverse((function(A){var t=A.material;if(t){var e=t.uniforms;if(e){if(t.clipNear){var I=(50-t.clipNear)/50,a=i-n*I;e.clipNear.value=a}e.canvasHeight&&(e.canvasHeight.value=r),e.resolution&&e.resolution.value.copy(QC),e.pixelRatio&&(e.pixelRatio.value=o),e.projectionMatrixInverse&&e.projectionMatrixInverse.value.copy(SC),e.projectionMatrixTranspose&&e.projectionMatrixTranspose.value.copy(YC),e.ortho&&(e.ortho.value=g)}}}))}(this.scene,A,this.renderer,this.cDist,this.bRadius),function(A,t){A.traverseVisible((function(A){if(A instanceof sg&&A.userData.buffer.parameters.sortParticles){var e=A.geometry.attributes,i=e.position.count;if(0!==i){var n,I,r,o,g,a,M;wC.multiplyMatrices(t.matrixWorldInverse,A.matrixWorld),mC.multiplyMatrices(t.projectionMatrix,wC),A.userData.sortData?(n=A.userData.sortData,r=n.__zArray,I=n.__sortArray,o=n.__cmpFn):(r=new Float32Array(i),I=new Uint32Array(i),n={__zArray:r,__sortArray:I,__cmpFn:o=function(A,t){var e=r[A],i=r[t];return e>i?1:et?1:A=a&&t(A[I],n)>0;)A[I+1]=A[I],--I;A[I+1]=n}if(-1===g)break;M=o[g--],a=o[g--]}else{for(r=M,s(a+M>>1,I=a+1),t(A[a],A[M])>0&&s(a,M),t(A[I],A[M])>0&&s(I,M),t(A[a],A[I])>0&&s(a,I),n=A[I];;){do{I++}while(t(A[I],n)<0);do{r--}while(t(A[r],n)>0);if(r=r-a?(o[++g]=I,o[++g]=M,M=r-1):(o[++g]=a,o[++g]=r-1,a=I)}}(I,o),e){var u=e[c],l=u.array,C=u.itemSize;n[c]||(n[c]=new Float32Array(C*i)),M=n[c],n[c]=l;for(var T=0;T0&&"stereo"!==this.parameters.cameraType?this.__renderSuperSample(t,e):this.__renderModelGroup(t,e)},RC.prototype.render=function(A,t){if(void 0===A&&(A=!1),this.rendering)jl.warn("'tried to call 'render' from within 'render'");else{this.rendering=!0;try{this.__updateClipping(),this.__updateCamera(),this.__updateLights(),this.updateInfo(!0),"stereo"===this.parameters.cameraType?this.__renderStereo(A,t):this.__render(A,this.camera,t),this.lastRenderedPicking=A}finally{this.rendering=!1,this.renderPending=!1}this.signals.rendered.dispatch()}},RC.prototype.clear=function(){jl.log("scene cleared"),this.scene.remove(this.rotationGroup),this._initScene(),this.renderer.clear()},RC.prototype.dispose=function(){this.renderer.dispose(),window.cancelAnimationFrame(this.frameRequest)},Object.defineProperties(RC.prototype,XC);var WC=function(A,t){void 0===t&&(t={}),this.domElement=A,this.signals={moved:new wu.Signal,scrolled:new wu.Signal,dragged:new wu.Signal,dropped:new wu.Signal,clicked:new wu.Signal,hovered:new wu.Signal,doubleClicked:new wu.Signal},this.position=new se,this.prevPosition=new se,this.down=new se,this.canvasPosition=new se,this.prevClickCP=new se,this.moving=!1,this.hovering=!0,this.scrolled=!1,this.lastMoved=1/0,this.which=0,this.buttons=0,this.pressed=!1,this.altKey=!1,this.ctrlKey=!1,this.metaKey=!1,this.shiftKey=!1,this.domElement.style.touchAction="none",this.hoverTimeout=Hc(t.hoverTimeout,50),this.handleScroll=Hc(t.handleScroll,!0),this.doubleClickSpeed=Hc(t.doubleClickSpeed,500),this._listen=this._listen.bind(this),this._onMousewheel=this._onMousewheel.bind(this),this._onMousemove=this._onMousemove.bind(this),this._onMousedown=this._onMousedown.bind(this),this._onMouseup=this._onMouseup.bind(this),this._onContextmenu=this._onContextmenu.bind(this),this._onTouchstart=this._onTouchstart.bind(this),this._onTouchend=this._onTouchend.bind(this),this._onTouchmove=this._onTouchmove.bind(this),this._listen();var e={passive:!1};document.addEventListener("mousewheel",this._onMousewheel,e),document.addEventListener("wheel",this._onMousewheel,e),document.addEventListener("MozMousePixelScroll",this._onMousewheel,e),document.addEventListener("mousemove",this._onMousemove,e),document.addEventListener("mousedown",this._onMousedown,e),document.addEventListener("mouseup",this._onMouseup,e),document.addEventListener("contextmenu",this._onContextmenu,e),document.addEventListener("touchstart",this._onTouchstart,e),document.addEventListener("touchend",this._onTouchend,e),document.addEventListener("touchmove",this._onTouchmove,e)},ZC={key:{configurable:!0}};ZC.key.get=function(){var A=0;return this.altKey&&(A+=1),this.ctrlKey&&(A+=2),this.metaKey&&(A+=4),this.shiftKey&&(A+=8),A},WC.prototype.setParameters=function(A){void 0===A&&(A={}),this.hoverTimeout=Hc(A.hoverTimeout,this.hoverTimeout)},WC.prototype._listen=function(){var A=window.performance.now(),t=this.canvasPosition;this.doubleClickPending&&A-this.lastClicked>this.doubleClickSpeed&&(this.doubleClickPending=!1),A-this.lastMoved>this.hoverTimeout&&(this.moving=!1),(this.scrolled||!this.moving&&!this.hovering)&&(this.scrolled=!1,-1!==this.hoverTimeout&&this.overElement&&(this.hovering=!0,this.signals.hovered.dispatch(t.x,t.y))),this.frameRequest=window.requestAnimationFrame(this._listen)},WC.prototype._onMousewheel=function(A){var t=this;if(A.target===this.domElement&&this.handleScroll){A.preventDefault(),this._setKeys(A);var e=0;"deltaY"in A&&"deltaMode"in A&&void 0!==A.deltaY&&void 0!==A.deltaMode?e=A.deltaMode===WheelEvent.DOM_DELTA_PIXEL?.025*-A.deltaY:A.deltaMode===WheelEvent.DOM_DELTA_LINE?-A.deltaY*(2.5/3):2.5*-A.deltaY:"deltaY"in A&&!("detail"in A)?e=.025*-A.deltaY:void 0!==A.wheelDelta?e=.025*-A.wheelDelta:void 0!==A.wheelDeltaY?e=.025*-A.wheelDeltaY:void 0!==A.detail&&(e=-A.detail/3),this.signals.scrolled.dispatch(e),setTimeout((function(){t.scrolled=!0}),this.hoverTimeout)}},WC.prototype._onMousemove=function(A){A.target===this.domElement?(A.preventDefault(),this.overElement=!0):this.overElement=!1,this._setKeys(A),this.moving=!0,this.hovering=!1,this.lastMoved=window.performance.now(),this.prevPosition.copy(this.position),this.position.set(A.clientX,A.clientY),this._setCanvasPosition(A);var t=this.prevPosition.x-this.position.x,e=this.prevPosition.y-this.position.y;this.signals.moved.dispatch(t,e),this.pressed&&this.signals.dragged.dispatch(t,e)},WC.prototype._onMousedown=function(A){A.target===this.domElement&&(A.preventDefault(),this._setKeys(A),this.moving=!1,this.hovering=!1,this.down.set(A.clientX,A.clientY),this.position.set(A.clientX,A.clientY),this.which=A.which,this.buttons=function(A){if("object"===o(A)){if("buttons"in A)return A.buttons;if("which"in A){var t=A.which;if(2===t)return 4;if(3===t)return 2;if(t>0)return 1<=0)return 1<2&&this.handleScroll&&this.position.distanceTo(this.prevPosition)<2)this.which=0,this.buttons=0,this.signals.scrolled.dispatch(n/2);else{this.which=3,this.buttons=2;var I=this.prevPosition.x-this.position.x,r=this.prevPosition.y-this.position.y;this.signals.moved.dispatch(I,r),this.pressed&&this.signals.dragged.dispatch(I,r)}}},WC.prototype._distance=function(){return this.position.distanceTo(this.down)},WC.prototype._setCanvasPosition=function(A){var t,e,i=this.domElement.getBoundingClientRect();"clientX"in A&&"clientY"in A?(t=A.clientX-i.left,e=A.clientY-i.top):(t=A.offsetX,e=A.offsetY),this.canvasPosition.set(t,i.height-e)},WC.prototype._setKeys=function(A){this.altKey=A.altKey,this.ctrlKey=A.ctrlKey,this.metaKey=A.metaKey,this.shiftKey=A.shiftKey},WC.prototype.dispose=function(){document.removeEventListener("mousewheel",this._onMousewheel),document.removeEventListener("wheel",this._onMousewheel),document.removeEventListener("MozMousePixelScroll",this._onMousewheel),document.removeEventListener("mousemove",this._onMousemove),document.removeEventListener("mousedown",this._onMousedown),document.removeEventListener("mouseup",this._onMouseup),document.removeEventListener("contextmenu",this._onContextmenu),document.removeEventListener("touchstart",this._onTouchstart),document.removeEventListener("touchend",this._onTouchend),document.removeEventListener("touchmove",this._onTouchmove),window.cancelAnimationFrame(this.frameRequest)},Object.defineProperties(WC.prototype,ZC);var KC=new we,_C=new we,qC=new we,$C=new we,AT=new we,tT=new De,eT=new de,iT=new de,nT=new we,IT=new De,rT=new De,oT=function(A,t){void 0===t&&(t={}),this.stage=A,this.rotateSpeed=Hc(t.rotateSpeed,2),this.zoomSpeed=Hc(t.zoomSpeed,1.2),this.panSpeed=Hc(t.panSpeed,1),this.viewer=A.viewer,this.mouse=A.mouseObserver,this.controls=A.viewerControls},gT={component:{configurable:!0},atom:{configurable:!0}};gT.component.get=function(){return this.stage.transformComponent},gT.atom.get=function(){return this.stage.transformAtom},oT.prototype._setPanVector=function(A,t,e){void 0===e&&(e=0);var i=this.controls.getCanvasScaleFactor(e);IT.set(A,t,0),IT.multiplyScalar(this.panSpeed*i)},oT.prototype._getRotateXY=function(A,t){return[this.rotateSpeed*-A*.01,this.rotateSpeed*t*.01]},oT.prototype._getCameraRotation=function(A){return A.extractRotation(this.viewer.camera.matrixWorld),A.multiply(_C.makeRotationY(Math.PI)),A},oT.prototype._transformPanVector=function(){this.component&&(nT.extractRotation(this.component.transform),nT.premultiply(this.viewer.rotationGroup.matrix),nT.getInverse(nT),nT.multiply(this._getCameraRotation($C)),IT.applyMatrix4(nT))},oT.prototype.zoom=function(A){this.controls.zoom(this.zoomSpeed*A*.02)},oT.prototype.pan=function(A,t){this._setPanVector(A,t),nT.getInverse(this.viewer.rotationGroup.matrix),nT.multiply(this._getCameraRotation($C)),IT.applyMatrix4(nT),this.controls.translate(IT)},oT.prototype.panComponent=function(A,t){this.component&&(this._setPanVector(A,t),this._transformPanVector(),this.component.position.add(IT),this.component.updateMatrix())},oT.prototype.panAtom=function(A,t){this.atom&&this.component&&(this.atom.positionToVector3(rT),rT.add(this.viewer.translationGroup.position),rT.applyMatrix4(this.viewer.rotationGroup.matrix),this._setPanVector(A,t,rT.z),this._transformPanVector(),this.atom.positionAdd(IT),this.component.updateRepresentations({position:!0}))},oT.prototype.rotate=function(A,t){var e=this._getRotateXY(A,t),i=e[0],n=e[1];this._getCameraRotation($C),tT.set(1,0,0),tT.applyMatrix4($C),eT.setFromAxisAngle(tT,n),tT.set(0,1,0),tT.applyMatrix4($C),iT.setFromAxisAngle(tT,i),eT.multiply(iT),$C.makeRotationFromQuaternion(eT),this.controls.applyMatrix($C)},oT.prototype.zRotate=function(A,t){var e=this.rotateSpeed*((-A+t)/-2)*.01;qC.makeRotationZ(e),this.controls.applyMatrix(qC)},oT.prototype.rotateComponent=function(A,t){if(this.component){var e=this._getRotateXY(A,t),i=e[0],n=e[1];this._getCameraRotation(AT),$C.extractRotation(this.component.transform),$C.premultiply(this.viewer.rotationGroup.matrix),$C.getInverse($C),$C.premultiply(AT),tT.set(1,0,0),tT.applyMatrix4($C),KC.makeRotationAxis(tT,n),tT.set(0,1,0),tT.applyMatrix4($C),_C.makeRotationAxis(tT,i),KC.multiply(_C),eT.setFromRotationMatrix(KC),this.component.quaternion.premultiply(eT),this.component.quaternion.normalize(),this.component.updateMatrix()}},Object.defineProperties(oT.prototype,gT);var aT=new De,MT=function(A,t){this.stage=t,this.pid=A.pid,this.picker=A.picker,this.instance=A.instance,this.stage=t,this.controls=t.viewerControls,this.mouse=t.mouseObserver},sT={type:{configurable:!0},altKey:{configurable:!0},ctrlKey:{configurable:!0},metaKey:{configurable:!0},shiftKey:{configurable:!0},canvasPosition:{configurable:!0},component:{configurable:!0},object:{configurable:!0},position:{configurable:!0},closestBondAtom:{configurable:!0},closeAtom:{configurable:!0},arrow:{configurable:!0},atom:{configurable:!0},axes:{configurable:!0},bond:{configurable:!0},box:{configurable:!0},cone:{configurable:!0},clash:{configurable:!0},contact:{configurable:!0},cylinder:{configurable:!0},distance:{configurable:!0},ellipsoid:{configurable:!0},octahedron:{configurable:!0},point:{configurable:!0},mesh:{configurable:!0},slice:{configurable:!0},sphere:{configurable:!0},tetrahedron:{configurable:!0},torus:{configurable:!0},surface:{configurable:!0},unitcell:{configurable:!0},unknown:{configurable:!0},volume:{configurable:!0},wideline:{configurable:!0}};sT.type.get=function(){return this.picker.type},sT.altKey.get=function(){return this.mouse.altKey},sT.ctrlKey.get=function(){return this.mouse.ctrlKey},sT.metaKey.get=function(){return this.mouse.metaKey},sT.shiftKey.get=function(){return this.mouse.shiftKey},sT.canvasPosition.get=function(){return this.mouse.canvasPosition},sT.component.get=function(){return this.stage.getComponentsByObject(this.picker.data).list[0]},sT.object.get=function(){return this.picker.getObject(this.pid)},sT.position.get=function(){return this.picker.getPosition(this.pid,this.instance,this.component)},sT.closestBondAtom.get=function(){if("bond"===this.type&&this.bond){var A,t,e,i=this.bond,n=this.controls,I=this.canvasPosition,r=i.atom1.positionToVector3(),o=i.atom2.positionToVector3();return r.applyMatrix4(this.component.matrix),o.applyMatrix4(this.component.matrix),t=n.getPositionOnCanvas(r),e=n.getPositionOnCanvas(o),(A=I).distanceTo(t)=i.length))return new MT(e,this.stage);console.error("pid >= picker.array.length")}};var uT=new de,lT=new De,CT=new De,TT=new De,hT=new De,NT=new we,dT=new De,yT=new we,ET=function(A){this.stage=A,this.signals={changed:new wu.Signal},this.viewer=A.viewer},DT={position:{configurable:!0},rotation:{configurable:!0}};DT.position.get=function(){return this.viewer.translationGroup.position},DT.rotation.get=function(){return this.viewer.rotationGroup.quaternion},ET.prototype.changed=function(){this.viewer.requestRender(),this.signals.changed.dispatch()},ET.prototype.getPositionOnCanvas=function(A,t){var e=Iu(t,se),i=this.viewer;return TT.copy(A).add(i.translationGroup.position).applyMatrix4(i.rotationGroup.matrix).project(i.camera),e.set((TT.x+1)*i.width/2,(TT.y+1)*i.height/2)},ET.prototype.getCanvasScaleFactor=function(A){void 0===A&&(A=0);var t=this.viewer.camera;if(t instanceof XM)return 1/t.zoom;A=Math.abs(A),A+=this.getCameraDistance();var e=uu(t.fov);return 2*A*Math.tan(e/2)/this.viewer.height},ET.prototype.getOrientation=function(A){var t=ou(A);t.copy(this.viewer.rotationGroup.matrix);var e=this.getCameraDistance();return t.scale(hT.set(e,e,e)),t.setPosition(this.viewer.translationGroup.position),t},ET.prototype.orient=function(A){ou(A).decompose(lT,uT,CT);var t=this.viewer;t.rotationGroup.setRotationFromQuaternion(uT),t.translationGroup.position.copy(lT),t.cameraDistance=CT.z,t.updateZoom(),this.changed()},ET.prototype.translate=function(A){this.viewer.translationGroup.position.add(ru(A)),this.changed()},ET.prototype.center=function(A){this.viewer.translationGroup.position.copy(ru(A)).negate(),this.changed()},ET.prototype.zoom=function(A){this.distance(this.getCameraDistance()*(1-A))},ET.prototype.getCameraDistance=function(){return this.viewer.cameraDistance},ET.prototype.distance=function(A){this.viewer.cameraDistance=Math.max(Math.abs(A),.2),this.viewer.updateZoom(),this.changed()},ET.prototype.spin=function(A,t){NT.getInverse(this.viewer.rotationGroup.matrix),dT.copy(ru(A)).applyMatrix4(NT),this.viewer.rotationGroup.rotateOnAxis(dT,t),this.changed()},ET.prototype.rotate=function(A){this.viewer.rotationGroup.setRotationFromQuaternion(gu(A)),this.changed()},ET.prototype.align=function(A){yT.getInverse(ou(A)),this.viewer.rotationGroup.setRotationFromMatrix(yT),this.changed()},ET.prototype.applyMatrix=function(A){this.viewer.rotationGroup.applyMatrix4(ou(A)),this.changed()},Object.defineProperties(ET.prototype,DT);var jT=function(A,t){for(var e,i=[],n=arguments.length-2;n-- >0;)i[n]=arguments[n+2];this.pausedTime=-1,this.elapsedDuration=0,this.pausedDuration=0,this.ignoreGlobalToggle=!1,this._paused=!1,this._resolveList=[],this.duration=Hc(A,1e3),this.controls=t,this.startTime=window.performance.now(),(e=this)._init.apply(e,i)},BT={done:{configurable:!0},paused:{configurable:!0}};BT.done.get=function(){return 1===this.alpha},BT.paused.get=function(){return this._paused},jT.prototype.tick=function(A){if(!this._paused)return this.elapsedDuration=A.currentTime-this.startTime-this.pausedDuration,0===this.duration?this.alpha=1:this.alpha=yu(0,1,this.elapsedDuration/this.duration),this._tick(A),this.done&&this._resolveList.forEach((function(A){return A()})),this.done},jT.prototype.pause=function(A){A&&(this._hold=!0),-1===this.pausedTime&&(this.pausedTime=window.performance.now()),this._paused=!0},jT.prototype.resume=function(A){!A&&this._hold||(this.pausedDuration+=window.performance.now()-this.pausedTime,this._paused=!1,this._hold=!1,this.pausedTime=-1)},jT.prototype.toggle=function(){this._paused?this.resume():this.pause()},jT.prototype.then=function(A){var t,e=this;return t=this.done?Promise.resolve():new Promise((function(A){return e._resolveList.push(A)})),t.then(A)},Object.defineProperties(jT.prototype,BT);var xT=function(A){function t(t,e){for(var i=[],n=arguments.length-2;n-- >0;)i[n]=arguments[n+2];A.apply(this,[Hc(t,1/0),e].concat(i))}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype._init=function(A,t){Array.isArray(A)?this.axis=(new De).fromArray(A):this.axis=Hc(A,new De(0,1,0)),this.angle=Hc(t,.01)},t.prototype._tick=function(A){this.axis&&this.angle&&this.controls.spin(this.axis,this.angle*A.lastDuration/16)},t}(jT),pT=function(A){function t(t,e){for(var i=[],n=arguments.length-2;n-- >0;)i[n]=arguments[n+2];A.apply(this,[Hc(t,1/0),e].concat(i)),this.angleSum=0,this.direction=1}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype._init=function(A,t,e){Array.isArray(A)?this.axis=(new De).fromArray(A):this.axis=Hc(A,new De(0,1,0)),this.angleStep=Hc(t,.01),this.angleEnd=Hc(e,.2)},t.prototype._tick=function(A){if(this.axis&&this.angleStep&&this.angleEnd){var t=yu(0,1,Math.abs(this.angleSum)/this.angleEnd),e=this.angleStep*this.direction*(1.1-t);this.controls.spin(this.axis,e*A.lastDuration/16),this.angleSum+=this.angleStep,this.angleSum>=this.angleEnd&&(this.direction*=-1,this.angleSum=-this.angleEnd)}},t}(jT),LT=function(A){function t(){A.apply(this,arguments)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype._init=function(A,t){this.moveFrom=ru(Hc(A,new De)),this.moveTo=ru(Hc(t,new De))},t.prototype._tick=function(){this.controls.position.lerpVectors(this.moveFrom,this.moveTo,this.alpha).negate(),this.controls.changed()},t}(jT),fT=function(A){function t(){A.apply(this,arguments)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype._init=function(A,t){this.zoomFrom=A,this.zoomTo=t},t.prototype._tick=function(){this.controls.distance(Nu(this.zoomFrom,this.zoomTo,this.alpha))},t}(jT),zT=function(A){function t(){A.apply(this,arguments),this._currentRotation=new de}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype._init=function(A,t){this.rotateFrom=gu(A),this.rotateTo=gu(t),this._currentRotation=new de},t.prototype._tick=function(){this._currentRotation.copy(this.rotateFrom).slerp(this.rotateTo,this.alpha),this.controls.rotate(this._currentRotation)},t}(jT),wT=function(A){function t(){A.apply(this,arguments)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype._init=function(A,t,e){this.valueFrom=A,this.valueTo=t,this.callback=e},t.prototype._tick=function(){this.callback(Nu(this.valueFrom,this.valueTo,this.alpha))},t}(jT),mT=function(A){function t(){A.apply(this,arguments)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype._init=function(A){this.callback=A},t.prototype._tick=function(){1===this.alpha&&this.callback()},t}(jT),QT=function(A){void 0===A&&(A=[]),this._resolveList=[],this._list=A},ST={done:{configurable:!0}};ST.done.get=function(){return this._list.every((function(A){return A.done}))},QT.prototype.then=function(A){var t,e=this;return t=this.done?Promise.resolve():new Promise((function(A){e._resolveList.push(A),e._list.forEach((function(A){A.then((function(){e._resolveList.forEach((function(A){A()})),e._resolveList.length=0}))}))})),t.then(A)},Object.defineProperties(QT.prototype,ST);var YT=function(A){this.stage=A,this.animationList=[],this.finishedList=[],this.viewer=A.viewer,this.controls=A.viewerControls},OT={paused:{configurable:!0}};OT.paused.get=function(){return this.animationList.every((function(A){return A.paused}))},YT.prototype.add=function(A){return 0===A.duration?A.tick(this.viewer.stats):this.animationList.push(A),A},YT.prototype.remove=function(A){var t=this.animationList,e=t.indexOf(A);e>-1&&t.splice(e,1)},YT.prototype.run=function(A){for(var t=this.finishedList,e=this.animationList,i=e.length,n=0;n0?(this.tasks.change(1-this.queue.length()),this.queue.kill()):this.tasks.increment(),this.queue.push(A||!1)}else this.lazyProps.build=!0},UT.prototype.make=function(t,e){var i=this;A.Debug&&jl.time("Representation.make "+this.type);var n=function(){t?(i.update(t),i.viewer.requestRender(),i.tasks.decrement(),e&&e()):(i.clear(),i.create(),i.manualAttach||i.disposed||(A.Debug&&jl.time("Representation.attach "+i.type),i.attach((function(){A.Debug&&jl.timeEnd("Representation.attach "+i.type),i.tasks.decrement(),e&&e()})))),A.Debug&&jl.timeEnd("Representation.make "+i.type)};this.toBePrepared?this.prepare(n):n()},UT.prototype.attach=function(A){this.setVisibility(this.visible),A()},UT.prototype.setVisibility=function(A,t){if(this.visible=A,this.visible&&this.opacity){var e=this.lazyProps,i=e.bufferParams,n=e.what;if(e.build)return e.build=!1,this.build(),this;(Object.keys(i).length||Object.keys(n).length)&&(e.bufferParams={},e.what={},this.updateParameters(i,n))}return this.bufferList.forEach((function(t){t.setVisibility(A)})),t||this.viewer.requestRender(),this},UT.prototype.setParameters=function(A,t,e){void 0===t&&(t={}),void 0===e&&(e=!1);var i=A||{},n=this.parameters,I={};for(var r in this.opacity||void 0===i.opacity||(this.lazyProps.build?(this.lazyProps.build=!1,e=!0):(Object.assign(I,this.lazyProps.bufferParams),Object.assign(t,this.lazyProps.what),this.lazyProps.bufferParams={},this.lazyProps.what={})),this.setColor(i.color,i),i)void 0!==i[r]&&void 0!==n[r]&&(n[r].int&&(i[r]=parseInt(i[r])),n[r].float&&(i[r]=parseFloat(i[r])),i[r]!==this[r]||i[r].equals&&!i[r].equals(this[r]))&&(this[r]&&this[r].copy&&i[r].copy?this[r].copy(i[r]):this[r]&&this[r].set?this[r].set(i[r]):this[r]=i[r],n[r].buffer&&(!0===n[r].buffer?I[r]=i[r]:I[n[r].buffer]=i[r]),n[r].update&&(t[n[r].update]=!0),!n[r].rebuild||"impostor"===n[r].rebuild&&El&&!this.disableImpostor||(e=!0));return e?this.build():this.updateParameters(I,t),this},UT.prototype.updateParameters=function(A,t){if(void 0===A&&(A={}),this.lazy&&(!this.visible||!this.opacity)&&!1===A.hasOwnProperty("opacity"))return Object.assign(this.lazyProps.bufferParams,A),void Object.assign(this.lazyProps.what,t);this.bufferList.forEach((function(t){t.setParameters(A)})),Object.keys(t).length&&this.update(t),this.viewer.requestRender()},UT.prototype.getParameters=function(){var A=this,t={lazy:this.lazy,visible:this.visible,quality:this.quality};return Object.keys(this.parameters).forEach((function(e){null!==A.parameters[e]&&(t[e]=A[e])})),t},UT.prototype.clear=function(){var A=this;this.bufferList.forEach((function(t){A.viewer.remove(t),t.dispose()})),this.bufferList.length=0,this.viewer.requestRender()},UT.prototype.dispose=function(){this.disposed=!0,this.queue.kill(),this.tasks.dispose(),this.clear()};var bT=function(t){var e=this;this.pending=0,this.postCount=0,this.onmessageDict={},this.onerrorDict={},this.name=t,this.blobUrl=window.URL.createObjectURL(pl.get(t)),this.worker=new Worker(this.blobUrl),pl.activeWorkerCount+=1,this.worker.onmessage=function(i){e.pending-=1;var n=i.data.__postId;A.Debug&&jl.timeEnd("Worker.postMessage "+t+" #"+n);var I=e.onmessageDict[n];I&&I.call(e.worker,i),delete e.onmessageDict[n],delete e.onerrorDict[n]},this.worker.onerror=function(A){if(e.pending-=1,A.data){var i=A.data.__postId,n=e.onerrorDict[i];n?n.call(e.worker,A):jl.error("Worker.onerror",i,t,A),delete e.onmessageDict[i],delete e.onerrorDict[i]}else jl.error("Worker.onerror",t,A)}};bT.prototype.post=function(t,e,i,n){void 0===t&&(t={}),this.onmessageDict[this.postCount]=i,this.onerrorDict[this.postCount]=n,t.__name=this.name,t.__postId=this.postCount,t.__debug=A.Debug,A.Debug&&jl.time("Worker.postMessage "+this.name+" #"+this.postCount);try{this.worker.postMessage(t,e)}catch(A){jl.error("worker.post:",A),this.worker.postMessage(t)}return this.pending+=1,this.postCount+=1,this},bT.prototype.terminate=function(){this.worker?(this.worker.terminate(),window.URL.revokeObjectURL(this.blobUrl),pl.activeWorkerCount-=1):jl.log("no worker to terminate")};var PT=function(A,t){void 0===t&&(t=2),this.pool=[],this.count=0,this.maxCount=Math.min(8,t),this.name=A};function kT(A){for(var t=A.length,e=t/3,i=0,n=0,I=0,r=0;rn&&(n=a),M>I&&(I=M),s>r&&(r=s)}return[XT([t,e,i]),XT([n,I,r])]}function JT(A,t){for(var e=0,i=t.length;e0){var o=1/Math.sqrt(r);A[t]=i*o,A[t+1]=n*o,A[t+2]=I*o}}}function XT(A){return new Float32Array(A||3)}function VT(A,t,e){var i=t[0],n=t[1],I=t[2],r=e[0],o=e[1],g=e[2];A[0]=n*g-I*o,A[1]=I*r-i*g,A[2]=i*o-n*r}function WT(A,t){return A[0]*t[0]+A[1]*t[1]+A[2]*t[2]}function ZT(A,t,e){A[0]=t[0]-e[0],A[1]=t[1]-e[1],A[2]=t[2]-e[2]}function KT(A,t,e){A[0]=t[0]+e[0],A[1]=t[1]+e[1],A[2]=t[2]+e[2]}function _T(A,t,e){void 0===e&&(e=0),A[0]=t[e],A[1]=t[e+1],A[2]=t[e+2]}function qT(A,t,e){void 0===e&&(e=0),t[e]=A[0],t[e+1]=A[1],t[e+2]=A[2]}function $T(A){return A[0]*A[0]+A[1]*A[1]+A[2]*A[2]}function Ah(A){return Math.sqrt(A[0]*A[0]+A[1]*A[1]+A[2]*A[2])}function th(A,t,e){eh(A,t,1/e)}function eh(A,t,e){A[0]=t[0]*e,A[1]=t[1]*e,A[2]=t[2]*e}function ih(A,t){var e=$T(t);0==e?(A[0]=t[0],A[1]=t[1],A[2]=t[2]):eh(A,t,1/Math.sqrt(e))}function nh(A,t,e){A[0]=t[0]-e,A[1]=t[1]-e,A[2]=t[2]-e}function Ih(A,t,e){A[0]=t[0]+e,A[1]=t[1]+e,A[2]=t[2]+e}function rh(A,t){A[0]=Math.floor(t[0]),A[1]=Math.floor(t[1]),A[2]=Math.floor(t[2])}function oh(A,t){A[0]=Math.ceil(t[0]),A[1]=Math.ceil(t[1]),A[2]=Math.ceil(t[2])}function gh(A,t){A[0]=-t[0],A[1]=-t[1],A[2]=-t[2]}function ah(A,t){void 0===t&&(t=9);for(var e=Math.floor(t/2),i=A.position1.length/3,n=e*i*3,I=1/t,r=CC(A.position1,A.position2),o=new Float32Array(n),g=new Float32Array(n),a=new De,M=0;M0){var L=3*u;n[L]=A.position2[3*M-3],n[L+1]=A.position2[3*M-2],n[L+1]=A.position2[3*M-1]}var f=new Float32Array(i),z=new Float32Array(n),w=lC(f,z),m=new Float32Array(I),Q={position:w,position1:f,position2:z,color:m,color2:m};return r&&(Q.radius=new Float32Array(r)),o&&A.picking&&(A.picking.array=new Float32Array(o),Q.picking=A.picking),g&&(Q.primitiveId=new Float32Array(g)),Q}PT.prototype.post=function(A,t,e,i){void 0===A&&(A={});var n=this.getNextWorker();return n?n.post(A,t,e,i):console.error("unable to get worker from pool"),this},PT.prototype.terminate=function(){this.pool.forEach((function(A){A.terminate()}))},PT.prototype.getNextWorker=function(){for(var A,t=1/0,e=0;e=this.count){A=new bT(this.name),this.pool.push(A),this.count+=1;break}var i=this.pool[e];if(0===i.pending){A=i;break}i.pending>this.exp),this.boundY=1+(e.max.y-this.minY>>this.exp),this.boundZ=1+(e.max.z-this.minZ>>this.exp);for(var i=this.boundX*this.boundY*this.boundZ,n=void 0!==A.count?A.count:A.x.length,I=A.x,r=A.y,o=A.z,g=0,a=new Uint32Array(i),M=new Int32Array(n),s=0;s>this.exp,u=r[s]-this.minY>>this.exp,l=o[s]-this.minZ>>this.exp,C=(c*this.boundY+u)*this.boundZ+l;1===(a[C]+=1)&&(g+=1),M[s]=C}for(var T=new Uint16Array(g),h=0,N=0;h0&&(a[h]=N+1,T[N]=d,N+=1)}for(var y=new Uint32Array(g),E=1;E0){var p=x-1;j[y[p]+D[p]]=B,D[p]+=1}}this.grid=a,this.bucketCount=T,this.bucketOffset=y,this.bucketArray=j,this.xArray=I,this.yArray=r,this.zArray=o};Lh.prototype.within=function(A,t,e,i){var n=[];return this.eachWithin(A,t,e,i,(function(A){return n.push(A)})),n},Lh.prototype.eachWithin=function(A,t,e,i,n){for(var I=i*i,r=Math.max(0,A-i-this.minX>>this.exp),o=Math.max(0,t-i-this.minY>>this.exp),g=Math.max(0,e-i-this.minZ>>this.exp),a=Math.min(this.boundX,1+(A+i-this.minX>>this.exp)),M=Math.min(this.boundY,1+(t+i-this.minY>>this.exp)),s=Math.min(this.boundZ,1+(e+i-this.minZ>>this.exp)),c=r;c0)for(var h=T-1,N=this.bucketOffset[h],d=N+this.bucketCount[h],y=N;yI?r.set(this[i].subarray(0,I)):r.set(this[i]),this[i]=r}},fh.prototype.growIfFull=function(){if(this.count>=this.length){var A=Math.round(1.5*this.length);this.resize(Math.max(256,A))}},fh.prototype.copyFrom=function(A,t,e,i){for(var n=0,I=this._fields.length;n0;)g-=1;o<=g&&(o===r?r=g:g===r&&(r=o),(a=o)!==(M=g)&&(e.copyFrom(t,0,a,1),t.copyWithin(a,M,1),t.copyFrom(e,M,0,1)),o+=1,g-=1)}while(o<=g);i(n,g),i(o,I)}var a,M}(0,this.count-1),jl.timeEnd("Store.sort")},fh.prototype.clear=function(){this.count=0},fh.prototype.dispose=function(){for(var A=0,t=this._fields.length;A>>1&1431655765))+(A>>>2&858993459))+(A>>>4)&252645135)>>>24}var Qh=function(A,t){this.length=A,this._words=new Uint32Array(A+32>>>5),!0===t&&this.setAll()};function Sh(A){for(var t=A.edgeCount,e=A.nodeCount,i=A.nodeArray1,n=A.nodeArray2,I=new Uint8Array(e),r=new Int32Array(e),o=0;o0){var i=A.types,n=A.groups,I=A.centers,r=A.atomSets;i.push(t.type),n.push(t.group),I.x.push(t.x/e),I.y.push(t.y/e),I.z.push(t.z/e),r.push(t.atomSet)}}Qh.prototype.get=function(A){return 0!=(this._words[A>>>5]&1<>>5]|=1<>>5]&=~(1<>>5]^=1<>>5,r=t>>>5,o=I+1;o>>5]|=1<>>5]|=1<>>5]|=1<>>5]&=~(1<>>5]&=~(1<>>5]&=~(1<>>5]|=1<>>5]&=~(1<>>e,this},Qh.prototype._isRangeValue=function(A,t,e){if(!(t>>5,r=t>>>5,o=I+1;o>>5]&1<>>5]&1<>>5]&1<>>5]&1<>>5]&1<1||1!==t.number&&(e.index=t.index,n[I++].subVectors(t,A))})),1===I&&e.eachBondedAtom((function(t){I>1||1!==t.number&&t.index!==A.index&&n[I++].subVectors(t,A)})),2===I){var r=n[0].cross(n[1]);return Math.abs(Math.PI/2-r.angleTo(i))}}function CN(A){if(A["@valenceModel"])return A["@valenceModel"];var t=function(A,t){var e=A.structure,i=e.atomCount,n=new Int8Array(i),I=new Int8Array(i),r=new Int8Array(i),o=new Int8Array(i);return e.eachAtom((function(A){var e=A.index,i=function(A,t){var e=A.bondToElementCount(1),i=A.formalCharge||0,n="always"===t.assignCharge||"auto"===t.assignCharge&&0===i,I="always"===t.assignH||"auto"===t.assignH&&0===e,r=A.bondCount,o=function(A){var t=0;return A.eachBond((function(A){return t+=A.bondOrder})),t}(A),g=function(A){var t=A.structure.getBondProxy(),e=A.number,i=8===e||7===e;if(i&&4===A.bondCount)return!1;var n=!1;return A.eachBond((function(e){if(e.bondOrder>1)n=!0;else if(i){var I=e.getOtherAtom(A);I.eachBond((function(A){if(A.bondOrder>1){var t=I.number;if((15===t||16===t)&&8===A.getOtherAtom(I).number)return;n=!0}}),t)}})),n}(A),a=o-r>0,M=0,s=8;switch(A.number){case 1:n&&(0===r?(i=1,s=0):1===r&&(i=0,s=1));break;case 6:n&&(i=0),I&&(M=Math.max(0,4-o-Math.abs(i))),s=sN(r+M+Math.max(0,-i));break;case 7:if(n)if(I)if(g&&o<4)i=r-e==1&&o-e==2?1:0;else{var c=!1;A.eachBondedAtom((function(A){(16===A.number||A.isMetal())&&(c=!0)})),i=c?0:1}else i=o-3;I&&(M=Math.max(0,3-o+i)),s=sN(g&&!a?r+M-i:r+M+1-i);break;case 8:n&&(I||(i=o-2),1===o&&A.eachBondedAtom((function(t){t.eachBond((function(e){var n=e.getOtherAtom(t);n.index!==A.index&&8===n.number&&2===e.bondOrder&&(i=-1)}))}))),I&&(M=Math.max(0,2-o+i)),s=sN(g&&!a?r+M-i+1:r+M-i+2);break;case 16:n&&(I||(i=o<=3&&!A.bondToElementCount(8)?o-2:0)),I&&o<2&&(M=Math.max(0,2-o+i)),o<=3&&(s=sN(r+M-i+2));break;case 9:case 17:case 35:case 53:case 85:n&&(i=o-1);break;case 3:case 11:case 19:case 37:case 55:case 87:n&&(i=1-o);break;case 4:case 12:case 20:case 38:case 56:case 88:n&&(i=2-o);break;default:console.warn("Requested charge, protonation for an unhandled element",A.element)}return[i,M,M+e,s]}(A,t),g=i[0],a=i[1],M=i[2],s=i[3];n[e]=g,I[e]=a,r[e]=M,o[e]=s})),{charge:n,implicitH:I,totalH:r,idealGeometry:o}}(A,{assignCharge:"auto",assignH:"auto"});return A["@valenceModel"]=t,t}function TN(A){return 15===A.number&&A.bondToElementCount(8)===A.bondCount}var hN=["ARG","HIS","LYS"],NN=["GLU","ASP"];function dN(A){return"HIS"===A.resname&&7==A.number&&A.isRing()}var yN=[3,11,19,37,55,12,20,38,56,13,31,49,81,21,50,82,83,51,80],EN=[17,35,53,85],DN=[7,8,16],jN=[6,7,15,16],BN=uu(180),xN=uu(120);function pN(A,t,e){return!fN(A,t,e)&&(A.modelIndex!==t.modelIndex||A.altloc&&t.altloc&&A.altloc!==t.altloc)}var LN={maxHydrophobicDist:4,maxHbondDist:3.5,maxHbondSulfurDist:4.1,maxHbondAccAngle:45,maxHbondDonAngle:45,maxHbondAccPlaneAngle:90,maxHbondDonPlaneAngle:30,maxPiStackingDist:5.5,maxPiStackingOffset:2,maxPiStackingAngle:30,maxCationPiDist:6,maxCationPiOffset:2,maxIonicDist:5,maxHalogenBondDist:4,maxHalogenBondAngle:30,maxMetalDist:3,refineSaltBridges:!0,masterModelIndex:-1,lineOfSightDistFactor:1};function fN(A,t,e){return A.modelIndex===e&&t.modelIndex!==e||t.modelIndex===e&&A.modelIndex!==e}function zN(A,t,e){return!fN(A,t,e)&&(A.modelIndex!==t.modelIndex||A.residueIndex===t.residueIndex||A.altloc&&t.altloc&&A.altloc!==t.altloc)}function wN(t,e){void 0===e&&(e=LN);var i=function(A){var t=A.types,e=A.centers;return{features:A,spatialHash:new Lh(e),contactStore:new wh,featureSet:new Qh(t.length,!1)}}(function(t){var e={types:[],groups:[],centers:{x:[],y:[],z:[]},atomSets:[]};return A.Debug&&jl.time("calculateFeatures"),function(A,t){var e=CN(A.data).charge,i={};A.eachResidue((function(A){if(hN.includes(A.resname)){var n=Yh(1);A.eachAtom((function(A){7===A.number&&A.isSidechain()&&Oh(n,A)})),vh(t,n)}else AN.includes(A.resname)||A.isNucleic()||(A.eachAtom((function(A){var e=!1,n=Yh(1);!function(A){var t=0;return 6===A.number&&3===A.bondCount&&3===A.bondToElementCount(7)&&A.eachBondedAtom((function(A){A.bondCount-A.bondToElementCount(1)==1&&++t})),2===t}(A)?function(A){var t=0;return 6===A.number&&3===A.bondCount&&2===A.bondToElementCount(7)&&1===A.bondToElementCount(6)&&A.eachBondedAtom((function(A){A.bondCount-A.bondToElementCount(1)==1&&++t})),2===t}(A)&&(n.group=9,e=!0):(n.group=8,e=!0),e&&(A.eachBondedAtom((function(A){7===A.number&&(i[A.index]=!0,Oh(n,A))})),vh(t,n))})),A.eachAtom((function(A){var n=Yh(1);e[A.index]>0&&(i[A.index]||(Oh(n,A),vh(t,n)))})))}))}(t,e),function(A,t){var e=CN(A.data).charge,i={};A.eachResidue((function(A){if(NN.includes(A.resname)){var n=Yh(2);A.eachAtom((function(A){8===A.number&&A.isSidechain()&&Oh(n,A)})),vh(t,n)}else if(nN.includes(A.resname)){var I=Yh(2);A.eachAtom((function(A){TN(A)&&(I.group=6,A.eachBondedAtom((function(A){8===A.number&&Oh(I,A)})),vh(t,I))}))}else AN.includes(A.resname)||nN.includes(A.resname)||(A.eachAtom((function(A){var e=!1,n=Yh(2);!function(A){return 16===A.number&&3===A.bondToElementCount(8)}(A)?TN(A)?(n.group=6,e=!0):function(A){return 16===A.number&&4===A.bondToElementCount(8)}(A)?(n.group=5,e=!0):function(A){var t=0;return 6===A.number&&2===A.bondToElementCount(8)&&1===A.bondToElementCount(6)&&A.eachBondedAtom((function(A){8===A.number&&A.bondCount-A.bondToElementCount(1)==1&&++t})),2===t}(A)&&(n.group=10,e=!0):(n.group=4,e=!0),e&&(A.eachBondedAtom((function(A){8===A.number&&(i[A.index]=!0,Oh(n,A))})),vh(t,n))})),A.eachAtom((function(A){var n=Yh(2);e[A.index]<0&&(i[A.index]||(Oh(n,A),vh(t,n)))})))}))}(t,e),function(A,t){var e=A.getAtomProxy();A.eachResidue((function(A){var i=A.getAromaticRings();if(i){var n=A.atomOffset;i.forEach((function(A){var i=Yh(3);A.forEach((function(A){e.index=A+n,Oh(i,e)})),vh(t,i)}))}}))}(t,e),function(A,t){var e=CN(A.data),i=e.charge,n=e.implicitH,I=e.idealGeometry;A.eachAtom((function(A){var e=Yh(5),r=A.number;if(8===r)Oh(e,A),vh(t,e);else if(7===r){if(dN(A))Oh(e,A),vh(t,e);else if(i[A.index]<1){var o=A.bondCount+n[A.index],g=I[A.index];(4===g&&o<4||3===g&&o<3||2===g&&o<2)&&(Oh(e,A),vh(t,e))}}else 16===r&&("CYS"!==A.resname&&"MET"!==A.resname&&-1!==A.formalCharge||(Oh(e,A),vh(t,e)))}))}(t,e),function(A,t){var e=CN(A.data).totalH;A.eachAtom((function(A){var i=Yh(4),n=A.number;(dN(A)||e[A.index]>0&&(7===n||8===n||16===n))&&(Oh(i,A),vh(t,i))}))}(t,e),function(A,t){var e=CN(A.data).totalH;A.eachAtom((function(A){if(6===A.number&&e[A.index]>0&&(A.bondToElementCount(7)>0||A.bondToElementCount(8)>0||function(A){if(!A.isAromatic())return!1;var t=A.residueType.getRings();if(!t)return!1;var e=!1;return t.rings.forEach((function(t){e||t.some((function(t){return A.index-A.residueAtomOffset===t}))&&(e=t.some((function(t){var e=A.residueType.atomTypeIdList[t],i=A.atomMap.get(e).number;return 7===i||8===i})))})),e}(A))){var i=Yh(9);Oh(i,A),vh(t,i)}}))}(t,e),function(A,t){A.eachAtom((function(A){var e=!1,i=!1,n=AN.includes(A.resname),I=nN.includes(A.resname);if(n||I?n?8===A.number?(["ASP","GLU","SER","THR","TYR","ASN","GLN"].includes(A.resname)&&A.isSidechain()||A.isBackbone())&&(e=!0,i=!0):16===A.number&&"CYS"===A.resname?(e=!0,i=!0):7===A.number&&"HIS"===A.resname&&A.isSidechain()&&(e=!0):I&&(8===A.number&&A.isBackbone()?(e=!0,i=!0):["N3","N4","N7"].includes(A.atomname)?e=!0:["O2","O4","O6"].includes(A.atomname)&&(e=!0,i=!0)):A.isHalogen()||8===A.number||16===A.number?(e=!0,i=!0):7===A.number&&(e=!0),e){var r=Yh(11);Oh(r,A),vh(t,r)}if(i){var o=Yh(10);Oh(o,A),vh(t,o)}}))}(t,e),function(A,t){A.eachAtom((function(A){if(A.isTransitionMetal()||30===A.number||48===A.number){var e=Yh(12);Oh(e,A),vh(t,e)}else if(yN.includes(A.number)){var i=Yh(13);Oh(i,A),vh(t,i)}}))}(t,e),function(A,t){A.eachAtom((function(A){var e=Yh(8),i=!1;6===A.number?(i=!0,A.eachBondedAtom((function(A){var t=A.number;6!==t&&1!==t&&(i=!1)}))):9===A.number&&(i=!0),i&&(Oh(e,A),vh(t,e))}))}(t,e),function(A,t){A.eachAtom((function(A){if(DN.includes(A.number)){var e=!1;if(A.eachBondedAtom((function(A){jN.includes(A.number)&&(e=!0)})),e){var i=Yh(7);Oh(i,A),vh(t,i)}}}))}(t,e),function(A,t){A.eachAtom((function(A){if(EN.includes(A.number)&&1===A.bondToElementCount(6)){var e=Yh(6);Oh(e,A),vh(t,e)}}))}(t,e),A.Debug&&jl.timeEnd("calculateFeatures"),e}(t));A.Debug&&jl.time("calculateContacts"),function(A,t,e){void 0===e&&(e={});for(var i=Hc(e.maxIonicDist,LN.maxIonicDist),n=Hc(e.maxPiStackingDist,LN.maxPiStackingDist),I=Hc(e.maxPiStackingOffset,LN.maxPiStackingOffset),r=Hc(e.maxPiStackingAngle,LN.maxPiStackingAngle),o=Hc(e.maxCationPiDist,LN.maxCationPiDist),g=Hc(e.maxCationPiOffset,LN.maxCationPiOffset),a=Hc(e.masterModelIndex,LN.masterModelIndex),M=Math.max(i+2,n,o),s=n*n,c=o*o,u=t.features,l=t.spatialHash,C=t.contactStore,T=t.featureSet,h=u.types,N=u.centers,d=u.atomSets,y=N.x,E=N.y,D=N.z,j=h.length,B=A.atomStore.x,x=A.atomStore.y,p=A.atomStore.z,L=A.getAtomProxy(),f=A.getAtomProxy(),z=new De,w=new De,m=new De,Q=new De,S=new De,Y=new De,O=new De,v=function(A,t){z.set(B[A[0]],x[A[0]],p[A[0]]),w.set(B[A[1]],x[A[1]],p[A[1]]),m.set(B[A[2]],x[A[2]],p[A[2]]),Q.subVectors(z,w),S.subVectors(z,m),t.crossVectors(Q,S)},U=function(A,t,e){return z.set(y[A],E[A],D[A]),w.set(y[t],E[t],D[t]),z.sub(w).projectOnPlane(e).add(w).distanceTo(w)},b=function(A,t,e){T.setBits(A,t),C.addContact(A,t,e)},P=function(A){l.eachWithin(y[A],E[A],D[A],M,(function(t,e){if(!(t<=A||(L.index=d[A][0],f.index=d[t][0],zN(L,f,a)))){var n=h[A],o=h[t];if(function(A,t){return 2===A&&1===t||1===A&&2===t}(n,o))(function(A,t,e){for(var i=A.length,n=t.length,I=0;I=180-r||M<=r+90&&M>=90-r)&&b(A,t,3)}}else if(function(A,t){return 3===A&&1===t||1===A&&3===t}(n,o)&&e<=c){var u=3===n?[A,t]:[t,A],l=u[0],C=u[1];v(d[l],Y),U(C,l,Y)<=g&&b(l,C,2)}}}))},k=0;ks||B.connectedTo(x))){var d=uN(B,x),y=cN.get(j[B.index])||uu(120);if(!d.some((function(A){return Math.abs(y-A)>r}))){if(3===j[B.index]){var E=lN(B,x);if(void 0!==E&&E>g)return}var D=uN(x,B),p=cN.get(j[x.index])||uu(120);if(!D.some((function(A){return p-A>I}))){if(3===j[x.index]){var L=lN(x,B);if(void 0!==L&&L>o)return}C.setBits(u,h);var f,z,w=M?8:function(A,t){return A.isWater()&&t.isWater()}(f=B,z=x)?9:function(A,t){return A.isBackbone()&&t.isBackbone()}(f,z)?10:4;l.addContact(u,h,w)}}}}}}))},L=0;Ln)){var C=uN(u,s);0!==C.length&&(C.some((function(A){return xN-A>n}))||(a.setBits(A,t),g.addContact(A,t,5)))}}}))},y=0;yi&&!pN(h,d,I)&&!pN(N,d,I)&&!g.includes(e)&&!a.includes(e)&&y.distanceToSquared(d)>1&&E.distanceToSquared(d)>1&&(o.clear(t),A.Debug&&jl.log("removing",h.qualifiedName(),N.qualifiedName(),"because",d.qualifiedName()))}))})),A.Debug&&jl.timeEnd("refineLineOfSight")}(t,n,e),function(A,t){var e=t.contactSet,i=t.contactStore,n=t.features,I=i.type,r=i.index1,o=i.index2,g=n.atomSets,a=A.getAtomProxy(),M=A.getAtomProxy(),s={},c=function(A,t,i){var n=s[i]||[1/0,-1],I=n[0],r=n[1];A=c){S=N,z=!0;break}if(z)break}if(z)break}for(z=!1,h=I;h=c){Q=h,z=!0;break}if(z)break}if(z)break}for(z=!1,T=n;T=c){m=T,z=!0;break}if(z)break}if(z)break}for(z=!1,N=M;N>=o;--N){for(h=a;h>=I;--h){for(T=g;T>=n;--T)if(A[s=t*e*N+t*h+T]>=c){U=N,z=!0;break}if(z)break}if(z)break}for(z=!1,h=a;h>=I;--h){for(N=U;N>=o;--N){for(T=g;T>=n;--T)if(A[s=t*e*N+t*h+T]>=c){v=h,z=!0;break}if(z)break}if(z)break}for(z=!1,T=g;T>=n;--T){for(h=v;h>=I;--h){for(N=U;N>=o;--N)if(A[s=t*e*N+t*h+T]>=c){Y=T,z=!0;break}if(z)break}if(z)break}u?(n=Math.max(0,m-1),I=Math.max(0,Q-1),o=Math.max(0,S-1),g=Math.min(t-1,Y+1),a=Math.min(e-1,v+1),M=Math.min(i-1,U+1)):(n=Math.max(1,m-1),I=Math.max(1,Q-1),o=Math.max(1,S-1),g=Math.min(t-2,Y+1),a=Math.min(e-2,v+1),M=Math.min(i-2,U+1))}var b=15;for(N=o;N0?-1:1,I||(I=new Float32Array(3*N)));var L=3*N;if(r&&r.length===L||(r=new Int32Array(L)),o=0,g=0,void 0!==y){var f=y[0].map(Math.round),z=y[1].map(Math.round);a=t*Math.ceil(Math.abs(f[0])/t),M=e*Math.ceil(Math.abs(f[1])/e),s=i*Math.ceil(Math.abs(f[2])/i),v(f[0],f[1],f[2],z[0],z[1],z[2])}else a=M=s=0,v();return D.length=3*o,u||(j.length=3*o),B.length=g,n&&(x.length=o),{position:new Float32Array(D),normal:u?void 0:new Float32Array(j),index:iu(B,D.length/3),atomindex:n?new Int32Array(x):void 0,contour:l}}}Ol.add("arrow",bN),Ol.add("box",WN),Ol.add("cone",JN),Ol.add("cylinder",UN),Ol.add("ellipsoid",XN),Ol.add("octahedron",VN),Ol.add("sphere",_N),Ol.add("tetrahedron",$N),Ol.add("torus",Ad),Ol.add("point",nd),Ol.add("wideline",Id),Object.assign(gd,{__deps:[rd,od,function(){return[[0,4,4,4,2,0,0,0,2,2,0,0],[4,0,4,4,0,8,0,0,0,8,8,0],[4,4,0,4,0,0,8,0,0,0,8,8],[4,4,4,0,0,0,0,1,1,0,0,1],[2,0,0,0,0,8,8,8,2,2,0,0],[0,8,0,0,8,0,8,8,0,8,8,0],[0,0,8,0,8,8,0,8,0,0,8,8],[0,0,0,1,8,8,8,0,1,0,0,1],[2,0,0,1,2,0,0,1,0,2,0,1],[2,8,0,0,2,8,0,0,2,0,8,0],[0,8,8,0,0,8,8,0,0,8,0,8],[0,0,8,1,0,0,8,1,1,0,8,0]]},iu]});var ad=function(A,t){this.cols=A,this.rows=t,this.size=this.cols*this.rows,this.data=new Float32Array(this.size)};function Md(A,t){for(var e=0,i=0,n=t.rows,I=t.cols,r=0,o=0,g=0,a=t.data,M=A.data;e(t=Math.abs(t))?(t/=A,A*Math.sqrt(1+t*t)):t>0?(A/=t,t*Math.sqrt(1+A*A)):0}ad.prototype.copyTo=function(A){A.data.set(this.data)};function hd(A,t,e,i){var n=0,I=0,r=A.rows,o=A.cols,g=r,a=o;g>16)?Q:-Q,A[g*t+M]=m;for(s=0;s<2;s++)for(a=0;ae){var i=t;t=e,e=i}var n=A[t];return void 0===n?(A[t]=[e],!0):!n.includes(e)&&(n.push(e),!0)}var e=this.geometry,i=e.index;if(this.parameters.wireframe)if(i){var n,I=i.array,r=I.length;e.drawRange.count!==1/0&&(r=e.drawRange.count),n=this.wireframeIndex&&this.wireframeIndex.length>2*r?this.wireframeIndex:iu(2*r,e.attributes.position.count);var o=0;A.length=0;for(var g=0;g2*u?this.wireframeIndex:iu(2*u,u);for(var l=0,C=0;lthis.wireframeGeometry.index.array.length)this.wireframeGeometry.setIndex(new Zi(this.wireframeIndex,1).setUsage(this.dynamic?WebGLRenderingContext.DYNAMIC_DRAW:0));else{var A=this.wireframeGeometry.getIndex();if(!A)return void jl.error("Index is null");A.set(this.wireframeIndex),A.needsUpdate=this.wireframeIndexCount>0,A.updateRange.count=this.wireframeIndexCount}this.wireframeGeometry.setDrawRange(0,this.wireframeIndexCount)}},kd.prototype.getRenderOrder=function(){var A=0;return this.isText?A=1:this.transparent&&(A=this.isSurface?3:2),A},kd.prototype._getMesh=function(A){this.material||this.makeMaterial();var t,e=this.geometry,i=this[A];return(t=this.isLine?new ng(e,i):this.isPoint?new sg(e,i):new Sn(e,i)).frustumCulled=!1,t.renderOrder=this.getRenderOrder(),t},kd.prototype.getMesh=function(){return this._getMesh("material")},kd.prototype.getWireframeMesh=function(){var A;return this.material||this.makeMaterial(),this.wireframeGeometry||this.makeWireframeGeometry(),(A=new ng(this.wireframeGeometry,this.wireframeMaterial)).frustumCulled=!1,A.renderOrder=this.getRenderOrder(),A},kd.prototype.getPickingMesh=function(){return this._getMesh("pickingMaterial")},kd.prototype.getShader=function(A,t){return iC(A,this.getDefines(t))},kd.prototype.getVertexShader=function(A){return this.getShader(this.vertexShader,A)},kd.prototype.getFragmentShader=function(A){return this.getShader(this.fragmentShader,A)},kd.prototype.getDefines=function(A){var t={};return this.parameters.clipNear&&(t.NEAR_CLIP=1),this.parameters.clipRadius&&(t.RADIUS_CLIP=1),"picking"===A?t.PICKING=1:(("background"===A||this.parameters.background)&&(t.NOLIGHT=1),this.parameters.flatShaded&&(t.FLAT_SHADED=1),this.parameters.opaqueBack&&(t.OPAQUE_BACK=1),this.parameters.diffuseInterior&&(t.DIFFUSE_INTERIOR=1),this.parameters.useInteriorColor&&(t.USE_INTERIOR_COLOR=1)),t},kd.prototype.getParameters=function(){return this.parameters},kd.prototype.addUniforms=function(A){this.uniforms=Rn.merge([this.uniforms,A]),this.pickingUniforms=Rn.merge([this.pickingUniforms,A])},kd.prototype.addAttributes=function(A){for(var t in A){var e=void 0,i=A[t],n=this.attributeSize*vd[i.type];i.value?(n!==i.value.length&&jl.error("attribute value has wrong length",t),e=i.value):e=eu("float32",n),this.geometry.setAttribute(t,new Zi(e,vd[i.type]).setUsage(this.dynamic?WebGLRenderingContext.DYNAMIC_DRAW:0))}},kd.prototype.updateRenderOrder=function(){var A=this.getRenderOrder();function t(t){t.renderOrder=A}this.group.children.forEach(t),this.pickingGroup&&this.pickingGroup.children.forEach(t)},kd.prototype.updateShader=function(){var A=this.material,t=this.wireframeMaterial,e=this.pickingMaterial;A.vertexShader=this.getVertexShader(),A.fragmentShader=this.getFragmentShader(),A.needsUpdate=!0,t.vertexShader=this.getShader("Line.vert"),t.fragmentShader=this.getShader("Line.frag"),t.needsUpdate=!0,e.vertexShader=this.getVertexShader("picking"),e.fragmentShader=this.getFragmentShader("picking"),e.needsUpdate=!0},kd.prototype.setParameters=function(A){var t=A,e=this.parameterTypes,i=this.parameters,n={},I={},r=!1,o=!1;for(var g in t){var a=t[g];void 0!==a&&(i[g]=a,void 0!==e[g]&&(e[g].property&&(!0!==e[g].property?n[e[g].property]=a:n[g]=a),e[g].uniform&&(!0!==e[g].uniform?I[e[g].uniform]=a:I[g]=a),e[g].updateShader&&(r=!0),e[g].updateVisibility&&(o=!0),this.dynamic&&"wireframe"===g&&!0===a&&this.updateWireframeIndex(),"forceTransparent"===g&&(n.transparent=this.transparent),"matrix"===g&&(this.matrix=a)))}this.setProperties(n),this.setUniforms(I),r&&this.updateShader(),o&&this.setVisibility(this.visible)},kd.prototype.setAttributes=function(A){var t=this.geometry,e=t.attributes;for(var i in A)if("picking"!==i){var n=A[i],I=n.length;if("index"===i){var r=t.getIndex();if(!r){jl.error("Index is null");continue}t.setDrawRange(0,1/0),I>r.array.length?t.setIndex(new Zi(n,1).setUsage(this.dynamic?WebGLRenderingContext.DYNAMIC_DRAW:0)):(r.set(n),r.count=I,r.needsUpdate=I>0,r.updateRange.count=I,t.setDrawRange(0,I)),this.indexVersion++,this.parameters.wireframe&&this.updateWireframeIndex()}else{var o=e[i];I>o.array.length?t.setAttribute(i,new Zi(n,o.itemSize).setUsage(this.dynamic?WebGLRenderingContext.DYNAMIC_DRAW:0)):(e[i].set(n),e[i].needsUpdate=I>0,e[i].updateRange.count=I)}}},kd.prototype.setUniforms=function(A){if(A){var t=this.material.uniforms,e=this.wireframeMaterial.uniforms,i=this.pickingMaterial.uniforms;for(var n in A)"opacity"===n&&this.setProperties({transparent:this.transparent}),void 0!==t[n]&&(t[n].value.isVector3?t[n].value.copy(A[n]):t[n].value.set?t[n].value.set(A[n]):t[n].value=A[n]),void 0!==e[n]&&(e[n].value.isVector3?e[n].value.copy(A[n]):e[n].value.set?e[n].value.set(A[n]):e[n].value=A[n]),void 0!==i[n]&&(i[n].value.isVector3?i[n].value.copy(A[n]):i[n].value.set?i[n].value.set(A[n]):i[n].value=A[n])}},kd.prototype.setProperties=function(A){if(A){var t=this.material,e=this.wireframeMaterial,i=this.pickingMaterial;for(var n in A){var I=n,r=A[I];"transparent"===I?this.updateRenderOrder():"side"===I&&(r=Od(r)),t[I]=r,e[I]=r,i[I]=r}t.needsUpdate=!0,e.needsUpdate=!0,i.needsUpdate=!0}},kd.prototype.setVisibility=function(A){this.visible=A,this.parameters.wireframe?(this.group.visible=!1,this.wireframeGroup.visible=A,this.pickable&&(this.pickingGroup.visible=!1)):(this.group.visible=A,this.wireframeGroup.visible=!1,this.pickable&&(this.pickingGroup.visible=A))},kd.prototype.dispose=function(){this.material&&this.material.dispose(),this.wireframeMaterial&&this.wireframeMaterial.dispose(),this.pickingMaterial&&this.pickingMaterial.dispose(),this.geometry.dispose(),this.wireframeGeometry&&this.wireframeGeometry.dispose()},kd.prototype.toJSON=function(){var A={};for(var t in this)"group"!==t&&"wireframeGroup"!==t&&"pickingGroup"!=t&&"picking"!==t&&(A[t]=this[t]);return A},Object.defineProperties(kd.prototype,Gd);var Fd=function(A){function t(t,e){void 0===e&&(e={}),A.call(this,t,e),this.vertexShader="Mesh.vert",this.fragmentShader="Mesh.frag",this.addAttributes({normal:{type:"v3",value:t.normal}}),void 0===t.normal&&this.geometry.computeVertexNormals()}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t}(kd),Jd=function(A){function t(){A.apply(this,arguments),this.isSurface=!0}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t}(Fd);function Hd(A){A.visible=!0}function Rd(A){A.visible=!1}var Xd=function(A){this.group=new go,this.wireframeGroup=new go,this.pickingGroup=new go,this.frontMeshes=[],this.backMeshes=[],this.size=A.size,this.side=A.parameters.side,this.visible=A.visible,this.geometry=A.geometry,this.picking=A.picking,this.group=new go,this.wireframeGroup=new go,this.pickingGroup=new go,this.matrix=A.matrix;var t=A,e=new A.constructor({position:new Float32Array(0)});t.makeMaterial(),e.makeMaterial(),e.picking=A.picking,e.geometry=A.geometry,e.wireframeGeometry=A.wireframeGeometry,e.setParameters(A.getParameters()),e.updateShader(),t.setParameters({side:"front"}),e.setParameters({side:"back",opacity:e.parameters.opacity}),this.buffer=A,this.frontBuffer=t,this.backBuffer=e},Vd={matrix:{configurable:!0},pickable:{configurable:!0},parameters:{configurable:!0}};Vd.matrix.set=function(A){kd.prototype.setMatrix.call(this,A)},Vd.matrix.get=function(){return this.group.matrix.clone()},Vd.pickable.get=function(){return!!this.picking&&!this.parameters.disablePicking},Vd.parameters.get=function(){return this.buffer.parameters},Xd.prototype.getParameters=function(){var A=Object.assign({},this.buffer.parameters);return A.side=this.side,A},Xd.prototype.getMesh=function(A){var t,e;return A?(e=this.backBuffer.getPickingMesh(),t=this.frontBuffer.getPickingMesh()):(e=this.backBuffer.getMesh(),t=this.frontBuffer.getMesh()),this.frontMeshes.push(t),this.backMeshes.push(e),this.setParameters({side:this.side}),(new go).add(e,t)},Xd.prototype.getWireframeMesh=function(){return this.buffer.getWireframeMesh()},Xd.prototype.getPickingMesh=function(){return this.getMesh(!0)},Xd.prototype.setAttributes=function(A){this.buffer.setAttributes(A)},Xd.prototype.setParameters=function(A){"front"===(A=Object.assign({},A)).side?(this.frontMeshes.forEach(Hd),this.backMeshes.forEach(Rd)):"back"===A.side?(this.frontMeshes.forEach(Rd),this.backMeshes.forEach(Hd)):"double"===A.side&&(this.frontMeshes.forEach(Hd),this.backMeshes.forEach(Hd)),void 0!==A.side&&(this.side=A.side),delete A.side,void 0!==A.matrix&&(this.matrix=A.matrix),delete A.matrix,this.frontBuffer.setParameters(A),void 0!==A.wireframe&&(this.wireframe=A.wireframe,this.setVisibility(this.visible)),delete A.wireframe,this.backBuffer.setParameters(A)},Xd.prototype.setVisibility=function(A){this.visible=A,this.parameters.wireframe?(this.group.visible=!1,this.wireframeGroup.visible=A,this.pickable&&(this.pickingGroup.visible=!1)):(this.group.visible=A,this.wireframeGroup.visible=!1,this.pickable&&(this.pickingGroup.visible=A))},Xd.prototype.dispose=function(){this.frontBuffer.dispose(),this.backBuffer.dispose()},Xd.prototype.toJSON=function(){var A={};for(var t in this)["side","size","visible","matrix","parameters"].includes(t)&&(A[t]=this[t]);return A},Object.defineProperties(Xd.prototype,Vd),ml.add("shader/Line.vert","uniform float clipNear;\nuniform vec3 clipCenter;\nvarying vec3 vViewPosition;\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#include color_pars_vertex\nvoid main(){\n#include color_vertex\n#include begin_vertex\n#include project_vertex\nvViewPosition = -mvPosition.xyz;\n#if defined( RADIUS_CLIP )\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\n#endif\n#include nearclip_vertex\n}"),ml.add("shader/Line.frag","uniform float opacity;\nuniform float clipNear;\nuniform float clipRadius;\nvarying vec3 vViewPosition;\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#include common\n#include color_pars_fragment\n#include fog_pars_fragment\nvoid main(){\n#include nearclip_fragment\n#include radiusclip_fragment\ngl_FragColor = vec4( vColor, opacity );\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n}");var Wd=function(A){function t(){A.apply(this,arguments),this.isLine=!0,this.vertexShader="Line.vert",this.fragmentShader="Line.frag"}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t}(kd),Zd=function(A){function t(t,e,i){A.call(this,t,e,i),this.type="surface",this.parameters=Object.assign({isolevelType:{type:"select",options:{value:"value",sigma:"sigma"}},isolevel:{type:"number",precision:2,max:1e3,min:-1e3},negateIsolevel:{type:"boolean"},isolevelScroll:{type:"boolean"},smooth:{type:"integer",precision:1,max:10,min:0},background:{type:"boolean",rebuild:!0},opaqueBack:{type:"boolean",buffer:!0},boxSize:{type:"integer",precision:1,max:100,min:0},colorVolume:{type:"hidden"},contour:{type:"boolean",rebuild:!0},useWorker:{type:"boolean",rebuild:!0},wrap:{type:"boolean",rebuild:!0}},this.parameters),t instanceof Sd?(this.surface=void 0,this.volume=t):(this.surface=t,this.volume=void 0),this.boxCenter=new De,this.__boxCenter=new De,this.box=new ai,this.__box=new ai,this._position=new De,this.inverseMatrix=new we,this.setBox=function(){this._position.copy(e.translationGroup.position).negate(),this._position.applyMatrix4(this.inverseMatrix),this._position.equals(this.boxCenter)||this.setParameters({boxCenter:this._position})},this.toBePrepared=!0,this.viewer.signals.ticked.add(this.setBox,this),this.init(i)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.init=function(t){var e=t||{};e.colorScheme=Hc(e.colorScheme,"uniform"),e.colorValue=Hc(e.colorValue,14540253),this.isolevelType=Hc(e.isolevelType,"sigma"),this.isolevel=Hc(e.isolevel,2),this.negateIsolevel=Hc(e.negateIsolevel,!1),this.isolevelScroll=Hc(e.isolevelScroll,!1),this.smooth=Hc(e.smooth,0),this.background=Hc(e.background,!1),this.opaqueBack=Hc(e.opaqueBack,!0),this.boxSize=Hc(e.boxSize,0),this.colorVolume=Hc(e.colorVolume,void 0),this.contour=Hc(e.contour,!1),this.useWorker=Hc(e.useWorker,!0),this.wrap=Hc(e.wrap,!1),A.prototype.init.call(this,e),this.inverseMatrix.getInverse(this.matrix),this.build()},t.prototype.attach=function(A){var t=this;this.bufferList.forEach((function(A){t.viewer.add(A)})),this.setVisibility(this.visible),A()},t.prototype.prepare=function(A){var t,e=this;if(this.volume)if(t="sigma"===this.isolevelType?this.volume.getValueForSigma(this.isolevel):this.isolevel,this.negateIsolevel&&(t*=-1),!this.surface||this.__isolevel!==t||this.__smooth!==this.smooth||this.__contour!==this.contour||this.__wrap!==this.wrap||this.__boxSize!==this.boxSize||this.boxSize>0&&!this.__boxCenter.equals(this.boxCenter)){this.__isolevel=t,this.__smooth=this.smooth,this.__contour=this.contour,this.__wrap=this.wrap,this.__boxSize=this.boxSize,this.__boxCenter.copy(this.boxCenter),this.__box.copy(this.box);var i=function(t){e.surface=t,A()};this.useWorker?this.volume.getSurfaceWorker(t,this.smooth,this.boxCenter,this.boxSize,this.contour,this.wrap,i):i(this.volume.getSurface(t,this.smooth,this.boxCenter,this.boxSize,this.contour,this.wrap))}else A();else A()},t.prototype.create=function(){var A,t={position:this.surface.getPosition(),color:this.surface.getColor(this.getColorParams()),index:this.surface.getIndex()};if(this.contour)A=new Wd(t,this.getBufferParams({wireframe:!1}));else{Object.assign(t,{normal:this.surface.getNormal(),picking:this.surface.getPicking()});var e=new Jd(t,this.getBufferParams({background:this.background,opaqueBack:this.opaqueBack,dullInterior:!1}));A=new Xd(e)}this.bufferList.push(A)},t.prototype.update=function(A){if(0!==this.bufferList.length){var t={};(A=A||{}).position&&(t.position=this.surface.getPosition()),A.color&&(t.color=this.surface.getColor(this.getColorParams())),A.index&&(t.index=this.surface.getIndex()),A.normal&&(t.normal=this.surface.getNormal()),this.bufferList.forEach((function(A){A.setAttributes(t)}))}},t.prototype.setParameters=function(t,e,i){return t&&void 0!==t.isolevelType&&this.volume&&("value"===this.isolevelType&&"sigma"===t.isolevelType?this.isolevel=this.volume.getSigmaForValue(this.isolevel):"sigma"===this.isolevelType&&"value"===t.isolevelType&&(this.isolevel=this.volume.getValueForSigma(this.isolevel)),this.isolevelType=t.isolevelType),t&&t.boxCenter&&(this.boxCenter.copy(t.boxCenter),delete t.boxCenter),t&&t.wireframe&&(t.contour||void 0===t.contour&&this.contour)&&(t.wireframe=!1),A.prototype.setParameters.call(this,t,e,i),t.matrix&&this.inverseMatrix.getInverse(t.matrix),this.volume&&this.volume.getBox(this.boxCenter,this.boxSize,this.box),t&&void 0!==t.colorVolume&&e&&(e.color=!0),this.surface&&(void 0!==t.isolevel||void 0!==t.negateIsolevel||void 0!==t.smooth||void 0!==t.wrap||void 0!==t.boxSize||this.boxSize>0&&!this.__box.equals(this.box))&&this.build({position:!0,color:!0,index:!0,normal:!this.contour}),this},t.prototype.getColorParams=function(){var t=A.prototype.getColorParams.call(this);return t.volume=this.colorVolume,t},t.prototype.dispose=function(){this.viewer.signals.ticked.remove(this.setBox,this),A.prototype.dispose.call(this)},t}(UT),Kd=function(){};Kd.zoomScroll=function(A,t){A.trackballControls.zoom(t)},Kd.clipNearScroll=function(A,t){var e=A.getParameters();A.setParameters({clipNear:e.clipNear+t/10})},Kd.focusScroll=function(A,t){var e=A.getFocus(),i=Math.sign(t)*function(A,t,e){if(A>5)return A;var i=A/5;return(-4.6*i+9.4)*i*i+.2}((100-e)/10);A.setFocus(e+i)},Kd.zoomFocusScroll=function(A,t){A.trackballControls.zoom(t);var e=A.viewer.camera.position.z;A.setFocus(100-Math.abs(e/8))},Kd.isolevelScroll=function(A,t){var e=Math.sign(t)/10;A.eachRepresentation((function(A,t){if(A.repr instanceof Zd){var i=A.getParameters();i.isolevelScroll&&A.setParameters({isolevel:i.isolevel+e})}}))},Kd.panDrag=function(A,t,e){A.trackballControls.pan(t,e)},Kd.rotateDrag=function(A,t,e){A.trackballControls.rotate(t,e)},Kd.zRotateDrag=function(A,t,e){A.trackballControls.zRotate(t,e)},Kd.zoomDrag=function(A,t,e){A.trackballControls.zoom((t+e)/-2)},Kd.zoomFocusDrag=function(A,t,e){A.trackballControls.zoom((t+e)/-2);var i=A.viewer.camera.position.z;A.setFocus(100-Math.abs(i/8))},Kd.panComponentDrag=function(A,t,e){A.trackballControls.panComponent(t,e)},Kd.panAtomDrag=function(A,t,e){A.trackballControls.panAtom(t,e)},Kd.rotateComponentDrag=function(A,t,e){A.trackballControls.rotateComponent(t,e)},Kd.movePick=function(A,t){t&&A.animationControls.move(t.position.clone())},Kd.tooltipPick=function(A,t){var e=A.tooltip;if(A.getParameters().tooltip&&t){var i=t.mouse.position;e.innerText=t.getLabel(),e.style.bottom=window.innerHeight-i.y+3+"px",e.style.left=i.x+3+"px",e.style.display="block"}else e.style.display="none"};var _d={default:[["scroll",Kd.zoomScroll],["scroll-shift",Kd.focusScroll],["scroll-ctrl",Kd.isolevelScroll],["scroll-shift-ctrl",Kd.zoomFocusScroll],["drag-left",Kd.rotateDrag],["drag-right",Kd.panDrag],["drag-ctrl-left",Kd.panDrag],["drag-ctrl-right",Kd.zRotateDrag],["drag-shift-left",Kd.zoomDrag],["drag-middle",Kd.zoomFocusDrag],["drag-ctrl-shift-right",Kd.panComponentDrag],["drag-ctrl-shift-left",Kd.rotateComponentDrag],["clickPick-right",Kd.measurePick=function(A,t){if(t&&(t.atom||t.bond)){var e=t.atom||t.closestBondAtom;t.component.measurePick(e)}else A.measureClear()}],["clickPick-ctrl-left",Kd.measurePick],["clickPick-middle",Kd.movePick],["clickPick-left",Kd.movePick],["hoverPick",Kd.tooltipPick]],pymol:[["drag-left",Kd.rotateDrag],["drag-middle",Kd.panDrag],["drag-right",Kd.zoomDrag],["drag-shift-right",Kd.focusScroll],["clickPick-ctrl+shift-middle",Kd.movePick],["hoverPick",Kd.tooltipPick]],coot:[["scroll",Kd.isolevelScroll],["drag-left",Kd.rotateDrag],["drag-middle",Kd.panDrag],["drag-ctrl-left",Kd.panDrag],["drag-right",Kd.zoomFocusDrag],["drag-ctrl-right",Kd.focusScroll],["clickPick-middle",Kd.movePick],["hoverPick",Kd.tooltipPick]],astexviewer:[["drag-left",Kd.rotateDrag],["drag-ctrl-left",Kd.panDrag],["drag-shift-left",Kd.zoomDrag],["scroll",Kd.focusScroll],["clickPick-middle",Kd.movePick],["hoverPick",Kd.tooltipPick]]};function qd(A){var t=A.split(/[-+]/),e="";t.includes("scroll")&&(e="scroll"),t.includes("drag")&&(e="drag"),t.includes("click")&&(e="click"),t.includes("doubleClick")&&(e="doubleClick"),t.includes("hover")&&(e="hover"),t.includes("clickPick")&&(e="clickPick"),t.includes("hoverPick")&&(e="hoverPick");var i=0;t.includes("alt")&&(i+=1),t.includes("ctrl")&&(i+=2),t.includes("meta")&&(i+=4),t.includes("shift")&&(i+=8);var n=0;return t.includes("left")&&(n+=1),t.includes("right")&&(n+=2),t.includes("middle")&&(n+=4),[e,i,n]}var $d=function(A,t){void 0===t&&(t={}),this.stage=A,this.actionList=[],this.mouse=A.mouseObserver,this.disabled=t.disabled||!1,this.preset(t.preset||"default")};$d.prototype.run=function(A){for(var t=this,e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];if(!this.disabled){var n=this.mouse.key||0,I=this.mouse.buttons||0;this.actionList.forEach((function(i){i.type===A&&i.key===n&&i.button===I&&i.callback.apply(i,[t.stage].concat(e))}))}},$d.prototype.add=function(A,t){var e=qd(A),i=e[0],n=e[1],I=e[2];this.actionList.push({type:i,key:n,button:I,callback:t})},$d.prototype.remove=function(A,t){var e=A.includes("*"),i=qd(A),n=i[0],I=i[1],r=i[2],o=this.actionList.filter((function(A){return!((A.type===n||e&&""===n)&&(A.key===I||e&&0===I)&&(A.button===r||e&&0===r)&&(A.callback===t||void 0===t))}));this.actionList=o},$d.prototype.preset=function(A){var t=this;this.clear(),(_d[A]||[]).forEach((function(A){return t.add(A[0],A[1])}))},$d.prototype.clear=function(){this.actionList.length=0};var Ay=function(){};Ay.autoView=function(A){A.autoView(1e3)},Ay.toggleAnimations=function(A){A.animationControls.toggle()},Ay.toggleRock=function(A){A.toggleRock()};var ty={default:[["i",Ay.toggleSpin=function(A){A.toggleSpin()}],["k",Ay.toggleRock],["p",Ay.toggleAnimations],["a",Ay.toggleAntialiasing=function(A){var t=A.getParameters();A.setParameters({sampleLevel:-1===t.sampleLevel?0:-1})}],["r",Ay.autoView]]},ey=function(A,t){void 0===t&&(t={}),this.stage=A,this.actionList=[],this.disabled=t.disabled||!1,this.preset(t.preset||"default")};ey.prototype.run=function(A){var t=this;this.disabled||this.actionList.forEach((function(e){e.key===A&&e.callback(t.stage)}))},ey.prototype.add=function(A,t){this.actionList.push({key:A,callback:t})},ey.prototype.remove=function(A,t){var e=this.actionList.filter((function(e){return!(e.key===A&&(e.callback===t||void 0===t))}));this.actionList=e},ey.prototype.preset=function(A){var t=this;this.clear(),(ty[A]||[]).forEach((function(A){return t.add(A[0],A[1])}))},ey.prototype.clear=function(){this.actionList.length=0};var iy=function(A){this.stage=A,this.stage=A,this.mouse=A.mouseObserver,this.controls=A.mouseControls,this.mouse.signals.clicked.add(this._onClick,this),this.mouse.signals.hovered.add(this._onHover,this)};iy.prototype._onClick=function(A,t){var e=this.stage.pickingControls.pick(A,t);this.stage.signals.clicked.dispatch(e),this.controls.run("clickPick",e)},iy.prototype._onHover=function(A,t){var e=this.stage.pickingControls.pick(A,t);e&&this.mouse.down.equals(this.mouse.position)&&(this.stage.transformComponent=e.component,this.stage.transformAtom=e.atom),this.stage.signals.hovered.dispatch(e),this.controls.run("hoverPick",e)},iy.prototype.dispose=function(){this.mouse.signals.clicked.remove(this._onClick,this),this.mouse.signals.hovered.remove(this._onHover,this)};var ny=function(A){this.stage=A,this.stage=A,this.mouse=A.mouseObserver,this.controls=A.mouseControls,this.mouse.signals.moved.add(this._onMove,this),this.mouse.signals.scrolled.add(this._onScroll,this),this.mouse.signals.dragged.add(this._onDrag,this),this.mouse.signals.clicked.add(this._onClick,this),this.mouse.signals.hovered.add(this._onHover,this),this.mouse.signals.doubleClicked.add(this._onDblclick,this)};ny.prototype._onMove=function(){this.stage.tooltip.style.display="none"},ny.prototype._onScroll=function(A){this.controls.run("scroll",A)},ny.prototype._onDrag=function(A,t){this.controls.run("drag",A,t)},ny.prototype._onClick=function(A,t){this.controls.run("click",A,t)},ny.prototype._onDblclick=function(A,t){this.controls.run("doubleClick",A,t)},ny.prototype._onHover=function(A,t){this.controls.run("hover",A,t)},ny.prototype.dispose=function(){this.mouse.signals.moved.remove(this._onMove,this),this.mouse.signals.scrolled.remove(this._onScroll,this),this.mouse.signals.dragged.remove(this._onDrag,this),this.mouse.signals.clicked.remove(this._onClick,this),this.mouse.signals.hovered.remove(this._onHover,this)};var Iy=function(A){this.stage=A,this.viewer=A.viewer,this.animationControls=A.animationControls,this.viewer.signals.ticked.add(this._onTick,this)};Iy.prototype._onTick=function(A){this.animationControls.run(A)},Iy.prototype.dispose=function(){this.viewer.signals.ticked.remove(this._onTick,this)};var ry=!!Tl&&{passive:!0},oy=function(A){this.stage=A,this.stage=A,this.controls=A.keyControls,this.domElement=A.viewer.renderer.domElement,this.domElement.setAttribute("tabIndex","-1"),this.domElement.style.outline="none",this._focusDomElement=this._focusDomElement.bind(this),this._onKeydown=this._onKeydown.bind(this),this._onKeyup=this._onKeyup.bind(this),this._onKeypress=this._onKeypress.bind(this),this.domElement.addEventListener("mousedown",this._focusDomElement),this.domElement.addEventListener("touchstart",this._focusDomElement,ry),this.domElement.addEventListener("keydown",this._onKeydown),this.domElement.addEventListener("keyup",this._onKeyup),this.domElement.addEventListener("keypress",this._onKeypress)};oy.prototype._onKeydown=function(){},oy.prototype._onKeyup=function(){},oy.prototype._onKeypress=function(A){var t;t="key"in KeyboardEvent.prototype?A.key:String.fromCharCode(A.which||A.keyCode),this.controls.run(t)},oy.prototype._focusDomElement=function(){this.domElement.focus()},oy.prototype.dispose=function(){this.domElement.removeEventListener("mousedown",this._focusDomElement),this.domElement.removeEventListener("touchstart",this._focusDomElement,ry),this.domElement.removeEventListener("keydown",this._onKeypress),this.domElement.removeEventListener("keyup",this._onKeypress),this.domElement.removeEventListener("keypress",this._onKeypress)};var gy=function(A,t,e,i){void 0===i&&(i={}),this.component=A,this.position=t,this.offsetX=Hc(i.offsetX,0),this.offsetY=Hc(i.offsetY,0),this.visible=Hc(i.visible,!0),this.stage=A.stage,this.viewer=A.stage.viewer,this._viewerPosition=new De,this._updateViewerPosition(),this._canvasPosition=new se,this._cameraPosition=new De,this.element=document.createElement("div"),Object.assign(this.element.style,{display:"block",position:"absolute",pointerEvents:"none",whiteSpace:"nowrap",left:"-10000px"}),this.viewer.wrapper.appendChild(this.element),this.setContent(e),this.updateVisibility(),this.viewer.signals.rendered.add(this._update,this),this.component.signals.matrixChanged.add(this._updateViewerPosition,this)};gy.prototype.setContent=function(A){var t=this.element.style.display;if("none"===t&&(this.element.style.left="-10000px",this.element.style.display="block"),A instanceof HTMLElement)this.element.appendChild(A);else{var e=document.createElement("div");e.innerText=A,Object.assign(e.style,{backgroundColor:"rgba( 0, 0, 0, 0.6 )",color:"lightgrey",padding:"8px",fontFamily:"sans-serif"}),this.element.appendChild(e)}this._clientRect=this.element.getBoundingClientRect(),"none"===t&&(this.element.style.display=t)},gy.prototype.setVisibility=function(A){this.visible=A,this.updateVisibility()},gy.prototype.getVisibility=function(){return this.visible&&this.component.parameters.visible},gy.prototype.updateVisibility=function(){this.element.style.display=this.getVisibility()?"block":"none"},gy.prototype._updateViewerPosition=function(){this._viewerPosition.copy(this.position).applyMatrix4(this.component.matrix)},gy.prototype._update=function(){if(this.getVisibility()){var A=this.element.style,t=this._canvasPosition,e=this._viewerPosition,i=this._clientRect;if(this._cameraPosition.copy(e).add(this.viewer.translationGroup.position).applyMatrix4(this.viewer.rotationGroup.matrix).sub(this.viewer.camera.position),this._cameraPosition.z<0)A.display="none";else{A.display="block";var n=this._cameraPosition.length(),I=this.viewer.scene.fog;A.opacity=(1-yu(I.near,I.far,n)).toString(),A.zIndex=Math.round(100*(I.far-n)).toString(),this.stage.viewerControls.getPositionOnCanvas(e,t),A.bottom=this.offsetX+t.y+i.height/2+"px",A.left=this.offsetY+t.x-i.width/2+"px"}}},gy.prototype.dispose=function(){this.viewer.wrapper.removeChild(this.element),this.viewer.signals.ticked.remove(this._update,this),this.component.signals.matrixChanged.remove(this._updateViewerPosition,this)};var ay=new we,My=new De,sy=new de,cy=function(A){this.component=A,this.signals={changed:new wu.Signal},this.stage=A.stage,this.viewer=A.stage.viewer},uy={position:{configurable:!0},rotation:{configurable:!0}};uy.position.get=function(){return this.component.position},uy.rotation.get=function(){return this.component.quaternion},cy.prototype.changed=function(){this.component.updateMatrix(),this.viewer.requestRender(),this.signals.changed.dispatch()},cy.prototype.spin=function(A,t){ay.getInverse(this.viewer.rotationGroup.matrix),My.copy(ru(A)).applyMatrix4(ay),ay.extractRotation(this.component.transform),ay.premultiply(this.viewer.rotationGroup.matrix),ay.getInverse(ay),My.copy(ru(A)),My.applyMatrix4(ay),ay.makeRotationAxis(My,t),sy.setFromRotationMatrix(ay),this.component.quaternion.premultiply(sy),this.changed()},Object.defineProperties(cy.prototype,uy);var ly={"":"",vdw:"by vdW radius",covalent:"by covalent radius",sstruc:"by secondary structure",bfactor:"by bfactor",size:"size",data:"data",explicit:"explicit"},Cy=function(A){void 0===A&&(A={}),this.max=10,this.type=Hc(A.type,"size"),this.scale=Hc(A.scale,1),this.size=Hc(A.size,1),this.data=Hc(A.data,{})};Cy.prototype.atomRadius=function(A){var t;switch(this.type){case"vdw":t=A.vdw;break;case"covalent":t=A.covalent;break;case"bfactor":t=A.bfactor||1;break;case"sstruc":var e=A.sstruc;t="h"===e||"g"===e||"i"===e||"e"===e||"b"===e?.25:aN.includes(A.atomname)?.4:.1;break;case"data":t=Hc(this.data[A.index],1);break;case"explicit":null===(t=A.radius)&&(t=this.size);break;default:t=this.size}return Math.min(t*this.scale,this.max)},Cy.types=ly;var Ty=new De(-1,-1,-1),hy=new we,Ny=function(A){var t=A.rows,e=t/3,i=new ad(t,3),n=new ad(3,3),I=new ad(1,3),r=new ad(3,3),o=new ad(3,3),g=ud(A);ld(A,g),Md(i,A),sd(n,i,i),hd(n,I,r,o);var a=new De(g[0],g[1],g[2]),M=new De(r.data[0],r.data[3],r.data[6]),s=new De(r.data[1],r.data[4],r.data[7]),c=new De(r.data[2],r.data[5],r.data[8]),u=M.clone().multiplyScalar(Math.sqrt(I.data[0]/e)),l=s.clone().multiplyScalar(Math.sqrt(I.data[1]/e)),C=c.clone().multiplyScalar(Math.sqrt(I.data[2]/e));this.begA=a.clone().sub(u),this.endA=a.clone().add(u),this.begB=a.clone().sub(l),this.endB=a.clone().add(l),this.begC=a.clone().sub(C),this.endC=a.clone().add(C),this.center=a,this.vecA=u,this.vecB=l,this.vecC=C,this.normVecA=M,this.normVecB=s,this.normVecC=c};Ny.prototype.getBasisMatrix=function(A){void 0===A&&(A=new we);var t=A;return t.makeBasis(this.normVecB,this.normVecA,this.normVecC),t.determinant()<0&&t.scale(Ty),t},Ny.prototype.getRotationQuaternion=function(A){void 0===A&&(A=new de);var t=A;return t.setFromRotationMatrix(this.getBasisMatrix(hy)),t.inverse()},Ny.prototype.getProjectedScaleForAtoms=function(A){var t=-1/0,e=-1/0,i=-1/0,n=-1/0,I=-1/0,r=-1/0,o=new De,g=new De,a=this.center,M=this.normVecA,s=this.normVecB,c=this.normVecC;return A.eachAtom((function(A){GT(o.copy(A),M,a);var u=g.subVectors(o,a).normalize().dot(M),l=o.distanceTo(a);u>0?l>t&&(t=l):l>e&&(e=l),GT(o.copy(A),s,a);var C=g.subVectors(o,a).normalize().dot(s),T=o.distanceTo(a);C>0?T>i&&(i=T):T>n&&(n=T),GT(o.copy(A),c,a);var h=g.subVectors(o,a).normalize().dot(c),N=o.distanceTo(a);h>0?N>I&&(I=N):N>r&&(r=N)})),{d1a:t,d2a:i,d3a:I,d1b:-e,d2b:-n,d3b:-r}};var dy=function(A,t,e,i){this.volume=A,this.setFilter(t,e,i)},yy={header:{configurable:!0},matrix:{configurable:!0},normalMatrix:{configurable:!0},inverseMatrix:{configurable:!0},center:{configurable:!0},boundingBox:{configurable:!0},min:{configurable:!0},max:{configurable:!0},mean:{configurable:!0},rms:{configurable:!0}};yy.header.get=function(){return this.volume.header},yy.matrix.get=function(){return this.volume.matrix},yy.normalMatrix.get=function(){return this.volume.normalMatrix},yy.inverseMatrix.get=function(){return this.volume.inverseMatrix},yy.center.get=function(){return this.volume.center},yy.boundingBox.get=function(){return this.volume.boundingBox},yy.min.get=function(){return this.volume.min},yy.max.get=function(){return this.volume.max},yy.mean.get=function(){return this.volume.mean},yy.rms.get=function(){return this.volume.rms},dy.prototype._getFilterHash=function(A,t,e){return JSON.stringify([A,t,e])},dy.prototype.setFilter=function(A,t,e){isNaN(A)&&this.header&&(A=this.header.DMEAN+2*this.header.ARMS),A=void 0===A||isNaN(A)?-1/0:A,t=Hc(t,1/0),e=Hc(e,!1);var i=this.volume.data,n=this.volume.position,I=this.volume.atomindex,r=this._getFilterHash(A,t,e);if(r!==this._filterHash){if(A===-1/0&&t===1/0)this.data=i,this.position=n,this.atomindex=I;else{var o=i.length;this._dataBuffer||(this._dataBuffer=new ArrayBuffer(4*o),this._positionBuffer=new ArrayBuffer(3*o*4),I&&(this._atomindexBuffer=new ArrayBuffer(4*o)));var g,a=new Float32Array(this._dataBuffer),M=new Float32Array(this._positionBuffer);I&&(g=new Uint32Array(this._atomindexBuffer));for(var s=0,c=0;c=A&&l<=t||e&&(lt)){var C=3*s;a[s]=l,M[C+0]=n[u+0],M[C+1]=n[u+1],M[C+2]=n[u+2],I&&g&&(g[s]=I[c]),s+=1}}this.data=new Float32Array(this._dataBuffer,0,s),this.position=new Float32Array(this._positionBuffer,0,3*s),I&&(this.atomindex=new Int32Array(this._atomindexBuffer,0,s))}this._filterHash=r}},Object.defineProperties(dy.prototype,yy),dy.prototype.getValueForSigma=Sd.prototype.getValueForSigma,dy.prototype.getSigmaForValue=Sd.prototype.getSigmaForValue,dy.prototype.getDataAtomindex=Sd.prototype.getDataAtomindex,dy.prototype.getDataPosition=Sd.prototype.getDataPosition,dy.prototype.getDataColor=Sd.prototype.getDataColor,dy.prototype.getDataPicking=Sd.prototype.getDataPicking,dy.prototype.getDataSize=Sd.prototype.getDataSize;var Ey=function(A,t){var e=Sh({nodeArray1:A.atomIndex1,nodeArray2:A.atomIndex2,edgeCount:A.count,nodeCount:t});this.countArray=e.countArray,this.offsetArray=e.offsetArray,this.indexArray=e.indexArray},Dy=function(A){function t(){A.apply(this,arguments)}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={_defaultFields:{configurable:!0}};return e._defaultFields.get=function(){return[["atomIndex1",1,"int32"],["atomIndex2",1,"int32"],["bondOrder",1,"int8"]]},t.prototype.addBond=function(A,t,e){this.growIfFull();var i=this.count,n=A.index,I=t.index;n0&&(r[f]=d.angleTo(y));var w=Math.cos(l.angleTo(C));a[f]=180/Math.PI*Math.acos(w);var m=l.length(),Q=C.length();o[f]=Math.sqrt(Q*m)/Math.max(2,2*(1-w)),g[f]=Math.abs(c.dot(d)),T.copy(l).multiplyScalar(o[f]/m),h.copy(C).multiplyScalar(o[f]/Q),T.subVectors(x,T),h.subVectors(p,h),T.toArray(n,z+3),h.toArray(n,z+6),E.subVectors(B,D),E.toArray(M,z),y.copy(d),D.copy(T)}T.fromArray(n,3),h.fromArray(n,6),d.subVectors(T,h).normalize(),B.index=A.getAtomIndexByType(0,j),D.copy(B),N.copy(B),GT(N,d,T),N.toArray(n,0),E.subVectors(D,T),E.toArray(M,0),T.fromArray(n,3*e-6),h.fromArray(n,3*e-9),d.subVectors(T,h).normalize(),B.index=A.getAtomIndexByType(e-1,j),D.copy(B),N.copy(B),GT(N,d,T),N.toArray(n,3*e-3);for(var S=e-3;St||a.bending[v]>A)&&(O=!0)),O){if(v-C<4){C=v,O=!1;continue}Q.index=w.traceAtomIndex,p=a.axis.subarray(3*C+3,3*v),L=a.center.subarray(3*C,3*v+3),s=kT(p).normalize(),c=kT(L),f.fromArray(L),GT(f,s,c),z.fromArray(L,L.length-3),GT(z,s,c),s.subVectors(z,f),s.toArray(h,T),c.toArray(N,T),f.toArray(d,T),z.toArray(y,T),u.atomColorToArray(Q,E,T),D.push(Q.index),j.push(l.atomRadius(Q)),B.push(g+C),x.push(g+v+1-C),T+=3,C=v,O=!1}var U=new Float32Array(D);return{axis:new Float32Array(h),center:new Float32Array(N),begin:new Float32Array(d),end:new Float32Array(y),color:new Float32Array(E),picking:new PN(U,r),size:new Float32Array(j),residueOffset:B,residueCount:x}};var zy=function(A){this.scoreFunction=A,this.content=[],this.scoreFunction=A};zy.prototype.push=function(A){this.content.push(A),this.bubbleUp(this.content.length-1)},zy.prototype.pop=function(){var A=this.content[0],t=this.content.pop();return t&&this.content.length>0&&(this.content[0]=t,this.sinkDown(0)),A},zy.prototype.peek=function(){return this.content[0]},zy.prototype.remove=function(A){for(var t=this.content.length,e=0;e0;){var e=Math.floor((A+1)/2)-1,i=this.content[e];if(!(this.scoreFunction(t)this.maxDepth&&(this.maxDepth=A);var n=i-e;if(0===n)return-1;var I=4*this.currentNode,r=this.nodes;if(this.currentNode+=1,1===n)return r[I]=e,r[I+1]=-1,r[I+2]=-1,r[I+3]=t,I;for(var o,g,a,M,s,c=this.indices,u=this.points,l=e+Math.floor(n/2),C=A%3,T=e,h=i-1;h>T;){for(M=u[3*c[a=T+h>>1]+C],g=c[a],c[a]=c[h],c[h]=g,s=T,o=T;ot&&n.pop()}var h=I[a+1],N=I[a+2];if(-1!==N||-1!==h){g(M=-1===N?h:-1===h?N:A[c]<=r[u+c]?h:N),(n.size()I[3*r[n[A]]+i])throw new Error("left child is > parent!");e+=this.verify(o,t+1)}if(-1!==g){if(I[3*r[n[g]]+i]0},my.prototype.isBackbone=function(){var A=this.residueType.backboneIndexList;return A.length>0&&A.includes(this.index-this.residueAtomOffset)},my.prototype.isPolymer=function(){if(this.structure.entityList.length>0)return this.entity.isPolymer();var A=this.residueType.moleculeType;return 3===A||4===A||5===A},my.prototype.isSidechain=function(){return this.isPolymer()&&!this.isBackbone()},my.prototype.isCg=function(){var A=this.residueType.backboneType;return 4===A||5===A||6===A},my.prototype.isTrace=function(){return this.index===this.residueType.traceAtomIndex+this.residueAtomOffset},my.prototype.isHetero=function(){return 1===this.residueType.hetero},my.prototype.isProtein=function(){return 3===this.residueType.moleculeType},my.prototype.isNucleic=function(){var A=this.residueType.moleculeType;return 4===A||5===A},my.prototype.isRna=function(){return 4===this.residueType.moleculeType},my.prototype.isDna=function(){return 5===this.residueType.moleculeType},my.prototype.isWater=function(){return 1===this.residueType.moleculeType},my.prototype.isIon=function(){return 2===this.residueType.moleculeType},my.prototype.isSaccharide=function(){return 6===this.residueType.moleculeType},my.prototype.isHelix=function(){return Jh.includes(this.sstruc)},my.prototype.isSheet=function(){return Hh.includes(this.sstruc)},my.prototype.isTurn=function(){return Rh.includes(this.sstruc)&&this.isProtein()},my.prototype.isBonded=function(){return 0!==this.bondHash.countArray[this.index]},my.prototype.isRing=function(){return void 0!==this.residueType.getRings().atomRings[this.index-this.residueAtomOffset]},my.prototype.isAromatic=function(){return 1===this.aromatic},my.prototype.isPolarHydrogen=function(){var A=!1;return 1!==this.number?A:A=!this.hasBondToElement(6)},my.prototype.isMetal=function(){return this.atomType.isMetal()},my.prototype.isNonmetal=function(){return this.atomType.isNonmetal()},my.prototype.isMetalloid=function(){return this.atomType.isMetalloid()},my.prototype.isHalogen=function(){return this.atomType.isHalogen()},my.prototype.isDiatomicNonmetal=function(){return this.atomType.isDiatomicNonmetal()},my.prototype.isPolyatomicNonmetal=function(){return this.atomType.isPolyatomicNonmetal()},my.prototype.isAlkaliMetal=function(){return this.atomType.isAlkaliMetal()},my.prototype.isAlkalineEarthMetal=function(){return this.atomType.isAlkalineEarthMetal()},my.prototype.isNobleGas=function(){return this.atomType.isNobleGas()},my.prototype.isTransitionMetal=function(){return this.atomType.isTransitionMetal()},my.prototype.isPostTransitionMetal=function(){return this.atomType.isPostTransitionMetal()},my.prototype.isLanthanide=function(){return this.atomType.isLanthanide()},my.prototype.isActinide=function(){return this.atomType.isActinide()},my.prototype.getDefaultValence=function(){return this.atomType.getDefaultValence()},my.prototype.getValenceList=function(){return this.atomType.getValenceList()},my.prototype.getOuterShellElectronCount=function(){return this.atomType.getOuterShellElectronCount()},my.prototype.distanceTo=function(A){var t=this.atomStore,e=A.atomStore,i=this.index,n=A.index,I=t.x[i]-e.x[n],r=t.y[i]-e.y[n],o=t.z[i]-e.z[n],g=I*I+r*r+o*o;return Math.sqrt(g)},my.prototype.connectedTo=function(A){var t=this.atomStore,e=A.atomStore,i=this.index,n=A.index;if(t.altloc&&e.altloc){var I=t.altloc[i],r=e.altloc[n];if(0!==I&&0!==r&&32!==I&&32!==r&&I!==r)return!1}var o=t.x[i]-e.x[n],g=t.y[i]-e.y[n],a=t.z[i]-e.z[n],M=o*o+g*g+a*a;if(M<48&&this.isCg())return!0;if(isNaN(M))return!1;var s=this.covalent+A.covalent,c=s+.3,u=s-.5;return Mu*u},my.prototype.positionFromArray=function(A,t){return void 0===t&&(t=0),this.x=A[t+0],this.y=A[t+1],this.z=A[t+2],this},my.prototype.positionToArray=function(A,t){void 0===A&&(A=[]),void 0===t&&(t=0);var e=this.index,i=this.atomStore;return A[t+0]=i.x[e],A[t+1]=i.y[e],A[t+2]=i.z[e],A},my.prototype.positionToVector3=function(A){return void 0===A&&(A=new De),A.x=this.x,A.y=this.y,A.z=this.z,A},my.prototype.positionFromVector3=function(A){return this.x=A.x,this.y=A.y,this.z=A.z,this},my.prototype.positionAdd=function(A){return this.x+=A.x,this.y+=A.y,this.z+=A.z,this},my.prototype.positionSub=function(A){return this.x-=A.x,this.y-=A.y,this.z-=A.z,this},my.prototype.getResidueBonds=function(A){void 0===A&&(A=!1);var t,e,i,n,I=this.residueAtomOffset,r=this.index-this.residueAtomOffset,o=this.residueType.getBonds(),g=o.atomIndices1,a=o.atomIndices2;for(A||(n=[]),t=g.indexOf(r);-1!==t;){if(i=a[t]+I,!n)return i;n.push(i),t=g.indexOf(r,t+1)}for(e=a.indexOf(r);-1!==e;){if(i=g[e]+I,!n)return i;n.push(i),e=a.indexOf(r,e+1)}return n},my.prototype.qualifiedName=function(A){void 0===A&&(A=!1);var t="";return this.resname&&!A&&(t+="["+this.resname+"]"),void 0!==this.resno&&(t+=this.resno),this.inscode&&(t+="^"+this.inscode),this.chainname&&(t+=":"+this.chainname),this.atomname&&(t+="."+this.atomname),this.altloc&&(t+="%"+this.altloc),this.structure.modelStore.count>1&&(t+="/"+this.modelIndex),t},my.prototype.clone=function(){return new my(this.structure,this.index)},my.prototype.toObject=function(){return{index:this.index,residueIndex:this.residueIndex,resname:this.resname,x:this.x,y:this.y,z:this.z,element:this.element,chainname:this.chainname,resno:this.resno,serial:this.serial,vdw:this.vdw,covalent:this.covalent,hetero:this.hetero,bfactor:this.bfactor,altloc:this.altloc,atomname:this.atomname,modelIndex:this.modelIndex}},Object.defineProperties(my.prototype,Qy);var Oy=new Float32Array(3),vy=function(t,e){void 0===e&&(e=!1),A.Debug&&jl.time("Kdtree build");var i=e?Sy:Yy,n=new Float32Array(3*t.atomCount),I=new Uint32Array(t.atomCount),r=0;t.eachAtom((function(A){n[r+0]=A.x,n[r+1]=A.y,n[r+2]=A.z,I[r/3]=A.index,r+=3})),this.atomIndices=I,this.points=n,this.kdtree=new wy(n,i),A.Debug&&jl.timeEnd("Kdtree build")};vy.prototype.nearest=function(A,t,e){A instanceof De?A.toArray(Oy):A instanceof my&&A.positionToArray(Oy);for(var i=this.kdtree.nearest(Oy,t,e),n=this.kdtree.indices,I=this.kdtree.nodes,r=this.atomIndices,o=[],g=0,a=i.length;g":"3/4-Z","?":"X-Y","@":"Y-X",A:"Z+1/3",B:"Z+2/3",C:"X+2/3",D:"Y+1/3",E:"-Y+2/3",F:"X-Y+1/3",G:"Y-X+2/3",H:"-X+1/3",I:"X+1/3",J:"Y+2/3",K:"-Y+1/3",L:"X-Y+2/3",M:"Y-X+1/3",N:"-X+2/3",O:"2/3+X",P:"1/3+Y",Q:"1/3+Z",R:"2/3-Y",S:"1/3+X-Y",T:"2/3+Y-X",U:"1/3-X",V:"2/3-X",W:"1/3-Y",X:"1/3-Z",Y:"2/3+Y",Z:"1/3+Y-X","[":"2/3+X-Y","]":"1/3+X","^":"2/3+Z",_:"2/3-Z","`":"5/6+Z",a:"1/6+Z",b:"5/6-Z",c:"1/6-Z",d:"Z+5/6",e:"Z+1/6",f:"Z+1/4",g:"+Y"},by={"P 1":" !#","P -1":" !#$%&","P 1 2 1":" !#$!&","P 1 21 1":" !#$'&","C 1 2 1":" !#$!&()#*)&","P 1 m 1":" !# %#","P 1 c 1":" !# %+","C 1 m 1":" !# %#()#(,#","C 1 c 1":" !# %+()#(,+","P 1 2/m 1":" !# %#$!&$%&","P 1 21/m 1":" !#$)&$%& ,#","C 1 2/m 1":" !# %#$!&$%&()#(,#*)&*,&","P 1 2/c 1":" !#$!-$%& %+","P 1 21/c 1":" !#$%&$)- ,+","C 1 2/c 1":" !#$!-$%& %+()#*)-*,&(,+","P 2 2 2":" !#$%#$!& %&","P 2 2 21":" !#$%+$!- %&","P 21 21 2":" !#$%#*)&(,&","P 21 21 21":" !#*%+$)-(,&","C 2 2 21":" !#$%+$!- %&()#*,+*)-(,&","C 2 2 2":" !#$%#$!& %&()#*,#*)&(,&","F 2 2 2":" !#$%#$!& %& )+$,+$)- ,-(!+*%+*!-(%-()#*,#*)&(,&","I 2 2 2":" !#$%# %&$!&.'/01/.120'2","I 21 21 21":" !#*%+$)-(,&()+$,#*!& %-","P m m 2":" !#$%# %#$!#","P m c 21":" !#$%+ %+$!#","P c c 2":" !#$%# %+$!+","P m a 2":" !#$%#(%#*!#","P c a 21":" !#$%+(%#*!+","P n c 2":" !#$%# ,+$)+","P m n 21":" !#*%+(%+$!#","P b a 2":" !#$%#(,#*)#","P n a 21":" !#$%+(,#*)+","P n n 2":" !#$%#(,+*)+","C m m 2":" !#$%# %#$!#()#*,#(,#*)#","C m c 21":" !#$%+ %+$!#()#*,+(,+*)#","C c c 2":" !#$%# %+$!+()#*,#(,+*)+","A m m 2":" !#$%# %#$!# )+$,+ ,+$)+","A b m 2":" !#$%# ,#$)# )+$,+ %+$!+","A m a 2":" !#$%#(%#*!# )+$,+(,+*)+","A b a 2":" !#$%#(,#*)# )+$,+(%+*!+","F m m 2":" !#$%# %#$!# )+$,+ ,+$)+(!+*%+(%+*!+()#*,#(,#*)#","F d d 2":" !#$%#345675 )+$,+3896:9(!+*%+;49<79()#*,#;85<:5","I m m 2":" !#$%# %#$!#()+*,+(,+*)+","I b a 2":" !#$%#(,#*)#()+*,+ %+$!+","I m a 2":" !#$%#(%#*!#()+*,+ ,+$)+","P 2/m 2/m 2/m":" !#$%#$!& %&$%& !& %#$!#","P 2/n 2/n 2/n":" !#$%#$!& %&*,-()-(,+*)+","P 2/c 2/c 2/m":" !#$%#$!- %-$%& !& %+$!+","P 2/b 2/a 2/n":" !#$%#$!& %&*,&()&(,#*)#","P 21/m 2/m 2/a":" !#*%#$!&(%&$%&(!& %#*!#","P 2/n 21/n 2/a":" !#*%#*)- ,-$%&(!&(,+$)+","P 2/m 2/n 21/a":" !#*%+*!- %&$%&(!-(%+$!#","P 21/c 2/c 2/a":" !#*%#$!-(%-$%&(!& %+*!+","P 21/b 21/a 2/m":" !#$%#*)&(,&$%& !&(,#*)#","P 21/c 21/c 2/n":" !#*,#$)-(%-$%&()& ,+*!+","P 2/b 21/c 21/m":" !#$%+$)- ,&$%& !- ,+$)#","P 21/n 21/n 2/m":" !#$%#*)-(,-$%& !&(,+*)+","P 21/m 21/m 2/n":" !#$%#*'&.,&*,&.'& %#$!#","P 21/b 2/c 21/n":" !#*,+$!-(,&$%&()- %+*)#","P 21/b 21/c 21/a":" !#*%+$)-(,&$%&(!- ,+*)#","P 21/n 21/m 21/a":" !#0%/$'&.12$%&.!2 1#0'/","C 2/m 2/c 21/m":" !#$%+$!- %&$%& !- %+$!#()#*,+*)-(,&*,&()-(,+*)#","C 2/m 2/c 21/a":" !#$,+$)- %&$%& )- ,+$!#()#*%+*!-(,&*,&(!-(%+*)#","C 2/m 2/m 2/m":" !#$%#$!& %&$%& !& %#$!#()#*,#*)&(,&*,&()&(,#*)#","C 2/c 2/c 2/m":" !#$%#$!- %-$%& !& %+$!+()#*,#*)-(,-*,&()&(,+*)+","C 2/m 2/m 2/a":" !#$,#$)& %&$%& )& ,#$!#()#*%#*!&(,&*,&(!&(%#*)#","C 2/c 2/c 2/a":" !#*,#$!&(,&$,-(!- ,+*!+()#$%#*)& %&*%- )-(%+$)+","F 2/m 2/m 2/m":" !#$%#$!& %&$%& !& %#$!# )+$,+$)- ,-$,- )- ,+$)+(!+*%+*!-(%-*%-(!-(%+*!+()#*,#*)&(,&*,&()&(,#*)#","F 2/d 2/d 2/d":" !#$%#$!& %&64=37=345675 )+$,+$)- ,-68>3:>3896:9(!+*%+*!-(%-<4>;7>;49<79()#*,#*)&(,&<8=;:=;85<:5","I 2/m 2/m 2/m":" !#$%#$!& %&$%& !& %#$!#()+*,+*)-(,-*,-()-(,+*)+","I 2/b 2/a 2/m":" !#$%#*)&(,&$%& !&(,#*)#()+*,+$!- %-*,-()- %+$!+","I 21/b 21/c 21/a":" !#*%+$)-(,&$%&(!- ,+*)#()+$,#*!& %-*,- )&(%#$!+","I 21/m 21/m 21/a":" !#$,#$)& %&$%& )& ,#$!#()+*%+*!-(,-*,-(!-(%+*)+","P 4":" !#$%#% #!$#","P 41":" !#$%+% 5!$9","P 42":" !#$%#% +!$+","P 43":" !#$%+% 9!$5","I 4":" !#$%#% #!$#()+*,+,(+)*+","I 41":" !#*,+%(5)$9()+$%#, 9!*5","P -4":" !#$%#!$&% &","I -4":" !#$%#!$&% &()+*,+)*-,(-","P 4/m":" !#$%#% #!$#$%& !&!$&% &","P 42/m":" !#$%#% +!$+$%& !&!$-% -","P 4/n":" !#$%#,(#)*#*,&()&!$&% &","P 42/n":" !#$%#,(+)*+*,-()-!$&% &","I 4/m":" !#$%#% #!$#$%& !&!$&% &()+*,+,(+)*+*,-()-)*-,(-","I 41/a":" !#*,+%(5)$9$,=(!>!$&,(-()+$%#, 9!*5*%> )=)*-% &","P 4 2 2":" !#$%#% #!$#$!& %&! &%$&","P 4 21 2":" !#$%#,(#)*#*)&(,&! &%$&","P 41 2 2":" !#$%+% 5!$9$!& %-! >%$=","P 41 21 2":" !#$%+,(5)*9*)=(,>! &%$-","P 42 2 2":" !#$%#% +!$+$!& %&! -%$-","P 42 21 2":" !#$%#,(+)*+*)-(,-! &%$&","P 43 2 2":" !#$%+% 9!$5$!& %-! =%$>","P 43 21 2":" !#$%+,(9)*5*)>(,=! &%$-","I 4 2 2":" !#$%#% #!$#$!& %&! &%$&()+*,+,(+)*+*)-(,-)(-,*-","I 41 2 2":" !#*,+%(5)$9*!> ,=)(-%$&()+$%#, 9!*5$)=(%>! &,*-","P 4 m m":" !#$%#% #!$# %#$!#%$#! #","P 4 b m":" !#$%#% #!$#(,#*)#,*#)(#","P 42 c m":" !#$%#% +!$+ %+$!+%$#! #","P 42 n m":" !#$%#,(+)*+(,+*)+%$#! #","P 4 c c":" !#$%#% #!$# %+$!+%$+! +","P 4 n c":" !#$%#% #!$#(,+*)+,*+)(+","P 42 m c":" !#$%#% +!$+ %#$!#%$+! +","P 42 b c":" !#$%#% +!$+(,#*)#,*+)(+","I 4 m m":" !#$%#% #!$# %#$!#%$#! #()+*,+,(+)*+(,+*)+,*+)(+","I 4 c m":" !#$%#% #!$# %+$!+%$+! +()+*,+,(+)*+(,#*)#,*#)(#","I 41 m d":" !#*,+%(5)$9 %#*)+%*5) 9()+$%#, 9!*5(,+$!#,$9!(5","I 41 c d":" !#*,+%(5)$9 %+*)#%*9) 5()+$%#, 9!*5(,#$!+,$5!(9","P -4 2 m":" !#$%#% &!$&$!& %&%$#! #","P -4 2 c":" !#$%#% &!$&$!- %-%$+! +","P -4 21 m":" !#$%#% &!$&*)&(,&,*#)(#","P -4 21 c":" !#$%#% &!$&*)-(,-,*+)(+","P -4 m 2":" !#$%#!$&% & %#$!#! &%$&","P -4 c 2":" !#$%#% &!$& %+$!+! -%$-","P -4 b 2":" !#$%#% &!$&(,#*)#)(&,*&","P -4 n 2":" !#$%#% &!$&(,+*)+)(-,*-","I -4 m 2":" !#$%#% &!$& %#$!#! &%$&()+*,+,(-)*-(,+*)+)(-,*-","I -4 c 2":" !#$%#% &!$& %+$!+! -%$-()+*,+,(-)*-(,#*)#)(&,*&","I -4 2 m":" !#$%#% &!$&$!& %&%$#! #()+*,+,(-)*-*)-(,-,*+)(+","I -4 2 d":" !#$%#% &!$&*!>(%>,$9) 9()+*,+,(-)*-$)= ,=%*5!(5","P 4/m 2/m 2/m":" !#$%#% #!$#$!& %&! &%$&$%& !&!$&% & %#$!#%$#! #","P 4/m 2/c 2/c":" !#$%#% #!$#$!- %-! -%$-$%& !&!$&% & %+$!+%$+! +","P 4/n 2/b 2/m":" !#$%#% #!$#$!& %&! &%$&*,&()&)*&,(&(,#*)#,*#)(#","P 4/n 2/n 2/c":" !#$%#% #!$#$!& %&! &%$&*,-()-)*-,(-(,+*)+,*+)(+","P 4/m 21/b 2/m":" !#$%#% #!$#*)&(,&)(&,*&$%& !&!$&% &(,#*)#,*#)(#","P 4/m 21/n 2/c":" !#$%#% #!$#*)-(,-)(-,*-$%& !&!$&% &(,+*)+,*+)(+","P 4/n 21/m 2/m":" !#$%#,(#)*#*)&(,&! &%$&*,&()&!$&% & %#$!#,*#)(#","P 4/n 2/c 2/c":" !#$%#,(#)*#*)-(,-! -%$-*,&()&!$&% & %+$!+,*+)(+","P 42/m 2/m 2/c":" !#$%#% +!$+$!& %&! -%$-$%& !&!$-% - %#$!#%$+! +","P 42/m 2/c 2/m":" !#$%#% +!$+$!- %-! &%$&$%& !&!$-% - %+$!+%$#! #","P 42/n 2/b 2/c":" !#$%#,(+)*+$!- %-)(&,*&*,-()-!$&% &(,#*)#%$+! +","P 42/n 2/n 2/m":" !#$%#,(+)*+$!& %&)(-,*-*,-()-!$&% &(,+*)+%$#! #","P 42/m 21/b 2/c":" !#$%#% +!$+*)&(,&)(-,*-$%& !&!$-% -(,#*)#,*+)(+","P 42/m 21/n 2/m":" !#$%#,./'*/*'-.,-! &%$&$%& !&'*-,.-.,/*'/%$#! #","P 42/n 21/m 2/c":" !#$%#,(+)*+*)-(,-! &%$&*,-()-!$&% & %#$!#,*+)(+","P 42/n 21/c 2/m":" !#$%#,(+)*+*)&(,&! -%$-*,-()-!$&% & %+$!+,*#)(#","I 4/m 2/m 2/m":" !#$%#% #!$#$!& %&! &%$&$%& !&!$&% & %#$!#%$#! #()+*,+,(+)*+*)-(,-)(-,*-*,-()-)*-,(-(,+*)+,*+)(+","I 4/m 2/c 2/m":" !#$%#% #!$#$!- %-! -%$-$%& !&!$&% & %+$!+%$+! +()+*,+,(+)*+*)&(,&)(&,*&*,-()-)*-,(-(,#*)#,*#)(#","I 41/a 2/m 2/d":" !#*,+%(5)$9*!> ,=)(-%$&$,=(!>!$&,(-(,+$!#,$9!(5()+$%#, 9!*5$)=(%>! &,*-*%> )=)*-% & %#*)+%*5) 9","I 41/a 2/c 2/d":" !#*,+%(5)$9*!= ,>)(&%$-$,=(!>!$&,(-(,#$!+,$5!(9()+$%#, 9!*5$)>(%=! -,*&*%> )=)*-% & %+*)#%*9) 5","P 3":" !#%?#@$#","P 31":" !#%?A@$B","P 32":" !#%?B@$A","H 3":" !#%?#@$#CDAEFAGHAIJBKLBMNB","R 3":" !## !!# ","P -3":" !#%?#@$#$%&!@&? &","H -3":" !#%?#@$#$%&!@&? &OPQRSQTUQVWXYZX[]X]Y^W[^ZV^UR_PT_SO_","R -3":" !## !!# $%&&$%%&$","P 3 1 2":" !#%?#@$#%$&@!& ?&","P 3 2 1":" !#%?#@$#! &?%&$@&","P 31 1 2":" !#%?Q@$^%$_@!X ?&","P 31 2 1":" !#%?A@$B! &?%_$@X","P 32 1 2":" !#%?^@$Q%$X@!_ ?&","P 32 2 1":" !#%?B@$A! &?%X$@_","H 3 2":" !#%?#@$#! &?%&$@&OPQRSQTUQY]X[WXVZX]Y^W[^ZV^PO_SR_UT_","R 3 2":" !## !!# %$&$&%&%$","P 3 m 1":" !#%?#@$#%$#@!# ?#","P 3 1 m":" !#%?#@$#! #?%#$@#","P 3 c 1":" !#%?#@$#%$+@!+ ?+","P 3 1 c":" !#%?#@$#! +?%+$@+","H 3 m":" !#%?#@$#%$#@!# ?#OPQRSQTUQRUQTPQOSQ]Y^W[^ZV^WV^ZY^][^","R 3 m":" !## !!# ! # #!#! ","H 3 c":" !#%?#@$#%$+@!+ ?+OPQRSQTUQRU`TP`OS`]Y^W[^ZV^WVaZYa][a","R 3 c":" !## !!# '././'/'.","P -3 1 2/m":" !#%?#@$#%$&@!& ?&$%&!@&? &! #?%#$@#","P -3 1 2/c":" !#%?#@$#%$-@!- ?-$%&!@&? &! +?%+$@+","P -3 2/m 1":" !#%?#@$#! &?%&$@&$%&!@&? &%$#@!# ?#","P -3 2/c 1":" !#%?#@$#! -?%-$@-$%&!@&? &%$+@!+ ?+","H -3 2/m":" !#%?#@$#! &?%&$@&$%&!@&? &%$#@!# ?#OPQRSQTUQY]X[WXVZXVWXYZX[]XRUQTPQOSQ]Y^W[^ZV^PO_SR_UT_UR_PT_SO_WV^ZY^][^","R -3 2/m":" !## !!# %$&$&%&%$$%&&$%%&$! # #!#! ","H -3 2/c":" !#%?#@$#! -?%-$@-$%&!@&? &%$+@!+ ?+OPQRSQTUQY]b[WbVZbVWXYZX[]XRU`TP`OS`]Y^W[^ZV^POcSRcUTcUR_PT_SO_WVaZYa][a","R -3 2/c":" !## !!# 102021210$%&&$%%&$'././'/'.","P 6":" !#%?#@$#$%#!@#? #","P 61":" !#%?A@$B$%/!@d? e","P 65":" !#%?B@$A$%/!@e? d","P 62":" !#%?^@$Q$%#!@^? Q","P 64":" !#%?Q@$^$%#!@Q? ^","P 63":" !#%?#@$#$%+!@+? +","P -6":" !#%?#@$# !&%?&@$&","P 6/m":" !#%?#@$#$%#!@#? #$%&!@&? & !&%?&@$&","P 63/m":" !#%?#@$#$%+!@+? +$%&!@&? & !-%?-@$-","P 6 2 2":" !#%?#@$#$%#!@#? #! &?%&$@&%$&@!& ?&","P 61 2 2":" !#%?Q@$^$%+!@`? a! X?%&$@_%$b@!- ?c","P 65 2 2":" !#%?^@$Q$%+!@a? `! _?%&$@X%$c@!- ?b","P 62 2 2":" !#%?^@$Q$%#!@^? Q! _?%&$@X%$_@!& ?X","P 64 2 2":" !#%?Q@$^$%#!@Q? ^! X?%&$@_%$X@!& ?_","P 63 2 2":" !#%?#@$#$%+!@+? +! &?%&$@&%$-@!- ?-","P 6 m m":" !#%?#@$#$%#!@#? #%$#@!# ?#! #?%#$@#","P 6 c c":" !#%?#@$#$%#!@#? #%$+@!+ ?+! +?%+$@+","P 63 c m":" !#%?#@$#$%+!@+? +%$+@!+ ?+! #?%#$@#","P 63 m c":" !#%?#@$#$%+!@+? +%$#@!# ?#! +?%+$@+","P -6 m 2":" !#%?#@$# !&%?&@$&%$#@!# ?#%$&@!& ?&","P -6 c 2":" !#%?#@$# !-%?-@$-%$+@!+ ?+%$&@!& ?&","P -6 2 m":" !#%?#@$# !&%?&@$&! &?%&$@&! #?%#$@#","P -6 2 c":" !#%?#@$# !-%?-@$-! &?%&$@&! +?%+$@+","P 6/m 2/m 2/m":" !#%?#@$#$%#!@#? #! &?%&$@&%$&@!& ?&$%&!@&? & !&@$&%?&%$#@!# ?#! #?%#$@#","P 6/m 2/c 2/c":" !#%?#@$#$%#!@#? #! -?%-$@-%$-@!- ?-$%&!@&? & !&@$&%?&%$+@!+ ?+! +?%+$@+","P 63/m 2/c 2/m":" !#%?#@$#$%+!@+? +! -?%-$@-%$&@!& ?&$%&!@&? & !-@$-%?-%$+@!+ ?+! #?%#$@#","P 63/m 2/m 2/c":" !#%?#@$#$%+!@+? +! &?%&$@&%$-@!- ?-$%&!@&? & !-@$-%?-%$#@!# ?#! +?%+$@+","P 2 3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ","F 2 3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-((!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- ","I 2 3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-(","P 21 3":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(","I 21 3":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- ","P 2/m -3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& $%& !& %#$!#&$%& !# %#$!%&$!& %# !#$","P 2/n -3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& *,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*","F 2/m -3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& $%& !& %#$!#&$%& !# %#$!%&$!& %# !#$ )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-($,- )- ,+$)+&*,&()#(,#*)%-*!-(%+(!+*(!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(*%-(!-(%+*!+-$,- )+ ,+$),&*)&(,#()#*()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- *,&()&(,#*)#-*%-(!+(%+*!,-$)- ,+ )+$","F 2/d -3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& 64=37=345675=64=375345674=67=3453756 )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-(68>3:>3896:9=<8=;:5;85<:4><7>;49;79<(!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(<4>;7>;49<79>68>3:93896:8=<:=;85;:5<()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- <8=;:=;8f<:f><4>;79;49<78>6:>3893:96","I 2/m -3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& $%& !& %#$!#&$%& !# %#$!%&$!& %# !#$()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-(*,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*","P 21/a -3":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&($%&(!- ,+*)#&$%-(!+ ,#*)%&$!-(,+ )#*","I 21/a -3":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&($%&(!- ,+*)#&$%-(!+ ,#*)%&$!-(,+ )#*()+$,#*g& %-+()#$,&*!- %)+(,#$!&*%- *,- )&(%#$!+-*,& )#(%+$!,-*)& %#(!+$","P 4 3 2":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$","P 42 3 2":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,*","F 4 3 2":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$ )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-(!(-%*-!*+%(+ +,$+)$-, -)#)*#,(&)(&,*(!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&() -,$-)$+, +(#,*#)*&,(&)+!*+%(-!(-%*()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- )(&,*&)*#,(#(+%*+!*-%(-!+)$+, -) -,$","F 41 3 2":" !#$,+*)&(%-# !+$,&*)-(%!# ,+$)&*%-(:3>46=7<98;5;58<976=43>:97<58;>:3=46 )+$%#*!-(,&#()+*%&$!- ,!+(,#*)-$%& :;=4<>765839;94<5:6>83=79:6543>7;=8<(!+*,#$)- %&+ )#$%-*!&(,)#(%+*!&$,- 73=86>:<54;935469:<=8;>7576983=:;>4<()#*%+$!& ,-+(!#*,-$)& %)+ %#$!-*,&(7;>8<=:69435398657<>4;=:5:<94;=73>86","I 4 3 2":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-()(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,*","P 43 3 2":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(7;>46=:<5839398<5:6=4;>75:<983>7;=46","P 41 3 2":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(:3=8<>7694;5;54697<>83=:97654;=:3>8<","I 41 3 2":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(:3=8<>7694;5;54697<>83=:97654;=:3>8<()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- 7;>46=:<5839398<5:6=4;>75:<983>7;=46","P -4 3 m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! #%$#!$&% & #!$#%$&! &%#! #%$&!$&% ","F -4 3 m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! #%$#!$&% & #!$#%$&! &%#! #%$&!$&% )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-(!(+%*+!*-%(- +)$+,$-) -,#)(#,*&)*&,((!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&() +,$+)$-, -(#)*#,*&)(&,+!(+%*-!*-%(()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- )(#,*#)*&,(&(+!*+%*-!(-%+) +,$-)$-, ","I -4 3 m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! #%$#!$&% & #!$#%$&! &%#! #%$&!$&% ()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-()(+,*+)*-,(-(+)*+,*-)(-,+)(+,*-)*-,(","P -4 3 n":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(+,*+)*-,(-(+)*+,*-)(-,+)(+,*-)*-,(","F -4 3 c":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(+,*+)*-,(-(+)*+,*-)(-,+)(+,*-)*-,( )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-() #,$#)$&, &(#!*#%*&!(&%+! +%$-!$-% (!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(!(#%*#!*&%(& +!$+%$-! -%#) #,$&)$&, ()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- ! +%$+!$-% - #)$#,$&) &,#!(#%*&!*&%(","I -4 3 d":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(7354<9:6>8;=357<946>:;=857394<>:6=8;()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- :;98657<=43>;9:658<=73>49:;586=7<>43","P 4/m -3 2/m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$%$#! #% &!$&$&! &% #!$#%&% &!$#%$#! ","P 4/n -3 2/n":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$*,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*,*+)(+,(-)*-*-)(-,(+)*+,-,(-)*+,*+)(","P 42/m -3 2/n":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,*$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$,*+)(+,(-)*-*-)(-,(+)*+,-,(-)*+,*+)(","P 42/n -3 2/m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,**,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*%$#! #% &!$&$&! &% #!$#%&% &!$#%$#! ","F 4/m -3 2/m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$%$#! #% &!$&$&! &% #!$#%&% &!$#%$#! )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-(!(-%*-!*+%(+ +,$+)$-, -)#)*#,(&)(&,*$,- )- ,+$)+&*,&()#(,#*)%-*!-(%+(!+*%*+!(+%(-!*-$-) -, +)$+,&,(&)*#,*#)((!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&() -,$-)$+, +(#,*#)*&,(&)+!*+%(-!(-%**%-(!-(%+*!+-$,- )+ ,+$),&*)&(,#()#*,$+) +, -)$-*&)(&,(#)*#,-%(-!*+%*+!(()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- )(&,*&)*#,(#(+%*+!*-%(-!+)$+, -) -,$*,&()&(,#*)#-*%-(!+(%+*!,-$)- ,+ )+$,*#)(#,(&)*&*-!(-%(+!*+%-, -)$+,$+) ","F 4/m -3 2/c":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,*$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$,*+)(+,(-)*-*-)(-,(+)*+,-,(-)*+,*+)( )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-() &,$&)$#, #(#%*#!*&%(&!+!$+% -! -%$$,- )- ,+$)+&*,&()#(,#*)%-*!-(%+(!+*,$#) #, &)$&*&!(&%(#!*#%-% -!$+%$+! (!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(!(&%*&!*#%(# +%$+!$-% -!#)$#, &) &,$*%-(!-(%+*!+-$,- )+ ,+$),&*)&(,#()#*%*#!(#%(&!*&$-! -% +!$+%&, &)$#,$#) ()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- ! -%$-!$+% + #,$#)$&, &)#!*#%(&!(&%**,&()&(,#*)#-*%-(!+(%+*!,-$)- ,+ )+$%$+! +% -!$-$&) &, #)$#,&%(&!*#%*#!(","F 41/d -3 2/m":" !#$,+*)&(%-# !+$,&*)-(%!# ,+$)&*%-(:3>46=7<98;5;58<976=43>:97<58;>:3=4664=3:>;85<79=64>3:5;89<74=6:>385;79<,$+! #%(-)*&*&)(-% #!$+,-%(&)*+,$#! )+$%#*!-(,&#()+*%&$!- ,!+(,#*)-$%& :;=4<>765839;94<5:6>83=79:6543>7;=8<68>37=;49<:5=<8>;753496:4><:=;893756,*#!(+% &)$-*-!(&, +)$#%-, &!$+%*#)((!+*,#$)- %&+ )#$%-*!&(,)#(%+*!&$,- 73=86>:<54;935469:<=8;>7576983=:;>4<<4>;:=389675>68=379;45<:8=<7>;453:96%$#) +,(&!*-$&! -,(#)*+%&% -)$#,*+!(()#*%+$!& ,-+(!#*,-$)& %)+ %#$!-*,&(7;>8<=:69435398657<>4;=:5:<94;=73>86<8=;7>3456:9><4=;:9385678>67=349;:5<%*+)(#, -!$&$-) &%(+!*#,&,(-!*#%$+) ","F 41/d -3 2/c":" !#$,+*)&(%-# !+$,&*)-(%!# ,+$)&*%-(:3>46=7<98;5;58<976=43>:97<58;>:3=46<8>;7=3496:5><8=;793456:8><7=;493:56%*#)(+, &!$-$-! &,(+)*#%&, -!$#%*+)( )+$%#*!-(,&#()+*%&$!- ,!+(,#*)-$%& :;=4<>765839;94<5:6>83=79:6543>7;=8<<4=;:>385679>64=3:9;85<78=67>345;:9<%$+) #,(-!*&$&) -%(#!*+,&%(-)*#,$+! (!+*,#$)- %&+ )#$%-*!&(,)#(%+*!&$,- 73=86>:<54;935469:<=8;>7576983=:;>4<68=37>;45<:9=<4>;:5389674>6:=389;75<,*+!(#% -)$&*-)(&% +!$#,-,(&!*+%$#) ()#*%+$!& ,-+(!#*,-$)& %)+ %#$!-*,&(7;>8<=:69435398657<>4;=:5:<94;=73>8664>3:=;89<75=68>375;49<:4=<:>;853796,$#! +%(&)*-*&!(-, #)$+%-% &)$+,*#!(","I 4/m -3 2/m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$%$#! #% &!$&$&! &% #!$#%&% &!$#%$#! ()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-()(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,**,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*,*+)(+,(-)*-*-)(-,(+)*+,-,(-)*+,*+)(","I 41/a -3 2/d":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(:3=8<>7694;5;54697<>83=:97654;=:3>8<$%&(!- ,+*)#&$%-(!+ ,#*)%&$!-(,+ )#*4<97358;=:6>6>:;=8357<94=8;>:694<573()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- 7;>46=:<5839398<5:6=4;>75:<983>7;=46*,- )&(%#$!+-*,& )#(%+$!,-*)& %#(!+$865:;943>7<=<=73>4;9:658>43=7<5869:;","P 1 1 2":" !#$%#","P 1 1 21":" !#$%+","B 1 1 2":" !#$%#(g+*%+","A 1 2 1":" !#$!& )+$)-","C 1 21 1":" !#$)&()#*!&","I 1 2 1":" !#$!&.'/0'2","I 1 21 1":" !#$)&.'/0!-","P 1 1 m":" !# !&","P 1 1 b":" !# )&","B 1 1 m":" !# !&(!+(!-","B 1 1 b":" !# )&(!+()-","P 1 1 2/m":" !# !&$%#$%&","P 1 1 21/m":" !#$%+$%& !-","B 1 1 2/m":" !# !&$%#$%&(!+(!-*%+*%-","P 1 1 2/b":" !#$,#$%& )&","P 1 1 21/b":" !#$%&$,+ )-","B 1 1 2/b":" !#$,#$%& )&(!+*,+*%-()-","P 21 2 2":" !#$!&(%&*%#","P 2 21 2":" !# ,&$)&$%#","P 21 21 2 (a)":" !#*,#.%&$'&","P 21 2 21":" !#$!&(%-*%+","P 2 21 21":" !# %&$)-$,+","C 2 2 21a)":" !#*%+(,&$)-()#$,+ %&*!-","C 2 2 2a":" !#*,#.%&$'&()#$%# ,&*!&","F 2 2 2a":" !#*,#.%&$'& '/*%/.12$!2.!/$,/ %20'2.'#$%# 1&0!&","I 2 2 2a":" !#*,#.%&$'&()+$%+*!- ,-","P 21/m 21/m 2/n a":" !#*,#$)&(%&$%&.'& ,#*!#","P 42 21 2a":" !#*,#%.+'$+$'&.%&! -,*-","I 2 3a":" !#*,#.%&$'&!# ,- '&$%/$# !-*!/$%&.%()+$%+ ,-*!-)+(%&(!-*,#*+()&$)#*,- ,"},Py=/^[1-9]$/;function ky(A){var t="";return A.length>0&&(t=":"+Au(A).join(" OR :")),new il(t)}var Gy=function(A){void 0===A&&(A=""),this.name=A,this.partList=[]},Fy={type:{configurable:!0}};Fy.type.get=function(){return"Assembly"},Gy.prototype.addPart=function(A,t){var e=new Jy(A,t);return this.partList.push(e),e},Gy.prototype.getAtomCount=function(A){return this.partList.reduce((function(t,e){return t+e.getAtomCount(A)}),0)},Gy.prototype.getResidueCount=function(A){return this.partList.reduce((function(t,e){return t+e.getResidueCount(A)}),0)},Gy.prototype.getInstanceCount=function(){var A=0;return this.partList.forEach((function(t){A+=t.matrixList.length})),A},Gy.prototype.isIdentity=function(A){if(1!==this.partList.length)return!1;var t=this.partList[0];if(1!==t.matrixList.length)return!1;if(!(new we).equals(t.matrixList[0]))return!1;var e=[];return A.eachChain((function(A){e.push(A.chainname)})),e=Au(e),t.chainList.length===e.length},Gy.prototype.getBoundingBox=function(A){var t=new ai;return this.partList.forEach((function(e){var i=e.getBoundingBox(A);t.expandByPoint(i.min),t.expandByPoint(i.max)})),t},Gy.prototype.getCenter=function(A){return this.getBoundingBox(A).getCenter(new De)},Gy.prototype.getSelection=function(){var A=[];return this.partList.forEach((function(t){A=A.concat(t.chainList)})),ky(A)},Object.defineProperties(Gy.prototype,Fy);var Jy=function(A,t){void 0===A&&(A=[]),void 0===t&&(t=[]),this.matrixList=A,this.chainList=t},Hy={type:{configurable:!0}};Hy.type.get=function(){return"AssemblyPart"},Jy.prototype._getCount=function(A,t){var e=this,i=0;return A.eachChain((function(A){(0===e.chainList.length||e.chainList.includes(A.chainname))&&(i+=A[t])})),this.matrixList.length*i},Jy.prototype.getAtomCount=function(A){return this._getCount(A,"atomCount")},Jy.prototype.getResidueCount=function(A){return this._getCount(A,"residueCount")},Jy.prototype.getBoundingBox=function(A){var t=new ai,e=new ai,i=this.getSelection(),n=A.getBoundingBox(i);return this.matrixList.forEach((function(A){e.copy(n).applyMatrix4(A),t.expandByPoint(e.min),t.expandByPoint(e.max)})),t},Jy.prototype.getSelection=function(){return ky(this.chainList)},Jy.prototype.getView=function(A){var t=this.getSelection();return t?A.getView(t):A},Jy.prototype.getInstanceList=function(){for(var A=[],t=0,e=this.matrixList.length;t=0}));r.sort((function(A,t){var e=A[0],i=t[0],r=A[1],o=t[1];if(e===i)return r===o?0:r=0}));g.sort((function(A,t){var e=A[0],i=t[0];if(e===i)return 0;var r=qc(n,e),o=qc(n,i);return I[r]0&&this.addResidueType(this.ri-1),a.growIfFull(),a.resno[this.ri]=n,void 0!==r&&(a.sstruc[this.ri]=r.charCodeAt(0)),void 0!==o&&(a.inscode[this.ri]=o.charCodeAt(0)),a.atomOffset[this.ri]=this.ai,a.atomCount[this.ri]=0,a.count+=1,a.chainIndex[this.ri]=this.ci,M.residueCount[this.ci]+=1),g.count+=1,g.residueIndex[this.ai]=this.ri,a.atomCount[this.ri]+=1,this.currentModelindex=A,this.currentChainid=e,this.currentResname=i,this.currentResno=n,this.currentInscode=o,this.currentHetero=I},Ry.prototype.finalize=function(){this.previousResname=this.currentResname,this.previousHetero=this.currentHetero,this.ri>-1&&this.addResidueType(this.ri)};var Vy,Wy,Zy,Ky=(Vy=function(A,t,e,i){for(var n=A.structure,I=A.residueIndexStart,r=n.getResidueProxy(),o=n.getResidueProxy(),g=n.getAtomProxy(),a=n.getAtomProxy(),M=Math.max(0,t-2);M<=t;++M)for(var s=2;s<5;++s)if(!(M+s>=A.residueCount)){r.index=I+M,o.index=I+M+s,g.index=r.traceAtomIndex,a.index=o.traceAtomIndex;var c=g.distanceTo(a);if(Math.abs(c-e[s-2])>i)return!1}return!0},Wy=function(A,t){return Vy(A,t,[5.45,5.18,6.37],2.1)},Zy=function(A,t){return Vy(A,t,[6.1,10.4,13],1.42)},function(t){A.Debug&&jl.time("calculateSecondaryStructure"),t.eachPolymer((function(A){if(!(A.residueCount<4)){if(A.isCg())!function(A){for(var t=A.residueStore,e=A.residueIndexStart,i=new fy(A).position,n=new De,I=new De,r=0,o=A.residueCount;r1&&i.bending[r]<20&&(t.sstruc[e+r]="h".charCodeAt(0),t.sstruc[e+r+1]="h".charCodeAt(0))}}(A);else{if(!A.isProtein())return;!function(A){for(var t=A.residueStore,e=A.residueIndexStart,i=0,n=A.residueCount;i=t;)e=Math.floor(e/t),n+=_y[e%t],i+=1;return i>=5&&jl.warn("chainname overflow"),n}function $y(t,e){void 0===e&&(e=!1),A.Debug&&jl.time("calculateChainnames");var i=!0;if(t.eachChain((function(A){A.chainname&&(i=!1)})),i){var n=t.modelStore,I=t.chainStore,r=t.residueStore,o=t.getAtomProxy(),g=t.getAtomProxy(),a=0,M=0,s=0,c=0,u=[];1===r.count?u.push({mIndex:0,chainname:"A",rStart:0,rCount:1}):t.eachResidueN(2,(function(A,t){var i=!1,n=A.backboneType,I=t.backboneType,l=Uh;c=A.index,A.modelIndex!==t.modelIndex||A.moleculeType!==t.moleculeType?i=!0:n!==l&&n===I&&(o.index=A.backboneEndAtomIndex,g.index=t.backboneStartAtomIndex,i=e?!o.hasBondTo(g):!o.connectedTo(g)),i||t.index!==r.count-1||(i=!0,c=t.index),i&&(u.push({mIndex:M,chainname:qy(a),rStart:s,rCount:c-s+1}),a+=1,A.modelIndex!==t.modelIndex&&(a=0,M+=1),t.index===r.count-1&&c!==t.index&&u.push({mIndex:M,chainname:qy(a),rStart:r.count-1,rCount:1}),s=t.index,c=t.index)})),I.count=0,u.forEach((function(A){!function(A,t,e,i){for(var o=I.count,g=0;g500)return void jl.warn("more than 500 atoms, skip residue for auto-bonding",A.qualifiedName());for(var s=A.getBonds(),c=s.atomIndices1,u=s.atomIndices2,l=s.bondOrders,C=c.length,T=0;T-1&&(t=t.substr(1)),parseInt(t.charAt(0))>-1&&(t=t.substr(1));var e=t.length;if(0===e)return"";if(1===e)return t;if(2===e){if(-1!==oE.indexOf(t))return t;if(-1!==rE.indexOf(t[0]))return t[0]}return e>=3&&-1!==rE.indexOf(t[0])?t[0]:""}function aE(A){var t=A.bondHash,e=t.countArray,i=t.offsetArray,n=t.indexArray,I=A.getBondProxy();A.eachResidue((function(A){var t=A.residueType;if(void 0===t.bonds){var r=A.atomOffset,o=[],g=[],a=[],M={},s=r+A.atomCount;A.eachAtom((function(A){for(var t=A.index,c=i[t],u=0,l=e[t];u=s)){var T=I.atomIndex2;if(!(T=s)){if(C>T){var h=T;T=C,C=h}var N=C+"|"+T;void 0===M[N]&&(M[N]=!0,o.push(C-r),g.push(T-r),a.push(I.bondOrder))}}}})),t.bonds={atomIndices1:o,atomIndices2:g,bondOrders:a}}}))}var ME=[3,11,19,37,55,87],sE=[4,12,20,38,56,88],cE=[6,15,16,34],uE=[1,7,8,9,17,35,53],lE=[2,10,18,36,54,86],CE=[13,30,31,48,49,50,80,81,82,83,84,85,112],TE=[5,14,32,33,51,52,85],hE=[9,17,35,53,85],NE=function(A,t,e){this.structure=A,this.atomname=t,e=e||gE(t),this.element=e,this.number=Xh[e]||0,this.vdw=Vh[this.number]||2,this.covalent=Wh[this.number]||1.6};NE.prototype.getDefaultValence=function(){var A=Zh[this.number];return A?A[0]:-1},NE.prototype.getValenceList=function(){return Zh[this.number]||[]},NE.prototype.getOuterShellElectronCount=function(){return Kh[this.number]||2},NE.prototype.isMetal=function(){return this.isAlkaliMetal()||this.isAlkalineEarthMetal()||this.isLanthanide()||this.isActinide()||this.isTransitionMetal()||this.isPostTransitionMetal()},NE.prototype.isNonmetal=function(){return this.isDiatomicNonmetal()||this.isPolyatomicNonmetal()||this.isNobleGas()},NE.prototype.isMetalloid=function(){return TE.includes(this.number)},NE.prototype.isHalogen=function(){return hE.includes(this.number)},NE.prototype.isDiatomicNonmetal=function(){return uE.includes(this.number)},NE.prototype.isPolyatomicNonmetal=function(){return cE.includes(this.number)},NE.prototype.isAlkaliMetal=function(){return ME.includes(this.number)},NE.prototype.isAlkalineEarthMetal=function(){return sE.includes(this.number)},NE.prototype.isNobleGas=function(){return lE.includes(this.number)},NE.prototype.isTransitionMetal=function(){var A=this.number;return A>=21&&A<=29||A>=39&&A<=47||A>=72&&A<=79||A>=104&&A<=108},NE.prototype.isPostTransitionMetal=function(){return CE.includes(this.number)},NE.prototype.isLanthanide=function(){return this.number>=57&&this.number<=71},NE.prototype.isActinide=function(){return this.number>=89&&this.number<=103};var dE=function(A){this.structure=A,this.dict={},this.list=[],this.structure=A};dE.prototype.add=function(A,t){var e=function(A,t){return A+"|"+t}(A=A.toUpperCase(),t=t?t.toUpperCase():gE(A)),i=this.dict[e];if(void 0===i){var n=new NE(this.structure,A,t);i=this.list.length,this.dict[e]=i,this.list.push(n)}return i},dE.prototype.get=function(A){return this.list[A]};var yE=function(A,t,e,i,n,I){this.structure=A,this.bondReferenceAtomIndices=[],this.resname=t,this.atomTypeIdList=e,this.hetero=i?1:0,this.chemCompType=n,this.bonds=I,this.atomCount=e.length,this.moleculeType=this.getMoleculeType(),this.backboneType=this.getBackboneType(0),this.backboneEndType=this.getBackboneType(-1),this.backboneStartType=this.getBackboneType(1),this.backboneIndexList=this.getBackboneIndexList();var r=MN[this.backboneType],o=MN[this.backboneStartType],g=MN[this.backboneEndType],a=this.getAtomIndexByName(r.trace);this.traceAtomIndex=Hc(a,-1);var M=this.getAtomIndexByName(r.direction1);this.direction1AtomIndex=Hc(M,-1);var s=this.getAtomIndexByName(r.direction2);this.direction2AtomIndex=Hc(s,-1);var c=this.getAtomIndexByName(o.backboneStart);this.backboneStartAtomIndex=Hc(c,-1);var u,l=this.getAtomIndexByName(g.backboneEnd);this.backboneEndAtomIndex=Hc(l,-1),u=iN.includes(t)?this.getAtomIndexByName("N1"):this.getAtomIndexByName("N3"),this.rungEndAtomIndex=Hc(u,-1)};yE.prototype.getBackboneIndexList=function(){var A,t=[];switch(this.moleculeType){case 3:A=gN;break;case 4:case 5:A=aN;break;default:return t}for(var e=this.structure.atomMap,i=this.atomTypeIdList,n=0,I=this.atomCount;n500)A.Debug&&jl.warn("more than 500 atoms, skip residue for auto-bonding",t.qualifiedName());else if(I>50)for(var s=new vy(t,!0),c=t.isCg()?1.2:2.3,u=r;u=0||BE(A,t);this.rings={atomRings:A.atomRings,rings:A.rings}},yE.prototype.isAromatic=function(A){return this.aromaticAtoms=this.getAromatic(A),1===this.aromaticAtoms[A.index-A.residueAtomOffset]},yE.prototype.calculateAromatic=function(A){var t=this,e=this.aromaticAtoms=new Uint8Array(this.atomCount),i=this.getRings().rings,n=i.map((function(e){return function(A){if(A.some((function(A){return!EE.includes(A.number)})))return!1;var t=0,e=new ad(3,A.length),i=e.data;return A.forEach((function(A){i[t+0]=A.x,i[t+1]=A.y,i[t+2]=A.z,t+=3})),new Ny(e).vecC.length()1)for(var h=0;h1)for(var d=0;d=0;y--)h[N++]=r[y];for(var E=A.rings.length,D=0;D0?I[s]!==g&&I[g]!==s&&jE(A,g,s):(i[s]=1,n[o++]=s,I[s]=g)}}}var xE=4,pE=function(A){this.structure=A,this.dict={},this.list=[]};pE.prototype.add=function(A,t,e,i,n){void 0===i&&(i="");var I=function(A,t,e,i){return void 0===i&&(i=""),A+"|"+t.join(",")+"|"+(e?1:0)+"|"+i}(A=A.toUpperCase(),t,e,i),r=this.dict[I];if(void 0===r){var o=new yE(this.structure,A,t,e,i,n);r=this.list.length,this.dict[I]=r,this.list.push(o)}return r},pE.prototype.get=function(A){return this.list[A]};var LE=function(A,t){void 0===t&&(t=0),this.structure=A,this.index=t,this.bondStore=A.bondStore,this._v12=new De,this._v13=new De,this._ap1=this.structure.getAtomProxy(),this._ap2=this.structure.getAtomProxy(),this._ap3=this.structure.getAtomProxy()},fE={atom1:{configurable:!0},atom2:{configurable:!0},atomIndex1:{configurable:!0},atomIndex2:{configurable:!0},bondOrder:{configurable:!0}};fE.atom1.get=function(){return this.structure.getAtomProxy(this.atomIndex1)},fE.atom2.get=function(){return this.structure.getAtomProxy(this.atomIndex2)},fE.atomIndex1.get=function(){return this.bondStore.atomIndex1[this.index]},fE.atomIndex1.set=function(A){this.bondStore.atomIndex1[this.index]=A},fE.atomIndex2.get=function(){return this.bondStore.atomIndex2[this.index]},fE.atomIndex2.set=function(A){this.bondStore.atomIndex2[this.index]=A},fE.bondOrder.get=function(){return this.bondStore.bondOrder[this.index]},fE.bondOrder.set=function(A){this.bondStore.bondOrder[this.index]=A},LE.prototype.getOtherAtomIndex=function(A){return A===this.atomIndex1?this.atomIndex2:this.atomIndex1},LE.prototype.getOtherAtom=function(A){return this.structure.getAtomProxy(this.getOtherAtomIndex(A.index))},LE.prototype.getReferenceAtomIndex=function(){var A=this._ap1,t=this._ap2;if(A.index=this.atomIndex1,t.index=this.atomIndex2,A.residueIndex===t.residueIndex){var e=A.index-A.residueAtomOffset,i=t.index-t.residueAtomOffset,n=A.residueType.getBondReferenceAtomIndex(e,i);if(void 0!==n)return n+A.residueAtomOffset;console.warn("No reference atom found",A.index,t.index)}},LE.prototype.calculateShiftDir=function(A){void 0===A&&(A=new De);var t=this._ap1,e=this._ap2,i=this._ap3,n=this._v12,I=this._v13;t.index=this.atomIndex1,e.index=this.atomIndex2;var r=this.getReferenceAtomIndex();n.subVectors(t,e).normalize(),void 0!==r?(i.index=r,I.subVectors(t,i)):I.copy(t),I.normalize();var o=n.dot(I);return 1-Math.abs(o)<1e-5&&(I.set(1,0,0),o=n.dot(I),1-Math.abs(o)<1e-5&&(I.set(0,1,0),o=n.dot(I))),A.copy(I.sub(n.multiplyScalar(o))).normalize()},LE.prototype.qualifiedName=function(){return this.atomIndex1+"="+this.atomIndex2},LE.prototype.clone=function(){return new LE(this.structure,this.index)},LE.prototype.toObject=function(){return{atomIndex1:this.atomIndex1,atomIndex2:this.atomIndex2,bondOrder:this.bondOrder}},Object.defineProperties(LE.prototype,fE);var zE=function(A,t){void 0===t&&(t=0),this.structure=A,this.index=t,this.chainStore=A.chainStore,this.residueStore=A.residueStore,this.atomStore=A.atomStore,this.residueMap=A.residueMap,this.atomMap=A.atomMap},wE={entity:{configurable:!0},entityIndex:{configurable:!0},chain:{configurable:!0},chainIndex:{configurable:!0},atomOffset:{configurable:!0},atomCount:{configurable:!0},atomEnd:{configurable:!0},modelIndex:{configurable:!0},chainname:{configurable:!0},chainid:{configurable:!0},resno:{configurable:!0},sstruc:{configurable:!0},inscode:{configurable:!0},residueType:{configurable:!0},resname:{configurable:!0},hetero:{configurable:!0},moleculeType:{configurable:!0},backboneType:{configurable:!0},backboneStartType:{configurable:!0},backboneEndType:{configurable:!0},traceAtomIndex:{configurable:!0},direction1AtomIndex:{configurable:!0},direction2AtomIndex:{configurable:!0},backboneStartAtomIndex:{configurable:!0},backboneEndAtomIndex:{configurable:!0},rungEndAtomIndex:{configurable:!0},x:{configurable:!0},y:{configurable:!0},z:{configurable:!0}};wE.entity.get=function(){return this.structure.entityList[this.entityIndex]},wE.entityIndex.get=function(){return this.chainStore.entityIndex[this.chainIndex]},wE.chain.get=function(){return this.structure.getChainProxy(this.chainIndex)},wE.chainIndex.get=function(){return this.residueStore.chainIndex[this.index]},wE.chainIndex.set=function(A){this.residueStore.chainIndex[this.index]=A},wE.atomOffset.get=function(){return this.residueStore.atomOffset[this.index]},wE.atomOffset.set=function(A){this.residueStore.atomOffset[this.index]=A},wE.atomCount.get=function(){return this.residueStore.atomCount[this.index]},wE.atomCount.set=function(A){this.residueStore.atomCount[this.index]=A},wE.atomEnd.get=function(){return this.atomOffset+this.atomCount-1},wE.modelIndex.get=function(){return this.chainStore.modelIndex[this.chainIndex]},wE.chainname.get=function(){return this.chainStore.getChainname(this.chainIndex)},wE.chainid.get=function(){return this.chainStore.getChainid(this.chainIndex)},wE.resno.get=function(){return this.residueStore.resno[this.index]},wE.resno.set=function(A){this.residueStore.resno[this.index]=A},wE.sstruc.get=function(){return this.residueStore.getSstruc(this.index)},wE.sstruc.set=function(A){this.residueStore.setSstruc(this.index,A)},wE.inscode.get=function(){return this.residueStore.getInscode(this.index)},wE.inscode.set=function(A){this.residueStore.setInscode(this.index,A)},wE.residueType.get=function(){return this.residueMap.get(this.residueStore.residueTypeId[this.index])},wE.resname.get=function(){return this.residueType.resname},wE.hetero.get=function(){return this.residueType.hetero},wE.moleculeType.get=function(){return this.residueType.moleculeType},wE.backboneType.get=function(){return this.residueType.backboneType},wE.backboneStartType.get=function(){return this.residueType.backboneStartType},wE.backboneEndType.get=function(){return this.residueType.backboneEndType},wE.traceAtomIndex.get=function(){return this.residueType.traceAtomIndex+this.atomOffset},wE.direction1AtomIndex.get=function(){return this.residueType.direction1AtomIndex+this.atomOffset},wE.direction2AtomIndex.get=function(){return this.residueType.direction2AtomIndex+this.atomOffset},wE.backboneStartAtomIndex.get=function(){return this.residueType.backboneStartAtomIndex+this.atomOffset},wE.backboneEndAtomIndex.get=function(){return this.residueType.backboneEndAtomIndex+this.atomOffset},wE.rungEndAtomIndex.get=function(){return this.residueType.rungEndAtomIndex+this.atomOffset},wE.x.get=function(){for(var A=0,t=this.atomOffset;t<=this.atomEnd;++t)A+=this.atomStore.x[t];return A/this.atomCount},wE.y.get=function(){for(var A=0,t=this.atomOffset;t<=this.atomEnd;++t)A+=this.atomStore.y[t];return A/this.atomCount},wE.z.get=function(){for(var A=0,t=this.atomOffset;t<=this.atomEnd;++t)A+=this.atomStore.z[t];return A/this.atomCount},zE.prototype.eachAtom=function(A,t){var e=this.atomCount,i=this.atomOffset,n=this.structure._ap,I=i+e;if(t&&t.atomOnlyTest)for(var r=t.atomOnlyTest,o=i;o0)return this.entity.isPolymer();var A=this.residueType.moleculeType;return 3===A||4===A||5===A},zE.prototype.isHetero=function(){return 1===this.residueType.hetero},zE.prototype.isWater=function(){return 1===this.residueType.moleculeType},zE.prototype.isIon=function(){return 2===this.residueType.moleculeType},zE.prototype.isSaccharide=function(){return 6===this.residueType.moleculeType},zE.prototype.isStandardAminoacid=function(){return this.residueType.isStandardAminoacid()},zE.prototype.isStandardBase=function(){return this.residueType.isStandardBase()},zE.prototype.isHelix=function(){return Jh.includes(this.sstruc)},zE.prototype.isSheet=function(){return Hh.includes(this.sstruc)},zE.prototype.isTurn=function(){return Rh.includes(this.sstruc)&&this.isProtein()},zE.prototype.getAtomType=function(A){return this.atomMap.get(this.atomStore.atomTypeId[A])},zE.prototype.getResname1=function(){return $h[this.resname.toUpperCase()]||"X"},zE.prototype.getBackboneType=function(A){switch(A){case-1:return this.residueType.backboneStartType;case 1:return this.residueType.backboneEndType;default:return this.residueType.backboneType}},zE.prototype.getAtomIndexByName=function(A){var t=this.residueType.getAtomIndexByName(A);return void 0!==t&&(t+=this.atomOffset),t},zE.prototype.hasAtomWithName=function(A){return this.residueType.hasAtomWithName(A)},zE.prototype.getAtomnameList=function(){console.warn("getAtomnameList - might be expensive");for(var A=this.atomCount,t=this.atomOffset,e=new Array(A),i=0;i=t){var i=Hc(A,this.structure.getResidueProxy());if(i.index=e,i.connectedTo(this))return i}else if(e===t-1){var n=this.chainStore.residueCount[this.chainIndex],I=Hc(A,this.structure.getResidueProxy());if(I.index=t+n-1,I.connectedTo(this))return I}},zE.prototype.getBonds=function(){return this.residueType.getBonds(this)},zE.prototype.getRings=function(){return this.residueType.getRings()},zE.prototype.getAromaticRings=function(){return this.residueType.getAromaticRings(this)},zE.prototype.qualifiedName=function(A){void 0===A&&(A=!1);var t="";return this.resname&&!A&&(t+="["+this.resname+"]"),void 0!==this.resno&&(t+=this.resno),this.inscode&&(t+="^"+this.inscode),this.chain&&(t+=":"+this.chainname),t+"/"+this.modelIndex},zE.prototype.clone=function(){return new zE(this.structure,this.index)},zE.prototype.toObject=function(){return{index:this.index,chainIndex:this.chainIndex,atomOffset:this.atomOffset,atomCount:this.atomCount,resno:this.resno,resname:this.resname,sstruc:this.sstruc}},Object.defineProperties(zE.prototype,wE);var mE=function(A,t,e){this.structure=A,this.residueIndexStart=t,this.residueIndexEnd=e,this.chainStore=A.chainStore,this.residueStore=A.residueStore,this.atomStore=A.atomStore,this.residueCount=e-t+1;var i=this.structure.getResidueProxy(this.residueIndexStart),n=this.structure.getResidueProxy(this.residueIndexEnd);this.isPrevConnected=void 0!==i.getPreviousConnectedResidue();var I=n.getNextConnectedResidue();this.isNextConnected=void 0!==I,this.isNextNextConnected=void 0!==I&&void 0!==I.getNextConnectedResidue(),this.isCyclic=n.connectedTo(i),this.__residueProxy=this.structure.getResidueProxy()},QE={chainIndex:{configurable:!0},modelIndex:{configurable:!0},chainname:{configurable:!0}};QE.chainIndex.get=function(){return this.residueStore.chainIndex[this.residueIndexStart]},QE.modelIndex.get=function(){return this.chainStore.modelIndex[this.chainIndex]},QE.chainname.get=function(){return this.chainStore.getChainname(this.chainIndex)},mE.prototype.isProtein=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.isProtein()},mE.prototype.isCg=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.isCg()},mE.prototype.isNucleic=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.isNucleic()},mE.prototype.getMoleculeType=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.moleculeType},mE.prototype.getBackboneType=function(A){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.getBackboneType(A)},mE.prototype.getAtomIndexByType=function(A,t){this.isCyclic?-1===A?A=this.residueCount-1:A===this.residueCount&&(A=0):(-1!==A||this.isPrevConnected||(A+=1),A!==this.residueCount||this.isNextNextConnected||(A-=1));var e,i=this.__residueProxy;switch(i.index=this.residueIndexStart+A,t){case"trace":e=i.traceAtomIndex;break;case"direction1":e=i.direction1AtomIndex;break;case"direction2":e=i.direction2AtomIndex;break;default:e=i.getAtomIndexByName(t)}return e},mE.prototype.eachAtom=function(A,t){this.eachResidue((function(e){e.eachAtom(A,t)}))},mE.prototype.eachAtomN=function(A,t,e){for(var i=this.residueCount,n=new Array(A),I=0;I1&&A(new mE(I,e,a.index)),e=i)):(C!==Uh&&a.index-e>1&&A(new mE(I,e,a.index)),e=i)}i-e>1&&this.structure.getResidueProxy(e).backboneEndType&&A(new mE(I,e,i))},SE.prototype.qualifiedName=function(){return":"+this.chainname+"/"+this.modelIndex},SE.prototype.clone=function(){return new SE(this.structure,this.index)},SE.prototype.toObject=function(){return{index:this.index,residueOffset:this.residueOffset,residueCount:this.residueCount,chainname:this.chainname}},Object.defineProperties(SE.prototype,YE);var OE=function(A,t){void 0===t&&(t=0),this.structure=A,this.index=t,this.modelStore=A.modelStore,this.chainStore=A.chainStore,this.residueStore=A.residueStore},vE={chainOffset:{configurable:!0},chainCount:{configurable:!0},residueOffset:{configurable:!0},atomOffset:{configurable:!0},chainEnd:{configurable:!0},residueEnd:{configurable:!0},atomEnd:{configurable:!0},residueCount:{configurable:!0},atomCount:{configurable:!0}};vE.chainOffset.get=function(){return this.modelStore.chainOffset[this.index]},vE.chainOffset.set=function(A){this.modelStore.chainOffset[this.index]=A},vE.chainCount.get=function(){return this.modelStore.chainCount[this.index]},vE.chainCount.set=function(A){this.modelStore.chainCount[this.index]=A},vE.residueOffset.get=function(){return this.chainStore.residueOffset[this.chainOffset]},vE.atomOffset.get=function(){return this.residueStore.atomOffset[this.residueOffset]},vE.chainEnd.get=function(){return this.chainOffset+this.chainCount-1},vE.residueEnd.get=function(){return this.chainStore.residueOffset[this.chainEnd]+this.chainStore.residueCount[this.chainEnd]-1},vE.atomEnd.get=function(){return this.residueStore.atomOffset[this.residueEnd]+this.residueStore.atomCount[this.residueEnd]-1},vE.residueCount.get=function(){return 0===this.chainCount?0:this.residueEnd-this.residueOffset+1},vE.atomCount.get=function(){return 0===this.residueCount?0:this.atomEnd-this.atomOffset+1},OE.prototype.eachAtom=function(A,t){this.eachChain((function(e){e.eachAtom(A,t)}),t)},OE.prototype.eachResidue=function(A,t){this.eachChain((function(e){e.eachResidue(A,t)}),t)},OE.prototype.eachPolymer=function(A,t){if(t&&t.chainOnlyTest){var e=t.chainOnlyTest;this.eachChain((function(i){e(i)&&i.eachPolymer(A,t)}))}else this.eachChain((function(e){e.eachPolymer(A,t)}))},OE.prototype.eachChain=function(A,t){var e=this.chainCount,i=this.chainOffset,n=this.structure._cp,I=i+e;if(t&&t.test){var r=t.chainOnlyTest;if(r)for(var o=i;o1){var t=e.atomRadius(l);D=t*a/(.5*y),c.calculateShiftDir(S),g?(E=2*M*t,S.multiplyScalar(E),S.negate(),Q.subVectors(C,l).multiplyScalar(Math.max(.1,E/1.88)),l.positionToArray(j,N),C.positionToArray(B,N),y>=2&&(m.addVectors(l,S).add(Q).toArray(j,N+3),m.addVectors(C,S).sub(Q).toArray(B,N+3),y>=3&&(m.subVectors(l,S).add(Q).toArray(j,N+6),m.subVectors(C,S).sub(Q).toArray(B,N+6)))):(E=(M-a)*t,S.multiplyScalar(E),2===y?(m.addVectors(l,S).toArray(j,N),m.subVectors(l,S).toArray(j,N+3),m.addVectors(C,S).toArray(B,N),m.subVectors(C,S).toArray(B,N+3)):3===y?(l.positionToArray(j,N),m.addVectors(l,S).toArray(j,N+3),m.subVectors(l,S).toArray(j,N+6),C.positionToArray(B,N),m.addVectors(C,S).toArray(B,N+3),m.subVectors(C,S).toArray(B,N+6)):(l.positionToArray(j,N),C.positionToArray(B,N)))}else l.positionToArray(j,N),C.positionToArray(B,N);if(x&&p&&(i.bondColorToArray(c,1,x,N),i.bondColorToArray(c,0,p,N),o&&y>1))for(h=1;h1))for(h=1;h1))for(D=f[w]*a/(g?1:.5*y),h=g?1:0;h1))for(D=z[w]*a/(g?1:.5*y),h=g?1:0;hr&&(r=t),e>o&&(o=e),a>g&&(g=a)}),t),e.min.set(i,n,I),e.max.set(r,o,g),A.Debug&&jl.timeEnd("getBoundingBox"),e},UE.prototype.getPrincipalAxes=function(t){A.Debug&&jl.time("getPrincipalAxes");var e=0,i=new ad(3,this.atomCount),n=i.data;return this.eachAtom((function(A){n[e+0]=A.x,n[e+1]=A.y,n[e+2]=A.z,e+=3}),t),A.Debug&&jl.timeEnd("getPrincipalAxes"),new Ny(i)},UE.prototype.atomCenter=function(A){return A?this.getBoundingBox(A).getCenter(new De):this.center.clone()},UE.prototype.hasCoords=function(){if(void 0===this._hasCoords){var A=this.atomStore;this._hasCoords=0!==BC(A.x)||0!==jC(A.x)||0!==BC(A.y)||0!==jC(A.y)||0!==BC(A.z)||0!==jC(A.z)||A.count/this.modelStore.count==1}return this._hasCoords},UE.prototype.getSequence=function(A){var t=[],e=this.getResidueProxy();return this.eachAtom((function(A){e.index=A.residueIndex,A.index===e.traceAtomIndex&&t.push(e.getResname1())}),A),t},UE.prototype.getAtomIndices=function(A){if(A&&A.string){var t=[];return this.eachAtom((function(A){t.push(A.index)}),A),new Uint32Array(t)}return this.getAtomData({what:{index:!0}}).index},UE.prototype.getChainnameCount=function(A){var t=new Set;return this.eachChain((function(A){A.residueCount&&t.add(A.chainname)}),A),t.size},UE.prototype.updatePosition=function(A){var t=0;this.eachAtom((function(e){e.positionFromArray(A,t),t+=3}),void 0),this._hasCoords=void 0},UE.prototype.refreshPosition=function(){this.getBoundingBox(void 0,this.boundingBox),this.boundingBox.getCenter(this.center),this.spatialHash=new Lh(this.atomStore,this.boundingBox)},UE.prototype.dispose=function(){this.frames&&(this.frames.length=0),this.boxes&&(this.boxes.length=0),this.bondStore.dispose(),this.backboneBondStore.dispose(),this.rungBondStore.dispose(),this.atomStore.dispose(),this.residueStore.dispose(),this.chainStore.dispose(),this.modelStore.dispose(),delete this.bondSet,delete this.atomSet},Object.defineProperties(UE.prototype,bE);var PE=new ai,kE=[yh,Th,Eh,dh,Dh,hh,Ch,Nh,Bh,jh,xh,ph],GE={aspectRatio:1.5,sphereDetail:2,radialSegments:50,disableImpostor:!1,openEnded:!1,dashedCylinder:!1,labelParams:{},pointSize:2,sizeAttenuation:!1,useTexture:!0,linewidth:2},FE=function(A,t){var e=this;void 0===A&&(A="shape"),void 0===t&&(t={}),this.boundingBox=new ai,this.bufferList=[],this.meshCount=0,this._primitiveData={},this.name=A,this.parameters=Rc(t,GE),kE.forEach((function(A){Object.keys(A.fields).forEach((function(t){e._primitiveData[A.getShapeKey(t)]=[]})),e._primitiveData[A.getShapeKey("name")]=[]}))},JE={center:{configurable:!0},type:{configurable:!0}};FE.prototype.addBuffer=function(A){this.bufferList.push(A);var t=A.geometry;return t.boundingBox||t.computeBoundingBox(),this.boundingBox.union(t.boundingBox),this},FE.prototype.addMesh=function(A,t,e,i,n){var I;A=au(A),t=au(t),Array.isArray(e)&&(e=iu(e,A.length)),i&&(i=au(i)),I=void 0===i||0==i.length?{position:A,color:t,index:e}:{position:A,color:t,index:e,normal:i};var r=new KN(this,Object.assign({serial:this.meshCount,name:n},I)),o=new Fd(Object.assign({picking:r},I));return this.bufferList.push(o),PE.setFromArray(A),this.boundingBox.union(PE),this.meshCount+=1,this},FE.prototype.addSphere=function(A,t,e,i){return Ch.objectToShape(this,{position:A,color:t,radius:e,name:i}),this},FE.prototype.addEllipsoid=function(A,t,e,i,n,I){return Dh.objectToShape(this,{position:A,color:t,radius:e,majorAxis:i,minorAxis:n,name:I}),this},FE.prototype.addTorus=function(A,t,e,i,n,I){return jh.objectToShape(this,{position:A,color:t,radius:e,majorAxis:i,minorAxis:n,name:I}),this},FE.prototype.addCylinder=function(A,t,e,i,n){return dh.objectToShape(this,{position1:A,position2:t,color:e,radius:i,name:n}),this},FE.prototype.addCone=function(A,t,e,i,n){return Eh.objectToShape(this,{position1:A,position2:t,color:e,radius:i,name:n}),this},FE.prototype.addArrow=function(A,t,e,i,n){return yh.objectToShape(this,{position1:A,position2:t,color:e,radius:i,name:n}),this},FE.prototype.addBox=function(A,t,e,i,n,I){return Th.objectToShape(this,{position:A,color:t,size:e,heightAxis:i,depthAxis:n,name:I}),this},FE.prototype.addOctahedron=function(A,t,e,i,n,I){return hh.objectToShape(this,{position:A,color:t,size:e,heightAxis:i,depthAxis:n,name:I}),this},FE.prototype.addTetrahedron=function(A,t,e,i,n,I){return Nh.objectToShape(this,{position:A,color:t,size:e,heightAxis:i,depthAxis:n,name:I}),this},FE.prototype.addText=function(A,t,e,i){return Bh.objectToShape(this,{position:A,color:t,size:e,text:i}),this},FE.prototype.addPoint=function(A,t,e){return xh.objectToShape(this,{position:A,color:t,name:e}),this},FE.prototype.addWideline=function(A,t,e,i,n){return this.parameters.linewidth=i,ph.objectToShape(this,{position1:A,position2:t,color:e,name:n}),this},FE.prototype.addLabel=function(A,t,e,i){return console.warn("Shape.addLabel is deprecated, use .addText instead"),this.addText(A,t,e,i)},FE.prototype.getBufferList=function(){var A=this,t=[];return kE.forEach((function(e){A._primitiveData[e.getShapeKey("color")].length&&t.push(e.bufferFromShape(A,A.parameters))})),this.bufferList.concat(t)},FE.prototype.dispose=function(){var A=this;this.bufferList.forEach((function(A){A.dispose()})),this.bufferList.length=0,kE.forEach((function(t){Object.keys(t.fields).forEach((function(e){A._primitiveData[t.getShapeKey(e)].length=0})),A._primitiveData[t.getShapeKey("name")].length=0}))},JE.center.get=function(){return this._center||(this._center=this.boundingBox.getCenter(new De)),this._center},JE.type.get=function(){return"Shape"},Object.defineProperties(FE.prototype,JE);var HE=function(A){function t(t,e,i){Array.isArray(t)||(t=[t]),A.call(this,t,e,i),this.type="buffer",this.parameters=Object.assign({},this.parameters,{colorScheme:null,colorScale:null,colorValue:null,colorDomain:null,colorMode:null}),this.buffer=t,this.init(i)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.init=function(t){A.prototype.init.call(this,t),this.build()},t.prototype.create=function(){this.bufferList.push.apply(this.bufferList,this.buffer)},t.prototype.attach=function(A){var t=this;this.bufferList.forEach((function(A){t.viewer.add(A),A.setParameters(t.getBufferParams())})),this.setVisibility(this.visible),A()},t}(UT),RE=new we,XE=new ce,VE=function(A){function t(t,e,i){void 0===e&&(e={}),A.call(this,function(A,t){var e,i=t.attributes.position.array,n=t.index?t.index.array:void 0,I=A.position.length/3,r=i.length/3,o=I*r,g=new Float32Array(3*o),a=new Float32Array(3*o),M=new Float32Array(3*o);return n&&(e=iu(I*n.length,o)),{position:g,color:M,index:e,normal:a,primitiveId:A.primitiveId||dC(I,r),picking:A.picking}}(t,i),e),this.updateNormals=!1;var n=i.attributes.position.array,I=i.attributes.normal.array,r=i.index?i.index.array:void 0;this.geoPosition=n,this.geoNormal=I,this.geoIndex=r,this.positionCount=t.position.length/3,this.geoPositionCount=n.length/3,this.transformedGeoPosition=new Float32Array(3*this.geoPositionCount),this.transformedGeoNormal=new Float32Array(3*this.geoPositionCount);var o=this.geometry.attributes;if(this.meshPosition=o.position.array,this.meshColor=o.color.array,this.meshNormal=o.normal.array,this.setAttributes(t),r){var g=this.geometry.getIndex();if(!g)return void jl.error("Index is null");this.meshIndex=g.array,this.makeIndex()}}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.setAttributes=function(A,t){void 0===A&&(A={}),void 0===t&&(t=!1);var e,i,n,I,r,o,g,a,M,s=this.geometry.attributes,c=this.updateNormals;A.position&&(e=A.position,n=this.geoPosition,g=this.meshPosition,r=this.transformedGeoPosition,s.position.needsUpdate=!0,(c||t)&&(I=this.geoNormal,M=this.meshNormal,o=this.transformedGeoNormal,s.normal.needsUpdate=!0)),A.color&&(i=A.color,a=this.meshColor,s.color.needsUpdate=!0);for(var u=this.positionCount,l=this.geoPositionCount,C=0;C 0.0 ){\ncameraPos = rayDirection * posT + rayOrigin;\ninterior = true;\nflag2 = true;\n}\n#else\nif( calcDepth( cameraPos ) <= 0.0 ){\ncameraPos = rayDirection * posT + rayOrigin;\ninterior = true;\n}\n#endif\ncameraNormal = normalize( cameraPos - cameraSpherePos );\ncameraNormal *= float(!interior) * 2.0 - 1.0;\nreturn !interior;\n}\nvoid main(void){\nbool flag = Impostor( cameraPos, cameraNormal );\n#ifdef NEAR_CLIP\nif( calcClip( cameraPos ) > 0.0 )\ndiscard;\n#endif\ngl_FragDepthEXT = calcDepth( cameraPos );\nif( !flag ){\n#ifdef NEAR_CLIP\nif( flag2 ){\ngl_FragDepthEXT = max( 0.0, calcDepth( vec3( - ( clipNear - 0.5 ) ) ) + ( 0.0000001 / vRadius ) );\n}else if( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\n}\n#else\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\n}\n#endif\n}\nif (gl_FragDepthEXT < 0.0)\ndiscard;\nif (gl_FragDepthEXT > 1.0)\ndiscard;\n#ifdef PICKING\nif( opacity < 0.3 )\ndiscard;\ngl_FragColor = vec4( vPickingColor, objectId );\n#else\nvec3 vNormal = cameraNormal;\nvec3 vViewPosition = -cameraPos;\nvec4 diffuseColor = vec4( diffuse, opacity );\nReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\nvec3 totalEmissiveLight = emissive;\n#include color_fragment\n#include roughnessmap_fragment\n#include metalnessmap_fragment\n#include normal_fragment_begin\n#include lights_physical_fragment\n#include lights_fragment_begin\n#include lights_fragment_end\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;\nif( interior ){\n#ifdef USE_INTERIOR_COLOR\noutgoingLight.xyz = interiorColor;\n#else\n#ifdef DIFFUSE_INTERIOR\noutgoingLight.xyz = vColor;\n#endif\n#endif\noutgoingLight.xyz *= 1.0 - interiorDarkening;\n}\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n#endif\n}");var _E=function(A){function t(t,e,i){void 0===i&&(i={}),A.call(this,e,i),this.index=iu(this.indexSize,this.attributeSize),this.makeIndex(),this.initIndex(this.index),this.addAttributes({mapping:{type:t,value:null}}),this.setAttributes({primitiveId:NC(this.size)})}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={attributeSize:{configurable:!0},indexSize:{configurable:!0}};return e.attributeSize.get=function(){return this.size*this.mappingSize},e.indexSize.get=function(){return this.size*this.mappingIndicesSize},t.prototype.addAttributes=function(t){var e={};for(var i in t){var n=t[i];e[i]={type:n.type,value:null}}A.prototype.addAttributes.call(this,e)},t.prototype.getAttributeIndex=function(A){return 3*A*this.mappingSize},t.prototype.setAttributes=function(A){A&&!A.position&&A.position1&&A.position2&&(A.position=lC(A.position1,A.position2));var t,e,i,n,I,r,o,g=this.size,a=this.mappingSize,M=this.geometry.attributes;for(var s in A)if("index"!==s&&"picking"!==s){e=A[s],i=(t=M[s]).itemSize,n=t.array;for(var c=0;c0&&this.parameters.alphaTest<=1&&(e.ALPHATEST=this.parameters.alphaTest.toPrecision(2)),e},t.prototype.setUniforms=function(t){t&&void 0!==t.edgeBleach&&(this.makeTexture(),t.map=this.tex),A.prototype.setUniforms.call(this,t)},t.prototype.dispose=function(){A.prototype.dispose.call(this),this.tex&&this.tex.dispose()},Object.defineProperties(t.prototype,e),t}(kd);Yl.add("point",ID);var rD=function(A){function t(t,e,i){A.call(this,t,e,i),this.type="dot",this.parameters=Object.assign({thresholdType:{type:"select",rebuild:!0,options:{value:"value",sigma:"sigma"}},thresholdMin:{type:"number",precision:3,max:1/0,min:-1/0,rebuild:!0},thresholdMax:{type:"number",precision:3,max:1/0,min:-1/0,rebuild:!0},thresholdOut:{type:"boolean",rebuild:!0},dotType:{type:"select",rebuild:!0,options:{"":"",sphere:"sphere",point:"point"}},radiusType:{type:"select",options:{"":"",value:"value","abs-value":"abs-value","value-min":"value-min",deviation:"deviation",size:"size"}},radius:{type:"number",precision:3,max:10,min:.001,property:"size"},scale:{type:"number",precision:3,max:10,min:.001},sphereDetail:!0,disableImpostor:!0,pointSize:{type:"number",precision:1,max:100,min:0,buffer:!0},sizeAttenuation:{type:"boolean",buffer:!0},sortParticles:{type:"boolean",rebuild:!0},useTexture:{type:"boolean",buffer:!0},alphaTest:{type:"range",step:.001,max:1,min:0,buffer:!0},forceTransparent:{type:"boolean",buffer:!0},edgeBleach:{type:"range",step:.001,max:1,min:0,buffer:!0}},this.parameters,{colorScheme:{type:"select",update:"color",options:{"":"",value:"value",uniform:"uniform",random:"random"}}}),t instanceof Sd?(this.surface=void 0,this.volume=new dy(t)):(this.surface=t,this.volume=void 0),this.init(i)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.init=function(t){var e=t||{};e.colorScheme=Hc(e.colorScheme,"uniform"),e.colorValue=Hc(e.colorValue,14540253),this.thresholdType=Hc(e.thresholdType,"sigma"),this.thresholdMin=Hc(e.thresholdMin,2),this.thresholdMax=Hc(e.thresholdMax,1/0),this.thresholdOut=Hc(e.thresholdOut,!1),this.dotType=Hc(e.dotType,"point"),this.radius=Hc(e.radius,.1),this.scale=Hc(e.scale,1),this.pointSize=Hc(e.pointSize,1),this.sizeAttenuation=Hc(e.sizeAttenuation,!0),this.sortParticles=Hc(e.sortParticles,!1),this.useTexture=Hc(e.useTexture,!1),this.alphaTest=Hc(e.alphaTest,.5),this.forceTransparent=Hc(e.forceTransparent,!1),this.edgeBleach=Hc(e.edgeBleach,0),A.prototype.init.call(this,e),this.build()},t.prototype.attach=function(A){var t=this;this.bufferList.forEach((function(A){t.viewer.add(A)})),this.setVisibility(this.visible),A()},t.prototype.create=function(){var A={};if(this.volume){var t,e,i=this.volume;"sigma"===this.thresholdType?(t=i.getValueForSigma(this.thresholdMin),e=i.getValueForSigma(this.thresholdMax)):(t=this.thresholdMin,e=this.thresholdMax),i.setFilter(t,e,this.thresholdOut),Object.assign(A,{position:i.getDataPosition(),color:i.getDataColor(this.getColorParams())}),"sphere"===this.dotType&&Object.assign(A,{radius:i.getDataSize(this.radius,this.scale),picking:i.getDataPicking()})}else{var n=this.surface;Object.assign(A,{position:n.getPosition(),color:n.getColor(this.getColorParams())}),"sphere"===this.dotType&&Object.assign(A,{radius:n.getSize(this.radius,this.scale),picking:n.getPicking()})}"sphere"===this.dotType?this.dotBuffer=new eD(A,this.getBufferParams({sphereDetail:this.sphereDetail,disableImpostor:this.disableImpostor,dullInterior:!1})):this.dotBuffer=new ID(A,this.getBufferParams({pointSize:this.pointSize,sizeAttenuation:this.sizeAttenuation,sortParticles:this.sortParticles,useTexture:this.useTexture,alphaTest:this.alphaTest,forceTransparent:this.forceTransparent,edgeBleach:this.edgeBleach})),this.bufferList.push(this.dotBuffer)},t.prototype.update=function(A){if(void 0===A&&(A={}),0!==this.bufferList.length){var t={};A.color&&(this.volume?Object.assign(t,{color:this.volume.getDataColor(this.getColorParams())}):Object.assign(t,{color:this.surface.getColor(this.getColorParams())})),"sphere"===this.dotType&&(A.radius||A.scale)&&(this.volume?Object.assign(t,{radius:this.volume.getDataSize(this.radius,this.scale)}):Object.assign(t,{radius:this.surface.getSize(this.radius,this.scale)})),this.dotBuffer.setAttributes(t)}},t.prototype.setParameters=function(t,e,i){return void 0===e&&(e={}),t&&void 0!==t.thresholdType&&this.volume instanceof Sd&&("value"===this.thresholdType&&"sigma"===t.thresholdType?(this.thresholdMin=this.volume.getSigmaForValue(this.thresholdMin),this.thresholdMax=this.volume.getSigmaForValue(this.thresholdMax)):"sigma"===this.thresholdType&&"value"===t.thresholdType&&(this.thresholdMin=this.volume.getValueForSigma(this.thresholdMin),this.thresholdMax=this.volume.getValueForSigma(this.thresholdMax)),this.thresholdType=t.thresholdType),t&&void 0!==t.radiusType&&("radius"===t.radiusType?this.radius=.1:this.radius=parseFloat(t.radiusType),e.radius=!0,"sphere"!==this.dotType||El&&!this.disableImpostor||(i=!0)),t&&void 0!==t.radius&&(e.radius=!0,"sphere"!==this.dotType||El&&!this.disableImpostor||(i=!0)),t&&void 0!==t.scale&&(e.scale=!0,"sphere"!==this.dotType||El&&!this.disableImpostor||(i=!0)),A.prototype.setParameters.call(this,t,e,i),this},t}(UT);ml.add("shader/Image.vert","uniform float clipRadius;\nuniform vec3 clipCenter;\nvarying vec2 vUv;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\nvarying vec3 vViewPosition;\n#endif\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\nvoid main() {\n#include begin_vertex\n#include project_vertex\nvUv = uv;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\nvViewPosition = -mvPosition.xyz;\n#endif\n#if defined( RADIUS_CLIP )\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\n#endif\n}"),ml.add("shader/Image.frag","uniform sampler2D map;\nuniform float opacity;\nuniform vec2 mapSize;\nuniform float clipNear;\nuniform float clipRadius;\nvarying vec2 vUv;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\nvarying vec3 vViewPosition;\n#endif\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#if defined( PICKING )\nuniform sampler2D pickingMap;\nuniform float objectId;\n#else\n#include fog_pars_fragment\n#endif\n#if defined( CUBIC_INTERPOLATION )\n#if defined( CATMULROM_FILTER ) || defined( MITCHELL_FILTER )\n#if defined( CATMULROM_FILTER )\nconst float B = 0.0;\nconst float C = 0.5;\n#elif defined( MITCHELL_FILTER )\nconst float B = 0.333;\nconst float C = 0.333;\n#endif\nfloat filter( float x ){\nfloat f = x;\nif( f < 0.0 ){\nf = -f;\n}\nif( f < 1.0 ){\nreturn ( ( 12.0 - 9.0 * B - 6.0 * C ) * ( f * f * f ) +\n( -18.0 + 12.0 * B + 6.0 *C ) * ( f * f ) +\n( 6.0 - 2.0 * B ) ) / 6.0;\n}else if( f >= 1.0 && f < 2.0 ){\nreturn ( ( -B - 6.0 * C ) * ( f * f * f )\n+ ( 6.0 * B + 30.0 * C ) * ( f *f ) +\n( - ( 12.0 * B ) - 48.0 * C ) * f +\n8.0 * B + 24.0 * C ) / 6.0;\n}else{\nreturn 0.0;\n}\n}\n#elif defined( BSPLINE_FILTER )\nfloat filter( float x ){\nfloat f = x;\nif( f < 0.0 ){\nf = -f;\n}\nif( f >= 0.0 && f <= 1.0 ){\nreturn ( 2.0 / 3.0 ) + ( 0.5 ) * ( f * f * f ) - ( f * f );\n}else if( f > 1.0 && f <= 2.0 ){\nreturn 1.0 / 6.0 * pow( ( 2.0 - f ), 3.0 );\n}\nreturn 1.0;\n}\n#else\nfloat filter( float x ){\nreturn 1.0;\n}\n#endif\nvec4 biCubic( sampler2D tex, vec2 texCoord ){\nvec2 texelSize = 1.0 / mapSize;\ntexCoord -= texelSize / 2.0;\nvec4 nSum = vec4( 0.0 );\nfloat nDenom = 0.0;\nvec2 cell = fract( texCoord * mapSize );\nfor( float m = -1.0; m <= 2.0; ++m ){\nfor( float n = -1.0; n <= 2.0; ++n ){\nvec4 vecData = texture2D(\ntex, texCoord + texelSize * vec2( m, n )\n);\nfloat c = filter( m - cell.x ) * filter( -n + cell.y );\nnSum += vecData * c;\nnDenom += c;\n}\n}\nreturn nSum / nDenom;\n}\n#endif\nvoid main(){\n#include nearclip_fragment\n#include radiusclip_fragment\n#if defined( CUBIC_INTERPOLATION )\ngl_FragColor = biCubic( map, vUv );\n#else\ngl_FragColor = texture2D( map, vUv );\n#endif\n#if defined( PICKING )\nif( gl_FragColor.a < 0.3 )\ndiscard;\ngl_FragColor = vec4( texture2D( pickingMap, vUv ).xyz, objectId );\n#else\nif( gl_FragColor.a < 0.01 )\ndiscard;\ngl_FragColor.a *= opacity;\n#include fog_fragment\n#endif\n}");var oD=new Uint16Array([0,1,2,1,3,2]),gD=new Float32Array([0,1,0,0,1,1,1,0]),aD=Object.assign({filter:"nearest",forceTransparent:!0},bd),MD=Object.assign({filter:{updateShader:!0,uniform:!0}},Pd),sD=function(A){function t(t,e){A.call(this,{position:t.position,index:oD,picking:t.picking},e),this.parameterTypes=MD,this.alwaysTransparent=!0,this.hasWireframe=!1,this.vertexShader="Image.vert",this.fragmentShader="Image.frag";var i=t.imageData,n=t.width,I=t.height,r=new AI(i,n,I);r.flipY=!0,this.tex=r;for(var o=i.length,g=new Uint8Array(o),a=0;a>16&255,g[a+1]=M>>8&255,g[a+2]=255&M}var s=new AI(g,n,I);s.flipY=!0,s.minFilter=EA,s.magFilter=EA,this.pickingTex=s,this.addUniforms({map:{value:r},pickingMap:{value:s},mapSize:{value:new se(n,I)}}),this.geometry.setAttribute("uv",new Zi(gD,2))}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={defaultParameters:{configurable:!0}};return e.defaultParameters.get=function(){return aD},t.prototype.getDefines=function(t){var e=A.prototype.getDefines.call(this,t),i=this.parameters.filter;return i.startsWith("cubic")&&(e.CUBIC_INTERPOLATION=1,i.endsWith("bspline")?e.BSPLINE_FILTER=1:i.endsWith("catmulrom")?e.CATMULROM_FILTER=1:i.endsWith("mitchell")&&(e.MITCHELL_FILTER=1)),e},t.prototype.updateTexture=function(){var A=this.tex,t=this.parameters.filter;t.startsWith("cubic")?(A.minFilter=EA,A.magFilter=EA):"linear"===t?(A.minFilter=BA,A.magFilter=BA):(A.minFilter=EA,A.magFilter=EA),A.needsUpdate=!0,this.pickingTex.needsUpdate=!0},t.prototype.makeMaterial=function(){A.prototype.makeMaterial.call(this),this.updateTexture();var t=this.material;t.uniforms.map.value=this.tex,t.blending=f,t.needsUpdate=!0;var e=this.wireframeMaterial;e.uniforms.map.value=this.tex,e.blending=f,e.needsUpdate=!0;var i=this.pickingMaterial;i.uniforms.map.value=this.tex,i.uniforms.pickingMap.value=this.pickingTex,i.blending=f,i.needsUpdate=!0},t.prototype.setUniforms=function(t){t&&void 0!==t.filter&&(this.updateTexture(),t.map=this.tex),A.prototype.setUniforms.call(this,t)},Object.defineProperties(t.prototype,e),t}(kd),cD=function(A,t){var e=t||{};this.dimension=Hc(e.dimension,"x"),this.positionType=Hc(e.positionType,"percent"),this.position=Hc(e.position,30),this.thresholdType=Hc(e.thresholdType,"sigma"),this.thresholdMin=Hc(e.thresholdMin,-1/0),this.thresholdMax=Hc(e.thresholdMax,1/0),this.normalize=Hc(e.normalize,!1),this.volume=A};cD.prototype.getPositionFromCoordinate=function(A){var t,e=this.dimension,i=this.volume,n=i.matrix,I=(new De).setFromMatrixPosition(n)[e],r=(new De).setFromMatrixScale(n)[e];return t="x"===e?i.nx:"y"===e?i.ny:i.nz,Math.round(((A-I)/(t/100)+1)/r)},cD.prototype.getData=function(A){A=A||{};var t,e=this.volume,i=e.data,n=e.matrix;function I(A){return Math.round(A/100*(t-1))}function r(A,t,i,n){return 3*(i*e.ny*e.nx+t*e.nx+A)+n}t="coordinate"===this.positionType?this.getPositionFromCoordinate(this.position):this.position;var o,g,a,M,s,c=new Float32Array(12),u=new De,l=0,C=0,T=0,h=e.nx,N=e.ny,d=e.nz;function y(A,t,e,i){u.set(A,t,e).applyMatrix4(n).toArray(c,i)}"x"===this.dimension?(a=I(e.nx),M=e.ny-1,s=e.nz-1,o=e.nz,g=e.ny,h=(l=a)+1,y(a,0,0,0),y(a,M,0,3),y(a,0,s,6),y(a,M,s,9)):"y"===this.dimension?(a=e.nx-1,M=I(e.ny),s=e.nz-1,o=e.nz,g=e.nx,N=(C=M)+1,y(0,M,0,0),y(a,M,0,3),y(0,M,s,6),y(a,M,s,9)):"z"===this.dimension&&(a=e.nx-1,M=e.ny-1,s=I(e.nz),o=e.nx,g=e.ny,d=(T=s)+1,y(0,0,s,0),y(0,M,s,3),y(a,0,s,6),y(a,M,s,9));var E,D,j=0,B=0,x=new Uint8Array(o*g*4),p=new Float32Array(o*g);"sigma"===this.thresholdType?(E=e.getValueForSigma(this.thresholdMin),D=e.getValueForSigma(this.thresholdMax)):(E=this.thresholdMin,D=this.thresholdMax);var L=Object.assign({},A.colorParams,{volume:e});this.normalize&&(L.domain=[0,1]);var f,z=Ll.getScheme(L),w=new Float32Array(3),m=z.getScale(),Q=0,S=0;if(this.normalize){Q=1/0,f=-1/0;for(var Y=C;Yf&&(f=U)}S=f-Q}for(var b=C;bE&&F0?this.list[0]:void 0},xD.prototype.forEach=function(A){return this.list.forEach(A),this},xD.prototype.dispose=function(){return this.forEach((function(A){return A.dispose()}))},Object.defineProperties(xD.prototype,pD);var LD=function(A){function t(){A.apply(this,arguments)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.setParameters=function(A){return this.forEach((function(t){return t.setParameters(A)}))},t.prototype.setVisibility=function(A){return this.forEach((function(t){return t.setVisibility(A)}))},t.prototype.setSelection=function(A){return this.forEach((function(t){return t.setSelection(A)}))},t.prototype.setColor=function(A){return this.forEach((function(t){return t.setColor(A)}))},t.prototype.update=function(A){return this.forEach((function(t){return t.update(A)}))},t.prototype.build=function(A){return this.forEach((function(t){return t.build(A)}))},t.prototype.dispose=function(A){return this.forEach((function(A){return A.dispose()}))},t}(xD),fD=Object.assign({defaultStep:1,defaultTimeout:50,defaultInterpolateType:"",defaultInterpolateStep:5,defaultMode:"loop",defaultDirection:"forward",initialFrame:0},CD),zD=function(A){function t(t,e,i){var n=this;void 0===i&&(i={}),A.call(this,t,Object.assign({name:e.name},i)),this.trajectory=e,this.signals=Object.assign(this.signals,{frameChanged:new wu.Signal,playerChanged:new wu.Signal,countChanged:new wu.Signal,parametersChanged:new wu.Signal}),e.signals.frameChanged.add((function(A){n.signals.frameChanged.dispatch(A)})),e.signals.playerChanged.add((function(A){n.signals.playerChanged.dispatch(A)})),e.signals.countChanged.add((function(A){n.signals.countChanged.dispatch(A)})),void 0!==i.initialFrame&&this.setFrame(i.initialFrame)}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={defaultParameters:{configurable:!0},type:{configurable:!0}};return e.defaultParameters.get=function(){return fD},e.type.get=function(){return"trajectory"},t.prototype.setFrame=function(A){this.trajectory.setFrame(A)},t.prototype.setParameters=function(A){void 0===A&&(A={}),this.trajectory.setParameters(A),this.signals.parametersChanged.dispatch(A)},t.prototype.dispose=function(){this.trajectory.dispose(),A.prototype.dispose.call(this)},Object.defineProperties(t.prototype,e),t}(TD),wD=function(A,t){this.name=A,this.path=t,this.coordinates=[],this.boxes=[],this.times=[],this.timeOffset=0,this.deltaTime=1},mD={type:{configurable:!0}};mD.type.get=function(){return"Frames"},Object.defineProperties(wD.prototype,mD);var QD=function(A,t){var e,i;if(this.A=new ad(3,3),this.W=new ad(1,3),this.U=new ad(3,3),this.V=new ad(3,3),this.VH=new ad(3,3),this.R=new ad(3,3),this.tmp=new ad(3,3),this.c=new ad(3,3),A instanceof UE)e=A.atomCount;else{if(!(A instanceof Float32Array))return;e=A.length/3}if(t instanceof UE)i=t.atomCount;else{if(!(t instanceof Float32Array))return;i=t.length/3}var n=Math.min(e,i),I=new ad(3,n),r=new ad(3,n);this.coords1t=new ad(n,3),this.coords2t=new ad(n,3),this.transformationMatrix=new we,this.c.data.set([1,0,0,0,1,0,0,0,-1]),this.prepCoords(A,I,n,!1),this.prepCoords(t,r,n,!1),this._superpose(I,r)};QD.prototype._superpose=function(t,e){var i,n,I,r,o,g,a,M,s,c,u,l,C,T,h,N,d,y,E,D,j;this.mean1=ud(t),this.mean2=ud(e),ld(t,this.mean1),ld(e,this.mean2),Md(this.coords1t,t),Md(this.coords2t,e),sd(this.A,this.coords2t,this.coords1t),hd(this.A,this.W,this.U,this.V),i=this.V,n=this.VH,I=i.data,r=n.data,o=I[4],g=I[8],a=I[5],M=I[7],D=1/((c=(s=I[0])*o)*g-(u=s*a)*M-(T=(l=I[3])*(C=I[1]))*g+(N=l*(h=I[2]))*M+(y=(d=I[6])*C)*a-(E=d*h)*o),r[0]=(o*g-a*M)*D,r[1]=-(C*g-h*M)*D,r[2]=-(-C*a+h*o)*D,r[3]=-(l*g-a*d)*D,r[4]=(s*g-E)*D,r[5]=-(u-N)*D,r[6]=-(-l*M+o*d)*D,r[7]=-(s*M-y)*D,r[8]=(c-T)*D,cd(this.R,this.U,this.VH),(j=this.R.data)[0]*j[4]*j[8]-j[0]*j[5]*j[7]-j[3]*j[1]*j[8]+j[3]*j[2]*j[7]+j[6]*j[1]*j[5]-j[6]*j[2]*j[4]<0&&(A.Debug&&jl.log("R not a right handed system"),cd(this.tmp,this.c,this.VH),cd(this.R,this.U,this.tmp));var B=new ad(4,4),x=new ad(4,4),p=new ad(4,4),L=new ad(4,4),f=new ad(4,4),z=new ad(4,4),w=this.R.data,m=this.mean1,Q=this.mean2;L.data.set([1,0,0,-m[0],0,1,0,-m[1],0,0,1,-m[2],0,0,0,1]),f.data.set([w[0],w[1],w[2],0,w[3],w[4],w[5],0,w[6],w[7],w[8],0,0,0,0,1]),z.data.set([1,0,0,Q[0],0,1,0,Q[1],0,0,1,Q[2],0,0,0,1]),Md(x,L),sd(B,f,x),Md(p,B),sd(x,z,p),Md(B,x),this.transformationMatrix.elements=B.data},QD.prototype.prepCoords=function(A,t,e,i){var n=0,I=t.data,r=3,o=3*e;if(i&&(o=4*e,r=4),A instanceof UE)A.eachAtom((function(A){n=e)if(this.parameters.interpolateType)if(this._currentStep>this.parameters.interpolateStep&&(this._currentStep=1),1===this._currentStep&&(this._currentFrame=this._nextInterpolated()),i.hasFrame(this._currentFrame)){this._currentStep+=1;var n=this._currentStep/(this.parameters.interpolateStep+1),I=this._currentFrame,r=I[0],o=I[1],g=I[2],a=I[3];i.setFrameInterpolated(r,o,g,a,n,this.parameters.interpolateType),this._previousTime=this._currentTime}else i.loadFrame(this._currentFrame);else{var M=this._next();i.hasFrame(M)?(i.setFrame(M),this._previousTime=this._currentTime):i.loadFrame(M)}window.requestAnimationFrame(this._animate)}},YD.prototype._next=function(){var A,t=this.parameters;return((A="forward"===this._direction?this.traj.currentFrame+t.step:this.traj.currentFrame-t.step)>t.end||A=A.end?e=A.start:"backward"===A.direction&&t<=A.start&&(e=A.end),this.traj.setFrame(e),this._run=!0,this._animate(),this.signals.startedRunning.dispatch()}},YD.prototype.pause=function(){this._run=!1,this.signals.haltedRunning.dispatch()},YD.prototype.stop=function(){this.pause(),this.traj.setFrame(this.parameters.start)},Object.defineProperties(YD.prototype,OD);var vD=function(A,t,e){var i=this;void 0===e&&(e={}),this.signals={countChanged:new wu.Signal,frameChanged:new wu.Signal,playerChanged:new wu.Signal},this.frameCache={},this.loadQueue={},this.boxCache={},this.pathCache={},this.frameCacheSize=0,this._frameCount=0,this._currentFrame=-1,this._disposed=!1,this.deltaTime=Hc(e.deltaTime,0),this.timeOffset=Hc(e.timeOffset,0),this.centerPbc=Hc(e.centerPbc,!1),this.removePbc=Hc(e.removePbc,!1),this.removePeriodicity=Hc(e.removePeriodicity,!1),this.superpose=Hc(e.superpose,!1),this.name=A.replace(/^.*[\\/]/,""),this.trajPath=A,this.selection=new il(Hc(e.sele,"backbone and not hydrogen")),this.selection.signals.stringChanged.add((function(){i.selectionIndices=i.structure.getAtomIndices(i.selection),i._resetCache(),i._saveInitialCoords(),i.setFrame(i._currentFrame)}))},UD={frameCount:{configurable:!0},currentFrame:{configurable:!0}};UD.frameCount.get=function(){return this._frameCount},UD.currentFrame.get=function(){return this._currentFrame},vD.prototype._init=function(A){this.setStructure(A),this._loadFrameCount(),this.setPlayer(new YD(this))},vD.prototype._loadFrameCount=function(){},vD.prototype.setStructure=function(A){this.structure=A,this.atomCount=A.atomCount,this.backboneIndices=this._getIndices(new il("backbone and not hydrogen")),this._makeAtomIndices(),this._saveStructureCoords(),this.selectionIndices=this._getIndices(this.selection),this._resetCache(),this._saveInitialCoords(),this.setFrame(this._currentFrame)},vD.prototype._saveInitialCoords=function(){var A=this;this.structure.hasCoords()?(this.initialCoords=new Float32Array(this.structureCoords),this._makeSuperposeCoords()):this.frameCache[0]?(this.initialCoords=new Float32Array(this.frameCache[0]),this._makeSuperposeCoords()):this.loadFrame(0,(function(){return A._saveInitialCoords()}))},vD.prototype._saveStructureCoords=function(){this.structureCoords=this.structure.getAtomData({what:{position:!0}}).position},vD.prototype.setSelection=function(A){return this.selection.setString(A),this},vD.prototype._getIndices=function(A){var t=0,e=A.test,i=[];return e&&this.structure.eachAtom((function(A){e(A)&&i.push(t),t+=1})),i},vD.prototype._makeSuperposeCoords=function(){var A=3*this.selectionIndices.length;this.coords1=new Float32Array(A),this.coords2=new Float32Array(A);for(var t=this.initialCoords,e=this.coords2,i=0;i0&&this.centerPbc){var n=[t[0],t[4],t[8]],I=function(A,t,e){return[uC(t,e[0],3,0,A),uC(t,e[1],3,1,A),uC(t,e[2],3,2,A)]}(this.backboneIndices,e,n);!function(A,t,e){if(0!==e[0]&&0!==e[8]&&0!==e[4])for(var i=A.length,n=e[0],I=e[1],r=e[2],o=-t[0]+n+n/2,g=-t[1]+I+I/2,a=-t[2]+r+r/2,M=0;M.5&&(A[n+I]-=t[3*I+I]*Math.round(r))}}(e,t,r)}this.removePbc&&function(A,t){if(0!==t[0]&&0!==t[8]&&0!==t[4])for(var e=A.length,i=3;i.9*t[3*n+n])if(I>0)for(var r=0;r<3;++r)A[i+r]-=t[3*n+r];else for(var o=0;o<3;++o)A[i+o]+=t[3*n+o]}}(e,t)}this.selectionIndices.length>0&&this.coords1&&this.superpose&&this._doSuperpose(e),this.frameCache[A]=e,this.boxCache[A]=t,this.frameCacheSize+=1},vD.prototype._setFrameCount=function(A){A!==this._frameCount&&(this._frameCount=A,this.signals.countChanged.dispatch(A))},vD.prototype.dispose=function(){this._resetCache(),this._disposed=!0,this.player&&this.player.stop()},vD.prototype.setPlayer=function(A){this.player=A,this.signals.playerChanged.dispatch(A)},vD.prototype.getFrameTime=function(A){return this.timeOffset+A*this.deltaTime},Object.defineProperties(vD.prototype,UD);var bD=function(A){function t(t,e,i){var n=i||{};n.timeOffset=Hc(n.timeOffset,t.timeOffset),n.deltaTime=Hc(n.deltaTime,t.deltaTime),A.call(this,"",e,n),this.name=t.name,this.path=t.path,this.frames=t.coordinates,this.boxes=t.boxes,this._init(e)}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={type:{configurable:!0}};return e.type.get=function(){return"frames"},t.prototype._makeAtomIndices=function(){"StructureView"===this.structure.type?this.atomIndices=this.structure.getAtomIndices():this.atomIndices=void 0},t.prototype._loadFrame=function(A,t){var e,i=this.frames[A];if(this.atomIndices){var n=this.atomIndices,I=n.length;e=new Float32Array(3*I);for(var r=0;r0&&(i="( "+t.join(" ) AND ( ")+" )"),new il(i)},e.prototype.getStructure=function(){return this.structure.getStructure()},e.prototype.eachBond=function(A,t){this.structure.eachBond(A,this.getSelection(t))},e.prototype.eachAtom=function(A,t){var e=this.getAtomProxy(),i=this.getAtomSet(t),n=this.atomStore.count;if(i.getSize()=this.V[i][n]?(t="S",this.score=this.S[i][n]):this.V[i][n]>=this.H[i][n]?(t="V",this.score=this.V[i][n]):(t="H",this.score=this.H[i][n]),A.Debug&&jl.log("Alignment: SCORE",this.score),A.Debug&&jl.log("Alignment: S, V, H",this.S[i][n],this.V[i][n],this.H[i][n]);i>0&&n>0;)"S"===t?this.S[i][n]===this.S[i-1][n-1]+e(i-1,n-1)?(this.ali1=this.seq1[i-1]+this.ali1,this.ali2=this.seq2[n-1]+this.ali2,--i,--n,t="S"):this.S[i][n]===this.V[i][n]?t="V":this.S[i][n]===this.H[i][n]?t="H":(--i,--n):"V"===t?this.V[i][n]===this.V[i-1][n]+this.gapExtensionPenalty?(this.ali1=this.seq1[i-1]+this.ali1,this.ali2="-"+this.ali2,--i,t="V"):this.V[i][n]===this.S[i-1][n]+this.gap(0)?(this.ali1=this.seq1[i-1]+this.ali1,this.ali2="-"+this.ali2,--i,t="S"):--i:"H"===t?this.H[i][n]===this.H[i][n-1]+this.gapExtensionPenalty?(this.ali1="-"+this.ali1,this.ali2=this.seq2[n-1]+this.ali2,--n,t="H"):this.H[i][n]===this.S[i][n-1]+this.gap(0)?(this.ali1="-"+this.ali1,this.ali2=this.seq2[n-1]+this.ali2,--n,t="S"):--n:jl.error("Alignment: no matrix");for(;i>0;)this.ali1=this.seq1[i-1]+this.ali1,this.ali2="-"+this.ali2,--i;for(;n>0;)this.ali1="-"+this.ali1,this.ali2=this.seq2[n-1]+this.ali2,--n;A.Debug&&jl.timeEnd("Alignment.trace"),A.Debug&&jl.log([this.ali1,this.ali2])};var VD=Object.assign({sele:"",defaultAssembly:""},DD),WD=function(A){function t(t,e,i){var n,I,r,o;void 0===i&&(i={}),A.call(this,t,e,Object.assign({name:e.name},i)),this.structure=e,this.trajList=[],this.signals=Object.assign(this.signals,{trajectoryAdded:new wu.Signal,trajectoryRemoved:new wu.Signal,defaultAssemblyChanged:new wu.Signal}),this.initSelection(this.parameters.sele),this.pickBuffer=(4,n=0,I=0,r=[],{has:function(A){return-1!==r.indexOf(A)},get:function(A){return r[A]},push:function(A){r[n]=A,n=(4+n+1)%4,++I},get count(){return I},get data(){return r.slice(0,Math.min(I,4))},clear:function(){I=0,n=0,r.length=0}}),this.pickDict=(o={},{has:function(A){return void 0!==o[JSON.stringify(A)]},add:function(A,t){o[JSON.stringify(A)]=t},del:function(A){delete o[JSON.stringify(A)]},get values(){return Object.keys(o).map((function(A){return o[A]}))}}),this.spacefillRepresentation=this.addRepresentation("spacefill",{sele:"none",opacity:Bl.opacity,color:Bl.color,disablePicking:!0,radiusType:"data"},!0),this.distanceRepresentation=this.addRepresentation("distance",Bl,!0),this.angleRepresentation=this.addRepresentation("angle",Bl,!0),this.dihedralRepresentation=this.addRepresentation("dihedral",Bl,!0),this.measureRepresentations=new LD([this.spacefillRepresentation,this.distanceRepresentation,this.angleRepresentation,this.dihedralRepresentation]),this.setDefaultAssembly(this.parameters.defaultAssembly)}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={defaultParameters:{configurable:!0},type:{configurable:!0}};return e.defaultParameters.get=function(){return VD},e.type.get=function(){return"structure"},t.prototype.initSelection=function(A){var t=this;this.selection=new il(A),this.structureView=new FD(this.structure,this.selection),this.selection.signals.stringChanged.add((function(){t.structureView.setSelection(t.selection),t.rebuildRepresentations(),t.rebuildTrajectories()}))},t.prototype.setSelection=function(A){return this.parameters.sele=A,this.selection.setString(A),this},t.prototype.setDefaultAssembly=function(A){if(void 0===this.structure.biomolDict[A]&&(A=""),this.parameters.defaultAssembly!==A){var t={defaultAssembly:A};this.reprList.forEach((function(A){return A.setParameters(t)})),this.measureRepresentations.setParameters(t),this.parameters.defaultAssembly=A,this.signals.defaultAssemblyChanged.dispatch(A)}return this},t.prototype.rebuildRepresentations=function(){this.reprList.forEach((function(A){A.build()})),this.measureRepresentations.build()},t.prototype.rebuildTrajectories=function(){var A=this;this.trajList.forEach((function(t){t.trajectory.setStructure(A.structureView)}))},t.prototype.updateRepresentations=function(t){A.prototype.updateRepresentations.call(this,t),this.measureRepresentations.update(t)},t.prototype.updateRepresentationMatrices=function(){A.prototype.updateRepresentationMatrices.call(this),this.measureRepresentations.setParameters({matrix:this.matrix})},t.prototype.addRepresentation=function(A,t,e){var i=this;void 0===t&&(t={}),void 0===e&&(e=!1),t.defaultAssembly=this.parameters.defaultAssembly;var n=this._addRepresentation(A,this.structureView,t,e);return e||n.signals.parametersChanged.add((function(){return i.measureUpdate()})),n},t.prototype.addTrajectory=function(A,t){var e=this;void 0===A&&(A=""),void 0===t&&(t={});var i=function(A,t,e){return A&&A instanceof wD?new bD(A,t,e):!A&&t.frames?new PD(A,t,e):A&&"function"==typeof A?new GD(A,t,e):new kD(A,t,e)}(A,this.structureView,t);i.signals.frameChanged.add((function(){e.updateRepresentations({position:!0})}));var n=new zD(this.stage,i,t);return this.trajList.push(n),this.signals.trajectoryAdded.dispatch(n),n},t.prototype.removeTrajectory=function(A){var t=this.trajList.indexOf(A);-1!==t&&this.trajList.splice(t,1),A.dispose(),this.signals.trajectoryRemoved.dispatch(A)},t.prototype.dispose=function(){this.trajList.slice().forEach((function(A){return A.dispose()})),this.trajList.length=0,this.structure.dispose(),this.measureRepresentations.dispose(),A.prototype.dispose.call(this)},t.prototype.autoView=function(A,t){"number"==typeof A&&(t=A,A=""),this.stage.animationControls.zoomMove(this.getCenter(A),this.getZoom(A),Hc(t,0))},t.prototype.getBoxUntransformed=function(A){return A?this.structureView.getBoundingBox(new il(A)):this.structureView.boundingBox},t.prototype.getCenterUntransformed=function(A){return A&&"string"==typeof A?this.structure.atomCenter(new il(A)):this.structure.center},t.prototype.superpose=function(A,t,e,i){return XD(this.structureView,A.structureView,t,e,i),this.updateRepresentations({position:!0}),this},t.prototype.getMaxRepresentationRadius=function(A){var t=0,e=this.structure.getAtomProxy(A);return this.eachRepresentation((function(A){if(A.getVisibility()){var i=A.repr;t=Math.max(i.getAtomRadius(e),t)}})),t},t.prototype.measurePick=function(A){var t=this.pickBuffer.count;if(this.lastPick===A.index&&t>=1){if(t>1){var e=this.pickBuffer.data,i=this.pickBuffer.data.sort();this.pickDict.has(i)?this.pickDict.del(i):this.pickDict.add(i,e),2===t?this.distanceRepresentation.setParameters({atomPair:this.pickDict.values.filter((function(A){return 2===A.length}))}):3===t?this.angleRepresentation.setParameters({atomTriple:this.pickDict.values.filter((function(A){return 3===A.length}))}):4===t&&this.dihedralRepresentation.setParameters({atomQuad:this.pickDict.values.filter((function(A){return 4===A.length}))})}this.pickBuffer.clear(),this.lastPick=void 0}else this.pickBuffer.has(A.index)||this.pickBuffer.push(A.index),this.lastPick=A.index;this.measureUpdate()},t.prototype.measureClear=function(){this.pickBuffer.clear(),this.lastPick=void 0,this.spacefillRepresentation.setSelection("none")},t.prototype.measureBuild=function(){var A=this.measureData();this.distanceRepresentation.setParameters({atomPair:A.distance}),this.angleRepresentation.setParameters({atomTriple:A.angle}),this.dihedralRepresentation.setParameters({atomQuad:A.dihedral})},t.prototype.measureUpdate=function(){var A=this,t=this.pickBuffer.data,e={};t.forEach((function(t){var i=Math.max(.1,A.getMaxRepresentationRadius(t));e[t]=i*(2.3-yu(.1,2,i))})),this.spacefillRepresentation.setSelection(t.length?"@"+t.join(","):"none"),t.length&&this.spacefillRepresentation.setParameters({radiusData:e})},t.prototype.measureData=function(){var A=this.pickDict.values;return{distance:A.filter((function(A){return 2===A.length})),angle:A.filter((function(A){return 3===A.length})),dihedral:A.filter((function(A){return 4===A.length}))}},t.prototype.removeAllMeasurements=function(A){var t=this.pickDict,e=t.values,i=function(A){e.filter((function(t){return t.length===A})).forEach((function(A){return t.del(A.slice().sort())}))};(!A||1&A)&&i(2),(!A||2&A)&&i(3),(!A||4&A)&&i(4),this.measureBuild()},t.prototype.removeMeasurement=function(A){this.pickDict.del(A.slice().sort()),this.measureBuild()},t.prototype.addMeasurement=function(A){if(!(A.length<2||A.length>4)){var t=A.slice().sort();this.pickDict.has(t)||this.pickDict.add(t,A),this.measureBuild()}},Object.defineProperties(t.prototype,e),t}(jD);Sl.add("structure",WD),Sl.add("structureview",WD);var ZD=function(A){function t(t,e,i){void 0===i&&(i={}),A.call(this,t,e,Object.assign({name:e.name},i)),this.surface=e}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={type:{configurable:!0}};return e.type.get=function(){return"surface"},t.prototype.addRepresentation=function(A,t){return void 0===t&&(t={}),this._addRepresentation(A,this.surface,t)},t.prototype.getBoxUntransformed=function(){return this.surface.boundingBox},t.prototype.getCenterUntransformed=function(){return this.surface.center},t.prototype.dispose=function(){this.surface.dispose(),A.prototype.dispose.call(this)},Object.defineProperties(t.prototype,e),t}(jD);Sl.add("surface",ZD);var KD=function(A){function t(t,e,i){void 0===i&&(i={}),A.call(this,t,e,Object.assign({name:e.name},i)),this.volume=e}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={type:{configurable:!0}};return e.type.get=function(){return"volume"},t.prototype.addRepresentation=function(A,t){return void 0===t&&(t={}),this._addRepresentation(A,this.volume,t)},t.prototype.getBoxUntransformed=function(){return this.volume.boundingBox},t.prototype.getCenterUntransformed=function(){return this.volume.center},t.prototype.dispose=function(){this.volume.dispose(),A.prototype.dispose.call(this)},Object.defineProperties(t.prototype,e),t}(jD);Sl.add("volume",KD);var _D=function(A){function t(){A.apply(this,arguments)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.addRepresentation=function(A,t){return this.forEach((function(e){return e.addRepresentation(A,t)}))},t.prototype.autoView=function(A){return this.forEach((function(t){return t.autoView(A)}))},t}(xD);function qD(A,t){return A instanceof RegExp?null!==t.name.match(A):t.name===A}var $D=new De,Aj={impostor:!0,quality:"medium",workerDefault:!0,sampleLevel:0,backgroundColor:"black",rotateSpeed:2,zoomSpeed:1.2,panSpeed:1,clipNear:0,clipFar:100,clipDist:10,clipMode:"scene",clipScale:"relative",fogNear:50,fogFar:100,cameraFov:40,cameraEyeSep:.3,cameraType:"perspective",lightColor:14540253,lightIntensity:1,ambientColor:14540253,ambientIntensity:.2,hoverTimeout:0,tooltip:!0,mousePreset:"default"},tj=function(A,t){void 0===t&&(t={}),this.signals={parametersChanged:new wu.Signal,fullscreenChanged:new wu.Signal,componentAdded:new wu.Signal,componentRemoved:new wu.Signal,clicked:new wu.Signal,hovered:new wu.Signal},this.tasks=new $l,this.compList=[],this.defaultFileParams={},this.logList=[],this.viewer=new RC(A),this.viewer.renderer&&(this.tooltip=document.createElement("div"),Object.assign(this.tooltip.style,{display:"none",position:"fixed",zIndex:"1000000",pointerEvents:"none",backgroundColor:"rgba( 0, 0, 0, 0.6 )",color:"lightgrey",padding:"8px",fontFamily:"sans-serif"}),this.viewer.container.appendChild(this.tooltip),this.mouseObserver=new WC(this.viewer.renderer.domElement),this.viewerControls=new ET(this),this.trackballControls=new oT(this),this.pickingControls=new cT(this),this.animationControls=new YT(this),this.mouseControls=new $d(this),this.keyControls=new ey(this),this.pickingBehavior=new iy(this),this.mouseBehavior=new ny(this),this.animationBehavior=new Iy(this),this.keyBehavior=new oy(this),this.spinAnimation=this.animationControls.spin([0,1,0],.005),this.spinAnimation.pause(!0),this.rockAnimation=this.animationControls.rock([0,1,0],.005),this.rockAnimation.pause(!0),this.parameters=Rc(t,Aj),this.setParameters(this.parameters),this.viewer.animate())};tj.prototype.setParameters=function(A){void 0===A&&(A={}),Xc(this.parameters,A);var t=A,e=this.parameters,i=this.viewer,n=this.trackballControls;return void 0!==t.quality&&this.setQuality(e.quality),void 0!==t.impostor&&this.setImpostor(e.impostor),void 0!==t.rotateSpeed&&(n.rotateSpeed=e.rotateSpeed),void 0!==t.zoomSpeed&&(n.zoomSpeed=e.zoomSpeed),void 0!==t.panSpeed&&(n.panSpeed=e.panSpeed),void 0!==t.mousePreset&&this.mouseControls.preset(e.mousePreset),this.mouseObserver.setParameters({hoverTimeout:e.hoverTimeout}),i.setClip(e.clipNear,e.clipFar,e.clipDist,e.clipMode,e.clipScale),i.setFog(void 0,e.fogNear,e.fogFar),i.setCamera(e.cameraType,e.cameraFov,e.cameraEyeSep),i.setSampling(e.sampleLevel),i.setBackground(e.backgroundColor),i.setLight(e.lightColor,e.lightIntensity,e.ambientColor,e.ambientIntensity),this.signals.parametersChanged.dispatch(this.getParameters()),this},tj.prototype.log=function(A){console.log("STAGE LOG",A),this.logList.push(A)},tj.prototype.getParameters=function(){return Object.assign({},this.parameters)},tj.prototype.defaultFileRepresentation=function(t){if(t instanceof WD){var e,i,n;t.setSelection("/0");var I=t.structure;if(I.biomolDict.BU1){var r=I.biomolDict.BU1;e=r.getAtomCount(I),i=r.getResidueCount(I),n=r.getInstanceCount(),t.setDefaultAssembly("BU1")}else e=I.getModelProxy(0).atomCount,i=I.getModelProxy(0).residueCount,n=1;var o=e;Nl&&(o*=4);var g=I.atomStore.count/I.residueStore.count<2;g&&(o*=10);var a="chainname",M="RdYlBu",s=!1;if(1===I.getChainnameCount(new il("polymer and /0"))&&(a="residueindex",M="Spectral",s=!0),A.Debug&&console.log(o,e,n,g),i/n<4)t.addRepresentation("ball+stick",{colorScheme:"element",radiusScale:2,aspectRatio:1.5,bondScale:.3,bondSpacing:.75,quality:"auto"});else if(n>5&&o>15e3||o>7e5){var c=Math.min(2,Math.max(.1,6e3/(o/n)));g&&(c=Math.min(c,.5)),t.addRepresentation("surface",{colorScheme:a,colorScale:M,colorReverse:s,sele:"polymer",surfaceType:"av",probeRadius:1.4,scaleFactor:c,useWorker:!1})}else o>25e4?t.addRepresentation("backbone",{colorScheme:a,colorScale:M,colorReverse:s,lineOnly:!0}):o>1e5?t.addRepresentation("backbone",{colorScheme:a,colorScale:M,colorReverse:s,quality:"low",disableImpostor:!0,radiusScale:2}):o>8e4?t.addRepresentation("backbone",{colorScheme:a,colorScale:M,colorReverse:s,radiusScale:2}):(t.addRepresentation("cartoon",{colorScheme:a,colorScale:M,colorReverse:s,radiusScale:.7,aspectRatio:5,quality:"auto"}),o<5e4&&t.addRepresentation("base",{colorScheme:a,colorScale:M,colorReverse:s,quality:"auto"}),t.addRepresentation("ball+stick",{sele:"ligand",colorScheme:"element",radiusScale:2,aspectRatio:1.5,bondScale:.3,bondSpacing:.75,quality:"auto"}));t.structure.frames.length&&t.addTrajectory()}else(t instanceof ZD||t instanceof KD)&&t.addRepresentation("surface");this.tasks.onZeroOnce(this.autoView,this)},tj.prototype.loadFile=function(A,t){var e=this;void 0===t&&(t={});var i=Object.assign({},this.defaultFileParams,t),n=Jl(A).name;this.tasks.increment(),this.log("loading file '"+n+"'");var I=Hc(i.ext,Jl(A).ext);return(wl.isTrajectory(I)?Promise.reject(new Error("loadFile: ext '"+I+"' is a trajectory and must be loaded into a structure component")):Rl(A,i)).then((function(A){e.log("loaded '"+n+"'");var t=e.addComponentFromObject(A,i);return i.defaultRepresentation&&e.defaultFileRepresentation(t),e.tasks.decrement(),t}),(function(A){e.tasks.decrement();var t="error loading file: '"+A+"'";throw e.log(t),t}))},tj.prototype.loadScript=function(A){var t=this,e=Jl(A).name;return this.log("loading script '"+e+"'"),Rl(A).then((function(A){t.tasks.increment(),t.log("running script '"+e+"'"),A.run(t).then((function(){t.tasks.decrement(),t.log("finished script '"+e+"'")})),t.log("called script '"+e+"'")}),(function(A){t.tasks.decrement();var i="errored script '"+e+"' \""+A+'"';throw t.log(i),i}))},tj.prototype.addComponent=function(A){A?(this.compList.push(A),this.signals.componentAdded.dispatch(A)):jl.warn("Stage.addComponent: no component given")},tj.prototype.addComponentFromObject=function(A,t){void 0===t&&(t={});var e=Sl.get(A.type);if(e){var i=new e(this,A,t);return this.addComponent(i),i}jl.warn("no component for object type",A.type)},tj.prototype.removeComponent=function(A){var t=this.compList.indexOf(A);-1!==t&&(this.compList.splice(t,1),A.dispose(),this.signals.componentRemoved.dispatch(A))},tj.prototype.removeAllComponents=function(){var A=this;this.compList.slice().forEach((function(t){return A.removeComponent(t)}))},tj.prototype.handleResize=function(){this.viewer.handleResize()},tj.prototype.setSize=function(A,t){var e=this.viewer.container;e!==document.body&&(void 0!==A&&(e.style.width=A),void 0!==t&&(e.style.height=t),this.handleResize())},tj.prototype.toggleFullscreen=function(A){if(document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled){var t=this;A=A||this.viewer.container,this.lastFullscreenElement=A,e()?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():(A.dataset.normalWidth=A.style.width||"",A.dataset.normalHeight=A.style.height||"",A.style.width=window.screen.width+"px",A.style.height=window.screen.height+"px",A.requestFullscreen?A.requestFullscreen():A.msRequestFullscreen?A.msRequestFullscreen():A.mozRequestFullScreen?A.mozRequestFullScreen():A.webkitRequestFullscreen&&A.webkitRequestFullscreen(),document.addEventListener("fullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),document.addEventListener("MSFullscreenChange",i),this.handleResize(),this.signals.fullscreenChanged.dispatch(!0),setTimeout((function(){t.handleResize()}),100))}else jl.log("fullscreen mode (currently) not possible");function e(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement}function i(){if(!e()&&t.lastFullscreenElement){var A=t.lastFullscreenElement;A.style.width=A.dataset.normalWidth||"",A.style.height=A.dataset.normalHeight||"",document.removeEventListener("fullscreenchange",i),document.removeEventListener("mozfullscreenchange",i),document.removeEventListener("webkitfullscreenchange",i),document.removeEventListener("MSFullscreenChange",i),t.handleResize(),t.signals.fullscreenChanged.dispatch(!1)}}},tj.prototype.setSpin=function(A){A?(this.spinAnimation.resume(!0),this.rockAnimation.pause(!0)):this.spinAnimation.pause(!0)},tj.prototype.setRock=function(A){A?(this.rockAnimation.resume(!0),this.spinAnimation.pause(!0)):this.rockAnimation.pause(!0)},tj.prototype.toggleSpin=function(){this.setSpin(this.spinAnimation.paused)},tj.prototype.toggleRock=function(){this.setRock(this.rockAnimation.paused)},tj.prototype.getFocus=function(){var A=this.parameters;if("scene"!==A.clipMode)return 0;var t=A.clipNear;return"absolute"===A.clipScale&&(t=this.viewer.absoluteToRelative(t)),2*t},tj.prototype.setFocus=function(A){var t,e,i,n;"scene"===this.parameters.clipMode&&("relative"===this.parameters.clipScale?(i=50,n=function(A){return hu(A,0,100)}(2*(e=100-(t=hu(A/2,0,49.9)))-50)):(i=0,n=2*(e=t=this.viewer.relativeToAbsolute(A/2))),this.setParameters({clipNear:t,clipFar:e,fogNear:i,fogFar:n}))},tj.prototype.getZoomForBox=function(A){var t=A.getSize($D),e=Math.max(t.x,t.y,t.z),i=Math.min(t.x,t.y,t.z),n=e+Math.sqrt(i),I=uu(this.viewer.perspectiveCamera.fov),r=this.viewer.width,o=this.viewer.height,g=o=0;g--)(n=A[g])&&(r=(I<3?n(r):I>3?n(t,e,r):n(t,e))||r);return I>3&&r&&Object.defineProperty(t,e,r),r}Sl.add("shape",ej);var nj=function(A){function t(t){var e=this;A.call(this,t),t.scale||(this.parameters.scale="rainbow",this.parameters.reverse=Hc(t.reverse,!0)),this.scalePerModel={},t.structure.eachModel((function(A){e.parameters.domain=[A.atomOffset,A.atomEnd],e.scalePerModel[A.index]=e.getScale()}))}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){return this.scalePerModel[A.modelIndex](A.index)},t}(fu);ij([Lu],nj.prototype,"atomColor",null),Ll.add("atomindex",nj);var Ij=function(A){function t(t){if(A.call(this,t),t.scale||(this.parameters.scale="OrRd"),!t.domain){var e,i=1/0,n=-1/0;t.sele&&(e=new il(t.sele)),t.structure.eachAtom((function(A){var t=A.bfactor;i=Math.min(i,t),n=Math.max(n,t)}),e),this.parameters.domain=[i,n]}this.bfactorScale=this.getScale()}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){return this.bfactorScale(A.bfactor)},t}(fu);ij([Lu],Ij.prototype,"atomColor",null),Ll.add("bfactor",Ij);var rj=function(A){function t(t){var e=this;A.call(this,t),this.chainidDictPerModel={},this.scalePerModel={},t.scale||(this.parameters.scale="Spectral"),t.structure.eachModel((function(A){var t=0,i={};A.eachChain((function(A){void 0===i[A.chainid]&&(i[A.chainid]=t,t+=1)})),e.parameters.domain=[0,t-1],e.chainidDictPerModel[A.index]=i,e.scalePerModel[A.index]=e.getScale()}))}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){var t=this.chainidDictPerModel[A.modelIndex];return this.scalePerModel[A.modelIndex](t[A.chainid])},t}(fu);ij([Lu],rj.prototype,"atomColor",null),Ll.add("chainid",rj);var oj=function(A){function t(t){var e=this;A.call(this,t),this.scalePerModel={},t.scale||(this.parameters.scale="Spectral"),t.structure.eachModel((function(A){e.parameters.domain=[A.chainOffset,A.chainEnd],e.scalePerModel[A.index]=e.getScale()}))}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){return this.scalePerModel[A.modelIndex](A.chainIndex)},t}(fu);ij([Lu],oj.prototype,"atomColor",null),Ll.add("chainindex",oj);var gj=function(A){function t(t){var e=this;A.call(this,t),this.chainnameDictPerModel={},this.scalePerModel={},t.scale||(this.parameters.scale="Spectral"),t.structure.eachModel((function(A){var t=0,i={};A.eachChain((function(A){void 0===i[A.chainname]&&(i[A.chainname]=t,t+=1)})),e.parameters.domain=[0,t-1],e.chainnameDictPerModel[A.index]=i,e.scalePerModel[A.index]=e.getScale()}))}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){var t=this.chainnameDictPerModel[A.modelIndex];return this.scalePerModel[A.modelIndex](t[A.chainname])},t}(fu);ij([Lu],gj.prototype,"atomColor",null),Ll.add("chainname",gj);var aj=function(A){function t(t){A.call(this,t),this.rsrzDict={},this.rsccDict={},t.scale||(this.parameters.scale="RdYlBu"),this.rsrzScale=this.getScale({domain:[2,0]}),this.rsccScale=this.getScale({domain:[.678,1]});var e=t.structure.validation;e&&(this.rsrzDict=e.rsrzDict,this.rsccDict=e.rsccDict)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){var t=A.resno+"";A.inscode&&(t+="^"+A.inscode),A.chainname&&(t+=":"+A.chainname),t+="/"+A.modelIndex;var e=this.rsrzDict[t];if(void 0!==e)return this.rsrzScale(e);var i=this.rsccDict[t];return void 0!==i?this.rsccScale(i):9474192},t}(fu);ij([Lu],aj.prototype,"atomColor",null),Ll.add("densityfit",aj);var Mj={ARG:{CD:.1,CZ:.5,NE:-.1},ASN:{CG:.55,OD1:-.55},ASP:{CB:-.16,CG:.36,OD1:-.6,OD2:-.6},CYS:{CB:.19,SG:-.19},GLN:{CD:.55,OE1:-.55},GLU:{CD:.36,CG:-.16,OE1:-.6,OE2:-.6},HIS:{CB:.1,CD2:.2,CE1:.45,CG:.15,ND1:.05,NE2:.05},LYS:{CE:.25,NZ:.75},MET:{CE:.06,CG:.06,SD:-.12},PTR:{C:.55,CA:.1,CZ:.25,N:-.35,O:-.55,O1P:-.85,O2P:-.85,O3P:-.85,OG1:-1.1,P:1.4},SEP:{C:.55,CA:.1,CB:.25,N:-.35,O:-.55,O1P:-.85,O2P:-.85,O3P:-.85,OG1:-1.1,P:1.4},SER:{CB:.25,OG:-.25},THR:{CB:.25,OG1:-.25},TPO:{C:.55,CA:.1,CB:.25,N:-.35,O:-.55,OG1:-1.1,O1P:-.85,O2P:-.85,O3P:-.85,P:1.4},TRP:{CD1:.06,CD2:.1,CE2:-.04,CE3:-.03,CG:-.03,NE1:-.06},TYR:{CZ:.25,OH:-.25},backbone:{C:.55,O:-.55,N:-.35,CA:.1}},sj=function(A){function t(t){var e=this;A.call(this,t),this.delta=new De,this.hCharges=[],t.scale||(this.parameters.scale="rwb"),t.domain||(this.parameters.domain=[-50,50]),this.scale=this.getScale(),this.charges=new Float32Array(t.structure.atomCount);var i=[];t.structure.eachAtom((function(A){var t;if(e.charges[A.index]=(null!==(t=A).partialCharge?t.partialCharge:t.isProtein()&&(Mj[t.resname]&&Mj[t.resname][t.atomname]||Mj.backbone[t.atomname])||0)*A.occupancy,"N"===A.atomname){if(A.bondCount>=3)return;if(A.bondToElementCount(1))return;var n=function(A,t){void 0===t&&(t=new De);var e=!1,i=!1,n=!1;return t.set(2*A.x,2*A.y,2*A.z),A.eachBondedAtom((function(A){if(!e)return"H"===A.atomname?(t.set(A.x,A.y,A.z),void(e=!0)):void(i||"CA"!==A.atomname?n||"C"!==A.atomname||(n=!0,t.sub(A)):(t.sub(A),i=!0))})),e?t:i&&n?(t.normalize(),t.multiplyScalar(1.04),t.add(A),t):void 0}(A);void 0!==n&&(i.push(n),e.hCharges.push(.25*A.occupancy))}}));var n=t.structure.getBoundingBox();n.expandByScalar(1.04),this.hStore=function(A){for(var t=A.length,e=new Float32Array(t),i=new Float32Array(t),n=new Float32Array(t),I=0;I>1&1431655765))+(A>>2&858993459))+(A>>4)&252645135)>>24}(i[A.atomname]||0):this.geoDict[e]||0,0===t?2188972:1===t?16703627:2===t?16018755:t>=3?10813478:9474192},t}(fu);ij([Lu],Tj.prototype,"atomColor",null),Ll.add("geoquality",Tj);var hj=function(A){function t(t){for(var e in A.call(this,t),this.resHF={},t.scale||(this.parameters.scale="RdYlGn"),_h)this.resHF[e]=_h[e][0];if(this.defaultResidueHydrophobicity=qh[0],!t.domain){var i=1/0,n=-1/0;for(var I in this.resHF){var r=this.resHF[I];i=Math.min(i,r),n=Math.max(n,r)}this.parameters.domain=[i,0,n]}this.hfScale=this.getScale()}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){return this.hfScale(this.resHF[A.resname]||this.defaultResidueHydrophobicity)},t}(fu);ij([Lu],hj.prototype,"atomColor",null),Ll.add("hydrophobicity",hj);var Nj=function(A){function t(t){A.call(this,t),t.scale||(this.parameters.scale="rainbow"),t.domain||(this.parameters.domain=[0,t.structure.modelStore.count]),this.modelindexScale=this.getScale()}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){return this.modelindexScale(A.modelIndex)},t}(fu);ij([Lu],Nj.prototype,"atomColor",null),Ll.add("modelindex",Nj);var dj=function(A){function t(){A.apply(this,arguments)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){switch(A.residueType.moleculeType){case 1:return 3697840;case 2:return 15729279;case 3:return 12496596;case 4:return 16629894;case 5:return 12540695;case 6:return 8374655;default:return 16777113}},t}(fu);ij([Lu],dj.prototype,"atomColor",null),Ll.add("moleculetype",dj);var yj=function(A){function t(t){A.call(this,t),t.scale||(this.parameters.scale="PuBu"),t.domain||(this.parameters.domain=[0,1]),this.occupancyScale=this.getScale()}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){return this.occupancyScale(A.occupancy)},t}(fu);ij([Lu],yj.prototype,"atomColor",null),Ll.add("occupancy",yj);var Ej=function(A){function t(t){A.call(this,t),t.scale||(this.parameters.scale="rwb"),t.domain||(this.parameters.domain=[-1,1]),this.partialchargeScale=this.getScale()}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){return this.partialchargeScale(A.partialCharge||0)},t}(fu);function Dj(){return 16777215*Math.random()}ij([Lu],Ej.prototype,"atomColor",null),Ll.add("partialcharge",Ej);var jj=function(A){function t(){A.apply(this,arguments)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(){return Dj()},t.prototype.volumeColor=function(){return Dj()},t.prototype.positionColor=function(){return Dj()},t}(fu);ij([Lu],jj.prototype,"atomColor",null),ij([Lu],jj.prototype,"volumeColor",null),ij([Lu],jj.prototype,"positionColor",null),Ll.add("random",jj);var Bj=function(A){function t(t){A.call(this,t),this.rciDict={},t.scale||(this.parameters.scale="RdYlBu"),this.rciScale=this.getScale({domain:[.6,0]});var e=t.structure.validation;e&&(this.rciDict=e.rciDict)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){var t="["+A.resname+"]"+A.resno;A.chainname&&(t+=":"+A.chainname);var e=this.rciDict[t];return void 0!==e?this.rciScale(e):9474192},t}(fu);ij([Lu],Bj.prototype,"atomColor",null),Ll.add("randomcoilindex",Bj);var xj=function(A){function t(t){var e=this;A.call(this,t),this.scalePerChain={},t.scale||(this.parameters.scale="rainbow",this.parameters.reverse=Hc(t.reverse,!0)),t.structure.eachChain((function(A){e.parameters.domain=[A.residueOffset,A.residueEnd],e.scalePerChain[A.index]=e.getScale()}))}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){return this.scalePerChain[A.chainIndex](A.residueIndex)},t}(fu);ij([Lu],xj.prototype,"atomColor",null),Ll.add("residueindex",xj);var pj={ALA:9240460,ARG:124,ASN:16743536,ASP:10485826,CYS:16777072,GLN:16731212,GLU:6684672,GLY:16777215,HIS:7368959,ILE:19456,LEU:4546117,LYS:4671416,MET:12099650,PHE:5459026,PRO:5395026,SER:16740418,THR:12078080,TRP:5195264,TYR:9203788,VAL:16747775,ASX:16711935,GLX:16711935,ASH:16711935,GLH:16711935,A:14423100,G:3329330,I:10145074,X:8190976,C:16766720,T:4286945,U:4251856,D:35723,DA:14423100,DG:3329330,DI:10145074,DX:8190976,DC:16766720,DT:4286945,DU:4251856,DD:35723},Lj=function(A){function t(){A.apply(this,arguments)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){return pj[A.resname]||16711935},t}(fu);ij([Lu],Lj.prototype,"atomColor",null),Ll.add("resname",Lj);var fj=function(A){function t(t){A.call(this,t),this.residueProxy=t.structure.getResidueProxy()}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){var t=A.sstruc,e=this.residueProxy;return"h"===t?16711808:"g"===t?10485888:"i"===t?6291584:"e"===t||"b"===t?16762880:"t"===t?6324479:(e.index=A.residueIndex,e.isDna()?11403518:e.isRna()?16580962:e.isSaccharide()?10921722:e.isProtein()||"s"===t||"l"===t?16777215:8421504)},t}(fu);ij([Lu],fj.prototype,"atomColor",null),Ll.add("sstruc",fj);var zj=function(A){function t(t){var e,i;A.call(this,t),t.scale||(this.parameters.scale="rwb"),this.atomData=null===(e=this.parameters.data)||void 0===e?void 0:e.atomData,this.bondData=null===(i=this.parameters.data)||void 0===i?void 0:i.bondData,this.scale=this.getScale(this.parameters)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(A){var t,e=null===(t=this.atomData)||void 0===t?void 0:t[A.index];return void 0!==e?this.scale(e):this.parameters.value},t.prototype.bondColor=function(A,t){var e,i=null===(e=this.bondData)||void 0===e?void 0:e[A.index];return void 0!==i?this.scale(i):this.atomProxy?(this.atomProxy.index=t?A.atomIndex1:A.atomIndex2,this.atomColor(this.atomProxy)):this.parameters.value},t}(fu);ij([Lu],zj.prototype,"atomColor",null),ij([Lu],zj.prototype,"bondColor",null),Ll.add("structuredata",zj);var wj=function(A){function t(){A.apply(this,arguments)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.atomColor=function(){return this.parameters.value},t.prototype.bondColor=function(){return this.parameters.value},t.prototype.valueColor=function(){return this.parameters.value},t.prototype.volumeColor=function(){return this.parameters.value},t}(fu);ij([Lu],wj.prototype,"atomColor",null),ij([Lu],wj.prototype,"bondColor",null),ij([Lu],wj.prototype,"valueColor",null),ij([Lu],wj.prototype,"volumeColor",null),Ll.add("uniform",wj);var mj=function(A){function t(t){A.call(this,t),this.valueScale=this.getScale()}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.volumeColor=function(A){return this.valueScale(this.parameters.volume.data[A])},t}(fu);ij([Lu],mj.prototype,"volumeColor",null),Ll.add("value",mj);var Qj=function(A){function t(t){A.call(this,t),this.vec=new De,this.valueScale=this.getScale()}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.positionColor=function(A){var t=this.parameters.volume;if(!t||!t.inverseMatrix)return this.parameters.value;var e=this.vec,i=t.data,n=t.nx,I=t.ny,r=n*I;e.copy(A),e.applyMatrix4(t.inverseMatrix);var o=Math.floor(e.x),g=Math.floor(e.y),a=Math.floor(e.z),M=(a*I+g)*n+o,s=M+1,c=M+n,u=M+r,l=c+1,C=u+1,T=c+r,h=T+1,N=i[M],d=i[s],y=i[c],E=i[u],D=i[l],j=i[C],B=i[T],x=i[h],p=e.x-o,L=e.y-g,f=e.z-a,z=Nu(N,d,p),w=Nu(E,j,p),m=Nu(y,D,p),Q=Nu(B,x,p),S=Nu(z,m,L),Y=Nu(w,Q,L),O=Nu(S,Y,f);return this.valueScale(O)},t}(fu);ij([Lu],Qj.prototype,"positionColor",null),Ll.add("volume",Qj);var Sj=function(A){function t(t,e,i){var n=i||{};if(A.call(this,t,e,n),this.type="structure",this.parameters=Object.assign({radiusType:{type:"select",options:Cy.types},radiusData:{type:"hidden"},radiusSize:{type:"number",precision:3,max:10,min:.001},radiusScale:{type:"number",precision:3,max:10,min:.001},assembly:null,defaultAssembly:{type:"hidden"}},this.parameters),this.selection=new il(n.sele),this.dataList=[],this.structure=t,this.structureView=this.structure.getView(this.selection),t.biomolDict){var I={default:"default","":t.unitcell?"AU":"FULL"};Object.keys(t.biomolDict).forEach((function(A){I[A]=A})),this.parameters.assembly={type:"select",options:I,rebuild:!0}}else this.parameters.assembly=null}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={defaultScale:{configurable:!0}};return e.defaultScale.get=function(){return{vdw:1,covalent:1,bfactor:.01,sstruc:1}},t.prototype.init=function(t){var e=this,i=t||{};i.colorScheme=Hc(i.colorScheme,"element"),this.setRadius(i.radius,i),this.radiusType=Hc(i.radiusType,"vdw"),this.radiusData=Hc(i.radiusData,{}),this.radiusSize=Hc(i.radiusSize,1),this.radiusScale=Hc(i.radiusScale,1),this.assembly=Hc(i.assembly,"default"),this.defaultAssembly=Hc(i.defaultAssembly,""),"auto"===i.quality&&(i.quality=this.getQuality()),A.prototype.init.call(this,i),this.selection.signals.stringChanged.add((function(){e.build()})),this.build()},t.prototype.setRadius=function(A,t){var e=Object.keys(ly);return"string"==typeof A&&e.includes(A.toLowerCase())?t.radiusType=A:void 0!==A&&(t.radiusType="size",t.radiusSize=A),this},t.prototype.getAssembly=function(){var A="default"===this.assembly?this.defaultAssembly:this.assembly;return this.structure.biomolDict[A]},t.prototype.getQuality=function(){var A,t=this.structureView,e=this.getAssembly();return A=e?e.getAtomCount(t):t.atomCount,Nl&&(A*=4),t.atomStore.count/t.residueStore.count<2&&(A*=10),A<15e3?"high":A<8e4?"medium":"low"},t.prototype.create=function(){var A=this;if(0!==this.structureView.atomCount)if(this.structureView.hasCoords()){this.needsBuild=!1;var t=this.getAssembly();if(t)t.partList.forEach((function(t,e){var i=t.getView(A.structureView);if(0!==i.atomCount){var n=A.createData(i,e);n&&(n.sview=i,n.instanceList=t.getInstanceList(),A.dataList.push(n))}}));else{var e=this.createData(this.structureView,0);e&&(e.sview=this.structureView,this.dataList.push(e))}}else this.needsBuild=!0},t.prototype.update=function(A){var t=this;!this.lazy||this.visible?this.needsBuild?this.build():this.dataList.forEach((function(e){e.bufferList.length>0&&t.updateData(A,e)}),this):Object.assign(this.lazyProps.what,A)},t.prototype.updateData=function(A,t){this.build()},t.prototype.getColorParams=function(){return Object.assign(Object.assign({},A.prototype.getColorParams.call(this)),{structure:this.structure})},t.prototype.getRadiusParams=function(A){return{type:this.radiusType,scale:this.radiusScale,size:this.radiusSize,data:this.radiusData}},t.prototype.getAtomParams=function(A,t){return Object.assign({what:A,colorParams:this.getColorParams(),radiusParams:this.getRadiusParams()},t)},t.prototype.getBondParams=function(A,t){return Object.assign({what:A,colorParams:this.getColorParams(),radiusParams:this.getRadiusParams()},t)},t.prototype.getAtomRadius=function(A){return this.structureView.atomSet.isSet(A.index)?new Cy(this.getRadiusParams()).atomRadius(A):0},t.prototype.setSelection=function(A,t){return this.selection.setString(A,t),this},t.prototype.setParameters=function(t,e,i){void 0===e&&(e={}),void 0===i&&(i=!1);var n=t||{};return this.setRadius(n.radius,n),void 0===n.radiusType&&void 0===n.radiusData&&void 0===n.radiusSize&&void 0===n.radiusScale||(e.radius=!0,El&&!this.disableImpostor||(i=!0)),void 0!==n.defaultAssembly&&n.defaultAssembly!==this.defaultAssembly&&("default"===this.assembly&&void 0===n.assembly||"default"===n.assembly)&&(i=!0),A.prototype.setParameters.call(this,n,e,i),this},t.prototype.getParameters=function(){return Object.assign(A.prototype.getParameters.call(this),{sele:this.selection?this.selection.string:void 0,defaultAssembly:this.defaultAssembly})},t.prototype.attach=function(A){var t=this.viewer,e=this.bufferList;this.dataList.forEach((function(A){A.bufferList.forEach((function(i){e.push(i),t.add(i,A.instanceList)}))})),this.setVisibility(this.visible),A()},t.prototype.clear=function(){this.dataList.length=0,A.prototype.clear.call(this)},t.prototype.dispose=function(){this.structureView.dispose(),this.structure.dispose(),A.prototype.dispose.call(this)},Object.defineProperties(t.prototype,e),t}(UT),Yj=function(A){function t(t,e,i){A.call(this,t,e,i),this.n=0,this.parameters=Object.assign({labelVisible:{type:"boolean"},labelSize:{type:"number",precision:3,max:10,min:.001},labelColor:{type:"color"},labelFontFamily:{type:"select",options:{"sans-serif":"sans-serif",monospace:"monospace",serif:"serif"},buffer:"fontFamily"},labelFontStyle:{type:"select",options:{normal:"normal",italic:"italic"},buffer:"fontStyle"},labelFontWeight:{type:"select",options:{normal:"normal",bold:"bold"},buffer:"fontWeight"},labelsdf:{type:"boolean",buffer:"sdf"},labelXOffset:{type:"number",precision:1,max:20,min:-20,buffer:"xOffset"},labelYOffset:{type:"number",precision:1,max:20,min:-20,buffer:"yOffset"},labelZOffset:{type:"number",precision:1,max:20,min:-20,buffer:"zOffset"},labelAttachment:{type:"select",options:{"bottom-left":"bottom-left","bottom-center":"bottom-center","bottom-right":"bottom-right","middle-left":"middle-left","middle-center":"middle-center","middle-right":"middle-right","top-left":"top-left","top-center":"top-center","top-right":"top-right"},rebuild:!0},labelBorder:{type:"boolean",buffer:"showBorder"},labelBorderColor:{type:"color",buffer:"borderColor"},labelBorderWidth:{type:"number",precision:2,max:.3,min:0,buffer:"borderWidth"},labelBackground:{type:"boolean",rebuild:!0},labelBackgroundColor:{type:"color",buffer:"backgroundColor"},labelBackgroundMargin:{type:"number",precision:2,max:2,min:0,rebuild:!0},labelBackgroundOpacity:{type:"range",step:.01,max:1,min:0,buffer:"backgroundOpacity"},labelFixedSize:{type:"boolean",buffer:"fixedSize"},lineOpacity:{type:"range",min:0,max:1,step:.01},linewidth:{type:"integer",max:50,min:1,buffer:!0}},this.parameters,{flatShaded:null})}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.init=function(t){var e=t||{};this.labelVisible=Hc(e.labelVisible,!0),this.labelSize=Hc(e.labelSize,2),this.labelColor=Hc(e.labelColor,16777215),this.labelFontFamily=Hc(e.labelFontFamily,"sans-serif"),this.labelFontStyle=Hc(e.labelFontstyle,"normal"),this.labelFontWeight=Hc(e.labelFontWeight,"bold"),this.labelsdf=Hc(e.labelsdf,"Chrome"===Cl),this.labelXOffset=Hc(e.labelXOffset,0),this.labelYOffset=Hc(e.labelYOffset,0),this.labelZOffset=Hc(e.labelZOffset,.5),this.labelAttachment=Hc(e.labelAttachment,"bottom-left"),this.labelBorder=Hc(e.labelBorder,!1),this.labelBorderColor=Hc(e.labelBorderColor,"lightgrey"),this.labelBorderWidth=Hc(e.labelBorderWidth,.15),this.labelBackground=Hc(e.labelBackground,!1),this.labelBackgroundColor=Hc(e.labelBackgroundColor,"lightgrey"),this.labelBackgroundMargin=Hc(e.labelBackgroundMargin,.5),this.labelBackgroundOpacity=Hc(e.labelBackgroundOpacity,1),this.labelFixedSize=Hc(e.labelFixedSize,!1),this.lineOpacity=Hc(e.lineOpacity,1),this.linewidth=Hc(e.linewidth,2),A.prototype.init.call(this,e)},t.prototype.update=function(t){t.position?this.build():A.prototype.update.call(this,t)},t.prototype.updateData=function(A,t){var e={};if(A&&!A.labelSize||Object.assign(e,{size:TC(this.n,this.labelSize)}),!A||A.labelColor){var i=new Pi(this.labelColor);Object.assign(e,{color:hC(this.n,i.r,i.g,i.b)})}this.textBuffer.setAttributes(e)},t.prototype.setParameters=function(t,e,i){return void 0===e&&(e={}),void 0===i&&(i=!1),t&&t.labelSize&&(e.labelSize=!0),t&&(t.labelColor||0===t.labelColor)&&(e.labelColor=!0,i=!0),A.prototype.setParameters.call(this,t,e,i),t&&void 0!==t.opacity&&this.textBuffer.setParameters({opacity:1}),t&&void 0!==t.labelVisible&&this.setVisibility(this.visible),this},t.prototype.setVisibility=function(t,e){return A.prototype.setVisibility.call(this,t,!0),this.textBuffer&&this.textBuffer.setVisibility(this.labelVisible&&this.visible),e||this.viewer.requestRender(),this},t.prototype.getLabelBufferParams=function(t){return void 0===t&&(t={}),A.prototype.getBufferParams.call(this,Object.assign({fontFamily:this.labelFontFamily,fontStyle:this.labelFontStyle,fontWeight:this.labelFontWeight,sdf:this.labelsdf,xOffset:this.labelXOffset,yOffset:this.labelYOffset,zOffset:this.labelZOffset,attachment:this.labelAttachment,showBorder:this.labelBorder,borderColor:this.labelBorderColor,borderWidth:this.labelBorderWidth,showBackground:this.labelBackground,backgroundColor:this.labelBackgroundColor,backgroundMargin:this.labelBackgroundMargin,backgroundOpacity:this.labelBackgroundOpacity,fixedSize:this.labelFixedSize,disablePicking:!0,visible:this.labelVisible},t,{opacity:1}))},t.prototype.getAtomRadius=function(){return 0},t}(Sj);function Oj(A,t){var e=A.getAtomProxy(),i=new il,n=t.length;if(0===n)return new Float32Array(0);var I=t[0].length,r=A.getAtomSet(),o=new Float32Array(n*I*3),g=0;return t.forEach((function(t){for(var n=!1,a=0;a 1.0 ){\ngl_FragColor = vec4( backgroundColor, backgroundOpacity );\n}else{\nfloat sdf = texture2D( fontTexture, texCoord ).a;\nif( showBorder ) sdf += borderWidth;\nfloat a = smoothstep(padding - gamma, padding + gamma, sdf);\nif( a < 0.2 ) discard;\na *= opacity;\nvec3 outgoingLight = vColor;\nif( showBorder && sdf < ( padding + borderWidth ) ){\noutgoingLight = borderColor;\n}\ngl_FragColor = vec4( outgoingLight, a );\n}\n#if defined( PICKING )\nif( opacity < 0.3 )\ndiscard;\ngl_FragColor = vec4( vPickingColor, objectId );\n#else\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n#endif\n}");var Pj={},kj={font:"sans-serif",size:36,style:"normal",variant:"normal",weight:"normal",outline:3,width:1024,height:1024},Gj=function(A){void 0===A&&(A={}),this.gamma=1,this.mapped={},this.scratchW=0,this.scratchH=0,this.currentX=0,this.currentY=0,this.cutoff=.25,this.parameters=Rc(A,kj);var t=this.parameters;this.radius=t.size/8,this.padding=t.size/3;var e=this.lineHeight=t.size+2*t.outline+Math.round(t.size/4),i=this.maxWidth=t.width/4,n=this.canvas=document.createElement("canvas");n.width=i,n.height=e;var I=this.context=this.canvas.getContext("2d");I.font=t.style+" "+t.variant+" "+t.weight+" "+t.size+"px "+t.font,I.fillStyle="black",I.textAlign="left",I.textBaseline="bottom",I.lineJoin="round",this.gridOuter=new Float64Array(e*i),this.gridInner=new Float64Array(e*i),this.f=new Float64Array(Math.max(e,i)),this.d=new Float64Array(Math.max(e,i)),this.z=new Float64Array(Math.max(e,i)+1),this.v=new Int16Array(Math.max(e,i)),this.data=new Uint8Array(t.width*t.height*4),this.canvas2=document.createElement("canvas"),this.canvas2.width=t.width,this.canvas2.height=t.height,this.context2=this.canvas2.getContext("2d"),this.placeholder=this.map(String.fromCharCode(65533));for(var r=32;r<=126;++r)this.map(String.fromCharCode(r));this.map(String.fromCharCode(176)),this.map(String.fromCharCode(8491)),this.texture=new Cg(this.canvas2),this.texture.flipY=!1,this.texture.needsUpdate=!0};Gj.prototype.map=function(A){var t=this.parameters;return void 0===this.mapped[A]&&(this.draw(A),this.currentX+this.scratchW>t.width&&(this.currentX=0,this.currentY+=this.scratchH),this.currentY+this.scratchH>t.height&&console.warn("canvas to small"),this.mapped[A]={x:this.currentX,y:this.currentY,w:this.scratchW,h:this.scratchH},this.context2.drawImage(this.canvas,0,0,this.scratchW,this.scratchH,this.currentX,this.currentY,this.scratchW,this.scratchH),this.currentX+=this.scratchW),this.mapped[A]},Gj.prototype.get=function(A){return this.mapped[A]||this.placeholder},Gj.prototype.draw=function(A){var t=this.parameters,e=this.lineHeight,i=t.outline,n=this.context,I=this.maxWidth,r=i,o=e-t.outline,g=n.measureText(A),a=Math.min(I,Math.ceil(g.width+2*r+1)),M=a*e;n.clearRect(0,0,a,e),n.fillText(A,r,o);for(var s=n.getImageData(0,0,a,e),c=s.data,u=0;u= 0.0 ) {\ntrimSegment( start, end );\n} else if ( end.z < 0.0 && start.z >= 0.0 ) {\ntrimSegment( end, start );\n}\n}\nvec4 clipStart = projectionMatrix * start;\nvec4 clipEnd = projectionMatrix * end;\nvec2 ndcStart = clipStart.xy / clipStart.w;\nvec2 ndcEnd = clipEnd.xy / clipEnd.w;\nvec2 dir = ndcEnd - ndcStart;\ndir.x *= aspect;\ndir = normalize( dir );\nvec2 offset = vec2( dir.y, - dir.x );\ndir.x /= aspect;\noffset.x /= aspect;\nif ( mapping.x < 0.0 ) offset *= - 1.0;\noffset *= linewidth;\noffset /= resolution.y;\nvec4 clip = ( mapping.y < 0.5 ) ? clipStart : clipEnd;\noffset *= clip.w;\nclip.xy += offset;\ngl_Position = clip;\n#ifndef PICKING\nvViewPosition = ( projectionMatrixInverse * clip ).xyz;\n#endif\n#if defined( RADIUS_CLIP )\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\n#endif\n#include nearclip_vertex\n}"),ml.add("shader/WideLine.frag","uniform vec3 diffuse;\nuniform float opacity;\nuniform float clipNear;\nuniform float clipRadius;\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#ifdef PICKING\nuniform float objectId;\nvarying vec3 vPickingColor;\n#else\n#include common\n#include fog_pars_fragment\nvarying vec3 vViewPosition;\nvarying vec3 vColor;\nvarying vec3 vColor2;\nvarying float flag;\n#endif\nvoid main() {\n#include nearclip_fragment\n#include radiusclip_fragment\n#if defined( PICKING )\nif( opacity < 0.3 )\ndiscard;\ngl_FragColor = vec4( vPickingColor, objectId );\n#else\nvec3 outgoingLight = vec3( 0.0 );\nvec4 diffuseColor = vec4( diffuse, 1.0 );\nif ( flag < 0.0 ) {\ndiffuseColor.rgb *= vColor;\n} else {\ndiffuseColor.rgb *= vColor2;\n}\n#include alphatest_fragment\noutgoingLight = diffuseColor.rgb;\ngl_FragColor = vec4( outgoingLight, diffuseColor.a * opacity );\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n#endif\n}");var Xj=Object.assign({linewidth:2},bd),Vj=Object.assign({linewidth:{uniform:!0}},Pd),Wj=function(A){function t(t,e){void 0===e&&(e={}),A.call(this,t,e),this.parameterTypes=Vj,this.vertexShader="WideLine.vert",this.fragmentShader="WideLine.frag",!t.color2&&t.color&&(t.color2=t.color),this.addUniforms({linewidth:{value:this.parameters.linewidth},resolution:{value:new se},projectionMatrixInverse:{value:new we}}),this.addAttributes({position1:{type:"v3",value:null},position2:{type:"v3",value:null},color2:{type:"c",value:null}}),this.setAttributes(t),this.makeMapping()}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={defaultParameters:{configurable:!0}};return e.defaultParameters.get=function(){return Xj},t.prototype.setParameters=function(t){A.prototype.setParameters.call(this,t)},Object.defineProperties(t.prototype,e),t}(AD);Yl.add("wideline",Wj);var Zj=function(A){function t(t,e,i){A.call(this,t,e,i),this.type="angle",this.parameters=Object.assign({atomTriple:{type:"hidden",rebuild:!0},vectorVisible:{type:"boolean",default:!0},arcVisible:{type:"boolean",default:!0},sectorVisible:{type:"boolean",default:!0}},this.parameters),this.init(i)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.init=function(t){var e=t||{};e.side=Hc(e.side,"double"),e.opacity=Hc(e.opacity,.5),this.atomTriple=Hc(e.atomTriple,[]),this.arcVisible=Hc(e.arcVisible,!0),this.sectorVisible=Hc(e.sectorVisible,!0),this.vectorVisible=Hc(e.vectorVisible,!0),A.prototype.init.call(this,e)},t.prototype.createData=function(A){if(A.atomCount&&this.atomTriple.length){var t=function(A,t){return function(A){for(var t=[],e=A.length/9,i=0;i radius2) {\ndiscard;\n}\n#ifdef CAP\nsurface_point = front_point;\n_normal = axis;\n#else\nsurface_point = ray_target + ( (-a1 - sqrt(d)) / a2 ) * ray_direction;\ndNV = dot(-axis, ray_direction);\nnear = dot(axis, end) / dNV;\nnew_point2 = ray_direction * near + ray_origin;\nif (dot(new_point2 - end, new_point2-base) < radius2) {\ndiscard;\n}\ninterior = true;\n#endif\n}\nif( end_cap_test > 0.0 )\n{\nfloat dNV;\nfloat near;\nvec3 end_point;\nif ( ortho == 1.0 ) {\nend_point = ray_target;\n} else {\ndNV = dot(axis, ray_direction);\nif (dNV < 0.0) {\ndiscard;\n}\nnear = dot(axis, end) / dNV;\nend_point = ray_direction * near + ray_origin;\n}\n\nif( dot(end_point - end, end_point-base) > radius2 ) {\ndiscard;\n}\n#ifdef CAP\nsurface_point = end_point;\n_normal = axis;\n#else\nsurface_point = ray_target + ( (-a1 - sqrt(d)) / a2 ) * ray_direction;\ndNV = dot(-axis, ray_direction);\nnear = dot(-axis, (base)) / dNV;\nnew_point2 = ray_direction * near + ray_origin;\nif (dot(new_point2 - base, new_point2-base) < radius2) {\ndiscard;\n}\ninterior = true;\n#endif\n}\ngl_FragDepthEXT = calcDepth( surface_point );\n\n#ifdef NEAR_CLIP\nif( calcClip( surface_point ) > 0.0 ){\ndist = (-a1 - sqrt(d)) / a2;\nsurface_point = ray_target + dist * ray_direction;\nif( calcClip( surface_point ) > 0.0 ) {\ndiscard;\n}\ninterior = true;\ngl_FragDepthEXT = calcDepth( surface_point );\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = max( 0.0, calcDepth( vec3( - ( clipNear - 0.5 ) ) ) + ( 0.0000001 / vRadius ) );\n}\n}else if( gl_FragDepthEXT <= 0.0 ){\ndist = (-a1 - sqrt(d)) / a2;\nsurface_point = ray_target + dist * ray_direction;\ninterior = true;\ngl_FragDepthEXT = calcDepth( surface_point );\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\n}\n}\n#else\nif( gl_FragDepthEXT <= 0.0 ){\ndist = (-a1 - sqrt(d)) / a2;\nsurface_point = ray_target + dist * ray_direction;\ninterior = true;\ngl_FragDepthEXT = calcDepth( surface_point );\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\n}\n}\n#endif\nif (gl_FragDepthEXT < 0.0) {\ndiscard;\n}\nif (gl_FragDepthEXT > 1.0) {\ndiscard;\n}\n#ifdef PICKING\nif( opacity < 0.3 )\ndiscard;\ngl_FragColor = vec4( vPickingColor, objectId );\n#else\nvec3 vViewPosition = -surface_point;\nvec3 vNormal = _normal;\nvec3 vColor;\nif( distSq3( surface_point, end ) < distSq3( surface_point, base ) ){\nif( b < 0.0 ){\nvColor = vColor1;\n}else{\nvColor = vColor2;\n}\n}else{\nif( b > 0.0 ){\nvColor = vColor1;\n}else{\nvColor = vColor2;\n}\n}\nvec4 diffuseColor = vec4( diffuse, opacity );\nReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\nvec3 totalEmissiveLight = emissive;\n#include color_fragment\n#include roughnessmap_fragment\n#include metalnessmap_fragment\nvec3 normal = normalize( vNormal );\nvec3 geometryNormal = normal;\n#include lights_physical_fragment\n#include lights_fragment_begin\n#include lights_fragment_end\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;\nif( interior ){\n#ifdef USE_INTERIOR_COLOR\noutgoingLight.xyz = interiorColor;\n#else\n#ifdef DIFFUSE_INTERIOR\noutgoingLight.xyz = vColor;\n#endif\n#endif\noutgoingLight.xyz *= 1.0 - interiorDarkening;\n}\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n#endif\n}");var iB=new Float32Array([-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,1]),nB=new Uint16Array([0,1,2,1,4,2,2,4,3,4,5,3]),IB=function(A){function t(t,e){void 0===e&&(e={}),A.call(this,"v3",t,e)}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={mapping:{configurable:!0},mappingIndices:{configurable:!0},mappingIndicesSize:{configurable:!0},mappingSize:{configurable:!0},mappingItemSize:{configurable:!0}};return e.mapping.get=function(){return iB},e.mappingIndices.get=function(){return nB},e.mappingIndicesSize.get=function(){return 12},e.mappingSize.get=function(){return 6},e.mappingItemSize.get=function(){return 3},Object.defineProperties(t.prototype,e),t}(_E),rB=Object.assign({openEnded:!1},bd),oB=Object.assign({openEnded:{updateShader:!0}},Pd),gB=function(A){function t(t,e){void 0===e&&(e={}),A.call(this,t,e),this.parameterTypes=oB,this.isImpostor=!0,this.vertexShader="CylinderImpostor.vert",this.fragmentShader="CylinderImpostor.frag",this.addUniforms({modelViewMatrixInverse:{value:new we},ortho:{value:0}}),this.addAttributes({position1:{type:"v3",value:null},position2:{type:"v3",value:null},color2:{type:"c",value:null},radius:{type:"f",value:null}}),this.setAttributes(t),this.makeMapping()}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={defaultParameters:{configurable:!0}};return e.defaultParameters.get=function(){return rB},t.prototype.getDefines=function(t){var e=A.prototype.getDefines.call(this,t);return this.parameters.openEnded||(e.CAP=1),e},Object.defineProperties(t.prototype,e),t}(IB);Object.assign({disableImpostor:!1},AB,rB);var aB=function(A,t){return void 0===t&&(t={}),!A.color2&&A.color&&(A.color2=A.color),!El||t&&t.disableImpostor?new eB(A,t):new gB(A,t)};Yl.add("cylinder",aB);var MB=function(A){function t(t,e,i){A.call(this,t,e,i),this.type="axes",this.parameters=Object.assign({radiusSize:{type:"number",precision:3,max:10,min:.001},sphereDetail:!0,radialSegments:!0,disableImpostor:!0,showAxes:{type:"boolean",rebuild:!0},showBox:{type:"boolean",rebuild:!0}},this.parameters,{assembly:null}),this.init(i)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.init=function(t){var e=t||{};e.radiusSize=Hc(e.radiusSize,.5),e.colorValue=Hc(e.colorValue,"lightgreen"),e.useInteriorColor=Hc(e.useInteriorColor,!0),this.showAxes=Hc(e.showAxes,!0),this.showBox=Hc(e.showBox,!1),A.prototype.init.call(this,e)},t.prototype.getPrincipalAxes=function(){var A,t=this.getAssembly();return t&&(A=t.partList[0].getSelection()),this.structureView.getPrincipalAxes(A)},t.prototype.getAxesData=function(A){var t=this.getPrincipalAxes(),e=new Pi(this.colorValue),i=0,n=0;this.showAxes&&(i+=6,n+=3),this.showBox&&(i+=8,n+=12);var I=new Float32Array(3*i),r=hC(i,e.r,e.g,e.b),o=TC(i,this.radiusSize),g=new Float32Array(3*n),a=new Float32Array(3*n),M=hC(n,e.r,e.g,e.b),s=TC(n,this.radiusSize),c=0;if(this.showAxes){var u=function(A,t){A.toArray(I,2*c),t.toArray(I,2*c+3),A.toArray(g,c),t.toArray(a,c),c+=3};u(t.begA,t.endA),u(t.begB,t.endB),u(t.begC,t.endC)}if(this.showBox){var l=new De,C=t.getProjectedScaleForAtoms(A),T=C.d1a,h=C.d2a,N=C.d3a,d=C.d1b,y=C.d2b,E=C.d3b,D=2*c,j=function(A,e,i){l.copy(t.center).addScaledVector(t.normVecA,A).addScaledVector(t.normVecB,e).addScaledVector(t.normVecC,i),l.toArray(I,D),D+=3};j(T,h,N),j(T,h,E),j(T,y,E),j(T,y,N),j(d,y,E),j(d,y,N),j(d,h,N),j(d,h,E);var B=c,x=function(A,t){l.fromArray(I,2*c+3*A).toArray(g,B),l.fromArray(I,2*c+3*t).toArray(a,B),B+=3};x(0,1),x(0,3),x(0,6),x(1,2),x(1,7),x(2,3),x(2,4),x(3,5),x(4,5),x(4,7),x(5,6),x(6,7)}var p=new kN(t);return{vertex:{position:I,color:r,radius:o,picking:p},edge:{position1:g,position2:a,color:M,color2:M,radius:s,picking:p}}},t.prototype.create=function(){var A=this.getAxesData(this.structureView);this.sphereBuffer=new eD(A.vertex,this.getBufferParams({sphereDetail:this.sphereDetail,disableImpostor:this.disableImpostor,dullInterior:!0})),this.cylinderBuffer=new aB(A.edge,this.getBufferParams({openEnded:!0,radialSegments:this.radialSegments,disableImpostor:this.disableImpostor,dullInterior:!0})),this.dataList.push({sview:this.structureView,bufferList:[this.sphereBuffer,this.cylinderBuffer]})},t.prototype.createData=function(A){},t.prototype.updateData=function(A,t){var e=this.getAxesData(t.sview),i={},n={};A&&!A.position||(Object.assign(i,{position:e.vertex.position}),Object.assign(n,{position1:e.edge.position1,position2:e.edge.position2})),A&&!A.color||(Object.assign(i,{color:e.vertex.color}),Object.assign(n,{color:e.edge.color,color2:e.edge.color})),A&&!A.radius||(Object.assign(i,{radius:e.vertex.radius}),Object.assign(n,{radius:e.edge.radius})),this.sphereBuffer.setAttributes(i),this.cylinderBuffer.setAttributes(n)},t}(Sj);zl.add("axes",MB);var sB=function(A){function t(t,e,i){A.call(this,t,e,i),this.type="ball+stick",this.parameters=Object.assign({sphereDetail:!0,radialSegments:!0,openEnded:!0,disableImpostor:!0,aspectRatio:{type:"number",precision:1,max:10,min:1},lineOnly:{type:"boolean",rebuild:!0},cylinderOnly:{type:"boolean",rebuild:!0},multipleBond:{type:"select",rebuild:!0,options:{off:"off",symmetric:"symmetric",offset:"offset"}},bondScale:{type:"number",precision:2,max:1,min:.01},bondSpacing:{type:"number",precision:2,max:2,min:.5},linewidth:{type:"integer",max:50,min:1,buffer:!0}},this.parameters),this.init(i)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.init=function(t){var e=t||{};e.radiusType=Hc(e.radiusType,"size"),e.radiusSize=Hc(e.radiusSize,.15),e.useInteriorColor=Hc(e.useInteriorColor,!0),this.aspectRatio=Hc(e.aspectRatio,2),this.lineOnly=Hc(e.lineOnly,!1),this.cylinderOnly=Hc(e.cylinderOnly,!1),this.multipleBond=Hc(e.multipleBond,"off"),this.bondSpacing=Hc(e.bondSpacing,1),this.bondScale=Hc(e.bondScale,.4),this.linewidth=Hc(e.linewidth,2),A.prototype.init.call(this,e)},t.prototype.getAtomRadius=function(t){return this.aspectRatio*A.prototype.getAtomRadius.call(this,t)},t.prototype.getAtomParams=function(t,e){var i=A.prototype.getAtomParams.call(this,t,e);return i.radiusParams.scale*=this.aspectRatio,i},t.prototype.getAtomData=function(A,t,e){return A.getAtomData(this.getAtomParams(t,e))},t.prototype.getBondParams=function(t,e){return e=Object.assign({multipleBond:this.multipleBond,bondSpacing:this.bondSpacing,bondScale:this.bondScale},e),A.prototype.getBondParams.call(this,t,e)},t.prototype.getBondData=function(A,t,e){return A.getBondData(this.getBondParams(t,e))},t.prototype.createData=function(A){var t=[];if(this.lineOnly)this.lineBuffer=new Wj(this.getBondData(A,{position:!0,color:!0,picking:!0}),this.getBufferParams({linewidth:this.linewidth})),t.push(this.lineBuffer);else{var e=new aB(this.getBondData(A),this.getBufferParams({openEnded:this.openEnded,radialSegments:this.radialSegments,disableImpostor:this.disableImpostor,dullInterior:!0}));if(t.push(e),!this.cylinderOnly){var i=new eD(this.getAtomData(A),this.getBufferParams({sphereDetail:this.sphereDetail,disableImpostor:this.disableImpostor,dullInterior:!0}));t.push(i)}}return{bufferList:t}},t.prototype.updateData=function(A,t){"off"!==this.multipleBond&&A&&A.radius&&(A.position=!0);var e=this.getBondData(t.sview,A);if(this.lineOnly){var i={};A&&!A.position||Object.assign(i,{position1:e.position1,position2:e.position2}),A&&!A.color||Object.assign(i,{color:e.color,color2:e.color2}),t.bufferList[0].setAttributes(i)}else{var n={};if(A&&!A.position||Object.assign(n,{position1:e.position1,position2:e.position2}),A&&!A.color||Object.assign(n,{color:e.color,color2:e.color2}),A&&!A.radius||Object.assign(n,{radius:e.radius}),t.bufferList[0].setAttributes(n),!this.cylinderOnly){var I=this.getAtomData(t.sview,A),r={};A&&!A.position||Object.assign(r,{position:I.position}),A&&!A.color||Object.assign(r,{color:I.color}),A&&!A.radius||Object.assign(r,{radius:I.radius}),t.bufferList[1].setAttributes(r)}}},t.prototype.setParameters=function(t){void 0===t&&(t={});var e=!1,i={};return(t.aspectRatio||t.bondSpacing||t.bondScale)&&(Object.assign(i,{radius:!0}),El&&!this.disableImpostor||(e=!0)),A.prototype.setParameters.call(this,t,i,e),this},t}(Sj);zl.add("ball+stick",sB);var cB=function(A){function t(t,e,i){A.call(this,t,e,i),this.type="backbone",this.parameters=Object.assign({},this.parameters,{multipleBond:null,bondSpacing:null}),this.init(i)}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.init=function(t){var e=t||{};e.aspectRatio=Hc(e.aspectRatio,1),e.radiusSize=Hc(e.radiusSize,.25),A.prototype.init.call(this,e)},t.prototype.getAtomRadius=function(t){return t.isTrace()?A.prototype.getAtomRadius.call(this,t):0},t.prototype.getAtomData=function(A,t,e){return A.getBackboneAtomData(this.getAtomParams(t,e))},t.prototype.getBondData=function(A,t,e){return A.getBackboneBondData(this.getBondParams(t,e))},t}(sB);zl.add("backbone",cB);var uB=function(A){function t(t,e,i){A.call(this,t,e,i),this.type="base",this.parameters=Object.assign({},this.parameters,{multipleBond:null,bondSpacing:null})}return A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t,t.prototype.init=function(t){var e=t||{};e.aspectRatio=Hc(e.aspectRatio,1),e.radiusSize=Hc(e.radiusSize,.3),A.prototype.init.call(this,e)},t.prototype.getAtomData=function(A,t,e){return A.getRungAtomData(this.getAtomParams(t,e))},t.prototype.getBondData=function(A,t,e){var i=this.getBondParams(t,e);return Object.assign(i.colorParams,{rung:!0}),A.getRungBondData(i)},t}(sB);zl.add("base",uB);var lB=function(A,t){this.m=A,this.tension=t,this.dt=1/this.m,this.delta=1e-4,this.vec1=new De,this.vec2=new De,this.vDir=new De,this.vTan=new De,this.vNorm=new De,this.vBin=new De,this.m2=Math.ceil(this.m/2)};lB.prototype.interpolateToArr=function(A,t,e,i,n,I,r){I[r+0]=du(A.x,t.x,e.x,i.x,n,this.tension),I[r+1]=du(A.y,t.y,e.y,i.y,n,this.tension),I[r+2]=du(A.z,t.z,e.z,i.z,n,this.tension)},lB.prototype.interpolateToVec=function(A,t,e,i,n,I){I.x=du(A.x,t.x,e.x,i.x,n,this.tension),I.y=du(A.y,t.y,e.y,i.y,n,this.tension),I.z=du(A.z,t.z,e.z,i.z,n,this.tension)},lB.prototype.interpolatePosition=function(A,t,e,i,n,I){for(var r=0;r1&&(a=1),this.interpolateToVec(A,t,e,i,g,this.vec1),this.interpolateToVec(A,t,e,i,a,this.vec2),this.vec2.sub(this.vec1).normalize(),this.vec2.toArray(n,M)}},lB.prototype.vectorSubdivide=function(A,t,e,i,n){for(var I,r=t.next(),o=t.next(),g=t.next(),a=t.size,M=a-1,s=i||0,c=0;c0&&i0;ZT(D,N,j);var m=WT(D,y)<0;if(eh(D,y,WT(y,d)),ZT(B,d,D),eh(D,y,WT(y,E)),ZT(x,E,D),0!==Ah(B)&&0!==Ah(x)){ih(B,B),ih(x,x);var Q=I[w]=function(A,t){var e=A[0],i=A[1],n=A[2],I=t[0],r=t[1],o=t[2],g=i*o-n*r,a=n*I-e*o,M=e*r-i*I,s=Math.sqrt(g*g+a*a+M*M),c=e*I+i*r+n*o;return Math.atan2(s,c)}(B,x);o[w]=(cC*Q).toFixed(1)+String.fromCharCode(176),VT(f,B,y),ih(f,f),WT(f,x)<0&&gh(f,f),vj(D,j,B,f,Q/2),qT(D,r,3*w);var S=Math.ceil(Q/e),Y=S+(t.extendLine?4:2),O=t.extendLine?36:0,v=new Float32Array(3*Y),U=new Float32Array(3*Y),b=new Float32Array(9*S),P=new Float32Array(O);g[w]=v,a[w]=U,M[w]=b,s[w]=P,t.extendLine&&(n?(ZT(D,C,h),ih(D,D),eh(p,D,1/WT(B,D)),KT(p,p,h)):(eh(p,d,1/WT(B,d)),KT(p,p,T)),m?(ZT(D,N,T),ih(D,D),eh(L,D,1/WT(x,D)),KT(L,L,T)):(eh(L,E,1/WT(x,E)),KT(L,L,h))),KT(z,j,B);var k=0;t.extendLine?(qT(C,v,k),qT(p,U,k),qT(p,v,k+=3),qT(z,U,k),k+=3,qT(p,P,0),qT(z,P,3),qT(n?h:T,P,6),qT(n?h:T,P,9),qT(z,P,12),qT(j,P,15)):(qT(j,v,k),qT(z,U,k),k+=3);for(var G=function(A,t){var e=9*t;qT(j,b,e),qT(z,b,e+3),qT(z,v,k),vj(z,j,B,f,A),qT(z,b,e+6),qT(z,U,k),k+=3},F=0,J=e;J=3&&(n=pB(I)),void 0!==n&&e.push(n)}return this.frontHistogramBinBordersBuffer=o(e.map((function(A){return A.frontHistogramBinBorders})),this.getHistogramBinBorderBufferParameters()),this.backHistogramBinBordersBuffer=o(e.map((function(A){return A.backHistogramBinBorders})),this.getHistogramBinBorderBufferParameters()),this.adjacentBondArrowsBuffer=o(e.map((function(A){return A.adjacentBondArrows})),this.getBondArrowsBufferParameters()),this.distantBondArrowsBuffer=o(e.map((function(A){return A.distantBondArrows})),this.getBondArrowsBufferParameters()),this.opaqueMiddleDiscBuffer=g(e.map((function(A){return A.opaqueMiddleDisc})),this.getOpaqueMiddleDiscBufferParameters()),this.frontHistogramBuffer=g(e.map((function(A){return A.frontHistogram})),this.getHistogramBufferParameters()),this.backHistogramBuffer=g(e.map((function(A){return A.backHistogram})),this.getHistogramBufferParameters()),{bufferList:[].concat(this.frontHistogramBinBordersBuffer,this.backHistogramBinBordersBuffer,this.adjacentBondArrowsBuffer,this.distantBondArrowsBuffer,this.opaqueMiddleDiscBuffer,this.frontHistogramBuffer,this.backHistogramBuffer)}}function r(A){for(var t=A.map((function(A){return A.length})),e=new Float32Array(xC(t)),i=0,n=0;n0&&(i-=s,I=I.subarray(0,3*i));var u=new Qh(g.count,!0);return{text:n,position:I,bondSet:u,bondStore:g}},t.prototype.getBondData=function(A,t,e){var i=A.getBondData(this.getBondParams(t,e));return i.picking&&(i.picking=new RN(i.picking.array,i.picking.structure,e.bondStore)),i},t.prototype.createData=function(A){if(A.atomCount&&this.atomPair.length){var t=this.atomPair.length,e=new Pi(this.labelColor),i=this.getDistanceData(A,this.atomPair);this.textBuffer=new Rj({position:i.position,size:TC(t,this.labelSize),color:hC(t,e.r,e.g,e.b),text:i.text},this.getLabelBufferParams());var n={bondSet:i.bondSet,bondStore:i.bondStore},I=this.getBondData(A,{position:!0,color:!0,picking:!0,radius:this.useCylinder},n);return this.useCylinder?this.distanceBuffer=new aB(I,this.getBufferParams({openEnded:this.openEnded,radialSegments:this.radialSegments,disableImpostor:this.disableImpostor,dullInterior:!0})):this.distanceBuffer=new Wj(Mh(I),this.getBufferParams({linewidth:this.linewidth,visible:this.lineVisible,opacity:this.lineOpacity})),{bondSet:i.bondSet,bondStore:i.bondStore,position:i.position,bufferList:[this.textBuffer,this.distanceBuffer]}}},t.prototype.updateData=function(t,e){A.prototype.updateData.call(this,t,e);var i={bondSet:e.bondSet,bondStore:e.bondStore},n=this.getBondData(e.sview,t,i),I={};t&&!t.color||Object.assign(I,{color:n.color,color2:n.color2}),t&&!t.radius||Object.assign(I,{radius:n.radius}),this.distanceBuffer.setAttributes(I)},t.prototype.setParameters=function(t){return A.prototype.setParameters.call(this,t,{},!1),this.useCylinder||(t&&t.lineOpacity&&this.distanceBuffer.setParameters({opacity:t.lineOpacity}),t&&void 0!==t.opacity&&this.distanceBuffer.setParameters({opacity:this.lineOpacity}),t&&t.linewidth&&this.distanceBuffer.setParameters({linewidth:t.linewidth})),this},t}(Yj);function fB(A){return A.position.length/3*2*3}zl.add("distance",LB);var zB=Object.assign({scale:1,color:"grey"},bd),wB=function(A){function t(t,e){void 0===e&&(e={}),A.call(this,{position:new Float32Array(fB(t)),color:new Float32Array(fB(t))},e),this.isLine=!0,this.vertexShader="Line.vert",this.fragmentShader="Line.frag";var i=new Pi(this.parameters.color),n=this.geometry.attributes;hC(fB(t)/3,i.r,i.g,i.b,n.color.array),this.setAttributes(t)}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={defaultParameters:{configurable:!0}};return e.defaultParameters.get=function(){return zB},t.prototype.setAttributes=function(A){void 0===A&&(A={});var t,e,i,n=this.geometry.attributes;A.position&&A.vector&&(t=A.position,e=A.vector,i=n.position.array,n.position.needsUpdate=!0);var I=this.size/2,r=this.parameters.scale;if(t&&e)for(var o=0;o radius2) {\nspaceposition.y = mapping.y * 1.5 * radius1;\nspaceposition.x = mapping.x * 1.5 * radius1;\n} else {\nspaceposition.y = mapping.y * 1.5 * radius2;\nspaceposition.x = mapping.x * 1.5 * radius2;\n}\nspaceposition.w = 1.0;\nvec4 e3 = vec4( 1.0 );\nvec3 e1, e1_temp, e2, e2_temp;\ne3.xyz = normalize(position_atom1-position_atom2);\nif (e3.z == 0.0) { e3.z = 0.0000000000001;}\nif ( (position_atom1.x - position_atom2.x) == 0.0) { position_atom1.x += 0.001;}\nif ( (position_atom1.y - position_atom2.y) == 0.0) { position_atom1.y += 0.001;}\nif ( (position_atom1.z - position_atom2.z) == 0.0) { position_atom1.z += 0.001;}\nvec4 focus = vec4( 1.0 );\nfocus.x = ( position_atom1.x*position_atom1.x - position_atom2.x*position_atom2.x +\n( radius2*radius2 - radius1*radius1 )*e3.x*e3.x/shrink )/(2.0*(position_atom1.x - position_atom2.x));\nfocus.y = ( position_atom1.y*position_atom1.y - position_atom2.y*position_atom2.y +\n( radius2*radius2 - radius1*radius1 )*e3.y*e3.y/shrink )/(2.0*(position_atom1.y - position_atom2.y));\nfocus.z = ( position_atom1.z*position_atom1.z - position_atom2.z*position_atom2.z +\n( radius2*radius2 - radius1*radius1 )*e3.z*e3.z/shrink )/(2.0*(position_atom1.z - position_atom2.z));\ne1.x = 1.0;\ne1.y = 1.0;\ne1.z = ( (e3.x*focus.x + e3.y*focus.y + e3.z*focus.z) - e1.x*e3.x - e1.y*e3.y)/e3.z;\ne1_temp = e1 - focus.xyz;\ne1 = normalize(e1_temp);\ne2_temp = e1.yzx * e3.zxy - e1.zxy * e3.yzx;\ne2 = normalize(e2_temp);\nmat3 R= mat3( e1.xyz, e2.xyz, e3.xyz );\nvertex_position.xyz = R * spaceposition.xyz;\nvertex_position.w = 1.0;\nvertex_position.x += (position_atom1.x+position_atom2.x) / 2.0;\nvertex_position.y += (position_atom1.y+position_atom2.y) / 2.0;\nvertex_position.z += (position_atom1.z+position_atom2.z) / 2.0;\ngl_Position = modelViewProjectionMatrix * vertex_position;\nvec4 i_near, i_far;\nvec4 near = gl_Position;\nnear.z = 0.0 ;\nnear = modelViewProjectionMatrixInverse * near;\ni_near = near;\nvec4 far = gl_Position;\nfar.z = far.w ;\ni_far = modelViewProjectionMatrixInverse * far;\nprime1 = vec4( position_atom1 - (position_atom1 - focus.xyz)*shrink, 1.0 );\nprime2 = vec4( position_atom2 - (position_atom2 - focus.xyz)*shrink, 1.0 );\nfloat Rsquare = (radius1*radius1/shrink) - (\n(position_atom1.x - focus.x)*(position_atom1.x - focus.x) +\n(position_atom1.y - focus.y)*(position_atom1.y - focus.y) +\n(position_atom1.z - focus.z)*(position_atom1.z - focus.z)\n);\nfocus.w = Rsquare;\nmatrix_near = mat4( i_near, i_far, focus, e3 );\ngl_Position.z = 1.0;\n}"),ml.add("shader/HyperballStickImpostor.frag","#define STANDARD\n#define IMPOSTOR\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 interiorColor;\nuniform float interiorDarkening;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\nuniform float clipNear;\nuniform float shrink;\nuniform mat4 modelViewMatrix;\nuniform mat4 modelViewProjectionMatrix;\nuniform mat4 modelViewMatrixInverseTranspose;\nuniform mat4 projectionMatrix;\nvarying mat4 matrix_near;\nvarying vec4 prime1;\nvarying vec4 prime2;\nvarying float vRadius;\nvarying float vRadius2;\n#ifdef PICKING\nuniform float objectId;\nvarying vec3 vPickingColor;\n#else\nvarying vec3 vColor1;\nvarying vec3 vColor2;\n#include common\n#include fog_pars_fragment\n#include bsdfs\n#include lights_pars_begin\n#include lights_physical_pars_fragment\n#endif\nbool interior = false;\nfloat calcClip( vec4 cameraPos ){\nreturn dot( cameraPos, vec4( 0.0, 0.0, 1.0, clipNear - 0.5 ) );\n}\nfloat calcClip( vec3 cameraPos ){\nreturn calcClip( vec4( cameraPos, 1.0 ) );\n}\nfloat calcDepth( in vec3 cameraPos ){\nvec2 clipZW = cameraPos.z * projectionMatrix[2].zw + projectionMatrix[3].zw;\nreturn 0.5 + 0.5 * clipZW.x / clipZW.y;\n}\nstruct Ray {\nvec3 origin ;\nvec3 direction ;\n};\nbool cutoff_plane (vec3 M, vec3 cutoff, vec3 x3){\nfloat a = x3.x;\nfloat b = x3.y;\nfloat c = x3.z;\nfloat d = -x3.x*cutoff.x-x3.y*cutoff.y-x3.z*cutoff.z;\nfloat l = a*M.x+b*M.y+c*M.z+d;\nif (l<0.0) {return true;}\nelse{return false;}\n}\nvec3 isect_surf(Ray r, mat4 matrix_coef){\nvec4 direction = vec4(r.direction, 0.0);\nvec4 origin = vec4(r.origin, 1.0);\nfloat a = dot(direction,(matrix_coef*direction));\nfloat b = dot(origin,(matrix_coef*direction));\nfloat c = dot(origin,(matrix_coef*origin));\nfloat delta =b*b-a*c;\ngl_FragColor.a = 1.0;\nif (delta<0.0){\ndiscard;\n}\nfloat t1 =(-b-sqrt(delta))/a;\nreturn r.origin+t1*r.direction;\n}\nvec3 isect_surf2(Ray r, mat4 matrix_coef){\nvec4 direction = vec4(r.direction, 0.0);\nvec4 origin = vec4(r.origin, 1.0);\nfloat a = dot(direction,(matrix_coef*direction));\nfloat b = dot(origin,(matrix_coef*direction));\nfloat c = dot(origin,(matrix_coef*origin));\nfloat delta =b*b-a*c;\ngl_FragColor.a = 1.0;\nif (delta<0.0){\ndiscard;\n}\nfloat t2 =(-b+sqrt(delta))/a;\nreturn r.origin+t2*r.direction;\n}\nRay primary_ray(vec4 near1, vec4 far1){\nvec3 near=near1.xyz/near1.w;\nvec3 far=far1.xyz/far1.w;\nreturn Ray(near,far-near);\n}\nfloat update_z_buffer(vec3 M, mat4 ModelViewP){\nfloat depth1;\nvec4 Ms=(ModelViewP*vec4(M,1.0));\nreturn depth1=(1.0+Ms.z/Ms.w)/2.0;\n}\nvoid main(){\nfloat radius = max( vRadius, vRadius2 );\nvec4 i_near, i_far, focus;\nvec3 e3, e1, e1_temp, e2;\ni_near = vec4(matrix_near[0][0],matrix_near[0][1],matrix_near[0][2],matrix_near[0][3]);\ni_far = vec4(matrix_near[1][0],matrix_near[1][1],matrix_near[1][2],matrix_near[1][3]);\nfocus = vec4(matrix_near[2][0],matrix_near[2][1],matrix_near[2][2],matrix_near[2][3]);\ne3 = vec3(matrix_near[3][0],matrix_near[3][1],matrix_near[3][2]);\ne1.x = 1.0;\ne1.y = 1.0;\ne1.z = ( (e3.x*focus.x + e3.y*focus.y + e3.z*focus.z) - e1.x*e3.x - e1.y*e3.y)/e3.z;\ne1_temp = e1 - focus.xyz;\ne1 = normalize(e1_temp);\ne2 = normalize(cross(e1,e3));\nvec4 equation = focus;\nfloat shrinkfactor = shrink;\nfloat t1 = -1.0/(1.0-shrinkfactor);\nfloat t2 = 1.0/(shrinkfactor);\nvec4 colonne1, colonne2, colonne3, colonne4;\nmat4 mat;\nvec3 equation1 = vec3(t2,t2,t1);\nfloat A1 = - e1.x*equation.x - e1.y*equation.y - e1.z*equation.z;\nfloat A2 = - e2.x*equation.x - e2.y*equation.y - e2.z*equation.z;\nfloat A3 = - e3.x*equation.x - e3.y*equation.y - e3.z*equation.z;\nfloat A11 = equation1.x*e1.x*e1.x + equation1.y*e2.x*e2.x + equation1.z*e3.x*e3.x;\nfloat A21 = equation1.x*e1.x*e1.y + equation1.y*e2.x*e2.y + equation1.z*e3.x*e3.y;\nfloat A31 = equation1.x*e1.x*e1.z + equation1.y*e2.x*e2.z + equation1.z*e3.x*e3.z;\nfloat A41 = equation1.x*e1.x*A1 + equation1.y*e2.x*A2 + equation1.z*e3.x*A3;\nfloat A22 = equation1.x*e1.y*e1.y + equation1.y*e2.y*e2.y + equation1.z*e3.y*e3.y;\nfloat A32 = equation1.x*e1.y*e1.z + equation1.y*e2.y*e2.z + equation1.z*e3.y*e3.z;\nfloat A42 = equation1.x*e1.y*A1 + equation1.y*e2.y*A2 + equation1.z*e3.y*A3;\nfloat A33 = equation1.x*e1.z*e1.z + equation1.y*e2.z*e2.z + equation1.z*e3.z*e3.z;\nfloat A43 = equation1.x*e1.z*A1 + equation1.y*e2.z*A2 + equation1.z*e3.z*A3;\nfloat A44 = equation1.x*A1*A1 + equation1.y*A2*A2 + equation1.z*A3*A3 - equation.w;\ncolonne1 = vec4(A11,A21,A31,A41);\ncolonne2 = vec4(A21,A22,A32,A42);\ncolonne3 = vec4(A31,A32,A33,A43);\ncolonne4 = vec4(A41,A42,A43,A44);\nmat = mat4(colonne1,colonne2,colonne3,colonne4);\nRay ray = primary_ray(i_near,i_far) ;\nvec3 M;\nM = isect_surf(ray, mat);\nif (cutoff_plane(M, prime1.xyz, -e3) || cutoff_plane(M, prime2.xyz, e3)){ discard; }\nvec4 M1 = vec4(M,1.0);\nvec4 M2 = mat*M1;\nvec3 _normal = ( modelViewMatrixInverseTranspose * M2 ).xyz;\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix) ;\n#ifdef NEAR_CLIP\nif( calcClip( modelViewMatrix * vec4( M, 1.0 ) ) > 0.0 ){\nM = isect_surf2(ray, mat);\nif( calcClip( modelViewMatrix * vec4( M, 1.0 ) ) > 0.0 )\ndiscard;\ninterior = true;\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix) ;\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = max( 0.0, calcDepth( vec3( - ( clipNear - 0.5 ) ) ) + ( 0.0000001 / radius ) );\n}\n}else if( gl_FragDepthEXT <= 0.0 ){\nM = isect_surf2(ray, mat);\ninterior = true;\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix);\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / radius );\n}\n}\n#else\nif( gl_FragDepthEXT <= 0.0 ){\nM = isect_surf2(ray, mat);\ninterior = true;\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix) ;\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / radius );\n}\n}\n#endif\nif (cutoff_plane(M, prime1.xyz, -e3) || cutoff_plane(M, prime2.xyz, e3)){ discard; }\nif (gl_FragDepthEXT < 0.0)\ndiscard;\nif (gl_FragDepthEXT > 1.0)\ndiscard;\nfloat distance_ratio = ((M.x-prime2.x)*e3.x + (M.y-prime2.y)*e3.y +(M.z-prime2.z)*e3.z) /\ndistance(prime2.xyz,prime1.xyz);\n#ifdef PICKING\nif( opacity < 0.3 )\ndiscard;\ngl_FragColor = vec4( vPickingColor, objectId );\n#else\nvec3 vViewPosition = -( modelViewMatrix * vec4( M, 1.0 ) ).xyz;\nvec3 vNormal = _normal;\nvec3 vColor;\nif( distance_ratio>0.5 ){\nvColor = vColor1;\n}else{\nvColor = vColor2;\n}\nvec4 diffuseColor = vec4( diffuse, opacity );\nReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\nvec3 totalEmissiveLight = emissive;\n#include color_fragment\n#include roughnessmap_fragment\n#include metalnessmap_fragment\nvec3 normal = normalize( vNormal );\nvec3 geometryNormal = normal;\n#include lights_physical_fragment\n#include lights_fragment_begin\n#include lights_fragment_end\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;\nif( interior ){\n#ifdef USE_INTERIOR_COLOR\noutgoingLight.xyz = interiorColor;\n#else\n#ifdef DIFFUSE_INTERIOR\noutgoingLight.xyz = vColor;\n#endif\n#endif\noutgoingLight.xyz *= 1.0 - interiorDarkening;\n}\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n#endif\n}");var SB=new Float32Array([-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1]),YB=new Uint16Array([0,1,2,0,2,3,1,5,6,1,6,2,4,6,5,4,7,6,0,7,4,0,3,7,0,5,1,0,4,5,3,2,6,3,6,7]),OB=function(A){function t(t,e){void 0===e&&(e={}),A.call(this,"v3",t,e)}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={mapping:{configurable:!0},mappingIndices:{configurable:!0},mappingIndicesSize:{configurable:!0},mappingSize:{configurable:!0},mappingItemSize:{configurable:!0}};return e.mapping.get=function(){return SB},e.mappingIndices.get=function(){return YB},e.mappingIndicesSize.get=function(){return 36},e.mappingSize.get=function(){return 8},e.mappingItemSize.get=function(){return 3},Object.defineProperties(t.prototype,e),t}(_E),vB=Object.assign({shrink:.14},bd),UB=Object.assign({shrink:{uniform:!0}},Pd),bB=function(A){function t(t,e){void 0===e&&(e={}),A.call(this,t,e),this.parameterTypes=UB,this.isImpostor=!0,this.vertexShader="HyperballStickImpostor.vert",this.fragmentShader="HyperballStickImpostor.frag",this.addUniforms({modelViewProjectionMatrix:{value:new we},modelViewProjectionMatrixInverse:{value:new we},modelViewMatrixInverseTranspose:{value:new we},shrink:{value:this.parameters.shrink}}),this.addAttributes({position1:{type:"v3",value:null},position2:{type:"v3",value:null},color2:{type:"c",value:null},radius:{type:"f",value:null},radius2:{type:"f",value:null}}),this.setAttributes(t),this.makeMapping()}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={defaultParameters:{configurable:!0}};return e.defaultParameters.get=function(){return vB},Object.defineProperties(t.prototype,e),t}(OB);Object.assign({disableImpostor:!1},AB,vB);var PB=function(A,t){return void 0===t&&(t={}),!El||t&&t.disableImpostor?(A.radius=function(A,t){for(var e=A.length,i=new Float32Array(e),n=0;n0;)i[o]=arguments[o+3];for(var g=r(A,t,e),a=0;aa?c[C]=-1:(g=Math.sqrt(a-o),c[C]=Math.floor(g)),++C;l[T]=s,u[T]=c}}function f(e){var i,n,I,o,s,C,N,y,E,D,B,x,p,L,f,z,w,m,Q=3*e,S=e;i=Math.floor(.5+r*(A[Q]+c[0])),n=Math.floor(.5+r*(A[Q+1]+c[1])),I=Math.floor(.5+r*(A[Q+2]+c[2]));var Y,O=t[S],v=u[O],U=0,b=a*M,P=l[O];for(D=0;D=g||L>=a||f>=M)){var k=p*b+L*M+f;if(T)if(h[k]&j){if(h[k]&j){var G=d[k];G!==Q&&N*N+y*y+E*E<(o=i+N-Math.floor(.5+r*(A[G]+c[0])))*o+(s=n+y-Math.floor(.5+r*(A[G+1]+c[1])))*s+(C=I+E-Math.floor(.5+r*(A[G+2]+c[2])))*C&&(d[k]=e)}}else h[k]|=j,d[k]=e;else h[k]|=j}U++}}function z(t){var e,i;for(console.time("EDTSurface fillvoxels"),e=0,i=h.length;e=g||j>=a||x>=M)){var b=D*U+j*M+x;if(h[b]&B){if(T){var P=d[b];N*N+y*y+E*E<(o=Math.floor(.5+r*(A[P]+c[0])))*o+(s=Math.floor(.5+r*(A[P+1]+c[1])))*s+(C=Math.floor(.5+r*(A[P+2]+c[2])))*C&&(d[b]=e)}}else h[b]|=B,T&&(d[b]=e)}O++}}function m(){var A,t,e,i;console.time("EDTSurface fastdistancemap");var n,I=HB(g,a,M,Uint16Array,3),r=a*M,s=C*C,c=0;for(A=0;A0);var D,p=o*o,L=new Uint16Array(3);for(A=0;A=p)||(h[n]|=x,T&&h[n]&B&&(I.toArray(A,t,e,L),D=L[0]*r+L[1]*M+L[2],d[n]=d[D])));console.timeEnd("EDTSurface fastdistancemap")}function Q(A,t,e,i){var n,I,r,o,s,c,u,l,C,T,d,y,E=new Uint16Array(3),D=0;if(0===e)return D;var L=-1,f=-1,z=-1,w=a*M;for(u=0,C=e;u-1&&f-1&&z-1&&(h[d=L*w+M*f+z]&j&&!(h[d]&B)?(t.fromArray(L,f,z,E),T=(o=L-E[0])*o+(s=f-E[1])*s+(c=z-E[2])*c,N[d]=T,h[d]|=B,h[d]|=x,i[D]=L,i[D+1]=f,i[D+2]=z,D+=3):h[d]&j&&h[d]&B&&(T=(o=L-E[0])*o+(s=f-E[1])*s+(c=z-E[2])*c)-1&&f-1&&z-1&&(h[d=L*w+M*f+z]&j&&!(h[d]&B)?(t.fromArray(L,f,z,E),T=(o=L-E[0])*o+(s=f-E[1])*s+(c=z-E[2])*c,N[d]=T,h[d]|=B,h[d]|=x,i[D]=L,i[D+1]=f,i[D+2]=z,D+=3):h[d]&j&&h[d]&B&&(T=(o=L-E[0])*o+(s=f-E[1])*s+(c=z-E[2])*c)-1&&f-1&&z-1&&(h[d=L*w+M*f+z]&j&&!(h[d]&B)?(t.fromArray(L,f,z,E),T=(o=L-E[0])*o+(s=f-E[1])*s+(c=z-E[2])*c,N[d]=T,h[d]|=B,h[d]|=x,i[D]=L,i[D+1]=f,i[D+2]=z,D+=3):h[d]&j&&h[d]&B&&(T=(o=L-E[0])*o+(s=f-E[1])*s+(c=z-E[2])*c)-1&&r-1&&s-1&&ow&&(w=Y)}return{neighbourListLength:27*w+1,withinRadii:function(n,I,r,o,s){for(var c=0,u=l(n,g),C=l(I,a),T=l(r,M),h=Math.max(0,u-1),E=Math.max(0,C-1),j=Math.max(0,T-1),B=Math.min(N,u+2),x=Math.min(d,C+2),z=Math.min(y,T+2),w=h;wc&&(c=M[S]);var Y;Y=zd(z,w,c,l,0),l=Y.scaleFactor,h=Y.dim,N=Y.matrix,f=Math.max(5,2+Math.floor(u*l)),d=TC(h[0]*h[1]*h[2],-1001),y=new Int32Array(d.length),E=new Float32Array(h[0]),D=new Float32Array(h[1]),j=new Float32Array(h[2]),U(E,z[0],1/l),U(D,z[1],1/l),U(j,z[2],1/l),function(){var A=0,t=2*Math.PI/T;x=new Float32Array(T),B=new Float32Array(T);for(var e=0;e=0;){if(I!==i&&I!==n&&P(I,A,t,e))return m=I,I;I=L[++r]}return m=-1,-1}function P(t,e,i,n){var I=3*t,r=s[t],o=A[I]-e,g=A[I+1]-i,a=A[I+2]-n;return o*o+g*g+a*a0&&u=0;)A0)continue;var hA=void 0,NA=void 0,dA=void 0,yA=void 0,EA=0;if(P){if(EA=10===(yA=M.split(ip)).length?1:0,N=yA[2],W&&"CA"!==N)continue;hA=parseFloat(yA[6-EA]),NA=parseFloat(yA[7-EA]),dA=parseFloat(yA[8-EA])}else{if(N=M.substr(12,4).trim(),W&&"CA"!==N)continue;hA=parseFloat(M.substr(30,8)),NA=parseFloat(M.substr(38,8)),dA=parseFloat(M.substr(46,8))}if(V){var DA=3*r;if(I[DA+0]=hA,I[DA+1]=NA,I[DA+2]=dA,r+=1,_)continue}var jA=void 0;P?(c=parseInt(yA[1]),jA="",d="H"===M[0]?1:0,u=EA?"":yA[4],l=parseInt(yA[5-EA]),h="",C=yA[3],E="",T=1):(c=parseInt(M.substr(6,5),H),J&&99999===c&&(H=16),d="H"===M[0]?1:0,u=M.substr(20,2).trim(),l=parseInt(M.substr(22,4),R),J&&9999===l&&(R=16),h=M[26].trim(),C=M.substr(17,3).trim()||"MOL",y=parseFloat(M.substr(60,6)),E=M[16].trim(),T=parseFloat(M.substr(54,6)),t||(k?jA=M.substr(12,2).trim():(jA=M.substr(76,2).trim(),u||(u=M.substr(72,4).trim())),D=parseInt((M.substr(79,1)+M.substr(78,1)).trim()))),sA.growIfFull(),sA.atomTypeId[lA]=MA.add(N,jA),sA.x[lA]=hA,sA.y[lA]=NA,sA.z[lA]=dA,sA.serial[lA]=c,sA.altloc[lA]=E.charCodeAt(0),sA.occupancy[lA]=isNaN(T)?0:T,P?(sA.partialCharge[lA]=parseFloat(yA[9-EA]),sA.radius[lA]=parseFloat(yA[10-EA])):(sA.bfactor[lA]=isNaN(y)?0:y,k&&(sA.partialCharge[lA]=parseFloat(M.substr(70,6))),isFinite(D)&&(sA.formalCharge||sA.addField("formalCharge",1,"int8"),sA.formalCharge[lA]=D));var BA=np(l,u,h);!d||nA[BA]||tp.includes(C)?S||Y===u||(Q=(m+=1).toString()):Y===u&&v===C&&(IN.includes(C)||O===l&&U===h)||(Q=(m+=1).toString(),O=l,v=C,U=h),F.addAtom(CA,u,Q,C,l,d,void 0,h),$[c]=lA,lA+=1,S=!1,Y=u}else if("CONECT"===s){var xA=$[parseInt(M.substr(6,5))],pA=[11,16,21,26],LA={};if(void 0===xA)continue;for(var fA=0;fA<4;++fA){var zA=parseInt(M.substr(pA[fA],5));if(!Number.isNaN(zA)&&void 0!==(zA=$[zA]))if(xA0)continue;var rA=nA[g].replace(gp,"");if(L&&"CA"!==rA)continue;var oA=parseFloat(nA[N]),gA=parseFloat(nA[d]),aA=parseFloat(nA[y]);if(p){var MA=3*e;if(t[MA+0]=oA,t[MA+1]=gA,t[MA+2]=aA,e+=1,V>0)continue}var sA=nA[a],cA=parseInt(nA[-1!==r?r:o]),uA=nA[h];uA="?"===uA?"":uA;var lA=nA[I],CA=nA[M],TA="H"===nA[u][0]?1:0,hA=nA[C],NA=parseFloat(nA[E]),dA=parseFloat(nA[D]),yA=nA[c];if(yA="."===yA?"":yA,H.growIfFull(),H.atomTypeId[X]=J.add(rA,hA),H.x[X]=oA,H.y[X]=gA,H.z[X]=aA,H.serial[X]=parseInt(nA[l]),H.bfactor[X]=isNaN(NA)?0:NA,H.occupancy[X]=isNaN(dA)?0:dA,H.altloc[X]=yA.charCodeAt(0),B.addAtom(V,lA,CA,sA,cA,TA,void 0,uA),A.Debug){var EA=w[CA];void 0!==EA&&EA!==lA&&A.Debug&&jl.warn(EA,lA)}w[CA]=lA;var DA=nA[s];m[DA]||(m[DA]=new Set),m[DA].add(j.chainStore.count-1),X+=1}else{var jA=n.match(op),BA=jA.length;b===U.length&&(b=0);for(var xA=0;xAu*u)return i.growIfFull(),i.atomTypeId[l]=i.atomTypeId[A],i.x[l]=s.x,i.y[l]=s.y,i.z[l]=s.z,i.occupancy[l]=i.occupancy[A],i.serial[l]=l,i.altloc[l]="A".charCodeAt(0),e.addAtom(0,"","","HET",1,!0),void(l+=1)}}}))},N=0;N0){I=I.split("(");var g=o(I[0]),a=o(I[1]);Object.keys(g).forEach((function(A){Object.keys(a).forEach((function(t){var e=new we;e.multiplyMatrices(g[A],a[t]),i[A+"x"+t]=e}))}))}else i=o(I);var M=[];for(var s in i)M.push(i[s]);var c=A;/^(0|[1-9][0-9]*)$/.test(c)&&(c="BU"+c);for(var u=r.asym_id_list[t].split(","),l=0,C=u.length;lj){var B=D;D=j,j=B;var x=C;C=y,y=x}if(0!==D&&0!==j)for(var p=0;pd)continue}c=L.substr(5,5).trim(),u=parseInt(L.substr(0,5)),l=parseInt(L.substr(15,5)),E.growIfFull(),E.atomTypeId[D]=y.add(s),E.x[D]=w,E.y[D]=m,E.z[D]=Q,E.serial[D]=l,n.addAtom(j,"","",c,u,0,"l"),D+=1}}}(0,A.length,A)})),n.finalize(),i.finalizeAtoms(),$y(i),AE(i),i.finalizeBonds(),Ky(i),A.Debug&&jl.timeEnd("GroParser._parse "+this.name)},Object.defineProperties(e.prototype,i),e}(Zx);wl.add("gro",Tp);var hp=["mmtfVersion","mmtfProducer","unitCell","spaceGroup","structureId","title","depositionDate","releaseDate","experimentalMethods","resolution","rFree","rWork","bioAssemblyList","ncsOperatorList","entityList","groupList","numBonds","numAtoms","numGroups","numChains","numModels","groupsPerChain","chainsPerModel"].concat(["xCoordList","yCoordList","zCoordList","groupIdList","groupTypeList","chainIdList","bFactorList","atomIdList","altLocList","occupancyList","secStructList","insCodeList","sequenceIndexList","chainNameList","bondAtomList","bondOrderList"]);function Np(A,t,e){return t?new A(t.buffer,t.byteOffset,t.byteLength/(e||1)):void 0}function dp(A){return Np(DataView,A)}function yp(A){return Np(Int8Array,A)}function Ep(A){return Np(Int32Array,A,4)}function Dp(A,t){var e=A.length/2;t||(t=new Int16Array(e));for(var i=0,n=0;iI&&++o;t=new Int32Array(o)}for(e=0,i=0;en){for(var I=[],r=0;r0&&(T.biomolDict.NCS=sA)}var uA=h.unitCell;uA&&Array.isArray(uA)&&uA[0]?T.unitcell=new $x({a:uA[0],b:uA[1],c:uA[2],alpha:uA[3],beta:uA[4],gamma:uA[5],spacegroup:h.spaceGroup}):T.unitcell=void 0,nE(T,!0),iE(T,!0),T.finalizeAtoms(),T.finalizeBonds(),IE(T),A.Debug&&jl.timeEnd("MmtfParser._parse "+this.name)},Object.defineProperties(e.prototype,i),e}(Zx);wl.add("mmtf",Qp);var Sp=/\s+/,Yp={1:1,2:2,3:3,am:1,ar:1,du:1,un:1,nc:0},Op=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={type:{configurable:!0}};return i.type.get=function(){return"mol2"},e.prototype._parse=function(){A.Debug&&jl.time("Mol2Parser._parse "+this.name);var t,e,i=this.structure,n=this.structureBuilder,I=this.firstModelOnly,r=this.asTrajectory,o=i.frames,g=!1,a=i.atomMap,M=i.atomStore;M.resize(Math.round(this.streamer.data.length/60)),M.addField("partialCharge",1,"float32");var s=0,c=0,u=0,l=-1,C=0,T=0,h=i.getAtomProxy(),N=i.getAtomProxy();this.streamer.eachChunkOfLines((function(A){!function(A,d,y){for(var E=0;EMOLECULE"===D?(T=1,c=0,++l):"@ATOM"===D?(T=2,u=M.count,r&&(e=0,t=new Float32Array(3*C),o.push(t),l>0&&(g=!0))):T="@BOND"===D?3:0;else if(1===T){if(0===c)i.title=D,i.id=D;else if(1===c){var j=D.split(Sp);C=parseInt(j[0])}++c}else if(2===T){var B=D.split(Sp);if(I&&l>0)continue;var x=parseFloat(B[2]),p=parseFloat(B[3]),L=parseFloat(B[4]);if(r){var f=3*e;if(t[f+0]=x,t[f+1]=p,t[f+2]=L,e+=1,g)continue}var z=B[0],w=B[1],m=B[5].split(".")[0],Q=B[6]?parseInt(B[6]):1,S=B[7]?B[7]:"",Y=B[8]?parseFloat(B[8]):0;M.growIfFull(),M.atomTypeId[s]=a.add(w,m),M.x[s]=x,M.y[s]=p,M.z[s]=L,M.serial[s]=z,M.partialCharge[s]=Y,n.addAtom(l,"","",S,Q,1),s+=1}else if(3===T){if(I&&l>0)continue;if(r&&l>0)continue;var O=D.split(Sp);h.index=parseInt(O[1])-1+u,N.index=parseInt(O[2])-1+u;var v=Yp[O[3]];i.bondStore.addBond(h,N,v)}}}(0,A.length,A)})),n.finalize(),i.finalizeAtoms(),$y(i),iE(i,!0),nE(i,!0),i.finalizeBonds(),aE(i),Ky(i),A.Debug&&jl.timeEnd("Mol2Parser._parse "+this.name)},Object.defineProperties(e.prototype,i),e}(Zx);wl.add("mol2",Op);var vp=function(A){function t(){A.apply(this,arguments)}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={type:{configurable:!0}};return e.type.get=function(){return"pdbqt"},Object.defineProperties(t.prototype,e),t}(Ip);wl.add("pdbqt",vp);var Up=function(A){function t(){A.apply(this,arguments)}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={type:{configurable:!0}};return e.type.get=function(){return"pqr"},Object.defineProperties(t.prototype,e),t}(Ip);wl.add("pqr",Up);var bp=/> +<(.+)>/,Pp=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={type:{configurable:!0}};return i.type.get=function(){return"sdf"},e.prototype._parse=function(){A.Debug&&jl.time("SdfParser._parse "+this.name);var t=this.structure,e=this.structureBuilder,i=this.firstModelOnly,n=this.asTrajectory,I=this.streamer.peekLines(2);t.id=I[0].trim(),t.title=I[1].trim();var r,o,g=t.frames,a=!1,M=t.atomMap,s=t.atomStore;s.resize(Math.round(this.streamer.data.length/50)),s.addField("formalCharge",1,"int8");var c,u,l,C,T,h,N,d=t.getAtomProxy(),y=t.getAtomProxy(),E=0,D=0,j=0,B=0,x=[],p=!1,L={};t.extraData.sdf=x,this.streamer.eachChunkOfLines((function(A){!function(A,I,f){for(var z=0;z0&&(a=!0));else if(D>=C&&D0)continue;var m=parseFloat(w.substr(0,10)),Q=parseFloat(w.substr(10,10)),S=parseFloat(w.substr(20,10));if(n){var Y=3*o;if(r[Y+0]=m,r[Y+1]=Q,r[Y+2]=S,o+=1,a)continue}var O=w.substr(31,3).trim(),v=O+(E+1);s.growIfFull(),s.atomTypeId[E]=M.add(v,O),s.x[E]=m,s.y[E]=Q,s.z[E]=S,s.serial[E]=E,s.formalCharge[E]=0,e.addAtom(j,"","","HET",1,1),E+=1}else if(D>=h&&D0)continue;if(n&&j>0)continue;d.index=parseInt(w.substr(0,3))-1+B,y.index=parseInt(w.substr(3,3))-1+B;var U=parseInt(w.substr(6,3));t.bondStore.addBond(d,y,U)}else if(w.match(/M {2}CHG/))for(var b=parseInt(w.substr(6,3)),P=0,k=10;P0)jl.error("dcd format with fixed atoms unsupported, aborting");else{for(var h=r.NATOM,N=4*h,d=0,y=r.NSET;d=1&&(i.timeOffset=(r.ISTART-1)*i.deltaTime),A.Debug&&jl.timeEnd("DcdParser._parse "+this.name)}},Object.defineProperties(e.prototype,i),e}(Wp);function Kp(A,t){if(A)throw new TypeError("Not a valid NetCDF v3.x file: "+t)}function _p(A){A.offset%4!=0&&A.skip(4-A.offset%4)}function qp(A){var t=A.readUint32(),e=A.readChars(t);return _p(A),e}wl.add("dcd",Zp);var $p={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6};function AL(A){switch(Number(A)){case $p.BYTE:return"byte";case $p.CHAR:return"char";case $p.SHORT:return"short";case $p.INT:return"int";case $p.FLOAT:return"float";case $p.DOUBLE:return"double";default:return"undefined"}}function tL(A){switch(Number(A)){case $p.BYTE:case $p.CHAR:return 1;case $p.SHORT:return 2;case $p.INT:case $p.FLOAT:return 4;case $p.DOUBLE:return 8;default:return-1}}function eL(A){switch(String(A)){case"byte":return $p.BYTE;case"char":return $p.CHAR;case"short":return $p.SHORT;case"int":return $p.INT;case"float":return $p.FLOAT;case"double":return $p.DOUBLE;default:return-1}}function iL(A,t){if(1!==A){for(var e=new Array(A),i=0;i6,"non valid type "+r);var o=A.readUint32(),g=nL(A,r,o);_p(A),t[n]={name:I,type:AL(r),value:g}}return t}var gL=function(A){var t=new _l(A);t.setBigEndian(),Kp("CDF"!==t.readChars(3),"should start with CDF");var e=t.readByte();Kp(e>2,"unknown version"),this.header=function(A,t){var e={recordDimension:{length:A.readUint32()}};e.version=t;var i=function(A){var t,e,i,n=A.readUint32();if(n===IL)return Kp(A.readUint32()!==IL,"wrong empty tag for list of dimensions"),[];Kp(10!==n,"wrong tag for list of dimensions");var I=A.readUint32();t=new Array(I);for(var r=0;r6,"non valid type "+u);var l=A.readUint32(),C=A.readUint32();2===e&&(Kp(C>0,"offsets larger than 4GB not supported"),C=A.readUint32()),M[0]===t&&(I+=l),i[o]={name:g,dimensions:M,attributes:c,type:AL(u),size:l,offset:C,record:M[0]===t}}return{variables:i,recordStep:I}}(A,i.recordId,t);return e.variables=n.variables,e.recordDimension.recordStep=n.recordStep,e}(t,e),this.buffer=t},aL={version:{configurable:!0},recordDimension:{configurable:!0},dimensions:{configurable:!0},globalAttributes:{configurable:!0},variables:{configurable:!0}};aL.version.get=function(){return 1===this.header.version?"classic format":"64-bit offset format"},aL.recordDimension.get=function(){return this.header.recordDimension},aL.dimensions.get=function(){return this.header.dimensions},aL.globalAttributes.get=function(){return this.header.globalAttributes},aL.variables.get=function(){return this.header.variables},gL.prototype.hasDataVariable=function(A){return-1!==this.header.variables.findIndex((function(t){return t.name===A}))},gL.prototype.getDataVariable=function(A){var t;return Kp(void 0===(t="string"==typeof A?this.header.variables.find((function(t){return t.name===A})):A),"variable not found"),this.buffer.seek(t.offset),t.record?function(A,t,e){for(var i=eL(t.type),n=t.size?t.size/tL(i):1,I=e.length,r=new Array(I),o=e.recordStep,g=0;g=1&&(e.timeOffset=I[0]),I.length>=2&&(e.deltaTime=I[1]-I[0]),A.Debug&&jl.timeEnd("NctrajParser._parse "+this.name)},Object.defineProperties(e.prototype,i),e}(Wp);wl.add("nctraj",ML),wl.add("ncdf",ML),wl.add("nc",ML);var sL=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={type:{configurable:!0},isBinary:{configurable:!0}};return i.type.get=function(){return"trr"},i.isBinary.get=function(){return!0},e.prototype._parse=function(){A.Debug&&jl.time("TrrParser._parse "+this.name);for(var t=nu(this.streamer.data),e=new DataView(t),i=this.frames,n=i.coordinates,I=i.boxes,r=i.times,o=0;;){o+=8;var g=e.getInt32(o);o+=4,o+=g;var a=e.getInt32(o+8),M=e.getInt32(o+12),s=e.getInt32(o+16),c=e.getInt32(o+28),u=e.getInt32(o+32),l=e.getInt32(o+36),C=e.getInt32(o+40);o+=52;var T=a/9,h=3*C;if(8===T?r.push(e.getFloat64(o)):r.push(e.getFloat32(o)),o+=2*T,a){var N=new Float32Array(9);if(8===T)for(var d=0;d<9;++d)N[d]=10*e.getFloat64(o),o+=8;else for(var y=0;y<9;++y)N[y]=10*e.getFloat32(o),o+=4;I.push(N)}if(o+=M,o+=s,c){var E=void 0;if(8===T){E=new Float32Array(h);for(var D=0;D>8&65280|x>>24&255}E=new Float32Array(t,o,h);for(var p=0;p=t.byteLength)break}r.length>=1&&(i.timeOffset=r[0]),r.length>=2&&(i.deltaTime=r[1]-r[0]),A.Debug&&jl.timeEnd("TrrParser._parse "+this.name)},Object.defineProperties(e.prototype,i),e}(Wp);wl.add("trr",sL);var cL=new Uint32Array([0,0,0,0,0,0,0,0,0,8,10,12,16,20,25,32,40,50,64,80,101,128,161,203,256,322,406,512,645,812,1024,1290,1625,2048,2580,3250,4096,5060,6501,8192,10321,13003,16384,20642,26007,32768,41285,52015,65536,82570,104031,131072,165140,208063,262144,330280,416127,524287,660561,832255,1048576,1321122,1664510,2097152,2642245,3329021,4194304,5284491,6658042,8388607,10568983,13316085,16777216]);function uL(A){for(var t=1,e=0;A>=t&&e<32;)e++,t<<=1;return e}var lL=new Uint8Array(32);function CL(A,t){var e=1,i=0;lL[0]=1;for(var n=0;n>=8;for(;0!==r;)lL[I++]=255&r,r>>=8;e=I}var o=1;for(e--;lL[e]>=o;)i++,o*=2;return i+8*e}function TL(A,t,e,i){for(var n=(1<=8;)g|=(r=r<<8|t[o++])>>I<0&&(I>(I-=e)&(1<8;)hL[o++]=TL(A,t,8,r),i-=8;i>0&&(hL[o++]=TL(A,t,i,r));for(var g=e-1;g>0;g--){for(var a=0,M=o-1;M>=0;M--){var s=(a=a<<8|hL[M])/n[g]|0;hL[M]=s,a-=s*n[g]}I[g]=a}I[0]=hL[0]|hL[1]<<8|hL[2]<<16|hL[3]<<24}var dL=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={type:{configurable:!0},isBinary:{configurable:!0}};return i.type.get=function(){return"xtc"},i.isBinary.get=function(){return!0},e.prototype._parse=function(){A.Debug&&jl.time("XtcParser._parse "+this.name);for(var t=nu(this.streamer.data),e=new DataView(t),i=this.frames,n=i.coordinates,I=i.boxes,r=i.times,o=new Int32Array(6),g=new Int32Array(3),a=new Int32Array(3),M=new Uint32Array(3),s=new Float32Array(3),c=new Float32Array(3),u=0,l=new Int32Array(3),C=new Uint32Array(l.buffer);;){var T=void 0,h=e.getInt32(u+4);u+=12;var N=3*h;r.push(e.getFloat32(u)),u+=4;for(var d=new Float32Array(9),y=0;y<9;++y)d[y]=10*e.getFloat32(u),u+=4;if(I.push(d),h<=9){T=new Float32Array(h);for(var E=0;E16777215?(a[0]=uL(g[0]),a[1]=uL(g[1]),a[2]=uL(g[2]),x=0):x=CL(3,g);var p=e.getInt32(u);u+=4;var L=p-1,f=cL[L=9>L?9:L]/2|0,z=cL[p]/2|0;M[0]=M[1]=M[2]=cL[p];var w=4*Math.ceil(e.getInt32(u)/4);u+=4;var m=1/B,Q=0,S=0,Y=new Uint8Array(t,u);for(s[0]=s[1]=s[2]=0;S0){s[0]=s[1]=s[2]=0;for(var v=0;v9?cL[p-1]/2|0:0):O>0&&(f=z,z=cL[p]/2|0),M[0]=M[1]=M[2]=cL[p],0===M[0]||0===M[1]||0===M[2])return void console.error("(xdrfile error) Undefined error.")}u+=w}for(var b=0;b=t.byteLength)break}r.length>=1&&(i.timeOffset=r[0]),r.length>=2&&(i.deltaTime=r[1]-r[0]),A.Debug&&jl.timeEnd("XtcParser._parse "+this.name)},Object.defineProperties(e.prototype,i),e}(Wp);wl.add("xtc",dL);var yL=function(A){function t(t,e){var i=e||{};A.call(this,t,i),this.volume=new Sd(this.name,this.path),this.voxelSize=Hc(i.voxelSize,1)}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={type:{configurable:!0},__objName:{configurable:!0}};return e.type.get=function(){return"volume"},e.__objName.get=function(){return"volume"},t.prototype._afterParse=function(){this.volume.setMatrix(this.getMatrix()),A.prototype._afterParse.call(this)},t.prototype.getMatrix=function(){return new we},Object.defineProperties(t.prototype,e),t}(Vx),EL=/\s+/,DL=/-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/g,jL=.529177210859,BL=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={type:{configurable:!0}};return i.type.get=function(){return"cube"},e.prototype._parse=function(){A.Debug&&jl.time("CubeParser._parse "+this.name);var t=this.volume,e=this.streamer.peekLines(6),i={},n=jL*this.voxelSize;function I(A,t){var i=e[A].trim().split(EL)[t];return parseFloat(i)}i.atomCount=Math.abs(I(2,0)),i.originX=I(2,1)*jL,i.originY=I(2,2)*jL,i.originZ=I(2,3)*jL,i.NVX=I(3,0),i.NVY=I(4,0),i.NVZ=I(5,0),i.basisX=new De(I(3,1),I(3,2),I(3,3)).multiplyScalar(n),i.basisY=new De(I(4,1),I(4,2),I(4,3)).multiplyScalar(n),i.basisZ=new De(I(5,1),I(5,2),I(5,3)).multiplyScalar(n);var r=new Float32Array(i.NVX*i.NVY*i.NVZ),o=0,g=0,a=I(2,0)>0?0:1;this.streamer.eachChunkOfLines((function(A){!function(A,t,e){for(var n=0;n=i.atomCount+6+a)for(var M=I.match(DL),s=0,c=M.length;s>8&255}n.xStart=r[0],n.yStart=r[1],n.zStart=r[2],n.xExtent=r[3],n.yExtent=r[4],n.zExtent=r[5],n.xRate=r[6],n.yRate=r[7],n.zRate=r[8];var c=1/r[17],u=c*this.voxelSize;n.xlen=r[9]*u,n.ylen=r[10]*u,n.zlen=r[11]*u,n.alpha=r[12]*c,n.beta=r[13]*c,n.gamma=r[14]*c,t=r[15]/100,e=r[16],n.gamma=r[14]*c}i.header=n,A.Debug&&jl.log(n,t,e);for(var l=new Float32Array(n.xExtent*n.yExtent*n.zExtent),C=512,T=Math.ceil(n.xExtent/8),h=Math.ceil(n.yExtent/8),N=Math.ceil(n.zExtent/8),d=0;dI){var n=e[i].trim();if(""!==n)for(var M=n.split(pL),s=0,c=M.length;s=I&&(C-I)%u!=0&&l=0?e-1:e+t/3)},parseNormalIndex:function(A,t){var e=parseInt(A,10);return 3*(e>=0?e-1:e+t/3)},addVertex:function(A,t,e){var i=this.vertices,n=this.object.geometry.vertices;n.push(i[A+0]),n.push(i[A+1]),n.push(i[A+2]),n.push(i[t+0]),n.push(i[t+1]),n.push(i[t+2]),n.push(i[e+0]),n.push(i[e+1]),n.push(i[e+2])},addVertexLine:function(A){var t=this.vertices,e=this.object.geometry.vertices;e.push(t[A+0]),e.push(t[A+1]),e.push(t[A+2])},addNormal:function(A,t,e){var i=this.normals,n=this.object.geometry.normals;n.push(i[A+0]),n.push(i[A+1]),n.push(i[A+2]),n.push(i[t+0]),n.push(i[t+1]),n.push(i[t+2]),n.push(i[e+0]),n.push(i[e+1]),n.push(i[e+2])},addFace:function(A,t,e,i,n,I,r,o){var g,a=this.vertices.length,M=this.parseVertexIndex(A,a),s=this.parseVertexIndex(t,a),c=this.parseVertexIndex(e,a);if(void 0===i?this.addVertex(M,s,c):(g=this.parseVertexIndex(i,a),this.addVertex(M,s,g),this.addVertex(s,c,g)),void 0!==n){var u=this.normals.length;M=this.parseNormalIndex(n,u),s=n===I?M:this.parseNormalIndex(I,u),c=n===r?M:this.parseNormalIndex(r,u),void 0===i?this.addNormal(M,s,c):(g=this.parseNormalIndex(o,u),this.addNormal(M,s,g),this.addNormal(s,c,g))}},addLineGeometry:function(A){this.object.geometry.type="Line";for(var t=this.vertices.length,e=0,i=A.length;e0?d.setAttribute("normal",new Zi(new Float32Array(N.normals),3)):d.computeVertexNormals(),h.push(d)}}return h}};var WL=function(A){function t(){A.apply(this,arguments)}A&&(t.__proto__=A),t.prototype=Object.create(A&&A.prototype),t.prototype.constructor=t;var e={type:{configurable:!0}};return e.type.get=function(){return"obj"},t.prototype.getLoader=function(){return new VL},Object.defineProperties(t.prototype,e),t}(XL);wl.add("obj",WL);var ZL=function(){this.propertyNameMapping={}};ZL.prototype={constructor:ZL,setPropertyNameMapping:function(A){this.propertyNameMapping=A},bin2str:function(A){for(var t=new Uint8Array(A),e="",i=0;i=i.elements[r].count&&(r++,o=0);var M=this.parseASCIIElement(i.elements[r].properties,a);this.handleElement(e,i.elements[r].name,M),o++}}return this.postProcess(e)},postProcess:function(A){if(A.useColor){for(var t=0;t/g,""),{declaration:function(){if(e(/^<\?xml\s*/)){for(var A={attributes:{}};!i()&&!n("?>");){var I=t();if(!I)return A;A.attributes[I.name]=I.value}return e(/\?>\s*/),A}}(),root:function A(){var I=e(nf);if(I){for(var r,o={name:I[1],attributes:{},children:[]};!(i()||n(">")||n("?>")||n("/>"));){var g=t();if(!g)return o;o.attributes[g.name]=g.value}if(e(/^\s*\/>\s*/))return o;for(e(/\??>\s*/),o.content=function(){var A=e(If);return A?A[1]:""}();r=A();)o.children.push(r);return e(/^<\/[\w-:.]+>\s*/),o}}()};function t(){var A,t=e(rf);if(t)return{name:t[1],value:(A=t[2],A.replace(ef,""))}}function e(t){var e=A.match(t);if(e)return A=A.slice(e[0].length),e}function i(){return 0===A.length}function n(t){return 0===A.indexOf(t)}}(A)},e.prototype.__domParser=function(A){return(new window.DOMParser).parseFromString(A,"text/xml")},e.prototype._parse=function(){A.Debug&&jl.time("XmlParser._parse "+this.name),this.useDomParser?this.streamer.data instanceof Document?this.xml.data=this.streamer.data:this.xml.data=this.__domParser(this.streamer.asText()):this.xml.data=this.__xmlParser(this.streamer.asText()),A.Debug&&jl.timeEnd("XmlParser._parse "+this.name)},Object.defineProperties(e.prototype,i),e}(Vx);function gf(A,t){var e=A.getNamedItem(t);return null!==e?e.value:""}function af(A,t,e){void 0===e&&(e=!1);var i=gf(A,"icode").trim(),n=gf(A,"chain").trim(),I=gf(A,"altcode"),r=gf(A,"resnum");return i&&(r+="^"+i),n&&(r+=":"+n),t&&(r+="."+t),e&&I.trim()&&(r+="%"+I),r+"/"+(parseInt(gf(A,"model"))-1)}function Mf(A,t,e){void 0===A[t]?A[t]=e:A[t]|=e}function sf(A,t){return null!==A&&A.value===t}function cf(A,t,e){for(var i=0,n=t.getElementsByTagName("clash"),I=0,r=n.length;I0&&(i+=1),t.getElementsByTagName("bond-outlier").length>0&&(i+=1),t.getElementsByTagName("plane-outlier").length>0&&(i+=1),sf(e.getNamedItem("rota"),"OUTLIER")&&(i+=1),sf(e.getNamedItem("rama"),"OUTLIER")&&(i+=1),sf(e.getNamedItem("RNApucker"),"outlier")&&(i+=1),i}wl.add("xml",of);var uf=function(A,t){this.name=A,this.path=t,this.rsrzDict={},this.rsccDict={},this.rciDict={},this.clashDict={},this.clashArray=[],this.geoDict={},this.geoAtomDict={},this.atomDict={},this.clashSele="NONE"},lf={type:{configurable:!0}};lf.type.get=function(){return"validation"},uf.prototype.fromXml=function(t){A.Debug&&jl.time("Validation.fromXml");var e,i,n,I=this.rsrzDict,r=this.rsccDict,o=this.rciDict,g=this.clashDict,a=this.clashArray,M=this.geoDict,s=this.geoAtomDict,c=this.atomDict,u=t.getElementsByTagName("Entry");if(1===u.length){var l=u[0].getElementsByTagName("chemical_shift_list");if(1===l.length)for(var C=l[0].getElementsByTagName("random_coil_index"),T=0,h=C.length;T0&&(M[k]=G)}else{var F=b.getElementsByTagName("clash"),J=b.getElementsByTagName("mog-bond-outlier"),H=b.getElementsByTagName("mog-angle-outlier");if(J.length>0||H.length>0||F.length>0){var R={};s[k]=R;for(var X=0,V=F.length;X>>16&65535|0,r=0;0!==e;){e-=r=e>2e3?2e3:e;do{I=I+(n=n+t[i++]|0)|0}while(--r);n%=65521,I%=65521}return n|I<<16|0}wl.add("validation",Cf);var df=function(){for(var A,t=[],e=0;e<256;e++){A=e;for(var i=0;i<8;i++)A=1&A?3988292384^A>>>1:A>>>1;t[e]=A}return t}();function yf(A,t,e,i){var n=df,I=i+e;A^=-1;for(var r=i;r>>8^n[255&(A^t[r])];return-1^A}var Ef=30,Df=12;function jf(A,t){var e,i,n,I,r,o,g,a,M,s,c,u,l,C,T,h,N,d,y,E,D,j,B,x,p;e=A.state,i=A.next_in,x=A.input,n=i+(A.avail_in-5),I=A.next_out,p=A.output,r=I-(t-A.avail_out),o=I+(A.avail_out-257),g=e.dmax,a=e.wsize,M=e.whave,s=e.wnext,c=e.window,u=e.hold,l=e.bits,C=e.lencode,T=e.distcode,h=(1<>>=y=d>>>24,l-=y,0==(y=d>>>16&255))p[I++]=65535&d;else{if(!(16&y)){if(0==(64&y)){d=C[(65535&d)+(u&(1<>>=y,l-=y),l<15&&(u+=x[i++]<>>=y=d>>>24,l-=y,!(16&(y=d>>>16&255))){if(0==(64&y)){d=T[(65535&d)+(u&(1<g){A.msg="invalid distance too far back",e.mode=Ef;break A}if(u>>>=y,l-=y,D>(y=I-r)){if((y=D-y)>M&&e.sane){A.msg="invalid distance too far back",e.mode=Ef;break A}if(j=0,B=c,0===s){if(j+=a-y,y2;)p[I++]=B[j++],p[I++]=B[j++],p[I++]=B[j++],E-=3;E&&(p[I++]=B[j++],E>1&&(p[I++]=B[j++]))}else{j=I-D;do{p[I++]=p[j++],p[I++]=p[j++],p[I++]=p[j++],E-=3}while(E>2);E&&(p[I++]=p[j++],E>1&&(p[I++]=p[j++]))}break}}break}}while(i>3,u&=(1<<(l-=E<<3))-1,A.next_in=i,A.next_out=I,A.avail_in=i=1&&0===w[E];E--);if(D>E&&(D=E),0===E)return n[I++]=20971520,n[I++]=20971520,o.bits=1,0;for(y=1;y0&&(A===Lf||1!==E))return-1;for(m[1]=0,N=1;Nxf||A===zf&&p>pf)return 1;for(;;){l=N-B,r[d]u?(C=Q[S+r[d]],T=f[z+r[d]]):(C=96,T=0),g=1<>B)+(a-=g)]=l<<24|C<<16|T|0}while(0!==a);for(g=1<>=1;if(0!==g?(L&=g-1,L+=g):L=0,d++,0==--w[N]){if(N===E)break;N=t[e+r[d]]}if(N>D&&(L&s)!==M){for(0===B&&(B=D),c+=y,x=1<<(j=N-B);j+Bxf||A===zf&&p>pf)return 1;n[M=L&s]=D<<24|j<<16|c-I|0}}return 0!==L&&(n[c+L]=N-B<<24|64<<16|0),o.bits=D,0}var Of=1,vf=2,Uf=0,bf=-2,Pf=1,kf=12,Gf=30,Ff=852,Jf=592;function Hf(A){return(A>>>24&255)+(A>>>8&65280)+((65280&A)<<8)+((255&A)<<24)}function Rf(){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}function Xf(A,t){var e,i;return A?(i=new Rf,A.state=i,i.window=null,e=function(A,t){var e,i;return A&&A.state?(i=A.state,t<0?(e=0,t=-t):(e=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?bf:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=e,i.wbits=t,function(A){var t;return A&&A.state?((t=A.state).wsize=0,t.whave=0,t.wnext=0,function(A){var t;return A&&A.state?(t=A.state,A.total_in=A.total_out=t.total=0,A.msg="",t.wrap&&(A.adler=1&t.wrap),t.mode=Pf,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(Ff),t.distcode=t.distdyn=new Int32Array(Jf),t.sane=1,t.back=-1,Uf):bf}(A)):bf}(A))):bf}(A,t),e!==Uf&&(A.state=null),e):bf}var Vf,Wf,Zf=!0;function Kf(A){if(Zf){var t;for(Vf=new Int32Array(512),Wf=new Int32Array(32),t=0;t<144;)A.lens[t++]=8;for(;t<256;)A.lens[t++]=9;for(;t<280;)A.lens[t++]=7;for(;t<288;)A.lens[t++]=8;for(Yf(Of,A.lens,0,288,Vf,0,A.work,{bits:9}),t=0;t<32;)A.lens[t++]=5;Yf(vf,A.lens,0,32,Wf,0,A.work,{bits:5}),Zf=!1}A.lencode=Vf,A.lenbits=9,A.distcode=Wf,A.distbits=5}function _f(A,t,e,i){var n,I=A.state;return null===I.window&&(I.wsize=1<=I.wsize?(hf(I.window,t,e-I.wsize,I.wsize,0),I.wnext=0,I.whave=I.wsize):((n=I.wsize-I.wnext)>i&&(n=i),hf(I.window,t,e-i,n,I.wnext),(i-=n)?(hf(I.window,t,e-i,i,0),I.wnext=i,I.whave=I.wsize):(I.wnext+=n,I.wnext===I.wsize&&(I.wnext=0),I.whave>>8&255,e.check=yf(e.check,L,2,0),a=0,M=0,e.mode=2;break}if(e.flags=0,e.head&&(e.head.done=!1),!(1&e.wrap)||(((255&a)<<8)+(a>>8))%31){A.msg="incorrect header check",e.mode=Gf;break}if(8!=(15&a)){A.msg="unknown compression method",e.mode=Gf;break}if(M-=4,D=8+(15&(a>>>=4)),0===e.wbits)e.wbits=D;else if(D>e.wbits){A.msg="invalid window size",e.mode=Gf;break}e.dmax=1<>8&1),512&e.flags&&(L[0]=255&a,L[1]=a>>>8&255,e.check=yf(e.check,L,2,0)),a=0,M=0,e.mode=3;case 3:for(;M<32;){if(0===o)break A;o--,a+=i[I++]<>>8&255,L[2]=a>>>16&255,L[3]=a>>>24&255,e.check=yf(e.check,L,4,0)),a=0,M=0,e.mode=4;case 4:for(;M<16;){if(0===o)break A;o--,a+=i[I++]<>8),512&e.flags&&(L[0]=255&a,L[1]=a>>>8&255,e.check=yf(e.check,L,2,0)),a=0,M=0,e.mode=5;case 5:if(1024&e.flags){for(;M<16;){if(0===o)break A;o--,a+=i[I++]<>>8&255,e.check=yf(e.check,L,2,0)),a=0,M=0}else e.head&&(e.head.extra=null);e.mode=6;case 6:if(1024&e.flags&&((u=e.length)>o&&(u=o),u&&(e.head&&(D=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Array(e.head.extra_len)),hf(e.head.extra,i,I,u,D)),512&e.flags&&(e.check=yf(e.check,i,u,I)),o-=u,I+=u,e.length-=u),e.length))break A;e.length=0,e.mode=7;case 7:if(2048&e.flags){if(0===o)break A;u=0;do{D=i[I+u++],e.head&&D&&e.length<65536&&(e.head.name+=String.fromCharCode(D))}while(D&&u>9&1,e.head.done=!0),A.adler=e.check=0,e.mode=kf;break;case 10:for(;M<32;){if(0===o)break A;o--,a+=i[I++]<>>=7&M,M-=7&M,e.mode=27;break}for(;M<3;){if(0===o)break A;o--,a+=i[I++]<>>=1)){case 0:e.mode=14;break;case 1:if(Kf(e),e.mode=20,6===t){a>>>=2,M-=2;break A}break;case 2:e.mode=17;break;case 3:A.msg="invalid block type",e.mode=Gf}a>>>=2,M-=2;break;case 14:for(a>>>=7&M,M-=7&M;M<32;){if(0===o)break A;o--,a+=i[I++]<>>16^65535)){A.msg="invalid stored block lengths",e.mode=Gf;break}if(e.length=65535&a,a=0,M=0,e.mode=15,6===t)break A;case 15:e.mode=16;case 16:if(u=e.length){if(u>o&&(u=o),u>g&&(u=g),0===u)break A;hf(n,i,I,u,r),o-=u,I+=u,g-=u,r+=u,e.length-=u;break}e.mode=kf;break;case 17:for(;M<14;){if(0===o)break A;o--,a+=i[I++]<>>=5,M-=5,e.ndist=1+(31&a),a>>>=5,M-=5,e.ncode=4+(15&a),a>>>=4,M-=4,e.nlen>286||e.ndist>30){A.msg="too many length or distance symbols",e.mode=Gf;break}e.have=0,e.mode=18;case 18:for(;e.have>>=3,M-=3}for(;e.have<19;)e.lens[f[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,B={bits:e.lenbits},j=Yf(0,e.lens,0,19,e.lencode,0,e.work,B),e.lenbits=B.bits,j){A.msg="invalid code lengths set",e.mode=Gf;break}e.have=0,e.mode=19;case 19:for(;e.have>>16&255,N=65535&p,!((T=p>>>24)<=M);){if(0===o)break A;o--,a+=i[I++]<>>=T,M-=T,e.lens[e.have++]=N;else{if(16===N){for(x=T+2;M>>=T,M-=T,0===e.have){A.msg="invalid bit length repeat",e.mode=Gf;break}D=e.lens[e.have-1],u=3+(3&a),a>>>=2,M-=2}else if(17===N){for(x=T+3;M>>=T)),a>>>=3,M-=3}else{for(x=T+7;M>>=T)),a>>>=7,M-=7}if(e.have+u>e.nlen+e.ndist){A.msg="invalid bit length repeat",e.mode=Gf;break}for(;u--;)e.lens[e.have++]=D}}if(e.mode===Gf)break;if(0===e.lens[256]){A.msg="invalid code -- missing end-of-block",e.mode=Gf;break}if(e.lenbits=9,B={bits:e.lenbits},j=Yf(Of,e.lens,0,e.nlen,e.lencode,0,e.work,B),e.lenbits=B.bits,j){A.msg="invalid literal/lengths set",e.mode=Gf;break}if(e.distbits=6,e.distcode=e.distdyn,B={bits:e.distbits},j=Yf(vf,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,B),e.distbits=B.bits,j){A.msg="invalid distances set",e.mode=Gf;break}if(e.mode=20,6===t)break A;case 20:e.mode=21;case 21:if(o>=6&&g>=258){A.next_out=r,A.avail_out=g,A.next_in=I,A.avail_in=o,e.hold=a,e.bits=M,jf(A,c),r=A.next_out,n=A.output,g=A.avail_out,I=A.next_in,i=A.input,o=A.avail_in,a=e.hold,M=e.bits,e.mode===kf&&(e.back=-1);break}for(e.back=0;h=(p=e.lencode[a&(1<>>16&255,N=65535&p,!((T=p>>>24)<=M);){if(0===o)break A;o--,a+=i[I++]<>d)])>>>16&255,N=65535&p,!(d+(T=p>>>24)<=M);){if(0===o)break A;o--,a+=i[I++]<>>=d,M-=d,e.back+=d}if(a>>>=T,M-=T,e.back+=T,e.length=N,0===h){e.mode=26;break}if(32&h){e.back=-1,e.mode=kf;break}if(64&h){A.msg="invalid literal/length code",e.mode=Gf;break}e.extra=15&h,e.mode=22;case 22:if(e.extra){for(x=e.extra;M>>=e.extra,M-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=23;case 23:for(;h=(p=e.distcode[a&(1<>>16&255,N=65535&p,!((T=p>>>24)<=M);){if(0===o)break A;o--,a+=i[I++]<>d)])>>>16&255,N=65535&p,!(d+(T=p>>>24)<=M);){if(0===o)break A;o--,a+=i[I++]<>>=d,M-=d,e.back+=d}if(a>>>=T,M-=T,e.back+=T,64&h){A.msg="invalid distance code",e.mode=Gf;break}e.offset=N,e.extra=15&h,e.mode=24;case 24:if(e.extra){for(x=e.extra;M>>=e.extra,M-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){A.msg="invalid distance too far back",e.mode=Gf;break}e.mode=25;case 25:if(0===g)break A;if(u=c-g,e.offset>u){if((u=e.offset-u)>e.whave&&e.sane){A.msg="invalid distance too far back",e.mode=Gf;break}u>e.wnext?(u-=e.wnext,l=e.wsize-u):l=e.wnext-u,u>e.length&&(u=e.length),C=e.window}else C=n,l=r-e.offset,u=e.length;u>g&&(u=g),g-=u,e.length-=u;do{n[r++]=C[l++]}while(--u);0===e.length&&(e.mode=21);break;case 26:if(0===g)break A;n[r++]=e.length,g--,e.mode=21;break;case 27:if(e.wrap){for(;M<32;){if(0===o)break A;o--,a|=i[I++]<=252?6:iz>=248?5:iz>=240?4:iz>=224?3:iz>=192?2:1;function nz(A){var t,e,i,n,I,r=A.length,o=0;for(n=0;n>>6,t[I++]=128|63&e):e<65536?(t[I++]=224|e>>>12,t[I++]=128|e>>>6&63,t[I++]=128|63&e):(t[I++]=240|e>>>18,t[I++]=128|e>>>12&63,t[I++]=128|e>>>6&63,t[I++]=128|63&e);return t}function Iz(A,t){var e,i,n,I,r=t||A.length,o=new Array(2*r);for(i=0,e=0;e4)o[i++]=65533,e+=I-1;else{for(n&=2===I?31:3===I?15:7;I>1&&e1?o[i++]=65533:n<65536?o[i++]=n:(n-=65536,o[i++]=55296|n>>10&1023,o[i++]=56320|1023&n)}return function(A,t){if(t<65537&&(A.subarray&&tz||!A.subarray&&Az))return String.fromCharCode.apply(null,Tf(A,t));for(var e="",i=0;iA.length&&(t=A.length),e=t-1;e>=0&&128==(192&A[e]);)e--;return e<0||0===e?t:e+ez[A[e]]>t?e:t}ez[254]=ez[254]=1;var oz={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function gz(){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}function az(){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}var Mz=Object.prototype.toString;function sz(A){if(!(this instanceof sz))return new sz(A);this.options=function(A){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var e=t.shift();if(e){if("object"!==o(e))throw new TypeError(e+"must be non-object");for(var i in e)e.hasOwnProperty(i)&&(A[i]=e[i])}}return A}({chunkSize:16384,windowBits:0,to:""},A||{});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)||A&&A.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 gz,this.strm.avail_out=0;var e,i,n,I=Xf(this.strm,t.windowBits);if(0!==I)throw new Error(oz[I]);this.header=new az,e=this.strm,i=this.header,e&&e.state&&(0==(2&(n=e.state).wrap)||(n.head=i,i.done=!1))}sz.prototype.push=function(A,t){var e,i,n,I,r,o,g=this.strm,a=this.options.chunkSize,M=this.options.dictionary,s=!1;if(this.ended)return!1;i=t===~~t?t:!0===t?4:0,"string"==typeof A?g.input=function(A){for(var t=new Uint8Array(A.length),e=0,i=t.length;e0||0===g.avail_out)&&1!==e);return 1===e&&(i=4),4===i?(e=function(A){if(!A||!A.state)return bf;var t=A.state;return t.window&&(t.window=null),A.state=null,Uf}(this.strm),this.onEnd(e),this.ended=!0,0===e):2!==i||(this.onEnd(0),g.avail_out=0,!0)},sz.prototype.onData=function(A){this.chunks.push(A)},sz.prototype.onEnd=function(A){0===A&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=function(A){var t,e,i,n,I,r;for(i=0,t=0,e=A.length;t0;)e[i]=arguments[i+1];A.Debug&&jl.time("concatStructures");var n=new UE(t,""),I=new Ry(n),r=n.atomStore,o=n.atomMap;r.addField("formalCharge",1,"int8"),r.addField("partialCharge",1,"float32");var g={},a=0,M=0,s=0;e.forEach((function(A){A.eachAtom((function(A){r.growIfFull(),r.atomTypeId[a]=o.add(A.atomname,A.element),r.x[a]=A.x,r.y[a]=A.y,r.z[a]=A.z,r.serial[a]=A.serial,r.formalCharge[a]=A.formalCharge,r.partialCharge[a]=A.partialCharge,r.altloc[a]=A.altloc,r.occupancy[a]=A.occupancy,r.bfactor[a]=A.bfactor,I.addAtom(A.modelIndex+s,A.chainname,A.chainid,A.resname,A.resno,1===A.hetero,A.sstruc,A.inscode),g[A.index+M]=a,a+=1})),M+=A.atomStore.count,s+=A.modelStore.count}));var c=n.bondStore,u=n.getAtomProxy(),l=n.getAtomProxy();return M=0,e.forEach((function(A){A.eachBond((function(A){u.index=g[A.atomIndex1+M],l.index=g[A.atomIndex2+M],c.addBond(u,l,A.bondOrder)})),M+=A.atomStore.count})),I.finalize(),nE(n,!0),iE(n,!0),n.finalizeAtoms(),n.finalizeBonds(),aE(n),A.Debug&&jl.timeEnd("concatStructures"),n},A.download=Kc,A.flatten=function A(t,e){e=Hc(e,[]);for(var i=0;it?(r&&(clearTimeout(r),r=null),o=a,I=A.apply(i,n),r||(i=n=null)):r||!1===e.trailing||(r=setTimeout(g,M)),I}},A.uniqueArray=Au,Object.defineProperty(A,"__esModule",{value:!0})},"object"===o(t)?r(t):(n=[t],void 0===(I="function"==typeof(i=r)?i.apply(t,n):i)||(A.exports=I))},1391:(A,t,e)=>{var i,n,I;I="object"==typeof self&&self.self===self&&self||"object"==typeof e.g&&e.g.global===e.g&&e.g,i=[e(3128),e(4692),t],n=function(A,t,e){I.Backbone=function(A,t,e,i){var n=A.Backbone,I=Array.prototype.slice;t.VERSION="1.6.0",t.$=i,t.noConflict=function(){return A.Backbone=n,this},t.emulateHTTP=!1,t.emulateJSON=!1;var r,o=t.Events={},g=/\s+/,a=function(A,t,i,n,I){var r,o=0;if(i&&"object"==typeof i){void 0!==n&&"context"in I&&void 0===I.context&&(I.context=n);for(r=e.keys(i);othis.length&&(n=this.length),n<0&&(n+=this.length+1);var I,r,o=[],g=[],a=[],M=[],s={},c=t.add,u=t.merge,l=t.remove,C=!1,T=this.comparator&&null==n&&!1!==t.sort,h=e.isString(this.comparator)?this.comparator:null;for(r=0;r0&&!t.silent&&delete t.index,e},_isModel:function(A){return A instanceof h},_addReference:function(A,t){this._byId[A.cid]=A;var e=this.modelId(A.attributes,A.idAttribute);null!=e&&(this._byId[e]=A),A.on("all",this._onModelEvent,this)},_removeReference:function(A,t){delete this._byId[A.cid];var e=this.modelId(A.attributes,A.idAttribute);null!=e&&delete this._byId[e],this===A.collection&&delete A.collection,A.off("all",this._onModelEvent,this)},_onModelEvent:function(A,t,e,i){if(t){if(("add"===A||"remove"===A)&&e!==this)return;if("destroy"===A&&this.remove(t,i),"changeId"===A){var n=this.modelId(t.previousAttributes(),t.idAttribute),I=this.modelId(t.attributes,t.idAttribute);null!=n&&delete this._byId[n],null!=I&&(this._byId[I]=t)}}this.trigger.apply(this,arguments)},_forwardPristineError:function(A,t,e){this.has(A)||this._onModelEvent("error",A,t,e)}});var D="function"==typeof Symbol&&Symbol.iterator;D&&(N.prototype[D]=N.prototype.values);var j=function(A,t){this._collection=A,this._kind=t,this._index=0},B=1,x=2,p=3;D&&(j.prototype[D]=function(){return this}),j.prototype.next=function(){if(this._collection){if(this._index7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(G,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var i=document.body,n=i.insertBefore(this.iframe,i.firstChild).contentWindow;n.document.open(),n.document.close(),n.location.hash="#"+this.fragment}var I=window.addEventListener||function(A,t){return attachEvent("on"+A,t)};if(this._usePushState?I("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?I("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var A=window.removeEventListener||function(A,t){return detachEvent("on"+A,t)};this._usePushState?A("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&A("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),P.started=!1},route:function(A,t){this.handlers.unshift({route:A,callback:t})},checkUrl:function(A){var t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe.contentWindow)),t===this.fragment)return!this.matchRoot()&&this.notfound();this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(A){return this.matchRoot()?(A=this.fragment=this.getFragment(A),e.some(this.handlers,(function(t){if(t.route.test(A))return t.callback(A),!0}))||this.notfound()):this.notfound()},notfound:function(){return this.trigger("notfound"),!1},navigate:function(A,t){if(!P.started)return!1;t&&!0!==t||(t={trigger:!!t}),A=this.getFragment(A||"");var e=this.root;this._trailingSlash||""!==A&&"?"!==A.charAt(0)||(e=e.slice(0,-1)||"/");var i=e+A;A=A.replace(F,"");var n=this.decodeFragment(A);if(this.fragment!==n){if(this.fragment=n,this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);if(this._updateHash(this.location,A,t.replace),this.iframe&&A!==this.getHash(this.iframe.contentWindow)){var I=this.iframe.contentWindow;t.replace||(I.document.open(),I.document.close()),this._updateHash(I.location,A,t.replace)}}return t.trigger?this.loadUrl(A):void 0}},_updateHash:function(A,t,e){if(e){var i=A.href.replace(/(javascript:|#).*$/,"");A.replace(i+"#"+t)}else A.hash="#"+t}}),t.history=new P;h.extend=N.extend=Y.extend=L.extend=P.extend=function(A,t){var i,n=this;return i=A&&e.has(A,"constructor")?A.constructor:function(){return n.apply(this,arguments)},e.extend(i,n,t),i.prototype=e.create(n.prototype,A),i.prototype.constructor=i,i.__super__=n.prototype,i};var J=function(){throw new Error('A "url" property or function must be specified')},H=function(A,t){var e=t.error;t.error=function(i){e&&e.call(t.context,A,i,t),A.trigger("error",A,i,t)}};return t._debug=function(){return{root:A,_:e}},t}(I,e,A,t)}.apply(t,i),void 0===n||(A.exports=n)},8075:(A,t,e)=>{"use strict";var i=e(453),n=e(487),I=n(i("String.prototype.indexOf"));A.exports=function(A,t){var e=i(A,!!t);return"function"==typeof e&&I(A,".prototype.")>-1?n(e):e}},487:(A,t,e)=>{"use strict";var i=e(6743),n=e(453),I=e(6897),r=e(9675),o=n("%Function.prototype.apply%"),g=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||i.call(g,o),M=e(655),s=n("%Math.max%");A.exports=function(A){if("function"!=typeof A)throw new r("a function is required");var t=a(i,g,arguments);return I(t,1+s(0,A.length-(arguments.length-1)),!0)};var c=function(){return a(i,o,arguments)};M?M(A.exports,"apply",{value:c}):A.exports.apply=c},5031:(A,t,e)=>{var i,n;void 0===(n="function"==typeof(i={schemeGroups:{sequential:["BuGn","BuPu","GnBu","OrRd","PuBu","PuBuGn","PuRd","RdPu","YlGn","YlGnBu","YlOrBr","YlOrRd"],singlehue:["Blues","Greens","Greys","Oranges","Purples","Reds"],diverging:["BrBG","PiYG","PRGn","PuOr","RdBu","RdGy","RdYlBu","RdYlGn","Spectral"],qualitative:["Accent","Dark2","Paired","Pastel1","Pastel2","Set1","Set2","Set3"]},YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}})?i.call(t,e,t,A):i)||(A.exports=n)},4086:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,".protein {\n cursor: crosshair;\n pointer-events: visible;\n}\n\n.link {\n cursor: crosshair;\n pointer-events: auto;\n}\n\n.highlightedProtein {\n stroke: #fdc086;\n}\n\n.selectedProtein {\n stroke: #ffff99;\n}\n\n.highlightedLink {\n stroke: #fdc086;\n}\n\n.selectedLink {\n stroke: #ffff99;\n}\n\n.highlightedPeptide {\n fill: #fdc086;\n}\n\n.selectedPeptide {\n fill: #ffff99;\n}\n\n.peptideOverlap {\n fill: #a50f15;\n}\n\n@keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n}\n\n/*you need this to stop horrible looking flickering of text as you drag*/\n\nsvg {\n -webkit-user-select: none;\n /*-khtml-user-select: none;*/\n -moz-user-select: none;\n /*-o-user-select: none;*/\n user-select: none;\n}\n\n.xlv_text {\n text-shadow: -1px -1px 0 white, 1px -1px 0 white, -1px 1px 0 white, 1px 1px 0 white;\n}\n\n.xinetAxisLabel {\n pointer-events: none;\n}\n\n.proteinLabel {\n font-size: 10pt;\n font-weight: bold;\n}\n\n.custom-menu-margin {\n display: none;\n z-index: 10000;\n position: absolute;\n}\n\n.custom-menu {\n overflow: hidden;\n border: 1px solid #CCC;\n white-space: nowrap;\n /*\n font-family: sans-serif;\n*/\n background: #FFF;\n color: #333;\n list-style: none;\n padding: 0;\n margin: 0;\n pointer-events: all;\n}\n\n.custom-menu li {\n padding: 8px 12px;\n cursor: pointer;\n -webkit-user-select: none;\n /*-khtml-user-select: none;*/\n -moz-user-select: none;\n /*-o-user-select: none;*/\n user-select: none;\n}\n\n.custom-menu li:hover {\n background-color: #DEF;\n}\n\n.barScale {\n display: inline;\n padding-left: 10px;\n}\n",""]);const I=n},2974:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,'@charset "UTF-8";\n:root {\n --dt-row-selected: 13, 110, 253;\n --dt-row-selected-text: 255, 255, 255;\n --dt-row-selected-link: 9, 10, 11;\n --dt-row-stripe: 0, 0, 0;\n --dt-row-hover: 0, 0, 0;\n --dt-column-ordering: 0, 0, 0;\n --dt-html-background: white;\n}\n:root.dark {\n --dt-html-background: rgb(33, 37, 41);\n}\n\ntable.dataTable td.dt-control {\n text-align: center;\n cursor: pointer;\n}\ntable.dataTable td.dt-control:before {\n display: inline-block;\n color: rgba(0, 0, 0, 0.5);\n content: "▶";\n}\ntable.dataTable tr.dt-hasChild td.dt-control:before {\n content: "▼";\n}\n\nhtml.dark table.dataTable td.dt-control:before,\n:root[data-bs-theme=dark] table.dataTable td.dt-control:before {\n color: rgba(255, 255, 255, 0.5);\n}\nhtml.dark table.dataTable tr.dt-hasChild td.dt-control:before,\n:root[data-bs-theme=dark] table.dataTable tr.dt-hasChild td.dt-control:before {\n color: rgba(255, 255, 255, 0.5);\n}\n\ntable.dataTable thead > tr > th.sorting, table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting_asc_disabled, table.dataTable thead > tr > th.sorting_desc_disabled,\ntable.dataTable thead > tr > td.sorting,\ntable.dataTable thead > tr > td.sorting_asc,\ntable.dataTable thead > tr > td.sorting_desc,\ntable.dataTable thead > tr > td.sorting_asc_disabled,\ntable.dataTable thead > tr > td.sorting_desc_disabled {\n cursor: pointer;\n position: relative;\n padding-right: 26px;\n}\ntable.dataTable thead > tr > th.sorting:before, table.dataTable thead > tr > th.sorting:after, table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_asc:after, table.dataTable thead > tr > th.sorting_desc:before, table.dataTable thead > tr > th.sorting_desc:after, table.dataTable thead > tr > th.sorting_asc_disabled:before, table.dataTable thead > tr > th.sorting_asc_disabled:after, table.dataTable thead > tr > th.sorting_desc_disabled:before, table.dataTable thead > tr > th.sorting_desc_disabled:after,\ntable.dataTable thead > tr > td.sorting:before,\ntable.dataTable thead > tr > td.sorting:after,\ntable.dataTable thead > tr > td.sorting_asc:before,\ntable.dataTable thead > tr > td.sorting_asc:after,\ntable.dataTable thead > tr > td.sorting_desc:before,\ntable.dataTable thead > tr > td.sorting_desc:after,\ntable.dataTable thead > tr > td.sorting_asc_disabled:before,\ntable.dataTable thead > tr > td.sorting_asc_disabled:after,\ntable.dataTable thead > tr > td.sorting_desc_disabled:before,\ntable.dataTable thead > tr > td.sorting_desc_disabled:after {\n position: absolute;\n display: block;\n opacity: 0.125;\n right: 10px;\n line-height: 9px;\n font-size: 0.8em;\n}\ntable.dataTable thead > tr > th.sorting:before, table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_desc:before, table.dataTable thead > tr > th.sorting_asc_disabled:before, table.dataTable thead > tr > th.sorting_desc_disabled:before,\ntable.dataTable thead > tr > td.sorting:before,\ntable.dataTable thead > tr > td.sorting_asc:before,\ntable.dataTable thead > tr > td.sorting_desc:before,\ntable.dataTable thead > tr > td.sorting_asc_disabled:before,\ntable.dataTable thead > tr > td.sorting_desc_disabled:before {\n bottom: 50%;\n content: "▲";\n content: "▲"/"";\n}\ntable.dataTable thead > tr > th.sorting:after, table.dataTable thead > tr > th.sorting_asc:after, table.dataTable thead > tr > th.sorting_desc:after, table.dataTable thead > tr > th.sorting_asc_disabled:after, table.dataTable thead > tr > th.sorting_desc_disabled:after,\ntable.dataTable thead > tr > td.sorting:after,\ntable.dataTable thead > tr > td.sorting_asc:after,\ntable.dataTable thead > tr > td.sorting_desc:after,\ntable.dataTable thead > tr > td.sorting_asc_disabled:after,\ntable.dataTable thead > tr > td.sorting_desc_disabled:after {\n top: 50%;\n content: "▼";\n content: "▼"/"";\n}\ntable.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_desc:after,\ntable.dataTable thead > tr > td.sorting_asc:before,\ntable.dataTable thead > tr > td.sorting_desc:after {\n opacity: 0.6;\n}\ntable.dataTable thead > tr > th.sorting_desc_disabled:after, table.dataTable thead > tr > th.sorting_asc_disabled:before,\ntable.dataTable thead > tr > td.sorting_desc_disabled:after,\ntable.dataTable thead > tr > td.sorting_asc_disabled:before {\n display: none;\n}\ntable.dataTable thead > tr > th:active,\ntable.dataTable thead > tr > td:active {\n outline: none;\n}\n\ndiv.dataTables_scrollBody > table.dataTable > thead > tr > th:before, div.dataTables_scrollBody > table.dataTable > thead > tr > th:after,\ndiv.dataTables_scrollBody > table.dataTable > thead > tr > td:before,\ndiv.dataTables_scrollBody > table.dataTable > thead > tr > td:after {\n display: none;\n}\n\ndiv.dataTables_processing {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 200px;\n margin-left: -100px;\n margin-top: -26px;\n text-align: center;\n padding: 2px;\n z-index: 10;\n}\ndiv.dataTables_processing > div:last-child {\n position: relative;\n width: 80px;\n height: 15px;\n margin: 1em auto;\n}\ndiv.dataTables_processing > div:last-child > div {\n position: absolute;\n top: 0;\n width: 13px;\n height: 13px;\n border-radius: 50%;\n background: rgb(13, 110, 253);\n background: rgb(var(--dt-row-selected));\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n}\ndiv.dataTables_processing > div:last-child > div:nth-child(1) {\n left: 8px;\n animation: datatables-loader-1 0.6s infinite;\n}\ndiv.dataTables_processing > div:last-child > div:nth-child(2) {\n left: 8px;\n animation: datatables-loader-2 0.6s infinite;\n}\ndiv.dataTables_processing > div:last-child > div:nth-child(3) {\n left: 32px;\n animation: datatables-loader-2 0.6s infinite;\n}\ndiv.dataTables_processing > div:last-child > div:nth-child(4) {\n left: 56px;\n animation: datatables-loader-3 0.6s infinite;\n}\n\n@keyframes datatables-loader-1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n}\n@keyframes datatables-loader-3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n}\n@keyframes datatables-loader-2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(24px, 0);\n }\n}\ntable.dataTable.nowrap th, table.dataTable.nowrap td {\n white-space: nowrap;\n}\ntable.dataTable th.dt-left,\ntable.dataTable td.dt-left {\n text-align: left;\n}\ntable.dataTable th.dt-center,\ntable.dataTable td.dt-center,\ntable.dataTable td.dataTables_empty {\n text-align: center;\n}\ntable.dataTable th.dt-right,\ntable.dataTable td.dt-right {\n text-align: right;\n}\ntable.dataTable th.dt-justify,\ntable.dataTable td.dt-justify {\n text-align: justify;\n}\ntable.dataTable th.dt-nowrap,\ntable.dataTable td.dt-nowrap {\n white-space: nowrap;\n}\ntable.dataTable thead th,\ntable.dataTable thead td,\ntable.dataTable tfoot th,\ntable.dataTable tfoot td {\n text-align: left;\n}\ntable.dataTable thead th.dt-head-left,\ntable.dataTable thead td.dt-head-left,\ntable.dataTable tfoot th.dt-head-left,\ntable.dataTable tfoot td.dt-head-left {\n text-align: left;\n}\ntable.dataTable thead th.dt-head-center,\ntable.dataTable thead td.dt-head-center,\ntable.dataTable tfoot th.dt-head-center,\ntable.dataTable tfoot td.dt-head-center {\n text-align: center;\n}\ntable.dataTable thead th.dt-head-right,\ntable.dataTable thead td.dt-head-right,\ntable.dataTable tfoot th.dt-head-right,\ntable.dataTable tfoot td.dt-head-right {\n text-align: right;\n}\ntable.dataTable thead th.dt-head-justify,\ntable.dataTable thead td.dt-head-justify,\ntable.dataTable tfoot th.dt-head-justify,\ntable.dataTable tfoot td.dt-head-justify {\n text-align: justify;\n}\ntable.dataTable thead th.dt-head-nowrap,\ntable.dataTable thead td.dt-head-nowrap,\ntable.dataTable tfoot th.dt-head-nowrap,\ntable.dataTable tfoot td.dt-head-nowrap {\n white-space: nowrap;\n}\ntable.dataTable tbody th.dt-body-left,\ntable.dataTable tbody td.dt-body-left {\n text-align: left;\n}\ntable.dataTable tbody th.dt-body-center,\ntable.dataTable tbody td.dt-body-center {\n text-align: center;\n}\ntable.dataTable tbody th.dt-body-right,\ntable.dataTable tbody td.dt-body-right {\n text-align: right;\n}\ntable.dataTable tbody th.dt-body-justify,\ntable.dataTable tbody td.dt-body-justify {\n text-align: justify;\n}\ntable.dataTable tbody th.dt-body-nowrap,\ntable.dataTable tbody td.dt-body-nowrap {\n white-space: nowrap;\n}\n\n/*\n * Table styles\n */\ntable.dataTable {\n width: 100%;\n margin: 0 auto;\n clear: both;\n border-collapse: separate;\n border-spacing: 0;\n /*\n * Header and footer styles\n */\n /*\n * Body styles\n */\n}\ntable.dataTable thead th,\ntable.dataTable tfoot th {\n font-weight: bold;\n}\ntable.dataTable > thead > tr > th,\ntable.dataTable > thead > tr > td {\n padding: 10px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.3);\n}\ntable.dataTable > thead > tr > th:active,\ntable.dataTable > thead > tr > td:active {\n outline: none;\n}\ntable.dataTable > tfoot > tr > th,\ntable.dataTable > tfoot > tr > td {\n padding: 10px 10px 6px 10px;\n border-top: 1px solid rgba(0, 0, 0, 0.3);\n}\ntable.dataTable tbody tr {\n background-color: transparent;\n}\ntable.dataTable tbody tr.selected > * {\n box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.9);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.9);\n color: rgb(255, 255, 255);\n color: rgb(var(--dt-row-selected-text));\n}\ntable.dataTable tbody tr.selected a {\n color: rgb(9, 10, 11);\n color: rgb(var(--dt-row-selected-link));\n}\ntable.dataTable tbody th,\ntable.dataTable tbody td {\n padding: 8px 10px;\n}\ntable.dataTable.row-border > tbody > tr > th,\ntable.dataTable.row-border > tbody > tr > td, table.dataTable.display > tbody > tr > th,\ntable.dataTable.display > tbody > tr > td {\n border-top: 1px solid rgba(0, 0, 0, 0.15);\n}\ntable.dataTable.row-border > tbody > tr:first-child > th,\ntable.dataTable.row-border > tbody > tr:first-child > td, table.dataTable.display > tbody > tr:first-child > th,\ntable.dataTable.display > tbody > tr:first-child > td {\n border-top: none;\n}\ntable.dataTable.row-border > tbody > tr.selected + tr.selected > td, table.dataTable.display > tbody > tr.selected + tr.selected > td {\n border-top-color: rgba(13, 110, 253, 0.65);\n border-top-color: rgba(var(--dt-row-selected), 0.65);\n}\ntable.dataTable.cell-border > tbody > tr > th,\ntable.dataTable.cell-border > tbody > tr > td {\n border-top: 1px solid rgba(0, 0, 0, 0.15);\n border-right: 1px solid rgba(0, 0, 0, 0.15);\n}\ntable.dataTable.cell-border > tbody > tr > th:first-child,\ntable.dataTable.cell-border > tbody > tr > td:first-child {\n border-left: 1px solid rgba(0, 0, 0, 0.15);\n}\ntable.dataTable.cell-border > tbody > tr:first-child > th,\ntable.dataTable.cell-border > tbody > tr:first-child > td {\n border-top: none;\n}\ntable.dataTable.stripe > tbody > tr.odd > *, table.dataTable.display > tbody > tr.odd > * {\n box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.023);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-stripe), 0.023);\n}\ntable.dataTable.stripe > tbody > tr.odd.selected > *, table.dataTable.display > tbody > tr.odd.selected > * {\n box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.923);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.923);\n}\ntable.dataTable.hover > tbody > tr:hover > *, table.dataTable.display > tbody > tr:hover > * {\n box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.035);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.035);\n}\ntable.dataTable.hover > tbody > tr.selected:hover > *, table.dataTable.display > tbody > tr.selected:hover > * {\n box-shadow: inset 0 0 0 9999px #0d6efd !important;\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 1) !important;\n}\ntable.dataTable.order-column > tbody tr > .sorting_1,\ntable.dataTable.order-column > tbody tr > .sorting_2,\ntable.dataTable.order-column > tbody tr > .sorting_3, table.dataTable.display > tbody tr > .sorting_1,\ntable.dataTable.display > tbody tr > .sorting_2,\ntable.dataTable.display > tbody tr > .sorting_3 {\n box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.019);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-column-ordering), 0.019);\n}\ntable.dataTable.order-column > tbody tr.selected > .sorting_1,\ntable.dataTable.order-column > tbody tr.selected > .sorting_2,\ntable.dataTable.order-column > tbody tr.selected > .sorting_3, table.dataTable.display > tbody tr.selected > .sorting_1,\ntable.dataTable.display > tbody tr.selected > .sorting_2,\ntable.dataTable.display > tbody tr.selected > .sorting_3 {\n box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.919);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.919);\n}\ntable.dataTable.display > tbody > tr.odd > .sorting_1, table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_1 {\n box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.054);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-column-ordering), 0.054);\n}\ntable.dataTable.display > tbody > tr.odd > .sorting_2, table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_2 {\n box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.047);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-column-ordering), 0.047);\n}\ntable.dataTable.display > tbody > tr.odd > .sorting_3, table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_3 {\n box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.039);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-column-ordering), 0.039);\n}\ntable.dataTable.display > tbody > tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_1 {\n box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.954);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.954);\n}\ntable.dataTable.display > tbody > tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_2 {\n box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.947);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.947);\n}\ntable.dataTable.display > tbody > tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_3 {\n box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.939);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.939);\n}\ntable.dataTable.display > tbody > tr.even > .sorting_1, table.dataTable.order-column.stripe > tbody > tr.even > .sorting_1 {\n box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.019);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-column-ordering), 0.019);\n}\ntable.dataTable.display > tbody > tr.even > .sorting_2, table.dataTable.order-column.stripe > tbody > tr.even > .sorting_2 {\n box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.011);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-column-ordering), 0.011);\n}\ntable.dataTable.display > tbody > tr.even > .sorting_3, table.dataTable.order-column.stripe > tbody > tr.even > .sorting_3 {\n box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.003);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-column-ordering), 0.003);\n}\ntable.dataTable.display > tbody > tr.even.selected > .sorting_1, table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_1 {\n box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.919);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.919);\n}\ntable.dataTable.display > tbody > tr.even.selected > .sorting_2, table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_2 {\n box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.911);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.911);\n}\ntable.dataTable.display > tbody > tr.even.selected > .sorting_3, table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_3 {\n box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.903);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.903);\n}\ntable.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 {\n box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.082);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.082);\n}\ntable.dataTable.display tbody tr:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2 {\n box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.074);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.074);\n}\ntable.dataTable.display tbody tr:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3 {\n box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.062);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.062);\n}\ntable.dataTable.display tbody tr:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 {\n box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.982);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.982);\n}\ntable.dataTable.display tbody tr:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 {\n box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.974);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.974);\n}\ntable.dataTable.display tbody tr:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 {\n box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.962);\n box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.962);\n}\ntable.dataTable.no-footer {\n border-bottom: 1px solid rgba(0, 0, 0, 0.3);\n}\ntable.dataTable.compact thead th,\ntable.dataTable.compact thead td,\ntable.dataTable.compact tfoot th,\ntable.dataTable.compact tfoot td,\ntable.dataTable.compact tbody th,\ntable.dataTable.compact tbody td {\n padding: 4px;\n}\n\ntable.dataTable th,\ntable.dataTable td {\n box-sizing: content-box;\n}\n\n/*\n * Control feature layout\n */\n.dataTables_wrapper {\n position: relative;\n clear: both;\n}\n.dataTables_wrapper .dataTables_length {\n float: left;\n}\n.dataTables_wrapper .dataTables_length select {\n border: 1px solid #aaa;\n border-radius: 3px;\n padding: 5px;\n background-color: transparent;\n color: inherit;\n padding: 4px;\n}\n.dataTables_wrapper .dataTables_filter {\n float: right;\n text-align: right;\n}\n.dataTables_wrapper .dataTables_filter input {\n border: 1px solid #aaa;\n border-radius: 3px;\n padding: 5px;\n background-color: transparent;\n color: inherit;\n margin-left: 3px;\n}\n.dataTables_wrapper .dataTables_info {\n clear: both;\n float: left;\n padding-top: 0.755em;\n}\n.dataTables_wrapper .dataTables_paginate {\n float: right;\n text-align: right;\n padding-top: 0.25em;\n}\n.dataTables_wrapper .dataTables_paginate .paginate_button {\n box-sizing: border-box;\n display: inline-block;\n min-width: 1.5em;\n padding: 0.5em 1em;\n margin-left: 2px;\n text-align: center;\n text-decoration: none !important;\n cursor: pointer;\n color: inherit !important;\n border: 1px solid transparent;\n border-radius: 2px;\n background: transparent;\n}\n.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {\n color: inherit !important;\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(0, 0, 0, 0.05);\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(230, 230, 230, 0.05)), color-stop(100%, rgba(0, 0, 0, 0.05))); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); /* Chrome10+,Safari5.1+ */\n background: -moz-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); /* FF3.6+ */\n background: -ms-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); /* IE10+ */\n background: -o-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); /* Opera 11.10+ */\n background: linear-gradient(to bottom, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); /* W3C */\n}\n.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {\n cursor: default;\n color: #666 !important;\n border: 1px solid transparent;\n background: transparent;\n box-shadow: none;\n}\n.dataTables_wrapper .dataTables_paginate .paginate_button:hover {\n color: white !important;\n border: 1px solid #111;\n background-color: #111;\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #585858 0%, #111 100%); /* Chrome10+,Safari5.1+ */\n background: -moz-linear-gradient(top, #585858 0%, #111 100%); /* FF3.6+ */\n background: -ms-linear-gradient(top, #585858 0%, #111 100%); /* IE10+ */\n background: -o-linear-gradient(top, #585858 0%, #111 100%); /* Opera 11.10+ */\n background: linear-gradient(to bottom, #585858 0%, #111 100%); /* W3C */\n}\n.dataTables_wrapper .dataTables_paginate .paginate_button:active {\n outline: none;\n background-color: #0c0c0c;\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); /* Chrome10+,Safari5.1+ */\n background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); /* FF3.6+ */\n background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); /* IE10+ */\n background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); /* Opera 11.10+ */\n background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%); /* W3C */\n box-shadow: inset 0 0 3px #111;\n}\n.dataTables_wrapper .dataTables_paginate .ellipsis {\n padding: 0 1em;\n}\n.dataTables_wrapper .dataTables_length,\n.dataTables_wrapper .dataTables_filter,\n.dataTables_wrapper .dataTables_info,\n.dataTables_wrapper .dataTables_processing,\n.dataTables_wrapper .dataTables_paginate {\n color: inherit;\n}\n.dataTables_wrapper .dataTables_scroll {\n clear: both;\n}\n.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {\n -webkit-overflow-scrolling: touch;\n}\n.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td {\n vertical-align: middle;\n}\n.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th > div.dataTables_sizing,\n.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td > div.dataTables_sizing, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th > div.dataTables_sizing,\n.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td > div.dataTables_sizing {\n height: 0;\n overflow: hidden;\n margin: 0 !important;\n padding: 0 !important;\n}\n.dataTables_wrapper.no-footer .dataTables_scrollBody {\n border-bottom: 1px solid rgba(0, 0, 0, 0.3);\n}\n.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,\n.dataTables_wrapper.no-footer div.dataTables_scrollBody > table {\n border-bottom: none;\n}\n.dataTables_wrapper:after {\n visibility: hidden;\n display: block;\n content: "";\n clear: both;\n height: 0;\n}\n\n@media screen and (max-width: 767px) {\n .dataTables_wrapper .dataTables_info,\n .dataTables_wrapper .dataTables_paginate {\n float: none;\n text-align: center;\n }\n .dataTables_wrapper .dataTables_paginate {\n margin-top: 0.5em;\n }\n}\n@media screen and (max-width: 640px) {\n .dataTables_wrapper .dataTables_length,\n .dataTables_wrapper .dataTables_filter {\n float: none;\n text-align: center;\n }\n .dataTables_wrapper .dataTables_filter {\n margin-top: 0.5em;\n }\n}\nhtml.dark {\n --dt-row-hover: 255, 255, 255;\n --dt-row-stripe: 255, 255, 255;\n --dt-column-ordering: 255, 255, 255;\n}\nhtml.dark table.dataTable > thead > tr > th,\nhtml.dark table.dataTable > thead > tr > td {\n border-bottom: 1px solid rgb(89, 91, 94);\n}\nhtml.dark table.dataTable > thead > tr > th:active,\nhtml.dark table.dataTable > thead > tr > td:active {\n outline: none;\n}\nhtml.dark table.dataTable > tfoot > tr > th,\nhtml.dark table.dataTable > tfoot > tr > td {\n border-top: 1px solid rgb(89, 91, 94);\n}\nhtml.dark table.dataTable.row-border > tbody > tr > th,\nhtml.dark table.dataTable.row-border > tbody > tr > td, html.dark table.dataTable.display > tbody > tr > th,\nhtml.dark table.dataTable.display > tbody > tr > td {\n border-top: 1px solid rgb(64, 67, 70);\n}\nhtml.dark table.dataTable.row-border > tbody > tr.selected + tr.selected > td, html.dark table.dataTable.display > tbody > tr.selected + tr.selected > td {\n border-top-color: rgba(13, 110, 253, 0.65);\n border-top-color: rgba(var(--dt-row-selected), 0.65);\n}\nhtml.dark table.dataTable.cell-border > tbody > tr > th,\nhtml.dark table.dataTable.cell-border > tbody > tr > td {\n border-top: 1px solid rgb(64, 67, 70);\n border-right: 1px solid rgb(64, 67, 70);\n}\nhtml.dark table.dataTable.cell-border > tbody > tr > th:first-child,\nhtml.dark table.dataTable.cell-border > tbody > tr > td:first-child {\n border-left: 1px solid rgb(64, 67, 70);\n}\nhtml.dark .dataTables_wrapper .dataTables_filter input,\nhtml.dark .dataTables_wrapper .dataTables_length select {\n border: 1px solid rgba(255, 255, 255, 0.2);\n background-color: var(--dt-html-background);\n}\nhtml.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current, html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {\n border: 1px solid rgb(89, 91, 94);\n background: rgba(255, 255, 255, 0.15);\n}\nhtml.dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled, html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {\n color: #666 !important;\n}\nhtml.dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover {\n border: 1px solid rgb(53, 53, 53);\n background: rgb(53, 53, 53);\n}\nhtml.dark .dataTables_wrapper .dataTables_paginate .paginate_button:active {\n background: #3a3a3a;\n}\n',""]);const I=n},7184:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*!\n * jQuery UI Accordion 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/accordion/#theming\n */\n.ui-accordion .ui-accordion-header {\n\tdisplay: block;\n\tcursor: pointer;\n\tposition: relative;\n\tmargin: 2px 0 0 0;\n\tpadding: .5em .5em .5em .7em;\n\tfont-size: 100%;\n}\n.ui-accordion .ui-accordion-content {\n\tpadding: 1em 2.2em;\n\tborder-top: 0;\n\toverflow: auto;\n}\n",""]);const I=n},1220:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*!\n * jQuery UI Autocomplete 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/autocomplete/#theming\n */\n.ui-autocomplete {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tcursor: default;\n}\n",""]);const I=n},9048:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*!\n * jQuery UI Button 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/button/#theming\n */\n.ui-button {\n\tpadding: .4em 1em;\n\tdisplay: inline-block;\n\tposition: relative;\n\tline-height: normal;\n\tmargin-right: .1em;\n\tcursor: pointer;\n\tvertical-align: middle;\n\ttext-align: center;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n\n\t/* Support: IE <= 11 */\n\toverflow: visible;\n}\n\n.ui-button,\n.ui-button:link,\n.ui-button:visited,\n.ui-button:hover,\n.ui-button:active {\n\ttext-decoration: none;\n}\n\n/* to make room for the icon, a width needs to be set here */\n.ui-button-icon-only {\n\twidth: 2em;\n\tbox-sizing: border-box;\n\ttext-indent: -9999px;\n\twhite-space: nowrap;\n}\n\n/* no icon support for input elements */\ninput.ui-button.ui-button-icon-only {\n\ttext-indent: 0;\n}\n\n/* button icon element(s) */\n.ui-button-icon-only .ui-icon {\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 50%;\n\tmargin-top: -8px;\n\tmargin-left: -8px;\n}\n\n.ui-button.ui-icon-notext .ui-icon {\n\tpadding: 0;\n\twidth: 2.1em;\n\theight: 2.1em;\n\ttext-indent: -9999px;\n\twhite-space: nowrap;\n\n}\n\ninput.ui-button.ui-icon-notext .ui-icon {\n\twidth: auto;\n\theight: auto;\n\ttext-indent: 0;\n\twhite-space: normal;\n\tpadding: .4em 1em;\n}\n\n/* workarounds */\n/* Support: Firefox 5 - 40 */\ninput.ui-button::-moz-focus-inner,\nbutton.ui-button::-moz-focus-inner {\n\tborder: 0;\n\tpadding: 0;\n}\n",""]);const I=n},2102:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*!\n * jQuery UI Checkboxradio 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/checkboxradio/#theming\n */\n\n.ui-checkboxradio-label .ui-icon-background {\n\tbox-shadow: inset 1px 1px 1px #ccc;\n\tborder-radius: .12em;\n\tborder: none;\n}\n.ui-checkboxradio-radio-label .ui-icon-background {\n\twidth: 16px;\n\theight: 16px;\n\tborder-radius: 1em;\n\toverflow: visible;\n\tborder: none;\n}\n.ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,\n.ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon {\n\tbackground-image: none;\n\twidth: 8px;\n\theight: 8px;\n\tborder-width: 4px;\n\tborder-style: solid;\n}\n.ui-checkboxradio-disabled {\n\tpointer-events: none;\n}\n",""]);const I=n},3896:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*!\n * jQuery UI Controlgroup 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/controlgroup/#theming\n */\n\n.ui-controlgroup {\n\tvertical-align: middle;\n\tdisplay: inline-block;\n}\n.ui-controlgroup > .ui-controlgroup-item {\n\tfloat: left;\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n.ui-controlgroup > .ui-controlgroup-item:focus,\n.ui-controlgroup > .ui-controlgroup-item.ui-visual-focus {\n\tz-index: 9999;\n}\n.ui-controlgroup-vertical > .ui-controlgroup-item {\n\tdisplay: block;\n\tfloat: none;\n\twidth: 100%;\n\tmargin-top: 0;\n\tmargin-bottom: 0;\n\ttext-align: left;\n}\n.ui-controlgroup-vertical .ui-controlgroup-item {\n\tbox-sizing: border-box;\n}\n.ui-controlgroup .ui-controlgroup-label {\n\tpadding: .4em 1em;\n}\n.ui-controlgroup .ui-controlgroup-label span {\n\tfont-size: 80%;\n}\n.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item {\n\tborder-left: none;\n}\n.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item {\n\tborder-top: none;\n}\n.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content {\n\tborder-right: none;\n}\n.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content {\n\tborder-bottom: none;\n}\n\n/* Spinner specific style fixes */\n.ui-controlgroup-vertical .ui-spinner-input {\n\n\t/* Support: IE8 only, Android < 4.4 only */\n\twidth: 75%;\n\twidth: calc( 100% - 2.4em );\n}\n.ui-controlgroup-vertical .ui-spinner .ui-spinner-up {\n\tborder-top-style: solid;\n}\n\n",""]);const I=n},1093:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,'/*!\n * jQuery UI CSS Framework 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/category/theming/\n */\n\n/* Layout helpers\n----------------------------------*/\n.ui-helper-hidden {\n\tdisplay: none;\n}\n.ui-helper-hidden-accessible {\n\tborder: 0;\n\tclip: rect(0 0 0 0);\n\theight: 1px;\n\tmargin: -1px;\n\toverflow: hidden;\n\tpadding: 0;\n\tposition: absolute;\n\twidth: 1px;\n}\n.ui-helper-reset {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\toutline: 0;\n\tline-height: 1.3;\n\ttext-decoration: none;\n\tfont-size: 100%;\n\tlist-style: none;\n}\n.ui-helper-clearfix:before,\n.ui-helper-clearfix:after {\n\tcontent: "";\n\tdisplay: table;\n\tborder-collapse: collapse;\n}\n.ui-helper-clearfix:after {\n\tclear: both;\n}\n.ui-helper-zfix {\n\twidth: 100%;\n\theight: 100%;\n\ttop: 0;\n\tleft: 0;\n\tposition: absolute;\n\topacity: 0;\n\t-ms-filter: "alpha(opacity=0)"; /* support: IE8 */\n}\n\n.ui-front {\n\tz-index: 100;\n}\n\n\n/* Interaction Cues\n----------------------------------*/\n.ui-state-disabled {\n\tcursor: default !important;\n\tpointer-events: none;\n}\n\n\n/* Icons\n----------------------------------*/\n.ui-icon {\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tmargin-top: -.25em;\n\tposition: relative;\n\ttext-indent: -99999px;\n\toverflow: hidden;\n\tbackground-repeat: no-repeat;\n}\n\n.ui-widget-icon-block {\n\tleft: 50%;\n\tmargin-left: -8px;\n\tdisplay: block;\n}\n\n/* Misc visuals\n----------------------------------*/\n\n/* Overlays */\n.ui-widget-overlay {\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n}\n',""]);const I=n},3494:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*!\n * jQuery UI Datepicker 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/datepicker/#theming\n */\n.ui-datepicker {\n\twidth: 17em;\n\tpadding: .2em .2em 0;\n\tdisplay: none;\n}\n.ui-datepicker .ui-datepicker-header {\n\tposition: relative;\n\tpadding: .2em 0;\n}\n.ui-datepicker .ui-datepicker-prev,\n.ui-datepicker .ui-datepicker-next {\n\tposition: absolute;\n\ttop: 2px;\n\twidth: 1.8em;\n\theight: 1.8em;\n}\n.ui-datepicker .ui-datepicker-prev-hover,\n.ui-datepicker .ui-datepicker-next-hover {\n\ttop: 1px;\n}\n.ui-datepicker .ui-datepicker-prev {\n\tleft: 2px;\n}\n.ui-datepicker .ui-datepicker-next {\n\tright: 2px;\n}\n.ui-datepicker .ui-datepicker-prev-hover {\n\tleft: 1px;\n}\n.ui-datepicker .ui-datepicker-next-hover {\n\tright: 1px;\n}\n.ui-datepicker .ui-datepicker-prev span,\n.ui-datepicker .ui-datepicker-next span {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 50%;\n\tmargin-left: -8px;\n\ttop: 50%;\n\tmargin-top: -8px;\n}\n.ui-datepicker .ui-datepicker-title {\n\tmargin: 0 2.3em;\n\tline-height: 1.8em;\n\ttext-align: center;\n}\n.ui-datepicker .ui-datepicker-title select {\n\tfont-size: 1em;\n\tmargin: 1px 0;\n}\n.ui-datepicker select.ui-datepicker-month,\n.ui-datepicker select.ui-datepicker-year {\n\twidth: 45%;\n}\n.ui-datepicker table {\n\twidth: 100%;\n\tfont-size: .9em;\n\tborder-collapse: collapse;\n\tmargin: 0 0 .4em;\n}\n.ui-datepicker th {\n\tpadding: .7em .3em;\n\ttext-align: center;\n\tfont-weight: bold;\n\tborder: 0;\n}\n.ui-datepicker td {\n\tborder: 0;\n\tpadding: 1px;\n}\n.ui-datepicker td span,\n.ui-datepicker td a {\n\tdisplay: block;\n\tpadding: .2em;\n\ttext-align: right;\n\ttext-decoration: none;\n}\n.ui-datepicker .ui-datepicker-buttonpane {\n\tbackground-image: none;\n\tmargin: .7em 0 0 0;\n\tpadding: 0 .2em;\n\tborder-left: 0;\n\tborder-right: 0;\n\tborder-bottom: 0;\n}\n.ui-datepicker .ui-datepicker-buttonpane button {\n\tfloat: right;\n\tmargin: .5em .2em .4em;\n\tcursor: pointer;\n\tpadding: .2em .6em .3em .6em;\n\twidth: auto;\n\toverflow: visible;\n}\n.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {\n\tfloat: left;\n}\n\n/* with multiple calendars */\n.ui-datepicker.ui-datepicker-multi {\n\twidth: auto;\n}\n.ui-datepicker-multi .ui-datepicker-group {\n\tfloat: left;\n}\n.ui-datepicker-multi .ui-datepicker-group table {\n\twidth: 95%;\n\tmargin: 0 auto .4em;\n}\n.ui-datepicker-multi-2 .ui-datepicker-group {\n\twidth: 50%;\n}\n.ui-datepicker-multi-3 .ui-datepicker-group {\n\twidth: 33.3%;\n}\n.ui-datepicker-multi-4 .ui-datepicker-group {\n\twidth: 25%;\n}\n.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,\n.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {\n\tborder-left-width: 0;\n}\n.ui-datepicker-multi .ui-datepicker-buttonpane {\n\tclear: left;\n}\n.ui-datepicker-row-break {\n\tclear: both;\n\twidth: 100%;\n\tfont-size: 0;\n}\n\n/* RTL support */\n.ui-datepicker-rtl {\n\tdirection: rtl;\n}\n.ui-datepicker-rtl .ui-datepicker-prev {\n\tright: 2px;\n\tleft: auto;\n}\n.ui-datepicker-rtl .ui-datepicker-next {\n\tleft: 2px;\n\tright: auto;\n}\n.ui-datepicker-rtl .ui-datepicker-prev:hover {\n\tright: 1px;\n\tleft: auto;\n}\n.ui-datepicker-rtl .ui-datepicker-next:hover {\n\tleft: 1px;\n\tright: auto;\n}\n.ui-datepicker-rtl .ui-datepicker-buttonpane {\n\tclear: right;\n}\n.ui-datepicker-rtl .ui-datepicker-buttonpane button {\n\tfloat: left;\n}\n.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,\n.ui-datepicker-rtl .ui-datepicker-group {\n\tfloat: right;\n}\n.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,\n.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {\n\tborder-right-width: 0;\n\tborder-left-width: 1px;\n}\n\n/* Icons */\n.ui-datepicker .ui-icon {\n\tdisplay: block;\n\ttext-indent: -99999px;\n\toverflow: hidden;\n\tbackground-repeat: no-repeat;\n\tleft: .5em;\n\ttop: .3em;\n}\n",""]);const I=n},1312:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*!\n * jQuery UI Dialog 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/dialog/#theming\n */\n.ui-dialog {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tpadding: .2em;\n\toutline: 0;\n}\n.ui-dialog .ui-dialog-titlebar {\n\tpadding: .4em 1em;\n\tposition: relative;\n}\n.ui-dialog .ui-dialog-title {\n\tfloat: left;\n\tmargin: .1em 0;\n\twhite-space: nowrap;\n\twidth: 90%;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n.ui-dialog .ui-dialog-titlebar-close {\n\tposition: absolute;\n\tright: .3em;\n\ttop: 50%;\n\twidth: 20px;\n\tmargin: -10px 0 0 0;\n\tpadding: 1px;\n\theight: 20px;\n}\n.ui-dialog .ui-dialog-content {\n\tposition: relative;\n\tborder: 0;\n\tpadding: .5em 1em;\n\tbackground: none;\n\toverflow: auto;\n}\n.ui-dialog .ui-dialog-buttonpane {\n\ttext-align: left;\n\tborder-width: 1px 0 0 0;\n\tbackground-image: none;\n\tmargin-top: .5em;\n\tpadding: .3em 1em .5em .4em;\n}\n.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {\n\tfloat: right;\n}\n.ui-dialog .ui-dialog-buttonpane button {\n\tmargin: .5em .4em .5em 0;\n\tcursor: pointer;\n}\n.ui-dialog .ui-resizable-n {\n\theight: 2px;\n\ttop: 0;\n}\n.ui-dialog .ui-resizable-e {\n\twidth: 2px;\n\tright: 0;\n}\n.ui-dialog .ui-resizable-s {\n\theight: 2px;\n\tbottom: 0;\n}\n.ui-dialog .ui-resizable-w {\n\twidth: 2px;\n\tleft: 0;\n}\n.ui-dialog .ui-resizable-se,\n.ui-dialog .ui-resizable-sw,\n.ui-dialog .ui-resizable-ne,\n.ui-dialog .ui-resizable-nw {\n\twidth: 7px;\n\theight: 7px;\n}\n.ui-dialog .ui-resizable-se {\n\tright: 0;\n\tbottom: 0;\n}\n.ui-dialog .ui-resizable-sw {\n\tleft: 0;\n\tbottom: 0;\n}\n.ui-dialog .ui-resizable-ne {\n\tright: 0;\n\ttop: 0;\n}\n.ui-dialog .ui-resizable-nw {\n\tleft: 0;\n\ttop: 0;\n}\n.ui-draggable .ui-dialog-titlebar {\n\tcursor: move;\n}\n",""]);const I=n},5015:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*!\n * jQuery UI Draggable 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n.ui-draggable-handle {\n\t-ms-touch-action: none;\n\ttouch-action: none;\n}\n",""]);const I=n},3041:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,'/*!\n * jQuery UI Menu 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/menu/#theming\n */\n.ui-menu {\n\tlist-style: none;\n\tpadding: 0;\n\tmargin: 0;\n\tdisplay: block;\n\toutline: 0;\n}\n.ui-menu .ui-menu {\n\tposition: absolute;\n}\n.ui-menu .ui-menu-item {\n\tmargin: 0;\n\tcursor: pointer;\n\t/* support: IE10, see #8844 */\n\tlist-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");\n}\n.ui-menu .ui-menu-item-wrapper {\n\tposition: relative;\n\tpadding: 3px 1em 3px .4em;\n}\n.ui-menu .ui-menu-divider {\n\tmargin: 5px 0;\n\theight: 0;\n\tfont-size: 0;\n\tline-height: 0;\n\tborder-width: 1px 0 0 0;\n}\n.ui-menu .ui-state-focus,\n.ui-menu .ui-state-active {\n\tmargin: -1px;\n}\n\n/* icon support */\n.ui-menu-icons {\n\tposition: relative;\n}\n.ui-menu-icons .ui-menu-item-wrapper {\n\tpadding-left: 2em;\n}\n\n/* left-aligned */\n.ui-menu .ui-icon {\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tleft: .2em;\n\tmargin: auto 0;\n}\n\n/* right-aligned */\n.ui-menu .ui-menu-icon {\n\tleft: auto;\n\tright: 0;\n}\n',""]);const I=n},4986:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,'/*!\n * jQuery UI Progressbar 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/progressbar/#theming\n */\n.ui-progressbar {\n\theight: 2em;\n\ttext-align: left;\n\toverflow: hidden;\n}\n.ui-progressbar .ui-progressbar-value {\n\tmargin: -1px;\n\theight: 100%;\n}\n.ui-progressbar .ui-progressbar-overlay {\n\tbackground: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");\n\theight: 100%;\n\t-ms-filter: "alpha(opacity=25)"; /* support: IE8 */\n\topacity: 0.25;\n}\n.ui-progressbar-indeterminate .ui-progressbar-value {\n\tbackground-image: none;\n}\n',""]);const I=n},2009:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*!\n * jQuery UI Resizable 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n.ui-resizable {\n\tposition: relative;\n}\n.ui-resizable-handle {\n\tposition: absolute;\n\tfont-size: 0.1px;\n\tdisplay: block;\n\t-ms-touch-action: none;\n\ttouch-action: none;\n}\n.ui-resizable-disabled .ui-resizable-handle,\n.ui-resizable-autohide .ui-resizable-handle {\n\tdisplay: none;\n}\n.ui-resizable-n {\n\tcursor: n-resize;\n\theight: 7px;\n\twidth: 100%;\n\ttop: -5px;\n\tleft: 0;\n}\n.ui-resizable-s {\n\tcursor: s-resize;\n\theight: 7px;\n\twidth: 100%;\n\tbottom: -5px;\n\tleft: 0;\n}\n.ui-resizable-e {\n\tcursor: e-resize;\n\twidth: 7px;\n\tright: -5px;\n\ttop: 0;\n\theight: 100%;\n}\n.ui-resizable-w {\n\tcursor: w-resize;\n\twidth: 7px;\n\tleft: -5px;\n\ttop: 0;\n\theight: 100%;\n}\n.ui-resizable-se {\n\tcursor: se-resize;\n\twidth: 12px;\n\theight: 12px;\n\tright: 1px;\n\tbottom: 1px;\n}\n.ui-resizable-sw {\n\tcursor: sw-resize;\n\twidth: 9px;\n\theight: 9px;\n\tleft: -5px;\n\tbottom: -5px;\n}\n.ui-resizable-nw {\n\tcursor: nw-resize;\n\twidth: 9px;\n\theight: 9px;\n\tleft: -5px;\n\ttop: -5px;\n}\n.ui-resizable-ne {\n\tcursor: ne-resize;\n\twidth: 9px;\n\theight: 9px;\n\tright: -5px;\n\ttop: -5px;\n}\n",""]);const I=n},8932:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*!\n * jQuery UI Selectable 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n.ui-selectable {\n\t-ms-touch-action: none;\n\ttouch-action: none;\n}\n.ui-selectable-helper {\n\tposition: absolute;\n\tz-index: 100;\n\tborder: 1px dotted black;\n}\n",""]);const I=n},6265:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*!\n * jQuery UI Selectmenu 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/selectmenu/#theming\n */\n.ui-selectmenu-menu {\n\tpadding: 0;\n\tmargin: 0;\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tdisplay: none;\n}\n.ui-selectmenu-menu .ui-menu {\n\toverflow: auto;\n\toverflow-x: hidden;\n\tpadding-bottom: 1px;\n}\n.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {\n\tfont-size: 1em;\n\tfont-weight: bold;\n\tline-height: 1.5;\n\tpadding: 2px 0.4em;\n\tmargin: 0.5em 0 0 0;\n\theight: auto;\n\tborder: 0;\n}\n.ui-selectmenu-open {\n\tdisplay: block;\n}\n.ui-selectmenu-text {\n\tdisplay: block;\n\tmargin-right: 20px;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n.ui-selectmenu-button.ui-button {\n\ttext-align: left;\n\twhite-space: nowrap;\n\twidth: 14em;\n}\n.ui-selectmenu-icon.ui-icon {\n\tfloat: right;\n\tmargin-top: 0;\n}\n",""]);const I=n},4607:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*!\n * jQuery UI Slider 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/slider/#theming\n */\n.ui-slider {\n\tposition: relative;\n\ttext-align: left;\n}\n.ui-slider .ui-slider-handle {\n\tposition: absolute;\n\tz-index: 2;\n\twidth: 1.2em;\n\theight: 1.2em;\n\tcursor: pointer;\n\t-ms-touch-action: none;\n\ttouch-action: none;\n}\n.ui-slider .ui-slider-range {\n\tposition: absolute;\n\tz-index: 1;\n\tfont-size: .7em;\n\tdisplay: block;\n\tborder: 0;\n\tbackground-position: 0 0;\n}\n\n/* support: IE8 - See #6727 */\n.ui-slider.ui-state-disabled .ui-slider-handle,\n.ui-slider.ui-state-disabled .ui-slider-range {\n\tfilter: inherit;\n}\n\n.ui-slider-horizontal {\n\theight: .8em;\n}\n.ui-slider-horizontal .ui-slider-handle {\n\ttop: -.3em;\n\tmargin-left: -.6em;\n}\n.ui-slider-horizontal .ui-slider-range {\n\ttop: 0;\n\theight: 100%;\n}\n.ui-slider-horizontal .ui-slider-range-min {\n\tleft: 0;\n}\n.ui-slider-horizontal .ui-slider-range-max {\n\tright: 0;\n}\n\n.ui-slider-vertical {\n\twidth: .8em;\n\theight: 100px;\n}\n.ui-slider-vertical .ui-slider-handle {\n\tleft: -.3em;\n\tmargin-left: 0;\n\tmargin-bottom: -.6em;\n}\n.ui-slider-vertical .ui-slider-range {\n\tleft: 0;\n\twidth: 100%;\n}\n.ui-slider-vertical .ui-slider-range-min {\n\tbottom: 0;\n}\n.ui-slider-vertical .ui-slider-range-max {\n\ttop: 0;\n}\n",""]);const I=n},6936:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*!\n * jQuery UI Sortable 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n.ui-sortable-handle {\n\t-ms-touch-action: none;\n\ttouch-action: none;\n}\n",""]);const I=n},3837:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*!\n * jQuery UI Spinner 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/spinner/#theming\n */\n.ui-spinner {\n\tposition: relative;\n\tdisplay: inline-block;\n\toverflow: hidden;\n\tpadding: 0;\n\tvertical-align: middle;\n}\n.ui-spinner-input {\n\tborder: none;\n\tbackground: none;\n\tcolor: inherit;\n\tpadding: .222em 0;\n\tmargin: .2em 0;\n\tvertical-align: middle;\n\tmargin-left: .4em;\n\tmargin-right: 2em;\n}\n.ui-spinner-button {\n\twidth: 1.6em;\n\theight: 50%;\n\tfont-size: .5em;\n\tpadding: 0;\n\tmargin: 0;\n\ttext-align: center;\n\tposition: absolute;\n\tcursor: default;\n\tdisplay: block;\n\toverflow: hidden;\n\tright: 0;\n}\n/* more specificity required here to override default borders */\n.ui-spinner a.ui-spinner-button {\n\tborder-top-style: none;\n\tborder-bottom-style: none;\n\tborder-right-style: none;\n}\n.ui-spinner-up {\n\ttop: 0;\n}\n.ui-spinner-down {\n\tbottom: 0;\n}\n",""]);const I=n},212:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,'/*!\n * jQuery UI Tabs 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/tabs/#theming\n */\n.ui-tabs {\n\tposition: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */\n\tpadding: .2em;\n}\n.ui-tabs .ui-tabs-nav {\n\tmargin: 0;\n\tpadding: .2em .2em 0;\n}\n.ui-tabs .ui-tabs-nav li {\n\tlist-style: none;\n\tfloat: left;\n\tposition: relative;\n\ttop: 0;\n\tmargin: 1px .2em 0 0;\n\tborder-bottom-width: 0;\n\tpadding: 0;\n\twhite-space: nowrap;\n}\n.ui-tabs .ui-tabs-nav .ui-tabs-anchor {\n\tfloat: left;\n\tpadding: .5em 1em;\n\ttext-decoration: none;\n}\n.ui-tabs .ui-tabs-nav li.ui-tabs-active {\n\tmargin-bottom: -1px;\n\tpadding-bottom: 1px;\n}\n.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,\n.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,\n.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {\n\tcursor: text;\n}\n.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {\n\tcursor: pointer;\n}\n.ui-tabs .ui-tabs-panel {\n\tdisplay: block;\n\tborder-width: 0;\n\tpadding: 1em 1.4em;\n\tbackground: none;\n}\n',""]);const I=n},9817:(A,t,e)=>{"use strict";e.d(t,{A:()=>y});var i=e(6314),n=e.n(i),I=e(4417),r=e.n(I),o=e(3835),g=e(4941),a=e(8839),M=e(7984),s=e(3729),c=e(8101),u=n()((function(A){return A[1]})),l=r()(o.A),C=r()(g.A),T=r()(a.A),h=r()(M.A),N=r()(s.A),d=r()(c.A);u.push([A.id,'/*!\n * jQuery UI CSS Framework 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/category/theming/\n *\n * To view and modify this theme, visit http://jqueryui.com/themeroller/\n */\n\n\n/* Component containers\n----------------------------------*/\n.ui-widget {\n\tfont-family: Arial,Helvetica,sans-serif/*{ffDefault}*/;\n\tfont-size: 1em/*{fsDefault}*/;\n}\n.ui-widget .ui-widget {\n\tfont-size: 1em;\n}\n.ui-widget input,\n.ui-widget select,\n.ui-widget textarea,\n.ui-widget button {\n\tfont-family: Arial,Helvetica,sans-serif/*{ffDefault}*/;\n\tfont-size: 1em;\n}\n.ui-widget.ui-widget-content {\n\tborder: 1px solid #c5c5c5/*{borderColorDefault}*/;\n}\n.ui-widget-content {\n\tborder: 1px solid #dddddd/*{borderColorContent}*/;\n\tbackground: #ffffff/*{bgColorContent}*/ /*{bgImgUrlContent}*/ /*{bgContentXPos}*/ /*{bgContentYPos}*/ /*{bgContentRepeat}*/;\n\tcolor: #333333/*{fcContent}*/;\n}\n.ui-widget-content a {\n\tcolor: #333333/*{fcContent}*/;\n}\n.ui-widget-header {\n\tborder: 1px solid #dddddd/*{borderColorHeader}*/;\n\tbackground: #e9e9e9/*{bgColorHeader}*/ /*{bgImgUrlHeader}*/ /*{bgHeaderXPos}*/ /*{bgHeaderYPos}*/ /*{bgHeaderRepeat}*/;\n\tcolor: #333333/*{fcHeader}*/;\n\tfont-weight: bold;\n}\n.ui-widget-header a {\n\tcolor: #333333/*{fcHeader}*/;\n}\n\n/* Interaction states\n----------------------------------*/\n.ui-state-default,\n.ui-widget-content .ui-state-default,\n.ui-widget-header .ui-state-default,\n.ui-button,\n\n/* We use html here because we need a greater specificity to make sure disabled\nworks properly when clicked or hovered */\nhtml .ui-button.ui-state-disabled:hover,\nhtml .ui-button.ui-state-disabled:active {\n\tborder: 1px solid #c5c5c5/*{borderColorDefault}*/;\n\tbackground: #f6f6f6/*{bgColorDefault}*/ /*{bgImgUrlDefault}*/ /*{bgDefaultXPos}*/ /*{bgDefaultYPos}*/ /*{bgDefaultRepeat}*/;\n\tfont-weight: normal/*{fwDefault}*/;\n\tcolor: #454545/*{fcDefault}*/;\n}\n.ui-state-default a,\n.ui-state-default a:link,\n.ui-state-default a:visited,\na.ui-button,\na:link.ui-button,\na:visited.ui-button,\n.ui-button {\n\tcolor: #454545/*{fcDefault}*/;\n\ttext-decoration: none;\n}\n.ui-state-hover,\n.ui-widget-content .ui-state-hover,\n.ui-widget-header .ui-state-hover,\n.ui-state-focus,\n.ui-widget-content .ui-state-focus,\n.ui-widget-header .ui-state-focus,\n.ui-button:hover,\n.ui-button:focus {\n\tborder: 1px solid #cccccc/*{borderColorHover}*/;\n\tbackground: #ededed/*{bgColorHover}*/ /*{bgImgUrlHover}*/ /*{bgHoverXPos}*/ /*{bgHoverYPos}*/ /*{bgHoverRepeat}*/;\n\tfont-weight: normal/*{fwDefault}*/;\n\tcolor: #2b2b2b/*{fcHover}*/;\n}\n.ui-state-hover a,\n.ui-state-hover a:hover,\n.ui-state-hover a:link,\n.ui-state-hover a:visited,\n.ui-state-focus a,\n.ui-state-focus a:hover,\n.ui-state-focus a:link,\n.ui-state-focus a:visited,\na.ui-button:hover,\na.ui-button:focus {\n\tcolor: #2b2b2b/*{fcHover}*/;\n\ttext-decoration: none;\n}\n\n.ui-visual-focus {\n\tbox-shadow: 0 0 3px 1px rgb(94, 158, 214);\n}\n.ui-state-active,\n.ui-widget-content .ui-state-active,\n.ui-widget-header .ui-state-active,\na.ui-button:active,\n.ui-button:active,\n.ui-button.ui-state-active:hover {\n\tborder: 1px solid #003eff/*{borderColorActive}*/;\n\tbackground: #007fff/*{bgColorActive}*/ /*{bgImgUrlActive}*/ /*{bgActiveXPos}*/ /*{bgActiveYPos}*/ /*{bgActiveRepeat}*/;\n\tfont-weight: normal/*{fwDefault}*/;\n\tcolor: #ffffff/*{fcActive}*/;\n}\n.ui-icon-background,\n.ui-state-active .ui-icon-background {\n\tborder: #003eff/*{borderColorActive}*/;\n\tbackground-color: #ffffff/*{fcActive}*/;\n}\n.ui-state-active a,\n.ui-state-active a:link,\n.ui-state-active a:visited {\n\tcolor: #ffffff/*{fcActive}*/;\n\ttext-decoration: none;\n}\n\n/* Interaction Cues\n----------------------------------*/\n.ui-state-highlight,\n.ui-widget-content .ui-state-highlight,\n.ui-widget-header .ui-state-highlight {\n\tborder: 1px solid #dad55e/*{borderColorHighlight}*/;\n\tbackground: #fffa90/*{bgColorHighlight}*/ /*{bgImgUrlHighlight}*/ /*{bgHighlightXPos}*/ /*{bgHighlightYPos}*/ /*{bgHighlightRepeat}*/;\n\tcolor: #777620/*{fcHighlight}*/;\n}\n.ui-state-checked {\n\tborder: 1px solid #dad55e/*{borderColorHighlight}*/;\n\tbackground: #fffa90/*{bgColorHighlight}*/;\n}\n.ui-state-highlight a,\n.ui-widget-content .ui-state-highlight a,\n.ui-widget-header .ui-state-highlight a {\n\tcolor: #777620/*{fcHighlight}*/;\n}\n.ui-state-error,\n.ui-widget-content .ui-state-error,\n.ui-widget-header .ui-state-error {\n\tborder: 1px solid #f1a899/*{borderColorError}*/;\n\tbackground: #fddfdf/*{bgColorError}*/ /*{bgImgUrlError}*/ /*{bgErrorXPos}*/ /*{bgErrorYPos}*/ /*{bgErrorRepeat}*/;\n\tcolor: #5f3f3f/*{fcError}*/;\n}\n.ui-state-error a,\n.ui-widget-content .ui-state-error a,\n.ui-widget-header .ui-state-error a {\n\tcolor: #5f3f3f/*{fcError}*/;\n}\n.ui-state-error-text,\n.ui-widget-content .ui-state-error-text,\n.ui-widget-header .ui-state-error-text {\n\tcolor: #5f3f3f/*{fcError}*/;\n}\n.ui-priority-primary,\n.ui-widget-content .ui-priority-primary,\n.ui-widget-header .ui-priority-primary {\n\tfont-weight: bold;\n}\n.ui-priority-secondary,\n.ui-widget-content .ui-priority-secondary,\n.ui-widget-header .ui-priority-secondary {\n\topacity: .7;\n\t-ms-filter: "alpha(opacity=70)"; /* support: IE8 */\n\tfont-weight: normal;\n}\n.ui-state-disabled,\n.ui-widget-content .ui-state-disabled,\n.ui-widget-header .ui-state-disabled {\n\topacity: .35;\n\t-ms-filter: "alpha(opacity=35)"; /* support: IE8 */\n\tbackground-image: none;\n}\n.ui-state-disabled .ui-icon {\n\t-ms-filter: "alpha(opacity=35)"; /* support: IE8 - See #6059 */\n}\n\n/* Icons\n----------------------------------*/\n\n/* states and images */\n.ui-icon {\n\twidth: 16px;\n\theight: 16px;\n}\n.ui-icon,\n.ui-widget-content .ui-icon {\n\tbackground-image: url('+l+")/*{iconsContent}*/;\n}\n.ui-widget-header .ui-icon {\n\tbackground-image: url("+l+")/*{iconsHeader}*/;\n}\n.ui-state-hover .ui-icon,\n.ui-state-focus .ui-icon,\n.ui-button:hover .ui-icon,\n.ui-button:focus .ui-icon {\n\tbackground-image: url("+C+")/*{iconsHover}*/;\n}\n.ui-state-active .ui-icon,\n.ui-button:active .ui-icon {\n\tbackground-image: url("+T+")/*{iconsActive}*/;\n}\n.ui-state-highlight .ui-icon,\n.ui-button .ui-state-highlight.ui-icon {\n\tbackground-image: url("+h+")/*{iconsHighlight}*/;\n}\n.ui-state-error .ui-icon,\n.ui-state-error-text .ui-icon {\n\tbackground-image: url("+N+")/*{iconsError}*/;\n}\n.ui-button .ui-icon {\n\tbackground-image: url("+d+')/*{iconsDefault}*/;\n}\n\n/* positioning */\n/* Three classes needed to override `.ui-button:hover .ui-icon` */\n.ui-icon-blank.ui-icon-blank.ui-icon-blank {\n\tbackground-image: none;\n}\n.ui-icon-caret-1-n { background-position: 0 0; }\n.ui-icon-caret-1-ne { background-position: -16px 0; }\n.ui-icon-caret-1-e { background-position: -32px 0; }\n.ui-icon-caret-1-se { background-position: -48px 0; }\n.ui-icon-caret-1-s { background-position: -65px 0; }\n.ui-icon-caret-1-sw { background-position: -80px 0; }\n.ui-icon-caret-1-w { background-position: -96px 0; }\n.ui-icon-caret-1-nw { background-position: -112px 0; }\n.ui-icon-caret-2-n-s { background-position: -128px 0; }\n.ui-icon-caret-2-e-w { background-position: -144px 0; }\n.ui-icon-triangle-1-n { background-position: 0 -16px; }\n.ui-icon-triangle-1-ne { background-position: -16px -16px; }\n.ui-icon-triangle-1-e { background-position: -32px -16px; }\n.ui-icon-triangle-1-se { background-position: -48px -16px; }\n.ui-icon-triangle-1-s { background-position: -65px -16px; }\n.ui-icon-triangle-1-sw { background-position: -80px -16px; }\n.ui-icon-triangle-1-w { background-position: -96px -16px; }\n.ui-icon-triangle-1-nw { background-position: -112px -16px; }\n.ui-icon-triangle-2-n-s { background-position: -128px -16px; }\n.ui-icon-triangle-2-e-w { background-position: -144px -16px; }\n.ui-icon-arrow-1-n { background-position: 0 -32px; }\n.ui-icon-arrow-1-ne { background-position: -16px -32px; }\n.ui-icon-arrow-1-e { background-position: -32px -32px; }\n.ui-icon-arrow-1-se { background-position: -48px -32px; }\n.ui-icon-arrow-1-s { background-position: -65px -32px; }\n.ui-icon-arrow-1-sw { background-position: -80px -32px; }\n.ui-icon-arrow-1-w { background-position: -96px -32px; }\n.ui-icon-arrow-1-nw { background-position: -112px -32px; }\n.ui-icon-arrow-2-n-s { background-position: -128px -32px; }\n.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }\n.ui-icon-arrow-2-e-w { background-position: -160px -32px; }\n.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }\n.ui-icon-arrowstop-1-n { background-position: -192px -32px; }\n.ui-icon-arrowstop-1-e { background-position: -208px -32px; }\n.ui-icon-arrowstop-1-s { background-position: -224px -32px; }\n.ui-icon-arrowstop-1-w { background-position: -240px -32px; }\n.ui-icon-arrowthick-1-n { background-position: 1px -48px; }\n.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }\n.ui-icon-arrowthick-1-e { background-position: -32px -48px; }\n.ui-icon-arrowthick-1-se { background-position: -48px -48px; }\n.ui-icon-arrowthick-1-s { background-position: -64px -48px; }\n.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }\n.ui-icon-arrowthick-1-w { background-position: -96px -48px; }\n.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }\n.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }\n.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }\n.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }\n.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }\n.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }\n.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }\n.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }\n.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }\n.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }\n.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }\n.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }\n.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }\n.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }\n.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }\n.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }\n.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }\n.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }\n.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }\n.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }\n.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }\n.ui-icon-arrow-4 { background-position: 0 -80px; }\n.ui-icon-arrow-4-diag { background-position: -16px -80px; }\n.ui-icon-extlink { background-position: -32px -80px; }\n.ui-icon-newwin { background-position: -48px -80px; }\n.ui-icon-refresh { background-position: -64px -80px; }\n.ui-icon-shuffle { background-position: -80px -80px; }\n.ui-icon-transfer-e-w { background-position: -96px -80px; }\n.ui-icon-transferthick-e-w { background-position: -112px -80px; }\n.ui-icon-folder-collapsed { background-position: 0 -96px; }\n.ui-icon-folder-open { background-position: -16px -96px; }\n.ui-icon-document { background-position: -32px -96px; }\n.ui-icon-document-b { background-position: -48px -96px; }\n.ui-icon-note { background-position: -64px -96px; }\n.ui-icon-mail-closed { background-position: -80px -96px; }\n.ui-icon-mail-open { background-position: -96px -96px; }\n.ui-icon-suitcase { background-position: -112px -96px; }\n.ui-icon-comment { background-position: -128px -96px; }\n.ui-icon-person { background-position: -144px -96px; }\n.ui-icon-print { background-position: -160px -96px; }\n.ui-icon-trash { background-position: -176px -96px; }\n.ui-icon-locked { background-position: -192px -96px; }\n.ui-icon-unlocked { background-position: -208px -96px; }\n.ui-icon-bookmark { background-position: -224px -96px; }\n.ui-icon-tag { background-position: -240px -96px; }\n.ui-icon-home { background-position: 0 -112px; }\n.ui-icon-flag { background-position: -16px -112px; }\n.ui-icon-calendar { background-position: -32px -112px; }\n.ui-icon-cart { background-position: -48px -112px; }\n.ui-icon-pencil { background-position: -64px -112px; }\n.ui-icon-clock { background-position: -80px -112px; }\n.ui-icon-disk { background-position: -96px -112px; }\n.ui-icon-calculator { background-position: -112px -112px; }\n.ui-icon-zoomin { background-position: -128px -112px; }\n.ui-icon-zoomout { background-position: -144px -112px; }\n.ui-icon-search { background-position: -160px -112px; }\n.ui-icon-wrench { background-position: -176px -112px; }\n.ui-icon-gear { background-position: -192px -112px; }\n.ui-icon-heart { background-position: -208px -112px; }\n.ui-icon-star { background-position: -224px -112px; }\n.ui-icon-link { background-position: -240px -112px; }\n.ui-icon-cancel { background-position: 0 -128px; }\n.ui-icon-plus { background-position: -16px -128px; }\n.ui-icon-plusthick { background-position: -32px -128px; }\n.ui-icon-minus { background-position: -48px -128px; }\n.ui-icon-minusthick { background-position: -64px -128px; }\n.ui-icon-close { background-position: -80px -128px; }\n.ui-icon-closethick { background-position: -96px -128px; }\n.ui-icon-key { background-position: -112px -128px; }\n.ui-icon-lightbulb { background-position: -128px -128px; }\n.ui-icon-scissors { background-position: -144px -128px; }\n.ui-icon-clipboard { background-position: -160px -128px; }\n.ui-icon-copy { background-position: -176px -128px; }\n.ui-icon-contact { background-position: -192px -128px; }\n.ui-icon-image { background-position: -208px -128px; }\n.ui-icon-video { background-position: -224px -128px; }\n.ui-icon-script { background-position: -240px -128px; }\n.ui-icon-alert { background-position: 0 -144px; }\n.ui-icon-info { background-position: -16px -144px; }\n.ui-icon-notice { background-position: -32px -144px; }\n.ui-icon-help { background-position: -48px -144px; }\n.ui-icon-check { background-position: -64px -144px; }\n.ui-icon-bullet { background-position: -80px -144px; }\n.ui-icon-radio-on { background-position: -96px -144px; }\n.ui-icon-radio-off { background-position: -112px -144px; }\n.ui-icon-pin-w { background-position: -128px -144px; }\n.ui-icon-pin-s { background-position: -144px -144px; }\n.ui-icon-play { background-position: 0 -160px; }\n.ui-icon-pause { background-position: -16px -160px; }\n.ui-icon-seek-next { background-position: -32px -160px; }\n.ui-icon-seek-prev { background-position: -48px -160px; }\n.ui-icon-seek-end { background-position: -64px -160px; }\n.ui-icon-seek-start { background-position: -80px -160px; }\n/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */\n.ui-icon-seek-first { background-position: -80px -160px; }\n.ui-icon-stop { background-position: -96px -160px; }\n.ui-icon-eject { background-position: -112px -160px; }\n.ui-icon-volume-off { background-position: -128px -160px; }\n.ui-icon-volume-on { background-position: -144px -160px; }\n.ui-icon-power { background-position: 0 -176px; }\n.ui-icon-signal-diag { background-position: -16px -176px; }\n.ui-icon-signal { background-position: -32px -176px; }\n.ui-icon-battery-0 { background-position: -48px -176px; }\n.ui-icon-battery-1 { background-position: -64px -176px; }\n.ui-icon-battery-2 { background-position: -80px -176px; }\n.ui-icon-battery-3 { background-position: -96px -176px; }\n.ui-icon-circle-plus { background-position: 0 -192px; }\n.ui-icon-circle-minus { background-position: -16px -192px; }\n.ui-icon-circle-close { background-position: -32px -192px; }\n.ui-icon-circle-triangle-e { background-position: -48px -192px; }\n.ui-icon-circle-triangle-s { background-position: -64px -192px; }\n.ui-icon-circle-triangle-w { background-position: -80px -192px; }\n.ui-icon-circle-triangle-n { background-position: -96px -192px; }\n.ui-icon-circle-arrow-e { background-position: -112px -192px; }\n.ui-icon-circle-arrow-s { background-position: -128px -192px; }\n.ui-icon-circle-arrow-w { background-position: -144px -192px; }\n.ui-icon-circle-arrow-n { background-position: -160px -192px; }\n.ui-icon-circle-zoomin { background-position: -176px -192px; }\n.ui-icon-circle-zoomout { background-position: -192px -192px; }\n.ui-icon-circle-check { background-position: -208px -192px; }\n.ui-icon-circlesmall-plus { background-position: 0 -208px; }\n.ui-icon-circlesmall-minus { background-position: -16px -208px; }\n.ui-icon-circlesmall-close { background-position: -32px -208px; }\n.ui-icon-squaresmall-plus { background-position: -48px -208px; }\n.ui-icon-squaresmall-minus { background-position: -64px -208px; }\n.ui-icon-squaresmall-close { background-position: -80px -208px; }\n.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }\n.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }\n.ui-icon-grip-solid-vertical { background-position: -32px -224px; }\n.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }\n.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }\n.ui-icon-grip-diagonal-se { background-position: -80px -224px; }\n\n\n/* Misc visuals\n----------------------------------*/\n\n/* Corner radius */\n.ui-corner-all,\n.ui-corner-top,\n.ui-corner-left,\n.ui-corner-tl {\n\tborder-top-left-radius: 3px/*{cornerRadius}*/;\n}\n.ui-corner-all,\n.ui-corner-top,\n.ui-corner-right,\n.ui-corner-tr {\n\tborder-top-right-radius: 3px/*{cornerRadius}*/;\n}\n.ui-corner-all,\n.ui-corner-bottom,\n.ui-corner-left,\n.ui-corner-bl {\n\tborder-bottom-left-radius: 3px/*{cornerRadius}*/;\n}\n.ui-corner-all,\n.ui-corner-bottom,\n.ui-corner-right,\n.ui-corner-br {\n\tborder-bottom-right-radius: 3px/*{cornerRadius}*/;\n}\n\n/* Overlays */\n.ui-widget-overlay {\n\tbackground: #aaaaaa/*{bgColorOverlay}*/ /*{bgImgUrlOverlay}*/ /*{bgOverlayXPos}*/ /*{bgOverlayYPos}*/ /*{bgOverlayRepeat}*/;\n\topacity: .3/*{opacityOverlay}*/;\n\t-ms-filter: "alpha(opacity=30)"/*{opacityFilterOverlay}*/; /* support: IE8 */\n}\n.ui-widget-shadow {\n\t-webkit-box-shadow: 0/*{offsetLeftShadow}*/ 0/*{offsetTopShadow}*/ 5px/*{thicknessShadow}*/ #666666/*{bgColorShadow}*/;\n\tbox-shadow: 0/*{offsetLeftShadow}*/ 0/*{offsetTopShadow}*/ 5px/*{thicknessShadow}*/ #666666/*{bgColorShadow}*/;\n}\n',""]);const y=u},9635:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*!\n * jQuery UI Tooltip 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/tooltip/#theming\n */\n.ui-tooltip {\n\tpadding: 8px;\n\tposition: absolute;\n\tz-index: 9999;\n\tmax-width: 300px;\n}\nbody .ui-tooltip {\n\tborder-width: 2px;\n}\n",""]);const I=n},4612:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"\n.xispec_subViewHeader{\n color: #ffffff;\n padding-left: 0.5em;\n border-top: 1px solid black;\n border-bottom: 1px solid white;\n background: rgba(117, 0, 0, 1);\n}\n\n.xispec_subViewHeader .xispec_btn{\n padding: 0px 6px;\n font-size: smaller;\n}\n\n.xispec_errSVG {\n width: 100%;\n flex-grow: 1;\n}\n\n.xispec_subViewContent {\n\tflex-direction: row;\n\tdisplay: flex;\n\theight: calc(100% - 20px);\n\twidth: 100%;\n\tbackground-color: #fff;\n}\n\n#xispec_subViewContent-left {\n flex-grow: 1;\n display: flex;\n\tmin-height: 1px; /* firefox fix */\n}\n\n#xispec_subViewContent-right {\n flex-grow: 1;\n /* position: relative; */\n display: flex;\n\tmin-height: 1px; /* firefox fix */\n}\n\n\n.xispec_subViewHeader .fa{\n margin: 2px 3px;\n}\n\n.xispec_subViewHeader .xispec_toggleQCWrapper{\n position: absolute;\n right: 5px;\n}\n\n.xispec_subViewHeader .xispec_dockRight{\n -webkit-transform: rotate(90deg);\n -moz-transform: rotate(90deg);\n -o-transform: rotate(90deg);\n -ms-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.xispec_subViewHeader .xispec_dockBottom{\n -webkit-transform: rotate(180deg);\n -moz-transform: rotate(180deg);\n -o-transform: rotate(180deg);\n -ms-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.xispec_subViewHeader .xispec_dockLeft{\n -webkit-transform: rotate(-90deg);\n -moz-transform: rotate(-90deg);\n -o-transform: rotate(-90deg);\n -ms-transform: rotate(-90deg);\n transform: rotate(-90deg);\n}\n\n.xispec_QCdiv{\n\tposition: relative;\n}\n\n.xispec_subViewHeader .xispec_rightControls{\n /* order; */\n float: right;\n margin-right: 20px;\n}\n\n\n.xispec_QCdiv-right{\n border-left: 1px solid;\n order: 1;\n}\n\n.xispec_subViewContent-plot{\n display: flex;\n flex-grow: 1;\n}\n\n.xispec_QCdiv-left{\n order: -2;\n border-right: 1px solid;\n}\n\n/* .xispec_QCdiv-left .xispec_subViewContent-plot{\n margin-top: 1em;\n} */\n\n.xispec_rightControls{\n /* order; */\n float: right;\n margin-right: 20px;\n}\n",""]);const I=n},1723:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,'.xispec_multiSelect_dropdown {\n display: inline-block!important;\n}\n\n.xispec_multiSelect_dropdown-content {\n display: none;\n position: absolute;\n background-color: #750000;\n font-family: "Lato-Regular", Helvetica, Arial, sans-serif;\n font-size: 0.9em;\n color: #fff;\n min-width: 160px;\n border: 1px solid #fff;\n box-shadow: 5px 5px 3px rgba(0,0,0,0.5);\n z-index: 5000;\n margin-top: -6px;\n}\n.xispec_multiSelect_dropdown-content li{\n line-height: 1.2;\n}\n.xispec_multiSelect_dropdown:hover .xispec_multiSelect_dropdown-content {\n display: block;\n}\n\n.xispec_multiSelect_dropdown .menuTitle:hover {\n color: var(--main-color);\n background: #fff;\n}\n\n.xispec_multiSelect_dropdown DIV UL {\n list-style-type: none;\n padding: 0;\n margin: 2px;\n}\n\n.xispec_multiSelect_dropdown li label {\n cursor: pointer;\n display: block;\n line-height: 1em!important;\n padding: 0px!important;\n font-size: 0.8em;\n margin: 0px!important;\n}\n\n.xispec_multiSelect_dropdown DIV LI:hover {\n color: var(--main-color);\n background: #fff;\n cursor: pointer;\n}\n\n.xispec_multiSelect_dropdown DIV HR {\n border: none;\n border-top: 1px dotted white;\n margin: 0;\n padding: 0;\n}\n\n.xispec_multiSelect_dropdown .xispec_btn {\n padding-left: 5px;\n padding-right: 5px;\n margin-left: 0;\n margin-right: 0;\n}',""]);const I=n},1679:(A,t,e)=>{"use strict";e.d(t,{A:()=>y});var i=e(6314),n=e.n(i),I=e(4417),r=e.n(I),o=e(639),g=e(5364),a=e(6475),M=e(7581),s=e(1005),c=e(9425),u=n()((function(A){return A[1]})),l=r()(o.A),C=r()(g.A,{hash:"?#iefix&v=4.7.0"}),T=r()(a.A),h=r()(M.A),N=r()(s.A),d=r()(c.A,{hash:"#fontawesomeregular"});u.push([A.id,"/*!\n * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome\n * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)\n */@font-face{font-family:'FontAwesome';src:url("+l+");src:url("+C+") format('embedded-opentype'),url("+T+") format('woff2'),url("+h+") format('woff'),url("+N+") format('truetype'),url("+d+') format(\'svg\');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\\f000"}.fa-music:before{content:"\\f001"}.fa-search:before{content:"\\f002"}.fa-envelope-o:before{content:"\\f003"}.fa-heart:before{content:"\\f004"}.fa-star:before{content:"\\f005"}.fa-star-o:before{content:"\\f006"}.fa-user:before{content:"\\f007"}.fa-film:before{content:"\\f008"}.fa-th-large:before{content:"\\f009"}.fa-th:before{content:"\\f00a"}.fa-th-list:before{content:"\\f00b"}.fa-check:before{content:"\\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\\f00d"}.fa-search-plus:before{content:"\\f00e"}.fa-search-minus:before{content:"\\f010"}.fa-power-off:before{content:"\\f011"}.fa-signal:before{content:"\\f012"}.fa-gear:before,.fa-cog:before{content:"\\f013"}.fa-trash-o:before{content:"\\f014"}.fa-home:before{content:"\\f015"}.fa-file-o:before{content:"\\f016"}.fa-clock-o:before{content:"\\f017"}.fa-road:before{content:"\\f018"}.fa-download:before{content:"\\f019"}.fa-arrow-circle-o-down:before{content:"\\f01a"}.fa-arrow-circle-o-up:before{content:"\\f01b"}.fa-inbox:before{content:"\\f01c"}.fa-play-circle-o:before{content:"\\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\\f01e"}.fa-refresh:before{content:"\\f021"}.fa-list-alt:before{content:"\\f022"}.fa-lock:before{content:"\\f023"}.fa-flag:before{content:"\\f024"}.fa-headphones:before{content:"\\f025"}.fa-volume-off:before{content:"\\f026"}.fa-volume-down:before{content:"\\f027"}.fa-volume-up:before{content:"\\f028"}.fa-qrcode:before{content:"\\f029"}.fa-barcode:before{content:"\\f02a"}.fa-tag:before{content:"\\f02b"}.fa-tags:before{content:"\\f02c"}.fa-book:before{content:"\\f02d"}.fa-bookmark:before{content:"\\f02e"}.fa-print:before{content:"\\f02f"}.fa-camera:before{content:"\\f030"}.fa-font:before{content:"\\f031"}.fa-bold:before{content:"\\f032"}.fa-italic:before{content:"\\f033"}.fa-text-height:before{content:"\\f034"}.fa-text-width:before{content:"\\f035"}.fa-align-left:before{content:"\\f036"}.fa-align-center:before{content:"\\f037"}.fa-align-right:before{content:"\\f038"}.fa-align-justify:before{content:"\\f039"}.fa-list:before{content:"\\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\\f03b"}.fa-indent:before{content:"\\f03c"}.fa-video-camera:before{content:"\\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\\f03e"}.fa-pencil:before{content:"\\f040"}.fa-map-marker:before{content:"\\f041"}.fa-adjust:before{content:"\\f042"}.fa-tint:before{content:"\\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\\f044"}.fa-share-square-o:before{content:"\\f045"}.fa-check-square-o:before{content:"\\f046"}.fa-arrows:before{content:"\\f047"}.fa-step-backward:before{content:"\\f048"}.fa-fast-backward:before{content:"\\f049"}.fa-backward:before{content:"\\f04a"}.fa-play:before{content:"\\f04b"}.fa-pause:before{content:"\\f04c"}.fa-stop:before{content:"\\f04d"}.fa-forward:before{content:"\\f04e"}.fa-fast-forward:before{content:"\\f050"}.fa-step-forward:before{content:"\\f051"}.fa-eject:before{content:"\\f052"}.fa-chevron-left:before{content:"\\f053"}.fa-chevron-right:before{content:"\\f054"}.fa-plus-circle:before{content:"\\f055"}.fa-minus-circle:before{content:"\\f056"}.fa-times-circle:before{content:"\\f057"}.fa-check-circle:before{content:"\\f058"}.fa-question-circle:before{content:"\\f059"}.fa-info-circle:before{content:"\\f05a"}.fa-crosshairs:before{content:"\\f05b"}.fa-times-circle-o:before{content:"\\f05c"}.fa-check-circle-o:before{content:"\\f05d"}.fa-ban:before{content:"\\f05e"}.fa-arrow-left:before{content:"\\f060"}.fa-arrow-right:before{content:"\\f061"}.fa-arrow-up:before{content:"\\f062"}.fa-arrow-down:before{content:"\\f063"}.fa-mail-forward:before,.fa-share:before{content:"\\f064"}.fa-expand:before{content:"\\f065"}.fa-compress:before{content:"\\f066"}.fa-plus:before{content:"\\f067"}.fa-minus:before{content:"\\f068"}.fa-asterisk:before{content:"\\f069"}.fa-exclamation-circle:before{content:"\\f06a"}.fa-gift:before{content:"\\f06b"}.fa-leaf:before{content:"\\f06c"}.fa-fire:before{content:"\\f06d"}.fa-eye:before{content:"\\f06e"}.fa-eye-slash:before{content:"\\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\\f071"}.fa-plane:before{content:"\\f072"}.fa-calendar:before{content:"\\f073"}.fa-random:before{content:"\\f074"}.fa-comment:before{content:"\\f075"}.fa-magnet:before{content:"\\f076"}.fa-chevron-up:before{content:"\\f077"}.fa-chevron-down:before{content:"\\f078"}.fa-retweet:before{content:"\\f079"}.fa-shopping-cart:before{content:"\\f07a"}.fa-folder:before{content:"\\f07b"}.fa-folder-open:before{content:"\\f07c"}.fa-arrows-v:before{content:"\\f07d"}.fa-arrows-h:before{content:"\\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\\f080"}.fa-twitter-square:before{content:"\\f081"}.fa-facebook-square:before{content:"\\f082"}.fa-camera-retro:before{content:"\\f083"}.fa-key:before{content:"\\f084"}.fa-gears:before,.fa-cogs:before{content:"\\f085"}.fa-comments:before{content:"\\f086"}.fa-thumbs-o-up:before{content:"\\f087"}.fa-thumbs-o-down:before{content:"\\f088"}.fa-star-half:before{content:"\\f089"}.fa-heart-o:before{content:"\\f08a"}.fa-sign-out:before{content:"\\f08b"}.fa-linkedin-square:before{content:"\\f08c"}.fa-thumb-tack:before{content:"\\f08d"}.fa-external-link:before{content:"\\f08e"}.fa-sign-in:before{content:"\\f090"}.fa-trophy:before{content:"\\f091"}.fa-github-square:before{content:"\\f092"}.fa-upload:before{content:"\\f093"}.fa-lemon-o:before{content:"\\f094"}.fa-phone:before{content:"\\f095"}.fa-square-o:before{content:"\\f096"}.fa-bookmark-o:before{content:"\\f097"}.fa-phone-square:before{content:"\\f098"}.fa-twitter:before{content:"\\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\\f09a"}.fa-github:before{content:"\\f09b"}.fa-unlock:before{content:"\\f09c"}.fa-credit-card:before{content:"\\f09d"}.fa-feed:before,.fa-rss:before{content:"\\f09e"}.fa-hdd-o:before{content:"\\f0a0"}.fa-bullhorn:before{content:"\\f0a1"}.fa-bell:before{content:"\\f0f3"}.fa-certificate:before{content:"\\f0a3"}.fa-hand-o-right:before{content:"\\f0a4"}.fa-hand-o-left:before{content:"\\f0a5"}.fa-hand-o-up:before{content:"\\f0a6"}.fa-hand-o-down:before{content:"\\f0a7"}.fa-arrow-circle-left:before{content:"\\f0a8"}.fa-arrow-circle-right:before{content:"\\f0a9"}.fa-arrow-circle-up:before{content:"\\f0aa"}.fa-arrow-circle-down:before{content:"\\f0ab"}.fa-globe:before{content:"\\f0ac"}.fa-wrench:before{content:"\\f0ad"}.fa-tasks:before{content:"\\f0ae"}.fa-filter:before{content:"\\f0b0"}.fa-briefcase:before{content:"\\f0b1"}.fa-arrows-alt:before{content:"\\f0b2"}.fa-group:before,.fa-users:before{content:"\\f0c0"}.fa-chain:before,.fa-link:before{content:"\\f0c1"}.fa-cloud:before{content:"\\f0c2"}.fa-flask:before{content:"\\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\\f0c5"}.fa-paperclip:before{content:"\\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\\f0c7"}.fa-square:before{content:"\\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\\f0c9"}.fa-list-ul:before{content:"\\f0ca"}.fa-list-ol:before{content:"\\f0cb"}.fa-strikethrough:before{content:"\\f0cc"}.fa-underline:before{content:"\\f0cd"}.fa-table:before{content:"\\f0ce"}.fa-magic:before{content:"\\f0d0"}.fa-truck:before{content:"\\f0d1"}.fa-pinterest:before{content:"\\f0d2"}.fa-pinterest-square:before{content:"\\f0d3"}.fa-google-plus-square:before{content:"\\f0d4"}.fa-google-plus:before{content:"\\f0d5"}.fa-money:before{content:"\\f0d6"}.fa-caret-down:before{content:"\\f0d7"}.fa-caret-up:before{content:"\\f0d8"}.fa-caret-left:before{content:"\\f0d9"}.fa-caret-right:before{content:"\\f0da"}.fa-columns:before{content:"\\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\\f0de"}.fa-envelope:before{content:"\\f0e0"}.fa-linkedin:before{content:"\\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\\f0e4"}.fa-comment-o:before{content:"\\f0e5"}.fa-comments-o:before{content:"\\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\\f0e7"}.fa-sitemap:before{content:"\\f0e8"}.fa-umbrella:before{content:"\\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\\f0ea"}.fa-lightbulb-o:before{content:"\\f0eb"}.fa-exchange:before{content:"\\f0ec"}.fa-cloud-download:before{content:"\\f0ed"}.fa-cloud-upload:before{content:"\\f0ee"}.fa-user-md:before{content:"\\f0f0"}.fa-stethoscope:before{content:"\\f0f1"}.fa-suitcase:before{content:"\\f0f2"}.fa-bell-o:before{content:"\\f0a2"}.fa-coffee:before{content:"\\f0f4"}.fa-cutlery:before{content:"\\f0f5"}.fa-file-text-o:before{content:"\\f0f6"}.fa-building-o:before{content:"\\f0f7"}.fa-hospital-o:before{content:"\\f0f8"}.fa-ambulance:before{content:"\\f0f9"}.fa-medkit:before{content:"\\f0fa"}.fa-fighter-jet:before{content:"\\f0fb"}.fa-beer:before{content:"\\f0fc"}.fa-h-square:before{content:"\\f0fd"}.fa-plus-square:before{content:"\\f0fe"}.fa-angle-double-left:before{content:"\\f100"}.fa-angle-double-right:before{content:"\\f101"}.fa-angle-double-up:before{content:"\\f102"}.fa-angle-double-down:before{content:"\\f103"}.fa-angle-left:before{content:"\\f104"}.fa-angle-right:before{content:"\\f105"}.fa-angle-up:before{content:"\\f106"}.fa-angle-down:before{content:"\\f107"}.fa-desktop:before{content:"\\f108"}.fa-laptop:before{content:"\\f109"}.fa-tablet:before{content:"\\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\\f10b"}.fa-circle-o:before{content:"\\f10c"}.fa-quote-left:before{content:"\\f10d"}.fa-quote-right:before{content:"\\f10e"}.fa-spinner:before{content:"\\f110"}.fa-circle:before{content:"\\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\\f112"}.fa-github-alt:before{content:"\\f113"}.fa-folder-o:before{content:"\\f114"}.fa-folder-open-o:before{content:"\\f115"}.fa-smile-o:before{content:"\\f118"}.fa-frown-o:before{content:"\\f119"}.fa-meh-o:before{content:"\\f11a"}.fa-gamepad:before{content:"\\f11b"}.fa-keyboard-o:before{content:"\\f11c"}.fa-flag-o:before{content:"\\f11d"}.fa-flag-checkered:before{content:"\\f11e"}.fa-terminal:before{content:"\\f120"}.fa-code:before{content:"\\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\\f123"}.fa-location-arrow:before{content:"\\f124"}.fa-crop:before{content:"\\f125"}.fa-code-fork:before{content:"\\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\\f127"}.fa-question:before{content:"\\f128"}.fa-info:before{content:"\\f129"}.fa-exclamation:before{content:"\\f12a"}.fa-superscript:before{content:"\\f12b"}.fa-subscript:before{content:"\\f12c"}.fa-eraser:before{content:"\\f12d"}.fa-puzzle-piece:before{content:"\\f12e"}.fa-microphone:before{content:"\\f130"}.fa-microphone-slash:before{content:"\\f131"}.fa-shield:before{content:"\\f132"}.fa-calendar-o:before{content:"\\f133"}.fa-fire-extinguisher:before{content:"\\f134"}.fa-rocket:before{content:"\\f135"}.fa-maxcdn:before{content:"\\f136"}.fa-chevron-circle-left:before{content:"\\f137"}.fa-chevron-circle-right:before{content:"\\f138"}.fa-chevron-circle-up:before{content:"\\f139"}.fa-chevron-circle-down:before{content:"\\f13a"}.fa-html5:before{content:"\\f13b"}.fa-css3:before{content:"\\f13c"}.fa-anchor:before{content:"\\f13d"}.fa-unlock-alt:before{content:"\\f13e"}.fa-bullseye:before{content:"\\f140"}.fa-ellipsis-h:before{content:"\\f141"}.fa-ellipsis-v:before{content:"\\f142"}.fa-rss-square:before{content:"\\f143"}.fa-play-circle:before{content:"\\f144"}.fa-ticket:before{content:"\\f145"}.fa-minus-square:before{content:"\\f146"}.fa-minus-square-o:before{content:"\\f147"}.fa-level-up:before{content:"\\f148"}.fa-level-down:before{content:"\\f149"}.fa-check-square:before{content:"\\f14a"}.fa-pencil-square:before{content:"\\f14b"}.fa-external-link-square:before{content:"\\f14c"}.fa-share-square:before{content:"\\f14d"}.fa-compass:before{content:"\\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\\f152"}.fa-euro:before,.fa-eur:before{content:"\\f153"}.fa-gbp:before{content:"\\f154"}.fa-dollar:before,.fa-usd:before{content:"\\f155"}.fa-rupee:before,.fa-inr:before{content:"\\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\\f158"}.fa-won:before,.fa-krw:before{content:"\\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\\f15a"}.fa-file:before{content:"\\f15b"}.fa-file-text:before{content:"\\f15c"}.fa-sort-alpha-asc:before{content:"\\f15d"}.fa-sort-alpha-desc:before{content:"\\f15e"}.fa-sort-amount-asc:before{content:"\\f160"}.fa-sort-amount-desc:before{content:"\\f161"}.fa-sort-numeric-asc:before{content:"\\f162"}.fa-sort-numeric-desc:before{content:"\\f163"}.fa-thumbs-up:before{content:"\\f164"}.fa-thumbs-down:before{content:"\\f165"}.fa-youtube-square:before{content:"\\f166"}.fa-youtube:before{content:"\\f167"}.fa-xing:before{content:"\\f168"}.fa-xing-square:before{content:"\\f169"}.fa-youtube-play:before{content:"\\f16a"}.fa-dropbox:before{content:"\\f16b"}.fa-stack-overflow:before{content:"\\f16c"}.fa-instagram:before{content:"\\f16d"}.fa-flickr:before{content:"\\f16e"}.fa-adn:before{content:"\\f170"}.fa-bitbucket:before{content:"\\f171"}.fa-bitbucket-square:before{content:"\\f172"}.fa-tumblr:before{content:"\\f173"}.fa-tumblr-square:before{content:"\\f174"}.fa-long-arrow-down:before{content:"\\f175"}.fa-long-arrow-up:before{content:"\\f176"}.fa-long-arrow-left:before{content:"\\f177"}.fa-long-arrow-right:before{content:"\\f178"}.fa-apple:before{content:"\\f179"}.fa-windows:before{content:"\\f17a"}.fa-android:before{content:"\\f17b"}.fa-linux:before{content:"\\f17c"}.fa-dribbble:before{content:"\\f17d"}.fa-skype:before{content:"\\f17e"}.fa-foursquare:before{content:"\\f180"}.fa-trello:before{content:"\\f181"}.fa-female:before{content:"\\f182"}.fa-male:before{content:"\\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\\f184"}.fa-sun-o:before{content:"\\f185"}.fa-moon-o:before{content:"\\f186"}.fa-archive:before{content:"\\f187"}.fa-bug:before{content:"\\f188"}.fa-vk:before{content:"\\f189"}.fa-weibo:before{content:"\\f18a"}.fa-renren:before{content:"\\f18b"}.fa-pagelines:before{content:"\\f18c"}.fa-stack-exchange:before{content:"\\f18d"}.fa-arrow-circle-o-right:before{content:"\\f18e"}.fa-arrow-circle-o-left:before{content:"\\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\\f191"}.fa-dot-circle-o:before{content:"\\f192"}.fa-wheelchair:before{content:"\\f193"}.fa-vimeo-square:before{content:"\\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\\f195"}.fa-plus-square-o:before{content:"\\f196"}.fa-space-shuttle:before{content:"\\f197"}.fa-slack:before{content:"\\f198"}.fa-envelope-square:before{content:"\\f199"}.fa-wordpress:before{content:"\\f19a"}.fa-openid:before{content:"\\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\\f19d"}.fa-yahoo:before{content:"\\f19e"}.fa-google:before{content:"\\f1a0"}.fa-reddit:before{content:"\\f1a1"}.fa-reddit-square:before{content:"\\f1a2"}.fa-stumbleupon-circle:before{content:"\\f1a3"}.fa-stumbleupon:before{content:"\\f1a4"}.fa-delicious:before{content:"\\f1a5"}.fa-digg:before{content:"\\f1a6"}.fa-pied-piper-pp:before{content:"\\f1a7"}.fa-pied-piper-alt:before{content:"\\f1a8"}.fa-drupal:before{content:"\\f1a9"}.fa-joomla:before{content:"\\f1aa"}.fa-language:before{content:"\\f1ab"}.fa-fax:before{content:"\\f1ac"}.fa-building:before{content:"\\f1ad"}.fa-child:before{content:"\\f1ae"}.fa-paw:before{content:"\\f1b0"}.fa-spoon:before{content:"\\f1b1"}.fa-cube:before{content:"\\f1b2"}.fa-cubes:before{content:"\\f1b3"}.fa-behance:before{content:"\\f1b4"}.fa-behance-square:before{content:"\\f1b5"}.fa-steam:before{content:"\\f1b6"}.fa-steam-square:before{content:"\\f1b7"}.fa-recycle:before{content:"\\f1b8"}.fa-automobile:before,.fa-car:before{content:"\\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\\f1ba"}.fa-tree:before{content:"\\f1bb"}.fa-spotify:before{content:"\\f1bc"}.fa-deviantart:before{content:"\\f1bd"}.fa-soundcloud:before{content:"\\f1be"}.fa-database:before{content:"\\f1c0"}.fa-file-pdf-o:before{content:"\\f1c1"}.fa-file-word-o:before{content:"\\f1c2"}.fa-file-excel-o:before{content:"\\f1c3"}.fa-file-powerpoint-o:before{content:"\\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\\f1c8"}.fa-file-code-o:before{content:"\\f1c9"}.fa-vine:before{content:"\\f1ca"}.fa-codepen:before{content:"\\f1cb"}.fa-jsfiddle:before{content:"\\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\\f1cd"}.fa-circle-o-notch:before{content:"\\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\\f1d0"}.fa-ge:before,.fa-empire:before{content:"\\f1d1"}.fa-git-square:before{content:"\\f1d2"}.fa-git:before{content:"\\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\\f1d4"}.fa-tencent-weibo:before{content:"\\f1d5"}.fa-qq:before{content:"\\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\\f1d9"}.fa-history:before{content:"\\f1da"}.fa-circle-thin:before{content:"\\f1db"}.fa-header:before{content:"\\f1dc"}.fa-paragraph:before{content:"\\f1dd"}.fa-sliders:before{content:"\\f1de"}.fa-share-alt:before{content:"\\f1e0"}.fa-share-alt-square:before{content:"\\f1e1"}.fa-bomb:before{content:"\\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\\f1e3"}.fa-tty:before{content:"\\f1e4"}.fa-binoculars:before{content:"\\f1e5"}.fa-plug:before{content:"\\f1e6"}.fa-slideshare:before{content:"\\f1e7"}.fa-twitch:before{content:"\\f1e8"}.fa-yelp:before{content:"\\f1e9"}.fa-newspaper-o:before{content:"\\f1ea"}.fa-wifi:before{content:"\\f1eb"}.fa-calculator:before{content:"\\f1ec"}.fa-paypal:before{content:"\\f1ed"}.fa-google-wallet:before{content:"\\f1ee"}.fa-cc-visa:before{content:"\\f1f0"}.fa-cc-mastercard:before{content:"\\f1f1"}.fa-cc-discover:before{content:"\\f1f2"}.fa-cc-amex:before{content:"\\f1f3"}.fa-cc-paypal:before{content:"\\f1f4"}.fa-cc-stripe:before{content:"\\f1f5"}.fa-bell-slash:before{content:"\\f1f6"}.fa-bell-slash-o:before{content:"\\f1f7"}.fa-trash:before{content:"\\f1f8"}.fa-copyright:before{content:"\\f1f9"}.fa-at:before{content:"\\f1fa"}.fa-eyedropper:before{content:"\\f1fb"}.fa-paint-brush:before{content:"\\f1fc"}.fa-birthday-cake:before{content:"\\f1fd"}.fa-area-chart:before{content:"\\f1fe"}.fa-pie-chart:before{content:"\\f200"}.fa-line-chart:before{content:"\\f201"}.fa-lastfm:before{content:"\\f202"}.fa-lastfm-square:before{content:"\\f203"}.fa-toggle-off:before{content:"\\f204"}.fa-toggle-on:before{content:"\\f205"}.fa-bicycle:before{content:"\\f206"}.fa-bus:before{content:"\\f207"}.fa-ioxhost:before{content:"\\f208"}.fa-angellist:before{content:"\\f209"}.fa-cc:before{content:"\\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\\f20b"}.fa-meanpath:before{content:"\\f20c"}.fa-buysellads:before{content:"\\f20d"}.fa-connectdevelop:before{content:"\\f20e"}.fa-dashcube:before{content:"\\f210"}.fa-forumbee:before{content:"\\f211"}.fa-leanpub:before{content:"\\f212"}.fa-sellsy:before{content:"\\f213"}.fa-shirtsinbulk:before{content:"\\f214"}.fa-simplybuilt:before{content:"\\f215"}.fa-skyatlas:before{content:"\\f216"}.fa-cart-plus:before{content:"\\f217"}.fa-cart-arrow-down:before{content:"\\f218"}.fa-diamond:before{content:"\\f219"}.fa-ship:before{content:"\\f21a"}.fa-user-secret:before{content:"\\f21b"}.fa-motorcycle:before{content:"\\f21c"}.fa-street-view:before{content:"\\f21d"}.fa-heartbeat:before{content:"\\f21e"}.fa-venus:before{content:"\\f221"}.fa-mars:before{content:"\\f222"}.fa-mercury:before{content:"\\f223"}.fa-intersex:before,.fa-transgender:before{content:"\\f224"}.fa-transgender-alt:before{content:"\\f225"}.fa-venus-double:before{content:"\\f226"}.fa-mars-double:before{content:"\\f227"}.fa-venus-mars:before{content:"\\f228"}.fa-mars-stroke:before{content:"\\f229"}.fa-mars-stroke-v:before{content:"\\f22a"}.fa-mars-stroke-h:before{content:"\\f22b"}.fa-neuter:before{content:"\\f22c"}.fa-genderless:before{content:"\\f22d"}.fa-facebook-official:before{content:"\\f230"}.fa-pinterest-p:before{content:"\\f231"}.fa-whatsapp:before{content:"\\f232"}.fa-server:before{content:"\\f233"}.fa-user-plus:before{content:"\\f234"}.fa-user-times:before{content:"\\f235"}.fa-hotel:before,.fa-bed:before{content:"\\f236"}.fa-viacoin:before{content:"\\f237"}.fa-train:before{content:"\\f238"}.fa-subway:before{content:"\\f239"}.fa-medium:before{content:"\\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\\f23b"}.fa-optin-monster:before{content:"\\f23c"}.fa-opencart:before{content:"\\f23d"}.fa-expeditedssl:before{content:"\\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\\f244"}.fa-mouse-pointer:before{content:"\\f245"}.fa-i-cursor:before{content:"\\f246"}.fa-object-group:before{content:"\\f247"}.fa-object-ungroup:before{content:"\\f248"}.fa-sticky-note:before{content:"\\f249"}.fa-sticky-note-o:before{content:"\\f24a"}.fa-cc-jcb:before{content:"\\f24b"}.fa-cc-diners-club:before{content:"\\f24c"}.fa-clone:before{content:"\\f24d"}.fa-balance-scale:before{content:"\\f24e"}.fa-hourglass-o:before{content:"\\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\\f253"}.fa-hourglass:before{content:"\\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\\f256"}.fa-hand-scissors-o:before{content:"\\f257"}.fa-hand-lizard-o:before{content:"\\f258"}.fa-hand-spock-o:before{content:"\\f259"}.fa-hand-pointer-o:before{content:"\\f25a"}.fa-hand-peace-o:before{content:"\\f25b"}.fa-trademark:before{content:"\\f25c"}.fa-registered:before{content:"\\f25d"}.fa-creative-commons:before{content:"\\f25e"}.fa-gg:before{content:"\\f260"}.fa-gg-circle:before{content:"\\f261"}.fa-tripadvisor:before{content:"\\f262"}.fa-odnoklassniki:before{content:"\\f263"}.fa-odnoklassniki-square:before{content:"\\f264"}.fa-get-pocket:before{content:"\\f265"}.fa-wikipedia-w:before{content:"\\f266"}.fa-safari:before{content:"\\f267"}.fa-chrome:before{content:"\\f268"}.fa-firefox:before{content:"\\f269"}.fa-opera:before{content:"\\f26a"}.fa-internet-explorer:before{content:"\\f26b"}.fa-tv:before,.fa-television:before{content:"\\f26c"}.fa-contao:before{content:"\\f26d"}.fa-500px:before{content:"\\f26e"}.fa-amazon:before{content:"\\f270"}.fa-calendar-plus-o:before{content:"\\f271"}.fa-calendar-minus-o:before{content:"\\f272"}.fa-calendar-times-o:before{content:"\\f273"}.fa-calendar-check-o:before{content:"\\f274"}.fa-industry:before{content:"\\f275"}.fa-map-pin:before{content:"\\f276"}.fa-map-signs:before{content:"\\f277"}.fa-map-o:before{content:"\\f278"}.fa-map:before{content:"\\f279"}.fa-commenting:before{content:"\\f27a"}.fa-commenting-o:before{content:"\\f27b"}.fa-houzz:before{content:"\\f27c"}.fa-vimeo:before{content:"\\f27d"}.fa-black-tie:before{content:"\\f27e"}.fa-fonticons:before{content:"\\f280"}.fa-reddit-alien:before{content:"\\f281"}.fa-edge:before{content:"\\f282"}.fa-credit-card-alt:before{content:"\\f283"}.fa-codiepie:before{content:"\\f284"}.fa-modx:before{content:"\\f285"}.fa-fort-awesome:before{content:"\\f286"}.fa-usb:before{content:"\\f287"}.fa-product-hunt:before{content:"\\f288"}.fa-mixcloud:before{content:"\\f289"}.fa-scribd:before{content:"\\f28a"}.fa-pause-circle:before{content:"\\f28b"}.fa-pause-circle-o:before{content:"\\f28c"}.fa-stop-circle:before{content:"\\f28d"}.fa-stop-circle-o:before{content:"\\f28e"}.fa-shopping-bag:before{content:"\\f290"}.fa-shopping-basket:before{content:"\\f291"}.fa-hashtag:before{content:"\\f292"}.fa-bluetooth:before{content:"\\f293"}.fa-bluetooth-b:before{content:"\\f294"}.fa-percent:before{content:"\\f295"}.fa-gitlab:before{content:"\\f296"}.fa-wpbeginner:before{content:"\\f297"}.fa-wpforms:before{content:"\\f298"}.fa-envira:before{content:"\\f299"}.fa-universal-access:before{content:"\\f29a"}.fa-wheelchair-alt:before{content:"\\f29b"}.fa-question-circle-o:before{content:"\\f29c"}.fa-blind:before{content:"\\f29d"}.fa-audio-description:before{content:"\\f29e"}.fa-volume-control-phone:before{content:"\\f2a0"}.fa-braille:before{content:"\\f2a1"}.fa-assistive-listening-systems:before{content:"\\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\\f2a4"}.fa-glide:before{content:"\\f2a5"}.fa-glide-g:before{content:"\\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\\f2a7"}.fa-low-vision:before{content:"\\f2a8"}.fa-viadeo:before{content:"\\f2a9"}.fa-viadeo-square:before{content:"\\f2aa"}.fa-snapchat:before{content:"\\f2ab"}.fa-snapchat-ghost:before{content:"\\f2ac"}.fa-snapchat-square:before{content:"\\f2ad"}.fa-pied-piper:before{content:"\\f2ae"}.fa-first-order:before{content:"\\f2b0"}.fa-yoast:before{content:"\\f2b1"}.fa-themeisle:before{content:"\\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\\f2b4"}.fa-handshake-o:before{content:"\\f2b5"}.fa-envelope-open:before{content:"\\f2b6"}.fa-envelope-open-o:before{content:"\\f2b7"}.fa-linode:before{content:"\\f2b8"}.fa-address-book:before{content:"\\f2b9"}.fa-address-book-o:before{content:"\\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\\f2bc"}.fa-user-circle:before{content:"\\f2bd"}.fa-user-circle-o:before{content:"\\f2be"}.fa-user-o:before{content:"\\f2c0"}.fa-id-badge:before{content:"\\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\\f2c3"}.fa-quora:before{content:"\\f2c4"}.fa-free-code-camp:before{content:"\\f2c5"}.fa-telegram:before{content:"\\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\\f2cb"}.fa-shower:before{content:"\\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\\f2cd"}.fa-podcast:before{content:"\\f2ce"}.fa-window-maximize:before{content:"\\f2d0"}.fa-window-minimize:before{content:"\\f2d1"}.fa-window-restore:before{content:"\\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\\f2d4"}.fa-bandcamp:before{content:"\\f2d5"}.fa-grav:before{content:"\\f2d6"}.fa-etsy:before{content:"\\f2d7"}.fa-imdb:before{content:"\\f2d8"}.fa-ravelry:before{content:"\\f2d9"}.fa-eercast:before{content:"\\f2da"}.fa-microchip:before{content:"\\f2db"}.fa-snowflake-o:before{content:"\\f2dc"}.fa-superpowers:before{content:"\\f2dd"}.fa-wpexplorer:before{content:"\\f2de"}.fa-meetup:before{content:"\\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}\n',""]);const y=u},7131:(A,t,e)=>{"use strict";e.d(t,{A:()=>M});var i=e(6314),n=e.n(i),I=e(4417),r=e.n(I),o=e(1017),g=n()((function(A){return A[1]})),a=r()(o.A);g.push([A.id,".xispec_settingsWrapper{\n z-index: 2;\n display: none;\n font-size: 10pt;\n border: 1px solid #333;\n padding-bottom: 20px;\n}\n\n#xispec_dataSettingsWrapper{\n right: 5%;\n top: 10%;\n width: 550px;\n height: 530px;\n min-width: 550px;\n min-height: 400px;\n}\n#xispec_appearanceSettingsWrapper{\n right: 10%;\n top: 15%;\n width: 400px;\n height: 385px;\n min-width: 400px;\n min-height: 285px;\n}\n\n.xispec_settingsWrapper * {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.xispec_settings_main .xispec_form-control{\n display: inline-block;\n background-color: #fff;\n flex-grow: 1;\n}\n\n.xispec_settings_main .xispec_settings-tab{\n flex-grow: 1;\n}\n\n.xispec_settings_main #xispec_settingsForm{\n flex-grow: 1;\n}\n\n.xispec_settings_main .xispec_flex-column{\n display: -webkit-flex;\n display: flex;\n -webkit-flex-direction: column;\n flex-direction: column;\n}\n\n.xispec_settings_main .xispec_flex-row{\n display: -webkit-flex;\n display: flex;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-justify-content: flex-start;\n justify-content: flex-start;\n}\n\n.xispec_settings_main .xispec_flex-grow {\n flex-grow: 1;\n margin-left: 5px;\n}\n\n.xispec_settings_main .xispec_flex-grow input{\n width: 100%;\n}\n\n#xispec_topDataDiv{\n min-height: 210px;\n}\n\n.xispec_settings_main .xispec_splitDataDiv{\n flex-grow: 1;\n}\n\n.xispec_settings_main .xispec_label {\n font-size: 0.9em;\n cursor: pointer;\n text-transform: uppercase;\n letter-spacing: 1px;\n font-weight: 300;\n outline: 0;\n white-space: nowrap;\n vertical-align: middle;\n padding: 5px 0px;\n line-height: 3.5em;\n}\n\n.xispec_settings_main .xispec_settings-bottom{\n margin-bottom: 20px;\n text-align: center;\n font-size: 1.5em;\n text-align: center;\n margin-top: 10px;\n bottom: 10px;\n width: 95%;\n}\n\n.xispec_settings_menu{\n font-size: 1.5em;\n margin-top: -6px\n}\n.xispec_settings_menu .xispec_btn{\n margin: 0px -5px 0px 0px;\n padding-left: 18px;\n border-right: 1px solid white;\n border-top: 1px solid white;\n border-radius: 2px 10px 0 0;\n position: relative;\n background: #666;\n}\n.xispec_settings_menu .xispec_active{\n background: #333;\n}\n.xispec_settings_menu .xispec_active:hover {\n color: #fff;\n}\n\n.xispec_settings_main{\n padding-left: 10px;\n padding-right: 10px;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n height: calc(100% - 20px);\n}\n\n.xispec_settings_main .xispec_label .xispec_form-control{\n height: 2.7em;\n}\n\n.xispec_settings_main #xispec_settingsPeaklist{\n height:100%;\n white-space: pre-wrap;\n}\n\n.pointer{\n cursor: pointer;\n}\n\n.xispec_resetMod{\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAFaUlEQVRoQ+1YaWwUZRh+3plp60pJC4GIZUEgsXigRgvqD0BqW2oLpYWkaLiCoYjUNlgx9fphDcSDCBVbSitVCRCRJYQA5ehFEfihUjRqUFoTqhzVKpRyuWW7O6+Z0iHDdnZnZncIEJhkszPf937P8b3fNUO4xS+6xfXjjoEbncE7Gbg9MjBzixNeKsWmaVl2G76+QyjbJQqSmA+mJQCi5a+n2c5nO6DawxEztibIjAoACWqZb+NU2/lsB0S2K1qSopaAOB+AqB0y3q+ybOezFTBy1tYsMJUAcOqNdY/HE4vN08/ZOQ9sMeCYucUpQyoFIdNAnJuBzQK4snND1gE7jIRnINslRkVF5RFhqTJJLQpqInCFu9PzKTZP91lsezU8LAN3z95eAcJLoZL3tKv6j6NewPrUS6HghGUA2S6xj8ORx4SlZD0DGr3ciAiefKkys82qifAM9LA5cnY5Ra9cCrDRHAh2emwBkH5hbcZRKyZsMaAS9p27IwtEJRRgFTIURmg+Lw0ahc9GdxnG9gTYakDBHJjrir7cGb2E0HsfAKga4NRg4ghY3PHFpBU3zIBKHJNTlSAyVbBmJz77+STql7M7HSyvAjAsgMhzXRFS/MXy1H/MmLA9A9eQZrvE/jHRyo7cfRZqr0zv5oudt/M+gUjZB4boi6TK9sq0+TfeQI+C/jm7nERUemZN2tXT6ID5O+MZdDjA/iFD9A09U55xysjE9c2AAfvABbvfB+MtvTBmIeP0mtSqm9qAc96e/h4Jf+plgcFv/1uR9sFNbUARd8+CPXtBSNQRurGt/LkZthiIW1gzhYE0EF8dcsTU1il5l7eXpJ83IglWf+/C6jIAC3Vijvy1OnWUEbapORCXW90BIKYXGFNe6+qJypIY8jU4t/odRvdh0P/qbC1LdRgBmzIw+JWakwAG9zaADafKJs42IglW78ytWQ/CLJ2YUydXTdR9r9DGmjIwJL/2ezDG6JD8dqI05aFwDAzJq/0VwIO9MAiHTpSkPGmEbcrA0PzaTQCm64DJDocjtmnZ2AtGRHr1IwsP9nW73crwFHTqXcdLUp43wjVlYFh+/Vwm/lIPjIk/Ob4ypcCISK9+2KLaYjC9qtuW6cU/SpLWGuGaMhC/uGFAl9f3t/9Leg84AzShZWXSfiMybf3wRfXjAd4H6J6wfRGSOKh5eeJpI0xTBhSQEQX1O8CYrAtI1CJBTm4uTj5mRKjUxxfUjfBCqAPzcH08VB0rTsowg2XawPBFdY+KgvBjgPGqcF0i8Ou/FyeVByO+v6D+ZQZ9DKBPgDjZJ8uPt6xM/tlWA1d6bu86Jhgtm/uJaTsL8qFIt/CD0s7jkJ8gWRjDxFMAjA8mjBjrm4ufnWNGvBJjOgNK8CNvHuh3ucv3LcDx5ghIvhLHeqvMtRDdSqg5ShKf/uXDcWfN4Vs0oIA+8FpdPAvidwTEmiUJMG+uKWagg3ziU0dXjGu2gmspAyrwyMKG0QLTNgBxVsgCTFiluFUGZzYtS2y0iheSAYVkZOHBOAG+bQSMtkJKvRkbvSxmNi0b22oFR40N2YACMKGoQTrtpvkAvaucjAMK0GdpA/N7Axy8Zl9RojcU8ZYncSCSh4saosVOaQ6DpwJ4BoSIALHK55JviGmr7y7vuiNFiRdDFW5LBvTIE96ojfFIkY8RUxwRdc8RZm5l4tZIr+enwx+l3Hxfp8PtxXDahzUHwiG2q+1tbUAxr/60C4KZTuGeDCj/evemE2SGTBWpHAe0ov2fAxnSivEXqxpQ/5Wjh7ZM+xxkHwzs11+8VrR6r1emNaPc+wtVnrXi1Hv/Mm15SAb8G6kZ0+ttf9Ha4WXU8yEPpf8BwRqnQJnMMukAAAAASUVORK5CYII=);\n height: 16px;\n width: 16px;\n visibility: hidden;\n color: #446EB0;\n margin-left: 5px;\n cursor: pointer;\n}\n\n.xispec_settingsDataLeft{\n display: inline;\n margin-right: 2%;\n flex-grow: 5;\n flex-basis: 275px;\n}\n\n.xispec_settingsDataRight{\n flex-grow: 1;\n flex-basis: 300px;\n}\n\n#xispec_modificationTable .xispec_form-control{\n height: 2.3em;\n font-size: 1em;\n}\n\n.xispec_settingsTable_wrapper{\n width: 100%;\n height: auto;\n margin: 5px 0px;\n min-height: 85px;\n}\n\n#xispec_settingsCustomCfg-input{\n flex-basis: 100px;\n height: 10px;\n}\n\n#xispec_settings {\n position: absolute;\n top: 20%;\n left: 20%;\n}\n\n#xispec_ionSelection {\n background-color: #FFF;\n color: #333;\n}\n\n.xispec_settings_main .invisible {\n visibility: hidden;\n display: none;\n}\n\n.xispec_settings_main .xispec_userModified{\n background-color: #a0bbde !important;\n font-weight: bold !important;\n}\n\n.xispec_settings_main #xispec_ionList input{\n width: unset;\n}\n\n#xispec_settingsPeaklist{\n height: 170px;\n min-height: 140px;\n min-width: 220px;\n white-space: nowrap;\n line-height: 1.4em;\n padding-left: 10px;\n padding-top: 8px;\n}\n\n#xispec_customCfgHelp{\n display: none;\n height: 150px;\n margin-bottom: 1em;\n white-space: nowrap;\n}\n\n#xispec_toggleCustomCfgHelp{\n margin: 0.2em 0em;\n}\n\n\n/*tables*/\n.xispec_settingsTable {\n width:100%;\n font-size: 0.9em;\n left: auto;\n position: relative;\n margin-left: auto;\n margin-right: auto;\n border-collapse: collapse;\n background-color: rgba(255, 255, 255, 1);\n text-align: left;\n border-collapse: separate;\n}\n\n#xispec_modificationTable thead, #xispec_lossTable thead{\n margin-top:10px;\n margin-bottom:10px;\n}\n#xispec_modificationTable th, #xispec_lossTable th{\n padding-left:5px;\n padding-right:5px;\n vertical-align: middle;\n height: 30px;\n}\n#xispec_modificationTable td, #xispec_lossTable td{\n padding-left:5px;\n padding-right:5px;\n vertical-align: middle;\n}\n#xispec_modificationTable th:first-child, #xispec_lossTable th:first-child{\n padding-left:10px;\n}\n#xispec_modificationTable th:last-child, #xispec_lossTable th:last-child{\n padding-right:10px;\n}\n#xispec_modificationTable td:first-child, #xispec_lossTable td:first-child{\n padding-left:10px;\n}\n#xispec_modificationTable td:last-child, #xispec_lossTable td:last-child{\n padding-right:10px;\n}\n#settingsDataApply{\n display: inline;\n}\n\n/* DynDiv 0.5 by Markus Bordihn (markusbordihn.de) */\n.xispec_dynTitle {\n position: relative;\n left: 30px;\n top: 2px;\n letter-spacing: 0.5px;\n font-size: 0.9em;\n color: white;\n}\n.xispec_dynDiv{\n padding-top: 30px;\n background: #333;\n overflow: hidden;\n color:#fff;\n position:fixed;\n pointer-events:all;\n border: 1px solid white;\n border-radius: 5px;\n}\n\n.xispec_dynDiv_moveDiv {\n cursor: move;\n position: absolute;\n overflow: hidden;\n}\n\n\n.draggableCorner {\n width:20px;\n height:20px;\n border:none;\n background: #750000 url("+a+");\n}\n\n/* just need 1 background image and rotate it for corner orientations */\n.xispec_dynDiv_resizeDiv_tr {\n transform: rotate(90deg);\n}\n.xispec_dynDiv_resizeDiv_bl {\n transform: rotate(270deg);\n}\n.xispec_dynDiv_resizeDiv_br {\n transform: rotate(180deg);\n}\n\n.xispec_dynDiv_resizeDiv_tl,.xispec_dynDiv_resizeDiv_tr,.xispec_dynDiv_resizeDiv_bl,.xispec_dynDiv_resizeDiv_br {\n position: absolute;\n}\n\n.xispec_dynDiv_resizeDiv_tl {\n top: -1px;\n left: -1px;\n cursor: nw-resize;\n}\n\n.xispec_dynDiv_resizeDiv_tr {\n top: -1px;\n right: -1px;\n cursor: ne-resize;\n}\n\n.xispec_dynDiv_resizeDiv_bl {\n bottom: -1px;\n left: -1px;\n cursor: sw-resize;\n}\n\n.xispec_dynDiv_resizeDiv_br {\n bottom: -1px;\n right: -1px;\n cursor: se-resize;\n}\n\n.xispec_dynDiv_moveParentDiv {\n width: 100%;\n margin: auto;\n height: auto;\n font-size: 1.5em;\n position: absolute;\n top: -1px;\n left: -1px;\n background: #750000;\n border: 1px solid #fff;\n border-left: 0;\n border-right: 0;\n padding: 0;\n overflow: hidden;\n white-space:nowrap;\n cursor: move;\n}\n\n.xispec_dynDiv_minmaxDiv {\n position: absolute;\n top: 1px;\n right: 15px;\n width: 15px;\n height: 15px;\n background: #750000;\n font-size: 15px;\n padding: 0;\n margin: 0;\n}\n",""]);const M=g},4225:(A,t,e)=>{"use strict";e.d(t,{A:()=>w});var i=e(6314),n=e.n(i),I=e(4417),r=e.n(I),o=e(2913),g=e(1945),a=e(3675),M=e(4531),s=e(5709),c=e(6629),u=e(2823),l=e(4743),C=e(4001),T=e(9295),h=n()((function(A){return A[1]})),N=r()(o.A),d=r()(o.A,{hash:"?#iefix"}),y=r()(g.A),E=r()(a.A),D=r()(M.A,{hash:"#svgLato-Bold"}),j=r()(s.A),B=r()(s.A,{hash:"?#iefix"}),x=r()(c.A),p=r()(u.A),L=r()(l.A,{hash:"#svgLato-Regular"}),f=r()(C.A),z=r()(T.A);h.push([A.id,"@charset \"UTF-8\";\n@font-face {\n font-family: 'Lato-Bold';\n src: url("+N+"); /* IE9 Compat Modes */\n src: url("+d+") format('embedded-opentype'), /* IE6-IE8 */\n url("+y+") format('woff'), /* Modern Browsers */\n url("+E+") format('truetype'), /* Safari, Android, iOS */\n url("+D+") format('svg'); /* Legacy iOS */\n}\n@font-face {\n font-family: 'Lato-Regular';\n src: url("+j+"); /* IE9 Compat Modes */\n src: url("+B+") format('embedded-opentype'), /* IE6-IE8 */\n url("+x+") format('woff'), /* Modern Browsers */\n url("+p+") format('truetype'), /* Safari, Android, iOS */\n url("+L+") format('svg'); /* Legacy iOS */\n}\n\n/* xispec_form-control */\n.xispec_form-control select {\n border: 0px!important;\n overflow: hidden;\n} .xispec_form-control:-moz-placeholder {\n color: #b2bcc5;\n }\n .xispec_form-control::-moz-placeholder {\n color: #b2bcc5;\n opacity: 1;\n }\n .xispec_form-control:-ms-input-placeholder {\n color: #b2bcc5;\n }\n .xispec_form-control::-webkit-input-placeholder {\n color: #b2bcc5;\n }\n .xispec_form-control.placeholder {\n color: #b2bcc5;\n }\n\n .xispec_form-control {\n border: 1px solid #bdc3c7;\n color: #333;\n resize: none;\n height: 20px;\n overflow: auto;\n font-family: \"Lato-Regular\", Helvetica, Arial, sans-serif;\n font-size: 10pt;\n text-shadow: 0px;\n padding: 8px 12px;\n height: 42px;\n -webkit-appearance: none;\n border-radius: 6px;\n -webkit-box-shadow: none;\n box-shadow: none;\n -webkit-transition: border .25s linear, color .25s linear, background-color .25s linear;\n transition: border .25s linear, color .25s linear, background-color .25s linear;\n }\n .xispec_form-control:focus {\n border-color: #750000;\n outline: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n .xispec_form-control[disabled],\n .xispec_form-control[readonly],\n fieldset[disabled] .xispec_form-control {\n background-color: -internal-light-dark-color(rgb(235, 235, 228), rgb(45, 45, 45));\n color: #333;\n cursor: default;\n filter: alpha(opacity=70);\n }\n .xispec_form-control.flat {\n border-color: transparent;\n }\n .xispec_form-control.flat:hover {\n border-color: #bdc3c7;\n }\n .xispec_form-control.flat:focus {\n border-color: #750000;\n }\n.xispec_form-control::-moz-selection {\n background-color: #750000;\n color: #fff;\n}\n.xispec_form-control::selection {\n background-color: #750000;\n color: #fff;\n}\n\n/* xispec_btn */\n.xispec_btn {\n border: none;\n background-color: inherit!important;\n font-family: inherit;\n color: #fff;\n background: 0 0;/*var(--main-color);*/\n font-size: .6em;\n cursor: pointer;\n padding: 5px 15px;\n margin: 2px 5px 2px 5px;\n text-transform: uppercase;\n letter-spacing: 1px;\n font-weight: 300;\n outline: 0;\n -webkit-transition: all .3s;\n -moz-transition: all .3s;\n transition: all .3s;\n}\n.xispec_btn:after {\n content: '';\n position: absolute;\n z-index: -1;\n -webkit-transition: all .3s;\n -moz-transition: all .3s;\n transition: all .3s;\n}\n.xispec_btn-1 {\n border: 1px solid #fff;\n color: #fff;\n}\n.xispec_btn-1a:active, .xispec_btn-1a:hover {\n color: #000;\n background: #fff!important;\n}\n\n.xispec_btn-topNav{\n position: relative;\n top: 3px;\n font-size: 1.2em;\n padding: 3px 4px;\n margin: 2px 2px 0px 2px;\n}\n\n/* fa */\n.fa-times-circle{\n vertical-align:baseline;\n -webkit-transition: all .3s;\n -moz-transition: all .3s;\n transition: all .3s;\n cursor:pointer;\n float:right;\n margin: 2px 22px 2px 2px;\n}\n.fa-times-circle:hover {\n color: #333333;\n background:white;\n}\n\n#xispec_spectrumControls {\n display: table-row;\n font-size: 1.5em;\n\twidth: 100%;\n\tbackground-color: #750000;\n\tdisplay: block;\n\tcolor: #FFF;\n}\n\n#xispec_spectrumControls #xispec_lock{\n margin-left: -11px;\n margin-right: -3px;\n}\n\n#xispec_butterflyControls{\n border-left: 1px solid white;\n border-right: 1px solid white;\n margin-bottom: 0px;\n}\n\n#xispec_spectrumControls #xispec_butterflySwapIcon{\n transform: rotate(90deg);\n}\n\n#xispec_spectrumControls label {\n display: inline-block;\n padding-left: 0.4em;\n padding-right: 0.4em;\n margin-left: 3px;\n margin-right: 3px;\n}\n\n#xispec_spectrumControls input {\n vertical-align: middle;\n line-height: normal;\n text-align: center;\n}\n\n#xispec_spectrumControls form {\n display: inline-block;\n border-left: 1px solid white;\n border-right: 1px solid white;\n margin-bottom: 0px;\n}\n\n#xispec_spectrumControls form > * {\n margin-right: 0.3em;\n vertical-align: middle;\n}\n\n#xispec_spectrumControls .xispec_form-control{\n height: 2em;\n padding: 0px;\n}\n\n.xispec_plotsDiv {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 0;\n /* height: calc(100% - 35px); */\n position: relative;\n /* border-right: 1px solid black; */\n}\n\n.xispec_spectrumMainPlotDiv {\n display: flex;\n flex-flow: column;\n flex-grow: 1;\n min-height: 150px;\n}\n\n.xispec_Svg {\n background-color: white;\n flex-grow: 1;\n height: 100%;\n width: 100%;\n}\n\n#xispec_wrapper {\n Font-family: \"Lato-Regular\", Helvetica, Arial, sans-serif;\n font-size: 10pt;\n font-weight: 300;\n line-height: 1.3em;\n color: #888;\n /*-webkit-text-stroke: .15px;*/ /* IDE complains about this - cc*/\n overflow: hidden;\n}\n\n#xispec_revertAnnotation{\n color: rgb(154, 186, 255);\n}\n\n.xispec_peakAnnot{\n font-size:12px;\n}\n.xispec_peakAnnotHighlight{\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.xispec_fragBar{\n stroke-width: 1.3px;\n stroke-linecap:round;\n}\n.xispec_fragBarThick{\n stroke-width: 2.6px;\n stroke-linecap:round;\n}\n\n.resize path {\n fill: #888;\n stroke: #000;\n stroke-width: 1.5px;\n}\n\n.resize path.bevel {\n fill: none;\n stroke: #ccc;\n stroke-width: 2.5px;\n}\n\n.axis path, .axis line {\n fill: none;\n stroke: #000;\n stroke-width: 1.2px;\n}\n\n.dataTables_wrapper .xispec_form-control{\n height: 2em;\n margin: 4px 2px;\n padding: 0px 2px;\n}\n/*\n.modal{\n background: #333;\n width:650px;\n text-align: center;\n}\n\n.modal .content{\n margin: 1em 1.5em;\n color: #b1b1b1;\n font-size: 1.2em;\n}\n\n.modal .content strong{\n color: #ffffff;\n font-weight: 400;\n}\n\n.modal .content .label{\n margin-top: 1em;\n}\n\n.modal .header{\n font-size: 1.3em;\n}*/\n\n/*#saveModal #saveDBerror{\n margin-bottom: 5px;\n}*/\n\n.xispec_measureMasses {\n font-size: 0.8em;\n color: #666;\n}\n\n.xispec_label{\n font-size: 0.9em;\n line-height: 3.5em;\n cursor: pointer;\n letter-spacing: 0;\n font-weight: 300;\n outline: 0;\n display: block;\n white-space: nowrap;\n vertical-align: middle;\n}\n\n/* For use with Split.js */\n\n.gutter {\n background-color: #333;\n background-repeat: no-repeat;\n background-position: 50%;\n position: relative; /* will overlay previous absolute divs i.e. distance slider */\n}\n\n.gutter.gutter-horizontal {\n background-image: url("+f+");\n cursor: col-resize;\n}\n\n.gutter.gutter-vertical {\n background-image: url("+z+');\n cursor: row-resize;\n}\n\n.xispec_btn:disabled {\n color: gray;\n border-color: gray;\n}\n\n#xispec_spectrumPanel {\n\twidth: 100%;\n\theight:100%;\n\tflex-grow: 1;\n\tdisplay: flex;\n\tflex-flow: column;\n}\n\n.dropdown LI label.xispec_btn {\n padding-left: 0;\n}\n\n.xispec_disabled{\n color: #999!important;\n cursor: default;\n}\n\n.xispec_userModified{\n background-color: #a0bbde !important;\n font-weight: bold !important;\n}\n\n.xispec_tooltip{\n font-size: 0.9em;\n padding: 0 5px;\n border-radius: 6px;\n background-color: black;\n color: #ccc;\n pointer-events: none;\n position: absolute;\n opacity: 0;\n z-index: 50;\n font-family: "Lato-Regular", Helvetica, Arial, sans-serif;\n font-weight: 300;\n line-height: 1.3em;\n}\n\n.xispec_spectra{\n display: flex;\n flex-direction: row;\n flex-grow: 1;\n height: calc(100% - 35px);\n}\n\n.xispec_specPanelControls{\n position: absolute;\n right: 0;\n text-align: right;\n}\n\n.xispec_specPanelControls i{\n padding: 2px;\n}\n\n.xispec_inactiveSpecHeader i:hover{\n color: #750000;\n background: #FFFFFF;\n cursor: pointer;\n}\n\n.xispec_activeSpecHeader .fa-times:hover{\n color: #750000;\n background: #FFFFFF;\n cursor: pointer;\n}\n\n.xispec_activeSpecHeader{\n background: #999999;\n color: #ffffff;\n padding: 0 5px;\n}\n\n.xispec_activeSpecHeader .fa-thumb-tack{\n transform: rotate(30deg);\n}\n\n.xispec_inactiveSpecHeader{\n background: #eeeeee;\n padding: 0 5px;\n}\n\n\n',""]);const w=h},6685:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,".alignView {\n font-size: 1em;\n width: auto;\n height: 100%;\n overflow: auto;\n\tposition: relative;\n cursor: pointer;\n\tborder-top: 0.5em solid #eee;\n display: flex;\n flex-direction: column;\n}\n\n.alignView > * {\n flex-grow: 0;\n flex-shrink: 0;\n}\n\n.alignView .proteinName {\n font-weight: bold;\n}\n\nDIV.tableWrapper TABLE {\n /*table-layout: fixed;*/\n font-size: 10pt;\n\tcolor: #000;\n\tposition: inherit;\n}\n\nDIV.tableWrapper DIV.seqDiv {\n /* always show scrollbar even if not needed so content underneath doesn't jump (which it does with auto) */\n overflow-x: scroll;\n overflow-y: auto;\n max-height: 25em;\n\tborder-left: 8em solid #eee;\n}\n\nDIV.tableWrapper TABLE TH:first-child {\n width:8em;\n}\n\nDIV.tableWrapper TABLE THEAD {\n /* display: block; */\n margin: 0;\n background: #eee;\n\theight: 1em;\n}\n\nDIV.tableWrapper TABLE.seqTable TBODY TH:first-child {\n position: absolute; /* 'fixed' caused overflow of container */\n overflow: hidden;\n text-overflow: ellipsis;\n\tleft: 0;\n}\n\nDIV.tableWrapper TBODY {\n border-top: 0.5em solid #eee;\n}\n\nDIV.tableWrapper TD, DIV.tableWrapper TH {\n margin: 0;\n padding: 0 0.1em;\n line-height: 1em;\n height: 1em;\n}\n\nDIV.tableWrapper TH {\n background: #eee;\n\ttext-align: left;\n}\n\nDIV.tableWrapper THEAD TH {\n color: #668;\n padding: 0.2em 0.1em;\n}\n\n\nDIV.tableWrapper TABLE SPAN {\n white-space: pre;\n}\n\n.seqDelete {\n background: #88f;\n}\n\n.seqInsert {\n background: #8f8;\n}\n\n.seqVar {\n\tbackground: #fc6;\n}\n\nP.seq, TD.seq {\n font-family: monospace;\n}\n\nDIV.checkHolder {\n\tpadding-top: 1px;\n padding-bottom: 1px;\n margin-bottom: 0;\n line-height: normal;\n max-height: 10em;\n overflow-y: auto;\n\t/* this makes the tabs appear to fill from the bottom up */\n\tdisplay: flex;\n\t/*flex-wrap: wrap-reverse;*/\n\tflex-wrap: wrap;\n}\n\n/* allows breaking after a span tab but not in the label it contains */\nDIV.checkHolder SPAN.alignTab:after {\n content: ' ';\n}\n\n/* Next 3 rules give a tab like appearance to input-label sibling pairs inside spans */\nDIV.checkHolder SPAN LABEL {\n padding: 0 0.4em;\n margin: 0;\n border: 1px solid #bbb;\n border-bottom: none;\n border-top-left-radius: 5px;\n white-space: nowrap;\n}\n\nDIV.checkHolder SPAN INPUT {\n display: none;\n}\n\nDIV.checkHolder SPAN INPUT:checked + label {\n background: white;\n border: 1px solid #444;\n\tborder-bottom: none;\n\tfont-weight: bold;\n color: black;\n}\n\nDIV.alignSettings {\n font-size: 1em\n}\n\n.controlBlock label {\n display: inline-block;\n width: 13em;\n margin-right: 0.2em;\n}\n\n.controlBlock input, .controlBlock select {\n font-size: 1em;\n\tline-height: 1em;\n padding: 0;\n}\n\n.controlBlock input[type=number] {\n width: 3em;\n}\n\n.alignSeqCount {\n color: #668;\n font-size: 0.75em;\n}\n\n.alignSeqCount::before {\n content: \" \";\n}\n\n.alignSeqCount::after {\n content: \"\";\n}\n\n.alignSettings .alignChoiceGroup input[type=radio] {\n\tvertical-align: text-bottom;\n}\n\n.alignSettings .alignChoiceGroup label:not(:last-of-type) {\n\tborder-right: 1px solid #aaa;\n\tmargin-right: 0.5em;\n}\n\n.alignSettings span.subduedText {\n\tmargin-left: 2em;\n\tcolor: #668;\n\tfont-size: 0.8em;\n}\n",""]);const I=n},329:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"svg.circularView {\n width: 100%;\n height: 100%;\n}\n\n.circleLink {\n fill: none;\n stroke-width: 1px;\n stroke: #666;\n pointer-events: none;\n}\n\n.circleGhostLink {\n fill: none;\n stroke-width: 5px;\n stroke-opacity: 0;\n /*stroke: #fdc086;*/\n stroke: #ff0;\n pointer-events: stroke;\n}\n\n\n.circleGhostLink:hover {\n stroke-opacity: 0.5;\n stroke: #fdc086;\n}\n\n\n.selectedCircleLink {\n stroke-opacity: 0.5;\n}\n\n.highlightedCircleLink {\n stroke-opacity: 0.5;\n stroke: #fdc086;\n}\n\n.circleNode {\n stroke-width: 5px;\n fill: #dde;\n}\n\n.circleNode.selected {\n stroke: #ff0;\n}\n\n.circleNode.highlighted {\n\tstroke: #fdc086;\n\tfill: #dde;\n}\n\n.circleFeature {\n fill-opacity: 0.5;\n}\n\n.circleNode:hover, .circleFeature:hover {\n stroke: #fdc086;\n}\n\n.circularView .tick text {\n font-size: 0.5em;\n stroke: none;\n fill: #000;\n pointer-events: none;\n}\n\n.circularView .tick line {\n stroke: #000;\n\tstroke-width: 1px;\n}\n\n.justifyTick {\n transform: rotate(180deg)translateX(-16px);\n text-anchor: end;\n}\n\n.circularNodeLabel {\n text-anchor: middle;\n font-size: 0.75em;\n pointer-events: none;\n fill: #444;\n}\n\n.residueLetter {\n text-anchor: middle;\n font-size: 1em;\n pointer-events: none;\n}\n\n.niceButton {\n\tmargin-left: 13px;\n\tmargin-right: 0;\n\tpadding-right: 0;\n}\n\n.draggedNode {\n opacity: 0.5;\n fill: cyan;\n stroke: cyan;\n transform: scale(1.2);\n}",""]);const I=n},9410:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*@charset \"UTF-8\";*/\n/*@import url(\"font-awesome.min.css\");*/\n/*@font-face {*/\n/* font-family: 'Lato-Bold';*/\n/* src: url('../fonts/lato/bold/Lato-Bold.eot'); !* IE9 Compat Modes *!*/\n/* src: url('../fonts/lato/bold/Lato-Bold.eot?#iefix') format('embedded-opentype'), !* IE6-IE8 *!*/\n/* url('../fonts/lato/bold/Lato-Bold.woff') format('woff'), !* Modern Browsers *!*/\n/* url('../fonts/lato/bold/Lato-Bold.ttf') format('truetype'), !* Safari, Android, iOS *!*/\n/* url('../fonts/lato/bold/Lato-Bold.svg#svgLato-Bold') format('svg'); !* Legacy iOS *!*/\n/*}*/\n/*@font-face {*/\n/* font-family: 'Lato-Regular';*/\n/* src: url('../fonts/lato/regular/Lato-Regular.eot'); !* IE9 Compat Modes *!*/\n/* src: url('../fonts/lato/regular/Lato-Regular.eot?#iefix') format('embedded-opentype'), !* IE6-IE8 *!*/\n/* url('../fonts/lato/regular/Lato-Regular.woff') format('woff'), !* Modern Browsers *!*/\n/* url('../fonts/lato/regular/Lato-Regular.ttf') format('truetype'), !* Safari, Android, iOS *!*/\n/* url('../fonts/lato/regular/Lato-Regular.svg#svgLato-Regular') format('svg'); !* Legacy iOS *!*/\n/*}*/\n\n/* make printing print html background colours, works for chrome, other browsers may need checkbox set in print dialog */\n@media print {\n\tbody, html {\n\t\t-webkit-print-color-adjust: exact;\n\t\tprint-color-adjust: exact;\n\t\tcolor-adjust: exact;\n\t}\n}\n\n/* Styles that can apply across projects, such as history, searchsubmit etc */\n\n\n/* Common */\nbody, html{\n background: #fff;\n height:100%;\n /*overflow: hidden;*/\n/* -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: -moz-none;\n -o-user-select: none;\n user-select: none; */\n}\n\nbody, input, select, textarea {\n Font-family: \"Lato-Regular\", Helvetica, Arial, sans-serif;\n font-size: 10pt;\n font-weight: 300;\n line-height: 1.75em;\n color: #888;\n /*-webkit-text-stroke: .15px;*/\n}\n\n\n/* Btn */\n.btn {\n border: none;\n font-family: inherit;\n color: inherit;\n background: 0 0;/*var(--main-color);*/\n cursor: pointer;\n padding: 5px 15px;\n margin: 2px 5px 2px 5px;\n text-transform: uppercase;\n letter-spacing: 1px;\n font-weight: 300;\n outline: 0;\n -webkit-transition: all .3s;\n -moz-transition: all .3s;\n transition: all .3s;\n\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: -moz-none;\n -o-user-select: none;\n user-select: none;\n\n}\n.btn:after {\n content: '';\n position: absolute;\n z-index: -1;\n -webkit-transition: all .3s;\n -moz-transition: all .3s;\n transition: all .3s;\n}\n.btn-1 {\n border: 1px solid #fff;\n color: #fff;\n}\n.btn-1a:active, .btn-1a:hover {\n color: var(--main-color);\n background: #fff;\n}\n\nbutton:disabled {\n color: #888;\n border-color: #888;\n /* display: none; */\n}\n\n.btn-1a:active:disabled, .btn-1a:hover:disabled {\n color: #444;\n background: #888;\n cursor: default;\n}\n\n\n/*tables*/\ntable {\n width:100%;\n /*font-size: 0.9em;*/\n left: auto;\n position: relative;\n margin-left: auto;\n margin-right: auto;\n border-collapse: collapse;\n background-color: white;\n text-align: left;\n}\n\ntable:focus{\n outline: none;\n}\n\nthead{\n margin-top:10px;\n margin-bottom:10px;\n}\nth{\n padding-left:5px;\n padding-right:5px;\n vertical-align: middle;\n height: 30px;\n}\ntd{\n padding-left:5px;\n padding-right:5px;\n vertical-align: middle;\n text-align: left;\n}\nth:first-child{\n padding-left:10px;\n}\nth:last-child{\n padding-right:10px;\n}\ntd:first-child{\n padding-left:10px;\n}\ntd:last-child{\n padding-right:10px;\n}\ntbody tr:hover td, tbody tr:hover td a, .spectrumShown{\n color: #fff;\n background-color: var(--main-color);\n -webkit-transition: all 200ms ease;\n -moz-transition: all 200ms ease;\n -ms-transition: all 200ms ease;\n -o-transition: all 200ms ease;\n transition: all 200ms ease;\n}\n\n#clmsErrorBox {\n z-index: 3;\n font-size: 2em;\n border: 4px solid red;\n margin-left: 3em;\n padding: 1em;\n position: absolute;\n line-height: normal;\n\t\n\twidth: 25em;\n\tword-wrap: break-word;\n\toverflow-wrap: break-word;\n\t\n -webkit-box-shadow: 10px 10px 5px 0 rgba(0,0,0,0.5);\n -moz-box-shadow: 10px 10px 5px 0 rgba(0,0,0,0.5);\n box-shadow: 10px 10px 5px 0 rgba(0,0,0,0.5);\n background: white;\n}\n\n#clmsErrorBox .errorReason {\n\tmargin-top: 0.25em;\n\tfont-weight: bold;\n}\n\n#clmsErrorBox .errorReason:before {\n\tcontent: \">> \";\n}\n",""]);const I=n},9126:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"#csvPanel {\n\tleft:750px;\n}\n/*\n#csvPanel > div.panelInner > div > label\n*/\n.csvToolbar .btn {\n\tmargin: 0 0 0 0;\n}\n\n.csvToolbar div {\n\tmargin: 10px 0 2px 0;\n}\n",""]);const I=n},3971:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,".dropdown DIV {\r\n /* position: absolute; */\r\n position: fixed;\r\n z-index: 1000;\r\n background: var(--main-color);\r\n padding: 0.2em 1em 0.2em 1em;\r\n border: 1px solid #fff;\r\n box-shadow: 5px 5px 3px rgba(0,0,0,0.5);\r\n display: none;\r\n max-height: 80vh;\r\n overflow-y: auto;\r\n}\r\n\r\n.dropdown .menuTitle {\r\n -webkit-user-select: none;\r\n /*-khtml-user-select: none;*/\r\n -moz-user-select: none;\r\n /*-o-user-select: none;*/\r\n user-select: none;\r\n}\r\n\r\n.dropdown .menuTitle:hover {\r\n color: var(--main-color);\r\n background: #fff;\r\n}\r\n\r\n.dropdown DIV UL {\r\n list-style-type: none;\r\n}\r\n\r\n.dropdown DIV LI .btn {\r\n font-size: inherit;\r\n /*display: table-cell;*/\r\n display: inline-block;\r\n width: 100%;\r\n text-align: left;\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n line-height: 1.75em;\r\n}\r\n\r\n.dropdown DIV LI:hover {\r\n color: var(--main-color);\r\n background: #fff;\r\n}\r\n\r\n.dropdown DIV HR {\r\n border: none;\r\n border-top: 1px dotted white;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n.buttonPlaceholder > * {\r\n padding-left: 0;\r\n margin-left: 0;\r\n}\r\n\r\n.dropdown LI .btn {\r\n padding: 0;\r\n}\r\n\r\n.colourSwatchSquare {\r\n height: 1em;\r\n width: 1em;\r\n display: inline-block;\r\n margin-left: 2px;\r\n border: 1px solid black;\r\n}\r\n\r\n.dynDiv .dropdown DIV HR {\r\n background: var(--main-color);\r\n}\r\n\r\n.dropdown .ddSectionHeader {\r\n background: var(--main-color)!important;\r\n /* opacity: 0.8; */\r\n text-transform: lowercase;\r\n font-variant: small-caps;\r\n display: block;\r\n line-height: 1.2em;\r\n color: yellow;\r\n}\r\n\r\n.dropdown .sectionEnd {\r\n border-bottom: 1px dotted white;\r\n}\r\n\r\n.aaButtonPlaceholder {\r\n display: inline-block;\r\n width: calc(100% - 24px);\r\n}\r\n\r\n.hiddenColourInput {\r\n margin: 0;\r\n padding: 0;\r\n visibility: hidden;\r\n max-width: 0;\r\n}\r\n\r\n.dropdown .disabledItem {\r\n color: #888;\r\n}\r\n\r\n.dropdown.disabledMenu { /* no space cos it's two classes in conjunction, not parent > child */\r\n color: #888;\r\n}\r\n\r\n.dropdown.disabledMenu .menuTitle:hover {\r\n color: inherit;\r\n background: #444;\r\n}\r\n",""]);const I=n},2243:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,'.distoDiv {\n background: #eee;\n /*display: table-row;*/ /* not needed, now a flex-box approach */\n height: 100%;\n}\n\n.overLengthGridRule text {\n transform: rotate(-90deg) translate(0,16px);\n}\n\n.distoDiv .c3-axis.c3-axis-x .tick:nth-of-type(10n+1) line {\n transform: scaleY(1.2);\n}\n\n.distoDiv .c3-axis .tick text {\n font-size: 1.3em;\n font-family: "Lato-Regular", Helvetica, Arial, sans-serif;\n}\n\n.distoDiv .c3-title {\n font-size: 1.25em;\n font-family: "Lato-Regular", Helvetica, Arial, sans-serif;\n}\n\n.distoDiv rect.c3-event-rect:hover {\n /*\n stroke: black;\n stroke-width: 1;\n stroke-opacity: 0.3;\n */\n fill-opacity: 0.1;\n}\n\n.distoDiv #selectedStripe line {\n\tstroke: black;\n\tstroke-width: 1;\n\tshape-rendering: crispEdges;\n}',""]);const I=n},2435:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"#filterPlaceholder {\n display: inline-flex;\n\tposition: fixed;\n}\n\n.filterControlGroup {\n\tposition: relative;\n\tvertical-align: top;\n /*display: inline-block;*/\n\tdisplay: inline-flex;\n padding: 0 0.2em 0 0;\n\tborder-right: 1px solid #bbb;\n\tmargin: auto 0.1em auto 0;\n height: 65px;\n}\n\n/*\n.filterControlGroup:after {\n\tposition: absolute;\n\ttop: 0.25em;\n\tright: -0.25em;\n\tfont-size: 3em;\n\tcolor: #bbb;\n\tcontent: '>';\n\ttransform: scale(0.7, 3);\n}\n*/\n\n/*\n.filterControlGroup > div {\n\tmargin-left: 0.5em;\n}\n*/\n\n.filterControlGroup > div > label, .filterControlSpan > div > label, .filterControlGroup div.scoreSlider {\n\tpadding-left: 0.25em;\n\tpadding-right: 0.25em;\n}\n\n.filterControlGroup input {\n line-height: 1.3em;\n}\n\n.filterControlGroup input[type=checkbox] {\n margin-left: 0;\n}\n\n\ndiv.filterControlGroup label {\n\tdisplay: block;\n}\n\ndiv.filterControlGroup label:hover {\n\tbackground-color: white;\n}\n\n\ndiv.filterItem, div.scoreSlider > div {\n display: inline-block;\n vertical-align: top;\n}\n\n\n.filterItem span:after, .scoreSlider span:after {\n content: ' ';\n display: block;\n}\n\n\n.filterTypeNumber {\n width: 4em;\n}\n\n\n.scoreSlider {\n display: inline-block;\n/*\n border-left: 1px solid #bbb;\n border-right: 1px solid #bbb;\n padding: 0em 0.5em;\n margin: 0em 0.5em;\n*/\n}\n\n.cutoffLabel {\n\tdisplay: inline-block;\n}\n\n.cutoffLabel > span {\n\tdisplay: inline-block;\n\ttransform: scaleY(1.4);\n}\n\n.scoreSlider P:not(.cutoffLabel):last-child {\n line-height: 1.2em;\n}\n\n.scoreSlider .cutoffLabel input {\n width: 4em;\n color: black;\n}\n\n.scoreSlider .undef {\n margin-left: 0.25em;\n}\n\n#fdrSummaryPlaceholder {\n display: inline-block;\n}\n\n#fdrSummaryPlaceholder p {\n display: inline-block;\n margin-right: 0.5em;\n}\n\n#filterReportPlaceholder {\n margin: 0 0.3em;\n display: inline-flex;\n white-space: pre;\n color: #00f;\n}\n\n#filterReportPlaceholder strong {\n\ttransform: scale(1.1);\n}\n\n#toggles_multipleGroup {\n border-left: 1px dashed #668;\n}\n\n\n.filterResultGroup {\n position: absolute;\n left: 0;\n bottom: 0;\n background: inherit;\n border-top: 1px solid #aaa;\n border-right: 1px solid #aaa;\n border-top-right-radius: 5px;\n line-height: 1.1em;\n}\n\n.decoysIrrelevant {\n display: none;\n}\n\ndiv.filterControlGroup label.noBreak2 {\n\tdisplay: inline-block;\n}\n\n.tallButton {\n\theight: 90%;\n\twidth: 1em;\n\tmargin: 0;\n border: 0;\n background: #ddf;\n}\n\n.verticalTextContainer {\n width: 1em;\n color: #668;\n background: #cce;\n font-size: 0.85em;\n line-height: 1em;\n margin-right:0.2em;\n}\n\n.verticalText {\n transform: rotate(90deg);\n}\n\n.verticalText::first-letter {\n font-family: monospace;\n color: black;\n font-weight: bold;\n font-size: 1rem;\n}\n\n.fixedBottomRight {\n\tposition: fixed;\n\tbottom: 0;\n\tright: 0;\n\theight: 65px;\n\twidth: 20px;\n\tbackground: #eee;\n\tpadding: 0.2em;\n}\n\n.filterControlGroup input:invalid {\n\tbackground: pink;\n}\n",""]);const I=n},8665:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,".goTermsView {\n display: none;\n left: 6em;\n top: 6em;\n width: 1000px;\n height: 500px;\n}\n\n .goTermsView svg {\n height: 100%;\n width: 100%;\n /* position: absolute; */\n /* shape-rendering: crispedges; */\n pointer-events: auto;\n}\n\n.goLink {\n fill: none;\n /* stroke: #000; */\n /* stroke-opacity: .6; */\n stroke-width: 1;\n}\n\ndiv.goTermsView > div > div.panelInner {\n /* overflow: scroll; */\n}\n\n.node rect {\n /* cursor: move; */\n /* fill-opacity: .9; */\n shape-rendering: crispEdges;\n}\n\n.node text {\n pointer-events: none;\n text-shadow: -1px -1px 0 white, 1px -1px 0 white, -1px 1px 0 white, 1px 1px 0 white;\n}\n\n.highlightedGOTerm rect {\n stroke: #111;\n stroke-width: 3;\n}\n\n.highlightedGOTerm text {\n stroke: black;\n transform: scale(1.2);\n transform-origin: 20px 16px;\n}\n\n.goTextResult {\n margin-left: 1em;\n}\n",""]);const I=n},3812:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/* These are styles used to represent elements in the key/legend window\nIdeally, they should use the same css rules as the actual visualisation elements so\nchanges there are automatically reflected in the legend\n*/\n\n/* crosslink styles */\n\n.monochrome {\n stroke: #222;\n fill: none;\n}\n\n.ambiguous {\n stroke-dasharray: 5;\n}\n\n.multiLinkStroke {\n stroke: #bbb;\n stroke-width: 11px;\n fill: none;\n}\n\n.homomultimer {\n color: red;\n stroke: red;\n stroke-width: 1.5px;\n}\n\n.filled {\n fill: #000;\n}\n\n.highlighted {\n fill: #fdc086;\n background-color: #fdc086;\n}\n\n.peptideAAText {\n font-family: monospace;\n font-size: 10px;\n text-anchor: middle;\n}\n\n.miniKey {\n width: 52px;\n height: 30px;\n shape-rendering: crispEdges;\n background: white;\n padding-left: 1px;\n}\n\n.scatterNormal {\n\tstroke: none;\n\tfill: #f8f;\n}\n\n.scatterDecoy {\n\tstroke: #f8f;\n\tfill: none;\n}\n\n.scatterAmbig {\n\tstroke: #f8f;\n\tstroke-dasharray: 3;\n\tfill: #fbf;\n}\n\n.highlighted.scatterNormal {\n\tstroke: black;\n\tfill: #f80;\n}\n\n.selected.scatterNormal {\n\tstroke: black;\n\tfill: yellow;\n}\n\n.seqDelete {\n\tfill: #88f;\n}\n\n.seqInsert {\n\tfill: #8f8;\n}\n\n.seqVar {\n\tfill: #fc6;\n}\n\n.antialias {\n\tshape-rendering: geometricprecision;\n}\n\n.annotationLegend {\n\tfill: #8ff;\n\tstroke: #4bb;\n}\n\n/* For the panels used to render legend, should be separate (and merged with those in ProteinViewInfo) */\n.keyPanel.verticalFlexContainer .panelInner {\n overflow-y: auto;\n}\n\n.keyPanel img {\n padding: 0.5em;\n background: var(--main-color);\n align-self: center;\n}\n\n.keyPanel tr {\n line-height: 1.3em;\n border-top: 1px solid #eee;\n}\n\n\n.keyPanel input[type='color'] {\n cursor: pointer;\n}\n\n.keyPanel input[type='color']:hover {\n border: 1px solid black;\n}\n\n.keyPanel input[disabled] {\n\tbackground: #ccc;\n\topacity: 0.25;\n}\n\n.keyPanel input[disabled]:hover {\n\tborder: 1px solid #a9a9a9;\n}\n\n.keyPanel .toolbar {\n\tmargin-bottom: 0.5em;\n}\n\n.groupHeader {\n\tpadding-top: 0.25em;\n\tborder-top: 2px solid #aaa;\n\tmargin-top: 0.75em;\n\tmargin-bottom: 0.5em;\n\tfont-size: 1.2em;\n\tcolor: #668;\n}\n\n.keyPanel .panelInner div:first-of-type .groupHeader {\n\tmargin-top: 0;\n\tpadding-top: 0;\n\tborder-top: none;\n}\n\n.keyPanel .downloadButton3 {\n\tmargin-top: 0.5em;\n}\n\n.keyPanel .selectHolder {\n display: block;\n background-color: #eee;\n}\n\n.keyPanel .colourKeyBottomGap {\n margin-bottom: 1.5em;\n}\n\n.keyPanel .sectionTable H2 {\n text-transform: capitalize;\n}\n",""]);const I=n},4574:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,".matrixView {\n display: none;\n left: 6em;\n top: 6em;\n width:500px;\n height:500px;\n}\n\n.matrixView svg {\n height: 100%;\n width: 100%;\n position: absolute;\n pointer-events: none;\n shape-rendering: crispedges;\n}\n\n.matrixView text {\n text-anchor: middle;\n}\n\n.matrixView canvas {\n image-rendering: -moz-crisp-edges; /* Firefox */\n -ms-interpolation-mode: nearest-neighbor; /* IE */\n image-rendering: pixelated; /* Opera 'n' Chrome */\n -ms-transform-origin: 0 0;\n\t-moz-transform-origin: 0 0;\n\t-o-transform-origin: 0 0;\n\t-webkit-transform-origin: 0 0;\n\ttransform-origin: 0 0;\n}\n\n/* For svg output */\n.matrixView image {\n image-rendering: -moz-crisp-edges; /* Firefox */\n -ms-interpolation-mode: nearest-neighbor; /* IE */\n image-rendering: pixelated; /* Opera 'n' Chrome */\n}\n\n.matrixView .viewDiv {\n width: auto;\n height: 100%;\n}\n\n.viewport {\n overflow: hidden;\n position: absolute;\n background: #e4e4e4;\n}\n\n.matrixView .chainArea {\n\t\n}\n\n.matrixView .mouseMat {\n\twidth: 100%;\n\theight: 100%;\n}\n\n.matrixView .reducePadding * {\n\tpadding-left: 0;\n padding-right: 0;\n margin-right: 0;\n}\n\n.matrixView .brush .extent {\n fill-opacity: 0.2;\n stroke: grey;\n stroke-width: 1;\n}\n\n.matrixView .crosslinkPlot {\n shape-rendering: auto; /* so small circles look like circles */\n}\n",""]);const I=n},4113:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,'.minigram { \n display: inline-block;\n vertical-align: middle;\n}\n\n.c3minigram .c3-brush .extent {\n\tfill-opacity: 0.2; \n}\n\n.c3minigram .c3-brush .resize path {\n fill: black;\n fill-opacity: 0.7;\n stroke: white;\n stroke-opacity: 0.7;\n stroke-width: 0.5px;\n}\n\n.c3minigram .legendToggler {\n\ttext-anchor: end;\n\tfont-size: 1.5em;\n\tfill: #888;\n}\n\n.c3minigram .legendToggler:hover {\n\tfont-size: 2em;\n\tfill: black;\n}\n\n.c3minigram .c3-axis-x .tick text, .c3minigram .c3-legend-item, .c3minigram .legendToggler {\n font-family: "Lato-Regular", Helvetica, Arial, sans-serif;\n}\n\n\n/*\n.c3minigram .c3-brush .resize.e rect{\n transform: translate(3px,0px)\n}\n\n.c3minigram .c3-brush .resize.w rect{\n transform: translate(-3px,0px)\n}\n\n.c3minigram .c3-brush .resize rect {\n visibility:visible !important;\n fill: black;\n fill-opacity: 0.7;\n stroke: white;\n stroke-opacity: 0.7;\n \n}\n*/',""]);const I=n},6378:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"#xiNetControlsButton {\r\n float: right;\r\n}\r\n\r\n/* xinetcontrol panel */\r\n#xiNetButtonBar {\r\n /* border-left: 1px solid #eee; */\r\n float: right;\r\n background-color: var(--main-color);\r\n text-transform: uppercase;\r\n /* padding-left:15px; */\r\n}\r\n\r\n#xiNetButtonBar p div ul li label{\r\n display: block;\r\n}\r\n\r\n\r\n#ppiMessage{\r\n /*display: none;*/\r\n z-index: 1;\r\n position: fixed;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n background-color: var(--main-color);\r\n color: #fff;\r\n padding:10px;\r\n /*margin: 10px;*/\r\n top:47px;\r\n left: 0px;\r\n text-align: right;\r\n width:125px;\r\n}\r\n\r\n\r\n#hiddenProteinsMessage{\r\n display: none;\r\n z-index: 1;\r\n position: fixed;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n background-color: var(--main-color);\r\n color: #fff;\r\n padding:10px;\r\n /*margin: 10px;*/\r\n top: 171px;\r\n left: 0px;\r\n text-align: right;\r\n width:125px;\r\n}\r\n\r\n#newGroupName{\r\n display: none;\r\n}\r\n\r\n.showHidden{\r\n margin: 0;\r\n}\r\n\r\n\r\n#autoLayoutButton{\r\n margin-left: 0;\r\n}\r\n\r\n#loadLayoutButton{\r\n display: inline-block;\r\n}\r\n\r\n/*\r\n#colorSelector{\r\n display: none;\r\n}\r\n#spectrumControls label#colorSelectorLabel{\r\n display: none;\r\n}\r\n*/\r\n\r\n.layoutLabel {\r\n padding-left: 10px;\r\n padding-right: 5px;\r\n}\r\n\r\n#xiNetButtonBar > .sectionDividerLeft {\r\n border-left: 1px solid rgba(255,255,255,255);\r\n margin-left: 0.5em;\r\n}\r\n",""]);const I=n},1505:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,".overlayInfo, .linkInfo {\r\n position: absolute;\r\n color: #666;\r\n padding: 0 0.5em;\r\n background: rgba(255, 255, 255, 0.7);\r\n z-index: 1; /* to overlay ngl div which is now position:relative */\r\n}\r\n\r\n.linkInfo {\r\n bottom: 1.4em;\r\n}\r\n\r\n.outsideLink {\r\n color: #666;\r\n}\r\n\r\n.outsideLink:hover {\r\n color: #9f9;\r\n}\r\n\r\nlabel.btn input[type=file] {\r\n width: 0.1px;\r\n height: 0.1px;\r\n opacity: 0;\r\n overflow: hidden;\r\n position: absolute;\r\n z-index: -1;\r\n}\r\n\r\n.fakeButton {\r\n display: inline-block;\r\n /*vertical-align: top;*/\r\n /*height: 32px;*/\r\n margin-bottom: 0.2em;\r\n padding-top: 2px;\r\n padding-bottom: 2px;\r\n}\r\n\r\n#nglPanel .ddSectionHeader {\r\n color: #666;\r\n}\r\n",""]);const I=n},5127:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id," .panelInner {\n overflow-y: auto;\n /*height: 100%;*/\n}\n\n#proteinInfoPanel .protTab {\n cursor: pointer;\n /*color:white;*/\n /*background: blue;*/\n}\n\n#proteinInfoPanel .selectedTab {\n color:white;\n background-color: var(--main-color);\n cursor: default;\n}\n\n#proteinInfoPanel .selectedTab.highlighted {\n color:var(--main-color);\n background-color: #fdc086;\n cursor: default;\n}\n\n.proteinInfoPanel .sectionTable h2.highlighted {\n\tbackground: #fdc086;\n\tborder-bottom: 1px solid black;\n\tborder-top: 1px solid black;\n}\n\n.proteinInfoPanel section {\n margin-top: 5px;\n border-bottom: 1px solid grey;\n}\n\n.proteinInfoPanel table {\n table-layout: fixed;\n}\n\n.proteinInfoTable {\n overflow-y: scroll;\n\n}\n\n.proteinInfoPanel table td:first-child, .proteinInfoPanel table th:first-child {\n width: 10em;\n}\n\n.proteinInfoPanel tbody tr:nth-child(2n-1) {\n background: #ddd;\n}\n\n.proteinInfoPanel tbody td {\n word-wrap: break-word;\n line-height: 1.4em;\n}\n\n.proteinInfoPanel .hit {\n color: #00c;\n /*background: white;*/\n cursor: pointer;\n font-weight: bold;\n text-decoration: underline;\n}\n\n.proteinInfoPanel .hit:hover, .proteinInfoPanel .hit.selected:hover {\n background: #fdc086;\n}\n\n.proteinInfoPanel .hit.filteredOutResidue {\n background: none;\n color: #66c;\n pointer-events: none;\n font-weight: normal;\n cursor: text;\n text-decoration: none;\n}\n\n.proteinInfoPanel .hit.selected {\n background: yellow;\n position: relative;\n top: -1px;\n}\n\n.proteinInfoPanel .hit.highlighted {\n background: orange;\n position: relative;\n top: -1px;\n}\n\n.proteinInfoPanel .fixedSizeFont {\n font-family: monospace;\n font-size: 1em;\n line-height: 1.2em;\n}\n\n.proteinInfoPanel tbody tr:hover td.fixedSizeFont {\n color: grey;\n}",""]);const I=n},1616:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"a, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote, body, canvas, caption, center, cite, code, dd, del, details, dfn, div, dl, dt, em, embed, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, html, i, iframe, img, ins, kbd, label, legend, li, mark, menu, nav, object, ol, output, p, pre, q, ruby, s, samp, section, small, span, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, time, tr, tt, u, ul, var, video {\n margin: 0;\n padding: 0;\n border: 0;\n font: inherit;\n vertical-align: baseline;\n}\narticle, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {\n display: block;\n}\nbody {\n line-height: 1;\n}\n/*\nol, ul {\n list-style: none;\n}\n*/\nblockquote, q {\n quotes: none;\n}\nblockquote:after, blockquote:before, q:after, q:before {\n content: '';\n content: none;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\nbody {\n -webkit-text-size-adjust: none;\n}\n*, :after, :before {\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n -o-box-sizing: border-box;\n -ms-box-sizing: border-box;\n box-sizing: border-box;\n}\nb, strong {\n font-weight: bold;\n}\n",""]);const I=n},5414:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,".scatterplotView {\n display: none;\n left: 6em;\n top: 6em;\n width:500px;\n height:500px;\n}\n\n.scatterplotView svg {\n height: 100%;\n width: 100%;\n position: absolute;\n}\n\n.scatterplotView text {\n text-anchor: middle;\n}\n\n.scatterplotView canvas {\n image-rendering: -moz-crisp-edges; /* Firefox */\n -ms-interpolation-mode: nearest-neighbor; /* IE */\n image-rendering: pixelated; /* Opera 'n' Chrome */\n -ms-transform-origin: 0 0;\n\t-moz-transform-origin: 0 0;\n\t-o-transform-origin: 0 0;\n\t-webkit-transform-origin: 0 0;\n\ttransform-origin: 0 0;\n}\n\n/* For svg output */\n.scatterplotView image {\n image-rendering: -moz-crisp-edges; /* Firefox */\n -ms-interpolation-mode: nearest-neighbor; /* IE */\n image-rendering: pixelated; /* Opera 'n' Chrome */\n}\n\n.scatterplotView .viewDiv {\n width: auto;\n height: 100%;\n}\n\n.scatterplotBackground {\n fill: #ddd;\n}\n\n.scatterplotView .brush .extent {\n fill-opacity: 0.2; \n stroke: grey;\n stroke-width: 1;\n}\n\n.scatterplotView .brush .resize text {\n text-anchor: start;\n font-size: 0.8em;\n}\n\n.scatterplotView .brush .resize.e text {\n transform: rotate(90deg);\n}\n",""]);const I=n},5145:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,".searchSummaryDiv {\n\tbackground:#ddd;\n\tcolor:#888;\n\toverflow:auto;\n\tflex-grow: 1;\n\tflex-shrink: 1;\n}\n",""]);const I=n},6968:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,'.selectView {\r\n height: 100%;\r\n overflow: hidden;\r\n}\r\n\r\n.selectView > DIV.scrollHolder {\r\n /* height: calc(100% - 45px); */\r\n flex-grow: 1;\r\n overflow: auto;\r\n min-height: 1px;\r\n}\r\n\r\n.selectView TABLE {\r\n border-collapse: separate;\r\n}\r\n\r\n.selectView TABLE TH {\r\n vertical-align: bottom;\r\n}\r\n\r\n.selectView THEAD {\r\n background: #eee;\r\n}\r\n\r\n.selectView tbody tr:nth-child(even) {\r\n background: #eee;/*#e8e8ff;*/\r\n}\r\n\r\n.selectView TBODY TR:first-child {\r\n /*background: #99f;*/\r\n color: #444;\r\n font-size: 1em;\r\n}\r\n\r\n/* this replaces a .selectView TBODY rule which doesn\'t work when border-collapse is set to separate */\r\n.selectView TBODY TR:first-child TD {\r\n border-top: 2px solid #668;\r\n}\r\n\r\n.selectView TBODY TR.matchRow td:not(:first-child), .selectView THEAD TR th:not(:first-child) {\r\n border-left: 1px solid #ddd;\r\n}\r\n\r\n.selectView THEAD TR {\r\n line-height: 1.3em;\r\n /*height: 1.5em;*/\r\n}\r\n\r\n.selectView TBODY TR {\r\n white-space: nowrap;\r\n line-height: 1.8em;\r\n height: 1.8em;\r\n}\r\n\r\n.selectView TR.matchRow {\r\n line-height: 1.1em;\r\n height: 1.1em;\r\n}\r\n\r\n.selectView TBODY TR.matchRow td.colSectionStart:not(:first-child), .selectView THEAD TR th.colSectionStart:not(:first-child) {\r\n border-left: 3px solid #bbb;\r\n}\r\n\r\n.selectView TD.number {\r\n text-align: right;\r\n}\r\n\r\n.selectView TD.monospaced {\r\n font-family: monospace;\r\n font-size: 1.1em;\r\n}\r\n\r\n.selectView span.linkedResidue {\r\n color: #000;\r\n font-weight: bold;\r\n}\r\n\r\n.selectView TD.maxWidth {\r\n max-width: 12em;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n}\r\n\r\n.selectView TD.minWidth, .selectView TH.minWidth {\r\n min-width: 7em;\r\n}\r\n\r\n.selectView TD.emphasise {\r\n font-weight: bold;\r\n transform: scaleX(1.1);\r\n}\r\n\r\n.selectView tbody TR.spectrumShown2 {\r\n color: black;\r\n background: #afa;\r\n}\r\n\r\n.selectView .controlBar {\r\n background: var(--main-color);\r\n color: white;\r\n padding: 0.25em 0;\r\n flex-shrink: 0;\r\n}\r\n\r\n.selectView .controlBar > span {\r\n padding-left: 1em;\r\n}\r\n\r\n.buttonPressed {\r\n color: var(--main-color);\r\n background: white;\r\n}\r\n\r\n/* stop firefox making massive number box */\r\n.selectView input[type=\'number\'] {\r\n max-width: 3.5em;\r\n}\r\n\r\n.selectView .pager:before {\r\n content: "Page";\r\n}\r\n\r\n.selectView TR.matchRow.highlighted {\r\n fill: #fdc086;\r\n background-color: #fdc086;\r\n color: #222;\r\n}\r\n\r\n.selectView tbody tr:hover td, .selectView tbody tr:hover td a {\r\n color: inherit;\r\n background-color: inherit;\r\n -webkit-transition: initial;\r\n -moz-transition: initial;\r\n /*-ms-transition: initial;*/\r\n -o-transition: initial;\r\n transition: initial;\r\n}\r\n\r\n.selectView .rightSpan {\r\n float: right;\r\n}\r\n\r\n.dynDiv .rightSpan label:hover {\r\n background: inherit;\r\n}\r\n\r\n.selectionTableHideToggle {\r\n display: none;\r\n}\r\n\r\n#alternatives .selectionTableHideToggle {\r\n display: inline-block;\r\n}\r\n\r\n.selectView .smallText {\r\n font-size: 0.8em;\r\n color: #a8a8a8;\r\n}\r\n\r\n.selectView tr:hover .smallText, .selectView TR.matchRow.highlighted .smallText, .selectView TR.spectrumShown2 .smallText {\r\n color: inherit;\r\n}\r\n\r\n.selectView input[type="number"] {\r\n -webkit-appearance: textfield;\r\n -moz-appearance: textfield;\r\n appearance: textfield;\r\n}\r\n.selectView input[type=number]::-webkit-inner-spin-button,\r\n.selectView input[type=number]::-webkit-outer-spin-button {\r\n -webkit-appearance: none;\r\n}\r\n\r\n.btnIncr {\r\n padding-left: 0.5em;\r\n padding-right: 0.5em;\r\n}\r\n\r\n.selectView .colourSwatchSquare {\r\n margin-left: 0;\r\n margin-right: 0.3em;\r\n border: none;\r\n}\r\n',""]);const I=n},5674:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"#spectrumControls {\n /*display: table-row;*/\n flex-shrink: 0;\n}\n\n#spectrumControls div {\n padding-bottom: 0.3em;\n border-bottom: 1px solid grey;\n line-height: normal;\n}\n\n#spectrumControls label {\n display: inline-block;\n padding-left: 0.5em;\n padding-right: 0.5em;\n}\n\n#spectrumControls input {\n vertical-align: text-top;\n line-height: normal;\n}\n\n#spectrumControls form {\n vertical-align: top;\n display: inline-block;\n border-left: 1px solid var(--main-color);\n border-right: 1px solid var(--main-color);\n}\n\n#spectrumControls form > * {\n margin-right: 0.3em;\n vertical-align: middle;\n}\n\n/* Important, let's the div with this class take up the remaining height inside a div declared with display:table */\n.heightFill {\n /*display: table-row;*/\n flex-grow: 1;\n overflow: hidden;\n height: 100%;\n background: #fff;\n}\n\n.validationControls {\n\tpadding:5px;\n\tbackground: white;\n flex-shrink: 0;\n/*\n display: table-row;\n*/\n}\n\n#spectrumSVG {\n width: 100%;\n height: 100%;\n flex-grow: 1;\n}\n.spectrumPlotsDiv {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 1;\t/* otherwise it never shrinks and kicks alternative table out of view */\n height: calc(100% - 200px);\n position: relative;\n\tmin-height: 1px;\t/* for firefox, ie11 - https://stackoverflow.com/questions/44948158/flexbox-overflow-issue-in-firefox */\n}\n\n#spectrumMainPlotDiv {\n display: flex;\n flex-flow: column;\n flex-grow: 1;\n min-height: 150px;\n}\n\n#measureTooltip {\n position: absolute;\n /*max-width: 8em;*/\n text-align:center;\n pointer-events:none; /*let mouse events pass through*/\n /*transition: opacity 0.3s;*/\n color: black;\n background: rgba(230,230,230,0.4);\n padding: 0.2em;\n border: 1px solid rgba(128,128,128,0.5);\n line-height: normal;\n}\n\n.scrollHolder {\n color: #888;\n}\n\n#spectrumControls .spectrumDisabled, #spectrumControls .spectrumDisabled:hover {\n color: #ccc;\n background: #eee;\n border-color: #ccc;\n}\n\n.CLMSUIspectrumWrapper input[type='submit'] {\n display: none;\n}\n\n#alternatives {\n /* height:200px; */\n\tmax-height: 200px;\n\t/*\n flex-shrink: 1;\n\tflex-grow: 1;\n\t*/\n}\n\n#alternatives .selectView {\n\tmax-height: 200px;\n}\n\n.CLMSUIspectrumWrapper #alternatives {\n padding: 0;\n}\n\n.btn-topNav {\n font-size: 0.9em;\n}\n",""]);const I=n},246:(A,t,e)=>{"use strict";e.d(t,{A:()=>l});var i=e(6314),n=e.n(i),I=e(4417),r=e.n(I),o=e(58),g=e(3066),a=e(3272),M=n()((function(A){return A[1]})),s=r()(o.A),c=r()(g.A),u=r()(a.A);M.push([A.id,"/* Styles specific to xiVIEW visualisation page */\n\n/*span, */label {\n -webkit-user-select: none;\n /*-khtml-user-select: none;*/\n -moz-user-select: none;\n /*-o-user-select: none;*/\n user-select: none;\n}\n\n.highlighted {\n stroke: #fdc086;\n}\n\n/* class not named .background as that clashes with d3 brush stuff */\n.backdrop {\n\tbackground: #eee;\n\t/*background-color: #eee;*/\n}\n\n/* fa */\n.fa-xi {\n font-size:1.5em!important;\n -webkit-transition: all .3s;\n -moz-transition: all .3s;\n transition: all .3s;\n cursor:pointer;\n padding: 0 1px;\n\tuser-select: none;\n}\n.fa-xi:hover {\n color: var(--main-color);\n background:white;\n}\n\n.panelMenuButton {\n vertical-align:baseline;\n -webkit-transition: all .3s;\n -moz-transition: all .3s;\n transition: all .3s;\n cursor:pointer;\n float:right;\n margin:2px;\n margin-right: 0.5em;\n color: white;\n}\n.fa-times-circle {\n margin-right:22px;\n}\n\n.panelMenuButton:hover {\n color: var(--main-color);\n background:white;\n}\n\n\n.centre {\n text-align: center;\n margin-left: auto;\n margin-right: auto;\n vertical-align: middle;\n}\n\n.page-header{\n height:37px;\n padding-left: 10px;\n background-color: var(--main-color);\n color: #fff;\n position: absolute;\n /* increased z-index to 50 so it's children (i.e. drop-down menus) overlay floating windows */\n /*z-index: 50;*/\n width: 100%;\n}\n\n.headerLabel{\n text-transform: uppercase;\n margin-right:10px;\n}\n\n/* network page */\n#main {\n height:100vh;\n width:100vw;\n /* position: absolute; */ /* because this stops menus overlaying views */\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n overflow:hidden;\n z-index:0;\n}\n\n#main .mainContent {\n top: 0;\n bottom: 65px;\n position: absolute;\n width: 100%;\n overflow: hidden;\n}\n\n.page-header p {\n display: inline-block;\n padding-right:1px;\n padding-left:10px;\n}\n\n\n#topDiv {\n overflow:hidden; /* restored so xinet shrinking / expanding context menu doesn't trigger scroll bars */\n position: relative; /* necessary so colour slider it contains can trigger overflow and resize events */\n}\n\n#networkDiv {\n width:100%;\n display:block;\n position: absolute;\n top: 37px;\n bottom:0;\n}\n\n#spectrumDiv {\n background-color: white;\n height: calc(100% - 40px);\n}\n\n.histoLabel{\n color:black;\n}\n.dist{\n height:100px;\n}\n.bar rect {\n fill: steelblue;\n}\n\n.bar text {\n fill: #fff;\n}\n\n.peakAnnot{\n font-size:12px;\n}\n.fragBar{\n stroke-width:1.3px;\n stroke-linecap:round;\n}\n\n\n.axis path, .axis line {\n fill: none;\n stroke: #000;\n stroke-width: 1px;\n}\n\n#bottomDiv {\n /*background: rgba(9, 29, 66, 0.9);*/\n /*padding:0 10px;*/\n position: relative; /* will overlay previous absolute divs i.e. distance slider */\n}\n.noMarg{\n margin:0 !important;\n}\n\n.dynDiv, .xispec_dynDiv{\n padding:20px 10px;\n /*background: rgba(9, 29, 66, 0.9);*/\n overflow: hidden;\n color:var(--main-color)!important;\n position:fixed;\n pointer-events:all;\n background: rgba(224,224,224,1)!important;\n box-shadow: 5px 5px 10px rgba(0,0,0,0.5)!important;\n border: 1px solid #888!important;\n/*\n height:400px;\n*/\n}\n.dynDiv_moveParentDiv, .xispec_dynDiv_moveParentDiv{\n height:20px;\n background:var(--main-color)!important;\n}\n\n.draggableCorner {\n width:20px;\n height:20px;\n background:var(--main-color)!important;\n border:none;\n background-image:url("+s+")!important;\n}\n\n/* just need 1 background image and rotate it for corner orientations */\n.dynDiv_resizeDiv_tr {\n transform: rotate(90deg);\n}\n.dynDiv_resizeDiv_bl {\n transform: rotate(270deg);\n}\n.dynDiv_resizeDiv_br {\n transform: rotate(180deg);\n}\n\n.dynDiv .btn-1 {\n color: var(--main-color);\n border-color: var(--main-color);\n}\n\n/* window drop-down menus should have grey background */\n.dynDiv .dropdown DIV {\n background: #ddd;\n}\n\n/* Buttons in window drop-down menus shouldn't have borders */\n.dynDiv .dropdown LI .btn-1 {\n padding: 0.25em 1em;\n border: none;\n}\n\n.dynDiv .dropdown LI .btn-1a:hover {\n background: transparent;\n}\n\n.dynDiv label:hover {\n background: white;\n}\n\n.panelInner {\n overflow: hidden;\n height:100%;\n width:100%;\n text-align: left;\n display:block;\n}\n\n.panelInner th {\n font-weight: 400;\n color: #039;\n height: 30px;\n}\n\n.panelInner thead td {\n color: var(--main-color);\n}\n\n.panelInner td, .helpPanel td {\n color: #777;\n}\n\n#main .controls{\n overflow-y: hidden;\n\toverflow-x: visible;\n /*display: table-row;*/\n\n position: fixed;\n bottom: 0;\n height: 65px;\n\n border-top: 1px solid #ccc!important;\n\n width: 100%;\n background:#ecedf2!important;\n color:var(--main-color)!important;\n /*padding-left: 10px;*/\n /*padding-right: 10px;*/\n -webkit-user-select: none;\n /*-khtml-user-select: none;*/\n -moz-user-select: none;\n /*-o-user-select: none;*/\n user-select: none;\n}\n\n#keyPanel, #spectrumPanelWrapper, #spectrumSettingsWrapper, #nglPanel, #distoPanel, #alignPanel, #proteinInfoPanel, #circularPanel, #clmsErrorBox, #csvPanel, #searchSummaryPanel, #urlSearchBox, #xiNetHelpPanel, #listPanel {\n display: none;\n top: 80px;\n}\n\n.metaLoadPanel {\n display: none;\n top: 80px;\n left: 40px;\n}\n\n#keyPanel{\n left: 10px;\n height: 35em;\n width: 45em;\n\tmin-height: 25em;\n\tmin-width: 45em;\n}\n\n#listPanel {\n\tleft: 2em;\n\theight: 40em;\n\tmin-height: 20em;\n\twidth: 60em;\n\tmin-width: 20em;\n}\n\n#searchSummaryPanel{\n left:10px;\n width:40em;\n height:40em;\n\tmin-width: 35em;\n\tmin-height: 20em;\n}\n\n#spectrumPanel{\n width: 100%;\n height: 100%;\n}\n#spectrumPanelWrapper{\n left: 280px;\n width: 750px;\n height: 600px;\n}\n#spectrumSettingsWrapper{\n left: 200px;\n top: 100px;\n width: 600px;\n height: 550px;\n min-width: 550px;\n min-height: 530px;\n}\n#nglPanel{\n left: 40px;\n width: 60em;\n height: 50em;\n\tmin-width: 45em;\n\tmin-height: 30em;\n}\n#distoPanel{\n left: 40px;\n width:50em;\n height:35em;\n\tmin-width: 40em;\n\tmin-height: 25em;\n}\n\n#circularPanel {\n left: 40px;\n width: 40em;\n height: 45em;\n\tmin-width: 20em;\n\tmin-height: 30em;\n}\n\n#proteinInfoPanel {\n left: 40px;\n width: 40em;\n height: 40em;\n\tmin-width: 30em;\n\tmin-height: 20em;\n}\n\n#scatterplotPanel {\n\tleft: 40px;\n\twidth: 45em;\n\theight: 45em;\n\tmin-width: 35em;\n\tmin-height: 35em;\n}\n\n#urlSearchBox {\n\tleft: 60px;\n}\n\n#matrixPanel {\n\tleft: 40px;\n\twidth: 40em;\n\theight: 50em;\n\tmin-width: 15em;\n\tmin-height: 30em;\n}\n\n.verticalFlexContainer {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\n.horizontalFlexContainer {\n width: 100%;\n display: flex;\n flex-direction: row;\n}\n\n.dynTitle, .xispec_dynTitle {\n position: relative;\n left: 30px;\n top: -2px;\n letter-spacing: 0.5px;\n font-size: 0.9em;\n color: white;\n\n}\n\n#alignPanel{\n left: 40px;\n width: 70em;\n\tmin-width: 30em;\n /*height:80px;*/\n}\n\nlabel.horizontalFlow:not(:last-child) {\n display: inline;\n border-right: 1px solid grey;\n margin-right: 0.4em;\n}\n\nlabel.horizontalFlow input[type=number] {\n margin-left: 0.2em;\n}\n\n/* See http://jsfiddle.net/7jx02upg/1/ */\nlabel.horizontalFlow input[type=radio], label.horizontalFlow input[type=checkbox] {\n /*vertical-align: normal;*/\n}\n\n/* \n\n/* span.noBreak asks for no line-breaks internally */\n.noBreak {\n white-space: nowrap;\n}\n\nspan.noBreak select {\n margin-left: 0.5em;\n}\n\n/* and then put spaces after labels to give a known place for content to break */\nlabel.horizontalFlow::after, #nglPanel label.btn::before, #pdbPanel label.btn::before, .matrixView label.btn::before, .scatterplotView label.btn::before {\n content: \" \";\n}\n\n#pdbPanel .prompt {\n\tfont-size: 1.4em;\n\tvertical-align: middle;\n\tpadding: 0 0.5em;\n}\n\n#pdbPanel .toolbar {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n}\n\n#pdbPanel .toolbar .verticalFlexContainer {\n\tdisplay: flex;\n}\n\n#pdbPanel button i.fa {\n\tpadding-left: 0.4em;\n\tvertical-align: sub;\n}\n\nA.btn {\n text-decoration: none;\n}\n\n.nopadRight {\n\tpadding-right: 0;\n}\n\n.nopadLeft {\n\tpadding-left: 0;\n}\n\n\n\n/* For use with Split.js */\n\n.gutter {\n\n background-color: var(--main-color);\n background-repeat: no-repeat;\n background-position: 50%;\n position: relative; /* will overlay previous absolute divs i.e. distance slider */\n}\n\n.gutter:hover {\n background-color: white;\n border-color: var(--main-color);\n}\n\n.gutter.gutter-horizontal {\n border-left: 1px solid #aaa;\n border-right: 1px solid #aaa;\n background-image: url("+c+");\n cursor: ew-resize;\n}\n\n.gutter.gutter-vertical {\n border-top: 1px solid white;\n border-bottom: 1px solid #aaa;\n background-image: url("+u+");\n cursor: ns-resize;\n}\n\n\n\n.fdrCalculation {\n display: inline-block;\n}\n\n.btn:disabled {\n color: #ccc;\n border-color: #ccc;\n}\n\n.brushValueText {\n font-size: 0.75em;\n fill: #ddd;\n stroke: none;\n}\n\n.axis {\n shape-rendering: crispEdges;\n}\n\n\n.sectionTable .tableShown {\n background: #ccc;\n}\n\n.sectionTable .tableShown svg {\n transform: rotate(90deg);\n}\n\n.sectionTable h2 {\n width: 100%;\n cursor: pointer;\n\tborder-top: 1px solid transparent;\n\tborder-bottom: 1px solid transparent;\n}\n\n.sectionTable h2 svg {\n margin-right: 1em;\n width: 16px;\n height: 16px;\n fill: white;\n stroke: #888;\n\tshape-rendering: crispedges;\n vertical-align: sub;\n}\n\n.sectionTable h2:hover {\n background: white;\n\tborder-bottom: 1px solid black;\n\tborder-top: 1px solid black;\n}\n\n.sectionTable tbody tr > td {\n border-top: 1px solid #ccc;\n border-bottom: 1px solid transparent;\n}\n\n.sectionTable tbody tr:hover td {\n\tcolor: #777;\n background: inherit;\n -webkit-transition: none;\n -moz-transition: none;\n /*-ms-transition: none;*/\n -o-transition: none;\n transition: none;\n /*border-top-color: #444;\n border-bottom-color: #444;*/\n}\n\n.sectionTable table {\n\tborder-collapse: separate;\n}\n\n.sectionTable table table {\n border: 1px solid gray;\n}\n\n.expectedFormatPanel .sectionTable tbody td:first-child {\n background: #ddd;\n}\n\n\n\n.toolbar {\n margin-bottom: 0.15em;\n border-bottom: 1px solid rgba(0,0,0,0.5);\n flex-shrink: 0; /* fixes toolbar overflow in ie11 */\n}\n\ndiv.columnbar[disabled], div.columnbar[disabled], label.fakeButton[disabled] {\n\tcolor: grey;\n\tpointer-events: none;\n\tborder-color: grey;\n}\n\n.toolbar button {\n margin-bottom: 0.2em;\n}\n\n.toolbar span select {\n text-transform: capitalize;\n}\n\n.toolbar > * {\n display: inline-block;\n}\n\n.toolbar > .sectionDividerRight {\n\tborder-right: 1px solid rgba(0,0,0,0.5);\n\tmargin-right: 0.5em;\n\tpadding-right: 0.5em;\n}\n\n.toolbar > .sectionDivider2 {\n\tborder-right: 1px solid rgba(0,0,0,0.5);\n\tmargin-right: 0.5em;\n\tpadding-right: 1em;\n}\n\n.toolbar > .dashedBorder {\n\tborder-right-style: dashed;\n}\n\n.sectionDividerLeft {\n\tborder-left: 1px solid rgba(0,0,0,0.5);\n\tmargin-left: 0.5em;\n\tpadding-left: 0.5em;\n}\n\n.toolbar hr.toolbarSeparator {\n display: block;\n margin: 0.4em 0 0 0;\n}\n\n.pdbWindowButton {\n\tvertical-align: text-bottom;\n}\n\n/*button.pdbWindowButton {*/\n/* margin-bottom: 2em;*/\n/*}*/\n\nDIV.messagebar {\n\tfont-size: 1.4em;\n\theight: 3em;\n}\n\n/* if div has class 'messagebar' give it this style providing it is not the last div in its container (it's different to div.messageBar) */\nDIV[class='messagebar']:not(:last-of-type) {\n\tmargin-bottom: 0.15em;\n\tborder-bottom: 1px solid rgba(0,0,0,0.5);\n}\n\n.expectedFormatPanel {\n\tmargin-bottom: 0.15em;\n\tborder-bottom: 1px solid rgba(0,0,0,0.5);\n}\n\n.expectedFormatPanel TABLE TBODY {\n\tcolor: grey;\n\tfont-size: 0.7rem;\n\tfont-family: monospace;\n}\n\n\n/* tweaks to jsonview */\n\n.jsonview {\n\tline-height: 1.2em;\n}\n\n.jsonview ul ul ul ul {\n\tbackground: #ccc;\n}\n\n.jsonview ul ul ul ul ul ul {\n\tbackground: #bbb;\n}\n\n.jsonview ul.array {\n\tlist-style:decimal;\n\tlist-style-position: inside;\n}\n\n.jsonview .collapser {\n\ttop: 0;\n}\n\n.jsonview .collapser:hover {\n\tbackground: white;\n\tfont-weight: normal;\n}\n\n.jsonview .collapser + .prop:hover {\n\tbackground: white;\n}\n\n.jsonview .prop {\n\tcursor: default;\n}\n\n.jsonview .collapser + .prop {\n\tcursor: pointer;\n}\n\nsvg.tempKey {\n\ttext-transform: initial;\t/* reset text-transforms for temporary svgs */\n\tletter-spacing: 0;\n\tfont-family: \"Helvetica\";\n font-size: 12px;\n}\n\nsvg.tempKey text.imageOrigin {\n font-size: 8px;\n}\n\nsvg.tempKey a.imageOrigin text {\n fill: blue;\n}\n\nsvg.tempKey .keyTitle {\n\tfont-style: italic;\n}\n\nsvg.tempKey .keyPoint rect {\n\tshape-rendering: crispedges;\n\tstroke-width: 1px;\n\tstroke: black;\n}\n\nsvg.tempKey text {\n text-anchor: start;\n font-family: \"Helvetica\";\n font-size: 12px;\n}\n\n.errorCloseButton {\n\tposition: absolute;\n\ttop: 0;\n\tright: -0.7em;\n\tcolor: grey;\n}\n\n#subPanelLimiter {\n\tposition: absolute;\n\tpointer-events: none;\n\ttop: 39px;\n\tbottom: 65px;\n\tleft: 0;\n\tright: 0;\n}\n\n.rappsilberImage {\n\tdisplay: block;\n\tborder-top: 1px solid white;\n\tpadding: 0.5em 0;\n}\n\n.rappsilberImage:hover {\n\t-webkit-filter: invert(1);\n\tfilter: invert(1);\n\tbackground: black;\n}\n\nselect {\n\tcolor: var(--main-color);\n\tborder-color: var(--main-color);\n\tfont-family: Lato-Bold;\n}\n\ninput {\n\tcolor: var(--main-color);\n\tfont-family: Lato-Bold;\n}\n\ninput.xiNetLinkWidth {\n width: 5em;\n color: #cccccc;\n}\n\ninput.withSideMargins, select.withSideMargins {\n margin-left: 0.5em;\n margin-right: 0.5em;\n}\n\nsup {font-size:xx-small; vertical-align:super;}\n\n.smallHeading {\n\tmargin-top: 0.5em;\n\tfont-size: 0.75em;\n\tcolor: #668;\n\tline-height: 1.4em;\n}\n\n.smallHeadingBar {\n background: rgba(0,0,0,0.1);\n}\n\n.btn-tight {\n\tmargin: 0;\n\tpadding: 2px 2px;\n\tborder: 1px solid grey;\n}\n\n.rainbow {\n width: 4em;\n height: 1em;\n display: inline-block;\n margin-right: 0.5em;\n vertical-align: middle;\n margin-left: -1.5em;\n\t/* generated at http://www.colorzilla.com/gradient-editor/ */\n\tbackground: -moz-linear-gradient(left, #fc3932 0%, #e4e82c 25%, #20cc3d 50%, #0436ea 75%, #f986bc 100%); /* FF3.6-15 */\n\tbackground: -webkit-linear-gradient(left, #fc3932 0%,#e4e82c 25%,#20cc3d 50%,#0436ea 75%,#f986bc 100%); /* Chrome10-25,Safari5.1-6 */\n\tbackground: linear-gradient(to right, #fc3932 0%,#e4e82c 25%,#20cc3d 50%,#0436ea 75%,#f986bc 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */\n}\n\n.testTopLeft {\n\tposition: absolute;\n\tz-index: 5000;\n\ttop: 0;\n\tleft: 0;\n\tbackground: white;\n}\n\ninput:invalid:focus {\n\tbackground: pink;\n}\n\nimage.sharpImage {\n image-rendering: optimizeSpeed;\n image-rendering: -moz-crisp-edges;\n -ms-interpolation-mode: nearest-neighbor;\n image-rendering: pixelated;\n}\n\ndiv#gafAnnotationsMetaLoadPanel > div > div.expectedFormatPanel {\n display:none;\n}\n\ndiv.validationControls{\n display: none;\n}\n\n.btn-1a.irreversible:hover {\n color: red;\n border-color: red;\n}\n",""]);const l=M},6690:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/* Colour Slider */\n\n.threeColourSlider.verticalFlexContainer {\n height: calc(100% - 70px);\n width: 90px;\n}\n\n.threeColourSlider.horizontalFlexContainer {\n height: 50px;\n width: 100%;\n\tflex-flow: row-reverse;\n}\n\n.threeColourSlider.absolutePosition {\n\tposition: absolute;\n top: 50px;\n right: 0;\n}\n\n.threeColourSlider input {\n flex-shrink: 0;\n}\n\n.threeColourSlider svg {\n flex-grow: 1;\n}\n\n.threeColourSlider rect {\n stroke: #444;\n stroke-width: 0.5px;\n}\n\n.threeColourSlider .resize path {\n fill: #aaa;\n stroke: #000;\n stroke-width: 0.5px;\n\tshape-rendering: crispEdges;\n}\n\n.threeColourSlider .resize path:hover {\n\tfill: white;\n}\n\n.threeColourSliderTitle {\n fill: #888;\n pointer-events: none;\n font-size: 0.8em;\n}",""]);const I=n},9172:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,".CLMStooltip {\n position: absolute;\n border: 4px solid #fdc086; /*#444*/\n /*border-radius: 10px;*/\n /*background: #add;*/\n background: #eee;\n /*opacity: 0.9;*/\n z-index: 1001;\n max-width: 350px;\n line-height: 1em;\n top: 0; /* default tooltip to top so it doesn't sit at bottom and cause unnecessary scrollbar to start with */\n}\n\n.CLMStooltip h2 {\n padding: 2px 4px 4px 4px;\n font-size: 12pt;\n margin: 0;\n /*border-radius: 8px 8px 0px 0px;*/\n /*color: #000;*/\n /*background: #1c94c4;*/\n color: #ffffff;\n background: var(--main-color);\n}\n\n.CLMStooltip p {\n padding: 0.3em;\n margin: 0;\n font-size: 10pt;\n color: #222;\n}\n\n.CLMStooltip hr {\n border-style: solid;\n border-top-width: 1px;\n border-bottom-width: 0;\n margin: 2px 0;\n}\n\n.CLMStooltip ul {\n margin-left: 1em;\n}\n\n.CLMStooltip table {\n border-collapse: collapse;\n background: none;\n word-wrap: break-word;\n margin: 0;\n padding: 0;\n}\n\n.CLMStooltip table tr:nth-child(2n) {\n background: rgba(255,255,255,0.25);\n}\n\n.CLMStooltip table tr td {\n font-weight: bold;\n max-width: 200px; /* stop one column stealing all the space */\n vertical-align: top;\n padding-left: 0.1em;\n}\n\n.CLMStooltip table tr:not(:first-child) td {\n padding-top: 0.2em;\n}\n\n.CLMStooltip table tr td:last-child {\n padding-right: 0.1em;\n}\n\n.CLMStooltip table tr td:first-child, .CLMStooltip table tr th:first-child {\n text-transform: capitalize;\n}\n\n.CLMStooltip table tr th {\n height: 1em;\n padding-left: 0.1em;\n}\n\n.c3-tooltip-container {\n z-index: 10;\n border: 2px solid #444;\n /*border-radius: 10px;*/\n background: #add;\n opacity: 0.9;\n line-height: 1em;\n}\n\ntable.c3-tooltip {\n border: none;\n border-collapse: collapse;\n background: transparent;\n}\n\ntable.c3-tooltip tr {\n border: none;\n}\n\ntable.c3-tooltip tr:nth-child(2n) {\n background: rgba(255,255,255,0.25);\n}\n\ntable.c3-tooltip th {\n padding: 2px 4px 4px 4px;\n font-size: 12pt;\n margin: 0;\n /*border-radius: 8px 8px 0px 0px;*/\n color: #000;\n background: #1c94c4;\n height: 1em;\n}\n\ntable.c3-tooltip td {\n font-weight: bold;\n padding: 1px 6px;\n background-color: transparent;\n color: #222;\n font-size: 9pt;\n border: none;\n}\n\ntable.c3-tooltip tr:nth-child(2) td {\n padding-top: 4px;\n}\n",""]);const I=n},9959:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"body {\n overflow: hidden;\n}\n\n#toggles_monolinks {\n display: none;\n}\n\n:root {\n --main-color:#091D42;\n /*--main-color:red;*/\n /*--main-color:rgb(55, 58, 54);*/\n /*#333;*/\n}",""]);const I=n},6032:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"#xispec_spectrumControls {\n\tbackground-color: var(--main-color)!important;\n\tcolor: #000!important;\n}\n\n.xispec_dynDiv_moveParentDiv {\n\tfont-size: 15px!important;\n}\n\n.xispec_subViewHeader{\n background: rgb(9, 29, 66)!important;\n}\n.xispec_settings_menu{\n margin: -2px -9px!important;\n}\n.xispec_settings_menu .xispec_btn{\n background: #e3e3e3!important;\n color: var(--main-color)!important;\n}\n.xispec_dynDiv_moveParentDiv {\n border: none!important;\n}\n.xispec_settings_menu .xispec_btn:hover{\n background: #fff!important;\n}\n.xispec_settings_menu .xispec_active{\n background: rgba(192,206,224,1)!important;\n}\n.xispec_settings_menu .xispec_active:hover{\n background: rgba(192,206,224,1)!important;\n color: var(--main-color)!important;\n}\n\n.xispec_settings_menu .xispec_btn{\n /*background: #666!important;*/\n}\n.xispec_settings_menu .xispec_active{\n /*background: #333!important;*/\n}\n.xispec_settings_menu .xispec_active:hover {\n /*color: #fff;*/\n}\n\n\n\n.xispec_settings-bottom .xispec_btn-1 {\n border: 1px solid var(--main-color)!important;\n color: var(--main-color)!important;\n}\n.xispec_multiSelect_dropdown-content {\n background-color: var(--main-color)!important;\n}\n.xispec_form-control:focus {\n border-color: var(--main-color)!important;\n}\n#xispec_settingsCustomCfgApply{\n\tdisplay: inline!important;\n}\n#xispec_settingsAnnotatorApply{\n display: inline!important;\n}\n\n",""]);const I=n},4406:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/* DynDiv 0.5 by Markus Bordihn (markusbordihn.de) */\n\n.dynDiv_moveDiv {\n cursor: move;\n position: absolute;\n overflow: hidden;\n}\n\n.dynDiv_resizeDiv_tl,.dynDiv_resizeDiv_tr,.dynDiv_resizeDiv_bl,.dynDiv_resizeDiv_br {\n width: 10px;\n height: 10px;\n background: #faa;\n border: 1px solid #000;\n position: absolute;\n}\n\n.dynDiv_resizeDiv_tl {\n top: -1px;\n left: -1px;\n}\n\n.dynDiv_resizeDiv_tr {\n top: -1px;\n right: -1px;\n}\n\n.dynDiv_resizeDiv_bl {\n bottom: -1px;\n left: -1px;\n}\n\n.dynDiv_resizeDiv_br {\n bottom: -1px;\n right: -1px;\n}\n\n.dynDiv_moveParentDiv {\n width: 100%;\n margin: auto;\n height: 16px;\n font-size: 15px;\n position: absolute;\n top: -1px;\n left: -1px;\n background: #faa;\n/*\n border: 1px solid #aaa;\n*/\n border-left: 0;\n border-right: 0;\n padding: 0;\n overflow: hidden;\n /*white-space:nowrap;*/ /* https://bugzilla.mozilla.org/show_bug.cgi?id=488725 */\n}\n\n.dynDiv_minmaxDiv {\n position: absolute;\n top: 1px;\n right: 15px;\n width: 15px;\n height: 15px;\n background: #faa;\n font-size: 15px;\n padding: 0;\n margin: 0;\n}\n",""]);const I=n},4530:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,"/*-- Chart --*/\n.c3 svg {\n font: 10px sans-serif;\n -webkit-tap-highlight-color: transparent; }\n\n.c3 path, .c3 line {\n fill: none;\n stroke: #000; }\n\n.c3 text {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none; }\n\n.c3-legend-item-tile,\n.c3-xgrid-focus,\n.c3-ygrid,\n.c3-event-rect,\n.c3-bars path {\n shape-rendering: crispEdges; }\n\n.c3-chart-arc path {\n stroke: #fff; }\n\n.c3-chart-arc rect {\n stroke: white;\n stroke-width: 1; }\n\n.c3-chart-arc text {\n fill: #fff;\n font-size: 13px; }\n\n/*-- Axis --*/\n/*-- Grid --*/\n.c3-grid line {\n stroke: #aaa; }\n\n.c3-grid text {\n fill: #aaa; }\n\n.c3-xgrid, .c3-ygrid {\n stroke-dasharray: 3 3; }\n\n/*-- Text on Chart --*/\n.c3-text.c3-empty {\n fill: #808080;\n font-size: 2em; }\n\n/*-- Line --*/\n.c3-line {\n stroke-width: 1px; }\n\n/*-- Point --*/\n.c3-circle._expanded_ {\n stroke-width: 1px;\n stroke: white; }\n\n.c3-selected-circle {\n fill: white;\n stroke-width: 2px; }\n\n/*-- Bar --*/\n.c3-bar {\n stroke-width: 0; }\n\n.c3-bar._expanded_ {\n fill-opacity: 1;\n fill-opacity: 0.75; }\n\n/*-- Focus --*/\n.c3-target.c3-focused {\n opacity: 1; }\n\n.c3-target.c3-focused path.c3-line, .c3-target.c3-focused path.c3-step {\n stroke-width: 2px; }\n\n.c3-target.c3-defocused {\n opacity: 0.3 !important; }\n\n/*-- Region --*/\n.c3-region {\n fill: steelblue;\n fill-opacity: .1; }\n\n/*-- Brush --*/\n.c3-brush .extent {\n fill-opacity: .1; }\n\n/*-- Select - Drag --*/\n/*-- Legend --*/\n.c3-legend-item {\n font-size: 12px; }\n\n.c3-legend-item-hidden {\n opacity: 0.15; }\n\n.c3-legend-background {\n opacity: 0.75;\n fill: white;\n stroke: lightgray;\n stroke-width: 1; }\n\n/*-- Title --*/\n.c3-title {\n font: 14px sans-serif; }\n\n/*-- Tooltip --*/\n.c3-tooltip-container {\n z-index: 10; }\n\n.c3-tooltip {\n border-collapse: collapse;\n border-spacing: 0;\n background-color: #fff;\n empty-cells: show;\n -webkit-box-shadow: 7px 7px 12px -9px #777777;\n -moz-box-shadow: 7px 7px 12px -9px #777777;\n box-shadow: 7px 7px 12px -9px #777777;\n opacity: 0.9; }\n\n.c3-tooltip tr {\n border: 1px solid #CCC; }\n\n.c3-tooltip th {\n background-color: #aaa;\n font-size: 14px;\n padding: 2px 5px;\n text-align: left;\n color: #FFF; }\n\n.c3-tooltip td {\n font-size: 13px;\n padding: 3px 6px;\n background-color: #fff;\n border-left: 1px dotted #999; }\n\n.c3-tooltip td > span {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin-right: 6px; }\n\n.c3-tooltip td.value {\n text-align: right; }\n\n/*-- Area --*/\n.c3-area {\n stroke-width: 0;\n opacity: 0.2; }\n\n/*-- Arc --*/\n.c3-chart-arcs-title {\n dominant-baseline: middle;\n font-size: 1.3em; }\n\n.c3-chart-arcs .c3-chart-arcs-background {\n fill: #e0e0e0;\n stroke: #FFF; }\n\n.c3-chart-arcs .c3-chart-arcs-gauge-unit {\n fill: #000;\n font-size: 16px; }\n\n.c3-chart-arcs .c3-chart-arcs-gauge-max {\n fill: #777; }\n\n.c3-chart-arcs .c3-chart-arcs-gauge-min {\n fill: #777; }\n\n.c3-chart-arc .c3-gauge-value {\n fill: #000;\n /* font-size: 28px !important;*/ }\n\n.c3-chart-arc.c3-target g path {\n opacity: 1; }\n\n.c3-chart-arc.c3-target.c3-focused g path {\n opacity: 1; }\n",""]);const I=n},4863:(A,t,e)=>{"use strict";e.d(t,{A:()=>I});var i=e(6314),n=e.n(i)()((function(A){return A[1]}));n.push([A.id,'@charset "UTF-8";\n.jsonview {\n font-family: monospace;\n font-size: 1.1em;\n white-space: pre-wrap; }\n .jsonview .prop {\n font-weight: bold;\n text-decoration: none;\n color: #000; }\n .jsonview .null {\n color: red; }\n .jsonview .undefined {\n color: red; }\n .jsonview .bool {\n color: blue; }\n .jsonview .num {\n color: blue; }\n .jsonview .string {\n color: green;\n white-space: pre-wrap; }\n .jsonview .string.multiline {\n display: inline-block;\n vertical-align: text-top; }\n .jsonview .collapser {\n position: absolute;\n left: -1em;\n cursor: pointer; }\n .jsonview .collapsible {\n transition: height 1.2s;\n transition: width 1.2s; }\n .jsonview .collapsible.collapsed {\n height: .8em;\n width: 1em;\n display: inline-block;\n overflow: hidden;\n margin: 0; }\n .jsonview .collapsible.collapsed:before {\n content: "…";\n width: 1em;\n margin-left: .2em; }\n .jsonview .collapser.collapsed {\n transform: rotate(0deg); }\n .jsonview .q {\n display: inline-block;\n width: 0px;\n color: transparent; }\n .jsonview li {\n position: relative; }\n .jsonview ul {\n list-style: none;\n margin: 0 0 0 2em;\n padding: 0; }\n .jsonview h1 {\n font-size: 1.2em; }\n',""]);const I=n},6314:A=>{"use strict";A.exports=function(A){var t=[];return t.toString=function(){return this.map((function(t){var e=A(t);return t[2]?"@media ".concat(t[2]," {").concat(e,"}"):e})).join("")},t.i=function(A,e,i){"string"==typeof A&&(A=[[null,A,""]]);var n={};if(i)for(var I=0;I{"use strict";A.exports=function(A,t){return t||(t={}),"string"!=typeof(A=A&&A.__esModule?A.default:A)?A:(/^['"].*['"]$/.test(A)&&(A=A.slice(1,-1)),t.hash&&(A+=t.hash),/["'() \t\n]/.test(A)||t.needQuotes?'"'.concat(A.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):A)}},4143:(A,t,e)=>{var i,n;!function(){var I={version:"3.5.17"},r=[].slice,o=function(A){return r.call(A)},g=this.document;function a(A){return A&&(A.ownerDocument||A.document||A).documentElement}function M(A){return A&&(A.ownerDocument&&A.ownerDocument.defaultView||A.document&&A||A.defaultView)}if(g)try{o(g.documentElement.childNodes)[0].nodeType}catch(A){o=function(A){for(var t=A.length,e=new Array(t);t--;)e[t]=A[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),g)try{g.createElement("DIV").style.setProperty("opacity",0,"")}catch(A){var s=this.Element.prototype,c=s.setAttribute,u=s.setAttributeNS,l=this.CSSStyleDeclaration.prototype,C=l.setProperty;s.setAttribute=function(A,t){c.call(this,A,t+"")},s.setAttributeNS=function(A,t,e){u.call(this,A,t,e+"")},l.setProperty=function(A,t,e){C.call(this,A,t+"",e)}}function T(A,t){return At?1:A>=t?0:NaN}function h(A){return null===A?NaN:+A}function N(A){return!isNaN(A)}function d(A){return{left:function(t,e,i,n){for(arguments.length<3&&(i=0),arguments.length<4&&(n=t.length);i>>1;A(t[I],e)<0?i=I+1:n=I}return i},right:function(t,e,i,n){for(arguments.length<3&&(i=0),arguments.length<4&&(n=t.length);i>>1;A(t[I],e)>0?n=I:i=I+1}return i}}}I.ascending=T,I.descending=function(A,t){return tA?1:t>=A?0:NaN},I.min=function(A,t){var e,i,n=-1,I=A.length;if(1===arguments.length){for(;++n=i){e=i;break}for(;++ni&&(e=i)}else{for(;++n=i){e=i;break}for(;++ni&&(e=i)}return e},I.max=function(A,t){var e,i,n=-1,I=A.length;if(1===arguments.length){for(;++n=i){e=i;break}for(;++ne&&(e=i)}else{for(;++n=i){e=i;break}for(;++ne&&(e=i)}return e},I.extent=function(A,t){var e,i,n,I=-1,r=A.length;if(1===arguments.length){for(;++I=i){e=n=i;break}for(;++Ii&&(e=i),n=i){e=n=i;break}for(;++Ii&&(e=i),n1)return r/(g-1)},I.deviation=function(){var A=I.variance.apply(this,arguments);return A?Math.sqrt(A):A};var y=d(T);function E(A){return A.length}I.bisectLeft=y.left,I.bisect=I.bisectRight=y.right,I.bisector=function(A){return d(1===A.length?function(t,e){return T(A(t),e)}:A)},I.shuffle=function(A,t,e){(I=arguments.length)<3&&(e=A.length,I<2&&(t=0));for(var i,n,I=e-t;I;)n=Math.random()*I--|0,i=A[I+t],A[I+t]=A[n+t],A[n+t]=i;return A},I.permute=function(A,t){for(var e=t.length,i=new Array(e);e--;)i[e]=A[t[e]];return i},I.pairs=function(A){for(var t=0,e=A.length-1,i=A[0],n=new Array(e<0?0:e);t=0;)for(t=(i=A[n]).length;--t>=0;)e[--r]=i[t];return e};var D=Math.abs;function j(A,t){for(var e in t)Object.defineProperty(A.prototype,e,{value:t[e],enumerable:!1})}function B(){this._=Object.create(null)}I.range=function(A,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=A,A=0)),(t-A)/e==1/0)throw new Error("infinite range");var i,n=[],I=function(A){for(var t=1;A*t%1;)t*=10;return t}(D(e)),r=-1;if(A*=I,t*=I,(e*=I)<0)for(;(i=A+e*++r)>t;)n.push(i/I);else for(;(i=A+e*++r)=i.length)return t?t.call(e,I):A?I.sort(A):I;for(var g,a,M,s,c=-1,u=I.length,l=i[o++],C=new B;++c=i.length)return A;var e=[],I=n[t++];return A.forEach((function(A,i){e.push({key:A,values:o(i,t)})})),I?e.sort((function(A,t){return I(A.key,t.key)})):e}return e.map=function(A,t){return r(t,A,0)},e.entries=function(A){return o(r(I.map,A,0),0)},e.key=function(A){return i.push(A),e},e.sortKeys=function(A){return n[i.length-1]=A,e},e.sortValues=function(t){return A=t,e},e.rollup=function(A){return t=A,e},e},I.set=function(A){var t=new Y;if(A)for(var e=0,i=A.length;e=0&&(i=A.slice(e+1),A=A.slice(0,e)),A)return arguments.length<2?this[A].on(i):this[A].on(i,t);if(2===arguments.length){if(null==t)for(A in this)this.hasOwnProperty(A)&&this[A].on(i,null);return this}},I.event=null,I.requote=function(A){return A.replace(R,"\\$&")};var R=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,X={}.__proto__?function(A,t){A.__proto__=t}:function(A,t){for(var e in t)A[e]=t[e]};function V(A){return X(A,_),A}var W=function(A,t){return t.querySelector(A)},Z=function(A,t){return t.querySelectorAll(A)},K=function(A,t){var e=A.matches||A[U(A,"matchesSelector")];return K=function(A,t){return e.call(A,t)},K(A,t)};"function"==typeof Sizzle&&(W=function(A,t){return Sizzle(A,t)[0]||null},Z=Sizzle,K=Sizzle.matchesSelector),I.selection=function(){return I.select(g.documentElement)};var _=I.selection.prototype=[];function q(A){return"function"==typeof A?A:function(){return W(A,this)}}function $(A){return"function"==typeof A?A:function(){return Z(A,this)}}_.select=function(A){var t,e,i,n,I=[];A=q(A);for(var r=-1,o=this.length;++r=0&&"xmlns"!==(e=A.slice(0,t))&&(A=A.slice(t+1)),tA.hasOwnProperty(e)?{space:tA[e],local:A}:A}},_.attr=function(A,t){if(arguments.length<2){if("string"==typeof A){var e=this.node();return(A=I.ns.qualify(A)).local?e.getAttributeNS(A.space,A.local):e.getAttribute(A)}for(t in A)this.each(eA(t,A[t]));return this}return this.each(eA(A,t))},_.classed=function(A,t){if(arguments.length<2){if("string"==typeof A){var e=this.node(),i=(A=IA(A)).length,n=-1;if(t=e.classList){for(;++n=0;)(e=i[n])&&(I&&I!==e.nextSibling&&I.parentNode.insertBefore(e,I),I=e);return this},_.sort=function(A){A=lA.apply(this,arguments);for(var t=-1,e=this.length;++t0&&(A=A.slice(0,n));var g=dA.get(A);function a(){var t=this[i];t&&(this.removeEventListener(A,t,t.$),delete this[i])}return g&&(A=g,r=EA),n?t?function(){var n=r(t,o(arguments));a.call(this),this.addEventListener(A,this[i]=n,n.$=e),n._=t}:a:t?P:function(){var t,e=new RegExp("^__on([^.]+)"+I.requote(A)+"$");for(var i in this)if(t=i.match(e)){var n=this[i];this.removeEventListener(t[1],n,n.$),delete this[i]}}}I.selection.enter=TA,I.selection.enter.prototype=hA,hA.append=_.append,hA.empty=_.empty,hA.node=_.node,hA.call=_.call,hA.size=_.size,hA.select=function(A){for(var t,e,i,n,I,r=[],o=-1,g=this.length;++o=i&&(i=t+1);!(r=o[i])&&++i0?1:A<0?-1:0}function UA(A,t,e){return(t[0]-A[0])*(e[1]-A[1])-(t[1]-A[1])*(e[0]-A[0])}function bA(A){return A>1?0:A<-1?wA:Math.acos(A)}function PA(A){return A>1?SA:A<-1?-SA:Math.asin(A)}function kA(A){return((A=Math.exp(A))+1/A)/2}function GA(A){return(A=Math.sin(A/2))*A}var FA=Math.SQRT2;I.interpolateZoom=function(A,t){var e,i,n=A[0],I=A[1],r=A[2],o=t[0],g=t[1],a=t[2],M=o-n,s=g-I,c=M*M+s*s;if(c0&&(A=A.transition().duration(C)),A.call(D.event)}function L(){o&&o.domain(r.range().map((function(A){return(A-c.x)/c.k})).map(r.invert)),s&&s.domain(a.range().map((function(A){return(A-c.y)/c.k})).map(a.invert))}function f(A){T++||A({type:"zoomstart"})}function z(A){L(),A({type:"zoom",scale:c.k,translate:[c.x,c.y]})}function w(A){--T||(A({type:"zoomend"}),t=null)}function m(){var A=this,t=E.of(A,arguments),e=0,i=I.select(M(A)).on(N,(function(){e=1,x(I.mouse(A),n),z(t)})).on(d,(function(){i.on(N,null).on(d,null),r(e),w(t)})),n=j(I.mouse(A)),r=BA(A);wo.call(A),f(t)}function Q(){var A,t=this,e=E.of(t,arguments),i={},r=0,o=".zoom-"+I.event.changedTouches[0].identifier,g="touchmove"+o,a="touchend"+o,M=[],s=I.select(t),u=BA(t);function l(){var e=I.touches(t);return A=c.k,e.forEach((function(A){A.identifier in i&&(i[A.identifier]=j(A))})),e}function C(){var A=I.event.target;I.select(A).on(g,T).on(a,N),M.push(A);for(var e=I.event.changedTouches,o=0,s=e.length;o1){h=u[0];var d=u[1],y=h[0]-d[0],E=h[1]-d[1];r=y*y+E*E}}function T(){var o,g,a,M,s=I.touches(t);wo.call(t);for(var c=0,u=s.length;c360?A-=360:A<0&&(A+=360),A<60?i+(n-i)*A/60:A<180?n:A<240?i+(n-i)*(240-A)/60:i}(A))}return A=isNaN(A)?0:(A%=360)<0?A+360:A,t=isNaN(t)||t<0?0:t>1?1:t,i=2*(e=e<0?0:e>1?1:e)-(n=e<=.5?e*(1+t):e+t-e*t),new at(I(A+120),I(A),I(A-120))}function KA(A,t,e){return this instanceof KA?(this.h=+A,this.c=+t,void(this.l=+e)):arguments.length<2?A instanceof KA?new KA(A.h,A.c,A.l):function(A,t,e){return A>0?new KA(Math.atan2(e,t)*OA,Math.sqrt(t*t+e*e),A):new KA(NaN,NaN,A)}(A instanceof $A?A.l:(A=Tt((A=I.rgb(A)).r,A.g,A.b)).l,A.a,A.b):new KA(A,t,e)}WA.brighter=function(A){return A=Math.pow(.7,arguments.length?A:1),new VA(this.h,this.s,this.l/A)},WA.darker=function(A){return A=Math.pow(.7,arguments.length?A:1),new VA(this.h,this.s,A*this.l)},WA.rgb=function(){return ZA(this.h,this.s,this.l)},I.hcl=KA;var _A=KA.prototype=new XA;function qA(A,t,e){return isNaN(A)&&(A=0),isNaN(t)&&(t=0),new $A(e,Math.cos(A*=YA)*t,Math.sin(A)*t)}function $A(A,t,e){return this instanceof $A?(this.l=+A,this.a=+t,void(this.b=+e)):arguments.length<2?A instanceof $A?new $A(A.l,A.a,A.b):A instanceof KA?qA(A.h,A.c,A.l):Tt((A=at(A)).r,A.g,A.b):new $A(A,t,e)}_A.brighter=function(A){return new KA(this.h,this.c,Math.min(100,this.l+At*(arguments.length?A:1)))},_A.darker=function(A){return new KA(this.h,this.c,Math.max(0,this.l-At*(arguments.length?A:1)))},_A.rgb=function(){return qA(this.h,this.c,this.l).rgb()},I.lab=$A;var At=18,tt=.95047,et=1,it=1.08883,nt=$A.prototype=new XA;function It(A,t,e){var i=(A+16)/116,n=i+t/500,I=i-e/200;return new at(gt(3.2404542*(n=rt(n)*tt)-1.5371385*(i=rt(i)*et)-.4985314*(I=rt(I)*it)),gt(-.969266*n+1.8760108*i+.041556*I),gt(.0556434*n-.2040259*i+1.0572252*I))}function rt(A){return A>.206893034?A*A*A:(A-4/29)/7.787037}function ot(A){return A>.008856?Math.pow(A,1/3):7.787037*A+4/29}function gt(A){return Math.round(255*(A<=.00304?12.92*A:1.055*Math.pow(A,1/2.4)-.055))}function at(A,t,e){return this instanceof at?(this.r=~~A,this.g=~~t,void(this.b=~~e)):arguments.length<2?A instanceof at?new at(A.r,A.g,A.b):lt(""+A,at,ZA):new at(A,t,e)}function Mt(A){return new at(A>>16,A>>8&255,255&A)}function st(A){return Mt(A)+""}nt.brighter=function(A){return new $A(Math.min(100,this.l+At*(arguments.length?A:1)),this.a,this.b)},nt.darker=function(A){return new $A(Math.max(0,this.l-At*(arguments.length?A:1)),this.a,this.b)},nt.rgb=function(){return It(this.l,this.a,this.b)},I.rgb=at;var ct=at.prototype=new XA;function ut(A){return A<16?"0"+Math.max(0,A).toString(16):Math.min(255,A).toString(16)}function lt(A,t,e){var i,n,I,r=0,o=0,g=0;if(i=/([a-z]+)\((.*)\)/.exec(A=A.toLowerCase()))switch(n=i[2].split(","),i[1]){case"hsl":return e(parseFloat(n[0]),parseFloat(n[1])/100,parseFloat(n[2])/100);case"rgb":return t(Nt(n[0]),Nt(n[1]),Nt(n[2]))}return(I=dt.get(A))?t(I.r,I.g,I.b):(null==A||"#"!==A.charAt(0)||isNaN(I=parseInt(A.slice(1),16))||(4===A.length?(r=(3840&I)>>4,r|=r>>4,o=240&I,o|=o>>4,g=15&I,g|=g<<4):7===A.length&&(r=(16711680&I)>>16,o=(65280&I)>>8,g=255&I)),t(r,o,g))}function Ct(A,t,e){var i,n,I=Math.min(A/=255,t/=255,e/=255),r=Math.max(A,t,e),o=r-I,g=(r+I)/2;return o?(n=g<.5?o/(r+I):o/(2-r-I),i=A==r?(t-e)/o+(t0&&g<1?0:i),new VA(i,n,g)}function Tt(A,t,e){var i=ot((.4124564*(A=ht(A))+.3575761*(t=ht(t))+.1804375*(e=ht(e)))/tt),n=ot((.2126729*A+.7151522*t+.072175*e)/et);return $A(116*n-16,500*(i-n),200*(n-ot((.0193339*A+.119192*t+.9503041*e)/it)))}function ht(A){return(A/=255)<=.04045?A/12.92:Math.pow((A+.055)/1.055,2.4)}function Nt(A){var t=parseFloat(A);return"%"===A.charAt(A.length-1)?Math.round(2.55*t):t}ct.brighter=function(A){A=Math.pow(.7,arguments.length?A:1);var t=this.r,e=this.g,i=this.b,n=30;return t||e||i?(t&&t=200&&t<300||304===t){try{A=e.call(n,a)}catch(A){return void r.error.call(n,A)}r.load.call(n,A)}else r.error.call(n,a)}return this.XDomainRequest&&!("withCredentials"in a)&&/^(http(s)?:)?\/\//.test(A)&&(a=new XDomainRequest),"onload"in a?a.onload=a.onerror=s:a.onreadystatechange=function(){a.readyState>3&&s()},a.onprogress=function(A){var t=I.event;I.event=A;try{r.progress.call(n,a)}finally{I.event=t}},n.header=function(A,t){return A=(A+"").toLowerCase(),arguments.length<2?g[A]:(null==t?delete g[A]:g[A]=t+"",n)},n.mimeType=function(A){return arguments.length?(t=null==A?null:A+"",n):t},n.responseType=function(A){return arguments.length?(M=A,n):M},n.response=function(A){return e=A,n},["get","post"].forEach((function(A){n[A]=function(){return n.send.apply(n,[A].concat(o(arguments)))}})),n.send=function(e,i,I){if(2===arguments.length&&"function"==typeof i&&(I=i,i=null),a.open(e,A,!0),null==t||"accept"in g||(g.accept=t+",*/*"),a.setRequestHeader)for(var o in g)a.setRequestHeader(o,g[o]);return null!=t&&a.overrideMimeType&&a.overrideMimeType(t),null!=M&&(a.responseType=M),null!=I&&n.on("error",I).on("load",(function(A){I(null,A)})),r.beforesend.call(n,a),a.send(null==i?null:i),n},n.abort=function(){return a.abort(),n},I.rebind(n,r,"on"),null==i?n:n.get(function(A){return 1===A.length?function(t,e){A(null==t?e:null)}:A}(i))}dt.forEach((function(A,t){dt.set(A,Mt(t))})),I.functor=yt,I.xhr=Et(O),I.dsv=function(A,t){var e=new RegExp('["'+A+"\n]"),i=A.charCodeAt(0);function n(A,e,i){arguments.length<3&&(i=e,e=null);var n=Dt(A,t,null==e?I:r(e),i);return n.row=function(A){return arguments.length?n.response(null==(e=A)?I:r(A)):e},n}function I(A){return n.parse(A.responseText)}function r(A){return function(t){return n.parse(t.responseText,A)}}function o(t){return t.map(g).join(A)}function g(A){return e.test(A)?'"'+A.replace(/\"/g,'""')+'"':A}return n.parse=function(A,t){var e;return n.parseRows(A,(function(A,i){if(e)return e(A,i-1);var n=new Function("d","return {"+A.map((function(A,t){return JSON.stringify(A)+": d["+t+"]"})).join(",")+"}");e=t?function(A,e){return t(n(A),e)}:n}))},n.parseRows=function(A,t){var e,n,I={},r={},o=[],g=A.length,a=0,M=0;function s(){if(a>=g)return r;if(n)return n=!1,I;var t=a;if(34===A.charCodeAt(t)){for(var e=t;e++24?(isFinite(t)&&(clearTimeout(pt),pt=setTimeout(zt,t)),xt=0):(xt=1,Lt(zt))}function wt(){for(var A=Date.now(),t=jt;t;)A>=t.t&&t.c(A-t.t)&&(t.c=null),t=t.n;return A}function mt(){for(var A,t=jt,e=1/0;t;)t.c?(t.t8?function(A){return A/e}:function(A){return A*e},symbol:A}}));function Yt(A){var t=A.decimal,e=A.thousands,i=A.grouping,n=A.currency,r=i&&e?function(A,t){for(var n=A.length,I=[],r=0,o=i[0],g=0;n>0&&o>0&&(g+o+1>t&&(o=Math.max(1,t-g)),I.push(A.substring(n-=o,n+o)),!((g+=o+1)>t));)o=i[r=(r+1)%i.length];return I.reverse().join(e)}:O;return function(A){var e=Ot.exec(A),i=e[1]||" ",o=e[2]||">",g=e[3]||"-",a=e[4]||"",M=e[5],s=+e[6],c=e[7],u=e[8],l=e[9],C=1,T="",h="",N=!1,d=!0;switch(u&&(u=+u.substring(1)),(M||"0"===i&&"="===o)&&(M=i="0",o="="),l){case"n":c=!0,l="g";break;case"%":C=100,h="%",l="f";break;case"p":C=100,h="%",l="r";break;case"b":case"o":case"x":case"X":"#"===a&&(T="0"+l.toLowerCase());case"c":d=!1;case"d":N=!0,u=0;break;case"s":C=-1,l="r"}"$"===a&&(T=n[0],h=n[1]),"r"!=l||u||(l="g"),null!=u&&("g"==l?u=Math.max(1,Math.min(21,u)):"e"!=l&&"f"!=l||(u=Math.max(0,Math.min(20,u)))),l=vt.get(l)||Ut;var y=M&&c;return function(A){var e=h;if(N&&A%1)return"";var n=A<0||0===A&&1/A<0?(A=-A,"-"):"-"===g?"":g;if(C<0){var a=I.formatPrefix(A,u);A=a.scale(A),e=a.symbol+h}else A*=C;var E,D,j=(A=l(A,u)).lastIndexOf(".");if(j<0){var B=d?A.lastIndexOf("e"):-1;B<0?(E=A,D=""):(E=A.substring(0,B),D=A.substring(B))}else E=A.substring(0,j),D=t+A.substring(j+1);!M&&c&&(E=r(E,1/0));var x=T.length+E.length+D.length+(y?0:n.length),p=x"===o?p+n+A:"^"===o?p.substring(0,x>>=1)+n+A+p.substring(x):n+(y?A:p+A))+e}}}I.formatPrefix=function(A,t){var e=0;return(A=+A)&&(A<0&&(A*=-1),t&&(A=I.round(A,Qt(A,t))),e=1+Math.floor(1e-12+Math.log(A)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),St[8+e/3]};var Ot=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,vt=I.map({b:function(A){return A.toString(2)},c:function(A){return String.fromCharCode(A)},o:function(A){return A.toString(8)},x:function(A){return A.toString(16)},X:function(A){return A.toString(16).toUpperCase()},g:function(A,t){return A.toPrecision(t)},e:function(A,t){return A.toExponential(t)},f:function(A,t){return A.toFixed(t)},r:function(A,t){return(A=I.round(A,Qt(A,t))).toFixed(Math.max(0,Math.min(20,Qt(A*(1+1e-15),t))))}});function Ut(A){return A+""}var bt=I.time={},Pt=Date;function kt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}kt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Gt.setUTCDate.apply(this._,arguments)},setDay:function(){Gt.setUTCDay.apply(this._,arguments)},setFullYear:function(){Gt.setUTCFullYear.apply(this._,arguments)},setHours:function(){Gt.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Gt.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Gt.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Gt.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Gt.setUTCSeconds.apply(this._,arguments)},setTime:function(){Gt.setTime.apply(this._,arguments)}};var Gt=Date.prototype;function Ft(A,t,e){function i(t){var e=A(t),i=I(e,1);return t-e1)for(;r=a)return-1;if(37===(n=t.charCodeAt(o++))){if(r=t.charAt(o++),!(I=D[r in Rt?t.charAt(o++):r])||(i=I(A,e,i))<0)return-1}else if(n!=e.charCodeAt(i++))return-1}return i}M.utc=function(A){var t=M(A);function e(A){try{var e=new(Pt=kt);return e._=A,t(e)}finally{Pt=Date}}return e.parse=function(A){try{Pt=kt;var e=t.parse(A);return e&&e._}finally{Pt=Date}},e.toString=t.toString,e},M.multi=M.utc.multi=ce;var c=I.map(),u=Zt(r),l=Kt(r),C=Zt(o),T=Kt(o),h=Zt(g),N=Kt(g),d=Zt(a),y=Kt(a);n.forEach((function(A,t){c.set(A.toLowerCase(),t)}));var E={a:function(A){return o[A.getDay()]},A:function(A){return r[A.getDay()]},b:function(A){return a[A.getMonth()]},B:function(A){return g[A.getMonth()]},c:M(t),d:function(A,t){return Wt(A.getDate(),t,2)},e:function(A,t){return Wt(A.getDate(),t,2)},H:function(A,t){return Wt(A.getHours(),t,2)},I:function(A,t){return Wt(A.getHours()%12||12,t,2)},j:function(A,t){return Wt(1+bt.dayOfYear(A),t,3)},L:function(A,t){return Wt(A.getMilliseconds(),t,3)},m:function(A,t){return Wt(A.getMonth()+1,t,2)},M:function(A,t){return Wt(A.getMinutes(),t,2)},p:function(A){return n[+(A.getHours()>=12)]},S:function(A,t){return Wt(A.getSeconds(),t,2)},U:function(A,t){return Wt(bt.sundayOfYear(A),t,2)},w:function(A){return A.getDay()},W:function(A,t){return Wt(bt.mondayOfYear(A),t,2)},x:M(e),X:M(i),y:function(A,t){return Wt(A.getFullYear()%100,t,2)},Y:function(A,t){return Wt(A.getFullYear()%1e4,t,4)},Z:Me,"%":function(){return"%"}},D={a:function(A,t,e){C.lastIndex=0;var i=C.exec(t.slice(e));return i?(A.w=T.get(i[0].toLowerCase()),e+i[0].length):-1},A:function(A,t,e){u.lastIndex=0;var i=u.exec(t.slice(e));return i?(A.w=l.get(i[0].toLowerCase()),e+i[0].length):-1},b:function(A,t,e){d.lastIndex=0;var i=d.exec(t.slice(e));return i?(A.m=y.get(i[0].toLowerCase()),e+i[0].length):-1},B:function(A,t,e){h.lastIndex=0;var i=h.exec(t.slice(e));return i?(A.m=N.get(i[0].toLowerCase()),e+i[0].length):-1},c:function(A,t,e){return s(A,E.c.toString(),t,e)},d:ne,e:ne,H:re,I:re,j:Ie,L:ae,m:ie,M:oe,p:function(A,t,e){var i=c.get(t.slice(e,e+=2).toLowerCase());return null==i?-1:(A.p=i,e)},S:ge,U:qt,w:_t,W:$t,x:function(A,t,e){return s(A,E.x.toString(),t,e)},X:function(A,t,e){return s(A,E.X.toString(),t,e)},y:te,Y:Ae,Z:ee,"%":se};return M}bt.year=Ft((function(A){return(A=bt.day(A)).setMonth(0,1),A}),(function(A,t){A.setFullYear(A.getFullYear()+t)}),(function(A){return A.getFullYear()})),bt.years=bt.year.range,bt.years.utc=bt.year.utc.range,bt.day=Ft((function(A){var t=new Pt(2e3,0);return t.setFullYear(A.getFullYear(),A.getMonth(),A.getDate()),t}),(function(A,t){A.setDate(A.getDate()+t)}),(function(A){return A.getDate()-1})),bt.days=bt.day.range,bt.days.utc=bt.day.utc.range,bt.dayOfYear=function(A){var t=bt.year(A);return Math.floor((A-t-6e4*(A.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(A,t){t=7-t;var e=bt[A]=Ft((function(A){return(A=bt.day(A)).setDate(A.getDate()-(A.getDay()+t)%7),A}),(function(A,t){A.setDate(A.getDate()+7*Math.floor(t))}),(function(A){var e=bt.year(A).getDay();return Math.floor((bt.dayOfYear(A)+(e+t)%7)/7)-(e!==t)}));bt[A+"s"]=e.range,bt[A+"s"].utc=e.utc.range,bt[A+"OfYear"]=function(A){var e=bt.year(A).getDay();return Math.floor((bt.dayOfYear(A)+(e+t)%7)/7)}})),bt.week=bt.sunday,bt.weeks=bt.sunday.range,bt.weeks.utc=bt.sunday.utc.range,bt.weekOfYear=bt.sundayOfYear;var Rt={"-":"",_:" ",0:"0"},Xt=/^\s*\d+/,Vt=/^%/;function Wt(A,t,e){var i=A<0?"-":"",n=(i?-A:A)+"",I=n.length;return i+(I68?1900:2e3),e+n[0].length):-1}function ee(A,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(A.Z=-t,e+5):-1}function ie(A,t,e){Xt.lastIndex=0;var i=Xt.exec(t.slice(e,e+2));return i?(A.m=i[0]-1,e+i[0].length):-1}function ne(A,t,e){Xt.lastIndex=0;var i=Xt.exec(t.slice(e,e+2));return i?(A.d=+i[0],e+i[0].length):-1}function Ie(A,t,e){Xt.lastIndex=0;var i=Xt.exec(t.slice(e,e+3));return i?(A.j=+i[0],e+i[0].length):-1}function re(A,t,e){Xt.lastIndex=0;var i=Xt.exec(t.slice(e,e+2));return i?(A.H=+i[0],e+i[0].length):-1}function oe(A,t,e){Xt.lastIndex=0;var i=Xt.exec(t.slice(e,e+2));return i?(A.M=+i[0],e+i[0].length):-1}function ge(A,t,e){Xt.lastIndex=0;var i=Xt.exec(t.slice(e,e+2));return i?(A.S=+i[0],e+i[0].length):-1}function ae(A,t,e){Xt.lastIndex=0;var i=Xt.exec(t.slice(e,e+3));return i?(A.L=+i[0],e+i[0].length):-1}function Me(A){var t=A.getTimezoneOffset(),e=t>0?"-":"+",i=D(t)/60|0,n=D(t)%60;return e+Wt(i,"0",2)+Wt(n,"0",2)}function se(A,t,e){Vt.lastIndex=0;var i=Vt.exec(t.slice(e,e+1));return i?e+i[0].length:-1}function ce(A){for(var t=A.length,e=-1;++e=0?1:-1,o=r*I,g=Math.cos(t),a=Math.sin(t),M=n*a,s=i*g+M*Math.cos(o),c=M*r*Math.sin(o);Ye.add(Math.atan2(c,s)),e=A,i=g,n=a}Oe.point=function(r,o){Oe.point=I,e=(A=r)*YA,i=Math.cos(o=(t=o)*YA/2+wA/4),n=Math.sin(o)},Oe.lineEnd=function(){I(A,t)}}function Ue(A){var t=A[0],e=A[1],i=Math.cos(e);return[i*Math.cos(t),i*Math.sin(t),Math.sin(e)]}function be(A,t){return A[0]*t[0]+A[1]*t[1]+A[2]*t[2]}function Pe(A,t){return[A[1]*t[2]-A[2]*t[1],A[2]*t[0]-A[0]*t[2],A[0]*t[1]-A[1]*t[0]]}function ke(A,t){A[0]+=t[0],A[1]+=t[1],A[2]+=t[2]}function Ge(A,t){return[A[0]*t,A[1]*t,A[2]*t]}function Fe(A){var t=Math.sqrt(A[0]*A[0]+A[1]*A[1]+A[2]*A[2]);A[0]/=t,A[1]/=t,A[2]/=t}function Je(A){return[Math.atan2(A[1],A[0]),PA(A[2])]}function He(A,t){return D(A[0]-t[0])fA?i=90:a<-fA&&(t=-90),s[0]=A,s[1]=e}};function u(n,I){M.push(s=[A=n,e=n]),Ii&&(i=I)}function l(I,r){var o=Ue([I*YA,r*YA]);if(g){var a=Pe(g,o),M=Pe([a[1],-a[0],0],a);Fe(M),M=Je(M);var s=I-n,c=s>0?1:-1,l=M[0]*OA*c,C=D(s)>180;if(C^(c*ni&&(i=T);else if(C^(c*n<(l=(l+360)%360-180)&&li&&(i=r);C?Iy(A,e)&&(e=I):y(I,e)>y(A,e)&&(A=I):e>=A?(Ie&&(e=I)):I>n?y(A,I)>y(A,e)&&(e=I):y(I,e)>y(A,e)&&(A=I)}else u(I,r);g=o,n=I}function C(){c.point=l}function T(){s[0]=A,s[1]=e,c.point=u,g=null}function h(A,t){if(g){var e=A-n;a+=D(e)>180?e+(e>0?360:-360):e}else r=A,o=t;Oe.point(A,t),l(A,t)}function N(){Oe.lineStart()}function d(){h(r,o),Oe.lineEnd(),D(a)>fA&&(A=-(e=180)),s[0]=A,s[1]=e,g=null}function y(A,t){return(t-=A)<0?t+360:t}function E(A,t){return A[0]-t[0]}function j(A,t){return t[0]<=t[1]?t[0]<=A&&A<=t[1]:Ay(C[0],C[1])&&(C[1]=u[1]),y(u[0],C[1])>y(C[0],C[1])&&(C[0]=u[0])):o.push(C=u);for(var g,a,u,l=-1/0,C=(r=0,o[a=o.length-1]);r<=a;C=u,++r)u=o[r],(g=y(C[1],u[0]))>l&&(l=g,A=u[0],e=C[1])}return M=s=null,A===1/0||t===1/0?[[NaN,NaN],[NaN,NaN]]:[[A,t],[e,i]]}}(),I.geo.centroid=function(A){je=Be=xe=pe=Le=fe=ze=we=me=Qe=Se=0,I.geo.stream(A,Re);var t=me,e=Qe,i=Se,n=t*t+e*e+i*i;return n=0;--o)n.point((s=M[o])[0],s[1]);else i(u.x,u.p.x,-1,n);u=u.p}M=(u=u.o).z,l=!l}while(!u.v);n.lineEnd()}}}function Ai(A){if(t=A.length){for(var t,e,i=0,n=A[0];++i=0?1:-1,j=D*E,B=j>wA,x=l*d;if(Ye.add(Math.atan2(x*D*Math.sin(j),C*y+x*Math.cos(j))),I+=B?E+D*mA:E,B^c>=e^h>=e){var p=Pe(Ue(s),Ue(A));Fe(p);var L=Pe(n,p);Fe(L);var f=(B^E>=0?-1:1)*PA(L[2]);(i>f||i===f&&(p[0]||p[1]))&&(r+=B^E>=0?1:-1)}if(!T++)break;c=h,l=d,C=y,s=A}}return(I<-fA||I0){for(d||(r.polygonStart(),d=!0),r.lineStart();++I1&&2&t&&e.push(e.pop().concat(e.shift())),o.push(e.filter(ii))}return M}}function ii(A){return A.length>1}function ni(){var A,t=[];return{lineStart:function(){t.push(A=[])},point:function(t,e){A.push([t,e])},lineEnd:P,buffer:function(){var e=t;return t=[],A=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ii(A,t){return((A=A.x)[0]<0?A[1]-SA-fA:SA-A[1])-((t=t.x)[0]<0?t[1]-SA-fA:SA-t[1])}var ri=ei(qe,(function(A){var t,e=NaN,i=NaN,n=NaN;return{lineStart:function(){A.lineStart(),t=1},point:function(I,r){var o=I>0?wA:-wA,g=D(I-e);D(g-wA)0?SA:-SA),A.point(n,i),A.lineEnd(),A.lineStart(),A.point(o,i),A.point(I,i),t=0):n!==o&&g>=wA&&(D(e-n)fA?Math.atan((Math.sin(t)*(I=Math.cos(i))*Math.sin(e)-Math.sin(i)*(n=Math.cos(t))*Math.sin(A))/(n*I*r)):(t+i)/2}(e,i,I,r),A.point(n,i),A.lineEnd(),A.lineStart(),A.point(o,i),t=0),A.point(e=I,i=r),n=o},lineEnd:function(){A.lineEnd(),e=i=NaN},clean:function(){return 2-t}}}),(function(A,t,e,i){var n;if(null==A)n=e*SA,i.point(-wA,n),i.point(0,n),i.point(wA,n),i.point(wA,0),i.point(wA,-n),i.point(0,-n),i.point(-wA,-n),i.point(-wA,0),i.point(-wA,n);else if(D(A[0]-t[0])>fA){var I=A[0]0)){if(I/=c,c<0){if(I0){if(I>s)return;I>M&&(M=I)}if(I=e-g,c||!(I<0)){if(I/=c,c<0){if(I>s)return;I>M&&(M=I)}else if(c>0){if(I0)){if(I/=u,u<0){if(I0){if(I>s)return;I>M&&(M=I)}if(I=i-a,u||!(I<0)){if(I/=u,u<0){if(I>s)return;I>M&&(M=I)}else if(u>0){if(I0&&(n.a={x:g+M*c,y:a+M*u}),s<1&&(n.b={x:g+s*c,y:a+s*u}),n}}}}}}var gi=1e9;function ai(A,t,e,i){return function(g){var a,M,s,c,u,l,C,T,h,N,d,y=g,E=ni(),D=oi(A,t,e,i),j={point:p,lineStart:function(){j.point=L,M&&M.push(s=[]),N=!0,h=!1,C=T=NaN},lineEnd:function(){a&&(L(c,u),l&&h&&E.rejoin(),a.push(E.buffer())),j.point=p,h&&g.lineEnd()},polygonStart:function(){g=E,a=[],M=[],d=!0},polygonEnd:function(){g=y,a=I.merge(a);var t=function(A){for(var t=0,e=M.length,i=A[1],n=0;ni&&UA(a,I,A)>0&&++t:I[1]<=i&&UA(a,I,A)<0&&--t,a=I;return 0!==t}([A,i]),e=d&&t,n=a.length;(e||n)&&(g.polygonStart(),e&&(g.lineStart(),B(null,null,1,g),g.lineEnd()),n&&$e(a,r,t,B,g),g.polygonEnd()),a=M=s=null}};function B(I,r,g,a){var M=0,s=0;if(null==I||(M=n(I,g))!==(s=n(r,g))||o(I,r)<0^g>0)do{a.point(0===M||3===M?A:e,M>1?i:t)}while((M=(M+g+4)%4)!==s);else a.point(r[0],r[1])}function x(n,I){return A<=n&&n<=e&&t<=I&&I<=i}function p(A,t){x(A,t)&&g.point(A,t)}function L(A,t){var e=x(A=Math.max(-gi,Math.min(gi,A)),t=Math.max(-gi,Math.min(gi,t)));if(M&&s.push([A,t]),N)c=A,u=t,l=e,N=!1,e&&(g.lineStart(),g.point(A,t));else if(e&&h)g.point(A,t);else{var i={a:{x:C,y:T},b:{x:A,y:t}};D(i)?(h||(g.lineStart(),g.point(i.a.x,i.a.y)),g.point(i.b.x,i.b.y),e||g.lineEnd(),d=!1):e&&(g.lineStart(),g.point(A,t),d=!1)}C=A,T=t,h=e}return j};function n(i,n){return D(i[0]-A)0?0:3:D(i[0]-e)0?2:1:D(i[1]-t)0?1:0:n>0?3:2}function r(A,t){return o(A.x,t.x)}function o(A,t){var e=n(A,1),i=n(t,1);return e!==i?e-i:0===e?t[1]-A[1]:1===e?A[0]-t[0]:2===e?A[1]-t[1]:t[0]-A[0]}}function Mi(A){var t=0,e=wA/3,i=Yi(A),n=i(t,e);return n.parallels=function(A){return arguments.length?i(t=A[0]*wA/180,e=A[1]*wA/180):[t/wA*180,e/wA*180]},n}function si(A,t){var e=Math.sin(A),i=(e+Math.sin(t))/2,n=1+e*(2*i-e),I=Math.sqrt(n)/i;function r(A,t){var e=Math.sqrt(n-2*i*Math.sin(t))/i;return[e*Math.sin(A*=i),I-e*Math.cos(A)]}return r.invert=function(A,t){var e=I-t;return[Math.atan2(A,e)/i,PA((n-(A*A+e*e)*i*i)/(2*i))]},r}I.geo.clipExtent=function(){var A,t,e,i,n,I,r={stream:function(A){return n&&(n.valid=!1),(n=I(A)).valid=!0,n},extent:function(o){return arguments.length?(I=ai(A=+o[0][0],t=+o[0][1],e=+o[1][0],i=+o[1][1]),n&&(n.valid=!1,n=null),r):[[A,t],[e,i]]}};return r.extent([[0,0],[960,500]])},(I.geo.conicEqualArea=function(){return Mi(si)}).raw=si,I.geo.albers=function(){return I.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},I.geo.albersUsa=function(){var A,t,e,i,n=I.geo.albers(),r=I.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=I.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),g={point:function(t,e){A=[t,e]}};function a(n){var I=n[0],r=n[1];return A=null,t(I,r),A||(e(I,r),A)||i(I,r),A}return a.invert=function(A){var t=n.scale(),e=n.translate(),i=(A[0]-e[0])/t,I=(A[1]-e[1])/t;return(I>=.12&&I<.234&&i>=-.425&&i<-.214?r:I>=.166&&I<.234&&i>=-.214&&i<-.115?o:n).invert(A)},a.stream=function(A){var t=n.stream(A),e=r.stream(A),i=o.stream(A);return{point:function(A,n){t.point(A,n),e.point(A,n),i.point(A,n)},sphere:function(){t.sphere(),e.sphere(),i.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),i.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),i.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),i.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),i.polygonEnd()}}},a.precision=function(A){return arguments.length?(n.precision(A),r.precision(A),o.precision(A),a):n.precision()},a.scale=function(A){return arguments.length?(n.scale(A),r.scale(.35*A),o.scale(A),a.translate(n.translate())):n.scale()},a.translate=function(A){if(!arguments.length)return n.translate();var I=n.scale(),M=+A[0],s=+A[1];return t=n.translate(A).clipExtent([[M-.455*I,s-.238*I],[M+.455*I,s+.238*I]]).stream(g).point,e=r.translate([M-.307*I,s+.201*I]).clipExtent([[M-.425*I+fA,s+.12*I+fA],[M-.214*I-fA,s+.234*I-fA]]).stream(g).point,i=o.translate([M-.205*I,s+.212*I]).clipExtent([[M-.214*I+fA,s+.166*I+fA],[M-.115*I-fA,s+.234*I-fA]]).stream(g).point,a},a.scale(1070)};var ci,ui,li,Ci,Ti,hi,Ni={point:P,lineStart:P,lineEnd:P,polygonStart:function(){ui=0,Ni.lineStart=di},polygonEnd:function(){Ni.lineStart=Ni.lineEnd=Ni.point=P,ci+=D(ui/2)}};function di(){var A,t,e,i;function n(A,t){ui+=i*A-e*t,e=A,i=t}Ni.point=function(I,r){Ni.point=n,A=e=I,t=i=r},Ni.lineEnd=function(){n(A,t)}}var yi={point:function(A,t){ATi&&(Ti=A),thi&&(hi=t)},lineStart:P,lineEnd:P,polygonStart:P,polygonEnd:P};function Ei(){var A=Di(4.5),t=[],e={point:i,lineStart:function(){e.point=n},lineEnd:r,polygonStart:function(){e.lineEnd=o},polygonEnd:function(){e.lineEnd=r,e.point=i},pointRadius:function(t){return A=Di(t),e},result:function(){if(t.length){var A=t.join("");return t=[],A}}};function i(e,i){t.push("M",e,",",i,A)}function n(A,i){t.push("M",A,",",i),e.point=I}function I(A,e){t.push("L",A,",",e)}function r(){e.point=i}function o(){t.push("Z")}return e}function Di(A){return"m0,"+A+"a"+A+","+A+" 0 1,1 0,"+-2*A+"a"+A+","+A+" 0 1,1 0,"+2*A+"z"}var ji,Bi={point:xi,lineStart:pi,lineEnd:Li,polygonStart:function(){Bi.lineStart=fi},polygonEnd:function(){Bi.point=xi,Bi.lineStart=pi,Bi.lineEnd=Li}};function xi(A,t){xe+=A,pe+=t,++Le}function pi(){var A,t;function e(e,i){var n=e-A,I=i-t,r=Math.sqrt(n*n+I*I);fe+=r*(A+e)/2,ze+=r*(t+i)/2,we+=r,xi(A=e,t=i)}Bi.point=function(i,n){Bi.point=e,xi(A=i,t=n)}}function Li(){Bi.point=xi}function fi(){var A,t,e,i;function n(A,t){var n=A-e,I=t-i,r=Math.sqrt(n*n+I*I);fe+=r*(e+A)/2,ze+=r*(i+t)/2,we+=r,me+=(r=i*A-e*t)*(e+A),Qe+=r*(i+t),Se+=3*r,xi(e=A,i=t)}Bi.point=function(I,r){Bi.point=n,xi(A=e=I,t=i=r)},Bi.lineEnd=function(){n(A,t)}}function zi(A){var t=4.5,e={point:i,lineStart:function(){e.point=n},lineEnd:r,polygonStart:function(){e.lineEnd=o},polygonEnd:function(){e.lineEnd=r,e.point=i},pointRadius:function(A){return t=A,e},result:P};function i(e,i){A.moveTo(e+t,i),A.arc(e,i,t,0,mA)}function n(t,i){A.moveTo(t,i),e.point=I}function I(t,e){A.lineTo(t,e)}function r(){e.point=i}function o(){A.closePath()}return e}function wi(A){var t=.5,e=Math.cos(30*YA),i=16;function n(A){return(i?r:I)(A)}function I(t){return Qi(t,(function(e,i){e=A(e,i),t.point(e[0],e[1])}))}function r(t){var e,n,I,r,g,a,M,s,c,u,l,C,T={point:h,lineStart:N,lineEnd:y,polygonStart:function(){t.polygonStart(),T.lineStart=E},polygonEnd:function(){t.polygonEnd(),T.lineStart=N}};function h(e,i){e=A(e,i),t.point(e[0],e[1])}function N(){s=NaN,T.point=d,t.lineStart()}function d(e,n){var I=Ue([e,n]),r=A(e,n);o(s,c,M,u,l,C,s=r[0],c=r[1],M=e,u=I[0],l=I[1],C=I[2],i,t),t.point(s,c)}function y(){T.point=h,t.lineEnd()}function E(){N(),T.point=D,T.lineEnd=j}function D(A,t){d(e=A,t),n=s,I=c,r=u,g=l,a=C,T.point=d}function j(){o(s,c,M,u,l,C,n,I,e,r,g,a,i,t),T.lineEnd=y,y()}return T}function o(i,n,I,r,g,a,M,s,c,u,l,C,T,h){var N=M-i,d=s-n,y=N*N+d*d;if(y>4*t&&T--){var E=r+u,j=g+l,B=a+C,x=Math.sqrt(E*E+j*j+B*B),p=Math.asin(B/=x),L=D(D(B)-1)t||D((N*m+d*Q)/y-.5)>.3||r*u+g*l+a*C0&&16,n):Math.sqrt(t)},n}function mi(A){this.stream=A}function Qi(A,t){return{point:t,sphere:function(){A.sphere()},lineStart:function(){A.lineStart()},lineEnd:function(){A.lineEnd()},polygonStart:function(){A.polygonStart()},polygonEnd:function(){A.polygonEnd()}}}function Si(A){return Yi((function(){return A}))()}function Yi(A){var t,e,i,n,r,o,g=wi((function(A,e){return[(A=t(A,e))[0]*a+n,r-A[1]*a]})),a=150,M=480,s=250,c=0,u=0,l=0,C=0,T=0,h=ri,N=O,d=null,y=null;function E(A){return[(A=i(A[0]*YA,A[1]*YA))[0]*a+n,r-A[1]*a]}function j(A){return(A=i.invert((A[0]-n)/a,(r-A[1])/a))&&[A[0]*OA,A[1]*OA]}function B(){i=_e(e=bi(l,C,T),t);var A=t(c,u);return n=M-A[0]*a,r=s+A[1]*a,x()}function x(){return o&&(o.valid=!1,o=null),E}return E.stream=function(A){return o&&(o.valid=!1),(o=Oi(h(e,g(N(A))))).valid=!0,o},E.clipAngle=function(A){return arguments.length?(h=null==A?(d=A,ri):function(A){var t=Math.cos(A),e=t>0,i=D(t)>fA;return ei(n,(function(A){var t,o,g,a,M;return{lineStart:function(){a=g=!1,M=1},point:function(s,c){var u,l=[s,c],C=n(s,c),T=e?C?0:r(s,c):C?r(s+(s<0?wA:-wA),c):0;if(!t&&(a=g=C)&&A.lineStart(),C!==g&&(u=I(t,l),(He(t,u)||He(l,u))&&(l[0]+=fA,l[1]+=fA,C=n(l[0],l[1]))),C!==g)M=0,C?(A.lineStart(),u=I(l,t),A.point(u[0],u[1])):(u=I(t,l),A.point(u[0],u[1]),A.lineEnd()),t=u;else if(i&&t&&e^C){var h;T&o||!(h=I(l,t,!0))||(M=0,e?(A.lineStart(),A.point(h[0][0],h[0][1]),A.point(h[1][0],h[1][1]),A.lineEnd()):(A.point(h[1][0],h[1][1]),A.lineEnd(),A.lineStart(),A.point(h[0][0],h[0][1])))}!C||t&&He(t,l)||A.point(l[0],l[1]),t=l,g=C,o=T},lineEnd:function(){g&&A.lineEnd(),t=null},clean:function(){return M|(a&&g)<<1}}}),Fi(A,6*YA),e?[0,-A]:[-wA,A-wA]);function n(A,e){return Math.cos(A)*Math.cos(e)>t}function I(A,e,i){var n=[1,0,0],I=Pe(Ue(A),Ue(e)),r=be(I,I),o=I[0],g=r-o*o;if(!g)return!i&&A;var a=t*r/g,M=-t*o/g,s=Pe(n,I),c=Ge(n,a);ke(c,Ge(I,M));var u=s,l=be(c,u),C=be(u,u),T=l*l-C*(be(c,c)-1);if(!(T<0)){var h=Math.sqrt(T),N=Ge(u,(-l-h)/C);if(ke(N,c),N=Je(N),!i)return N;var d,y=A[0],E=e[0],j=A[1],B=e[1];E0^N[1]<(D(N[0]-y)wA^(y<=N[0]&&N[0]<=E)){var L=Ge(u,(-l+h)/C);return ke(L,c),[N,Je(L)]}}}function r(t,i){var n=e?A:wA-A,I=0;return t<-n?I|=1:t>n&&(I|=2),i<-n?I|=4:i>n&&(I|=8),I}}((d=+A)*YA),x()):d},E.clipExtent=function(A){return arguments.length?(y=A,N=A?ai(A[0][0],A[0][1],A[1][0],A[1][1]):O,x()):y},E.scale=function(A){return arguments.length?(a=+A,B()):a},E.translate=function(A){return arguments.length?(M=+A[0],s=+A[1],B()):[M,s]},E.center=function(A){return arguments.length?(c=A[0]%360*YA,u=A[1]%360*YA,B()):[c*OA,u*OA]},E.rotate=function(A){return arguments.length?(l=A[0]%360*YA,C=A[1]%360*YA,T=A.length>2?A[2]%360*YA:0,B()):[l*OA,C*OA,T*OA]},I.rebind(E,g,"precision"),function(){return t=A.apply(this,arguments),E.invert=t.invert&&j,B()}}function Oi(A){return Qi(A,(function(t,e){A.point(t*YA,e*YA)}))}function vi(A,t){return[A,t]}function Ui(A,t){return[A>wA?A-mA:A<-wA?A+mA:A,t]}function bi(A,t,e){return A?t||e?_e(ki(A),Gi(t,e)):ki(A):t||e?Gi(t,e):Ui}function Pi(A){return function(t,e){return[(t+=A)>wA?t-mA:t<-wA?t+mA:t,e]}}function ki(A){var t=Pi(A);return t.invert=Pi(-A),t}function Gi(A,t){var e=Math.cos(A),i=Math.sin(A),n=Math.cos(t),I=Math.sin(t);function r(A,t){var r=Math.cos(t),o=Math.cos(A)*r,g=Math.sin(A)*r,a=Math.sin(t),M=a*e+o*i;return[Math.atan2(g*n-M*I,o*e-a*i),PA(M*n+g*I)]}return r.invert=function(A,t){var r=Math.cos(t),o=Math.cos(A)*r,g=Math.sin(A)*r,a=Math.sin(t),M=a*n-g*I;return[Math.atan2(g*n+a*I,o*e+M*i),PA(M*e-o*i)]},r}function Fi(A,t){var e=Math.cos(A),i=Math.sin(A);return function(n,I,r,o){var g=r*t;null!=n?(n=Ji(e,n),I=Ji(e,I),(r>0?nI)&&(n+=r*mA)):(n=A+r*mA,I=A-.5*g);for(var a,M=n;r>0?M>I:M2?A[2]*YA:0),t.invert=function(t){return(t=A.invert(t[0]*YA,t[1]*YA))[0]*=OA,t[1]*=OA,t},t},Ui.invert=vi,I.geo.circle=function(){var A,t,e=[0,0],i=6;function n(){var A="function"==typeof e?e.apply(this,arguments):e,i=bi(-A[0]*YA,-A[1]*YA,0).invert,n=[];return t(null,null,1,{point:function(A,t){n.push(A=i(A,t)),A[0]*=OA,A[1]*=OA}}),{type:"Polygon",coordinates:[n]}}return n.origin=function(A){return arguments.length?(e=A,n):e},n.angle=function(e){return arguments.length?(t=Fi((A=+e)*YA,i*YA),n):A},n.precision=function(e){return arguments.length?(t=Fi(A*YA,(i=+e)*YA),n):i},n.angle(90)},I.geo.distance=function(A,t){var e,i=(t[0]-A[0])*YA,n=A[1]*YA,I=t[1]*YA,r=Math.sin(i),o=Math.cos(i),g=Math.sin(n),a=Math.cos(n),M=Math.sin(I),s=Math.cos(I);return Math.atan2(Math.sqrt((e=s*r)*e+(e=a*M-g*s*o)*e),g*M+a*s*o)},I.geo.graticule=function(){var A,t,e,i,n,r,o,g,a,M,s,c,u=10,l=u,C=90,T=360,h=2.5;function N(){return{type:"MultiLineString",coordinates:d()}}function d(){return I.range(Math.ceil(i/C)*C,e,C).map(s).concat(I.range(Math.ceil(g/T)*T,o,T).map(c)).concat(I.range(Math.ceil(t/u)*u,A,u).filter((function(A){return D(A%C)>fA})).map(a)).concat(I.range(Math.ceil(r/l)*l,n,l).filter((function(A){return D(A%T)>fA})).map(M))}return N.lines=function(){return d().map((function(A){return{type:"LineString",coordinates:A}}))},N.outline=function(){return{type:"Polygon",coordinates:[s(i).concat(c(o).slice(1),s(e).reverse().slice(1),c(g).reverse().slice(1))]}},N.extent=function(A){return arguments.length?N.majorExtent(A).minorExtent(A):N.minorExtent()},N.majorExtent=function(A){return arguments.length?(i=+A[0][0],e=+A[1][0],g=+A[0][1],o=+A[1][1],i>e&&(A=i,i=e,e=A),g>o&&(A=g,g=o,o=A),N.precision(h)):[[i,g],[e,o]]},N.minorExtent=function(e){return arguments.length?(t=+e[0][0],A=+e[1][0],r=+e[0][1],n=+e[1][1],t>A&&(e=t,t=A,A=e),r>n&&(e=r,r=n,n=e),N.precision(h)):[[t,r],[A,n]]},N.step=function(A){return arguments.length?N.majorStep(A).minorStep(A):N.minorStep()},N.majorStep=function(A){return arguments.length?(C=+A[0],T=+A[1],N):[C,T]},N.minorStep=function(A){return arguments.length?(u=+A[0],l=+A[1],N):[u,l]},N.precision=function(I){return arguments.length?(h=+I,a=Hi(r,n,90),M=Ri(t,A,h),s=Hi(g,o,90),c=Ri(i,e,h),N):h},N.majorExtent([[-180,-90+fA],[180,90-fA]]).minorExtent([[-180,-80-fA],[180,80+fA]])},I.geo.greatArc=function(){var A,t,e=Xi,i=Vi;function n(){return{type:"LineString",coordinates:[A||e.apply(this,arguments),t||i.apply(this,arguments)]}}return n.distance=function(){return I.geo.distance(A||e.apply(this,arguments),t||i.apply(this,arguments))},n.source=function(t){return arguments.length?(e=t,A="function"==typeof t?null:t,n):e},n.target=function(A){return arguments.length?(i=A,t="function"==typeof A?null:A,n):i},n.precision=function(){return arguments.length?n:0},n},I.geo.interpolate=function(A,t){return e=A[0]*YA,i=A[1]*YA,n=t[0]*YA,I=t[1]*YA,r=Math.cos(i),o=Math.sin(i),g=Math.cos(I),a=Math.sin(I),M=r*Math.cos(e),s=r*Math.sin(e),c=g*Math.cos(n),u=g*Math.sin(n),l=2*Math.asin(Math.sqrt(GA(I-i)+r*g*GA(n-e))),C=1/Math.sin(l),(T=l?function(A){var t=Math.sin(A*=l)*C,e=Math.sin(l-A)*C,i=e*M+t*c,n=e*s+t*u,I=e*o+t*a;return[Math.atan2(n,i)*OA,Math.atan2(I,Math.sqrt(i*i+n*n))*OA]}:function(){return[e*OA,i*OA]}).distance=l,T;var e,i,n,I,r,o,g,a,M,s,c,u,l,C,T},I.geo.length=function(A){return ji=0,I.geo.stream(A,Wi),ji};var Wi={sphere:P,point:P,lineStart:function(){var A,t,e;function i(i,n){var I=Math.sin(n*=YA),r=Math.cos(n),o=D((i*=YA)-A),g=Math.cos(o);ji+=Math.atan2(Math.sqrt((o=r*Math.sin(o))*o+(o=e*I-t*r*g)*o),t*I+e*r*g),A=i,t=I,e=r}Wi.point=function(n,I){A=n*YA,t=Math.sin(I*=YA),e=Math.cos(I),Wi.point=i},Wi.lineEnd=function(){Wi.point=Wi.lineEnd=P}},lineEnd:P,polygonStart:P,polygonEnd:P};function Zi(A,t){function e(t,e){var i=Math.cos(t),n=Math.cos(e),I=A(i*n);return[I*n*Math.sin(t),I*Math.sin(e)]}return e.invert=function(A,e){var i=Math.sqrt(A*A+e*e),n=t(i),I=Math.sin(n),r=Math.cos(n);return[Math.atan2(A*I,i*r),Math.asin(i&&e*I/i)]},e}var Ki=Zi((function(A){return Math.sqrt(2/(1+A))}),(function(A){return 2*Math.asin(A/2)}));(I.geo.azimuthalEqualArea=function(){return Si(Ki)}).raw=Ki;var _i=Zi((function(A){var t=Math.acos(A);return t&&t/Math.sin(t)}),O);function qi(A,t){var e=Math.cos(A),i=function(A){return Math.tan(wA/4+A/2)},n=A===t?Math.sin(A):Math.log(e/Math.cos(t))/Math.log(i(t)/i(A)),I=e*Math.pow(i(A),n)/n;if(!n)return tn;function r(A,t){I>0?t<-SA+fA&&(t=-SA+fA):t>SA-fA&&(t=SA-fA);var e=I/Math.pow(i(t),n);return[e*Math.sin(n*A),I-e*Math.cos(n*A)]}return r.invert=function(A,t){var e=I-t,i=vA(n)*Math.sqrt(A*A+e*e);return[Math.atan2(A,e)/n,2*Math.atan(Math.pow(I/i,1/n))-SA]},r}function $i(A,t){var e=Math.cos(A),i=A===t?Math.sin(A):(e-Math.cos(t))/(t-A),n=e/i+A;if(D(i)1&&UA(A[e[i-2]],A[e[i-1]],A[n])<=0;)--i;e[i++]=n}return e.slice(0,i)}function Mn(A,t){return A[0]-t[0]||A[1]-t[1]}(I.geo.stereographic=function(){return Si(In)}).raw=In,rn.invert=function(A,t){return[-t,2*Math.atan(Math.exp(A))-SA]},(I.geo.transverseMercator=function(){var A=en(rn),t=A.center,e=A.rotate;return A.center=function(A){return A?t([-A[1],A[0]]):[(A=t())[1],-A[0]]},A.rotate=function(A){return A?e([A[0],A[1],A.length>2?A[2]+90:90]):[(A=e())[0],A[1],A[2]-90]},e([0,0,90])}).raw=rn,I.geom={},I.geom.hull=function(A){var t=on,e=gn;if(arguments.length)return i(A);function i(A){if(A.length<3)return[];var i,n=yt(t),I=yt(e),r=A.length,o=[],g=[];for(i=0;i=0;--i)u.push(A[o[a[i]][2]]);for(i=+s;ifA)o=o.L;else{if(!((n=I-fn(o,r))>fA)){i>-fA?(t=o.P,e=o):n>-fA?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var g=jn(A);if(hn.insert(t,g),t||e){if(t===e)return Sn(t),e=jn(t.site),hn.insert(g,e),g.edge=e.edge=vn(t.site,g.site),Qn(t),void Qn(e);if(e){Sn(t),Sn(e);var a=t.site,M=a.x,s=a.y,c=A.x-M,u=A.y-s,l=e.site,C=l.x-M,T=l.y-s,h=2*(c*T-u*C),N=c*c+u*u,d=C*C+T*T,y={x:(T*N-u*d)/h+M,y:(c*d-C*N)/h+s};Un(e.edge,a,l,y),g.edge=vn(a,A,null,y),e.edge=vn(A,l,null,y),Qn(t),Qn(e)}else g.edge=vn(t.site,g.site)}}function Ln(A,t){var e=A.site,i=e.x,n=e.y,I=n-t;if(!I)return i;var r=A.P;if(!r)return-1/0;var o=(e=r.site).x,g=e.y,a=g-t;if(!a)return o;var M=o-i,s=1/I-1/a,c=M/a;return s?(-c+Math.sqrt(c*c-2*s*(M*M/(-2*a)-g+a/2+n-I/2)))/s+i:(i+o)/2}function fn(A,t){var e=A.N;if(e)return Ln(e,t);var i=A.site;return i.y===t?i.x:1/0}function zn(A){this.site=A,this.edges=[]}function wn(A,t){return t.angle-A.angle}function mn(){kn(this),this.x=this.y=this.arc=this.site=this.cy=null}function Qn(A){var t=A.P,e=A.N;if(t&&e){var i=t.site,n=A.site,I=e.site;if(i!==I){var r=n.x,o=n.y,g=i.x-r,a=i.y-o,M=I.x-r,s=2*(g*(T=I.y-o)-a*M);if(!(s>=-zA)){var c=g*g+a*a,u=M*M+T*T,l=(T*c-a*u)/s,C=(g*u-M*c)/s,T=C+o,h=En.pop()||new mn;h.arc=A,h.site=n,h.x=l+r,h.y=T+Math.sqrt(l*l+C*C),h.cy=T,A.circle=h;for(var N=null,d=dn._;d;)if(h.y=o)return;if(c>l){if(I){if(I.y>=a)return}else I={x:T,y:g};e={x:T,y:a}}else{if(I){if(I.y1)if(c>l){if(I){if(I.y>=a)return}else I={x:(g-n)/i,y:g};e={x:(a-n)/i,y:a}}else{if(I){if(I.y=o)return}else I={x:r,y:i*r+n};e={x:o,y:i*o+n}}else{if(I){if(I.xfA||D(n-e)>fA)&&(o.splice(r,0,new bn((h=I.site,N=M,d=D(i-s)fA?{x:s,y:D(t-s)fA?{x:D(e-l)fA?{x:c,y:D(t-c)fA?{x:D(e-u)=e&&a.x<=n&&a.y>=i&&a.y<=r?[[e,r],[n,r],[n,i],[e,i]]:[]).point=A[o]})),t}function o(A){return A.map((function(A,t){return{x:Math.round(i(A,t)/fA)*fA,y:Math.round(n(A,t)/fA)*fA,i:t}}))}return r.links=function(A){return Hn(o(A)).edges.filter((function(A){return A.l&&A.r})).map((function(t){return{source:A[t.l.i],target:A[t.r.i]}}))},r.triangles=function(A){var t=[];return Hn(o(A)).cells.forEach((function(e,i){for(var n,I,r,o,g=e.site,a=e.edges.sort(wn),M=-1,s=a.length,c=a[s-1].edge,u=c.l===g?c.r:c.l;++MI&&(n=t.slice(I,n),o[r]?o[r]+=n:o[++r]=n),(e=e[0])===(i=i[0])?o[r]?o[r]+=i:o[++r]=i:(o[++r]=null,g.push({i:r,x:qn(e,i)})),I=tI.lastIndex;return IC&&(C=g.x),g.y>T&&(T=g.y),a.push(g.x),M.push(g.y);else for(s=0;sC&&(C=d),y>T&&(T=y),a.push(d),M.push(y)}var E=C-u,j=T-l;function B(A,t,e,i,n,I,r,o){if(!isNaN(e)&&!isNaN(i))if(A.leaf){var g=A.x,a=A.y;if(null!=g)if(D(g-e)+D(a-i)<.01)x(A,t,e,i,n,I,r,o);else{var M=A.point;A.x=A.y=A.point=null,x(A,M,g,a,n,I,r,o),x(A,t,e,i,n,I,r,o)}else A.x=e,A.y=i,A.point=t}else x(A,t,e,i,n,I,r,o)}function x(A,t,e,i,n,I,r,o){var g=.5*(n+r),a=.5*(I+o),M=e>=g,s=i>=a,c=s<<1|M;A.leaf=!1,M?n=g:r=g,s?I=a:o=a,B(A=A.nodes[c]||(A.nodes[c]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,e,i,n,I,r,o)}E>j?T=l+E:C=u+j;var p={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(A){B(p,A,+h(A,++s),+N(A,s),u,l,C,T)}};if(p.visit=function(A){Zn(A,p,u,l,C,T)},p.find=function(A){return function(A,t,e,i,n,I,r){var o,g=1/0;return function A(a,M,s,c,u){if(!(M>I||s>r||c=E)<<1|t>=y,j=D+4;D=0&&!(e=I.interpolators[i](A,t)););return e}function iI(A,t){var e,i=[],n=[],I=A.length,r=t.length,o=Math.min(A.length,t.length);for(e=0;e=1)return 1;var t=A*A,e=t*A;return 4*(A<.5?e:3*(A-t)+e-.75)}function cI(A){return 1-Math.cos(A*SA)}function uI(A){return Math.pow(2,10*(A-1))}function lI(A){return 1-Math.sqrt(1-A*A)}function CI(A){return A<1/2.75?7.5625*A*A:A<2/2.75?7.5625*(A-=1.5/2.75)*A+.75:A<2.5/2.75?7.5625*(A-=2.25/2.75)*A+.9375:7.5625*(A-=2.625/2.75)*A+.984375}function TI(A,t){return t-=A,function(e){return Math.round(A+t*e)}}function hI(A){var t,e,i,n=[A.a,A.b],I=[A.c,A.d],r=dI(n),o=NI(n,I),g=dI(((t=I)[0]+=(i=-o)*(e=n)[0],t[1]+=i*e[1],t))||0;n[0]*I[1]=0?A.slice(0,e):A,n=e>=0?A.slice(e+1):"in";return i=II.get(i)||nI,n=rI.get(n)||O,t=n(i.apply(null,r.call(arguments,1))),function(A){return A<=0?0:A>=1?1:t(A)}},I.interpolateHcl=function(A,t){A=I.hcl(A),t=I.hcl(t);var e=A.h,i=A.c,n=A.l,r=t.h-e,o=t.c-i,g=t.l-n;return isNaN(o)&&(o=0,i=isNaN(i)?t.c:i),isNaN(r)?(r=0,e=isNaN(e)?t.h:e):r>180?r-=360:r<-180&&(r+=360),function(A){return qA(e+r*A,i+o*A,n+g*A)+""}},I.interpolateHsl=function(A,t){A=I.hsl(A),t=I.hsl(t);var e=A.h,i=A.s,n=A.l,r=t.h-e,o=t.s-i,g=t.l-n;return isNaN(o)&&(o=0,i=isNaN(i)?t.s:i),isNaN(r)?(r=0,e=isNaN(e)?t.h:e):r>180?r-=360:r<-180&&(r+=360),function(A){return ZA(e+r*A,i+o*A,n+g*A)+""}},I.interpolateLab=function(A,t){A=I.lab(A),t=I.lab(t);var e=A.l,i=A.a,n=A.b,r=t.l-e,o=t.a-i,g=t.b-n;return function(A){return It(e+r*A,i+o*A,n+g*A)+""}},I.interpolateRound=TI,I.transform=function(A){var t=g.createElementNS(I.ns.prefix.svg,"g");return(I.transform=function(A){if(null!=A){t.setAttribute("transform",A);var e=t.transform.baseVal.consolidate()}return new hI(e?e.matrix:yI)})(A)},hI.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var yI={a:1,b:0,c:0,d:1,e:0,f:0};function EI(A){return A.length?A.pop()+",":""}function DI(A,t){var e=[],i=[];return A=I.transform(A),t=I.transform(t),function(A,t,e,i){if(A[0]!==t[0]||A[1]!==t[1]){var n=e.push("translate(",null,",",null,")");i.push({i:n-4,x:qn(A[0],t[0])},{i:n-2,x:qn(A[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}(A.translate,t.translate,e,i),function(A,t,e,i){A!==t?(A-t>180?t+=360:t-A>180&&(A+=360),i.push({i:e.push(EI(e)+"rotate(",null,")")-2,x:qn(A,t)})):t&&e.push(EI(e)+"rotate("+t+")")}(A.rotate,t.rotate,e,i),function(A,t,e,i){A!==t?i.push({i:e.push(EI(e)+"skewX(",null,")")-2,x:qn(A,t)}):t&&e.push(EI(e)+"skewX("+t+")")}(A.skew,t.skew,e,i),function(A,t,e,i){if(A[0]!==t[0]||A[1]!==t[1]){var n=e.push(EI(e)+"scale(",null,",",null,")");i.push({i:n-4,x:qn(A[0],t[0])},{i:n-2,x:qn(A[1],t[1])})}else 1===t[0]&&1===t[1]||e.push(EI(e)+"scale("+t+")")}(A.scale,t.scale,e,i),A=t=null,function(A){for(var t,n=-1,I=i.length;++n0?e=t:(A.c=null,A.t=NaN,A=null,g.end({type:"end",alpha:e=0})):t>0&&(g.start({type:"start",alpha:e=t}),A=ft(o.tick)),o):e},o.start=function(){var A,t,e,I=h.length,g=N.length,M=a[0],l=a[1];for(A=0;A=0;)e.push(n[i])}function UI(A,t){for(var e=[A],i=[];null!=(A=e.pop());)if(i.push(A),(I=A.children)&&(n=I.length))for(var n,I,r=-1;++r=0;)r.push(M=a[g]),M.parent=I,M.depth=I.depth+1;e&&(I.value=0),I.children=a}else e&&(I.value=+e.call(i,I,I.depth)||0),delete I.children;return UI(n,(function(t){var i,n;A&&(i=t.children)&&i.sort(A),e&&(n=t.parent)&&(n.value+=t.value)})),o}return i.sort=function(t){return arguments.length?(A=t,i):A},i.children=function(A){return arguments.length?(t=A,i):t},i.value=function(A){return arguments.length?(e=A,i):e},i.revalue=function(A){return e&&(vI(A,(function(A){A.children&&(A.value=0)})),UI(A,(function(A){var t;A.children||(A.value=+e.call(i,A,A.depth)||0),(t=A.parent)&&(t.value+=A.value)}))),A},i},I.layout.partition=function(){var A=I.layout.hierarchy(),t=[1,1];function e(A,t,i,n){var I=A.children;if(A.x=t,A.y=A.depth*n,A.dx=i,A.dy=n,I&&(r=I.length)){var r,o,g,a=-1;for(i=A.value?i/A.value:0;++ao&&(o=i),r.push(i)}for(e=0;en&&(i=e,n=t);return i}function _I(A){return A.reduce(qI,0)}function qI(A,t){return A+t[1]}function $I(A,t){return Ar(A,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Ar(A,t){for(var e=-1,i=+A[0],n=(A[1]-i)/t,I=[];++e<=t;)I[e]=n*e+i;return I}function tr(A){return[I.min(A),I.max(A)]}function er(A,t){return A.value-t.value}function ir(A,t){var e=A._pack_next;A._pack_next=t,t._pack_prev=A,t._pack_next=e,e._pack_prev=t}function nr(A,t){A._pack_next=t,t._pack_prev=A}function Ir(A,t){var e=t.x-A.x,i=t.y-A.y,n=A.r+t.r;return.999*n*n>e*e+i*i}function rr(A){if((t=A.children)&&(g=t.length)){var t,e,i,n,I,r,o,g,a=1/0,M=-1/0,s=1/0,c=-1/0;if(t.forEach(or),(e=t[0]).x=-e.r,e.y=0,d(e),g>1&&((i=t[1]).x=i.r,i.y=0,d(i),g>2))for(Mr(e,i,n=t[2]),d(n),ir(e,n),e._pack_prev=n,ir(n,i),i=e._pack_next,I=3;I0)for(r=-1;++r=s[0]&&g<=s[1]&&((o=a[I.bisect(c,g,1,l)-1]).y+=C,o.push(n[r]));return a}return n.value=function(A){return arguments.length?(t=A,n):t},n.range=function(A){return arguments.length?(e=yt(A),n):e},n.bins=function(A){return arguments.length?(i="number"==typeof A?function(t){return Ar(t,A)}:yt(A),n):i},n.frequency=function(t){return arguments.length?(A=!!t,n):A},n},I.layout.pack=function(){var A,t=I.layout.hierarchy().sort(er),e=0,i=[1,1];function n(n,I){var r=t.call(this,n,I),o=r[0],g=i[0],a=i[1],M=null==A?Math.sqrt:"function"==typeof A?A:function(){return A};if(o.x=o.y=0,UI(o,(function(A){A.r=+M(A.value)})),UI(o,rr),e){var s=e*(A?1:Math.max(2*o.r/g,2*o.r/a))/2;UI(o,(function(A){A.r+=s})),UI(o,rr),UI(o,(function(A){A.r-=s}))}return ar(o,g/2,a/2,A?1:1/Math.max(2*o.r/g,2*o.r/a)),r}return n.size=function(A){return arguments.length?(i=A,n):i},n.radius=function(t){return arguments.length?(A=null==t||"function"==typeof t?t:+t,n):A},n.padding=function(A){return arguments.length?(e=+A,n):e},OI(n,t)},I.layout.tree=function(){var A=I.layout.hierarchy().sort(null).value(null),t=sr,e=[1,1],i=null;function n(n,I){var a=A.call(this,n,I),M=a[0],s=function(A){for(var t,e={A:null,children:[A]},i=[e];null!=(t=i.pop());)for(var n,I=t.children,r=0,o=I.length;ru.x&&(u=A),A.depth>l.depth&&(l=A)}));var C=t(c,u)/2-c.x,T=e[0]/(u.x+t(u,c)/2+C),h=e[1]/(l.depth||1);vI(M,(function(A){A.x=(A.x+C)*T,A.y=A.depth*h}))}return a}function r(A){var e=A.children,i=A.parent.children,n=A.i?i[A.i-1]:null;if(e.length){!function(A){for(var t,e=0,i=0,n=A.children,I=n.length;--I>=0;)(t=n[I]).z+=e,t.m+=e,e+=t.s+(i+=t.c)}(A);var I=(e[0].z+e[e.length-1].z)/2;n?(A.z=n.z+t(A._,n._),A.m=A.z-I):A.z=I}else n&&(A.z=n.z+t(A._,n._));A.parent.A=function(A,e,i){if(e){for(var n,I=A,r=A,o=e,g=I.parent.children[0],a=I.m,M=r.m,s=o.m,c=g.m;o=ur(o),I=cr(I),o&&I;)g=cr(g),(r=ur(r)).a=A,(n=o.z+s-I.z-a+t(o._,I._))>0&&(lr(Cr(o,A,i),A,n),a+=n,M+=n),s+=o.m,a+=I.m,c+=g.m,M+=r.m;o&&!ur(r)&&(r.t=o,r.m+=s-M),I&&!cr(g)&&(g.t=I,g.m+=a-c,i=A)}return i}(A,n,A.parent.A||i[0])}function o(A){A._.x=A.z+A.parent.m,A.m+=A.parent.m}function g(A){A.x*=e[0],A.y=A.depth*e[1]}return n.separation=function(A){return arguments.length?(t=A,n):t},n.size=function(A){return arguments.length?(i=null==(e=A)?g:null,n):i?null:e},n.nodeSize=function(A){return arguments.length?(i=null==(e=A)?null:g,n):i?e:null},OI(n,A)},I.layout.cluster=function(){var A=I.layout.hierarchy().sort(null).value(null),t=sr,e=[1,1],i=!1;function n(n,r){var o,g=A.call(this,n,r),a=g[0],M=0;UI(a,(function(A){var e=A.children;e&&e.length?(A.x=function(A){return A.reduce((function(A,t){return A+t.x}),0)/A.length}(e),A.y=function(A){return 1+I.max(A,(function(A){return A.y}))}(e)):(A.x=o?M+=t(A,o):0,A.y=0,o=A)}));var s=Tr(a),c=hr(a),u=s.x-t(s,c)/2,l=c.x+t(c,s)/2;return UI(a,i?function(A){A.x=(A.x-a.x)*e[0],A.y=(a.y-A.y)*e[1]}:function(A){A.x=(A.x-u)/(l-u)*e[0],A.y=(1-(a.y?A.y/a.y:1))*e[1]}),g}return n.separation=function(A){return arguments.length?(t=A,n):t},n.size=function(A){return arguments.length?(i=null==(e=A),n):i?null:e},n.nodeSize=function(A){return arguments.length?(i=null!=(e=A),n):i?e:null},OI(n,A)},I.layout.treemap=function(){var A,t=I.layout.hierarchy(),e=Math.round,i=[1,1],n=null,r=Nr,o=!1,g="squarify",a=.5*(1+Math.sqrt(5));function M(A,t){for(var e,i,n=-1,I=A.length;++n0;)o.push(e=a[n-1]),o.area+=e.area,"squarify"!==g||(i=u(o,C))<=c?(a.pop(),c=i):(o.area-=o.pop().area,l(o,C,I,!1),C=Math.min(I.dx,I.dy),o.length=o.area=0,c=1/0);o.length&&(l(o,C,I,!0),o.length=o.area=0),t.forEach(s)}}function c(A){var t=A.children;if(t&&t.length){var e,i=r(A),n=t.slice(),I=[];for(M(n,i.dx*i.dy/A.value),I.area=0;e=n.pop();)I.push(e),I.area+=e.area,null!=e.z&&(l(I,e.z?i.dx:i.dy,i,!n.length),I.length=I.area=0);t.forEach(c)}}function u(A,t){for(var e,i=A.area,n=0,I=1/0,r=-1,o=A.length;++rn&&(n=e));return t*=t,(i*=i)?Math.max(t*n*a/i,i/(t*I*a)):1/0}function l(A,t,i,n){var I,r=-1,o=A.length,g=i.x,a=i.y,M=t?e(A.area/t):0;if(t==i.dx){for((n||M>i.dy)&&(M=i.dy);++ri.dx)&&(M=i.dx);++r1);return A+t*e*Math.sqrt(-2*Math.log(n)/n)}},logNormal:function(){var A=I.random.normal.apply(I,arguments);return function(){return Math.exp(A())}},bates:function(A){var t=I.random.irwinHall(A);return function(){return t()/A}},irwinHall:function(A){return function(){for(var t=0,e=0;e2?pr:Dr,g=i?BI:jI;return n=r(A,t,g,e),I=r(t,A,g,eI),o}function o(A){return n(A)}return o.invert=function(A){return I(A)},o.domain=function(t){return arguments.length?(A=t.map(Number),r()):A},o.range=function(A){return arguments.length?(t=A,r()):t},o.rangeRound=function(A){return o.range(A).interpolate(TI)},o.clamp=function(A){return arguments.length?(i=A,r()):i},o.interpolate=function(A){return arguments.length?(e=A,r()):e},o.ticks=function(t){return mr(A,t)},o.tickFormat=function(t,e){return Qr(A,t,e)},o.nice=function(t){return zr(A,t),r()},o.copy=function(){return Lr(A,t,e,i)},r()}function fr(A,t){return I.rebind(A,t,"range","rangeRound","interpolate","clamp")}function zr(A,t){return jr(A,Br(wr(A,t)[2])),jr(A,Br(wr(A,t)[2])),A}function wr(A,t){null==t&&(t=10);var e=yr(A),i=e[1]-e[0],n=Math.pow(10,Math.floor(Math.log(i/t)/Math.LN10)),I=t/i*n;return I<=.15?n*=10:I<=.35?n*=5:I<=.75&&(n*=2),e[0]=Math.ceil(e[0]/n)*n,e[1]=Math.floor(e[1]/n)*n+.5*n,e[2]=n,e}function mr(A,t){return I.range.apply(I,wr(A,t))}function Qr(A,t,e){var i=wr(A,t);if(e){var n=Ot.exec(e);if(n.shift(),"s"===n[8]){var r=I.formatPrefix(Math.max(D(i[0]),D(i[1])));return n[7]||(n[7]="."+Yr(r.scale(i[2]))),n[8]="f",e=I.format(n.join("")),function(A){return e(r.scale(A))+r.symbol}}n[7]||(n[7]="."+function(A,t){var e=Yr(t[2]);return A in Sr?Math.abs(e-Yr(Math.max(D(t[0]),D(t[1]))))+ +("e"!==A):e-2*("%"===A)}(n[8],i)),e=n.join("")}else e=",."+Yr(i[2])+"f";return I.format(e)}I.scale.linear=function(){return Lr([0,1],[0,1],eI,!1)};var Sr={s:1,g:1,p:1,r:1,e:1};function Yr(A){return-Math.floor(Math.log(A)/Math.LN10+.01)}function Or(A,t,e,i){function n(A){return(e?Math.log(A<0?0:A):-Math.log(A>0?0:-A))/Math.log(t)}function r(A){return e?Math.pow(t,A):-Math.pow(t,-A)}function o(t){return A(n(t))}return o.invert=function(t){return r(A.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,A.domain((i=t.map(Number)).map(n)),o):i},o.base=function(e){return arguments.length?(t=+e,A.domain(i.map(n)),o):t},o.nice=function(){var t=jr(i.map(n),e?Math:Ur);return A.domain(t),i=t.map(r),o},o.ticks=function(){var A=yr(i),I=[],o=A[0],g=A[1],a=Math.floor(n(o)),M=Math.ceil(n(g)),s=t%1?2:t;if(isFinite(M-a)){if(e){for(;a0;c--)I.push(r(a)*c);for(a=0;I[a]g;M--);I=I.slice(a,M)}return I},o.tickFormat=function(A,e){if(!arguments.length)return vr;arguments.length<2?e=vr:"function"!=typeof e&&(e=I.format(e));var i=Math.max(1,t*A/o.ticks().length);return function(A){var I=A/r(Math.round(n(A)));return I*t0?e[i-1]:A[0],is?0:1;if(a=QA)return g(a,u)+(o?g(o,1-u):"")+"Z";var l,C,T,h,N,d,y,E,D,j,B,x,p=0,L=0,f=[];if((h=(+r.apply(this,arguments)||0)/2)&&(T=i===Kr?Math.sqrt(o*o+a*a):+i.apply(this,arguments),u||(L*=-1),a&&(L=PA(T/a*Math.sin(h))),o&&(p=PA(T/o*Math.sin(h)))),a){N=a*Math.cos(M+L),d=a*Math.sin(M+L),y=a*Math.cos(s-L),E=a*Math.sin(s-L);var z=Math.abs(s-M-2*L)<=wA?0:1;if(L&&eo(N,d,y,E)===u^z){var w=(M+s)/2;N=a*Math.cos(w),d=a*Math.sin(w),y=E=null}}else N=d=0;if(o){D=o*Math.cos(s-p),j=o*Math.sin(s-p),B=o*Math.cos(M+p),x=o*Math.sin(M+p);var m=Math.abs(M-s+2*p)<=wA?0:1;if(p&&eo(D,j,B,x)===1-u^m){var Q=(M+s)/2;D=o*Math.cos(Q),j=o*Math.sin(Q),B=x=null}}else D=j=0;if(c>fA&&(l=Math.min(Math.abs(a-o)/2,+e.apply(this,arguments)))>.001){C=o0?0:1}function io(A,t,e,i,n){var I=A[0]-t[0],r=A[1]-t[1],o=(n?i:-i)/Math.sqrt(I*I+r*r),g=o*r,a=-o*I,M=A[0]+g,s=A[1]+a,c=t[0]+g,u=t[1]+a,l=(M+c)/2,C=(s+u)/2,T=c-M,h=u-s,N=T*T+h*h,d=e-i,y=M*u-c*s,E=(h<0?-1:1)*Math.sqrt(Math.max(0,d*d*N-y*y)),D=(y*h-T*E)/N,j=(-y*T-h*E)/N,B=(y*h+T*E)/N,x=(-y*T+h*E)/N,p=D-l,L=j-C,f=B-l,z=x-C;return p*p+L*L>f*f+z*z&&(D=B,j=x),[[D-g,j-a],[D*e/d,j*e/d]]}function no(A){var t=on,e=gn,i=qe,n=ro,I=n.key,r=.7;function o(I){var o,g=[],a=[],M=-1,s=I.length,c=yt(t),u=yt(e);function l(){g.push("M",n(A(a),r))}for(;++M1&&n.push("H",i[0]),n.join("")},"step-before":go,"step-after":ao,basis:co,"basis-open":function(A){if(A.length<4)return ro(A);for(var t,e=[],i=-1,n=A.length,I=[0],r=[0];++i<3;)t=A[i],I.push(t[0]),r.push(t[1]);for(e.push(uo(To,I)+","+uo(To,r)),--i;++i9&&(n=3*t/Math.sqrt(n),r[o]=n*e,r[o+1]=n*i);for(o=-1;++o<=g;)n=(A[Math.min(g,o+1)][0]-A[Math.max(0,o-1)][0])/(6*(1+r[o]*r[o])),I.push([n||0,r[o]*n||0]);return I}(A))}});function ro(A){return A.length>1?A.join("L"):A+"Z"}function oo(A){return A.join("L")+"Z"}function go(A){for(var t=0,e=A.length,i=A[0],n=[i[0],",",i[1]];++t1){o=t[1],I=A[g],g++,i+="C"+(n[0]+r[0])+","+(n[1]+r[1])+","+(I[0]-o[0])+","+(I[1]-o[1])+","+I[0]+","+I[1];for(var a=2;awA)+",1 "+t}function g(A,t,e,i){return"Q 0,0 "+i}return I.radius=function(A){return arguments.length?(e=yt(A),I):e},I.source=function(t){return arguments.length?(A=yt(t),I):A},I.target=function(A){return arguments.length?(t=yt(A),I):t},I.startAngle=function(A){return arguments.length?(i=yt(A),I):i},I.endAngle=function(A){return arguments.length?(n=yt(A),I):n},I},I.svg.diagonal=function(){var A=Xi,t=Vi,e=jo;function i(i,n){var I=A.call(this,i,n),r=t.call(this,i,n),o=(I.y+r.y)/2,g=[I,{x:I.x,y:o},{x:r.x,y:o},r];return"M"+(g=g.map(e))[0]+"C"+g[1]+" "+g[2]+" "+g[3]}return i.source=function(t){return arguments.length?(A=yt(t),i):A},i.target=function(A){return arguments.length?(t=yt(A),i):t},i.projection=function(A){return arguments.length?(e=A,i):e},i},I.svg.diagonal.radial=function(){var A=I.svg.diagonal(),t=jo,e=A.projection;return A.projection=function(A){return arguments.length?e(function(A){return function(){var t=A.apply(this,arguments),e=t[0],i=t[1]-SA;return[e*Math.cos(i),e*Math.sin(i)]}}(t=A)):t},A},I.svg.symbol=function(){var A=xo,t=Bo;function e(e,i){return(Lo.get(A.call(this,e,i))||po)(t.call(this,e,i))}return e.type=function(t){return arguments.length?(A=yt(t),e):A},e.size=function(A){return arguments.length?(t=yt(A),e):t},e};var Lo=I.map({circle:po,cross:function(A){var t=Math.sqrt(A/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(A){var t=Math.sqrt(A/(2*zo)),e=t*zo;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(A){var t=Math.sqrt(A)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(A){var t=Math.sqrt(A/fo),e=t*fo/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(A){var t=Math.sqrt(A/fo),e=t*fo/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});I.svg.symbolTypes=Lo.keys();var fo=Math.sqrt(3),zo=Math.tan(30*YA);_.transition=function(A){for(var t,e,i=So||++vo,n=Po(A),I=[],r=Yo||{time:Date.now(),ease:sI,delay:0,duration:250},o=-1,g=this.length;++o0;)a[--c].call(A,r);if(I>=1)return s.event&&s.event.end.call(A,A.__data__,t),--M.count?delete M[i]:delete A[e],1}s||(I=n.time,r=ft((function(A){var t=s.delay;if(r.t=t+I,t<=A)return c(A-t);r.c=c}),0,I),s=M[i]={tween:new B,time:I,timer:r,delay:n.delay,duration:n.duration,ease:n.ease,index:t},n=null,++M.count)}Oo.call=_.call,Oo.empty=_.empty,Oo.node=_.node,Oo.size=_.size,I.transition=function(A,t){return A&&A.transition?So?A.transition(t):A:I.selection().transition(A)},I.transition.prototype=Oo,Oo.select=function(A){var t,e,i,n=this.id,I=this.namespace,r=[];A=q(A);for(var o=-1,g=this.length;++orect,.s>rect").attr("width",r[1]-r[0])}function C(A){A.select(".extent").attr("y",o[0]),A.selectAll(".extent,.e>rect,.w>rect").attr("height",o[1]-o[0])}function T(){var s,T,h=this,N=I.select(I.event.target),d=e.of(h,arguments),y=I.select(h),E=N.datum(),D=!/^(n|s)$/.test(E)&&i,j=!/^(e|w)$/.test(E)&&n,B=N.classed("extent"),x=BA(h),p=I.mouse(h),L=I.select(M(h)).on("keydown.brush",(function(){32==I.event.keyCode&&(B||(s=null,p[0]-=r[1],p[1]-=o[1],B=2),F())})).on("keyup.brush",(function(){32==I.event.keyCode&&2==B&&(p[0]+=r[1],p[1]+=o[1],B=0,F())}));if(I.event.changedTouches?L.on("touchmove.brush",w).on("touchend.brush",Q):L.on("mousemove.brush",w).on("mouseup.brush",Q),y.interrupt().selectAll("*").interrupt(),B)p[0]=r[0]-p[0],p[1]=o[0]-p[1];else if(E){var f=+/w$/.test(E),z=+/^n/.test(E);T=[r[1-f]-p[0],o[1-z]-p[1]],p[0]=r[f],p[1]=o[z]}else I.event.altKey&&(s=p.slice());function w(){var A=I.mouse(h),t=!1;T&&(A[0]+=T[0],A[1]+=T[1]),B||(I.event.altKey?(s||(s=[(r[0]+r[1])/2,(o[0]+o[1])/2]),p[0]=r[+(A[0]1?{floor:function(t){for(;o(t=A.floor(t));)t=qo(t-1);return t},ceil:function(t){for(;o(t=A.ceil(t));)t=qo(+t+1);return t}}:A))},i.ticks=function(A,t){var e=yr(i.domain()),I=null==A?n(e,10):"number"==typeof A?n(e,A):!A.range&&[{range:A},t];return I&&(A=I[0],t=I[1]),A.range(e[0],qo(+e[1]+1),t<1?1:t)},i.tickFormat=function(){return e},i.copy=function(){return _o(A.copy(),t,e)},fr(i,A)}function qo(A){return new Date(A)}Vo.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ko:Zo,Ko.parse=function(A){var t=new Date(A);return isNaN(t)?null:t},Ko.toString=Zo.toString,bt.second=Ft((function(A){return new Pt(1e3*Math.floor(A/1e3))}),(function(A,t){A.setTime(A.getTime()+1e3*Math.floor(t))}),(function(A){return A.getSeconds()})),bt.seconds=bt.second.range,bt.seconds.utc=bt.second.utc.range,bt.minute=Ft((function(A){return new Pt(6e4*Math.floor(A/6e4))}),(function(A,t){A.setTime(A.getTime()+6e4*Math.floor(t))}),(function(A){return A.getMinutes()})),bt.minutes=bt.minute.range,bt.minutes.utc=bt.minute.utc.range,bt.hour=Ft((function(A){var t=A.getTimezoneOffset()/60;return new Pt(36e5*(Math.floor(A/36e5-t)+t))}),(function(A,t){A.setTime(A.getTime()+36e5*Math.floor(t))}),(function(A){return A.getHours()})),bt.hours=bt.hour.range,bt.hours.utc=bt.hour.utc.range,bt.month=Ft((function(A){return(A=bt.day(A)).setDate(1),A}),(function(A,t){A.setMonth(A.getMonth()+t)}),(function(A){return A.getMonth()})),bt.months=bt.month.range,bt.months.utc=bt.month.utc.range;var $o=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ag=[[bt.second,1],[bt.second,5],[bt.second,15],[bt.second,30],[bt.minute,1],[bt.minute,5],[bt.minute,15],[bt.minute,30],[bt.hour,1],[bt.hour,3],[bt.hour,6],[bt.hour,12],[bt.day,1],[bt.day,2],[bt.week,1],[bt.month,1],[bt.month,3],[bt.year,1]],tg=Vo.multi([[".%L",function(A){return A.getMilliseconds()}],[":%S",function(A){return A.getSeconds()}],["%I:%M",function(A){return A.getMinutes()}],["%I %p",function(A){return A.getHours()}],["%a %d",function(A){return A.getDay()&&1!=A.getDate()}],["%b %d",function(A){return 1!=A.getDate()}],["%B",function(A){return A.getMonth()}],["%Y",qe]]),eg={range:function(A,t,e){return I.range(Math.ceil(A/e)*e,+t,e).map(qo)},floor:O,ceil:O};Ag.year=bt.year,bt.scale=function(){return _o(I.scale.linear(),Ag,tg)};var ig=Ag.map((function(A){return[A[0].utc,A[1]]})),ng=Wo.multi([[".%L",function(A){return A.getUTCMilliseconds()}],[":%S",function(A){return A.getUTCSeconds()}],["%I:%M",function(A){return A.getUTCMinutes()}],["%I %p",function(A){return A.getUTCHours()}],["%a %d",function(A){return A.getUTCDay()&&1!=A.getUTCDate()}],["%b %d",function(A){return 1!=A.getUTCDate()}],["%B",function(A){return A.getUTCMonth()}],["%Y",qe]]);function Ig(A){return JSON.parse(A.responseText)}function rg(A){var t=g.createRange();return t.selectNode(g.body),t.createContextualFragment(A.responseText)}ig.year=bt.year.utc,bt.scale.utc=function(){return _o(I.scale.linear(),ig,ng)},I.text=Et((function(A){return A.responseText})),I.json=function(A,t){return Dt(A,"application/json",Ig,t)},I.html=function(A,t){return Dt(A,"text/html",rg,t)},I.xml=Et((function(A){return A.responseXML})),this.d3=I,void 0===(n="function"==typeof(i=I)?i.call(t,e,t,A):i)||(A.exports=n)}()},41:(A,t,e)=>{"use strict";var i=e(655),n=e(8068),I=e(9675),r=e(5795);A.exports=function(A,t,e){if(!A||"object"!=typeof A&&"function"!=typeof A)throw new I("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new I("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new I("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new I("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new I("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new I("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,g=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,M=arguments.length>6&&arguments[6],s=!!r&&r(A,t);if(i)i(A,t,{configurable:null===a&&s?s.configurable:!a,enumerable:null===o&&s?s.enumerable:!o,value:e,writable:null===g&&s?s.writable:!g});else{if(!M&&(o||g||a))throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");A[t]=e}}},655:(A,t,e)=>{"use strict";var i=e(453)("%Object.defineProperty%",!0)||!1;if(i)try{i({},"a",{value:1})}catch(A){i=!1}A.exports=i},1237:A=>{"use strict";A.exports=EvalError},9383:A=>{"use strict";A.exports=Error},9290:A=>{"use strict";A.exports=RangeError},9538:A=>{"use strict";A.exports=ReferenceError},8068:A=>{"use strict";A.exports=SyntaxError},9675:A=>{"use strict";A.exports=TypeError},5345:A=>{"use strict";A.exports=URIError},9353:A=>{"use strict";var t=Object.prototype.toString,e=Math.max,i=function(A,t){for(var e=[],i=0;i{"use strict";var i=e(9353);A.exports=Function.prototype.bind||i},453:(A,t,e)=>{"use strict";var i,n=e(9383),I=e(1237),r=e(9290),o=e(9538),g=e(8068),a=e(9675),M=e(5345),s=Function,c=function(A){try{return s('"use strict"; return ('+A+").constructor;")()}catch(A){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(A){u=null}var l=function(){throw new a},C=u?function(){try{return l}catch(A){try{return u(arguments,"callee").get}catch(A){return l}}}():l,T=e(4039)(),h=e(24)(),N=Object.getPrototypeOf||(h?function(A){return A.__proto__}:null),d={},y="undefined"!=typeof Uint8Array&&N?N(Uint8Array):i,E={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":T&&N?N([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?i:Atomics,"%BigInt%":"undefined"==typeof BigInt?i:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":I,"%Float32Array%":"undefined"==typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":s,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&N?N(N([][Symbol.iterator]())):i,"%JSON%":"object"==typeof JSON?JSON:i,"%Map%":"undefined"==typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&T&&N?N((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?i:Promise,"%Proxy%":"undefined"==typeof Proxy?i:Proxy,"%RangeError%":r,"%ReferenceError%":o,"%Reflect%":"undefined"==typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&T&&N?N((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&N?N(""[Symbol.iterator]()):i,"%Symbol%":T?Symbol:i,"%SyntaxError%":g,"%ThrowTypeError%":C,"%TypedArray%":y,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?i:Uint32Array,"%URIError%":M,"%WeakMap%":"undefined"==typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?i:WeakSet};if(N)try{null.error}catch(A){var D=N(N(A));E["%Error.prototype%"]=D}var j=function A(t){var e;if("%AsyncFunction%"===t)e=c("async function () {}");else if("%GeneratorFunction%"===t)e=c("function* () {}");else if("%AsyncGeneratorFunction%"===t)e=c("async function* () {}");else if("%AsyncGenerator%"===t){var i=A("%AsyncGeneratorFunction%");i&&(e=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var n=A("%AsyncGenerator%");n&&N&&(e=N(n.prototype))}return E[t]=e,e},B={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=e(6743),p=e(9957),L=x.call(Function.call,Array.prototype.concat),f=x.call(Function.apply,Array.prototype.splice),z=x.call(Function.call,String.prototype.replace),w=x.call(Function.call,String.prototype.slice),m=x.call(Function.call,RegExp.prototype.exec),Q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S=/\\(\\)?/g,Y=function(A,t){var e,i=A;if(p(B,i)&&(i="%"+(e=B[i])[0]+"%"),p(E,i)){var n=E[i];if(n===d&&(n=j(i)),void 0===n&&!t)throw new a("intrinsic "+A+" exists, but is not available. Please file an issue!");return{alias:e,name:i,value:n}}throw new g("intrinsic "+A+" does not exist!")};A.exports=function(A,t){if("string"!=typeof A||0===A.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===m(/^%?[^%]*%?$/,A))throw new g("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var e=function(A){var t=w(A,0,1),e=w(A,-1);if("%"===t&&"%"!==e)throw new g("invalid intrinsic syntax, expected closing `%`");if("%"===e&&"%"!==t)throw new g("invalid intrinsic syntax, expected opening `%`");var i=[];return z(A,Q,(function(A,t,e,n){i[i.length]=e?z(n,S,"$1"):t||A})),i}(A),i=e.length>0?e[0]:"",n=Y("%"+i+"%",t),I=n.name,r=n.value,o=!1,M=n.alias;M&&(i=M[0],f(e,L([0,1],M)));for(var s=1,c=!0;s=e.length){var h=u(r,l);r=(c=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:r[l]}else c=p(r,l),r=r[l];c&&!o&&(E[I]=r)}}return r}},5795:(A,t,e)=>{"use strict";var i=e(453)("%Object.getOwnPropertyDescriptor%",!0);if(i)try{i([],"length")}catch(A){i=null}A.exports=i},592:(A,t,e)=>{"use strict";var i=e(655),n=function(){return!!i};n.hasArrayLengthDefineBug=function(){if(!i)return null;try{return 1!==i([],"length",{value:1}).length}catch(A){return!0}},A.exports=n},24:A=>{"use strict";var t={__proto__:null,foo:{}},e=Object;A.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof e)}},4039:(A,t,e)=>{"use strict";var i="undefined"!=typeof Symbol&&Symbol,n=e(1333);A.exports=function(){return"function"==typeof i&&"function"==typeof Symbol&&"symbol"==typeof i("foo")&&"symbol"==typeof Symbol("bar")&&n()}},1333:A=>{"use strict";A.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var A={},t=Symbol("test"),e=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(t in A[t]=42,A)return!1;if("function"==typeof Object.keys&&0!==Object.keys(A).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(A).length)return!1;var i=Object.getOwnPropertySymbols(A);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(A,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(A,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},9957:(A,t,e)=>{"use strict";var i=Function.prototype.call,n=Object.prototype.hasOwnProperty,I=e(6743);A.exports=I.call(i,n)},9983:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883)],void 0===(I="function"==typeof(i=function(A){return A.extend(A.expr.pseudos,{data:A.expr.createPseudo?A.expr.createPseudo((function(t){return function(e){return!!A.data(e,t)}})):function(t,e,i){return!!A.data(t,i[3])}})})?i.apply(t,n):i)||(A.exports=I)}()},724:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883)],void 0===(I="function"==typeof(i=function(A){return A.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",(function(A){A.preventDefault()}))}),enableSelection:function(){return this.off(".ui-disableSelection")}});var t})?i.apply(t,n):i)||(A.exports=I)}()},2026:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(4925),e(7604),e(6883)],i=function(A){var t,e="ui-effects-",i="ui-effects-style",n="ui-effects-animated";return A.effects={effect:{}},function(){var t,e=["add","remove","toggle"],i={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function n(A){var t,e,i,n=A.ownerDocument.defaultView?A.ownerDocument.defaultView.getComputedStyle(A,null):A.currentStyle,I={};if(n&&n.length&&n[0]&&n[n[0]])for(e=n.length;e--;)"string"==typeof n[t=n[e]]&&(I[(i=t,i.replace(/-([\da-z])/gi,(function(A,t){return t.toUpperCase()})))]=n[t]);else for(t in n)"string"==typeof n[t]&&(I[t]=n[t]);return I}A.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(t,e){A.fx.step[e]=function(A){("none"!==A.end&&!A.setAttr||1===A.pos&&!A.setAttr)&&(jQuery.style(A.elem,e,A.end),A.setAttr=!0)}})),A.fn.addBack||(A.fn.addBack=function(A){return this.add(null==A?this.prevObject:this.prevObject.filter(A))}),A.effects.animateClass=function(t,I,r,o){var g=A.speed(I,r,o);return this.queue((function(){var I,r=A(this),o=r.attr("class")||"",a=g.children?r.find("*").addBack():r;a=a.map((function(){return{el:A(this),start:n(this)}})),(I=function(){A.each(e,(function(A,e){t[e]&&r[e+"Class"](t[e])}))})(),a=a.map((function(){return this.end=n(this.el[0]),this.diff=function(t,e){var n,I,r={};for(n in e)I=e[n],t[n]!==I&&(i[n]||!A.fx.step[n]&&isNaN(parseFloat(I))||(r[n]=I));return r}(this.start,this.end),this})),r.attr("class",o),a=a.map((function(){var t=this,e=A.Deferred(),i=A.extend({},g,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()})),A.when.apply(A,a.get()).done((function(){I(),A.each(arguments,(function(){var t=this.el;A.each(this.diff,(function(A){t.css(A,"")}))})),g.complete.call(r[0])}))}))},A.fn.extend({addClass:(t=A.fn.addClass,function(e,i,n,I){return i?A.effects.animateClass.call(this,{add:e},i,n,I):t.apply(this,arguments)}),removeClass:function(t){return function(e,i,n,I){return arguments.length>1?A.effects.animateClass.call(this,{remove:e},i,n,I):t.apply(this,arguments)}}(A.fn.removeClass),toggleClass:function(t){return function(e,i,n,I,r){return"boolean"==typeof i||void 0===i?n?A.effects.animateClass.call(this,i?{add:e}:{remove:e},n,I,r):t.apply(this,arguments):A.effects.animateClass.call(this,{toggle:e},i,n,I)}}(A.fn.toggleClass),switchClass:function(t,e,i,n,I){return A.effects.animateClass.call(this,{add:e,remove:t},i,n,I)}})}(),function(){var t;function I(t,e,i,n){return A.isPlainObject(t)&&(e=t,t=t.effect),t={effect:t},null==e&&(e={}),"function"==typeof e&&(n=e,i=null,e={}),("number"==typeof e||A.fx.speeds[e])&&(n=i,i=e,e={}),"function"==typeof i&&(n=i,i=null),e&&A.extend(t,e),i=i||e.duration,t.duration=A.fx.off?0:"number"==typeof i?i:i in A.fx.speeds?A.fx.speeds[i]:A.fx.speeds._default,t.complete=n||e.complete,t}function r(t){return!(t&&"number"!=typeof t&&!A.fx.speeds[t])||"string"==typeof t&&!A.effects.effect[t]||"function"==typeof t||"object"==typeof t&&!t.effect}function o(A,t){var e=t.outerWidth(),i=t.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(A)||["",0,e,i,0];return{top:parseFloat(n[1])||0,right:"auto"===n[2]?e:parseFloat(n[2]),bottom:"auto"===n[3]?i:parseFloat(n[3]),left:parseFloat(n[4])||0}}A.expr&&A.expr.pseudos&&A.expr.pseudos.animated&&(A.expr.pseudos.animated=(t=A.expr.pseudos.animated,function(e){return!!A(e).data(n)||t(e)})),!1!==A.uiBackCompat&&A.extend(A.effects,{save:function(A,t){for(var i=0,n=t.length;i").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:t.width(),height:t.height()},I=document.activeElement;try{I.id}catch(A){I=document.body}return t.wrap(i),(t[0]===I||A.contains(t[0],I))&&A(I).trigger("focus"),i=t.parent(),"static"===t.css("position")?(i.css({position:"relative"}),t.css({position:"relative"})):(A.extend(e,{position:t.css("position"),zIndex:t.css("z-index")}),A.each(["top","left","bottom","right"],(function(A,i){e[i]=t.css(i),isNaN(parseInt(e[i],10))&&(e[i]="auto")})),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(n),i.css(e).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===e||A.contains(t[0],e))&&A(e).trigger("focus")),t}}),A.extend(A.effects,{version:"1.13.2",define:function(t,e,i){return i||(i=e,e="effect"),A.effects.effect[t]=i,A.effects.effect[t].mode=e,i},scaledDimensions:function(A,t,e){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var i="horizontal"!==e?(t||100)/100:1,n="vertical"!==e?(t||100)/100:1;return{height:A.height()*n,width:A.width()*i,outerHeight:A.outerHeight()*n,outerWidth:A.outerWidth()*i}},clipToBox:function(A){return{width:A.clip.right-A.clip.left,height:A.clip.bottom-A.clip.top,left:A.clip.left,top:A.clip.top}},unshift:function(A,t,e){var i=A.queue();t>1&&i.splice.apply(i,[1,0].concat(i.splice(t,e))),A.dequeue()},saveStyle:function(A){A.data(i,A[0].style.cssText)},restoreStyle:function(A){A[0].style.cssText=A.data(i)||"",A.removeData(i)},mode:function(A,t){var e=A.is(":hidden");return"toggle"===t&&(t=e?"show":"hide"),(e?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(A,t){var e,i;switch(A[0]){case"top":e=0;break;case"middle":e=.5;break;case"bottom":e=1;break;default:e=A[0]/t.height}switch(A[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=A[1]/t.width}return{x:i,y:e}},createPlaceholder:function(t){var i,n=t.css("position"),I=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=A("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(e+"placeholder",i)),t.css({position:n,left:I.left,top:I.top}),i},removePlaceholder:function(A){var t=e+"placeholder",i=A.data(t);i&&(i.remove(),A.removeData(t))},cleanUp:function(t){A.effects.restoreStyle(t),A.effects.removePlaceholder(t)},setTransition:function(t,e,i,n){return n=n||{},A.each(e,(function(A,e){var I=t.cssUnit(e);I[0]>0&&(n[e]=I[0]*i+I[1])})),n}}),A.fn.extend({effect:function(){var t=I.apply(this,arguments),e=A.effects.effect[t.effect],i=e.mode,r=t.queue,o=r||"fx",g=t.complete,a=t.mode,M=[],s=function(t){var e=A(this),I=A.effects.mode(e,a)||i;e.data(n,!0),M.push(I),i&&("show"===I||I===i&&"hide"===I)&&e.show(),i&&"none"===I||A.effects.saveStyle(e),"function"==typeof t&&t()};if(A.fx.off||!e)return a?this[a](t.duration,g):this.each((function(){g&&g.call(this)}));function c(I){var r=A(this);function o(){"function"==typeof g&&g.call(r[0]),"function"==typeof I&&I()}t.mode=M.shift(),!1===A.uiBackCompat||i?"none"===t.mode?(r[a](),o()):e.call(r[0],t,(function(){r.removeData(n),A.effects.cleanUp(r),"hide"===t.mode&&r.hide(),o()})):(r.is(":hidden")?"hide"===a:"show"===a)?(r[a](),o()):e.call(r[0],t,o)}return!1===r?this.each(s).each(c):this.queue(o,s).queue(o,c)},show:function(A){return function(t){if(r(t))return A.apply(this,arguments);var e=I.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}}(A.fn.show),hide:function(A){return function(t){if(r(t))return A.apply(this,arguments);var e=I.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}}(A.fn.hide),toggle:function(A){return function(t){if(r(t)||"boolean"==typeof t)return A.apply(this,arguments);var e=I.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}}(A.fn.toggle),cssUnit:function(t){var e=this.css(t),i=[];return A.each(["em","px","%","pt"],(function(A,t){e.indexOf(t)>0&&(i=[parseFloat(e),t])})),i},cssClip:function(A){return A?this.css("clip","rect("+A.top+"px "+A.right+"px "+A.bottom+"px "+A.left+"px)"):o(this.css("clip"),this)},transfer:function(t,e){var i=A(this),n=A(t.to),I="fixed"===n.css("position"),r=A("body"),o=I?r.scrollTop():0,g=I?r.scrollLeft():0,a=n.offset(),M={top:a.top-o,left:a.left-g,height:n.innerHeight(),width:n.innerWidth()},s=i.offset(),c=A("
");c.appendTo("body").addClass(t.className).css({top:s.top-o,left:s.left-g,height:i.innerHeight(),width:i.innerWidth(),position:I?"fixed":"absolute"}).animate(M,t.duration,t.easing,(function(){c.remove(),"function"==typeof e&&e()}))}}),A.fx.step.clip=function(t){t.clipInit||(t.start=A(t.elem).cssClip(),"string"==typeof t.end&&(t.end=o(t.end,t.elem)),t.clipInit=!0),A(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})}}(),t={},A.each(["Quad","Cubic","Quart","Quint","Expo"],(function(A,e){t[e]=function(t){return Math.pow(t,A+2)}})),A.extend(t,{Sine:function(A){return 1-Math.cos(A*Math.PI/2)},Circ:function(A){return 1-Math.sqrt(1-A*A)},Elastic:function(A){return 0===A||1===A?A:-Math.pow(2,8*(A-1))*Math.sin((80*(A-1)-7.5)*Math.PI/15)},Back:function(A){return A*A*(3*A-2)},Bounce:function(A){for(var t,e=4;A<((t=Math.pow(2,--e))-1)/11;);return 1/Math.pow(4,3-e)-7.5625*Math.pow((3*t-2)/22-A,2)}}),A.each(t,(function(t,e){A.easing["easeIn"+t]=e,A.easing["easeOut"+t]=function(A){return 1-e(1-A)},A.easing["easeInOut"+t]=function(A){return A<.5?e(2*A)/2:1-e(-2*A+2)/2}})),A.effects},void 0===(I=i.apply(t,n))||(A.exports=I)}()},6951:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(2026)],void 0===(I="function"==typeof(i=function(A){return A.effects.define("blind","hide",(function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=A(this),I=t.direction||"up",r=n.cssClip(),o={clip:A.extend({},r)},g=A.effects.createPlaceholder(n);o.clip[i[I][0]]=o.clip[i[I][1]],"show"===t.mode&&(n.cssClip(o.clip),g&&g.css(A.effects.clipToBox(o)),o.clip=r),g&&g.animate(A.effects.clipToBox(o),t.duration,t.easing),n.animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}))})?i.apply(t,n):i)||(A.exports=I)}()},4826:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(2026)],void 0===(I="function"==typeof(i=function(A){return A.effects.define("bounce",(function(t,e){var i,n,I,r=A(this),o=t.mode,g="hide"===o,a="show"===o,M=t.direction||"up",s=t.distance,c=t.times||5,u=2*c+(a||g?1:0),l=t.duration/u,C=t.easing,T="up"===M||"down"===M?"top":"left",h="up"===M||"left"===M,N=0,d=r.queue().length;for(A.effects.createPlaceholder(r),I=r.css(T),s||(s=r["top"===T?"outerHeight":"outerWidth"]()/3),a&&((n={opacity:1})[T]=I,r.css("opacity",0).css(T,h?2*-s:2*s).animate(n,l,C)),g&&(s/=Math.pow(2,c-1)),(n={})[T]=I;N{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(2026)],void 0===(I="function"==typeof(i=function(A){return A.effects.define("clip","hide",(function(t,e){var i,n={},I=A(this),r=t.direction||"vertical",o="both"===r,g=o||"horizontal"===r,a=o||"vertical"===r;i=I.cssClip(),n.clip={top:a?(i.bottom-i.top)/2:i.top,right:g?(i.right-i.left)/2:i.right,bottom:a?(i.bottom-i.top)/2:i.bottom,left:g?(i.right-i.left)/2:i.left},A.effects.createPlaceholder(I),"show"===t.mode&&(I.cssClip(n.clip),n.clip=i),I.animate(n,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}))})?i.apply(t,n):i)||(A.exports=I)}()},767:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(2026)],void 0===(I="function"==typeof(i=function(A){return A.effects.define("drop","hide",(function(t,e){var i,n=A(this),I="show"===t.mode,r=t.direction||"left",o="up"===r||"down"===r?"top":"left",g="up"===r||"left"===r?"-=":"+=",a="+="===g?"-=":"+=",M={opacity:0};A.effects.createPlaceholder(n),i=t.distance||n["top"===o?"outerHeight":"outerWidth"](!0)/2,M[o]=g+i,I&&(n.css(M),M[o]=a+i,M.opacity=1),n.animate(M,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}))})?i.apply(t,n):i)||(A.exports=I)}()},7197:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(2026)],void 0===(I="function"==typeof(i=function(A){return A.effects.define("explode","hide",(function(t,e){var i,n,I,r,o,g,a=t.pieces?Math.round(Math.sqrt(t.pieces)):3,M=a,s=A(this),c="show"===t.mode,u=s.show().css("visibility","hidden").offset(),l=Math.ceil(s.outerWidth()/M),C=Math.ceil(s.outerHeight()/a),T=[];function h(){T.push(this),T.length===a*M&&(s.css({visibility:"visible"}),A(T).remove(),e())}for(i=0;i").css({position:"absolute",visibility:"visible",left:-n*l,top:-i*C}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:l,height:C,left:I+(c?o*l:0),top:r+(c?g*C:0),opacity:c?0:1}).animate({left:I+(c?0:o*l),top:r+(c?0:g*C),opacity:c?1:0},t.duration||500,t.easing,h)}))})?i.apply(t,n):i)||(A.exports=I)}()},2612:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(2026)],void 0===(I="function"==typeof(i=function(A){return A.effects.define("fade","toggle",(function(t,e){var i="show"===t.mode;A(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}))})?i.apply(t,n):i)||(A.exports=I)}()},1321:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(2026)],void 0===(I="function"==typeof(i=function(A){return A.effects.define("fold","hide",(function(t,e){var i=A(this),n=t.mode,I="show"===n,r="hide"===n,o=t.size||15,g=/([0-9]+)%/.exec(o),a=t.horizFirst?["right","bottom"]:["bottom","right"],M=t.duration/2,s=A.effects.createPlaceholder(i),c=i.cssClip(),u={clip:A.extend({},c)},l={clip:A.extend({},c)},C=[c[a[0]],c[a[1]]],T=i.queue().length;g&&(o=parseInt(g[1],10)/100*C[r?0:1]),u.clip[a[0]]=o,l.clip[a[0]]=o,l.clip[a[1]]=0,I&&(i.cssClip(l.clip),s&&s.css(A.effects.clipToBox(l)),l.clip=c),i.queue((function(e){s&&s.animate(A.effects.clipToBox(u),M,t.easing).animate(A.effects.clipToBox(l),M,t.easing),e()})).animate(u,M,t.easing).animate(l,M,t.easing).queue(e),A.effects.unshift(i,T,4)}))})?i.apply(t,n):i)||(A.exports=I)}()},7776:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(2026)],void 0===(I="function"==typeof(i=function(A){return A.effects.define("highlight","show",(function(t,e){var i=A(this),n={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(n.opacity=0),A.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(n,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}))})?i.apply(t,n):i)||(A.exports=I)}()},1257:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(2026),e(22)],void 0===(I="function"==typeof(i=function(A){return A.effects.define("puff","hide",(function(t,e){var i=A.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});A.effects.effect.scale.call(this,i,e)}))})?i.apply(t,n):i)||(A.exports=I)}()},7834:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(2026)],void 0===(I="function"==typeof(i=function(A){return A.effects.define("pulsate","show",(function(t,e){var i=A(this),n=t.mode,I="show"===n,r=I||"hide"===n,o=2*(t.times||5)+(r?1:0),g=t.duration/o,a=0,M=1,s=i.queue().length;for(!I&&i.is(":visible")||(i.css("opacity",0).show(),a=1);M{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(2026),e(9871)],void 0===(I="function"==typeof(i=function(A){return A.effects.define("scale",(function(t,e){var i=A(this),n=t.mode,I=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==n?0:100),r=A.extend(!0,{from:A.effects.scaledDimensions(i),to:A.effects.scaledDimensions(i,I,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(r.from.opacity=1,r.to.opacity=0),A.effects.effect.size.call(this,r,e)}))})?i.apply(t,n):i)||(A.exports=I)}()},3634:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(2026)],void 0===(I="function"==typeof(i=function(A){return A.effects.define("shake",(function(t,e){var i=1,n=A(this),I=t.direction||"left",r=t.distance||20,o=t.times||3,g=2*o+1,a=Math.round(t.duration/g),M="up"===I||"down"===I?"top":"left",s="up"===I||"left"===I,c={},u={},l={},C=n.queue().length;for(A.effects.createPlaceholder(n),c[M]=(s?"-=":"+=")+r,u[M]=(s?"+=":"-=")+2*r,l[M]=(s?"-=":"+=")+2*r,n.animate(c,a,t.easing);i{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(2026)],void 0===(I="function"==typeof(i=function(A){return A.effects.define("size",(function(t,e){var i,n,I,r=A(this),o=["fontSize"],g=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],a=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],M=t.mode,s="effect"!==M,c=t.scale||"both",u=t.origin||["middle","center"],l=r.css("position"),C=r.position(),T=A.effects.scaledDimensions(r),h=t.from||T,N=t.to||A.effects.scaledDimensions(r,0);A.effects.createPlaceholder(r),"show"===M&&(I=h,h=N,N=I),n={from:{y:h.height/T.height,x:h.width/T.width},to:{y:N.height/T.height,x:N.width/T.width}},"box"!==c&&"both"!==c||(n.from.y!==n.to.y&&(h=A.effects.setTransition(r,g,n.from.y,h),N=A.effects.setTransition(r,g,n.to.y,N)),n.from.x!==n.to.x&&(h=A.effects.setTransition(r,a,n.from.x,h),N=A.effects.setTransition(r,a,n.to.x,N))),"content"!==c&&"both"!==c||n.from.y!==n.to.y&&(h=A.effects.setTransition(r,o,n.from.y,h),N=A.effects.setTransition(r,o,n.to.y,N)),u&&(i=A.effects.getBaseline(u,T),h.top=(T.outerHeight-h.outerHeight)*i.y+C.top,h.left=(T.outerWidth-h.outerWidth)*i.x+C.left,N.top=(T.outerHeight-N.outerHeight)*i.y+C.top,N.left=(T.outerWidth-N.outerWidth)*i.x+C.left),delete h.outerHeight,delete h.outerWidth,r.css(h),"content"!==c&&"both"!==c||(g=g.concat(["marginTop","marginBottom"]).concat(o),a=a.concat(["marginLeft","marginRight"]),r.find("*[width]").each((function(){var e=A(this),i=A.effects.scaledDimensions(e),I={height:i.height*n.from.y,width:i.width*n.from.x,outerHeight:i.outerHeight*n.from.y,outerWidth:i.outerWidth*n.from.x},r={height:i.height*n.to.y,width:i.width*n.to.x,outerHeight:i.height*n.to.y,outerWidth:i.width*n.to.x};n.from.y!==n.to.y&&(I=A.effects.setTransition(e,g,n.from.y,I),r=A.effects.setTransition(e,g,n.to.y,r)),n.from.x!==n.to.x&&(I=A.effects.setTransition(e,a,n.from.x,I),r=A.effects.setTransition(e,a,n.to.x,r)),s&&A.effects.saveStyle(e),e.css(I),e.animate(r,t.duration,t.easing,(function(){s&&A.effects.restoreStyle(e)}))}))),r.animate(N,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){var t=r.offset();0===N.opacity&&r.css("opacity",h.opacity),s||(r.css("position","static"===l?"relative":l).offset(t),A.effects.saveStyle(r)),e()}})}))})?i.apply(t,n):i)||(A.exports=I)}()},7306:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(2026)],void 0===(I="function"==typeof(i=function(A){return A.effects.define("slide","show",(function(t,e){var i,n,I=A(this),r={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},o=t.mode,g=t.direction||"left",a="up"===g||"down"===g?"top":"left",M="up"===g||"left"===g,s=t.distance||I["top"===a?"outerHeight":"outerWidth"](!0),c={};A.effects.createPlaceholder(I),i=I.cssClip(),n=I.position()[a],c[a]=(M?-1:1)*s+n,c.clip=I.cssClip(),c.clip[r[g][1]]=c.clip[r[g][0]],"show"===o&&(I.cssClip(c.clip),I.css(a,c[a]),c.clip=i,c[a]=n),I.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}))})?i.apply(t,n):i)||(A.exports=I)}()},2141:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(2026)],void 0===(I="function"==typeof(i=function(A){var t;return!1!==A.uiBackCompat&&(t=A.effects.define("transfer",(function(t,e){A(this).transfer(t,e)}))),t})?i.apply(t,n):i)||(A.exports=I)}()},1255:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883)],void 0===(I="function"==typeof(i=function(A){return A.ui.focusable=function(t,e){var i,n,I,r,o,g=t.nodeName.toLowerCase();return"area"===g?(n=(i=t.parentNode).name,!(!t.href||!n||"map"!==i.nodeName.toLowerCase())&&(I=A("img[usemap='#"+n+"']")).length>0&&I.is(":visible")):(/^(input|select|textarea|button|object)$/.test(g)?(r=!t.disabled)&&(o=A(t).closest("fieldset")[0])&&(r=!o.disabled):r="a"===g&&t.href||e,r&&A(t).is(":visible")&&function(A){for(var t=A.css("visibility");"inherit"===t;)t=(A=A.parent()).css("visibility");return"visible"===t}(A(t)))},A.extend(A.expr.pseudos,{focusable:function(t){return A.ui.focusable(t,null!=A.attr(t,"tabindex"))}}),A.ui.focusable})?i.apply(t,n):i)||(A.exports=I)}()},7687:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(865),e(6883)],void 0===(I="function"==typeof(i=function(A){return A.ui.formResetMixin={_formResetHandler:function(){var t=A(this);setTimeout((function(){var e=t.data("ui-form-reset-instances");A.each(e,(function(){this.refresh()}))}))},_bindFormResetHandler:function(){if(this.form=this.element._form(),this.form.length){var A=this.form.data("ui-form-reset-instances")||[];A.length||this.form.on("reset.ui-form-reset",this._formResetHandler),A.push(this),this.form.data("ui-form-reset-instances",A)}},_unbindFormResetHandler:function(){if(this.form.length){var t=this.form.data("ui-form-reset-instances");t.splice(A.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}}})?i.apply(t,n):i)||(A.exports=I)}()},865:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883)],void 0===(I="function"==typeof(i=function(A){return A.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):A(this[0].form)}})?i.apply(t,n):i)||(A.exports=I)}()},8045:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883)],void 0===(I="function"==typeof(i=function(A){return A.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())})?i.apply(t,n):i)||(A.exports=I)}()},4925:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883)],void 0===(I="function"==typeof(i=function(A){})?i.apply(t,n):i)||(A.exports=I)}()},1897:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883)],void 0===(I="function"==typeof(i=function(A){return A.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}})?i.apply(t,n):i)||(A.exports=I)}()},2420:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883)],void 0===(I="function"==typeof(i=function(A){return A.fn.labels=function(){var t,e,i,n,I;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),(i=this.attr("id"))&&(I=(t=this.eq(0).parents().last()).add(t.length?t.siblings():this.siblings()),e="label[for='"+A.escapeSelector(i)+"']",n=n.add(I.find(e).addBack(e))),this.pushStack(n)):this.pushStack([])}})?i.apply(t,n):i)||(A.exports=I)}()},2336:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883)],i=function(A){return A.ui.plugin={add:function(t,e,i){var n,I=A.ui[t].prototype;for(n in i)I.plugins[n]=I.plugins[n]||[],I.plugins[n].push([e,i[n]])},call:function(A,t,e,i){var n,I=A.plugins[t];if(I&&(i||A.element[0].parentNode&&11!==A.element[0].parentNode.nodeType))for(n=0;n{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883)],i=function(A){return function(){var t,e=Math.max,i=Math.abs,n=/left|center|right/,I=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,o=/^\w+/,g=/%$/,a=A.fn.position;function M(A,t,e){return[parseFloat(A[0])*(g.test(A[0])?t/100:1),parseFloat(A[1])*(g.test(A[1])?e/100:1)]}function s(t,e){return parseInt(A.css(t,e),10)||0}function c(A){return null!=A&&A===A.window}A.position={scrollbarWidth:function(){if(void 0!==t)return t;var e,i,n=A("
"),I=n.children()[0];return A("body").append(n),e=I.offsetWidth,n.css("overflow","scroll"),e===(i=I.offsetWidth)&&(i=n[0].clientWidth),n.remove(),t=e-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===e||"auto"===e&&t.width0?"right":"center",vertical:M<0?"top":g>0?"bottom":"middle"};ue(i(g),i(M))?s.important="horizontal":s.important="vertical",t.using.call(this,A,s)}),r.offset(A.extend(x,{using:I}))}))},A.ui.position={fit:{left:function(A,t){var i,n=t.within,I=n.isWindow?n.scrollLeft:n.offset.left,r=n.width,o=A.left-t.collisionPosition.marginLeft,g=I-o,a=o+t.collisionWidth-r-I;t.collisionWidth>r?g>0&&a<=0?(i=A.left+g+t.collisionWidth-r-I,A.left+=g-i):A.left=a>0&&g<=0?I:g>a?I+r-t.collisionWidth:I:g>0?A.left+=g:a>0?A.left-=a:A.left=e(A.left-o,A.left)},top:function(A,t){var i,n=t.within,I=n.isWindow?n.scrollTop:n.offset.top,r=t.within.height,o=A.top-t.collisionPosition.marginTop,g=I-o,a=o+t.collisionHeight-r-I;t.collisionHeight>r?g>0&&a<=0?(i=A.top+g+t.collisionHeight-r-I,A.top+=g-i):A.top=a>0&&g<=0?I:g>a?I+r-t.collisionHeight:I:g>0?A.top+=g:a>0?A.top-=a:A.top=e(A.top-o,A.top)}},flip:{left:function(A,t){var e,n,I=t.within,r=I.offset.left+I.scrollLeft,o=I.width,g=I.isWindow?I.scrollLeft:I.offset.left,a=A.left-t.collisionPosition.marginLeft,M=a-g,s=a+t.collisionWidth-o-g,c="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,u="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,l=-2*t.offset[0];M<0?((e=A.left+c+u+l+t.collisionWidth-o-r)<0||e0&&((n=A.left-t.collisionPosition.marginLeft+c+u+l-g)>0||i(n)0&&((e=A.top-t.collisionPosition.marginTop+c+u+l-g)>0||i(e){var i,n,I;!function(r){"use strict";n=[e(4692),e(6883)],void 0===(I="function"==typeof(i=function(A){return A.ui.safeActiveElement=function(A){var t;try{t=A.activeElement}catch(e){t=A.body}return t||(t=A.body),t.nodeName||(t=A.body),t}})?i.apply(t,n):i)||(A.exports=I)}()},2634:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883)],void 0===(I="function"==typeof(i=function(A){return A.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&A(t).trigger("blur")}})?i.apply(t,n):i)||(A.exports=I)}()},2299:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883)],void 0===(I="function"==typeof(i=function(A){return A.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,I=this.parents().filter((function(){var t=A(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))})).eq(0);return"fixed"!==e&&I.length?I:A(this[0].ownerDocument||document)}})?i.apply(t,n):i)||(A.exports=I)}()},7144:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(1255)],void 0===(I="function"==typeof(i=function(A){return A.extend(A.expr.pseudos,{tabbable:function(t){var e=A.attr(t,"tabindex"),i=null!=e;return(!i||e>=0)&&A.ui.focusable(t,i)}})})?i.apply(t,n):i)||(A.exports=I)}()},5304:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883)],void 0===(I="function"==typeof(i=function(A){return A.fn.extend({uniqueId:(t=0,function(){return this.each((function(){this.id||(this.id="ui-id-"+ ++t)}))}),removeUniqueId:function(){return this.each((function(){/^ui-id-\d+$/.test(this.id)&&A(this).removeAttr("id")}))}});var t})?i.apply(t,n):i)||(A.exports=I)}()},7604:function(A,t,e){var i,n,I;n=[e(4692)],i=function(A,t){var e,i={},n=i.toString,I=/^([\-+])=\s*(\d+\.?\d*)/,r=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(A){return[A[1],A[2],A[3],A[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(A){return[2.55*A[1],2.55*A[2],2.55*A[3],A[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,parse:function(A){return[parseInt(A[1],16),parseInt(A[2],16),parseInt(A[3],16),A[4]?(parseInt(A[4],16)/255).toFixed(2):1]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,parse:function(A){return[parseInt(A[1]+A[1],16),parseInt(A[2]+A[2],16),parseInt(A[3]+A[3],16),A[4]?(parseInt(A[4]+A[4],16)/255).toFixed(2):1]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(A){return[A[1],A[2]/100,A[3]/100,A[4]]}}],o=A.Color=function(t,e,i,n){return new A.Color.fn.parse(t,e,i,n)},g={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},a={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},M=o.support={},s=A("

")[0],c=A.each;function u(A){return null==A?A+"":"object"==typeof A?i[n.call(A)]||"object":typeof A}function l(A,t,e){var i=a[t.type]||{};return null==A?e||!t.def?null:t.def:(A=i.floor?~~A:parseFloat(A),isNaN(A)?t.def:i.mod?(A+i.mod)%i.mod:Math.min(i.max,Math.max(0,A)))}function C(t){var i=o(),n=i._rgba=[];return t=t.toLowerCase(),c(r,(function(A,e){var I,r=e.re.exec(t),o=r&&e.parse(r),a=e.space||"rgba";if(o)return I=i[a](o),i[g[a].cache]=I[g[a].cache],n=i._rgba=I._rgba,!1})),n.length?("0,0,0,0"===n.join()&&A.extend(n,e.transparent),i):e[t]}function T(A,t,e){return 6*(e=(e+1)%1)<1?A+(t-A)*e*6:2*e<1?t:3*e<2?A+(t-A)*(2/3-e)*6:A}s.style.cssText="background-color:rgba(1,1,1,.5)",M.rgba=s.style.backgroundColor.indexOf("rgba")>-1,c(g,(function(A,t){t.cache="_"+A,t.props.alpha={idx:3,type:"percent",def:1}})),A.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(A,t){i["[object "+t+"]"]=t.toLowerCase()})),o.fn=A.extend(o.prototype,{parse:function(i,n,I,r){if(i===t)return this._rgba=[null,null,null,null],this;(i.jquery||i.nodeType)&&(i=A(i).css(n),n=t);var a=this,M=u(i),s=this._rgba=[];return n!==t&&(i=[i,n,I,r],M="array"),"string"===M?this.parse(C(i)||e._default):"array"===M?(c(g.rgba.props,(function(A,t){s[t.idx]=l(i[t.idx],t)})),this):"object"===M?(c(g,i instanceof o?function(A,t){i[t.cache]&&(a[t.cache]=i[t.cache].slice())}:function(t,e){var n=e.cache;c(e.props,(function(A,t){if(!a[n]&&e.to){if("alpha"===A||null==i[A])return;a[n]=e.to(a._rgba)}a[n][t.idx]=l(i[A],t,!0)})),a[n]&&A.inArray(null,a[n].slice(0,3))<0&&(null==a[n][3]&&(a[n][3]=1),e.from&&(a._rgba=e.from(a[n])))}),this):void 0},is:function(A){var t=o(A),e=!0,i=this;return c(g,(function(A,n){var I,r=t[n.cache];return r&&(I=i[n.cache]||n.to&&n.to(i._rgba)||[],c(n.props,(function(A,t){if(null!=r[t.idx])return e=r[t.idx]===I[t.idx]}))),e})),e},_space:function(){var A=[],t=this;return c(g,(function(e,i){t[i.cache]&&A.push(e)})),A.pop()},transition:function(A,t){var e=o(A),i=e._space(),n=g[i],I=0===this.alpha()?o("transparent"):this,r=I[n.cache]||n.to(I._rgba),M=r.slice();return e=e[n.cache],c(n.props,(function(A,i){var n=i.idx,I=r[n],o=e[n],g=a[i.type]||{};null!==o&&(null===I?M[n]=o:(g.mod&&(o-I>g.mod/2?I+=g.mod:I-o>g.mod/2&&(I-=g.mod)),M[n]=l((o-I)*t+I,i)))})),this[i](M)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),i=e.pop(),n=o(t)._rgba;return o(A.map(e,(function(A,t){return(1-i)*n[t]+i*A})))},toRgbaString:function(){var t="rgba(",e=A.map(this._rgba,(function(A,t){return null!=A?A:t>2?1:0}));return 1===e[3]&&(e.pop(),t="rgb("),t+e.join()+")"},toHslaString:function(){var t="hsla(",e=A.map(this.hsla(),(function(A,t){return null==A&&(A=t>2?1:0),t&&t<3&&(A=Math.round(100*A)+"%"),A}));return 1===e[3]&&(e.pop(),t="hsl("),t+e.join()+")"},toHexString:function(t){var e=this._rgba.slice(),i=e.pop();return t&&e.push(~~(255*i)),"#"+A.map(e,(function(A){return 1===(A=(A||0).toString(16)).length?"0"+A:A})).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),o.fn.parse.prototype=o.fn,g.hsla.to=function(A){if(null==A[0]||null==A[1]||null==A[2])return[null,null,null,A[3]];var t,e,i=A[0]/255,n=A[1]/255,I=A[2]/255,r=A[3],o=Math.max(i,n,I),g=Math.min(i,n,I),a=o-g,M=o+g,s=.5*M;return t=g===o?0:i===o?60*(n-I)/a+360:n===o?60*(I-i)/a+120:60*(i-n)/a+240,e=0===a?0:s<=.5?a/M:a/(2-M),[Math.round(t)%360,e,s,null==r?1:r]},g.hsla.from=function(A){if(null==A[0]||null==A[1]||null==A[2])return[null,null,null,A[3]];var t=A[0]/360,e=A[1],i=A[2],n=A[3],I=i<=.5?i*(1+e):i+e-i*e,r=2*i-I;return[Math.round(255*T(r,I,t+1/3)),Math.round(255*T(r,I,t)),Math.round(255*T(r,I,t-1/3)),n]},c(g,(function(A,e){var i=e.props,n=e.cache,r=e.to,g=e.from;o.fn[A]=function(A){if(r&&!this[n]&&(this[n]=r(this._rgba)),A===t)return this[n].slice();var e,I=u(A),a="array"===I||"object"===I?A:arguments,M=this[n].slice();return c(i,(function(A,t){var e=a["object"===I?A:t.idx];null==e&&(e=M[t.idx]),M[t.idx]=l(e,t)})),g?((e=o(g(M)))[n]=M,e):o(M)},c(i,(function(t,e){o.fn[t]||(o.fn[t]=function(i){var n,r,o,g,a=u(i);return r=(n=this[g="alpha"===t?this._hsla?"hsla":"rgba":A]())[e.idx],"undefined"===a?r:("function"===a&&(a=u(i=i.call(this,r))),null==i&&e.empty?this:("string"===a&&(o=I.exec(i))&&(i=r+parseFloat(o[2])*("+"===o[1]?1:-1)),n[e.idx]=i,this[g](n)))})}))})),o.hook=function(t){var e=t.split(" ");c(e,(function(t,e){A.cssHooks[e]={set:function(t,i){var n,I,r="";if("transparent"!==i&&("string"!==u(i)||(n=C(i)))){if(i=o(n||i),!M.rgba&&1!==i._rgba[3]){for(I="backgroundColor"===e?t.parentNode:t;(""===r||"transparent"===r)&&I&&I.style;)try{r=A.css(I,"backgroundColor"),I=I.parentNode}catch(A){}i=i.blend(r&&"transparent"!==r?r:"_default")}i=i.toRgbaString()}try{t.style[e]=i}catch(A){}}},A.fx.step[e]=function(t){t.colorInit||(t.start=o(t.elem,e),t.end=o(t.end),t.colorInit=!0),A.cssHooks[e].set(t.elem,t.start.transition(t.end,t.pos))}}))},o.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),A.cssHooks.borderColor={expand:function(A){var t={};return c(["Top","Right","Bottom","Left"],(function(e,i){t["border"+i+"Color"]=A})),t}},e=A.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}},void 0===(I=i.apply(t,n))||(A.exports=I)},6883:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692)],void 0===(I="function"==typeof(i=function(A){return A.ui=A.ui||{},A.ui.version="1.13.2"})?i.apply(t,n):i)||(A.exports=I)}()},9139:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883)],i=function(A){var t,e=0,i=Array.prototype.hasOwnProperty,n=Array.prototype.slice;return A.cleanData=(t=A.cleanData,function(e){var i,n,I;for(I=0;null!=(n=e[I]);I++)(i=A._data(n,"events"))&&i.remove&&A(n).triggerHandler("remove");t(e)}),A.widget=function(t,e,i){var n,I,r,o={},g=t.split(".")[0],a=g+"-"+(t=t.split(".")[1]);return i||(i=e,e=A.Widget),Array.isArray(i)&&(i=A.extend.apply(null,[{}].concat(i))),A.expr.pseudos[a.toLowerCase()]=function(t){return!!A.data(t,a)},A[g]=A[g]||{},n=A[g][t],I=A[g][t]=function(A,t){if(!this||!this._createWidget)return new I(A,t);arguments.length&&this._createWidget(A,t)},A.extend(I,n,{version:i.version,_proto:A.extend({},i),_childConstructors:[]}),(r=new e).options=A.widget.extend({},r.options),A.each(i,(function(A,t){o[A]="function"==typeof t?function(){function i(){return e.prototype[A].apply(this,arguments)}function n(t){return e.prototype[A].apply(this,t)}return function(){var A,e=this._super,I=this._superApply;return this._super=i,this._superApply=n,A=t.apply(this,arguments),this._super=e,this._superApply=I,A}}():t})),I.prototype=A.widget.extend(r,{widgetEventPrefix:n&&r.widgetEventPrefix||t},o,{constructor:I,namespace:g,widgetName:t,widgetFullName:a}),n?(A.each(n._childConstructors,(function(t,e){var i=e.prototype;A.widget(i.namespace+"."+i.widgetName,I,e._proto)})),delete n._childConstructors):e._childConstructors.push(I),A.widget.bridge(t,I),I},A.widget.extend=function(t){for(var e,I,r=n.call(arguments,1),o=0,g=r.length;o",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,i){i=A(i||this.defaultElement||this)[0],this.element=A(i),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=A(),this.hoverable=A(),this.focusable=A(),this.classesElementLookup={},i!==this&&(A.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(A){A.target===i&&this.destroy()}}),this.document=A(i.style?i.ownerDocument:i.document||i),this.window=A(this.document[0].defaultView||this.document[0].parentWindow)),this.options=A.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:A.noop,_create:A.noop,_init:A.noop,destroy:function(){var t=this;this._destroy(),A.each(this.classesElementLookup,(function(A,e){t._removeClass(e,A)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:A.noop,widget:function(){return this.element},option:function(t,e){var i,n,I,r=t;if(0===arguments.length)return A.widget.extend({},this.options);if("string"==typeof t)if(r={},i=t.split("."),t=i.shift(),i.length){for(n=r[t]=A.widget.extend({},this.options[t]),I=0;I{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(1897),e(5304),e(9139)],void 0===(I="function"==typeof(i=function(A){return A.widget("ui.accordion",{version:"1.13.2",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:function(A){return A.find("> li > :first-child").add(A.find("> :not(li)").even())},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=A(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():A()}},_createIcons:function(){var t,e,i=this.options.icons;i&&(t=A(""),this._addClass(t,"ui-accordion-header-icon","ui-icon "+i.header),t.prependTo(this.headers),e=this.active.children(".ui-accordion-header-icon"),this._removeClass(e,i.header)._addClass(e,null,i.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var A;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),A=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&A.css("height","")},_setOption:function(A,t){"active"!==A?("event"===A&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(A,t),"collapsible"!==A||t||!1!==this.options.active||this._activate(0),"icons"===A&&(this._destroyIcons(),t&&this._createIcons())):this._activate(t)},_setOptionDisabled:function(A){this._super(A),this.element.attr("aria-disabled",A),this._toggleClass(null,"ui-state-disabled",!!A),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!A)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=A.ui.keyCode,i=this.headers.length,n=this.headers.index(t.target),I=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:I=this.headers[(n+1)%i];break;case e.LEFT:case e.UP:I=this.headers[(n-1+i)%i];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:I=this.headers[0];break;case e.END:I=this.headers[i-1]}I&&(A(t.target).attr("tabIndex",-1),A(I).attr("tabIndex",0),A(I).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===A.ui.keyCode.UP&&t.ctrlKey&&A(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=A()):!1===t.active?this._activate(0):this.active.length&&!A.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=A()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var A=this.headers,t=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),t&&(this._off(A.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,e=this.options,i=e.heightStyle,n=this.element.parent();this.active=this._findActive(e.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each((function(){var t=A(this),e=t.uniqueId().attr("id"),i=t.next(),n=i.uniqueId().attr("id");t.attr("aria-controls",n),i.attr("aria-labelledby",e)})).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(e.event),"fill"===i?(t=n.height(),this.element.siblings(":visible").each((function(){var e=A(this),i=e.css("position");"absolute"!==i&&"fixed"!==i&&(t-=e.outerHeight(!0))})),this.headers.each((function(){t-=A(this).outerHeight(!0)})),this.headers.next().each((function(){A(this).height(Math.max(0,t-A(this).innerHeight()+A(this).height()))})).css("overflow","auto")):"auto"===i&&(t=0,this.headers.next().each((function(){var e=A(this).is(":visible");e||A(this).show(),t=Math.max(t,A(this).css("height","").height()),e||A(this).hide()})).height(t))},_activate:function(t){var e=this._findActive(t)[0];e!==this.active[0]&&(e=e||this.active[0],this._eventHandler({target:e,currentTarget:e,preventDefault:A.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):A()},_setupEvents:function(t){var e={keydown:"_keydown"};t&&A.each(t.split(" "),(function(A,t){e[t]="_eventHandler"})),this._off(this.headers.add(this.headers.next())),this._on(this.headers,e),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e,i,n=this.options,I=this.active,r=A(t.currentTarget),o=r[0]===I[0],g=o&&n.collapsible,a=g?A():r.next(),M=I.next(),s={oldHeader:I,oldPanel:M,newHeader:g?A():r,newPanel:a};t.preventDefault(),o&&!n.collapsible||!1===this._trigger("beforeActivate",t,s)||(n.active=!g&&this.headers.index(r),this.active=o?A():r,this._toggle(s),this._removeClass(I,"ui-accordion-header-active","ui-state-active"),n.icons&&(e=I.children(".ui-accordion-header-icon"),this._removeClass(e,null,n.icons.activeHeader)._addClass(e,null,n.icons.header)),o||(this._removeClass(r,"ui-accordion-header-collapsed")._addClass(r,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=r.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.header)._addClass(i,null,n.icons.activeHeader)),this._addClass(r.next(),"ui-accordion-content-active")))},_toggle:function(t){var e=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=i,this.options.animate?this._animate(e,i,t):(i.hide(),e.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter((function(){return 0===parseInt(A(this).attr("tabIndex"),10)})).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(A,t,e){var i,n,I,r=this,o=0,g=A.css("box-sizing"),a=A.length&&(!t.length||A.index(){var i,n,I;!function(r){"use strict";n=[e(4692),e(8330),e(1897),e(4224),e(3300),e(6883),e(9139)],i=function(A){return A.widget("ui.autocomplete",{version:"1.13.2",defaultElement:"",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var t,e,i,n=this.element[0].nodeName.toLowerCase(),I="textarea"===n,r="input"===n;this.isMultiLine=I||!r&&this._isContentEditable(this.element),this.valueMethod=this.element[I||r?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,i=!0,void(e=!0);t=!1,i=!1,e=!1;var I=A.ui.keyCode;switch(n.keyCode){case I.PAGE_UP:t=!0,this._move("previousPage",n);break;case I.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case I.UP:t=!0,this._keyEvent("previous",n);break;case I.DOWN:t=!0,this._keyEvent("next",n);break;case I.ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case I.TAB:this.menu.active&&this.menu.select(n);break;case I.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:e=!0,this._searchTimeout(n)}},keypress:function(i){if(t)return t=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||i.preventDefault());if(!e){var n=A.ui.keyCode;switch(i.keyCode){case n.PAGE_UP:this._move("previousPage",i);break;case n.PAGE_DOWN:this._move("nextPage",i);break;case n.UP:this._keyEvent("previous",i);break;case n.DOWN:this._keyEvent("next",i)}}},input:function(A){if(i)return i=!1,void A.preventDefault();this._searchTimeout(A)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(A){clearTimeout(this.searching),this.close(A),this._change(A)}}),this._initSource(),this.menu=A("

    ").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(A){A.preventDefault()},menufocus:function(t,e){var i,n;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",(function(){A(t.target).trigger(t.originalEvent)}));n=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:n})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value),(i=e.item.attr("aria-label")||n.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay((function(){this.liveRegion.html(A("
    ").text(i))}),100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==A.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay((function(){this.previous=n,this.selectedItem=i}))),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=A("
    ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(A,t){this._super(A,t),"source"===A&&this._initSource(),"appendTo"===A&&this.menu.element.appendTo(this._appendTo()),"disabled"===A&&t&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||A.contains(e,t.target)},_closeOnClickOutside:function(A){this._isEventTargetInWidget(A)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?A(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,e,i=this;Array.isArray(this.options.source)?(t=this.options.source,this.source=function(e,i){i(A.ui.autocomplete.filter(t,e.term))}):"string"==typeof this.options.source?(e=this.options.source,this.source=function(t,n){i.xhr&&i.xhr.abort(),i.xhr=A.ajax({url:e,data:t,dataType:"json",success:function(A){n(A)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(A){clearTimeout(this.searching),this.searching=this._delay((function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=A.altKey||A.ctrlKey||A.metaKey||A.shiftKey;t&&(!t||e||i)||(this.selectedItem=null,this.search(null,A))}),this.options.delay)},search:function(A,t){return A=null!=A?A:this._value(),this.term=this._value(),A.length").append(A("
    ").text(e.label)).appendTo(t)},_move:function(A,t){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(A)||this.menu.isLastItem()&&/^next/.test(A)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[A](t);this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(A,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(A,t),t.preventDefault())},_isContentEditable:function(A){if(!A.length)return!1;var t=A.prop("contentEditable");return"inherit"===t?this._isContentEditable(A.parent()):"true"===t}}),A.extend(A.ui.autocomplete,{escapeRegex:function(A){return A.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(A.ui.autocomplete.escapeRegex(e),"i");return A.grep(t,(function(A){return i.test(A.label||A.value||A)}))}}),A.widget("ui.autocomplete",A.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(A){return A+(A>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay((function(){this.liveRegion.html(A("
    ").text(e))}),100))}}),A.ui.autocomplete},void 0===(I=i.apply(t,n))||(A.exports=I)}()},8481:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6605),e(2097),e(1897),e(9139)],i=function(A){var t;return A.widget("ui.button",{version:"1.13.2",defaultElement:"
    "+(V[0]>0&&x===V[1]-1?"
    ":""):"")}E+=B}return E+=M,t._keyEvent=!1,E},_generateMonthYearHeader:function(A,t,e,i,n,I,r,o){var g,a,M,s,c,u,l,C,T=this._get(A,"changeMonth"),h=this._get(A,"changeYear"),N=this._get(A,"showMonthAfterYear"),d=this._get(A,"selectMonthLabel"),y=this._get(A,"selectYearLabel"),E="
    ",D="";if(I||!T)D+=""+r[t]+"";else{for(g=i&&i.getFullYear()===e,a=n&&n.getFullYear()===e,D+=""}if(N||(E+=D+(!I&&T&&h?"":" ")),!A.yearshtml)if(A.yearshtml="",I||!h)E+=""+e+"";else{for(s=this._get(A,"yearRange").split(":"),c=(new Date).getFullYear(),u=function(A){var t=A.match(/c[+\-].*/)?e+parseInt(A.substring(1),10):A.match(/[+\-].*/)?c+parseInt(A,10):parseInt(A,10);return isNaN(t)?c:t},l=u(s[0]),C=Math.max(l,u(s[1]||"")),l=i?Math.max(l,i.getFullYear()):l,C=n?Math.min(C,n.getFullYear()):C,A.yearshtml+="",E+=A.yearshtml,A.yearshtml=null}return E+=this._get(A,"yearSuffix"),N&&(E+=(!I&&T&&h?"":" ")+D),E+"
    "},_adjustInstDate:function(A,t,e){var i=A.selectedYear+("Y"===e?t:0),n=A.selectedMonth+("M"===e?t:0),I=Math.min(A.selectedDay,this._getDaysInMonth(i,n))+("D"===e?t:0),r=this._restrictMinMax(A,this._daylightSavingAdjust(new Date(i,n,I)));A.selectedDay=r.getDate(),A.drawMonth=A.selectedMonth=r.getMonth(),A.drawYear=A.selectedYear=r.getFullYear(),"M"!==e&&"Y"!==e||this._notifyChange(A)},_restrictMinMax:function(A,t){var e=this._getMinMaxDate(A,"min"),i=this._getMinMaxDate(A,"max"),n=e&&ti?i:n},_notifyChange:function(A){var t=this._get(A,"onChangeMonthYear");t&&t.apply(A.input?A.input[0]:null,[A.selectedYear,A.selectedMonth+1,A])},_getNumberOfMonths:function(A){var t=this._get(A,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(A,t){return this._determineDate(A,this._get(A,t+"Date"),null)},_getDaysInMonth:function(A,t){return 32-this._daylightSavingAdjust(new Date(A,t,32)).getDate()},_getFirstDayOfMonth:function(A,t){return new Date(A,t,1).getDay()},_canAdjustMonth:function(A,t,e,i){var n=this._getNumberOfMonths(A),I=this._daylightSavingAdjust(new Date(e,i+(t<0?t:n[0]*n[1]),1));return t<0&&I.setDate(this._getDaysInMonth(I.getFullYear(),I.getMonth())),this._isInRange(A,I)},_isInRange:function(A,t){var e,i,n=this._getMinMaxDate(A,"min"),I=this._getMinMaxDate(A,"max"),r=null,o=null,g=this._get(A,"yearRange");return g&&(e=g.split(":"),i=(new Date).getFullYear(),r=parseInt(e[0],10),o=parseInt(e[1],10),e[0].match(/[+\-].*/)&&(r+=i),e[1].match(/[+\-].*/)&&(o+=i)),(!n||t.getTime()>=n.getTime())&&(!I||t.getTime()<=I.getTime())&&(!r||t.getFullYear()>=r)&&(!o||t.getFullYear()<=o)},_getFormatConfig:function(A){var t=this._get(A,"shortYearCutoff");return{shortYearCutoff:t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(A,"dayNamesShort"),dayNames:this._get(A,"dayNames"),monthNamesShort:this._get(A,"monthNamesShort"),monthNames:this._get(A,"monthNames")}},_formatDate:function(A,t,e,i){t||(A.currentDay=A.selectedDay,A.currentMonth=A.selectedMonth,A.currentYear=A.selectedYear);var n=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(i,e,t)):this._daylightSavingAdjust(new Date(A.currentYear,A.currentMonth,A.currentDay));return this.formatDate(this._get(A,"dateFormat"),n,this._getFormatConfig(A))}}),A.fn.datepicker=function(t){if(!this.length)return this;A.datepicker.initialized||(A(document).on("mousedown",A.datepicker._checkExternalClick),A.datepicker.initialized=!0),0===A("#"+A.datepicker._mainDivId).length&&A("body").append(A.datepicker.dpDiv);var e=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?A.datepicker["_"+t+"Datepicker"].apply(A.datepicker,[this[0]].concat(e)):this.each((function(){"string"==typeof t?A.datepicker["_"+t+"Datepicker"].apply(A.datepicker,[this].concat(e)):A.datepicker._attachDatepicker(this,t)})):A.datepicker["_"+t+"Datepicker"].apply(A.datepicker,[this[0]].concat(e))},A.datepicker=new e,A.datepicker.initialized=!1,A.datepicker.uuid=(new Date).getTime(),A.datepicker.version="1.13.2",A.datepicker},void 0===(I=i.apply(t,n))||(A.exports=I)}()},1193:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(8481),e(1758),e(3662),e(8604),e(1255),e(1897),e(4224),e(3300),e(2634),e(7144),e(5304),e(6883),e(9139)],i=function(A){return A.widget("ui.dialog",{version:"1.13.2",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var e=A(this).css(t).offset().top;e<0&&A(this).css("top",t.top-e)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&A.fn.draggable&&this._makeDraggable(),this.options.resizable&&A.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?A(t):this.document.find(t||"body").eq(0)},_destroy:function(){var A,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(A=t.parent.children().eq(t.index)).length&&A[0]!==this.element[0]?A.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:A.noop,enable:A.noop,close:function(t){var e=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||A.ui.safeBlur(A.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,(function(){e._trigger("close",t)})))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!1,n=this.uiDialog.siblings(".ui-front:visible").map((function(){return+A(this).css("z-index")})).get(),I=Math.max.apply(null,n);return I>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",I+1),i=!0),i&&!e&&this._trigger("focus",t),i},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=A(A.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,(function(){t._focusTabbable(),t._trigger("focus")})),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var A=this._focusedElement;A||(A=this.element.find("[autofocus]")),A.length||(A=this.element.find(":tabbable")),A.length||(A=this.uiDialogButtonPane.find(":tabbable")),A.length||(A=this.uiDialogTitlebarClose.filter(":tabbable")),A.length||(A=this.uiDialog),A.eq(0).trigger("focus")},_restoreTabbableFocus:function(){var t=A.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===t||A.contains(this.uiDialog[0],t)||this._focusTabbable()},_keepFocus:function(A){A.preventDefault(),this._restoreTabbableFocus(),this._delay(this._restoreTabbableFocus)},_createWrapper:function(){this.uiDialog=A("
    ").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===A.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);if(t.keyCode===A.ui.keyCode.TAB&&!t.isDefaultPrevented()){var e=this.uiDialog.find(":tabbable"),i=e.first(),n=e.last();t.target!==n[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==i[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay((function(){n.trigger("focus")})),t.preventDefault()):(this._delay((function(){i.trigger("focus")})),t.preventDefault())}},mousedown:function(A){this._moveToTop(A)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=A("
    "),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){A(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=A("").button({label:A("").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(A){A.preventDefault(),this.close(A)}}),t=A("").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(A){this.options.title?A.text(this.options.title):A.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=A("
    "),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=A("
    ").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var t=this,e=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),A.isEmptyObject(e)||Array.isArray(e)&&!e.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(A.each(e,(function(e,i){var n,I;i="function"==typeof i?{click:i,text:e}:i,i=A.extend({type:"button"},i),n=i.click,I={icon:i.icon,iconPosition:i.iconPosition,showLabel:i.showLabel,icons:i.icons,text:i.text},delete i.click,delete i.icon,delete i.iconPosition,delete i.showLabel,delete i.icons,"boolean"==typeof i.text&&delete i.text,A("",i).button(I).appendTo(t.uiButtonSet).on("click",(function(){n.apply(t.element[0],arguments)}))})),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var t=this,e=this.options;function i(A){return{position:A.position,offset:A.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(e,n){t._addClass(A(this),"ui-dialog-dragging"),t._blockFrames(),t._trigger("dragStart",e,i(n))},drag:function(A,e){t._trigger("drag",A,i(e))},stop:function(n,I){var r=I.offset.left-t.document.scrollLeft(),o=I.offset.top-t.document.scrollTop();e.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" top"+(o>=0?"+":"")+o,of:t.window},t._removeClass(A(this),"ui-dialog-dragging"),t._unblockFrames(),t._trigger("dragStop",n,i(I))}})},_makeResizable:function(){var t=this,e=this.options,i=e.resizable,n=this.uiDialog.css("position"),I="string"==typeof i?i:"n,e,s,w,se,sw,ne,nw";function r(A){return{originalPosition:A.originalPosition,originalSize:A.originalSize,position:A.position,size:A.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:this._minHeight(),handles:I,start:function(e,i){t._addClass(A(this),"ui-dialog-resizing"),t._blockFrames(),t._trigger("resizeStart",e,r(i))},resize:function(A,e){t._trigger("resize",A,r(e))},stop:function(i,n){var I=t.uiDialog.offset(),o=I.left-t.document.scrollLeft(),g=I.top-t.document.scrollTop();e.height=t.uiDialog.height(),e.width=t.uiDialog.width(),e.position={my:"left top",at:"left"+(o>=0?"+":"")+o+" top"+(g>=0?"+":"")+g,of:t.window},t._removeClass(A(this),"ui-dialog-resizing"),t._unblockFrames(),t._trigger("resizeStop",i,r(n))}}).css("position",n)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=A(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),e=A.inArray(this,t);-1!==e&&t.splice(e,1)},_trackingInstances:function(){var A=this.document.data("ui-dialog-instances");return A||(A=[],this.document.data("ui-dialog-instances",A)),A},_minHeight:function(){var A=this.options;return"auto"===A.height?A.minHeight:Math.min(A.minHeight,A.height)},_position:function(){var A=this.uiDialog.is(":visible");A||this.uiDialog.show(),this.uiDialog.position(this.options.position),A||this.uiDialog.hide()},_setOptions:function(t){var e=this,i=!1,n={};A.each(t,(function(A,t){e._setOption(A,t),A in e.sizeRelatedOptions&&(i=!0),A in e.resizableRelatedOptions&&(n[A]=t)})),i&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(t,e){var i,n,I=this.uiDialog;"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:A("").text(""+this.options.closeText).html()}),"draggable"===t&&((i=I.is(":data(ui-draggable)"))&&!e&&I.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((n=I.is(":data(ui-resizable)"))&&!e&&I.resizable("destroy"),n&&"string"==typeof e&&I.resizable("option","handles",e),n||!1===e||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var A,t,e,i=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),i.minWidth>i.width&&(i.width=i.minWidth),A=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),t=Math.max(0,i.minHeight-A),e="number"==typeof i.maxHeight?Math.max(0,i.maxHeight-A):"none","auto"===i.height?this.element.css({minHeight:t,maxHeight:e,height:"auto"}):this.element.height(Math.max(0,i.height-A)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map((function(){var t=A(this);return A("
    ").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!A(t.target).closest(".ui-dialog").length||!!A(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=A.fn.jquery.substring(0,4),e=!0;this._delay((function(){e=!1})),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(A){if(!e){var i=this._trackingInstances()[0];i._allowInteraction(A)||(A.preventDefault(),i._focusTabbable(),"3.4."!==t&&"3.5."!==t||i._delay(i._restoreTabbableFocus))}}.bind(this)),this.overlay=A("
    ").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var A=this.document.data("ui-dialog-overlays")-1;A?this.document.data("ui-dialog-overlays",A):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==A.uiBackCompat&&A.widget("ui.dialog",A.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(A,t){"dialogClass"===A&&this.uiDialog.removeClass(this.options.dialogClass).addClass(t),this._superApply(arguments)}}),A.ui.dialog},void 0===(I=i.apply(t,n))||(A.exports=I)}()},1758:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(3662),e(9983),e(2336),e(3300),e(2634),e(2299),e(6883),e(9139)],void 0===(I="function"==typeof(i=function(A){return A.widget("ui.draggable",A.ui.mouse,{version:"1.13.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(A,t){this._super(A,t),"handle"===A&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||A(t.target).closest(".ui-resizable-handle").length>0||(this.handle=this._getHandle(t),!this.handle||(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),0)))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map((function(){var t=A(this);return A("
    ").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=A.ui.safeActiveElement(this.document[0]);A(t.target).closest(e).length||A.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),A.ui.ddmanager&&(A.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter((function(){return"fixed"===A(this).css("position")})).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),A.ui.ddmanager&&!e.dropBehaviour&&A.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),A.ui.ddmanager&&A.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(A){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:A.pageX-this.offset.left,top:A.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){var i=this._uiHash();if(!1===this._trigger("drag",t,i))return this._mouseUp(new A.Event("mouseup",t)),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",A.ui.ddmanager&&A.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return A.ui.ddmanager&&!this.options.dropBehaviour&&(i=A.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,i)?A(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),(function(){!1!==e._trigger("stop",t)&&e._clear()})):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),A.ui.ddmanager&&A.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),A.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new A.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!A(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,i="function"==typeof e.helper,n=i?A(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(A){"string"==typeof A&&(A=A.split(" ")),Array.isArray(A)&&(A={left:+A[0],top:+A[1]||0}),"left"in A&&(this.offset.click.left=A.left+this.margins.left),"right"in A&&(this.offset.click.left=this.helperProportions.width-A.right+this.margins.left),"top"in A&&(this.offset.click.top=A.top+this.margins.top),"bottom"in A&&(this.offset.click.top=this.helperProportions.height-A.bottom+this.margins.top)},_isRootNode:function(A){return/(html|body)/i.test(A.tagName)||A===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&A.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var A=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:A.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:A.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,n=this.options,I=this.document[0];this.relativeContainer=null,n.containment?"window"!==n.containment?"document"!==n.containment?n.containment.constructor!==Array?("parent"===n.containment&&(n.containment=this.helper[0].parentNode),(i=(e=A(n.containment))[0])&&(t=/(scroll|auto)/.test(e.css("overflow")),this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=e)):this.containment=n.containment:this.containment=[0,0,A(I).width()-this.helperProportions.width-this.margins.left,(A(I).height()||I.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[A(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,A(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,A(window).scrollLeft()+A(window).width()-this.helperProportions.width-this.margins.left,A(window).scrollTop()+(A(window).height()||I.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(A,t){t||(t=this.position);var e="absolute"===A?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*e+this.offset.parent.top*e-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*e,left:t.left+this.offset.relative.left*e+this.offset.parent.left*e-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*e}},_generatePosition:function(A,t){var e,i,n,I,r=this.options,o=this._isRootNode(this.scrollParent[0]),g=A.pageX,a=A.pageY;return o&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(i=this.relativeContainer.offset(),e=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):e=this.containment,A.pageX-this.offset.click.lefte[2]&&(g=e[2]+this.offset.click.left),A.pageY-this.offset.click.top>e[3]&&(a=e[3]+this.offset.click.top)),r.grid&&(n=r.grid[1]?this.originalPageY+Math.round((a-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,a=e?n-this.offset.click.top>=e[1]||n-this.offset.click.top>e[3]?n:n-this.offset.click.top>=e[1]?n-r.grid[1]:n+r.grid[1]:n,I=r.grid[0]?this.originalPageX+Math.round((g-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,g=e?I-this.offset.click.left>=e[0]||I-this.offset.click.left>e[2]?I:I-this.offset.click.left>=e[0]?I-r.grid[0]:I+r.grid[0]:I),"y"===r.axis&&(g=this.originalPageX),"x"===r.axis&&(a=this.originalPageY)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:o?0:this.offset.scroll.top),left:g-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:o?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),A.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),A.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),A.ui.plugin.add("draggable","connectToSortable",{start:function(t,e,i){var n=A.extend({},e,{item:i.element});i.sortables=[],A(i.options.connectToSortable).each((function(){var e=A(this).sortable("instance");e&&!e.options.disabled&&(i.sortables.push(e),e.refreshPositions(),e._trigger("activate",t,n))}))},stop:function(t,e,i){var n=A.extend({},e,{item:i.element});i.cancelHelperRemoval=!1,A.each(i.sortables,(function(){var A=this;A.isOver?(A.isOver=0,i.cancelHelperRemoval=!0,A.cancelHelperRemoval=!1,A._storedCSS={position:A.placeholder.css("position"),top:A.placeholder.css("top"),left:A.placeholder.css("left")},A._mouseStop(t),A.options.helper=A.options._helper):(A.cancelHelperRemoval=!0,A._trigger("deactivate",t,n))}))},drag:function(t,e,i){A.each(i.sortables,(function(){var n=!1,I=this;I.positionAbs=i.positionAbs,I.helperProportions=i.helperProportions,I.offset.click=i.offset.click,I._intersectsWith(I.containerCache)&&(n=!0,A.each(i.sortables,(function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==I&&this._intersectsWith(this.containerCache)&&A.contains(I.element[0],this.element[0])&&(n=!1),n}))),n?(I.isOver||(I.isOver=1,i._parent=e.helper.parent(),I.currentItem=e.helper.appendTo(I.element).data("ui-sortable-item",!0),I.options._helper=I.options.helper,I.options.helper=function(){return e.helper[0]},t.target=I.currentItem[0],I._mouseCapture(t,!0),I._mouseStart(t,!0,!0),I.offset.click.top=i.offset.click.top,I.offset.click.left=i.offset.click.left,I.offset.parent.left-=i.offset.parent.left-I.offset.parent.left,I.offset.parent.top-=i.offset.parent.top-I.offset.parent.top,i._trigger("toSortable",t),i.dropped=I.element,A.each(i.sortables,(function(){this.refreshPositions()})),i.currentItem=i.element,I.fromOutside=i),I.currentItem&&(I._mouseDrag(t),e.position=I.position)):I.isOver&&(I.isOver=0,I.cancelHelperRemoval=!0,I.options._revert=I.options.revert,I.options.revert=!1,I._trigger("out",t,I._uiHash(I)),I._mouseStop(t,!0),I.options.revert=I.options._revert,I.options.helper=I.options._helper,I.placeholder&&I.placeholder.remove(),e.helper.appendTo(i._parent),i._refreshOffsets(t),e.position=i._generatePosition(t,!0),i._trigger("fromSortable",t),i.dropped=!1,A.each(i.sortables,(function(){this.refreshPositions()})))}))}}),A.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var n=A("body"),I=i.options;n.css("cursor")&&(I._cursor=n.css("cursor")),n.css("cursor",I.cursor)},stop:function(t,e,i){var n=i.options;n._cursor&&A("body").css("cursor",n._cursor)}}),A.ui.plugin.add("draggable","opacity",{start:function(t,e,i){var n=A(e.helper),I=i.options;n.css("opacity")&&(I._opacity=n.css("opacity")),n.css("opacity",I.opacity)},stop:function(t,e,i){var n=i.options;n._opacity&&A(e.helper).css("opacity",n._opacity)}}),A.ui.plugin.add("draggable","scroll",{start:function(A,t,e){e.scrollParentNotHidden||(e.scrollParentNotHidden=e.helper.scrollParent(!1)),e.scrollParentNotHidden[0]!==e.document[0]&&"HTML"!==e.scrollParentNotHidden[0].tagName&&(e.overflowOffset=e.scrollParentNotHidden.offset())},drag:function(t,e,i){var n=i.options,I=!1,r=i.scrollParentNotHidden[0],o=i.document[0];r!==o&&"HTML"!==r.tagName?(n.axis&&"x"===n.axis||(i.overflowOffset.top+r.offsetHeight-t.pageY=0;c--)a=(g=i.snapElements[c].left-i.margins.left)+i.snapElements[c].width,s=(M=i.snapElements[c].top-i.margins.top)+i.snapElements[c].height,ha+C||ds+C||!A.contains(i.snapElements[c].item.ownerDocument,i.snapElements[c].item)?(i.snapElements[c].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,A.extend(i._uiHash(),{snapItem:i.snapElements[c].item})),i.snapElements[c].snapping=!1):("inner"!==l.snapMode&&(n=Math.abs(M-d)<=C,I=Math.abs(s-N)<=C,r=Math.abs(g-h)<=C,o=Math.abs(a-T)<=C,n&&(e.position.top=i._convertPositionTo("relative",{top:M-i.helperProportions.height,left:0}).top),I&&(e.position.top=i._convertPositionTo("relative",{top:s,left:0}).top),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:g-i.helperProportions.width}).left),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:a}).left)),u=n||I||r||o,"outer"!==l.snapMode&&(n=Math.abs(M-N)<=C,I=Math.abs(s-d)<=C,r=Math.abs(g-T)<=C,o=Math.abs(a-h)<=C,n&&(e.position.top=i._convertPositionTo("relative",{top:M,left:0}).top),I&&(e.position.top=i._convertPositionTo("relative",{top:s-i.helperProportions.height,left:0}).top),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:g}).left),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:a-i.helperProportions.width}).left)),!i.snapElements[c].snapping&&(n||I||r||o||u)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,A.extend(i._uiHash(),{snapItem:i.snapElements[c].item})),i.snapElements[c].snapping=n||I||r||o||u)}}),A.ui.plugin.add("draggable","stack",{start:function(t,e,i){var n,I=i.options,r=A.makeArray(A(I.stack)).sort((function(t,e){return(parseInt(A(t).css("zIndex"),10)||0)-(parseInt(A(e).css("zIndex"),10)||0)}));r.length&&(n=parseInt(A(r[0]).css("zIndex"),10)||0,A(r).each((function(t){A(this).css("zIndex",n+t)})),this.css("zIndex",n+r.length))}}),A.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){var n=A(e.helper),I=i.options;n.css("zIndex")&&(I._zIndex=n.css("zIndex")),n.css("zIndex",I.zIndex)},stop:function(t,e,i){var n=i.options;n._zIndex&&A(e.helper).css("zIndex",n._zIndex)}}),A.ui.draggable})?i.apply(t,n):i)||(A.exports=I)}()},9914:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(1758),e(3662),e(6883),e(9139)],i=function(A){return A.widget("ui.droppable",{version:"1.13.2",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var A,t=this.options,e=t.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof e?e:function(A){return A.is(e)},this.proportions=function(){if(!arguments.length)return A||(A={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});A=arguments[0]},this._addToManager(t.scope),t.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){A.ui.ddmanager.droppables[t]=A.ui.ddmanager.droppables[t]||[],A.ui.ddmanager.droppables[t].push(this)},_splice:function(A){for(var t=0;t=t&&A=M&&r<=c||g>=M&&g<=c||rc)&&(I>=a&&I<=s||o>=a&&o<=s||Is);default:return!1}}}(),A.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var i,n,I=A.ui.ddmanager.droppables[t.options.scope]||[],r=e?e.type:null,o=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();A:for(i=0;i{var i,n,I;!function(r){"use strict";n=[e(4692),e(1897),e(4224),e(3300),e(5304),e(6883),e(9139)],void 0===(I="function"==typeof(i=function(A){return A.widget("ui.menu",{version:"1.13.2",defaultElement:"
      ",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(A){A.preventDefault(),this._activateItem(A)},"click .ui-menu-item":function(t){var e=A(t.target),i=A(A.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(A,t){var e=this.active||this._menuItems().first();t||this.focus(A,e)},blur:function(t){this._delay((function(){!A.contains(this.element[0],A.ui.safeActiveElement(this.document[0]))&&this.collapseAll(t)}))},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(A){this._closeOnDocumentClick(A)&&this.collapseAll(A,!0),this.mouseHandled=!1}})},_activateItem:function(t){if(!this.previousFilter&&(t.clientX!==this.lastMousePosition.x||t.clientY!==this.lastMousePosition.y)){this.lastMousePosition={x:t.clientX,y:t.clientY};var e=A(t.target).closest(".ui-menu-item"),i=A(t.currentTarget);e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i)))}},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each((function(){var t=A(this);t.data("ui-menu-submenu-caret")&&t.remove()}))},_keydown:function(t){var e,i,n,I,r=!0;switch(t.keyCode){case A.ui.keyCode.PAGE_UP:this.previousPage(t);break;case A.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case A.ui.keyCode.HOME:this._move("first","first",t);break;case A.ui.keyCode.END:this._move("last","last",t);break;case A.ui.keyCode.UP:this.previous(t);break;case A.ui.keyCode.DOWN:this.next(t);break;case A.ui.keyCode.LEFT:this.collapse(t);break;case A.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case A.ui.keyCode.ENTER:case A.ui.keyCode.SPACE:this._activate(t);break;case A.ui.keyCode.ESCAPE:this.collapse(t);break;default:r=!1,i=this.previousFilter||"",I=!1,n=t.keyCode>=96&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),n===i?I=!0:n=i+n,e=this._filterMenuItems(n),(e=I&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(n=String.fromCharCode(t.keyCode),e=this._filterMenuItems(n)),e.length?(this.focus(t,e),this.previousFilter=n,this.filterTimer=this._delay((function(){delete this.previousFilter}),1e3)):delete this.previousFilter}r&&t.preventDefault()},_activate:function(A){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(A):this.select(A))},refresh:function(){var t,e,i,n,I=this,r=this.options.icons.submenu,o=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=o.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each((function(){var t=A(this),e=t.prev(),i=A("").data("ui-menu-submenu-caret",!0);I._addClass(i,"ui-menu-icon","ui-icon "+r),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))})),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=o.add(this.element).find(this.options.items)).not(".ui-menu-item").each((function(){var t=A(this);I._isDivider(t)&&I._addClass(t,"ui-menu-divider","ui-widget-content")})),n=(i=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(n,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!A.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(A,t){if("icons"===A){var e=this.element.find(".ui-menu-icon");this._removeClass(e,null,this.options.icons.submenu)._addClass(e,null,t.submenu)}this._super(A,t)},_setOptionDisabled:function(A){this._super(A),this.element.attr("aria-disabled",String(A)),this._toggleClass(null,"ui-state-disabled",!!A)},focus:function(A,t){var e,i,n;this.blur(A,A&&"focus"===A.type),this._scrollIntoView(t),this.active=t.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),A&&"keydown"===A.type?this._close():this.timer=this._delay((function(){this._close()}),this.delay),(e=t.children(".ui-menu")).length&&A&&/^mouse/.test(A.type)&&this._startOpening(e),this.activeMenu=t.parent(),this._trigger("focus",A,{item:t})},_scrollIntoView:function(t){var e,i,n,I,r,o;this._hasScroll()&&(e=parseFloat(A.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(A.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-e-i,I=this.activeMenu.scrollTop(),r=this.activeMenu.height(),o=t.outerHeight(),n<0?this.activeMenu.scrollTop(I+n):n+o>r&&this.activeMenu.scrollTop(I+n-r+o))},blur:function(A,t){t||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",A,{item:this.active}),this.active=null)},_startOpening:function(A){clearTimeout(this.timer),"true"===A.attr("aria-hidden")&&(this.timer=this._delay((function(){this._close(),this._open(A)}),this.delay))},_open:function(t){var e=A.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(e)},collapseAll:function(t,e){clearTimeout(this.timer),this.timer=this._delay((function(){var i=e?this.element:A(t&&t.target).closest(this.element.find(".ui-menu"));i.length||(i=this.element),this._close(i),this.blur(t),this._removeClass(i.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=i}),e?0:this.delay)},_close:function(A){A||(A=this.active?this.active.parent():this.element),A.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!A(t.target).closest(".ui-menu").length},_isDivider:function(A){return!/[^\-\u2014\u2013\s]/.test(A.text())},collapse:function(A){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(A,t))},expand:function(A){var t=this.active&&this._menuItems(this.active.children(".ui-menu")).first();t&&t.length&&(this._open(t.parent()),this._delay((function(){this.focus(A,t)})))},next:function(A){this._move("next","first",A)},previous:function(A){this._move("prev","last",A)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(A){return(A||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(A,t,e){var i;this.active&&(i="first"===A||"last"===A?this.active["first"===A?"prevAll":"nextAll"](".ui-menu-item").last():this.active[A+"All"](".ui-menu-item").first()),i&&i.length&&this.active||(i=this._menuItems(this.activeMenu)[t]()),this.focus(e,i)},nextPage:function(t){var e,i,n;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,n=this.element.innerHeight(),0===A.fn.jquery.indexOf("3.2.")&&(n+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each((function(){return(e=A(this)).offset().top-i-n<0})),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var e,i,n;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,n=this.element.innerHeight(),0===A.fn.jquery.indexOf("3.2.")&&(n+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each((function(){return(e=A(this)).offset().top-i+n>0})),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight(){var i,n,I;!function(r){"use strict";n=[e(4692),e(8045),e(6883),e(9139)],void 0===(I="function"==typeof(i=function(A){var t=!1;return A(document).on("mouseup",(function(){t=!1})),A.widget("ui.mouse",{version:"1.13.2",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,(function(A){return t._mouseDown(A)})).on("click."+this.widgetName,(function(e){if(!0===A.data(e.target,t.widgetName+".preventClickEvent"))return A.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!t){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,n=1===e.which,I=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&A(e.target).closest(this.options.cancel).length;return!(n&&!I&&this._mouseCapture(e)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){i.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),0):(!0===A.data(e.target,this.widgetName+".preventClickEvent")&&A.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(A){return i._mouseMove(A)},this._mouseUpDelegate=function(A){return i._mouseUp(A)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),t=!0,0)))}},_mouseMove:function(t){if(this._mouseMoved){if(A.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&A.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,t=!1,e.preventDefault()},_mouseDistanceMet:function(A){return Math.max(Math.abs(this._mouseDownEvent.pageX-A.pageX),Math.abs(this._mouseDownEvent.pageY-A.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})?i.apply(t,n):i)||(A.exports=I)}()},6697:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(6883),e(9139)],void 0===(I="function"==typeof(i=function(A){return A.widget("ui.progressbar",{version:"1.13.2",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=A("
      ").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(A){if(void 0===A)return this.options.value;this.options.value=this._constrainedValue(A),this._refreshValue()},_constrainedValue:function(A){return void 0===A&&(A=this.options.value),this.indeterminate=!1===A,"number"!=typeof A&&(A=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,A))},_setOptions:function(A){var t=A.value;delete A.value,this._super(A),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(A,t){"max"===A&&(t=Math.max(this.min,t)),this._super(A,t)},_setOptionDisabled:function(A){this._super(A),this.element.attr("aria-disabled",A),this._toggleClass(null,"ui-state-disabled",!!A)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,e=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(e.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=A("
      ").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}})})?i.apply(t,n):i)||(A.exports=I)}()},8604:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(3662),e(724),e(2336),e(6883),e(9139)],i=function(A){return A.widget("ui.resizable",A.ui.mouse,{version:"1.13.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(A){return parseFloat(A)||0},_isNumber:function(A){return!isNaN(parseFloat(A))},_hasScroll:function(t,e){if("hidden"===A(t).css("overflow"))return!1;var i=e&&"left"===e?"scrollLeft":"scrollTop",n=!1;if(t[i]>0)return!0;try{t[i]=1,n=t[i]>0,t[i]=0}catch(A){}return n},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),A.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(A("
      ").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&A(this.element).on("mouseenter",(function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())})).on("mouseleave",(function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();var t,e=function(t){A(t).removeData("resizable").removeData("ui-resizable").off(".resizable")};return this.elementIsWrapper&&(e(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),e(this.originalElement),this},_setOption:function(A,t){switch(this._super(A,t),A){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!t}},_setupHandles:function(){var t,e,i,n,I,r=this.options,o=this;if(this.handles=r.handles||(A(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=A(),this._addedHandles=A(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e"),this._addClass(I,"ui-resizable-handle "+n),I.css({zIndex:r.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(I),this._addedHandles=this._addedHandles.add(I));this._renderAxis=function(t){var e,i,n,I;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=A(this.handles[e]),this._on(this.handles[e],{mousedown:o._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=A(this.handles[e],this.element),I=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),n=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(n,I),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",(function(){o.resizing||(this.className&&(I=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=I&&I[1]?I[1]:"se")})),r.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,n=!1;for(e in this.handles)((i=A(this.handles[e])[0])===t.target||A.contains(i,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var e,i,n,I=this.options,r=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),I.containment&&(e+=A(I.containment).scrollLeft()||0,i+=A(I.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof I.aspectRatio?I.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=A(".ui-resizable-"+this.axis).css("cursor"),A("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e,i,n=this.originalMousePosition,I=this.axis,r=t.pageX-n.left||0,o=t.pageY-n.top||0,g=this._change[I];return this._updatePrevProperties(),!!g&&(e=g.apply(this,[t,r,o]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),A.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1)},_mouseStop:function(t){this.resizing=!1;var e,i,n,I,r,o,g,a=this.options,M=this;return this._helper&&(n=(i=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:M.sizeDiff.height,I=i?0:M.sizeDiff.width,r={width:M.helper.width()-I,height:M.helper.height()-n},o=parseFloat(M.element.css("left"))+(M.position.left-M.originalPosition.left)||null,g=parseFloat(M.element.css("top"))+(M.position.top-M.originalPosition.top)||null,a.animate||this.element.css(A.extend(r,{top:g,left:o})),M.helper.height(M.size.height),M.helper.width(M.size.width),this._helper&&!a.animate&&this._proportionallyResize()),A("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var A={};return this.position.top!==this.prevPosition.top&&(A.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(A.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(A.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(A.height=this.size.height+"px"),this.helper.css(A),A},_updateVirtualBoundaries:function(A){var t,e,i,n,I,r=this.options;I={minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:1/0,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||A)&&(t=I.minHeight*this.aspectRatio,i=I.minWidth/this.aspectRatio,e=I.maxHeight*this.aspectRatio,n=I.maxWidth/this.aspectRatio,t>I.minWidth&&(I.minWidth=t),i>I.minHeight&&(I.minHeight=i),eA.width,r=this._isNumber(A.height)&&t.minHeight&&t.minHeight>A.height,o=this.originalPosition.left+this.originalSize.width,g=this.originalPosition.top+this.originalSize.height,a=/sw|nw|w/.test(e),M=/nw|ne|n/.test(e);return I&&(A.width=t.minWidth),r&&(A.height=t.minHeight),i&&(A.width=t.maxWidth),n&&(A.height=t.maxHeight),I&&a&&(A.left=o-t.minWidth),i&&a&&(A.left=o-t.maxWidth),r&&M&&(A.top=g-t.minHeight),n&&M&&(A.top=g-t.maxHeight),A.width||A.height||A.left||!A.top?A.width||A.height||A.top||!A.left||(A.left=null):A.top=null,A},_getPaddingPlusBorderDimensions:function(A){for(var t=0,e=[],i=[A.css("borderTopWidth"),A.css("borderRightWidth"),A.css("borderBottomWidth"),A.css("borderLeftWidth")],n=[A.css("paddingTop"),A.css("paddingRight"),A.css("paddingBottom"),A.css("paddingLeft")];t<4;t++)e[t]=parseFloat(i[t])||0,e[t]+=parseFloat(n[t])||0;return{height:e[0]+e[2],width:e[1]+e[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var A,t=0,e=this.helper||this.element;t
      ").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(A,t){return{width:this.originalSize.width+t}},w:function(A,t){var e=this.originalSize;return{left:this.originalPosition.left+t,width:e.width-t}},n:function(A,t,e){var i=this.originalSize;return{top:this.originalPosition.top+e,height:i.height-e}},s:function(A,t,e){return{height:this.originalSize.height+e}},se:function(t,e,i){return A.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return A.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return A.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return A.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){A.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),A.ui.plugin.add("resizable","animate",{stop:function(t){var e=A(this).resizable("instance"),i=e.options,n=e._proportionallyResizeElements,I=n.length&&/textarea/i.test(n[0].nodeName),r=I&&e._hasScroll(n[0],"left")?0:e.sizeDiff.height,o=I?0:e.sizeDiff.width,g={width:e.size.width-o,height:e.size.height-r},a=parseFloat(e.element.css("left"))+(e.position.left-e.originalPosition.left)||null,M=parseFloat(e.element.css("top"))+(e.position.top-e.originalPosition.top)||null;e.element.animate(A.extend(g,M&&a?{top:M,left:a}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var i={width:parseFloat(e.element.css("width")),height:parseFloat(e.element.css("height")),top:parseFloat(e.element.css("top")),left:parseFloat(e.element.css("left"))};n&&n.length&&A(n[0]).css({width:i.width,height:i.height}),e._updateCache(i),e._propagate("resize",t)}})}}),A.ui.plugin.add("resizable","containment",{start:function(){var t,e,i,n,I,r,o,g=A(this).resizable("instance"),a=g.options,M=g.element,s=a.containment,c=s instanceof A?s.get(0):/parent/.test(s)?M.parent().get(0):s;c&&(g.containerElement=A(c),/document/.test(s)||s===document?(g.containerOffset={left:0,top:0},g.containerPosition={left:0,top:0},g.parentData={element:A(document),left:0,top:0,width:A(document).width(),height:A(document).height()||document.body.parentNode.scrollHeight}):(t=A(c),e=[],A(["Top","Right","Left","Bottom"]).each((function(A,i){e[A]=g._num(t.css("padding"+i))})),g.containerOffset=t.offset(),g.containerPosition=t.position(),g.containerSize={height:t.innerHeight()-e[3],width:t.innerWidth()-e[1]},i=g.containerOffset,n=g.containerSize.height,I=g.containerSize.width,r=g._hasScroll(c,"left")?c.scrollWidth:I,o=g._hasScroll(c)?c.scrollHeight:n,g.parentData={element:c,left:i.left,top:i.top,width:r,height:o}))},resize:function(t){var e,i,n,I,r=A(this).resizable("instance"),o=r.options,g=r.containerOffset,a=r.position,M=r._aspectRatio||t.shiftKey,s={top:0,left:0},c=r.containerElement,u=!0;c[0]!==document&&/static/.test(c.css("position"))&&(s=g),a.left<(r._helper?g.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-g.left:r.position.left-s.left),M&&(r.size.height=r.size.width/r.aspectRatio,u=!1),r.position.left=o.helper?g.left:0),a.top<(r._helper?g.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-g.top:r.position.top),M&&(r.size.width=r.size.height*r.aspectRatio,u=!1),r.position.top=r._helper?g.top:0),n=r.containerElement.get(0)===r.element.parent().get(0),I=/relative|absolute/.test(r.containerElement.css("position")),n&&I?(r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top):(r.offset.left=r.element.offset().left,r.offset.top=r.element.offset().top),e=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-s.left:r.offset.left-g.left)),i=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-s.top:r.offset.top-g.top)),e+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-e,M&&(r.size.height=r.size.width/r.aspectRatio,u=!1)),i+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-i,M&&(r.size.width=r.size.height*r.aspectRatio,u=!1)),u||(r.position.left=r.prevPosition.left,r.position.top=r.prevPosition.top,r.size.width=r.prevSize.width,r.size.height=r.prevSize.height)},stop:function(){var t=A(this).resizable("instance"),e=t.options,i=t.containerOffset,n=t.containerPosition,I=t.containerElement,r=A(t.helper),o=r.offset(),g=r.outerWidth()-t.sizeDiff.width,a=r.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(I.css("position"))&&A(this).css({left:o.left-n.left-i.left,width:g,height:a}),t._helper&&!e.animate&&/static/.test(I.css("position"))&&A(this).css({left:o.left-n.left-i.left,width:g,height:a})}}),A.ui.plugin.add("resizable","alsoResize",{start:function(){var t=A(this).resizable("instance").options;A(t.alsoResize).each((function(){var t=A(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})}))},resize:function(t,e){var i=A(this).resizable("instance"),n=i.options,I=i.originalSize,r=i.originalPosition,o={height:i.size.height-I.height||0,width:i.size.width-I.width||0,top:i.position.top-r.top||0,left:i.position.left-r.left||0};A(n.alsoResize).each((function(){var t=A(this),i=A(this).data("ui-resizable-alsoresize"),n={},I=t.parents(e.originalElement[0]).length?["width","height"]:["width","height","top","left"];A.each(I,(function(A,t){var e=(i[t]||0)+(o[t]||0);e&&e>=0&&(n[t]=e||null)})),t.css(n)}))},stop:function(){A(this).removeData("ui-resizable-alsoresize")}}),A.ui.plugin.add("resizable","ghost",{start:function(){var t=A(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==A.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=A(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=A(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),A.ui.plugin.add("resizable","grid",{resize:function(){var t,e=A(this).resizable("instance"),i=e.options,n=e.size,I=e.originalSize,r=e.originalPosition,o=e.axis,g="number"==typeof i.grid?[i.grid,i.grid]:i.grid,a=g[0]||1,M=g[1]||1,s=Math.round((n.width-I.width)/a)*a,c=Math.round((n.height-I.height)/M)*M,u=I.width+s,l=I.height+c,C=i.maxWidth&&i.maxWidthu,N=i.minHeight&&i.minHeight>l;i.grid=g,h&&(u+=a),N&&(l+=M),C&&(u-=a),T&&(l-=M),/^(se|s|e)$/.test(o)?(e.size.width=u,e.size.height=l):/^(ne)$/.test(o)?(e.size.width=u,e.size.height=l,e.position.top=r.top-c):/^(sw)$/.test(o)?(e.size.width=u,e.size.height=l,e.position.left=r.left-s):((l-M<=0||u-a<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),l-M>0?(e.size.height=l,e.position.top=r.top-c):(l=M-t.height,e.size.height=l,e.position.top=r.top+I.height-l),u-a>0?(e.size.width=u,e.position.left=r.left-s):(u=a-t.width,e.size.width=u,e.position.left=r.left+I.width-u))}}),A.ui.resizable},void 0===(I=i.apply(t,n))||(A.exports=I)}()},1517:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(3662),e(6883),e(9139)],void 0===(I="function"==typeof(i=function(A){return A.widget("ui.selectable",A.ui.mouse,{version:"1.13.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t.elementPos=A(t.element[0]).offset(),t.selectees=A(t.options.filter,t.element[0]),t._addClass(t.selectees,"ui-selectee"),t.selectees.each((function(){var e=A(this),i=e.offset(),n={left:i.left-t.elementPos.left,top:i.top-t.elementPos.top};A.data(this,"selectable-item",{element:this,$element:e,left:n.left,top:n.top,right:n.left+e.outerWidth(),bottom:n.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})}))},this.refresh(),this._mouseInit(),this.helper=A("
      "),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(t){var e=this,i=this.options;this.opos=[t.pageX,t.pageY],this.elementPos=A(this.element[0]).offset(),this.options.disabled||(this.selectees=A(i.filter,this.element[0]),this._trigger("start",t),A(i.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),i.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each((function(){var i=A.data(this,"selectable-item");i.startselected=!0,t.metaKey||t.ctrlKey||(e._removeClass(i.$element,"ui-selected"),i.selected=!1,e._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,e._trigger("unselecting",t,{unselecting:i.element}))})),A(t.target).parents().addBack().each((function(){var i,n=A.data(this,"selectable-item");if(n)return i=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass("ui-selected"),e._removeClass(n.$element,i?"ui-unselecting":"ui-selected")._addClass(n.$element,i?"ui-selecting":"ui-unselecting"),n.unselecting=!i,n.selecting=i,n.selected=i,i?e._trigger("selecting",t,{selecting:n.element}):e._trigger("unselecting",t,{unselecting:n.element}),!1})))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var e,i=this,n=this.options,I=this.opos[0],r=this.opos[1],o=t.pageX,g=t.pageY;return I>o&&(e=o,o=I,I=e),r>g&&(e=g,g=r,r=e),this.helper.css({left:I,top:r,width:o-I,height:g-r}),this.selectees.each((function(){var e=A.data(this,"selectable-item"),a=!1,M={};e&&e.element!==i.element[0]&&(M.left=e.left+i.elementPos.left,M.right=e.right+i.elementPos.left,M.top=e.top+i.elementPos.top,M.bottom=e.bottom+i.elementPos.top,"touch"===n.tolerance?a=!(M.left>o||M.rightg||M.bottomI&&M.rightr&&M.bottom{var i,n,I;!function(r){"use strict";n=[e(4692),e(8330),e(7687),e(1897),e(2420),e(4224),e(5304),e(6883),e(9139)],void 0===(I="function"==typeof(i=function(A){return A.widget("ui.selectmenu",[A.ui.formResetMixin,{version:"1.13.2",defaultElement:"",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t=this._super(),e=this.element;return A.each(["min","max","step"],(function(A,i){var n=e.attr(i);null!=n&&n.length&&(t[i]=n)})),t},_events:{keydown:function(A){this._start(A)&&this._keydown(A)&&A.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(A){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",A))},mousewheel:function(t,e){var i=A.ui.safeActiveElement(this.document[0]);if(this.element[0]===i&&e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay((function(){this.spinning&&this._stop(t)}),100),t.preventDefault()}},"mousedown .ui-spinner-button":function(t){var e;function i(){this.element[0]===A.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=e,this._delay((function(){this.previous=e})))}e=this.element[0]===A.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay((function(){delete this.cancelBlur,i.call(this)})),!1!==this._start(t)&&this._repeat(null,A(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(A(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,A(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("").parent().append("")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(t){var e=this.options,i=A.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,e.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-e.page,t),!0}return!1},_start:function(A){return!(!this.spinning&&!1===this._trigger("start",A)||(this.counter||(this.counter=1),this.spinning=!0,0))},_repeat:function(A,t,e){A=A||500,clearTimeout(this.timer),this.timer=this._delay((function(){this._repeat(40,t,e)}),A),this._spin(t*this.options.step,e)},_spin:function(A,t){var e=this.value()||0;this.counter||(this.counter=1),e=this._adjustValue(e+A*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",t,{value:e})||(this._value(e),this.counter++)},_increment:function(A){var t=this.options.incremental;return t?"function"==typeof t?t(A):Math.floor(A*A*A/5e4-A*A/500+17*A/200+1):1},_precision:function(){var A=this._precisionOf(this.options.step);return null!==this.options.min&&(A=Math.max(A,this._precisionOf(this.options.min))),A},_precisionOf:function(A){var t=A.toString(),e=t.indexOf(".");return-1===e?0:t.length-e-1},_adjustValue:function(A){var t,e,i=this.options;return e=A-(t=null!==i.min?i.min:0),A=t+(e=Math.round(e/i.step)*i.step),A=parseFloat(A.toFixed(this._precision())),null!==i.max&&A>i.max?i.max:null!==i.min&&A"},_buttonHtml:function(){return""}}),A.ui.spinner},void 0===(I=i.apply(t,n))||(A.exports=I)}()},6325:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(1897),e(3300),e(5304),e(6883),e(9139)],i=function(A){var t;return A.widget("ui.tabs",{version:"1.13.2",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(t=/#.*$/,function(A){var e,i;e=A.href.replace(t,""),i=location.href.replace(t,"");try{e=decodeURIComponent(e)}catch(A){}try{i=decodeURIComponent(i)}catch(A){}return A.hash.length>1&&e===i}),_create:function(){var t=this,e=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,e.collapsible),this._processTabs(),e.active=this._initialActive(),Array.isArray(e.disabled)&&(e.disabled=A.uniqueSort(e.disabled.concat(A.map(this.tabs.filter(".ui-state-disabled"),(function(A){return t.tabs.index(A)})))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(e.active):this.active=A(),this._refresh(),this.active.length&&this.load(e.active)},_initialActive:function(){var t=this.options.active,e=this.options.collapsible,i=location.hash.substring(1);return null===t&&(i&&this.tabs.each((function(e,n){if(A(n).attr("aria-controls")===i)return t=e,!1})),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==t&&-1!==t||(t=!!this.tabs.length&&0)),!1!==t&&-1===(t=this.tabs.index(this.tabs.eq(t)))&&(t=!e&&0),!e&&!1===t&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):A()}},_tabKeydown:function(t){var e=A(A.ui.safeActiveElement(this.document[0])).closest("li"),i=this.tabs.index(e),n=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case A.ui.keyCode.RIGHT:case A.ui.keyCode.DOWN:i++;break;case A.ui.keyCode.UP:case A.ui.keyCode.LEFT:n=!1,i--;break;case A.ui.keyCode.END:i=this.anchors.length-1;break;case A.ui.keyCode.HOME:i=0;break;case A.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case A.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,n),t.ctrlKey||t.metaKey||(e.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay((function(){this.option("active",i)}),this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===A.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===A.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===A.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,e){var i=this.tabs.length-1;for(;-1!==A.inArray((t>i&&(t=0),t<0&&(t=i),t),this.options.disabled);)t=e?t+1:t-1;return t},_focusNextTab:function(A,t){return A=this._findNextTab(A,t),this.tabs.eq(A).trigger("focus"),A},_setOption:function(A,t){"active"!==A?(this._super(A,t),"collapsible"===A&&(this._toggleClass("ui-tabs-collapsible",null,t),t||!1!==this.options.active||this._activate(0)),"event"===A&&this._setupEvents(t),"heightStyle"===A&&this._setupHeightStyle(t)):this._activate(t)},_sanitizeSelector:function(A){return A?A.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=A.map(e.filter(".ui-state-disabled"),(function(A){return e.index(A)})),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!A.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=A()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=A()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,e=this.tabs,i=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",(function(t){A(this).is(".ui-state-disabled")&&t.preventDefault()})).on("focus"+this.eventNamespace,".ui-tabs-anchor",(function(){A(this).closest("li").is(".ui-state-disabled")&&this.blur()})),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map((function(){return A("a",this)[0]})).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=A(),this.anchors.each((function(e,i){var n,I,r,o=A(i).uniqueId().attr("id"),g=A(i).closest("li"),a=g.attr("aria-controls");t._isLocal(i)?(r=(n=i.hash).substring(1),I=t.element.find(t._sanitizeSelector(n))):(n="#"+(r=g.attr("aria-controls")||A({}).uniqueId()[0].id),(I=t.element.find(n)).length||(I=t._createPanel(r)).insertAfter(t.panels[e-1]||t.tablist),I.attr("aria-live","polite")),I.length&&(t.panels=t.panels.add(I)),a&&g.data("ui-tabs-aria-controls",a),g.attr({"aria-controls":r,"aria-labelledby":o}),I.attr("aria-labelledby",o)})),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),e&&(this._off(e.not(this.tabs)),this._off(i.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return A("
      ").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,i,n;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),n=0;i=this.tabs[n];n++)e=A(i),!0===t||-1!==A.inArray(n,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var e={};t&&A.each(t.split(" "),(function(A,t){e[t]="_eventHandler"})),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(A){A.preventDefault()}}),this._on(this.anchors,e),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var e,i=this.element.parent();"fill"===t?(e=i.height(),e-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each((function(){var t=A(this),i=t.css("position");"absolute"!==i&&"fixed"!==i&&(e-=t.outerHeight(!0))})),this.element.children().not(this.panels).each((function(){e-=A(this).outerHeight(!0)})),this.panels.each((function(){A(this).height(Math.max(0,e-A(this).innerHeight()+A(this).height()))})).css("overflow","auto")):"auto"===t&&(e=0,this.panels.each((function(){e=Math.max(e,A(this).height("").height())})).height(e))},_eventHandler:function(t){var e=this.options,i=this.active,n=A(t.currentTarget).closest("li"),I=n[0]===i[0],r=I&&e.collapsible,o=r?A():this._getPanelForTab(n),g=i.length?this._getPanelForTab(i):A(),a={oldTab:i,oldPanel:g,newTab:r?A():n,newPanel:o};t.preventDefault(),n.hasClass("ui-state-disabled")||n.hasClass("ui-tabs-loading")||this.running||I&&!e.collapsible||!1===this._trigger("beforeActivate",t,a)||(e.active=!r&&this.tabs.index(n),this.active=I?A():n,this.xhr&&this.xhr.abort(),g.length||o.length||A.error("jQuery UI Tabs: Mismatching fragment identifier."),o.length&&this.load(this.tabs.index(n),t),this._toggle(t,a))},_toggle:function(t,e){var i=this,n=e.newPanel,I=e.oldPanel;function r(){i.running=!1,i._trigger("activate",t,e)}function o(){i._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),n.length&&i.options.show?i._show(n,i.options.show,r):(n.show(),r())}this.running=!0,I.length&&this.options.hide?this._hide(I,this.options.hide,(function(){i._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),o()})):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),I.hide(),o()),I.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),n.length&&I.length?e.oldTab.attr("tabIndex",-1):n.length&&this.tabs.filter((function(){return 0===A(this).attr("tabIndex")})).attr("tabIndex",-1),n.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var e,i=this._findActive(t);i[0]!==this.active[0]&&(i.length||(i=this.active),e=i.find(".ui-tabs-anchor")[0],this._eventHandler({target:e,currentTarget:e,preventDefault:A.noop}))},_findActive:function(t){return!1===t?A():this.tabs.eq(t)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+A.escapeSelector(t)+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each((function(){A.data(this,"ui-tabs-destroy")?A(this).remove():A(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")})),this.tabs.each((function(){var t=A(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")})),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var e=this.options.disabled;!1!==e&&(void 0===t?e=!1:(t=this._getIndex(t),e=Array.isArray(e)?A.map(e,(function(A){return A!==t?A:null})):A.map(this.tabs,(function(A,e){return e!==t?e:null}))),this._setOptionDisabled(e))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==A.inArray(t,e))return;e=Array.isArray(e)?A.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,e){t=this._getIndex(t);var i=this,n=this.tabs.eq(t),I=n.find(".ui-tabs-anchor"),r=this._getPanelForTab(n),o={tab:n,panel:r},g=function(A,t){"abort"===t&&i.panels.stop(!1,!0),i._removeClass(n,"ui-tabs-loading"),r.removeAttr("aria-busy"),A===i.xhr&&delete i.xhr};this._isLocal(I[0])||(this.xhr=A.ajax(this._ajaxSettings(I,e,o)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.done((function(A,t,n){setTimeout((function(){r.html(A),i._trigger("load",e,o),g(n,t)}),1)})).fail((function(A,t){setTimeout((function(){g(A,t)}),1)}))))},_ajaxSettings:function(t,e,i){var n=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,I){return n._trigger("beforeLoad",e,A.extend({jqXHR:t,ajaxSettings:I},i))}}},_getPanelForTab:function(t){var e=A(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+e))}}),!1!==A.uiBackCompat&&A.widget("ui.tabs",A.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),A.ui.tabs},void 0===(I=i.apply(t,n))||(A.exports=I)}()},5670:(A,t,e)=>{var i,n,I;!function(r){"use strict";n=[e(4692),e(1897),e(4224),e(5304),e(6883),e(9139)],i=function(A){return A.widget("ui.tooltip",{version:"1.13.2",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=A(this).attr("title");return A("").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(A,t){var e=(A.attr("aria-describedby")||"").split(/\s+/);e.push(t),A.data("ui-tooltip-id",t).attr("aria-describedby",String.prototype.trim.call(e.join(" ")))},_removeDescribedBy:function(t){var e=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),n=A.inArray(e,i);-1!==n&&i.splice(n,1),t.removeData("ui-tooltip-id"),(i=String.prototype.trim.call(i.join(" ")))?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=A("
      ").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=A([])},_setOption:function(t,e){var i=this;this._super(t,e),"content"===t&&A.each(this.tooltips,(function(A,t){i._updateContent(t.element)}))},_setOptionDisabled:function(A){this[A?"_disable":"_enable"]()},_disable:function(){var t=this;A.each(this.tooltips,(function(e,i){var n=A.Event("blur");n.target=n.currentTarget=i.element[0],t.close(n,!0)})),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter((function(){var t=A(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")})))},_enable:function(){this.disabledTitles.each((function(){var t=A(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})),this.disabledTitles=A([])},open:function(t){var e=this,i=A(t?t.target:this.element).closest(this.options.items);i.length&&!i.data("ui-tooltip-id")&&(i.attr("title")&&i.data("ui-tooltip-title",i.attr("title")),i.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&i.parents().each((function(){var t,i=A(this);i.data("ui-tooltip-open")&&((t=A.Event("blur")).target=t.currentTarget=this,e.close(t,!0)),i.attr("title")&&(i.uniqueId(),e.parents[this.id]={element:this,title:i.attr("title")},i.attr("title",""))})),this._registerCloseHandlers(t,i),this._updateContent(i,t))},_updateContent:function(A,t){var e,i=this.options.content,n=this,I=t?t.type:null;if("string"==typeof i||i.nodeType||i.jquery)return this._open(t,A,i);(e=i.call(A[0],(function(e){n._delay((function(){A.data("ui-tooltip-open")&&(t&&(t.type=I),this._open(t,A,e))}))})))&&this._open(t,A,e)},_open:function(t,e,i){var n,I,r,o,g=A.extend({},this.options.position);function a(A){g.of=A,I.is(":hidden")||I.position(g)}i&&((n=this._find(e))?n.tooltip.find(".ui-tooltip-content").html(i):(e.is("[title]")&&(t&&"mouseover"===t.type?e.attr("title",""):e.removeAttr("title")),n=this._tooltip(e),I=n.tooltip,this._addDescribedBy(e,I.attr("id")),I.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),(o=A("
      ").html(I.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),o.removeAttr("id").find("[id]").removeAttr("id"),o.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:a}),a(t)):I.position(A.extend({of:e},this.options.position)),I.hide(),this._show(I,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval((function(){I.is(":visible")&&(a(g.of),clearInterval(r))}),13)),this._trigger("open",t,{tooltip:I})))},_registerCloseHandlers:function(t,e){var i={keyup:function(t){if(t.keyCode===A.ui.keyCode.ESCAPE){var i=A.Event(t);i.currentTarget=e[0],this.close(i,!0)}}};e[0]!==this.element[0]&&(i.remove=function(){var A=this._find(e);A&&this._removeTooltip(A.tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,e,i)},close:function(t){var e,i=this,n=A(t?t.currentTarget:this.element),I=this._find(n);I?(e=I.tooltip,I.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),I.hiding=!0,e.stop(!0),this._hide(e,this.options.hide,(function(){i._removeTooltip(A(this))})),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&A.each(this.parents,(function(t,e){A(e.element).attr("title",e.title),delete i.parents[t]})),I.closing=!0,this._trigger("close",t,{tooltip:e}),I.hiding||(I.closing=!1))):n.removeData("ui-tooltip-open")},_tooltip:function(t){var e=A("
      ").attr("role","tooltip"),i=A("
      ").appendTo(e),n=e.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(e,"ui-tooltip","ui-widget ui-widget-content"),e.appendTo(this._appendTo(t)),this.tooltips[n]={element:t,tooltip:e}},_find:function(A){var t=A.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(A){clearInterval(this.delayedShow),A.remove(),delete this.tooltips[A.attr("id")]},_appendTo:function(A){var t=A.closest(".ui-front, dialog");return t.length||(t=this.document[0].body),t},_destroy:function(){var t=this;A.each(this.tooltips,(function(e,i){var n=A.Event("blur"),I=i.element;n.target=n.currentTarget=I[0],t.close(n,!0),A("#"+e).remove(),I.data("ui-tooltip-title")&&(I.attr("title")||I.attr("title",I.data("ui-tooltip-title")),I.removeData("ui-tooltip-title"))})),this.liveRegion.remove()}}),!1!==A.uiBackCompat&&A.widget("ui.tooltip",A.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var A=this._superApply(arguments);return this.options.tooltipClass&&A.tooltip.addClass(this.options.tooltipClass),A}}),A.ui.tooltip},void 0===(I=i.apply(t,n))||(A.exports=I)}()},4692:function(A,t){var e;!function(t,e){"use strict";"object"==typeof A.exports?A.exports=t.document?e(t,!0):function(A){if(!A.document)throw new Error("jQuery requires a window with a document");return e(A)}:e(t)}("undefined"!=typeof window?window:this,(function(i,n){"use strict";var I=[],r=Object.getPrototypeOf,o=I.slice,g=I.flat?function(A){return I.flat.call(A)}:function(A){return I.concat.apply([],A)},a=I.push,M=I.indexOf,s={},c=s.toString,u=s.hasOwnProperty,l=u.toString,C=l.call(Object),T={},h=function(A){return"function"==typeof A&&"number"!=typeof A.nodeType&&"function"!=typeof A.item},N=function(A){return null!=A&&A===A.window},d=i.document,y={type:!0,src:!0,nonce:!0,noModule:!0};function E(A,t,e){var i,n,I=(e=e||d).createElement("script");if(I.text=A,t)for(i in y)(n=t[i]||t.getAttribute&&t.getAttribute(i))&&I.setAttribute(i,n);e.head.appendChild(I).parentNode.removeChild(I)}function D(A){return null==A?A+"":"object"==typeof A||"function"==typeof A?s[c.call(A)]||"object":typeof A}var j="3.7.1",B=/HTML$/i,x=function(A,t){return new x.fn.init(A,t)};function p(A){var t=!!A&&"length"in A&&A.length,e=D(A);return!h(A)&&!N(A)&&("array"===e||0===t||"number"==typeof t&&t>0&&t-1 in A)}function L(A,t){return A.nodeName&&A.nodeName.toLowerCase()===t.toLowerCase()}x.fn=x.prototype={jquery:j,constructor:x,length:0,toArray:function(){return o.call(this)},get:function(A){return null==A?o.call(this):A<0?this[A+this.length]:this[A]},pushStack:function(A){var t=x.merge(this.constructor(),A);return t.prevObject=this,t},each:function(A){return x.each(this,A)},map:function(A){return this.pushStack(x.map(this,(function(t,e){return A.call(t,e,t)})))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(x.grep(this,(function(A,t){return(t+1)%2})))},odd:function(){return this.pushStack(x.grep(this,(function(A,t){return t%2})))},eq:function(A){var t=this.length,e=+A+(A<0?t:0);return this.pushStack(e>=0&&e+~]|"+m+")"+m+"*"),G=new RegExp(m+"|>"),F=new RegExp(U),J=new RegExp("^"+S+"$"),H={ID:new RegExp("^#("+S+")"),CLASS:new RegExp("^\\.("+S+")"),TAG:new RegExp("^("+S+"|[*])"),ATTR:new RegExp("^"+Y),PSEUDO:new RegExp("^"+U),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+m+"*(even|odd|(([+-]|)(\\d*)n|)"+m+"*(?:([+-]|)"+m+"*(\\d+)|))"+m+"*\\)|)","i"),bool:new RegExp("^(?:"+p+")$","i"),needsContext:new RegExp("^"+m+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+m+"*((?:-\\d)?\\d*)"+m+"*\\)|)(?=[^-]|$)","i")},R=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,V=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,W=/[+~]/,Z=new RegExp("\\\\[\\da-fA-F]{1,6}"+m+"?|\\\\([^\\r\\n\\f])","g"),K=function(A,t){var e="0x"+A.slice(1)-65536;return t||(e<0?String.fromCharCode(e+65536):String.fromCharCode(e>>10|55296,1023&e|56320))},_=function(){gA()},q=cA((function(A){return!0===A.disabled&&L(A,"fieldset")}),{dir:"parentNode",next:"legend"});try{C.apply(I=o.call(O.childNodes),O.childNodes),I[O.childNodes.length].nodeType}catch(A){C={apply:function(A,t){v.apply(A,o.call(t))},call:function(A){v.apply(A,o.call(arguments,1))}}}function $(A,t,e,i){var n,I,r,o,a,M,u,l=t&&t.ownerDocument,N=t?t.nodeType:9;if(e=e||[],"string"!=typeof A||!A||1!==N&&9!==N&&11!==N)return e;if(!i&&(gA(t),t=t||g,s)){if(11!==N&&(a=V.exec(A)))if(n=a[1]){if(9===N){if(!(r=t.getElementById(n)))return e;if(r.id===n)return C.call(e,r),e}else if(l&&(r=l.getElementById(n))&&$.contains(t,r)&&r.id===n)return C.call(e,r),e}else{if(a[2])return C.apply(e,t.getElementsByTagName(A)),e;if((n=a[3])&&t.getElementsByClassName)return C.apply(e,t.getElementsByClassName(n)),e}if(!(j[A+" "]||c&&c.test(A))){if(u=A,l=t,1===N&&(G.test(A)||k.test(A))){for((l=W.test(A)&&oA(t.parentNode)||t)==t&&T.scope||((o=t.getAttribute("id"))?o=x.escapeSelector(o):t.setAttribute("id",o=h)),I=(M=MA(A)).length;I--;)M[I]=(o?"#"+o:":scope")+" "+sA(M[I]);u=M.join(",")}try{return C.apply(e,l.querySelectorAll(u)),e}catch(t){j(A,!0)}finally{o===h&&t.removeAttribute("id")}}}return NA(A.replace(Q,"$1"),t,e,i)}function AA(){var A=[];return function e(i,n){return A.push(i+" ")>t.cacheLength&&delete e[A.shift()],e[i+" "]=n}}function tA(A){return A[h]=!0,A}function eA(A){var t=g.createElement("fieldset");try{return!!A(t)}catch(A){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function iA(A){return function(t){return L(t,"input")&&t.type===A}}function nA(A){return function(t){return(L(t,"input")||L(t,"button"))&&t.type===A}}function IA(A){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===A:t.disabled===A:t.isDisabled===A||t.isDisabled!==!A&&q(t)===A:t.disabled===A:"label"in t&&t.disabled===A}}function rA(A){return tA((function(t){return t=+t,tA((function(e,i){for(var n,I=A([],e.length,t),r=I.length;r--;)e[n=I[r]]&&(e[n]=!(i[n]=e[n]))}))}))}function oA(A){return A&&void 0!==A.getElementsByTagName&&A}function gA(A){var e,i=A?A.ownerDocument||A:O;return i!=g&&9===i.nodeType&&i.documentElement?(a=(g=i).documentElement,s=!x.isXMLDoc(g),l=a.matches||a.webkitMatchesSelector||a.msMatchesSelector,a.msMatchesSelector&&O!=g&&(e=g.defaultView)&&e.top!==e&&e.addEventListener("unload",_),T.getById=eA((function(A){return a.appendChild(A).id=x.expando,!g.getElementsByName||!g.getElementsByName(x.expando).length})),T.disconnectedMatch=eA((function(A){return l.call(A,"*")})),T.scope=eA((function(){return g.querySelectorAll(":scope")})),T.cssHas=eA((function(){try{return g.querySelector(":has(*,:jqfake)"),!1}catch(A){return!0}})),T.getById?(t.filter.ID=function(A){var t=A.replace(Z,K);return function(A){return A.getAttribute("id")===t}},t.find.ID=function(A,t){if(void 0!==t.getElementById&&s){var e=t.getElementById(A);return e?[e]:[]}}):(t.filter.ID=function(A){var t=A.replace(Z,K);return function(A){var e=void 0!==A.getAttributeNode&&A.getAttributeNode("id");return e&&e.value===t}},t.find.ID=function(A,t){if(void 0!==t.getElementById&&s){var e,i,n,I=t.getElementById(A);if(I){if((e=I.getAttributeNode("id"))&&e.value===A)return[I];for(n=t.getElementsByName(A),i=0;I=n[i++];)if((e=I.getAttributeNode("id"))&&e.value===A)return[I]}return[]}}),t.find.TAG=function(A,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(A):t.querySelectorAll(A)},t.find.CLASS=function(A,t){if(void 0!==t.getElementsByClassName&&s)return t.getElementsByClassName(A)},c=[],eA((function(A){var t;a.appendChild(A).innerHTML="",A.querySelectorAll("[selected]").length||c.push("\\["+m+"*(?:value|"+p+")"),A.querySelectorAll("[id~="+h+"-]").length||c.push("~="),A.querySelectorAll("a#"+h+"+*").length||c.push(".#.+[+~]"),A.querySelectorAll(":checked").length||c.push(":checked"),(t=g.createElement("input")).setAttribute("type","hidden"),A.appendChild(t).setAttribute("name","D"),a.appendChild(A).disabled=!0,2!==A.querySelectorAll(":disabled").length&&c.push(":enabled",":disabled"),(t=g.createElement("input")).setAttribute("name",""),A.appendChild(t),A.querySelectorAll("[name='']").length||c.push("\\["+m+"*name"+m+"*="+m+"*(?:''|\"\")")})),T.cssHas||c.push(":has"),c=c.length&&new RegExp(c.join("|")),B=function(A,t){if(A===t)return r=!0,0;var e=!A.compareDocumentPosition-!t.compareDocumentPosition;return e||(1&(e=(A.ownerDocument||A)==(t.ownerDocument||t)?A.compareDocumentPosition(t):1)||!T.sortDetached&&t.compareDocumentPosition(A)===e?A===g||A.ownerDocument==O&&$.contains(O,A)?-1:t===g||t.ownerDocument==O&&$.contains(O,t)?1:n?M.call(n,A)-M.call(n,t):0:4&e?-1:1)},g):g}for(A in $.matches=function(A,t){return $(A,null,null,t)},$.matchesSelector=function(A,t){if(gA(A),s&&!j[t+" "]&&(!c||!c.test(t)))try{var e=l.call(A,t);if(e||T.disconnectedMatch||A.document&&11!==A.document.nodeType)return e}catch(A){j(t,!0)}return $(t,g,null,[A]).length>0},$.contains=function(A,t){return(A.ownerDocument||A)!=g&&gA(A),x.contains(A,t)},$.attr=function(A,e){(A.ownerDocument||A)!=g&&gA(A);var i=t.attrHandle[e.toLowerCase()],n=i&&u.call(t.attrHandle,e.toLowerCase())?i(A,e,!s):void 0;return void 0!==n?n:A.getAttribute(e)},$.error=function(A){throw new Error("Syntax error, unrecognized expression: "+A)},x.uniqueSort=function(A){var t,e=[],i=0,I=0;if(r=!T.sortStable,n=!T.sortStable&&o.call(A,0),z.call(A,B),r){for(;t=A[I++];)t===A[I]&&(i=e.push(I));for(;i--;)w.call(A,e[i],1)}return n=null,A},x.fn.uniqueSort=function(){return this.pushStack(x.uniqueSort(o.apply(this)))},t=x.expr={cacheLength:50,createPseudo:tA,match:H,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(A){return A[1]=A[1].replace(Z,K),A[3]=(A[3]||A[4]||A[5]||"").replace(Z,K),"~="===A[2]&&(A[3]=" "+A[3]+" "),A.slice(0,4)},CHILD:function(A){return A[1]=A[1].toLowerCase(),"nth"===A[1].slice(0,3)?(A[3]||$.error(A[0]),A[4]=+(A[4]?A[5]+(A[6]||1):2*("even"===A[3]||"odd"===A[3])),A[5]=+(A[7]+A[8]||"odd"===A[3])):A[3]&&$.error(A[0]),A},PSEUDO:function(A){var t,e=!A[6]&&A[2];return H.CHILD.test(A[0])?null:(A[3]?A[2]=A[4]||A[5]||"":e&&F.test(e)&&(t=MA(e,!0))&&(t=e.indexOf(")",e.length-t)-e.length)&&(A[0]=A[0].slice(0,t),A[2]=e.slice(0,t)),A.slice(0,3))}},filter:{TAG:function(A){var t=A.replace(Z,K).toLowerCase();return"*"===A?function(){return!0}:function(A){return L(A,t)}},CLASS:function(A){var t=y[A+" "];return t||(t=new RegExp("(^|"+m+")"+A+"("+m+"|$)"))&&y(A,(function(A){return t.test("string"==typeof A.className&&A.className||void 0!==A.getAttribute&&A.getAttribute("class")||"")}))},ATTR:function(A,t,e){return function(i){var n=$.attr(i,A);return null==n?"!="===t:!t||(n+="","="===t?n===e:"!="===t?n!==e:"^="===t?e&&0===n.indexOf(e):"*="===t?e&&n.indexOf(e)>-1:"$="===t?e&&n.slice(-e.length)===e:"~="===t?(" "+n.replace(b," ")+" ").indexOf(e)>-1:"|="===t&&(n===e||n.slice(0,e.length+1)===e+"-"))}},CHILD:function(A,t,e,i,n){var I="nth"!==A.slice(0,3),r="last"!==A.slice(-4),o="of-type"===t;return 1===i&&0===n?function(A){return!!A.parentNode}:function(t,e,g){var a,M,s,c,u,l=I!==r?"nextSibling":"previousSibling",C=t.parentNode,T=o&&t.nodeName.toLowerCase(),d=!g&&!o,y=!1;if(C){if(I){for(;l;){for(s=t;s=s[l];)if(o?L(s,T):1===s.nodeType)return!1;u=l="only"===A&&!u&&"nextSibling"}return!0}if(u=[r?C.firstChild:C.lastChild],r&&d){for(y=(c=(a=(M=C[h]||(C[h]={}))[A]||[])[0]===N&&a[1])&&a[2],s=c&&C.childNodes[c];s=++c&&s&&s[l]||(y=c=0)||u.pop();)if(1===s.nodeType&&++y&&s===t){M[A]=[N,c,y];break}}else if(d&&(y=c=(a=(M=t[h]||(t[h]={}))[A]||[])[0]===N&&a[1]),!1===y)for(;(s=++c&&s&&s[l]||(y=c=0)||u.pop())&&(!(o?L(s,T):1===s.nodeType)||!++y||(d&&((M=s[h]||(s[h]={}))[A]=[N,y]),s!==t)););return(y-=n)===i||y%i==0&&y/i>=0}}},PSEUDO:function(A,e){var i,n=t.pseudos[A]||t.setFilters[A.toLowerCase()]||$.error("unsupported pseudo: "+A);return n[h]?n(e):n.length>1?(i=[A,A,"",e],t.setFilters.hasOwnProperty(A.toLowerCase())?tA((function(A,t){for(var i,I=n(A,e),r=I.length;r--;)A[i=M.call(A,I[r])]=!(t[i]=I[r])})):function(A){return n(A,0,i)}):n}},pseudos:{not:tA((function(A){var t=[],e=[],i=hA(A.replace(Q,"$1"));return i[h]?tA((function(A,t,e,n){for(var I,r=i(A,null,n,[]),o=A.length;o--;)(I=r[o])&&(A[o]=!(t[o]=I))})):function(A,n,I){return t[0]=A,i(t,null,I,e),t[0]=null,!e.pop()}})),has:tA((function(A){return function(t){return $(A,t).length>0}})),contains:tA((function(A){return A=A.replace(Z,K),function(t){return(t.textContent||x.text(t)).indexOf(A)>-1}})),lang:tA((function(A){return J.test(A||"")||$.error("unsupported lang: "+A),A=A.replace(Z,K).toLowerCase(),function(t){var e;do{if(e=s?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(e=e.toLowerCase())===A||0===e.indexOf(A+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(A){var t=i.location&&i.location.hash;return t&&t.slice(1)===A.id},root:function(A){return A===a},focus:function(A){return A===function(){try{return g.activeElement}catch(A){}}()&&g.hasFocus()&&!!(A.type||A.href||~A.tabIndex)},enabled:IA(!1),disabled:IA(!0),checked:function(A){return L(A,"input")&&!!A.checked||L(A,"option")&&!!A.selected},selected:function(A){return A.parentNode&&A.parentNode.selectedIndex,!0===A.selected},empty:function(A){for(A=A.firstChild;A;A=A.nextSibling)if(A.nodeType<6)return!1;return!0},parent:function(A){return!t.pseudos.empty(A)},header:function(A){return X.test(A.nodeName)},input:function(A){return R.test(A.nodeName)},button:function(A){return L(A,"input")&&"button"===A.type||L(A,"button")},text:function(A){var t;return L(A,"input")&&"text"===A.type&&(null==(t=A.getAttribute("type"))||"text"===t.toLowerCase())},first:rA((function(){return[0]})),last:rA((function(A,t){return[t-1]})),eq:rA((function(A,t,e){return[e<0?e+t:e]})),even:rA((function(A,t){for(var e=0;et?t:e;--i>=0;)A.push(i);return A})),gt:rA((function(A,t,e){for(var i=e<0?e+t:e;++i1?function(t,e,i){for(var n=A.length;n--;)if(!A[n](t,e,i))return!1;return!0}:A[0]}function lA(A,t,e,i,n){for(var I,r=[],o=0,g=A.length,a=null!=t;o-1&&(I[a]=!(r[a]=c))}}else u=lA(u===r?u.splice(h,u.length):u),n?n(null,r,u,g):C.apply(r,u)}))}function TA(A){for(var i,n,I,r=A.length,o=t.relative[A[0].type],g=o||t.relative[" "],a=o?1:0,s=cA((function(A){return A===i}),g,!0),c=cA((function(A){return M.call(i,A)>-1}),g,!0),u=[function(A,t,n){var I=!o&&(n||t!=e)||((i=t).nodeType?s(A,t,n):c(A,t,n));return i=null,I}];a1&&uA(u),a>1&&sA(A.slice(0,a-1).concat({value:" "===A[a-2].type?"*":""})).replace(Q,"$1"),n,a0,I=A.length>0,r=function(r,o,a,M,c){var u,l,T,h=0,d="0",y=r&&[],E=[],D=e,j=r||I&&t.find.TAG("*",c),B=N+=null==D?1:Math.random()||.1,p=j.length;for(c&&(e=o==g||o||c);d!==p&&null!=(u=j[d]);d++){if(I&&u){for(l=0,o||u.ownerDocument==g||(gA(u),a=!s);T=A[l++];)if(T(u,o||g,a)){C.call(M,u);break}c&&(N=B)}n&&((u=!T&&u)&&h--,r&&y.push(u))}if(h+=d,n&&d!==h){for(l=0;T=i[l++];)T(y,E,o,a);if(r){if(h>0)for(;d--;)y[d]||E[d]||(E[d]=f.call(M));E=lA(E)}C.apply(M,E),c&&!r&&E.length>0&&h+i.length>1&&x.uniqueSort(M)}return c&&(N=B,e=D),y};return n?tA(r):r}(r,I)),o.selector=A}return o}function NA(A,e,i,n){var I,r,o,g,a,M="function"==typeof A&&A,c=!n&&MA(A=M.selector||A);if(i=i||[],1===c.length){if((r=c[0]=c[0].slice(0)).length>2&&"ID"===(o=r[0]).type&&9===e.nodeType&&s&&t.relative[r[1].type]){if(!(e=(t.find.ID(o.matches[0].replace(Z,K),e)||[])[0]))return i;M&&(e=e.parentNode),A=A.slice(r.shift().value.length)}for(I=H.needsContext.test(A)?0:r.length;I--&&(o=r[I],!t.relative[g=o.type]);)if((a=t.find[g])&&(n=a(o.matches[0].replace(Z,K),W.test(r[0].type)&&oA(e.parentNode)||e))){if(r.splice(I,1),!(A=n.length&&sA(r)))return C.apply(i,n),i;break}}return(M||hA(A,c))(n,e,!s,i,!e||W.test(A)&&oA(e.parentNode)||e),i}aA.prototype=t.filters=t.pseudos,t.setFilters=new aA,T.sortStable=h.split("").sort(B).join("")===h,gA(),T.sortDetached=eA((function(A){return 1&A.compareDocumentPosition(g.createElement("fieldset"))})),x.find=$,x.expr[":"]=x.expr.pseudos,x.unique=x.uniqueSort,$.compile=hA,$.select=NA,$.setDocument=gA,$.tokenize=MA,$.escape=x.escapeSelector,$.getText=x.text,$.isXML=x.isXMLDoc,$.selectors=x.expr,$.support=x.support,$.uniqueSort=x.uniqueSort}();var U=function(A,t,e){for(var i=[],n=void 0!==e;(A=A[t])&&9!==A.nodeType;)if(1===A.nodeType){if(n&&x(A).is(e))break;i.push(A)}return i},b=function(A,t){for(var e=[];A;A=A.nextSibling)1===A.nodeType&&A!==t&&e.push(A);return e},P=x.expr.match.needsContext,k=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function G(A,t,e){return h(t)?x.grep(A,(function(A,i){return!!t.call(A,i,A)!==e})):t.nodeType?x.grep(A,(function(A){return A===t!==e})):"string"!=typeof t?x.grep(A,(function(A){return M.call(t,A)>-1!==e})):x.filter(t,A,e)}x.filter=function(A,t,e){var i=t[0];return e&&(A=":not("+A+")"),1===t.length&&1===i.nodeType?x.find.matchesSelector(i,A)?[i]:[]:x.find.matches(A,x.grep(t,(function(A){return 1===A.nodeType})))},x.fn.extend({find:function(A){var t,e,i=this.length,n=this;if("string"!=typeof A)return this.pushStack(x(A).filter((function(){for(t=0;t1?x.uniqueSort(e):e},filter:function(A){return this.pushStack(G(this,A||[],!1))},not:function(A){return this.pushStack(G(this,A||[],!0))},is:function(A){return!!G(this,"string"==typeof A&&P.test(A)?x(A):A||[],!1).length}});var F,J=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(A,t,e){var i,n;if(!A)return this;if(e=e||F,"string"==typeof A){if(!(i="<"===A[0]&&">"===A[A.length-1]&&A.length>=3?[null,A,null]:J.exec(A))||!i[1]&&t)return!t||t.jquery?(t||e).find(A):this.constructor(t).find(A);if(i[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:d,!0)),k.test(i[1])&&x.isPlainObject(t))for(i in t)h(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(n=d.getElementById(i[2]))&&(this[0]=n,this.length=1),this}return A.nodeType?(this[0]=A,this.length=1,this):h(A)?void 0!==e.ready?e.ready(A):A(x):x.makeArray(A,this)}).prototype=x.fn,F=x(d);var H=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};function X(A,t){for(;(A=A[t])&&1!==A.nodeType;);return A}x.fn.extend({has:function(A){var t=x(A,this),e=t.length;return this.filter((function(){for(var A=0;A-1:1===e.nodeType&&x.find.matchesSelector(e,A))){I.push(e);break}return this.pushStack(I.length>1?x.uniqueSort(I):I)},index:function(A){return A?"string"==typeof A?M.call(x(A),this[0]):M.call(this,A.jquery?A[0]:A):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(A,t){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(A,t))))},addBack:function(A){return this.add(null==A?this.prevObject:this.prevObject.filter(A))}}),x.each({parent:function(A){var t=A.parentNode;return t&&11!==t.nodeType?t:null},parents:function(A){return U(A,"parentNode")},parentsUntil:function(A,t,e){return U(A,"parentNode",e)},next:function(A){return X(A,"nextSibling")},prev:function(A){return X(A,"previousSibling")},nextAll:function(A){return U(A,"nextSibling")},prevAll:function(A){return U(A,"previousSibling")},nextUntil:function(A,t,e){return U(A,"nextSibling",e)},prevUntil:function(A,t,e){return U(A,"previousSibling",e)},siblings:function(A){return b((A.parentNode||{}).firstChild,A)},children:function(A){return b(A.firstChild)},contents:function(A){return null!=A.contentDocument&&r(A.contentDocument)?A.contentDocument:(L(A,"template")&&(A=A.content||A),x.merge([],A.childNodes))}},(function(A,t){x.fn[A]=function(e,i){var n=x.map(this,t,e);return"Until"!==A.slice(-5)&&(i=e),i&&"string"==typeof i&&(n=x.filter(i,n)),this.length>1&&(R[A]||x.uniqueSort(n),H.test(A)&&n.reverse()),this.pushStack(n)}}));var V=/[^\x20\t\r\n\f]+/g;function W(A){return A}function Z(A){throw A}function K(A,t,e,i){var n;try{A&&h(n=A.promise)?n.call(A).done(t).fail(e):A&&h(n=A.then)?n.call(A,t,e):t.apply(void 0,[A].slice(i))}catch(A){e.apply(void 0,[A])}}x.Callbacks=function(A){A="string"==typeof A?function(A){var t={};return x.each(A.match(V)||[],(function(A,e){t[e]=!0})),t}(A):x.extend({},A);var t,e,i,n,I=[],r=[],o=-1,g=function(){for(n=n||A.once,i=t=!0;r.length;o=-1)for(e=r.shift();++o-1;)I.splice(e,1),e<=o&&o--})),this},has:function(A){return A?x.inArray(A,I)>-1:I.length>0},empty:function(){return I&&(I=[]),this},disable:function(){return n=r=[],I=e="",this},disabled:function(){return!I},lock:function(){return n=r=[],e||t||(I=e=""),this},locked:function(){return!!n},fireWith:function(A,e){return n||(e=[A,(e=e||[]).slice?e.slice():e],r.push(e),t||g()),this},fire:function(){return a.fireWith(this,arguments),this},fired:function(){return!!i}};return a},x.extend({Deferred:function(A){var t=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],e="pending",n={state:function(){return e},always:function(){return I.done(arguments).fail(arguments),this},catch:function(A){return n.then(null,A)},pipe:function(){var A=arguments;return x.Deferred((function(e){x.each(t,(function(t,i){var n=h(A[i[4]])&&A[i[4]];I[i[1]]((function(){var A=n&&n.apply(this,arguments);A&&h(A.promise)?A.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[i[0]+"With"](this,n?[A]:arguments)}))})),A=null})).promise()},then:function(A,e,n){var I=0;function r(A,t,e,n){return function(){var o=this,g=arguments,a=function(){var i,a;if(!(A=I&&(e!==Z&&(o=void 0,g=[i]),t.rejectWith(o,g))}};A?M():(x.Deferred.getErrorHook?M.error=x.Deferred.getErrorHook():x.Deferred.getStackHook&&(M.error=x.Deferred.getStackHook()),i.setTimeout(M))}}return x.Deferred((function(i){t[0][3].add(r(0,i,h(n)?n:W,i.notifyWith)),t[1][3].add(r(0,i,h(A)?A:W)),t[2][3].add(r(0,i,h(e)?e:Z))})).promise()},promise:function(A){return null!=A?x.extend(A,n):n}},I={};return x.each(t,(function(A,i){var r=i[2],o=i[5];n[i[1]]=r.add,o&&r.add((function(){e=o}),t[3-A][2].disable,t[3-A][3].disable,t[0][2].lock,t[0][3].lock),r.add(i[3].fire),I[i[0]]=function(){return I[i[0]+"With"](this===I?void 0:this,arguments),this},I[i[0]+"With"]=r.fireWith})),n.promise(I),A&&A.call(I,I),I},when:function(A){var t=arguments.length,e=t,i=Array(e),n=o.call(arguments),I=x.Deferred(),r=function(A){return function(e){i[A]=this,n[A]=arguments.length>1?o.call(arguments):e,--t||I.resolveWith(i,n)}};if(t<=1&&(K(A,I.done(r(e)).resolve,I.reject,!t),"pending"===I.state()||h(n[e]&&n[e].then)))return I.then();for(;e--;)K(n[e],r(e),I.reject);return I.promise()}});var _=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(A,t){i.console&&i.console.warn&&A&&_.test(A.name)&&i.console.warn("jQuery.Deferred exception: "+A.message,A.stack,t)},x.readyException=function(A){i.setTimeout((function(){throw A}))};var q=x.Deferred();function $(){d.removeEventListener("DOMContentLoaded",$),i.removeEventListener("load",$),x.ready()}x.fn.ready=function(A){return q.then(A).catch((function(A){x.readyException(A)})),this},x.extend({isReady:!1,readyWait:1,ready:function(A){(!0===A?--x.readyWait:x.isReady)||(x.isReady=!0,!0!==A&&--x.readyWait>0||q.resolveWith(d,[x]))}}),x.ready.then=q.then,"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?i.setTimeout(x.ready):(d.addEventListener("DOMContentLoaded",$),i.addEventListener("load",$));var AA=function(A,t,e,i,n,I,r){var o=0,g=A.length,a=null==e;if("object"===D(e))for(o in n=!0,e)AA(A,t,o,e[o],!0,I,r);else if(void 0!==i&&(n=!0,h(i)||(r=!0),a&&(r?(t.call(A,i),t=null):(a=t,t=function(A,t,e){return a.call(x(A),e)})),t))for(;o1,null,!0)},removeData:function(A){return this.each((function(){gA.remove(this,A)}))}}),x.extend({queue:function(A,t,e){var i;if(A)return t=(t||"fx")+"queue",i=oA.get(A,t),e&&(!i||Array.isArray(e)?i=oA.access(A,t,x.makeArray(e)):i.push(e)),i||[]},dequeue:function(A,t){t=t||"fx";var e=x.queue(A,t),i=e.length,n=e.shift(),I=x._queueHooks(A,t);"inprogress"===n&&(n=e.shift(),i--),n&&("fx"===t&&e.unshift("inprogress"),delete I.stop,n.call(A,(function(){x.dequeue(A,t)}),I)),!i&&I&&I.empty.fire()},_queueHooks:function(A,t){var e=t+"queueHooks";return oA.get(A,e)||oA.access(A,e,{empty:x.Callbacks("once memory").add((function(){oA.remove(A,[t+"queue",e])}))})}}),x.fn.extend({queue:function(A,t){var e=2;return"string"!=typeof A&&(t=A,A="fx",e--),arguments.length\x20\t\r\n\f]*)/i,LA=/^$|^module$|\/(?:java|ecma)script/i;jA=d.createDocumentFragment().appendChild(d.createElement("div")),(BA=d.createElement("input")).setAttribute("type","radio"),BA.setAttribute("checked","checked"),BA.setAttribute("name","t"),jA.appendChild(BA),T.checkClone=jA.cloneNode(!0).cloneNode(!0).lastChild.checked,jA.innerHTML="",T.noCloneChecked=!!jA.cloneNode(!0).lastChild.defaultValue,jA.innerHTML="",T.option=!!jA.lastChild;var fA={thead:[1,"","
      "],col:[2,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],_default:[0,"",""]};function zA(A,t){var e;return e=void 0!==A.getElementsByTagName?A.getElementsByTagName(t||"*"):void 0!==A.querySelectorAll?A.querySelectorAll(t||"*"):[],void 0===t||t&&L(A,t)?x.merge([A],e):e}function wA(A,t){for(var e=0,i=A.length;e",""]);var mA=/<|&#?\w+;/;function QA(A,t,e,i,n){for(var I,r,o,g,a,M,s=t.createDocumentFragment(),c=[],u=0,l=A.length;u-1)n&&n.push(I);else if(a=TA(I),r=zA(s.appendChild(I),"script"),a&&wA(r),e)for(M=0;I=r[M++];)LA.test(I.type||"")&&e.push(I);return s}var SA=/^([^.]*)(?:\.(.+)|)/;function YA(){return!0}function OA(){return!1}function vA(A,t,e,i,n,I){var r,o;if("object"==typeof t){for(o in"string"!=typeof e&&(i=i||e,e=void 0),t)vA(A,o,e,i,t[o],I);return A}if(null==i&&null==n?(n=e,i=e=void 0):null==n&&("string"==typeof e?(n=i,i=void 0):(n=i,i=e,e=void 0)),!1===n)n=OA;else if(!n)return A;return 1===I&&(r=n,n=function(A){return x().off(A),r.apply(this,arguments)},n.guid=r.guid||(r.guid=x.guid++)),A.each((function(){x.event.add(this,t,n,i,e)}))}function UA(A,t,e){e?(oA.set(A,t,!1),x.event.add(A,t,{namespace:!1,handler:function(A){var e,i=oA.get(this,t);if(1&A.isTrigger&&this[t]){if(i)(x.event.special[t]||{}).delegateType&&A.stopPropagation();else if(i=o.call(arguments),oA.set(this,t,i),this[t](),e=oA.get(this,t),oA.set(this,t,!1),i!==e)return A.stopImmediatePropagation(),A.preventDefault(),e}else i&&(oA.set(this,t,x.event.trigger(i[0],i.slice(1),this)),A.stopPropagation(),A.isImmediatePropagationStopped=YA)}})):void 0===oA.get(A,t)&&x.event.add(A,t,YA)}x.event={global:{},add:function(A,t,e,i,n){var I,r,o,g,a,M,s,c,u,l,C,T=oA.get(A);if(IA(A))for(e.handler&&(e=(I=e).handler,n=I.selector),n&&x.find.matchesSelector(CA,n),e.guid||(e.guid=x.guid++),(g=T.events)||(g=T.events=Object.create(null)),(r=T.handle)||(r=T.handle=function(t){return void 0!==x&&x.event.triggered!==t.type?x.event.dispatch.apply(A,arguments):void 0}),a=(t=(t||"").match(V)||[""]).length;a--;)u=C=(o=SA.exec(t[a])||[])[1],l=(o[2]||"").split(".").sort(),u&&(s=x.event.special[u]||{},u=(n?s.delegateType:s.bindType)||u,s=x.event.special[u]||{},M=x.extend({type:u,origType:C,data:i,handler:e,guid:e.guid,selector:n,needsContext:n&&x.expr.match.needsContext.test(n),namespace:l.join(".")},I),(c=g[u])||((c=g[u]=[]).delegateCount=0,s.setup&&!1!==s.setup.call(A,i,l,r)||A.addEventListener&&A.addEventListener(u,r)),s.add&&(s.add.call(A,M),M.handler.guid||(M.handler.guid=e.guid)),n?c.splice(c.delegateCount++,0,M):c.push(M),x.event.global[u]=!0)},remove:function(A,t,e,i,n){var I,r,o,g,a,M,s,c,u,l,C,T=oA.hasData(A)&&oA.get(A);if(T&&(g=T.events)){for(a=(t=(t||"").match(V)||[""]).length;a--;)if(u=C=(o=SA.exec(t[a])||[])[1],l=(o[2]||"").split(".").sort(),u){for(s=x.event.special[u]||{},c=g[u=(i?s.delegateType:s.bindType)||u]||[],o=o[2]&&new RegExp("(^|\\.)"+l.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=I=c.length;I--;)M=c[I],!n&&C!==M.origType||e&&e.guid!==M.guid||o&&!o.test(M.namespace)||i&&i!==M.selector&&("**"!==i||!M.selector)||(c.splice(I,1),M.selector&&c.delegateCount--,s.remove&&s.remove.call(A,M));r&&!c.length&&(s.teardown&&!1!==s.teardown.call(A,l,T.handle)||x.removeEvent(A,u,T.handle),delete g[u])}else for(u in g)x.event.remove(A,u+t[a],e,i,!0);x.isEmptyObject(g)&&oA.remove(A,"handle events")}},dispatch:function(A){var t,e,i,n,I,r,o=new Array(arguments.length),g=x.event.fix(A),a=(oA.get(this,"events")||Object.create(null))[g.type]||[],M=x.event.special[g.type]||{};for(o[0]=g,t=1;t=1))for(;a!==this;a=a.parentNode||this)if(1===a.nodeType&&("click"!==A.type||!0!==a.disabled)){for(I=[],r={},e=0;e-1:x.find(n,this,null,[a]).length),r[n]&&I.push(i);I.length&&o.push({elem:a,handlers:I})}return a=this,g\s*$/g;function GA(A,t){return L(A,"table")&&L(11!==t.nodeType?t:t.firstChild,"tr")&&x(A).children("tbody")[0]||A}function FA(A){return A.type=(null!==A.getAttribute("type"))+"/"+A.type,A}function JA(A){return"true/"===(A.type||"").slice(0,5)?A.type=A.type.slice(5):A.removeAttribute("type"),A}function HA(A,t){var e,i,n,I,r,o;if(1===t.nodeType){if(oA.hasData(A)&&(o=oA.get(A).events))for(n in oA.remove(t,"handle events"),o)for(e=0,i=o[n].length;e1&&"string"==typeof l&&!T.checkClone&&PA.test(l))return A.each((function(n){var I=A.eq(n);C&&(t[0]=l.call(this,n,I.html())),XA(I,t,e,i)}));if(c&&(I=(n=QA(t,A[0].ownerDocument,!1,A,i)).firstChild,1===n.childNodes.length&&(n=I),I||i)){for(o=(r=x.map(zA(n,"script"),FA)).length;s0&&wA(r,!g&&zA(A,"script")),o},cleanData:function(A){for(var t,e,i,n=x.event.special,I=0;void 0!==(e=A[I]);I++)if(IA(e)){if(t=e[oA.expando]){if(t.events)for(i in t.events)n[i]?x.event.remove(e,i):x.removeEvent(e,i,t.handle);e[oA.expando]=void 0}e[gA.expando]&&(e[gA.expando]=void 0)}}}),x.fn.extend({detach:function(A){return VA(this,A,!0)},remove:function(A){return VA(this,A)},text:function(A){return AA(this,(function(A){return void 0===A?x.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=A)}))}),null,A,arguments.length)},append:function(){return XA(this,arguments,(function(A){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||GA(this,A).appendChild(A)}))},prepend:function(){return XA(this,arguments,(function(A){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=GA(this,A);t.insertBefore(A,t.firstChild)}}))},before:function(){return XA(this,arguments,(function(A){this.parentNode&&this.parentNode.insertBefore(A,this)}))},after:function(){return XA(this,arguments,(function(A){this.parentNode&&this.parentNode.insertBefore(A,this.nextSibling)}))},empty:function(){for(var A,t=0;null!=(A=this[t]);t++)1===A.nodeType&&(x.cleanData(zA(A,!1)),A.textContent="");return this},clone:function(A,t){return A=null!=A&&A,t=null==t?A:t,this.map((function(){return x.clone(this,A,t)}))},html:function(A){return AA(this,(function(A){var t=this[0]||{},e=0,i=this.length;if(void 0===A&&1===t.nodeType)return t.innerHTML;if("string"==typeof A&&!bA.test(A)&&!fA[(pA.exec(A)||["",""])[1].toLowerCase()]){A=x.htmlPrefilter(A);try{for(;e=0&&(g+=Math.max(0,Math.ceil(A["offset"+t[0].toUpperCase()+t.slice(1)]-I-g-o-.5))||0),g+a}function Mt(A,t,e){var i=KA(A),n=(!T.boxSizingReliable()||e)&&"border-box"===x.css(A,"boxSizing",!1,i),I=n,r=$A(A,t,i),o="offset"+t[0].toUpperCase()+t.slice(1);if(WA.test(r)){if(!e)return r;r="auto"}return(!T.boxSizingReliable()&&n||!T.reliableTrDimensions()&&L(A,"tr")||"auto"===r||!parseFloat(r)&&"inline"===x.css(A,"display",!1,i))&&A.getClientRects().length&&(n="border-box"===x.css(A,"boxSizing",!1,i),(I=o in A)&&(r=A[o])),(r=parseFloat(r)||0)+at(A,t,e||(n?"border":"content"),I,i,r)+"px"}function st(A,t,e,i,n){return new st.prototype.init(A,t,e,i,n)}x.extend({cssHooks:{opacity:{get:function(A,t){if(t){var e=$A(A,"opacity");return""===e?"1":e}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(A,t,e,i){if(A&&3!==A.nodeType&&8!==A.nodeType&&A.style){var n,I,r,o=nA(t),g=ZA.test(t),a=A.style;if(g||(t=nt(o)),r=x.cssHooks[t]||x.cssHooks[o],void 0===e)return r&&"get"in r&&void 0!==(n=r.get(A,!1,i))?n:a[t];"string"==(I=typeof e)&&(n=uA.exec(e))&&n[1]&&(e=dA(A,t,n),I="number"),null!=e&&e==e&&("number"!==I||g||(e+=n&&n[3]||(x.cssNumber[o]?"":"px")),T.clearCloneStyle||""!==e||0!==t.indexOf("background")||(a[t]="inherit"),r&&"set"in r&&void 0===(e=r.set(A,e,i))||(g?a.setProperty(t,e):a[t]=e))}},css:function(A,t,e,i){var n,I,r,o=nA(t);return ZA.test(t)||(t=nt(o)),(r=x.cssHooks[t]||x.cssHooks[o])&&"get"in r&&(n=r.get(A,!0,e)),void 0===n&&(n=$A(A,t,i)),"normal"===n&&t in ot&&(n=ot[t]),""===e||e?(I=parseFloat(n),!0===e||isFinite(I)?I||0:n):n}}),x.each(["height","width"],(function(A,t){x.cssHooks[t]={get:function(A,e,i){if(e)return!It.test(x.css(A,"display"))||A.getClientRects().length&&A.getBoundingClientRect().width?Mt(A,t,i):_A(A,rt,(function(){return Mt(A,t,i)}))},set:function(A,e,i){var n,I=KA(A),r=!T.scrollboxSize()&&"absolute"===I.position,o=(r||i)&&"border-box"===x.css(A,"boxSizing",!1,I),g=i?at(A,t,i,o,I):0;return o&&r&&(g-=Math.ceil(A["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(I[t])-at(A,t,"border",!1,I)-.5)),g&&(n=uA.exec(e))&&"px"!==(n[3]||"px")&&(A.style[t]=e,e=x.css(A,t)),gt(0,e,g)}}})),x.cssHooks.marginLeft=At(T.reliableMarginLeft,(function(A,t){if(t)return(parseFloat($A(A,"marginLeft"))||A.getBoundingClientRect().left-_A(A,{marginLeft:0},(function(){return A.getBoundingClientRect().left})))+"px"})),x.each({margin:"",padding:"",border:"Width"},(function(A,t){x.cssHooks[A+t]={expand:function(e){for(var i=0,n={},I="string"==typeof e?e.split(" "):[e];i<4;i++)n[A+lA[i]+t]=I[i]||I[i-2]||I[0];return n}},"margin"!==A&&(x.cssHooks[A+t].set=gt)})),x.fn.extend({css:function(A,t){return AA(this,(function(A,t,e){var i,n,I={},r=0;if(Array.isArray(t)){for(i=KA(A),n=t.length;r1)}}),x.Tween=st,st.prototype={constructor:st,init:function(A,t,e,i,n,I){this.elem=A,this.prop=e,this.easing=n||x.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=I||(x.cssNumber[e]?"":"px")},cur:function(){var A=st.propHooks[this.prop];return A&&A.get?A.get(this):st.propHooks._default.get(this)},run:function(A){var t,e=st.propHooks[this.prop];return this.options.duration?this.pos=t=x.easing[this.easing](A,this.options.duration*A,0,1,this.options.duration):this.pos=t=A,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),e&&e.set?e.set(this):st.propHooks._default.set(this),this}},st.prototype.init.prototype=st.prototype,st.propHooks={_default:{get:function(A){var t;return 1!==A.elem.nodeType||null!=A.elem[A.prop]&&null==A.elem.style[A.prop]?A.elem[A.prop]:(t=x.css(A.elem,A.prop,""))&&"auto"!==t?t:0},set:function(A){x.fx.step[A.prop]?x.fx.step[A.prop](A):1!==A.elem.nodeType||!x.cssHooks[A.prop]&&null==A.elem.style[nt(A.prop)]?A.elem[A.prop]=A.now:x.style(A.elem,A.prop,A.now+A.unit)}}},st.propHooks.scrollTop=st.propHooks.scrollLeft={set:function(A){A.elem.nodeType&&A.elem.parentNode&&(A.elem[A.prop]=A.now)}},x.easing={linear:function(A){return A},swing:function(A){return.5-Math.cos(A*Math.PI)/2},_default:"swing"},x.fx=st.prototype.init,x.fx.step={};var ct,ut,lt=/^(?:toggle|show|hide)$/,Ct=/queueHooks$/;function Tt(){ut&&(!1===d.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(Tt):i.setTimeout(Tt,x.fx.interval),x.fx.tick())}function ht(){return i.setTimeout((function(){ct=void 0})),ct=Date.now()}function Nt(A,t){var e,i=0,n={height:A};for(t=t?1:0;i<4;i+=2-t)n["margin"+(e=lA[i])]=n["padding"+e]=A;return t&&(n.opacity=n.width=A),n}function dt(A,t,e){for(var i,n=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),I=0,r=n.length;I1)},removeAttr:function(A){return this.each((function(){x.removeAttr(this,A)}))}}),x.extend({attr:function(A,t,e){var i,n,I=A.nodeType;if(3!==I&&8!==I&&2!==I)return void 0===A.getAttribute?x.prop(A,t,e):(1===I&&x.isXMLDoc(A)||(n=x.attrHooks[t.toLowerCase()]||(x.expr.match.bool.test(t)?Et:void 0)),void 0!==e?null===e?void x.removeAttr(A,t):n&&"set"in n&&void 0!==(i=n.set(A,e,t))?i:(A.setAttribute(t,e+""),e):n&&"get"in n&&null!==(i=n.get(A,t))?i:null==(i=x.find.attr(A,t))?void 0:i)},attrHooks:{type:{set:function(A,t){if(!T.radioValue&&"radio"===t&&L(A,"input")){var e=A.value;return A.setAttribute("type",t),e&&(A.value=e),t}}}},removeAttr:function(A,t){var e,i=0,n=t&&t.match(V);if(n&&1===A.nodeType)for(;e=n[i++];)A.removeAttribute(e)}}),Et={set:function(A,t,e){return!1===t?x.removeAttr(A,e):A.setAttribute(e,e),e}},x.each(x.expr.match.bool.source.match(/\w+/g),(function(A,t){var e=Dt[t]||x.find.attr;Dt[t]=function(A,t,i){var n,I,r=t.toLowerCase();return i||(I=Dt[r],Dt[r]=n,n=null!=e(A,t,i)?r:null,Dt[r]=I),n}}));var jt=/^(?:input|select|textarea|button)$/i,Bt=/^(?:a|area)$/i;function xt(A){return(A.match(V)||[]).join(" ")}function pt(A){return A.getAttribute&&A.getAttribute("class")||""}function Lt(A){return Array.isArray(A)?A:"string"==typeof A&&A.match(V)||[]}x.fn.extend({prop:function(A,t){return AA(this,x.prop,A,t,arguments.length>1)},removeProp:function(A){return this.each((function(){delete this[x.propFix[A]||A]}))}}),x.extend({prop:function(A,t,e){var i,n,I=A.nodeType;if(3!==I&&8!==I&&2!==I)return 1===I&&x.isXMLDoc(A)||(t=x.propFix[t]||t,n=x.propHooks[t]),void 0!==e?n&&"set"in n&&void 0!==(i=n.set(A,e,t))?i:A[t]=e:n&&"get"in n&&null!==(i=n.get(A,t))?i:A[t]},propHooks:{tabIndex:{get:function(A){var t=x.find.attr(A,"tabindex");return t?parseInt(t,10):jt.test(A.nodeName)||Bt.test(A.nodeName)&&A.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),T.optSelected||(x.propHooks.selected={get:function(A){var t=A.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(A){var t=A.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){x.propFix[this.toLowerCase()]=this})),x.fn.extend({addClass:function(A){var t,e,i,n,I,r;return h(A)?this.each((function(t){x(this).addClass(A.call(this,t,pt(this)))})):(t=Lt(A)).length?this.each((function(){if(i=pt(this),e=1===this.nodeType&&" "+xt(i)+" "){for(I=0;I-1;)e=e.replace(" "+n+" "," ");r=xt(e),i!==r&&this.setAttribute("class",r)}})):this:this.attr("class","")},toggleClass:function(A,t){var e,i,n,I,r=typeof A,o="string"===r||Array.isArray(A);return h(A)?this.each((function(e){x(this).toggleClass(A.call(this,e,pt(this),t),t)})):"boolean"==typeof t&&o?t?this.addClass(A):this.removeClass(A):(e=Lt(A),this.each((function(){if(o)for(I=x(this),n=0;n-1)return!0;return!1}});var ft=/\r/g;x.fn.extend({val:function(A){var t,e,i,n=this[0];return arguments.length?(i=h(A),this.each((function(e){var n;1===this.nodeType&&(null==(n=i?A.call(this,e,x(this).val()):A)?n="":"number"==typeof n?n+="":Array.isArray(n)&&(n=x.map(n,(function(A){return null==A?"":A+""}))),(t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,n,"value")||(this.value=n))}))):n?(t=x.valHooks[n.type]||x.valHooks[n.nodeName.toLowerCase()])&&"get"in t&&void 0!==(e=t.get(n,"value"))?e:"string"==typeof(e=n.value)?e.replace(ft,""):null==e?"":e:void 0}}),x.extend({valHooks:{option:{get:function(A){var t=x.find.attr(A,"value");return null!=t?t:xt(x.text(A))}},select:{get:function(A){var t,e,i,n=A.options,I=A.selectedIndex,r="select-one"===A.type,o=r?null:[],g=r?I+1:n.length;for(i=I<0?g:r?I:0;i-1)&&(e=!0);return e||(A.selectedIndex=-1),I}}}}),x.each(["radio","checkbox"],(function(){x.valHooks[this]={set:function(A,t){if(Array.isArray(t))return A.checked=x.inArray(x(A).val(),t)>-1}},T.checkOn||(x.valHooks[this].get=function(A){return null===A.getAttribute("value")?"on":A.value})}));var zt=i.location,wt={guid:Date.now()},mt=/\?/;x.parseXML=function(A){var t,e;if(!A||"string"!=typeof A)return null;try{t=(new i.DOMParser).parseFromString(A,"text/xml")}catch(A){}return e=t&&t.getElementsByTagName("parsererror")[0],t&&!e||x.error("Invalid XML: "+(e?x.map(e.childNodes,(function(A){return A.textContent})).join("\n"):A)),t};var Qt=/^(?:focusinfocus|focusoutblur)$/,St=function(A){A.stopPropagation()};x.extend(x.event,{trigger:function(A,t,e,n){var I,r,o,g,a,M,s,c,l=[e||d],C=u.call(A,"type")?A.type:A,T=u.call(A,"namespace")?A.namespace.split("."):[];if(r=c=o=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!Qt.test(C+x.event.triggered)&&(C.indexOf(".")>-1&&(T=C.split("."),C=T.shift(),T.sort()),a=C.indexOf(":")<0&&"on"+C,(A=A[x.expando]?A:new x.Event(C,"object"==typeof A&&A)).isTrigger=n?2:3,A.namespace=T.join("."),A.rnamespace=A.namespace?new RegExp("(^|\\.)"+T.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,A.result=void 0,A.target||(A.target=e),t=null==t?[A]:x.makeArray(t,[A]),s=x.event.special[C]||{},n||!s.trigger||!1!==s.trigger.apply(e,t))){if(!n&&!s.noBubble&&!N(e)){for(g=s.delegateType||C,Qt.test(g+C)||(r=r.parentNode);r;r=r.parentNode)l.push(r),o=r;o===(e.ownerDocument||d)&&l.push(o.defaultView||o.parentWindow||i)}for(I=0;(r=l[I++])&&!A.isPropagationStopped();)c=r,A.type=I>1?g:s.bindType||C,(M=(oA.get(r,"events")||Object.create(null))[A.type]&&oA.get(r,"handle"))&&M.apply(r,t),(M=a&&r[a])&&M.apply&&IA(r)&&(A.result=M.apply(r,t),!1===A.result&&A.preventDefault());return A.type=C,n||A.isDefaultPrevented()||s._default&&!1!==s._default.apply(l.pop(),t)||!IA(e)||a&&h(e[C])&&!N(e)&&((o=e[a])&&(e[a]=null),x.event.triggered=C,A.isPropagationStopped()&&c.addEventListener(C,St),e[C](),A.isPropagationStopped()&&c.removeEventListener(C,St),x.event.triggered=void 0,o&&(e[a]=o)),A.result}},simulate:function(A,t,e){var i=x.extend(new x.Event,e,{type:A,isSimulated:!0});x.event.trigger(i,null,t)}}),x.fn.extend({trigger:function(A,t){return this.each((function(){x.event.trigger(A,t,this)}))},triggerHandler:function(A,t){var e=this[0];if(e)return x.event.trigger(A,t,e,!0)}});var Yt=/\[\]$/,Ot=/\r?\n/g,vt=/^(?:submit|button|image|reset|file)$/i,Ut=/^(?:input|select|textarea|keygen)/i;function bt(A,t,e,i){var n;if(Array.isArray(t))x.each(t,(function(t,n){e||Yt.test(A)?i(A,n):bt(A+"["+("object"==typeof n&&null!=n?t:"")+"]",n,e,i)}));else if(e||"object"!==D(t))i(A,t);else for(n in t)bt(A+"["+n+"]",t[n],e,i)}x.param=function(A,t){var e,i=[],n=function(A,t){var e=h(t)?t():t;i[i.length]=encodeURIComponent(A)+"="+encodeURIComponent(null==e?"":e)};if(null==A)return"";if(Array.isArray(A)||A.jquery&&!x.isPlainObject(A))x.each(A,(function(){n(this.name,this.value)}));else for(e in A)bt(e,A[e],t,n);return i.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var A=x.prop(this,"elements");return A?x.makeArray(A):this})).filter((function(){var A=this.type;return this.name&&!x(this).is(":disabled")&&Ut.test(this.nodeName)&&!vt.test(A)&&(this.checked||!xA.test(A))})).map((function(A,t){var e=x(this).val();return null==e?null:Array.isArray(e)?x.map(e,(function(A){return{name:t.name,value:A.replace(Ot,"\r\n")}})):{name:t.name,value:e.replace(Ot,"\r\n")}})).get()}});var Pt=/%20/g,kt=/#.*$/,Gt=/([?&])_=[^&]*/,Ft=/^(.*?):[ \t]*([^\r\n]*)$/gm,Jt=/^(?:GET|HEAD)$/,Ht=/^\/\//,Rt={},Xt={},Vt="*/".concat("*"),Wt=d.createElement("a");function Zt(A){return function(t,e){"string"!=typeof t&&(e=t,t="*");var i,n=0,I=t.toLowerCase().match(V)||[];if(h(e))for(;i=I[n++];)"+"===i[0]?(i=i.slice(1)||"*",(A[i]=A[i]||[]).unshift(e)):(A[i]=A[i]||[]).push(e)}}function Kt(A,t,e,i){var n={},I=A===Xt;function r(o){var g;return n[o]=!0,x.each(A[o]||[],(function(A,o){var a=o(t,e,i);return"string"!=typeof a||I||n[a]?I?!(g=a):void 0:(t.dataTypes.unshift(a),r(a),!1)})),g}return r(t.dataTypes[0])||!n["*"]&&r("*")}function _t(A,t){var e,i,n=x.ajaxSettings.flatOptions||{};for(e in t)void 0!==t[e]&&((n[e]?A:i||(i={}))[e]=t[e]);return i&&x.extend(!0,A,i),A}Wt.href=zt.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(zt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Vt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(A,t){return t?_t(_t(A,x.ajaxSettings),t):_t(x.ajaxSettings,A)},ajaxPrefilter:Zt(Rt),ajaxTransport:Zt(Xt),ajax:function(A,t){"object"==typeof A&&(t=A,A=void 0),t=t||{};var e,n,I,r,o,g,a,M,s,c,u=x.ajaxSetup({},t),l=u.context||u,C=u.context&&(l.nodeType||l.jquery)?x(l):x.event,T=x.Deferred(),h=x.Callbacks("once memory"),N=u.statusCode||{},y={},E={},D="canceled",j={readyState:0,getResponseHeader:function(A){var t;if(a){if(!r)for(r={};t=Ft.exec(I);)r[t[1].toLowerCase()+" "]=(r[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=r[A.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return a?I:null},setRequestHeader:function(A,t){return null==a&&(A=E[A.toLowerCase()]=E[A.toLowerCase()]||A,y[A]=t),this},overrideMimeType:function(A){return null==a&&(u.mimeType=A),this},statusCode:function(A){var t;if(A)if(a)j.always(A[j.status]);else for(t in A)N[t]=[N[t],A[t]];return this},abort:function(A){var t=A||D;return e&&e.abort(t),B(0,t),this}};if(T.promise(j),u.url=((A||u.url||zt.href)+"").replace(Ht,zt.protocol+"//"),u.type=t.method||t.type||u.method||u.type,u.dataTypes=(u.dataType||"*").toLowerCase().match(V)||[""],null==u.crossDomain){g=d.createElement("a");try{g.href=u.url,g.href=g.href,u.crossDomain=Wt.protocol+"//"+Wt.host!=g.protocol+"//"+g.host}catch(A){u.crossDomain=!0}}if(u.data&&u.processData&&"string"!=typeof u.data&&(u.data=x.param(u.data,u.traditional)),Kt(Rt,u,t,j),a)return j;for(s in(M=x.event&&u.global)&&0==x.active++&&x.event.trigger("ajaxStart"),u.type=u.type.toUpperCase(),u.hasContent=!Jt.test(u.type),n=u.url.replace(kt,""),u.hasContent?u.data&&u.processData&&0===(u.contentType||"").indexOf("application/x-www-form-urlencoded")&&(u.data=u.data.replace(Pt,"+")):(c=u.url.slice(n.length),u.data&&(u.processData||"string"==typeof u.data)&&(n+=(mt.test(n)?"&":"?")+u.data,delete u.data),!1===u.cache&&(n=n.replace(Gt,"$1"),c=(mt.test(n)?"&":"?")+"_="+wt.guid+++c),u.url=n+c),u.ifModified&&(x.lastModified[n]&&j.setRequestHeader("If-Modified-Since",x.lastModified[n]),x.etag[n]&&j.setRequestHeader("If-None-Match",x.etag[n])),(u.data&&u.hasContent&&!1!==u.contentType||t.contentType)&&j.setRequestHeader("Content-Type",u.contentType),j.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+("*"!==u.dataTypes[0]?", "+Vt+"; q=0.01":""):u.accepts["*"]),u.headers)j.setRequestHeader(s,u.headers[s]);if(u.beforeSend&&(!1===u.beforeSend.call(l,j,u)||a))return j.abort();if(D="abort",h.add(u.complete),j.done(u.success),j.fail(u.error),e=Kt(Xt,u,t,j)){if(j.readyState=1,M&&C.trigger("ajaxSend",[j,u]),a)return j;u.async&&u.timeout>0&&(o=i.setTimeout((function(){j.abort("timeout")}),u.timeout));try{a=!1,e.send(y,B)}catch(A){if(a)throw A;B(-1,A)}}else B(-1,"No Transport");function B(A,t,r,g){var s,c,d,y,E,D=t;a||(a=!0,o&&i.clearTimeout(o),e=void 0,I=g||"",j.readyState=A>0?4:0,s=A>=200&&A<300||304===A,r&&(y=function(A,t,e){for(var i,n,I,r,o=A.contents,g=A.dataTypes;"*"===g[0];)g.shift(),void 0===i&&(i=A.mimeType||t.getResponseHeader("Content-Type"));if(i)for(n in o)if(o[n]&&o[n].test(i)){g.unshift(n);break}if(g[0]in e)I=g[0];else{for(n in e){if(!g[0]||A.converters[n+" "+g[0]]){I=n;break}r||(r=n)}I=I||r}if(I)return I!==g[0]&&g.unshift(I),e[I]}(u,j,r)),!s&&x.inArray("script",u.dataTypes)>-1&&x.inArray("json",u.dataTypes)<0&&(u.converters["text script"]=function(){}),y=function(A,t,e,i){var n,I,r,o,g,a={},M=A.dataTypes.slice();if(M[1])for(r in A.converters)a[r.toLowerCase()]=A.converters[r];for(I=M.shift();I;)if(A.responseFields[I]&&(e[A.responseFields[I]]=t),!g&&i&&A.dataFilter&&(t=A.dataFilter(t,A.dataType)),g=I,I=M.shift())if("*"===I)I=g;else if("*"!==g&&g!==I){if(!(r=a[g+" "+I]||a["* "+I]))for(n in a)if((o=n.split(" "))[1]===I&&(r=a[g+" "+o[0]]||a["* "+o[0]])){!0===r?r=a[n]:!0!==a[n]&&(I=o[0],M.unshift(o[1]));break}if(!0!==r)if(r&&A.throws)t=r(t);else try{t=r(t)}catch(A){return{state:"parsererror",error:r?A:"No conversion from "+g+" to "+I}}}return{state:"success",data:t}}(u,y,j,s),s?(u.ifModified&&((E=j.getResponseHeader("Last-Modified"))&&(x.lastModified[n]=E),(E=j.getResponseHeader("etag"))&&(x.etag[n]=E)),204===A||"HEAD"===u.type?D="nocontent":304===A?D="notmodified":(D=y.state,c=y.data,s=!(d=y.error))):(d=D,!A&&D||(D="error",A<0&&(A=0))),j.status=A,j.statusText=(t||D)+"",s?T.resolveWith(l,[c,D,j]):T.rejectWith(l,[j,D,d]),j.statusCode(N),N=void 0,M&&C.trigger(s?"ajaxSuccess":"ajaxError",[j,u,s?c:d]),h.fireWith(l,[j,D]),M&&(C.trigger("ajaxComplete",[j,u]),--x.active||x.event.trigger("ajaxStop")))}return j},getJSON:function(A,t,e){return x.get(A,t,e,"json")},getScript:function(A,t){return x.get(A,void 0,t,"script")}}),x.each(["get","post"],(function(A,t){x[t]=function(A,e,i,n){return h(e)&&(n=n||i,i=e,e=void 0),x.ajax(x.extend({url:A,type:t,dataType:n,data:e,success:i},x.isPlainObject(A)&&A))}})),x.ajaxPrefilter((function(A){var t;for(t in A.headers)"content-type"===t.toLowerCase()&&(A.contentType=A.headers[t]||"")})),x._evalUrl=function(A,t,e){return x.ajax({url:A,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(A){x.globalEval(A,t,e)}})},x.fn.extend({wrapAll:function(A){var t;return this[0]&&(h(A)&&(A=A.call(this[0])),t=x(A,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var A=this;A.firstElementChild;)A=A.firstElementChild;return A})).append(this)),this},wrapInner:function(A){return h(A)?this.each((function(t){x(this).wrapInner(A.call(this,t))})):this.each((function(){var t=x(this),e=t.contents();e.length?e.wrapAll(A):t.append(A)}))},wrap:function(A){var t=h(A);return this.each((function(e){x(this).wrapAll(t?A.call(this,e):A)}))},unwrap:function(A){return this.parent(A).not("body").each((function(){x(this).replaceWith(this.childNodes)})),this}}),x.expr.pseudos.hidden=function(A){return!x.expr.pseudos.visible(A)},x.expr.pseudos.visible=function(A){return!!(A.offsetWidth||A.offsetHeight||A.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(A){}};var qt={0:200,1223:204},$t=x.ajaxSettings.xhr();T.cors=!!$t&&"withCredentials"in $t,T.ajax=$t=!!$t,x.ajaxTransport((function(A){var t,e;if(T.cors||$t&&!A.crossDomain)return{send:function(n,I){var r,o=A.xhr();if(o.open(A.type,A.url,A.async,A.username,A.password),A.xhrFields)for(r in A.xhrFields)o[r]=A.xhrFields[r];for(r in A.mimeType&&o.overrideMimeType&&o.overrideMimeType(A.mimeType),A.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),n)o.setRequestHeader(r,n[r]);t=function(A){return function(){t&&(t=e=o.onload=o.onerror=o.onabort=o.ontimeout=o.onreadystatechange=null,"abort"===A?o.abort():"error"===A?"number"!=typeof o.status?I(0,"error"):I(o.status,o.statusText):I(qt[o.status]||o.status,o.statusText,"text"!==(o.responseType||"text")||"string"!=typeof o.responseText?{binary:o.response}:{text:o.responseText},o.getAllResponseHeaders()))}},o.onload=t(),e=o.onerror=o.ontimeout=t("error"),void 0!==o.onabort?o.onabort=e:o.onreadystatechange=function(){4===o.readyState&&i.setTimeout((function(){t&&e()}))},t=t("abort");try{o.send(A.hasContent&&A.data||null)}catch(A){if(t)throw A}},abort:function(){t&&t()}}})),x.ajaxPrefilter((function(A){A.crossDomain&&(A.contents.script=!1)})),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(A){return x.globalEval(A),A}}}),x.ajaxPrefilter("script",(function(A){void 0===A.cache&&(A.cache=!1),A.crossDomain&&(A.type="GET")})),x.ajaxTransport("script",(function(A){var t,e;if(A.crossDomain||A.scriptAttrs)return{send:function(i,n){t=x("