diff --git "a/static/js/main.bfb3b22a.js" "b/static/js/main.bfb3b22a.js"
new file mode 100644--- /dev/null
+++ "b/static/js/main.bfb3b22a.js"
@@ -0,0 +1,3 @@
+/*! For license information please see main.bfb3b22a.js.LICENSE.txt */
+!function(){var e={498:function(e){e.exports=function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function r(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function A(e){try{s(r.next(e))}catch(Rt){a(Rt)}}function o(e){try{s(r.throw(e))}catch(Rt){a(Rt)}}function s(e){e.done?n(e.value):i(e.value).then(A,o)}s((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,i,a,A={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(e){return function(t){return s([e,t])}}function s(a){if(n)throw new TypeError("Generator is already executing.");for(;A;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return A.label++,{value:a[1],done:!1};case 5:A.label++,r=a[1],a=[0];continue;case 7:a=A.ops.pop(),A.trys.pop();continue;default:if(!(i=(i=A.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){A=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){A.label=a[1];break}if(6===a[0]&&A.label<i[1]){A.label=i[1],i=a;break}if(i&&A.label<i[2]){A.label=i[2],A.ops.push(a);break}i[2]&&A.ops.pop(),A.trys.pop();continue}a=t.call(e,A)}catch(Rt){a=[6,Rt],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}function a(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||t)}for(var A=function(){function e(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r}return e.prototype.add=function(t,n,r,i){return new e(this.left+t,this.top+n,this.width+r,this.height+i)},e.fromClientRect=function(t,n){return new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height)},e.fromDOMRectList=function(t,n){var r=Array.from(n).find((function(e){return 0!==e.width}));return r?new e(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),o=function(e,t){return A.fromClientRect(e,t.getBoundingClientRect())},s=function(e){var t=e.body,n=e.documentElement;if(!t||!n)throw new Error("Unable to get document size");var r=Math.max(Math.max(t.scrollWidth,n.scrollWidth),Math.max(t.offsetWidth,n.offsetWidth),Math.max(t.clientWidth,n.clientWidth)),i=Math.max(Math.max(t.scrollHeight,n.scrollHeight),Math.max(t.offsetHeight,n.offsetHeight),Math.max(t.clientHeight,n.clientHeight));return new A(0,0,r,i)},l=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);56320===(64512&a)?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),n--)}else t.push(i)}return t},u=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";for(var r=[],i=-1,a="";++i<n;){var A=e[i];A<=65535?r.push(A):(A-=65536,r.push(55296+(A>>10),A%1024+56320)),(i+1===n||r.length>16384)&&(a+=String.fromCharCode.apply(String,r),r.length=0)}return a},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d="undefined"===typeof Uint8Array?[]:new Uint8Array(256),h=0;h<c.length;h++)d[c.charCodeAt(h)]=h;for(var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p="undefined"===typeof Uint8Array?[]:new Uint8Array(256),g=0;g<f.length;g++)p[f.charCodeAt(g)]=g;for(var m=function(e){var t,n,r,i,a,A=.75*e.length,o=e.length,s=0;"="===e[e.length-1]&&(A--,"="===e[e.length-2]&&A--);var l="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint8Array.prototype.slice?new ArrayBuffer(A):new Array(A),u=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<o;t+=4)n=p[e.charCodeAt(t)],r=p[e.charCodeAt(t+1)],i=p[e.charCodeAt(t+2)],a=p[e.charCodeAt(t+3)],u[s++]=n<<2|r>>4,u[s++]=(15&r)<<4|i>>2,u[s++]=(3&i)<<6|63&a;return l},v=function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n},y=function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n},w=5,B=11,_=2,b=65536>>w,x=(1<<w)-1,C=b+(1024>>w)+32,S=65536>>B,E=(1<<B-w)-1,U=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},M=function(e,t,n){return e.slice?e.slice(t,n):new Uint32Array(Array.prototype.slice.call(e,t,n))},F=function(e,t){var n=m(e),r=Array.isArray(n)?y(n):new Uint32Array(n),i=Array.isArray(n)?v(n):new Uint16Array(n),a=24,A=U(i,a/2,r[4]/2),o=2===r[5]?U(i,(a+r[4])/2):M(r,Math.ceil((a+r[4])/4));return new T(r[0],r[1],r[2],r[3],A,o)},T=function(){function e(e,t,n,r,i,a){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=i,this.data=a}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>w])<<_)+(e&x),this.data[t];if(e<=65535)return t=((t=this.index[b+(e-55296>>w)])<<_)+(e&x),this.data[t];if(e<this.highStart)return t=C-S+(e>>B),t=this.index[t],t+=e>>w&E,t=((t=this.index[t])<<_)+(e&x),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Q="undefined"===typeof Uint8Array?[]:new Uint8Array(256),L=0;L<k.length;L++)Q[k.charCodeAt(L)]=L;var D=50,I=1,R=2,H=3,P=4,N=5,O=7,V=8,z=9,G=10,K=11,W=12,j=13,X=14,q=15,Y=16,J=17,Z=18,$=19,ee=20,te=21,ne=22,re=23,ie=24,ae=25,Ae=26,oe=27,se=28,le=29,ue=30,ce=31,de=32,he=33,fe=34,pe=35,ge=36,me=37,ve=38,ye=39,we=40,Be=41,_e=42,be=43,xe=[9001,65288],Ce="!",Se="\xd7",Ee="\xf7",Ue=F("KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA=="),Me=[ue,ge],Fe=[I,R,H,N],Te=[G,V],ke=[oe,Ae],Qe=Fe.concat(Te),Le=[ve,ye,we,fe,pe],De=[q,j],Ie=function(e,t){void 0===t&&(t="strict");var n=[],r=[],i=[];return e.forEach((function(e,a){var A=Ue.get(e);if(A>D?(i.push(!0),A-=D):i.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return r.push(a),n.push(Y);if(A===P||A===K){if(0===a)return r.push(a),n.push(ue);var o=n[a-1];return-1===Qe.indexOf(o)?(r.push(r[a-1]),n.push(o)):(r.push(a),n.push(ue))}return r.push(a),A===ce?n.push("strict"===t?te:me):A===_e||A===le?n.push(ue):A===be?e>=131072&&e<=196605||e>=196608&&e<=262141?n.push(me):n.push(ue):void n.push(A)})),[r,n,i]},Re=function(e,t,n,r){var i=r[n];if(Array.isArray(e)?-1!==e.indexOf(i):e===i)for(var a=n;a<=r.length;){if((s=r[++a])===t)return!0;if(s!==G)break}if(i===G)for(a=n;a>0;){var A=r[--a];if(Array.isArray(e)?-1!==e.indexOf(A):e===A)for(var o=n;o<=r.length;){var s;if((s=r[++o])===t)return!0;if(s!==G)break}if(A!==G)break}return!1},He=function(e,t){for(var n=e;n>=0;){var r=t[n];if(r!==G)return r;n--}return 0},Pe=function(e,t,n,r,i){if(0===n[r])return Se;var a=r-1;if(Array.isArray(i)&&!0===i[a])return Se;var A=a-1,o=a+1,s=t[a],l=A>=0?t[A]:0,u=t[o];if(s===R&&u===H)return Se;if(-1!==Fe.indexOf(s))return Ce;if(-1!==Fe.indexOf(u))return Se;if(-1!==Te.indexOf(u))return Se;if(He(a,t)===V)return Ee;if(Ue.get(e[a])===K)return Se;if((s===de||s===he)&&Ue.get(e[o])===K)return Se;if(s===O||u===O)return Se;if(s===z)return Se;if(-1===[G,j,q].indexOf(s)&&u===z)return Se;if(-1!==[J,Z,$,ie,se].indexOf(u))return Se;if(He(a,t)===ne)return Se;if(Re(re,ne,a,t))return Se;if(Re([J,Z],te,a,t))return Se;if(Re(W,W,a,t))return Se;if(s===G)return Ee;if(s===re||u===re)return Se;if(u===Y||s===Y)return Ee;if(-1!==[j,q,te].indexOf(u)||s===X)return Se;if(l===ge&&-1!==De.indexOf(s))return Se;if(s===se&&u===ge)return Se;if(u===ee)return Se;if(-1!==Me.indexOf(u)&&s===ae||-1!==Me.indexOf(s)&&u===ae)return Se;if(s===oe&&-1!==[me,de,he].indexOf(u)||-1!==[me,de,he].indexOf(s)&&u===Ae)return Se;if(-1!==Me.indexOf(s)&&-1!==ke.indexOf(u)||-1!==ke.indexOf(s)&&-1!==Me.indexOf(u))return Se;if(-1!==[oe,Ae].indexOf(s)&&(u===ae||-1!==[ne,q].indexOf(u)&&t[o+1]===ae)||-1!==[ne,q].indexOf(s)&&u===ae||s===ae&&-1!==[ae,se,ie].indexOf(u))return Se;if(-1!==[ae,se,ie,J,Z].indexOf(u))for(var c=a;c>=0;){if((d=t[c])===ae)return Se;if(-1===[se,ie].indexOf(d))break;c--}if(-1!==[oe,Ae].indexOf(u))for(c=-1!==[J,Z].indexOf(s)?A:a;c>=0;){var d;if((d=t[c])===ae)return Se;if(-1===[se,ie].indexOf(d))break;c--}if(ve===s&&-1!==[ve,ye,fe,pe].indexOf(u)||-1!==[ye,fe].indexOf(s)&&-1!==[ye,we].indexOf(u)||-1!==[we,pe].indexOf(s)&&u===we)return Se;if(-1!==Le.indexOf(s)&&-1!==[ee,Ae].indexOf(u)||-1!==Le.indexOf(u)&&s===oe)return Se;if(-1!==Me.indexOf(s)&&-1!==Me.indexOf(u))return Se;if(s===ie&&-1!==Me.indexOf(u))return Se;if(-1!==Me.concat(ae).indexOf(s)&&u===ne&&-1===xe.indexOf(e[o])||-1!==Me.concat(ae).indexOf(u)&&s===Z)return Se;if(s===Be&&u===Be){for(var h=n[a],f=1;h>0&&t[--h]===Be;)f++;if(f%2!==0)return Se}return s===de&&u===he?Se:Ee},Ne=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var n=Ie(e,t.lineBreak),r=n[0],i=n[1],a=n[2];"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(i=i.map((function(e){return-1!==[ae,ue,_e].indexOf(e)?me:e})));var A="keep-all"===t.wordBreak?a.map((function(t,n){return t&&e[n]>=19968&&e[n]<=40959})):void 0;return[r,i,A]},Oe=function(){function e(e,t,n,r){this.codePoints=e,this.required=t===Ce,this.start=n,this.end=r}return e.prototype.slice=function(){return u.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),Ve=function(e,t){var n=l(e),r=Ne(n,t),i=r[0],a=r[1],A=r[2],o=n.length,s=0,u=0;return{next:function(){if(u>=o)return{done:!0,value:null};for(var e=Se;u<o&&(e=Pe(n,a,i,++u,A))===Se;);if(e!==Se||u===o){var t=new Oe(n,e,s,u);return s=u,{value:t,done:!1}}return{done:!0,value:null}}}},ze=1,Ge=2,Ke=4,We=8,je=10,Xe=47,qe=92,Ye=9,Je=32,Ze=34,$e=61,et=35,tt=36,nt=37,rt=39,it=40,at=41,At=95,ot=45,st=33,lt=60,ut=62,ct=64,dt=91,ht=93,ft=61,pt=123,gt=63,mt=125,vt=124,yt=126,wt=128,Bt=65533,_t=42,bt=43,xt=44,Ct=58,St=59,Et=46,Ut=0,Mt=8,Ft=11,Tt=14,kt=31,Qt=127,Lt=-1,Dt=48,It=97,Rt=101,Ht=102,Pt=117,Nt=122,Ot=65,Vt=69,zt=70,Gt=85,Kt=90,Wt=function(e){return e>=Dt&&e<=57},jt=function(e){return e>=55296&&e<=57343},Xt=function(e){return Wt(e)||e>=Ot&&e<=zt||e>=It&&e<=Ht},qt=function(e){return e>=It&&e<=Nt},Yt=function(e){return e>=Ot&&e<=Kt},Jt=function(e){return qt(e)||Yt(e)},Zt=function(e){return e>=wt},$t=function(e){return e===je||e===Ye||e===Je},en=function(e){return Jt(e)||Zt(e)||e===At},tn=function(e){return en(e)||Wt(e)||e===ot},nn=function(e){return e>=Ut&&e<=Mt||e===Ft||e>=Tt&&e<=kt||e===Qt},rn=function(e,t){return e===qe&&t!==je},an=function(e,t,n){return e===ot?en(t)||rn(t,n):!!en(e)||!(e!==qe||!rn(e,t))},An=function(e,t,n){return e===bt||e===ot?!!Wt(t)||t===Et&&Wt(n):Wt(e===Et?t:e)},on=function(e){var t=0,n=1;e[t]!==bt&&e[t]!==ot||(e[t]===ot&&(n=-1),t++);for(var r=[];Wt(e[t]);)r.push(e[t++]);var i=r.length?parseInt(u.apply(void 0,r),10):0;e[t]===Et&&t++;for(var a=[];Wt(e[t]);)a.push(e[t++]);var A=a.length,o=A?parseInt(u.apply(void 0,a),10):0;e[t]!==Vt&&e[t]!==Rt||t++;var s=1;e[t]!==bt&&e[t]!==ot||(e[t]===ot&&(s=-1),t++);for(var l=[];Wt(e[t]);)l.push(e[t++]);var c=l.length?parseInt(u.apply(void 0,l),10):0;return n*(i+o*Math.pow(10,-A))*Math.pow(10,s*c)},sn={type:2},ln={type:3},un={type:4},cn={type:13},dn={type:8},hn={type:21},fn={type:9},pn={type:10},gn={type:11},mn={type:12},vn={type:14},yn={type:23},wn={type:1},Bn={type:25},_n={type:24},bn={type:26},xn={type:27},Cn={type:28},Sn={type:29},En={type:31},Un={type:32},Mn=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(l(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==Un;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case Ze:return this.consumeStringToken(Ze);case et:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),r=this.peekCodePoint(2);if(tn(t)||rn(n,r)){var i=an(t,n,r)?Ge:ze;return{type:5,value:this.consumeName(),flags:i}}break;case tt:if(this.peekCodePoint(0)===$e)return this.consumeCodePoint(),cn;break;case rt:return this.consumeStringToken(rt);case it:return sn;case at:return ln;case _t:if(this.peekCodePoint(0)===$e)return this.consumeCodePoint(),vn;break;case bt:if(An(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case xt:return un;case ot:var a=e,A=this.peekCodePoint(0),o=this.peekCodePoint(1);if(An(a,A,o))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(an(a,A,o))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(A===ot&&o===ut)return this.consumeCodePoint(),this.consumeCodePoint(),_n;break;case Et:if(An(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Xe:if(this.peekCodePoint(0)===_t)for(this.consumeCodePoint();;){var s=this.consumeCodePoint();if(s===_t&&(s=this.consumeCodePoint())===Xe)return this.consumeToken();if(s===Lt)return this.consumeToken()}break;case Ct:return bn;case St:return xn;case lt:if(this.peekCodePoint(0)===st&&this.peekCodePoint(1)===ot&&this.peekCodePoint(2)===ot)return this.consumeCodePoint(),this.consumeCodePoint(),Bn;break;case ct:var l=this.peekCodePoint(0),c=this.peekCodePoint(1),d=this.peekCodePoint(2);if(an(l,c,d))return{type:7,value:this.consumeName()};break;case dt:return Cn;case qe:if(rn(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case ht:return Sn;case ft:if(this.peekCodePoint(0)===$e)return this.consumeCodePoint(),dn;break;case pt:return gn;case mt:return mn;case Pt:case Gt:var h=this.peekCodePoint(0),f=this.peekCodePoint(1);return h!==bt||!Xt(f)&&f!==gt||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case vt:if(this.peekCodePoint(0)===$e)return this.consumeCodePoint(),fn;if(this.peekCodePoint(0)===vt)return this.consumeCodePoint(),hn;break;case yt:if(this.peekCodePoint(0)===$e)return this.consumeCodePoint(),pn;break;case Lt:return Un}return $t(e)?(this.consumeWhiteSpace(),En):Wt(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):en(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:u(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return"undefined"===typeof e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();Xt(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;t===gt&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n)return{type:30,start:parseInt(u.apply(void 0,e.map((function(e){return e===gt?Dt:e}))),16),end:parseInt(u.apply(void 0,e.map((function(e){return e===gt?zt:e}))),16)};var r=parseInt(u.apply(void 0,e),16);if(this.peekCodePoint(0)===ot&&Xt(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var i=[];Xt(t)&&i.length<6;)i.push(t),t=this.consumeCodePoint();return{type:30,start:r,end:parseInt(u.apply(void 0,i),16)}}return{type:30,start:r,end:r}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&this.peekCodePoint(0)===it?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===it?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Lt)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===rt||t===Ze){var n=this.consumeStringToken(this.consumeCodePoint());return 0===n.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Lt||this.peekCodePoint(0)===at)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),yn)}for(;;){var r=this.consumeCodePoint();if(r===Lt||r===at)return{type:22,value:u.apply(void 0,e)};if($t(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Lt||this.peekCodePoint(0)===at?(this.consumeCodePoint(),{type:22,value:u.apply(void 0,e)}):(this.consumeBadUrlRemnants(),yn);if(r===Ze||r===rt||r===it||nn(r))return this.consumeBadUrlRemnants(),yn;if(r===qe){if(!rn(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),yn;e.push(this.consumeEscapedCodePoint())}else e.push(r)}},e.prototype.consumeWhiteSpace=function(){for(;$t(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===at||e===Lt)return;rn(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t=5e4,n="";e>0;){var r=Math.min(t,e);n+=u.apply(void 0,this._value.splice(0,r)),e-=r}return this._value.shift(),n},e.prototype.consumeStringToken=function(e){for(var t="",n=0;;){var r=this._value[n];if(r===Lt||void 0===r||r===e)return{type:0,value:t+=this.consumeStringSlice(n)};if(r===je)return this._value.splice(0,n),wn;if(r===qe){var i=this._value[n+1];i!==Lt&&void 0!==i&&(i===je?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):rn(r,i)&&(t+=this.consumeStringSlice(n),t+=u(this.consumeEscapedCodePoint()),n=-1))}n++}},e.prototype.consumeNumber=function(){var e=[],t=Ke,n=this.peekCodePoint(0);for(n!==bt&&n!==ot||e.push(this.consumeCodePoint());Wt(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(n===Et&&Wt(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=We;Wt(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),r=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((n===Vt||n===Rt)&&((r===bt||r===ot)&&Wt(i)||Wt(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=We;Wt(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[on(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],n=e[1],r=this.peekCodePoint(0),i=this.peekCodePoint(1),a=this.peekCodePoint(2);return an(r,i,a)?{type:15,number:t,flags:n,unit:this.consumeName()}:r===nt?(this.consumeCodePoint(),{type:16,number:t,flags:n}):{type:17,number:t,flags:n}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(Xt(e)){for(var t=u(e);Xt(this.peekCodePoint(0))&&t.length<6;)t+=u(this.consumeCodePoint());$t(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return 0===n||jt(n)||n>1114111?Bt:n}return e===Lt?Bt:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(tn(t))e+=u(t);else{if(!rn(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=u(this.consumeEscapedCodePoint())}}},e}(),Fn=function(){function e(e){this._tokens=e}return e.create=function(t){var n=new Mn;return n.write(t),new e(n.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},n=this.consumeToken();;){if(32===n.type||Pn(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var n=this.consumeToken();if(32===n.type||3===n.type)return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return"undefined"===typeof e?Un:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),Tn=function(e){return 15===e.type},kn=function(e){return 17===e.type},Qn=function(e){return 20===e.type},Ln=function(e){return 0===e.type},Dn=function(e,t){return Qn(e)&&e.value===t},In=function(e){return 31!==e.type},Rn=function(e){return 31!==e.type&&4!==e.type},Hn=function(e){var t=[],n=[];return e.forEach((function(e){if(4===e.type){if(0===n.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(n),void(n=[])}31!==e.type&&n.push(e)})),n.length&&t.push(n),t},Pn=function(e,t){return 11===t&&12===e.type||28===t&&29===e.type||2===t&&3===e.type},Nn=function(e){return 17===e.type||15===e.type},On=function(e){return 16===e.type||Nn(e)},Vn=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},zn={type:17,number:0,flags:Ke},Gn={type:16,number:50,flags:Ke},Kn={type:16,number:100,flags:Ke},Wn=function(e,t,n){var r=e[0],i=e[1];return[jn(r,t),jn("undefined"!==typeof i?i:r,n)]},jn=function(e,t){if(16===e.type)return e.number/100*t;if(Tn(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},Xn="deg",qn="grad",Yn="rad",Jn="turn",Zn={name:"angle",parse:function(e,t){if(15===t.type)switch(t.unit){case Xn:return Math.PI*t.number/180;case qn:return Math.PI/200*t.number;case Yn:return t.number;case Jn:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")}},$n=function(e){return 15===e.type&&(e.unit===Xn||e.unit===qn||e.unit===Yn||e.unit===Jn)},er=function(e){switch(e.filter(Qn).map((function(e){return e.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[zn,zn];case"to top":case"bottom":return tr(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[zn,Kn];case"to right":case"left":return tr(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Kn,Kn];case"to bottom":case"top":return tr(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Kn,zn];case"to left":case"right":return tr(270)}return 0},tr=function(e){return Math.PI*e/180},nr={name:"color",parse:function(e,t){if(18===t.type){var n=ur[t.name];if("undefined"===typeof n)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return n(e,t.values)}if(5===t.type){if(3===t.value.length){var r=t.value.substring(0,1),i=t.value.substring(1,2),a=t.value.substring(2,3);return ar(parseInt(r+r,16),parseInt(i+i,16),parseInt(a+a,16),1)}if(4===t.value.length){r=t.value.substring(0,1),i=t.value.substring(1,2),a=t.value.substring(2,3);var A=t.value.substring(3,4);return ar(parseInt(r+r,16),parseInt(i+i,16),parseInt(a+a,16),parseInt(A+A,16)/255)}if(6===t.value.length)return r=t.value.substring(0,2),i=t.value.substring(2,4),a=t.value.substring(4,6),ar(parseInt(r,16),parseInt(i,16),parseInt(a,16),1);if(8===t.value.length)return r=t.value.substring(0,2),i=t.value.substring(2,4),a=t.value.substring(4,6),A=t.value.substring(6,8),ar(parseInt(r,16),parseInt(i,16),parseInt(a,16),parseInt(A,16)/255)}if(20===t.type){var o=dr[t.value.toUpperCase()];if("undefined"!==typeof o)return o}return dr.TRANSPARENT}},rr=function(e){return 0===(255&e)},ir=function(e){var t=255&e,n=255&e>>8,r=255&e>>16,i=255&e>>24;return t<255?"rgba("+i+","+r+","+n+","+t/255+")":"rgb("+i+","+r+","+n+")"},ar=function(e,t,n,r){return(e<<24|t<<16|n<<8|Math.round(255*r)<<0)>>>0},Ar=function(e,t){if(17===e.type)return e.number;if(16===e.type){var n=3===t?1:255;return 3===t?e.number/100*n:Math.round(e.number/100*n)}return 0},or=function(e,t){var n=t.filter(Rn);if(3===n.length){var r=n.map(Ar),i=r[0],a=r[1],A=r[2];return ar(i,a,A,1)}if(4===n.length){var o=n.map(Ar),s=(i=o[0],a=o[1],A=o[2],o[3]);return ar(i,a,A,s)}return 0};function sr(e,t,n){return n<0&&(n+=1),n>=1&&(n-=1),n<1/6?(t-e)*n*6+e:n<.5?t:n<2/3?6*(t-e)*(2/3-n)+e:e}var lr=function(e,t){var n=t.filter(Rn),r=n[0],i=n[1],a=n[2],A=n[3],o=(17===r.type?tr(r.number):Zn.parse(e,r))/(2*Math.PI),s=On(i)?i.number/100:0,l=On(a)?a.number/100:0,u="undefined"!==typeof A&&On(A)?jn(A,1):1;if(0===s)return ar(255*l,255*l,255*l,1);var c=l<=.5?l*(s+1):l+s-l*s,d=2*l-c,h=sr(d,c,o+1/3),f=sr(d,c,o),p=sr(d,c,o-1/3);return ar(255*h,255*f,255*p,u)},ur={hsl:lr,hsla:lr,rgb:or,rgba:or},cr=function(e,t){return nr.parse(e,Fn.create(t).parseComponentValue())},dr={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},hr={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(Qn(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},fr={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},pr=function(e,t){var n=nr.parse(e,t[0]),r=t[1];return r&&On(r)?{color:n,stop:r}:{color:n,stop:null}},gr=function(e,t){var n=e[0],r=e[e.length-1];null===n.stop&&(n.stop=zn),null===r.stop&&(r.stop=Kn);for(var i=[],a=0,A=0;A<e.length;A++){var o=e[A].stop;if(null!==o){var s=jn(o,t);s>a?i.push(s):i.push(a),a=s}else i.push(null)}var l=null;for(A=0;A<i.length;A++){var u=i[A];if(null===u)null===l&&(l=A);else if(null!==l){for(var c=A-l,d=(u-i[l-1])/(c+1),h=1;h<=c;h++)i[l+h-1]=d*h;l=null}}return e.map((function(e,n){return{color:e.color,stop:Math.max(Math.min(1,i[n]/t),0)}}))},mr=function(e,t,n){var r=t/2,i=n/2,a=jn(e[0],t)-r,A=i-jn(e[1],n);return(Math.atan2(A,a)+2*Math.PI)%(2*Math.PI)},vr=function(e,t,n){var r="number"===typeof e?e:mr(e,t,n),i=Math.abs(t*Math.sin(r))+Math.abs(n*Math.cos(r)),a=t/2,A=n/2,o=i/2,s=Math.sin(r-Math.PI/2)*o,l=Math.cos(r-Math.PI/2)*o;return[i,a-l,a+l,A-s,A+s]},yr=function(e,t){return Math.sqrt(e*e+t*t)},wr=function(e,t,n,r,i){return[[0,0],[0,t],[e,0],[e,t]].reduce((function(e,t){var a=t[0],A=t[1],o=yr(n-a,r-A);return(i?o<e.optimumDistance:o>e.optimumDistance)?{optimumCorner:t,optimumDistance:o}:e}),{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},Br=function(e,t,n,r,i){var a=0,A=0;switch(e.size){case 0:0===e.shape?a=A=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):1===e.shape&&(a=Math.min(Math.abs(t),Math.abs(t-r)),A=Math.min(Math.abs(n),Math.abs(n-i)));break;case 2:if(0===e.shape)a=A=Math.min(yr(t,n),yr(t,n-i),yr(t-r,n),yr(t-r,n-i));else if(1===e.shape){var o=Math.min(Math.abs(n),Math.abs(n-i))/Math.min(Math.abs(t),Math.abs(t-r)),s=wr(r,i,t,n,!0),l=s[0],u=s[1];A=o*(a=yr(l-t,(u-n)/o))}break;case 1:0===e.shape?a=A=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):1===e.shape&&(a=Math.max(Math.abs(t),Math.abs(t-r)),A=Math.max(Math.abs(n),Math.abs(n-i)));break;case 3:if(0===e.shape)a=A=Math.max(yr(t,n),yr(t,n-i),yr(t-r,n),yr(t-r,n-i));else if(1===e.shape){o=Math.max(Math.abs(n),Math.abs(n-i))/Math.max(Math.abs(t),Math.abs(t-r));var c=wr(r,i,t,n,!1);l=c[0],u=c[1],A=o*(a=yr(l-t,(u-n)/o))}}return Array.isArray(e.size)&&(a=jn(e.size[0],r),A=2===e.size.length?jn(e.size[1],i):a),[a,A]},_r=function(e,t){var n=tr(180),r=[];return Hn(t).forEach((function(t,i){if(0===i){var a=t[0];if(20===a.type&&-1!==["top","left","right","bottom"].indexOf(a.value))return void(n=er(t));if($n(a))return void(n=(Zn.parse(e,a)+tr(270))%tr(360))}var A=pr(e,t);r.push(A)})),{angle:n,stops:r,type:1}},br="closest-side",xr="farthest-side",Cr="closest-corner",Sr="farthest-corner",Er="circle",Ur="ellipse",Mr="cover",Fr="contain",Tr=function(e,t){var n=0,r=3,i=[],a=[];return Hn(t).forEach((function(t,A){var o=!0;if(0===A?o=t.reduce((function(e,t){if(Qn(t))switch(t.value){case"center":return a.push(Gn),!1;case"top":case"left":return a.push(zn),!1;case"right":case"bottom":return a.push(Kn),!1}else if(On(t)||Nn(t))return a.push(t),!1;return e}),o):1===A&&(o=t.reduce((function(e,t){if(Qn(t))switch(t.value){case Er:return n=0,!1;case Ur:return n=1,!1;case Fr:case br:return r=0,!1;case xr:return r=1,!1;case Cr:return r=2,!1;case Mr:case Sr:return r=3,!1}else if(Nn(t)||On(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e}),o)),o){var s=pr(e,t);i.push(s)}})),{size:r,shape:n,stops:i,position:a,type:2}},kr=function(e){return 1===e.type},Qr=function(e){return 2===e.type},Lr={name:"image",parse:function(e,t){if(22===t.type){var n={url:t.value,type:0};return e.cache.addImage(t.value),n}if(18===t.type){var r=Rr[t.name];if("undefined"===typeof r)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return r(e,t.values)}throw new Error("Unsupported image type "+t.type)}};function Dr(e){return!(20===e.type&&"none"===e.value)&&(18!==e.type||!!Rr[e.name])}var Ir,Rr={"linear-gradient":function(e,t){var n=tr(180),r=[];return Hn(t).forEach((function(t,i){if(0===i){var a=t[0];if(20===a.type&&"to"===a.value)return void(n=er(t));if($n(a))return void(n=Zn.parse(e,a))}var A=pr(e,t);r.push(A)})),{angle:n,stops:r,type:1}},"-moz-linear-gradient":_r,"-ms-linear-gradient":_r,"-o-linear-gradient":_r,"-webkit-linear-gradient":_r,"radial-gradient":function(e,t){var n=0,r=3,i=[],a=[];return Hn(t).forEach((function(t,A){var o=!0;if(0===A){var s=!1;o=t.reduce((function(e,t){if(s)if(Qn(t))switch(t.value){case"center":return a.push(Gn),e;case"top":case"left":return a.push(zn),e;case"right":case"bottom":return a.push(Kn),e}else(On(t)||Nn(t))&&a.push(t);else if(Qn(t))switch(t.value){case Er:return n=0,!1;case Ur:return n=1,!1;case"at":return s=!0,!1;case br:return r=0,!1;case Mr:case xr:return r=1,!1;case Fr:case Cr:return r=2,!1;case Sr:return r=3,!1}else if(Nn(t)||On(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e}),o)}if(o){var l=pr(e,t);i.push(l)}})),{size:r,shape:n,stops:i,position:a,type:2}},"-moz-radial-gradient":Tr,"-ms-radial-gradient":Tr,"-o-radial-gradient":Tr,"-webkit-radial-gradient":Tr,"-webkit-gradient":function(e,t){var n=tr(180),r=[],i=1,a=0,A=3,o=[];return Hn(t).forEach((function(t,n){var a=t[0];if(0===n){if(Qn(a)&&"linear"===a.value)return void(i=1);if(Qn(a)&&"radial"===a.value)return void(i=2)}if(18===a.type)if("from"===a.name){var A=nr.parse(e,a.values[0]);r.push({stop:zn,color:A})}else if("to"===a.name)A=nr.parse(e,a.values[0]),r.push({stop:Kn,color:A});else if("color-stop"===a.name){var o=a.values.filter(Rn);if(2===o.length){A=nr.parse(e,o[1]);var s=o[0];kn(s)&&r.push({stop:{type:16,number:100*s.number,flags:s.flags},color:A})}}})),1===i?{angle:(n+tr(180))%tr(360),stops:r,type:i}:{size:A,shape:a,stops:r,position:o,type:i}}},Hr={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var n=t[0];return 20===n.type&&"none"===n.value?[]:t.filter((function(e){return Rn(e)&&Dr(e)})).map((function(t){return Lr.parse(e,t)}))}},Pr={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(Qn(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},Nr={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return Hn(t).map((function(e){return e.filter(On)})).map(Vn)}},Or={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return Hn(t).map((function(e){return e.filter(Qn).map((function(e){return e.value})).join(" ")})).map(Vr)}},Vr=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};!function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"}(Ir||(Ir={}));var zr,Gr={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return Hn(t).map((function(e){return e.filter(Kr)}))}},Kr=function(e){return Qn(e)||On(e)},Wr=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},jr=Wr("top"),Xr=Wr("right"),qr=Wr("bottom"),Yr=Wr("left"),Jr=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return Vn(t.filter(On))}}},Zr=Jr("top-left"),$r=Jr("top-right"),ei=Jr("bottom-right"),ti=Jr("bottom-left"),ni=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},ri=ni("top"),ii=ni("right"),ai=ni("bottom"),Ai=ni("left"),oi=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return Tn(t)?t.number:0}}},si=oi("top"),li=oi("right"),ui=oi("bottom"),ci=oi("left"),di={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},hi={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return"rtl"===t?1:0}},fi={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(Qn).reduce((function(e,t){return e|pi(t.value)}),0)}},pi=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},gi={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},mi={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};!function(e){e.NORMAL="normal",e.STRICT="strict"}(zr||(zr={}));var vi,yi={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?zr.STRICT:zr.NORMAL}},wi={name:"line-height",initialValue:"normal",prefix:!1,type:4},Bi=function(e,t){return Qn(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:On(e)?jn(e,t):t},_i={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:Lr.parse(e,t)}},bi={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return"inside"===t?0:1}},xi={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},Ci=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},Si=Ci("top"),Ei=Ci("right"),Ui=Ci("bottom"),Mi=Ci("left"),Fi={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(Qn).map((function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}}))}},Ti={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},ki=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Qi=ki("top"),Li=ki("right"),Di=ki("bottom"),Ii=ki("left"),Ri={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},Hi={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Pi={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&Dn(t[0],"none")?[]:Hn(t).map((function(t){for(var n={color:dr.TRANSPARENT,offsetX:zn,offsetY:zn,blur:zn},r=0,i=0;i<t.length;i++){var a=t[i];Nn(a)?(0===r?n.offsetX=a:1===r?n.offsetY=a:n.blur=a,r++):n.color=nr.parse(e,a)}return n}))}},Ni={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Oi={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,t){if(20===t.type&&"none"===t.value)return null;if(18===t.type){var n=Vi[t.name];if("undefined"===typeof n)throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return n(t.values)}return null}},Vi={matrix:function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number}));return 6===t.length?t:null},matrix3d:function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number})),n=t[0],r=t[1];t[2],t[3];var i=t[4],a=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var A=t[12],o=t[13];return t[14],t[15],16===t.length?[n,r,i,a,A,o]:null}},zi={type:16,number:50,flags:Ke},Gi=[zi,zi],Ki={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var n=t.filter(On);return 2!==n.length?Gi:[n[0],n[1]]}},Wi={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;default:return 0}}};!function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"}(vi||(vi={}));for(var ji={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return vi.BREAK_ALL;case"keep-all":return vi.KEEP_ALL;default:return vi.NORMAL}}},Xi={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(20===t.type)return{auto:!0,order:0};if(kn(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},qi={name:"time",parse:function(e,t){if(15===t.type)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},Yi={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return kn(t)?t.number:1}},Ji={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Zi={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(Qn).map((function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0})).filter((function(e){return 0!==e}))}},$i={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var n=[],r=[];return t.forEach((function(e){switch(e.type){case 20:case 0:n.push(e.value);break;case 17:n.push(e.number.toString());break;case 4:r.push(n.join(" ")),n.length=0}})),n.length&&r.push(n.join(" ")),r.map((function(e){return-1===e.indexOf(" ")?e:"'"+e+"'"}))}},ea={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},ta={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){return kn(t)?t.number:Qn(t)&&"bold"===t.value?700:400}},na={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(Qn).map((function(e){return e.value}))}},ra={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},ia=function(e,t){return 0!==(e&t)},aa={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var n=t[0];return 20===n.type&&"none"===n.value?[]:t}},Aa={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var n=t[0];if(20===n.type&&"none"===n.value)return null;for(var r=[],i=t.filter(In),a=0;a<i.length;a++){var A=i[a],o=i[a+1];if(20===A.type){var s=o&&kn(o)?o.number:1;r.push({counter:A.value,increment:s})}}return r}},oa={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return[];for(var n=[],r=t.filter(In),i=0;i<r.length;i++){var a=r[i],A=r[i+1];if(Qn(a)&&"none"!==a.value){var o=A&&kn(A)?A.number:0;n.push({counter:a.value,reset:o})}}return n}},sa={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,t){return t.filter(Tn).map((function(t){return qi.parse(e,t)}))}},la={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var n=t[0];if(20===n.type&&"none"===n.value)return null;var r=[],i=t.filter(Ln);if(i.length%2!==0)return null;for(var a=0;a<i.length;a+=2){var A=i[a].value,o=i[a+1].value;r.push({open:A,close:o})}return r}},ua=function(e,t,n){if(!e)return"";var r=e[Math.min(t,e.length-1)];return r?n?r.open:r.close:""},ca={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&Dn(t[0],"none")?[]:Hn(t).map((function(t){for(var n={color:255,offsetX:zn,offsetY:zn,blur:zn,spread:zn,inset:!1},r=0,i=0;i<t.length;i++){var a=t[i];Dn(a,"inset")?n.inset=!0:Nn(a)?(0===r?n.offsetX=a:1===r?n.offsetY=a:2===r?n.blur=a:n.spread=a,r++):n.color=nr.parse(e,a)}return n}))}},da={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,t){var n=[0,1,2],r=[];return t.filter(Qn).forEach((function(e){switch(e.value){case"stroke":r.push(1);break;case"fill":r.push(0);break;case"markers":r.push(2)}})),n.forEach((function(e){-1===r.indexOf(e)&&r.push(e)})),r}},ha={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},fa={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return Tn(t)?t.number:0}},pa=function(){function e(e,t){var n,r;this.animationDuration=va(e,sa,t.animationDuration),this.backgroundClip=va(e,hr,t.backgroundClip),this.backgroundColor=va(e,fr,t.backgroundColor),this.backgroundImage=va(e,Hr,t.backgroundImage),this.backgroundOrigin=va(e,Pr,t.backgroundOrigin),this.backgroundPosition=va(e,Nr,t.backgroundPosition),this.backgroundRepeat=va(e,Or,t.backgroundRepeat),this.backgroundSize=va(e,Gr,t.backgroundSize),this.borderTopColor=va(e,jr,t.borderTopColor),this.borderRightColor=va(e,Xr,t.borderRightColor),this.borderBottomColor=va(e,qr,t.borderBottomColor),this.borderLeftColor=va(e,Yr,t.borderLeftColor),this.borderTopLeftRadius=va(e,Zr,t.borderTopLeftRadius),this.borderTopRightRadius=va(e,$r,t.borderTopRightRadius),this.borderBottomRightRadius=va(e,ei,t.borderBottomRightRadius),this.borderBottomLeftRadius=va(e,ti,t.borderBottomLeftRadius),this.borderTopStyle=va(e,ri,t.borderTopStyle),this.borderRightStyle=va(e,ii,t.borderRightStyle),this.borderBottomStyle=va(e,ai,t.borderBottomStyle),this.borderLeftStyle=va(e,Ai,t.borderLeftStyle),this.borderTopWidth=va(e,si,t.borderTopWidth),this.borderRightWidth=va(e,li,t.borderRightWidth),this.borderBottomWidth=va(e,ui,t.borderBottomWidth),this.borderLeftWidth=va(e,ci,t.borderLeftWidth),this.boxShadow=va(e,ca,t.boxShadow),this.color=va(e,di,t.color),this.direction=va(e,hi,t.direction),this.display=va(e,fi,t.display),this.float=va(e,gi,t.cssFloat),this.fontFamily=va(e,$i,t.fontFamily),this.fontSize=va(e,ea,t.fontSize),this.fontStyle=va(e,ra,t.fontStyle),this.fontVariant=va(e,na,t.fontVariant),this.fontWeight=va(e,ta,t.fontWeight),this.letterSpacing=va(e,mi,t.letterSpacing),this.lineBreak=va(e,yi,t.lineBreak),this.lineHeight=va(e,wi,t.lineHeight),this.listStyleImage=va(e,_i,t.listStyleImage),this.listStylePosition=va(e,bi,t.listStylePosition),this.listStyleType=va(e,xi,t.listStyleType),this.marginTop=va(e,Si,t.marginTop),this.marginRight=va(e,Ei,t.marginRight),this.marginBottom=va(e,Ui,t.marginBottom),this.marginLeft=va(e,Mi,t.marginLeft),this.opacity=va(e,Yi,t.opacity);var i=va(e,Fi,t.overflow);this.overflowX=i[0],this.overflowY=i[i.length>1?1:0],this.overflowWrap=va(e,Ti,t.overflowWrap),this.paddingTop=va(e,Qi,t.paddingTop),this.paddingRight=va(e,Li,t.paddingRight),this.paddingBottom=va(e,Di,t.paddingBottom),this.paddingLeft=va(e,Ii,t.paddingLeft),this.paintOrder=va(e,da,t.paintOrder),this.position=va(e,Hi,t.position),this.textAlign=va(e,Ri,t.textAlign),this.textDecorationColor=va(e,Ji,null!==(n=t.textDecorationColor)&&void 0!==n?n:t.color),this.textDecorationLine=va(e,Zi,null!==(r=t.textDecorationLine)&&void 0!==r?r:t.textDecoration),this.textShadow=va(e,Pi,t.textShadow),this.textTransform=va(e,Ni,t.textTransform),this.transform=va(e,Oi,t.transform),this.transformOrigin=va(e,Ki,t.transformOrigin),this.visibility=va(e,Wi,t.visibility),this.webkitTextStrokeColor=va(e,ha,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=va(e,fa,t.webkitTextStrokeWidth),this.wordBreak=va(e,ji,t.wordBreak),this.zIndex=va(e,Xi,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return rr(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return ia(this.display,4)||ia(this.display,33554432)||ia(this.display,268435456)||ia(this.display,536870912)||ia(this.display,67108864)||ia(this.display,134217728)},e}(),ga=function(){function e(e,t){this.content=va(e,aa,t.content),this.quotes=va(e,la,t.quotes)}return e}(),ma=function(){function e(e,t){this.counterIncrement=va(e,Aa,t.counterIncrement),this.counterReset=va(e,oa,t.counterReset)}return e}(),va=function(e,t,n){var r=new Mn,i=null!==n&&"undefined"!==typeof n?n.toString():t.initialValue;r.write(i);var a=new Fn(r.read());switch(t.type){case 2:var A=a.parseComponentValue();return t.parse(e,Qn(A)?A.value:t.initialValue);case 0:return t.parse(e,a.parseComponentValue());case 1:return t.parse(e,a.parseComponentValues());case 4:return a.parseComponentValue();case 3:switch(t.format){case"angle":return Zn.parse(e,a.parseComponentValue());case"color":return nr.parse(e,a.parseComponentValue());case"image":return Lr.parse(e,a.parseComponentValue());case"length":var o=a.parseComponentValue();return Nn(o)?o:zn;case"length-percentage":var s=a.parseComponentValue();return On(s)?s:zn;case"time":return qi.parse(e,a.parseComponentValue())}}},ya="data-html2canvas-debug",wa=function(e){switch(e.getAttribute(ya)){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Ba=function(e,t){var n=wa(e);return 1===n||t===n},_a=function(){function e(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Ba(t,3),this.styles=new pa(e,window.getComputedStyle(t,null)),lo(t)&&(this.styles.animationDuration.some((function(e){return e>0}))&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=o(this.context,t),Ba(t,4)&&(this.flags|=16)}return e}(),ba="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",xa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ca="undefined"===typeof Uint8Array?[]:new Uint8Array(256),Sa=0;Sa<xa.length;Sa++)Ca[xa.charCodeAt(Sa)]=Sa;for(var Ea=function(e){var t,n,r,i,a,A=.75*e.length,o=e.length,s=0;"="===e[e.length-1]&&(A--,"="===e[e.length-2]&&A--);var l="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint8Array.prototype.slice?new ArrayBuffer(A):new Array(A),u=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<o;t+=4)n=Ca[e.charCodeAt(t)],r=Ca[e.charCodeAt(t+1)],i=Ca[e.charCodeAt(t+2)],a=Ca[e.charCodeAt(t+3)],u[s++]=n<<2|r>>4,u[s++]=(15&r)<<4|i>>2,u[s++]=(3&i)<<6|63&a;return l},Ua=function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n},Ma=function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n},Fa=5,Ta=11,ka=2,Qa=65536>>Fa,La=(1<<Fa)-1,Da=Qa+(1024>>Fa)+32,Ia=65536>>Ta,Ra=(1<<Ta-Fa)-1,Ha=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},Pa=function(e,t,n){return e.slice?e.slice(t,n):new Uint32Array(Array.prototype.slice.call(e,t,n))},Na=function(e,t){var n=Ea(e),r=Array.isArray(n)?Ma(n):new Uint32Array(n),i=Array.isArray(n)?Ua(n):new Uint16Array(n),a=24,A=Ha(i,a/2,r[4]/2),o=2===r[5]?Ha(i,(a+r[4])/2):Pa(r,Math.ceil((a+r[4])/4));return new Oa(r[0],r[1],r[2],r[3],A,o)},Oa=function(){function e(e,t,n,r,i,a){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=i,this.data=a}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>Fa])<<ka)+(e&La),this.data[t];if(e<=65535)return t=((t=this.index[Qa+(e-55296>>Fa)])<<ka)+(e&La),this.data[t];if(e<this.highStart)return t=Da-Ia+(e>>Ta),t=this.index[t],t+=e>>Fa&Ra,t=((t=this.index[t])<<ka)+(e&La),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Va="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",za="undefined"===typeof Uint8Array?[]:new Uint8Array(256),Ga=0;Ga<Va.length;Ga++)za[Va.charCodeAt(Ga)]=Ga;var Ka,Wa=1,ja=2,Xa=3,qa=4,Ya=5,Ja=7,Za=8,$a=9,eA=10,tA=11,nA=12,rA=13,iA=14,aA=15,AA=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);56320===(64512&a)?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),n--)}else t.push(i)}return t},oA=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";for(var r=[],i=-1,a="";++i<n;){var A=e[i];A<=65535?r.push(A):(A-=65536,r.push(55296+(A>>10),A%1024+56320)),(i+1===n||r.length>16384)&&(a+=String.fromCharCode.apply(String,r),r.length=0)}return a},sA=Na(ba),lA="\xd7",uA="\xf7",cA=function(e){return sA.get(e)},dA=function(e,t,n){var r=n-2,i=t[r],a=t[n-1],A=t[n];if(a===ja&&A===Xa)return lA;if(a===ja||a===Xa||a===qa)return uA;if(A===ja||A===Xa||A===qa)return uA;if(a===Za&&-1!==[Za,$a,tA,nA].indexOf(A))return lA;if((a===tA||a===$a)&&(A===$a||A===eA))return lA;if((a===nA||a===eA)&&A===eA)return lA;if(A===rA||A===Ya)return lA;if(A===Ja)return lA;if(a===Wa)return lA;if(a===rA&&A===iA){for(;i===Ya;)i=t[--r];if(i===iA)return lA}if(a===aA&&A===aA){for(var o=0;i===aA;)o++,i=t[--r];if(o%2===0)return lA}return uA},hA=function(e){var t=AA(e),n=t.length,r=0,i=0,a=t.map(cA);return{next:function(){if(r>=n)return{done:!0,value:null};for(var e=lA;r<n&&(e=dA(t,a,++r))===lA;);if(e!==lA||r===n){var A=oA.apply(null,t.slice(i,r));return i=r,{value:A,done:!1}}return{done:!0,value:null}}}},fA=function(e){for(var t,n=hA(e),r=[];!(t=n.next()).done;)t.value&&r.push(t.value.slice());return r},pA=function(e){var t=123;if(e.createRange){var n=e.createRange();if(n.getBoundingClientRect){var r=e.createElement("boundtest");r.style.height=t+"px",r.style.display="block",e.body.appendChild(r),n.selectNode(r);var i=n.getBoundingClientRect(),a=Math.round(i.height);if(e.body.removeChild(r),a===t)return!0}}return!1},gA=function(e){var t=e.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",e.body.appendChild(t);var n=e.createRange();t.innerHTML="function"===typeof"".repeat?"👨".repeat(10):"";var r=t.firstChild,i=l(r.data).map((function(e){return u(e)})),a=0,A={},o=i.every((function(e,t){n.setStart(r,a),n.setEnd(r,a+e.length);var i=n.getBoundingClientRect();a+=e.length;var o=i.x>A.x||i.y>A.y;return A=i,0===t||o}));return e.body.removeChild(t),o},mA=function(){return"undefined"!==typeof(new Image).crossOrigin},vA=function(){return"string"===typeof(new XMLHttpRequest).responseType},yA=function(e){var t=new Image,n=e.createElement("canvas"),r=n.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(t,0,0),n.toDataURL()}catch(Rt){return!1}return!0},wA=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},BA=function(e){var t=e.createElement("canvas"),n=100;t.width=n,t.height=n;var r=t.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,n,n);var i=new Image,a=t.toDataURL();i.src=a;var A=_A(n,n,0,0,i);return r.fillStyle="red",r.fillRect(0,0,n,n),bA(A).then((function(t){r.drawImage(t,0,0);var i=r.getImageData(0,0,n,n).data;r.fillStyle="red",r.fillRect(0,0,n,n);var A=e.createElement("div");return A.style.backgroundImage="url("+a+")",A.style.height=n+"px",wA(i)?bA(_A(n,n,0,0,A)):Promise.reject(!1)})).then((function(e){return r.drawImage(e,0,0),wA(r.getImageData(0,0,n,n).data)})).catch((function(){return!1}))},_A=function(e,t,n,r,i){var a="http://www.w3.org/2000/svg",A=document.createElementNS(a,"svg"),o=document.createElementNS(a,"foreignObject");return A.setAttributeNS(null,"width",e.toString()),A.setAttributeNS(null,"height",t.toString()),o.setAttributeNS(null,"width","100%"),o.setAttributeNS(null,"height","100%"),o.setAttributeNS(null,"x",n.toString()),o.setAttributeNS(null,"y",r.toString()),o.setAttributeNS(null,"externalResourcesRequired","true"),A.appendChild(o),o.appendChild(i),A},bA=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){return t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},xA={get SUPPORT_RANGE_BOUNDS(){var e=pA(document);return Object.defineProperty(xA,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=xA.SUPPORT_RANGE_BOUNDS&&gA(document);return Object.defineProperty(xA,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=yA(document);return Object.defineProperty(xA,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"===typeof Array.from&&"function"===typeof window.fetch?BA(document):Promise.resolve(!1);return Object.defineProperty(xA,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=mA();return Object.defineProperty(xA,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=vA();return Object.defineProperty(xA,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(xA,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"===typeof Intl||!Intl.Segmenter);return Object.defineProperty(xA,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},CA=function(){function e(e,t){this.text=e,this.bounds=t}return e}(),SA=function(e,t,n,r){var i=TA(t,n),a=[],o=0;return i.forEach((function(t){if(n.textDecorationLine.length||t.trim().length>0)if(xA.SUPPORT_RANGE_BOUNDS){var i=UA(r,o,t.length).getClientRects();if(i.length>1){var s=MA(t),l=0;s.forEach((function(t){a.push(new CA(t,A.fromDOMRectList(e,UA(r,l+o,t.length).getClientRects()))),l+=t.length}))}else a.push(new CA(t,A.fromDOMRectList(e,i)))}else{var u=r.splitText(t.length);a.push(new CA(t,EA(e,r))),r=u}else xA.SUPPORT_RANGE_BOUNDS||(r=r.splitText(t.length));o+=t.length})),a},EA=function(e,t){var n=t.ownerDocument;if(n){var r=n.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));var i=t.parentNode;if(i){i.replaceChild(r,t);var a=o(e,r);return r.firstChild&&i.replaceChild(r.firstChild,r),a}}return A.EMPTY},UA=function(e,t,n){var r=e.ownerDocument;if(!r)throw new Error("Node has no owner document");var i=r.createRange();return i.setStart(e,t),i.setEnd(e,t+n),i},MA=function(e){if(xA.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map((function(e){return e.segment}))}return fA(e)},FA=function(e,t){if(xA.SUPPORT_NATIVE_TEXT_SEGMENTATION){var n=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(n.segment(e)).map((function(e){return e.segment}))}return QA(e,t)},TA=function(e,t){return 0!==t.letterSpacing?MA(e):FA(e,t)},kA=[32,160,4961,65792,65793,4153,4241],QA=function(e,t){for(var n,r=Ve(e,{lineBreak:t.lineBreak,wordBreak:"break-word"===t.overflowWrap?"break-word":t.wordBreak}),i=[],a=function(){if(n.value){var e=n.value.slice(),t=l(e),r="";t.forEach((function(e){-1===kA.indexOf(e)?r+=u(e):(r.length&&i.push(r),i.push(u(e)),r="")})),r.length&&i.push(r)}};!(n=r.next()).done;)a();return i},LA=function(){function e(e,t,n){this.text=DA(t.data,n.textTransform),this.textBounds=SA(e,this.text,n,t)}return e}(),DA=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(IA,RA);case 2:return e.toUpperCase();default:return e}},IA=/(^|\s|:|-|\(|\))([a-z])/g,RA=function(e,t,n){return e.length>0?t+n.toUpperCase():e},HA=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.src=n.currentSrc||n.src,r.intrinsicWidth=n.naturalWidth,r.intrinsicHeight=n.naturalHeight,r.context.cache.addImage(r.src),r}return t(n,e),n}(_a),PA=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.canvas=n,r.intrinsicWidth=n.width,r.intrinsicHeight=n.height,r}return t(n,e),n}(_a),NA=function(e){function n(t,n){var r=e.call(this,t,n)||this,i=new XMLSerializer,a=o(t,n);return n.setAttribute("width",a.width+"px"),n.setAttribute("height",a.height+"px"),r.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(n)),r.intrinsicWidth=n.width.baseVal.value,r.intrinsicHeight=n.height.baseVal.value,r.context.cache.addImage(r.svg),r}return t(n,e),n}(_a),OA=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return t(n,e),n}(_a),VA=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.start=n.start,r.reversed="boolean"===typeof n.reversed&&!0===n.reversed,r}return t(n,e),n}(_a),zA=[{type:15,flags:0,unit:"px",number:3}],GA=[{type:16,flags:0,number:50}],KA=function(e){return e.width>e.height?new A(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new A(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e},WA=function(e){var t=e.type===qA?new Array(e.value.length+1).join("\u2022"):e.value;return 0===t.length?e.placeholder||"":t},jA="checkbox",XA="radio",qA="password",YA=707406591,JA=function(e){function n(t,n){var r=e.call(this,t,n)||this;switch(r.type=n.type.toLowerCase(),r.checked=n.checked,r.value=WA(n),r.type!==jA&&r.type!==XA||(r.styles.backgroundColor=3739148031,r.styles.borderTopColor=r.styles.borderRightColor=r.styles.borderBottomColor=r.styles.borderLeftColor=2779096575,r.styles.borderTopWidth=r.styles.borderRightWidth=r.styles.borderBottomWidth=r.styles.borderLeftWidth=1,r.styles.borderTopStyle=r.styles.borderRightStyle=r.styles.borderBottomStyle=r.styles.borderLeftStyle=1,r.styles.backgroundClip=[0],r.styles.backgroundOrigin=[0],r.bounds=KA(r.bounds)),r.type){case jA:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=zA;break;case XA:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=GA}return r}return t(n,e),n}(_a),ZA=function(e){function n(t,n){var r=e.call(this,t,n)||this,i=n.options[n.selectedIndex||0];return r.value=i&&i.text||"",r}return t(n,e),n}(_a),$A=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return t(n,e),n}(_a),eo=function(e){function n(t,n){var r=e.call(this,t,n)||this;r.src=n.src,r.width=parseInt(n.width,10)||0,r.height=parseInt(n.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{if(n.contentWindow&&n.contentWindow.document&&n.contentWindow.document.documentElement){r.tree=io(t,n.contentWindow.document.documentElement);var i=n.contentWindow.document.documentElement?cr(t,getComputedStyle(n.contentWindow.document.documentElement).backgroundColor):dr.TRANSPARENT,a=n.contentWindow.document.body?cr(t,getComputedStyle(n.contentWindow.document.body).backgroundColor):dr.TRANSPARENT;r.backgroundColor=rr(i)?rr(a)?r.styles.backgroundColor:a:i}}catch(Rt){}return r}return t(n,e),n}(_a),to=["OL","UL","MENU"],no=function e(t,n,r,i){for(var a=n.firstChild,A=void 0;a;a=A)if(A=a.nextSibling,oo(a)&&a.data.trim().length>0)r.textNodes.push(new LA(t,a,r.styles));else if(so(a))if(So(a)&&a.assignedNodes)a.assignedNodes().forEach((function(n){return e(t,n,r,i)}));else{var o=ro(t,a);o.styles.isVisible()&&(ao(a,o,i)?o.flags|=4:Ao(o.styles)&&(o.flags|=2),-1!==to.indexOf(a.tagName)&&(o.flags|=8),r.elements.push(o),a.slot,a.shadowRoot?e(t,a.shadowRoot,o,i):xo(a)||go(a)||Co(a)||e(t,a,o,i))}},ro=function(e,t){return wo(t)?new HA(e,t):vo(t)?new PA(e,t):go(t)?new NA(e,t):co(t)?new OA(e,t):ho(t)?new VA(e,t):fo(t)?new JA(e,t):Co(t)?new ZA(e,t):xo(t)?new $A(e,t):Bo(t)?new eo(e,t):new _a(e,t)},io=function(e,t){var n=ro(e,t);return n.flags|=4,no(e,t,n,n),n},ao=function(e,t,n){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||mo(e)&&n.styles.isTransparent()},Ao=function(e){return e.isPositioned()||e.isFloating()},oo=function(e){return e.nodeType===Node.TEXT_NODE},so=function(e){return e.nodeType===Node.ELEMENT_NODE},lo=function(e){return so(e)&&"undefined"!==typeof e.style&&!uo(e)},uo=function(e){return"object"===typeof e.className},co=function(e){return"LI"===e.tagName},ho=function(e){return"OL"===e.tagName},fo=function(e){return"INPUT"===e.tagName},po=function(e){return"HTML"===e.tagName},go=function(e){return"svg"===e.tagName},mo=function(e){return"BODY"===e.tagName},vo=function(e){return"CANVAS"===e.tagName},yo=function(e){return"VIDEO"===e.tagName},wo=function(e){return"IMG"===e.tagName},Bo=function(e){return"IFRAME"===e.tagName},_o=function(e){return"STYLE"===e.tagName},bo=function(e){return"SCRIPT"===e.tagName},xo=function(e){return"TEXTAREA"===e.tagName},Co=function(e){return"SELECT"===e.tagName},So=function(e){return"SLOT"===e.tagName},Eo=function(e){return e.tagName.indexOf("-")>0},Uo=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach((function(e){return t.counters[e].pop()}))},e.prototype.parse=function(e){var t=this,n=e.counterIncrement,r=e.counterReset,i=!0;null!==n&&n.forEach((function(e){var n=t.counters[e.counter];n&&0!==e.increment&&(i=!1,n.length||n.push(1),n[Math.max(0,n.length-1)]+=e.increment)}));var a=[];return i&&r.forEach((function(e){var n=t.counters[e.counter];a.push(e.counter),n||(n=t.counters[e.counter]=[]),n.push(e.reset)})),a},e}(),Mo={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Fo={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054f","\u054e","\u054d","\u054c","\u054b","\u054a","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053f","\u053e","\u053d","\u053c","\u053b","\u053a","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},To={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05d9\u05f3","\u05d8\u05f3","\u05d7\u05f3","\u05d6\u05f3","\u05d5\u05f3","\u05d4\u05f3","\u05d3\u05f3","\u05d2\u05f3","\u05d1\u05f3","\u05d0\u05f3","\u05ea","\u05e9","\u05e8","\u05e7","\u05e6","\u05e4","\u05e2","\u05e1","\u05e0","\u05de","\u05dc","\u05db","\u05d9\u05d8","\u05d9\u05d7","\u05d9\u05d6","\u05d8\u05d6","\u05d8\u05d5","\u05d9","\u05d8","\u05d7","\u05d6","\u05d5","\u05d4","\u05d3","\u05d2","\u05d1","\u05d0"]},ko={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10f5","\u10f0","\u10ef","\u10f4","\u10ee","\u10ed","\u10ec","\u10eb","\u10ea","\u10e9","\u10e8","\u10e7","\u10e6","\u10e5","\u10e4","\u10f3","\u10e2","\u10e1","\u10e0","\u10df","\u10de","\u10dd","\u10f2","\u10dc","\u10db","\u10da","\u10d9","\u10d8","\u10d7","\u10f1","\u10d6","\u10d5","\u10d4","\u10d3","\u10d2","\u10d1","\u10d0"]},Qo=function(e,t,n,r,i,a){return e<t||e>n?Wo(e,i,a.length>0):r.integers.reduce((function(t,n,i){for(;e>=n;)e-=n,t+=r.values[i];return t}),"")+a},Lo=function(e,t,n,r){var i="";do{n||e--,i=r(e)+i,e/=t}while(e*t>=t);return i},Do=function(e,t,n,r,i){var a=n-t+1;return(e<0?"-":"")+(Lo(Math.abs(e),a,r,(function(e){return u(Math.floor(e%a)+t)}))+i)},Io=function(e,t,n){void 0===n&&(n=". ");var r=t.length;return Lo(Math.abs(e),r,!1,(function(e){return t[Math.floor(e%r)]}))+n},Ro=1,Ho=2,Po=4,No=8,Oo=function(e,t,n,r,i,a){if(e<-9999||e>9999)return Wo(e,4,i.length>0);var A=Math.abs(e),o=i;if(0===A)return t[0]+o;for(var s=0;A>0&&s<=4;s++){var l=A%10;0===l&&ia(a,Ro)&&""!==o?o=t[l]+o:l>1||1===l&&0===s||1===l&&1===s&&ia(a,Ho)||1===l&&1===s&&ia(a,Po)&&e>100||1===l&&s>1&&ia(a,No)?o=t[l]+(s>0?n[s-1]:"")+o:1===l&&s>0&&(o=n[s-1]+o),A=Math.floor(A/10)}return(e<0?r:"")+o},Vo="\u5341\u767e\u5343\u842c",zo="\u62fe\u4f70\u4edf\u842c",Go="\u30de\u30a4\u30ca\u30b9",Ko="\ub9c8\uc774\ub108\uc2a4",Wo=function(e,t,n){var r=n?". ":"",i=n?"\u3001":"",a=n?", ":"",A=n?" ":"";switch(t){case 0:return"\u2022"+A;case 1:return"\u25e6"+A;case 2:return"\u25fe"+A;case 5:var o=Do(e,48,57,!0,r);return o.length<4?"0"+o:o;case 4:return Io(e,"\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d",i);case 6:return Qo(e,1,3999,Mo,3,r).toLowerCase();case 7:return Qo(e,1,3999,Mo,3,r);case 8:return Do(e,945,969,!1,r);case 9:return Do(e,97,122,!1,r);case 10:return Do(e,65,90,!1,r);case 11:return Do(e,1632,1641,!0,r);case 12:case 49:return Qo(e,1,9999,Fo,3,r);case 35:return Qo(e,1,9999,Fo,3,r).toLowerCase();case 13:return Do(e,2534,2543,!0,r);case 14:case 30:return Do(e,6112,6121,!0,r);case 15:return Io(e,"\u5b50\u4e11\u5bc5\u536f\u8fb0\u5df3\u5348\u672a\u7533\u9149\u620c\u4ea5",i);case 16:return Io(e,"\u7532\u4e59\u4e19\u4e01\u620a\u5df1\u5e9a\u8f9b\u58ec\u7678",i);case 17:case 48:return Oo(e,"\u96f6\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d",Vo,"\u8ca0",i,Ho|Po|No);case 47:return Oo(e,"\u96f6\u58f9\u8cb3\u53c3\u8086\u4f0d\u9678\u67d2\u634c\u7396",zo,"\u8ca0",i,Ro|Ho|Po|No);case 42:return Oo(e,"\u96f6\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d",Vo,"\u8d1f",i,Ho|Po|No);case 41:return Oo(e,"\u96f6\u58f9\u8d30\u53c1\u8086\u4f0d\u9646\u67d2\u634c\u7396",zo,"\u8d1f",i,Ro|Ho|Po|No);case 26:return Oo(e,"\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d","\u5341\u767e\u5343\u4e07",Go,i,0);case 25:return Oo(e,"\u96f6\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d","\u62fe\u767e\u5343\u4e07",Go,i,Ro|Ho|Po);case 31:return Oo(e,"\uc601\uc77c\uc774\uc0bc\uc0ac\uc624\uc721\uce60\ud314\uad6c","\uc2ed\ubc31\ucc9c\ub9cc",Ko,a,Ro|Ho|Po);case 33:return Oo(e,"\u96f6\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d","\u5341\u767e\u5343\u842c",Ko,a,0);case 32:return Oo(e,"\u96f6\u58f9\u8cb3\u53c3\u56db\u4e94\u516d\u4e03\u516b\u4e5d","\u62fe\u767e\u5343",Ko,a,Ro|Ho|Po);case 18:return Do(e,2406,2415,!0,r);case 20:return Qo(e,1,19999,ko,3,r);case 21:return Do(e,2790,2799,!0,r);case 22:return Do(e,2662,2671,!0,r);case 22:return Qo(e,1,10999,To,3,r);case 23:return Io(e,"\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051\u3053\u3055\u3057\u3059\u305b\u305d\u305f\u3061\u3064\u3066\u3068\u306a\u306b\u306c\u306d\u306e\u306f\u3072\u3075\u3078\u307b\u307e\u307f\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308a\u308b\u308c\u308d\u308f\u3090\u3091\u3092\u3093");case 24:return Io(e,"\u3044\u308d\u306f\u306b\u307b\u3078\u3068\u3061\u308a\u306c\u308b\u3092\u308f\u304b\u3088\u305f\u308c\u305d\u3064\u306d\u306a\u3089\u3080\u3046\u3090\u306e\u304a\u304f\u3084\u307e\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304d\u3086\u3081\u307f\u3057\u3091\u3072\u3082\u305b\u3059");case 27:return Do(e,3302,3311,!0,r);case 28:return Io(e,"\u30a2\u30a4\u30a6\u30a8\u30aa\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e6\u30e8\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f0\u30f1\u30f2\u30f3",i);case 29:return Io(e,"\u30a4\u30ed\u30cf\u30cb\u30db\u30d8\u30c8\u30c1\u30ea\u30cc\u30eb\u30f2\u30ef\u30ab\u30e8\u30bf\u30ec\u30bd\u30c4\u30cd\u30ca\u30e9\u30e0\u30a6\u30f0\u30ce\u30aa\u30af\u30e4\u30de\u30b1\u30d5\u30b3\u30a8\u30c6\u30a2\u30b5\u30ad\u30e6\u30e1\u30df\u30b7\u30f1\u30d2\u30e2\u30bb\u30b9",i);case 34:return Do(e,3792,3801,!0,r);case 37:return Do(e,6160,6169,!0,r);case 38:return Do(e,4160,4169,!0,r);case 39:return Do(e,2918,2927,!0,r);case 40:return Do(e,1776,1785,!0,r);case 43:return Do(e,3046,3055,!0,r);case 44:return Do(e,3174,3183,!0,r);case 45:return Do(e,3664,3673,!0,r);case 46:return Do(e,3872,3881,!0,r);default:return Do(e,48,57,!0,r)}},jo="data-html2canvas-ignore",Xo=function(){function e(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new Uo,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var n=this,a=Yo(e,t);if(!a.contentWindow)return Promise.reject("Unable to find iframe window");var A=e.defaultView.pageXOffset,o=e.defaultView.pageYOffset,s=a.contentWindow,l=s.document,u=$o(a).then((function(){return r(n,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return this.scrolledElements.forEach(is),s&&(s.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||s.scrollY===t.top&&s.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(s.scrollX-t.left,s.scrollY-t.top,0,0))),e=this.options.onclone,"undefined"===typeof(n=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:l.fonts&&l.fonts.ready?[4,l.fonts.ready]:[3,2];case 1:r.sent(),r.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Zo(l)]:[3,4];case 3:r.sent(),r.label=4;case 4:return"function"===typeof e?[2,Promise.resolve().then((function(){return e(l,n)})).then((function(){return a}))]:[2,a]}}))}))}));return l.open(),l.write(ns(document.doctype)+"<html></html>"),rs(this.referenceElement.ownerDocument,A,o),l.replaceChild(l.adoptNode(this.documentElement),l.documentElement),l.close(),u},e.prototype.createElementClone=function(e){if(Ba(e,2),vo(e))return this.createCanvasClone(e);if(yo(e))return this.createVideoClone(e);if(_o(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return wo(t)&&(wo(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),Eo(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return ts(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var n=[].slice.call(t.cssRules,0).reduce((function(e,t){return t&&"string"===typeof t.cssText?e+t.cssText:e}),""),r=e.cloneNode(!1);return r.textContent=n,r}}catch(Rt){if(this.context.logger.error("Unable to access cssRules property",Rt),"SecurityError"!==Rt.name)throw Rt}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var n=e.ownerDocument.createElement("img");try{return n.src=e.toDataURL(),n}catch(Rt){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var r=e.cloneNode(!1);try{r.width=e.width,r.height=e.height;var i=e.getContext("2d"),a=r.getContext("2d");if(a)if(!this.options.allowTaint&&i)a.putImageData(i.getImageData(0,0,e.width,e.height),0,0);else{var A=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(A){var o=A.getContextAttributes();!1===(null===o||void 0===o?void 0:o.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}a.drawImage(e,0,0)}return r}catch(Rt){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return r},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var n=t.getContext("2d");try{return n&&(n.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||n.getImageData(0,0,t.width,t.height)),t}catch(Rt){this.context.logger.info("Unable to clone video as it is tainted",e)}var r=e.ownerDocument.createElement("canvas");return r.width=e.offsetWidth,r.height=e.offsetHeight,r},e.prototype.appendChildNode=function(e,t,n){so(t)&&(bo(t)||t.hasAttribute(jo)||"function"===typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&so(t)&&_o(t)||e.appendChild(this.cloneNode(t,n))},e.prototype.cloneChildNodes=function(e,t,n){for(var r=this,i=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;i;i=i.nextSibling)if(so(i)&&So(i)&&"function"===typeof i.assignedNodes){var a=i.assignedNodes();a.length&&a.forEach((function(e){return r.appendChildNode(t,e,n)}))}else this.appendChildNode(t,i,n)},e.prototype.cloneNode=function(e,t){if(oo(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&so(e)&&(lo(e)||uo(e))){var r=this.createElementClone(e);r.style.transitionProperty="none";var i=n.getComputedStyle(e),a=n.getComputedStyle(e,":before"),A=n.getComputedStyle(e,":after");this.referenceElement===e&&lo(r)&&(this.clonedReferenceElement=r),mo(r)&&us(r);var o=this.counters.parse(new ma(this.context,i)),s=this.resolvePseudoContent(e,r,a,Ka.BEFORE);Eo(e)&&(t=!0),yo(e)||this.cloneChildNodes(e,r,t),s&&r.insertBefore(s,r.firstChild);var l=this.resolvePseudoContent(e,r,A,Ka.AFTER);return l&&r.appendChild(l),this.counters.pop(o),(i&&(this.options.copyStyles||uo(e))&&!Bo(e)||t)&&ts(i,r),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(xo(e)||Co(e))&&(xo(r)||Co(r))&&(r.value=e.value),r}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,n,r){var i=this;if(n){var a=n.content,A=t.ownerDocument;if(A&&a&&"none"!==a&&"-moz-alt-content"!==a&&"none"!==n.display){this.counters.parse(new ma(this.context,n));var o=new ga(this.context,n),s=A.createElement("html2canvaspseudoelement");ts(n,s),o.content.forEach((function(t){if(0===t.type)s.appendChild(A.createTextNode(t.value));else if(22===t.type){var n=A.createElement("img");n.src=t.value,n.style.opacity="1",s.appendChild(n)}else if(18===t.type){if("attr"===t.name){var r=t.values.filter(Qn);r.length&&s.appendChild(A.createTextNode(e.getAttribute(r[0].value)||""))}else if("counter"===t.name){var a=t.values.filter(Rn),l=a[0],u=a[1];if(l&&Qn(l)){var c=i.counters.getCounterValue(l.value),d=u&&Qn(u)?xi.parse(i.context,u.value):3;s.appendChild(A.createTextNode(Wo(c,d,!1)))}}else if("counters"===t.name){var h=t.values.filter(Rn),f=(l=h[0],h[1]);if(u=h[2],l&&Qn(l)){var p=i.counters.getCounterValues(l.value),g=u&&Qn(u)?xi.parse(i.context,u.value):3,m=f&&0===f.type?f.value:"",v=p.map((function(e){return Wo(e,g,!1)})).join(m);s.appendChild(A.createTextNode(v))}}}else if(20===t.type)switch(t.value){case"open-quote":s.appendChild(A.createTextNode(ua(o.quotes,i.quoteDepth++,!0)));break;case"close-quote":s.appendChild(A.createTextNode(ua(o.quotes,--i.quoteDepth,!1)));break;default:s.appendChild(A.createTextNode(t.value))}})),s.className=os+" "+ss;var l=r===Ka.BEFORE?" "+os:" "+ss;return uo(t)?t.className.baseValue+=l:t.className+=l,s}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();!function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"}(Ka||(Ka={}));var qo,Yo=function(e,t){var n=e.createElement("iframe");return n.className="html2canvas-container",n.style.visibility="hidden",n.style.position="fixed",n.style.left="-10000px",n.style.top="0px",n.style.border="0",n.width=t.width.toString(),n.height=t.height.toString(),n.scrolling="no",n.setAttribute(jo,"true"),e.body.appendChild(n),n},Jo=function(e){return new Promise((function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}))},Zo=function(e){return Promise.all([].slice.call(e.images,0).map(Jo))},$o=function(e){return new Promise((function(t,n){var r=e.contentWindow;if(!r)return n("No window assigned for iframe");var i=r.document;r.onload=e.onload=function(){r.onload=e.onload=null;var n=setInterval((function(){i.body.childNodes.length>0&&"complete"===i.readyState&&(clearInterval(n),t(e))}),50)}}))},es=["all","d","content"],ts=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e.item(n);-1===es.indexOf(r)&&t.style.setProperty(r,e.getPropertyValue(r))}return t},ns=function(e){var t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=e.internalSubset),e.publicId&&(t+='"'+e.publicId+'"'),e.systemId&&(t+='"'+e.systemId+'"'),t+=">"),t},rs=function(e,t,n){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||n!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,n)},is=function(e){var t=e[0],n=e[1],r=e[2];t.scrollLeft=n,t.scrollTop=r},as=":before",As=":after",os="___html2canvas___pseudoelement_before",ss="___html2canvas___pseudoelement_after",ls='{\n content: "" !important;\n display: none !important;\n}',us=function(e){cs(e,"."+os+as+ls+"\n ."+ss+As+ls)},cs=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement("style");r.textContent=t,e.appendChild(r)}},ds=function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),hs=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:ws(e)||ms(e)?((this._cache[e]=this.loadImage(e)).catch((function(){})),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return r(this,void 0,void 0,(function(){var t,n,r,a,A=this;return i(this,(function(i){switch(i.label){case 0:return t=ds.isSameOrigin(e),n=!vs(e)&&!0===this._options.useCORS&&xA.SUPPORT_CORS_IMAGES&&!t,r=!vs(e)&&!t&&!ws(e)&&"string"===typeof this._options.proxy&&xA.SUPPORT_CORS_XHR&&!n,t||!1!==this._options.allowTaint||vs(e)||ws(e)||r||n?(a=e,r?[4,this.proxy(a)]:[3,2]):[2];case 1:a=i.sent(),i.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,(ys(a)||n)&&(r.crossOrigin="anonymous"),r.src=a,!0===r.complete&&setTimeout((function(){return e(r)}),500),A._options.imageTimeout>0&&setTimeout((function(){return t("Timed out ("+A._options.imageTimeout+"ms) loading image")}),A._options.imageTimeout)}))];case 3:return[2,i.sent()]}}))}))},e.prototype.has=function(e){return"undefined"!==typeof this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var r=e.substring(0,256);return new Promise((function(i,a){var A=xA.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;o.onload=function(){if(200===o.status)if("text"===A)i(o.response);else{var e=new FileReader;e.addEventListener("load",(function(){return i(e.result)}),!1),e.addEventListener("error",(function(e){return a(e)}),!1),e.readAsDataURL(o.response)}else a("Failed to proxy resource "+r+" with status code "+o.status)},o.onerror=a;var s=n.indexOf("?")>-1?"&":"?";if(o.open("GET",""+n+s+"url="+encodeURIComponent(e)+"&responseType="+A),"text"!==A&&o instanceof XMLHttpRequest&&(o.responseType=A),t._options.imageTimeout){var l=t._options.imageTimeout;o.timeout=l,o.ontimeout=function(){return a("Timed out ("+l+"ms) proxying "+r)}}o.send()}))},e}(),fs=/^data:image\/svg\+xml/i,ps=/^data:image\/.*;base64,/i,gs=/^data:image\/.*/i,ms=function(e){return xA.SUPPORT_SVG_DRAWING||!Bs(e)},vs=function(e){return gs.test(e)},ys=function(e){return ps.test(e)},ws=function(e){return"blob"===e.substr(0,4)},Bs=function(e){return"svg"===e.substr(-3).toLowerCase()||fs.test(e)},_s=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),bs=function(e,t,n){return new _s(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},xs=function(){function e(e,t,n,r){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=r}return e.prototype.subdivide=function(t,n){var r=bs(this.start,this.startControl,t),i=bs(this.startControl,this.endControl,t),a=bs(this.endControl,this.end,t),A=bs(r,i,t),o=bs(i,a,t),s=bs(A,o,t);return n?new e(this.start,r,A,s):new e(s,o,a,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),Cs=function(e){return 1===e.type},Ss=function(){function e(e){var t=e.styles,n=e.bounds,r=Wn(t.borderTopLeftRadius,n.width,n.height),i=r[0],a=r[1],A=Wn(t.borderTopRightRadius,n.width,n.height),o=A[0],s=A[1],l=Wn(t.borderBottomRightRadius,n.width,n.height),u=l[0],c=l[1],d=Wn(t.borderBottomLeftRadius,n.width,n.height),h=d[0],f=d[1],p=[];p.push((i+o)/n.width),p.push((h+u)/n.width),p.push((a+f)/n.height),p.push((s+c)/n.height);var g=Math.max.apply(Math,p);g>1&&(i/=g,a/=g,o/=g,s/=g,u/=g,c/=g,h/=g,f/=g);var m=n.width-o,v=n.height-c,y=n.width-u,w=n.height-f,B=t.borderTopWidth,_=t.borderRightWidth,b=t.borderBottomWidth,x=t.borderLeftWidth,C=jn(t.paddingTop,e.bounds.width),S=jn(t.paddingRight,e.bounds.width),E=jn(t.paddingBottom,e.bounds.width),U=jn(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||a>0?Es(n.left+x/3,n.top+B/3,i-x/3,a-B/3,qo.TOP_LEFT):new _s(n.left+x/3,n.top+B/3),this.topRightBorderDoubleOuterBox=i>0||a>0?Es(n.left+m,n.top+B/3,o-_/3,s-B/3,qo.TOP_RIGHT):new _s(n.left+n.width-_/3,n.top+B/3),this.bottomRightBorderDoubleOuterBox=u>0||c>0?Es(n.left+y,n.top+v,u-_/3,c-b/3,qo.BOTTOM_RIGHT):new _s(n.left+n.width-_/3,n.top+n.height-b/3),this.bottomLeftBorderDoubleOuterBox=h>0||f>0?Es(n.left+x/3,n.top+w,h-x/3,f-b/3,qo.BOTTOM_LEFT):new _s(n.left+x/3,n.top+n.height-b/3),this.topLeftBorderDoubleInnerBox=i>0||a>0?Es(n.left+2*x/3,n.top+2*B/3,i-2*x/3,a-2*B/3,qo.TOP_LEFT):new _s(n.left+2*x/3,n.top+2*B/3),this.topRightBorderDoubleInnerBox=i>0||a>0?Es(n.left+m,n.top+2*B/3,o-2*_/3,s-2*B/3,qo.TOP_RIGHT):new _s(n.left+n.width-2*_/3,n.top+2*B/3),this.bottomRightBorderDoubleInnerBox=u>0||c>0?Es(n.left+y,n.top+v,u-2*_/3,c-2*b/3,qo.BOTTOM_RIGHT):new _s(n.left+n.width-2*_/3,n.top+n.height-2*b/3),this.bottomLeftBorderDoubleInnerBox=h>0||f>0?Es(n.left+2*x/3,n.top+w,h-2*x/3,f-2*b/3,qo.BOTTOM_LEFT):new _s(n.left+2*x/3,n.top+n.height-2*b/3),this.topLeftBorderStroke=i>0||a>0?Es(n.left+x/2,n.top+B/2,i-x/2,a-B/2,qo.TOP_LEFT):new _s(n.left+x/2,n.top+B/2),this.topRightBorderStroke=i>0||a>0?Es(n.left+m,n.top+B/2,o-_/2,s-B/2,qo.TOP_RIGHT):new _s(n.left+n.width-_/2,n.top+B/2),this.bottomRightBorderStroke=u>0||c>0?Es(n.left+y,n.top+v,u-_/2,c-b/2,qo.BOTTOM_RIGHT):new _s(n.left+n.width-_/2,n.top+n.height-b/2),this.bottomLeftBorderStroke=h>0||f>0?Es(n.left+x/2,n.top+w,h-x/2,f-b/2,qo.BOTTOM_LEFT):new _s(n.left+x/2,n.top+n.height-b/2),this.topLeftBorderBox=i>0||a>0?Es(n.left,n.top,i,a,qo.TOP_LEFT):new _s(n.left,n.top),this.topRightBorderBox=o>0||s>0?Es(n.left+m,n.top,o,s,qo.TOP_RIGHT):new _s(n.left+n.width,n.top),this.bottomRightBorderBox=u>0||c>0?Es(n.left+y,n.top+v,u,c,qo.BOTTOM_RIGHT):new _s(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=h>0||f>0?Es(n.left,n.top+w,h,f,qo.BOTTOM_LEFT):new _s(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||a>0?Es(n.left+x,n.top+B,Math.max(0,i-x),Math.max(0,a-B),qo.TOP_LEFT):new _s(n.left+x,n.top+B),this.topRightPaddingBox=o>0||s>0?Es(n.left+Math.min(m,n.width-_),n.top+B,m>n.width+_?0:Math.max(0,o-_),Math.max(0,s-B),qo.TOP_RIGHT):new _s(n.left+n.width-_,n.top+B),this.bottomRightPaddingBox=u>0||c>0?Es(n.left+Math.min(y,n.width-x),n.top+Math.min(v,n.height-b),Math.max(0,u-_),Math.max(0,c-b),qo.BOTTOM_RIGHT):new _s(n.left+n.width-_,n.top+n.height-b),this.bottomLeftPaddingBox=h>0||f>0?Es(n.left+x,n.top+Math.min(w,n.height-b),Math.max(0,h-x),Math.max(0,f-b),qo.BOTTOM_LEFT):new _s(n.left+x,n.top+n.height-b),this.topLeftContentBox=i>0||a>0?Es(n.left+x+U,n.top+B+C,Math.max(0,i-(x+U)),Math.max(0,a-(B+C)),qo.TOP_LEFT):new _s(n.left+x+U,n.top+B+C),this.topRightContentBox=o>0||s>0?Es(n.left+Math.min(m,n.width+x+U),n.top+B+C,m>n.width+x+U?0:o-x+U,s-(B+C),qo.TOP_RIGHT):new _s(n.left+n.width-(_+S),n.top+B+C),this.bottomRightContentBox=u>0||c>0?Es(n.left+Math.min(y,n.width-(x+U)),n.top+Math.min(v,n.height+B+C),Math.max(0,u-(_+S)),c-(b+E),qo.BOTTOM_RIGHT):new _s(n.left+n.width-(_+S),n.top+n.height-(b+E)),this.bottomLeftContentBox=h>0||f>0?Es(n.left+x+U,n.top+w,Math.max(0,h-(x+U)),f-(b+E),qo.BOTTOM_LEFT):new _s(n.left+x+U,n.top+n.height-(b+E))}return e}();!function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(qo||(qo={}));var Es=function(e,t,n,r,i){var a=(Math.sqrt(2)-1)/3*4,A=n*a,o=r*a,s=e+n,l=t+r;switch(i){case qo.TOP_LEFT:return new xs(new _s(e,l),new _s(e,l-o),new _s(s-A,t),new _s(s,t));case qo.TOP_RIGHT:return new xs(new _s(e,t),new _s(e+A,t),new _s(s,l-o),new _s(s,l));case qo.BOTTOM_RIGHT:return new xs(new _s(s,t),new _s(s,t+o),new _s(e+A,l),new _s(e,l));case qo.BOTTOM_LEFT:default:return new xs(new _s(s,l),new _s(s-A,l),new _s(e,t+o),new _s(e,t))}},Us=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},Ms=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},Fs=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},Ts=function(){function e(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return e}(),ks=function(){function e(e,t){this.path=e,this.target=t,this.type=1}return e}(),Qs=function(){function e(e){this.opacity=e,this.type=2,this.target=6}return e}(),Ls=function(e){return 0===e.type},Ds=function(e){return 1===e.type},Is=function(e){return 2===e.type},Rs=function(e,t){return e.length===t.length&&e.some((function(e,n){return e===t[n]}))},Hs=function(e,t,n,r,i){return e.map((function(e,a){switch(a){case 0:return e.add(t,n);case 1:return e.add(t+r,n);case 2:return e.add(t+r,n+i);case 3:return e.add(t,n+i)}return e}))},Ps=function(){function e(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),Ns=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new Ss(this.container),this.container.styles.opacity<1&&this.effects.push(new Qs(this.container.styles.opacity)),null!==this.container.styles.transform){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new Ts(n,r,i))}if(0!==this.container.styles.overflowX){var a=Us(this.curves),A=Fs(this.curves);Rs(a,A)?this.effects.push(new ks(a,6)):(this.effects.push(new ks(a,2)),this.effects.push(new ks(A,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),n=this.parent,r=this.effects.slice(0);n;){var i=n.effects.filter((function(e){return!Ds(e)}));if(t||0!==n.container.styles.position||!n.parent){if(r.unshift.apply(r,i),t=-1===[2,3].indexOf(n.container.styles.position),0!==n.container.styles.overflowX){var a=Us(n.curves),A=Fs(n.curves);Rs(a,A)||r.unshift(new ks(A,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter((function(t){return ia(t.target,e)}))},e}(),Os=function e(t,n,r,i){t.container.elements.forEach((function(a){var A=ia(a.flags,4),o=ia(a.flags,2),s=new Ns(a,t);ia(a.styles.display,2048)&&i.push(s);var l=ia(a.flags,8)?[]:i;if(A||o){var u=A||a.styles.isPositioned()?r:n,c=new Ps(s);if(a.styles.isPositioned()||a.styles.opacity<1||a.styles.isTransformed()){var d=a.styles.zIndex.order;if(d<0){var h=0;u.negativeZIndex.some((function(e,t){return d>e.element.container.styles.zIndex.order?(h=t,!1):h>0})),u.negativeZIndex.splice(h,0,c)}else if(d>0){var f=0;u.positiveZIndex.some((function(e,t){return d>=e.element.container.styles.zIndex.order?(f=t+1,!1):f>0})),u.positiveZIndex.splice(f,0,c)}else u.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else a.styles.isFloating()?u.nonPositionedFloats.push(c):u.nonPositionedInlineLevel.push(c);e(s,c,A?c:r,l)}else a.styles.isInlineLevel()?n.inlineLevel.push(s):n.nonInlineLevel.push(s),e(s,n,r,l);ia(a.flags,8)&&Vs(a,l)}))},Vs=function(e,t){for(var n=e instanceof VA?e.start:1,r=e instanceof VA&&e.reversed,i=0;i<t.length;i++){var a=t[i];a.container instanceof OA&&"number"===typeof a.container.value&&0!==a.container.value&&(n=a.container.value),a.listValue=Wo(n,a.container.styles.listStyleType,!0),n+=r?-1:1}},zs=function(e){var t=new Ns(e,null),n=new Ps(t),r=[];return Os(t,n,n,r),Vs(t.container,r),n},Gs=function(e,t){switch(t){case 0:return qs(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return qs(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return qs(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return qs(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},Ks=function(e,t){switch(t){case 0:return qs(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return qs(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return qs(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return qs(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},Ws=function(e,t){switch(t){case 0:return qs(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return qs(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return qs(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return qs(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},js=function(e,t){switch(t){case 0:return Xs(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return Xs(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return Xs(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return Xs(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},Xs=function(e,t){var n=[];return Cs(e)?n.push(e.subdivide(.5,!1)):n.push(e),Cs(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},qs=function(e,t,n,r){var i=[];return Cs(e)?i.push(e.subdivide(.5,!1)):i.push(e),Cs(n)?i.push(n.subdivide(.5,!0)):i.push(n),Cs(r)?i.push(r.subdivide(.5,!0).reverse()):i.push(r),Cs(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i},Ys=function(e){var t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},Js=function(e){var t=e.styles,n=e.bounds,r=jn(t.paddingLeft,n.width),i=jn(t.paddingRight,n.width),a=jn(t.paddingTop,n.width),A=jn(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,a+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+i),-(t.borderTopWidth+t.borderBottomWidth+a+A))},Zs=function(e,t){return 0===e?t.bounds:2===e?Js(t):Ys(t)},$s=function(e,t){return 0===e?t.bounds:2===e?Js(t):Ys(t)},el=function(e,t,n){var r=Zs(il(e.styles.backgroundOrigin,t),e),i=$s(il(e.styles.backgroundClip,t),e),a=rl(il(e.styles.backgroundSize,t),n,r),A=a[0],o=a[1],s=Wn(il(e.styles.backgroundPosition,t),r.width-A,r.height-o);return[al(il(e.styles.backgroundRepeat,t),s,a,r,i),Math.round(r.left+s[0]),Math.round(r.top+s[1]),A,o]},tl=function(e){return Qn(e)&&e.value===Ir.AUTO},nl=function(e){return"number"===typeof e},rl=function(e,t,n){var r=t[0],i=t[1],a=t[2],A=e[0],o=e[1];if(!A)return[0,0];if(On(A)&&o&&On(o))return[jn(A,n.width),jn(o,n.height)];var s=nl(a);if(Qn(A)&&(A.value===Ir.CONTAIN||A.value===Ir.COVER))return nl(a)?n.width/n.height<a!==(A.value===Ir.COVER)?[n.width,n.width/a]:[n.height*a,n.height]:[n.width,n.height];var l=nl(r),u=nl(i),c=l||u;if(tl(A)&&(!o||tl(o)))return l&&u?[r,i]:s||c?c&&s?[l?r:i*a,u?i:r/a]:[l?r:n.width,u?i:n.height]:[n.width,n.height];if(s){var d=0,h=0;return On(A)?d=jn(A,n.width):On(o)&&(h=jn(o,n.height)),tl(A)?d=h*a:o&&!tl(o)||(h=d/a),[d,h]}var f=null,p=null;if(On(A)?f=jn(A,n.width):o&&On(o)&&(p=jn(o,n.height)),null===f||o&&!tl(o)||(p=l&&u?f/r*i:n.height),null!==p&&tl(A)&&(f=l&&u?p/i*r:n.width),null!==f&&null!==p)return[f,p];throw new Error("Unable to calculate background-size for element")},il=function(e,t){var n=e[t];return"undefined"===typeof n?e[0]:n},al=function(e,t,n,r,i){var a=t[0],A=t[1],o=n[0],s=n[1];switch(e){case 2:return[new _s(Math.round(r.left),Math.round(r.top+A)),new _s(Math.round(r.left+r.width),Math.round(r.top+A)),new _s(Math.round(r.left+r.width),Math.round(s+r.top+A)),new _s(Math.round(r.left),Math.round(s+r.top+A))];case 3:return[new _s(Math.round(r.left+a),Math.round(r.top)),new _s(Math.round(r.left+a+o),Math.round(r.top)),new _s(Math.round(r.left+a+o),Math.round(r.height+r.top)),new _s(Math.round(r.left+a),Math.round(r.height+r.top))];case 1:return[new _s(Math.round(r.left+a),Math.round(r.top+A)),new _s(Math.round(r.left+a+o),Math.round(r.top+A)),new _s(Math.round(r.left+a+o),Math.round(r.top+A+s)),new _s(Math.round(r.left+a),Math.round(r.top+A+s))];default:return[new _s(Math.round(i.left),Math.round(i.top)),new _s(Math.round(i.left+i.width),Math.round(i.top)),new _s(Math.round(i.left+i.width),Math.round(i.height+i.top)),new _s(Math.round(i.left),Math.round(i.height+i.top))]}},Al="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",ol="Hidden Text",sl=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var n=this._document.createElement("div"),r=this._document.createElement("img"),i=this._document.createElement("span"),a=this._document.body;n.style.visibility="hidden",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",a.appendChild(n),r.src=Al,r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",i.style.fontFamily=e,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(ol)),n.appendChild(i),n.appendChild(r);var A=r.offsetTop-i.offsetTop+2;n.removeChild(i),n.appendChild(this._document.createTextNode(ol)),n.style.lineHeight="normal",r.style.verticalAlign="super";var o=r.offsetTop-n.offsetTop+2;return a.removeChild(n),{baseline:A,middle:o}},e.prototype.getMetrics=function(e,t){var n=e+" "+t;return"undefined"===typeof this._data[n]&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},e}(),ll=function(){function e(e,t){this.context=e,this.options=t}return e}(),ul=1e4,cl=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r._activeEffects=[],r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),n.canvas||(r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px"),r.fontMetrics=new sl(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),r}return t(n,e),n.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach((function(e){return t.applyEffect(e)}))},n.prototype.applyEffect=function(e){this.ctx.save(),Is(e)&&(this.ctx.globalAlpha=e.opacity),Ls(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),Ds(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},n.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},n.prototype.renderStack=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return e.element.container.styles.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},n.prototype.renderNode=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return ia(e.container.flags,16),e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},n.prototype.renderTextWithLetterSpacing=function(e,t,n){var r=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n):MA(e.text).reduce((function(t,i){return r.ctx.fillText(i,t,e.bounds.top+n),t+r.ctx.measureText(i).width}),e.bounds.left)},n.prototype.createFontStyle=function(e){var t=e.fontVariant.filter((function(e){return"normal"===e||"small-caps"===e})).join(""),n=gl(e.fontFamily).join(", "),r=Tn(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,r,n].join(" "),n,r]},n.prototype.renderTextNode=function(e,t){return r(this,void 0,void 0,(function(){var n,r,a,A,o,s,l,u,c=this;return i(this,(function(i){return n=this.createFontStyle(t),r=n[0],a=n[1],A=n[2],this.ctx.font=r,this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(a,A),s=o.baseline,l=o.middle,u=t.paintOrder,e.textBounds.forEach((function(e){u.forEach((function(n){switch(n){case 0:c.ctx.fillStyle=ir(t.color),c.renderTextWithLetterSpacing(e,t.letterSpacing,s);var r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach((function(n){c.ctx.shadowColor=ir(n.color),c.ctx.shadowOffsetX=n.offsetX.number*c.options.scale,c.ctx.shadowOffsetY=n.offsetY.number*c.options.scale,c.ctx.shadowBlur=n.blur.number,c.renderTextWithLetterSpacing(e,t.letterSpacing,s)})),c.ctx.shadowColor="",c.ctx.shadowOffsetX=0,c.ctx.shadowOffsetY=0,c.ctx.shadowBlur=0),t.textDecorationLine.length&&(c.ctx.fillStyle=ir(t.textDecorationColor||t.color),t.textDecorationLine.forEach((function(t){switch(t){case 1:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+s),e.bounds.width,1);break;case 2:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:c.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+l),e.bounds.width,1)}})));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(c.ctx.strokeStyle=ir(t.webkitTextStrokeColor),c.ctx.lineWidth=t.webkitTextStrokeWidth,c.ctx.lineJoin=window.chrome?"miter":"round",c.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+s)),c.ctx.strokeStyle="",c.ctx.lineWidth=0,c.ctx.lineJoin="miter"}}))})),[2]}))}))},n.prototype.renderReplacedElement=function(e,t,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var r=Js(e),i=Fs(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},n.prototype.renderNodeContent=function(e){return r(this,void 0,void 0,(function(){var t,r,a,o,s,l,u,c,d,h,f,p,g,m,v,y,w,B;return i(this,(function(i){switch(i.label){case 0:this.applyEffects(e.getEffects(4)),t=e.container,r=e.curves,a=t.styles,o=0,s=t.textNodes,i.label=1;case 1:return o<s.length?(l=s[o],[4,this.renderTextNode(l,a)]):[3,4];case 2:i.sent(),i.label=3;case 3:return o++,[3,1];case 4:if(!(t instanceof HA))return[3,8];i.label=5;case 5:return i.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return v=i.sent(),this.renderReplacedElement(t,r,v),[3,8];case 7:return i.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof PA&&this.renderReplacedElement(t,r,t.canvas),!(t instanceof NA))return[3,12];i.label=9;case 9:return i.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return v=i.sent(),this.renderReplacedElement(t,r,v),[3,12];case 11:return i.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof eo&&t.tree?[4,new n(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}).render(t.tree)]:[3,14];case 13:u=i.sent(),t.width&&t.height&&this.ctx.drawImage(u,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),i.label=14;case 14:if(t instanceof JA&&(c=Math.min(t.bounds.width,t.bounds.height),t.type===jA?t.checked&&(this.ctx.save(),this.path([new _s(t.bounds.left+.39363*c,t.bounds.top+.79*c),new _s(t.bounds.left+.16*c,t.bounds.top+.5549*c),new _s(t.bounds.left+.27347*c,t.bounds.top+.44071*c),new _s(t.bounds.left+.39694*c,t.bounds.top+.5649*c),new _s(t.bounds.left+.72983*c,t.bounds.top+.23*c),new _s(t.bounds.left+.84*c,t.bounds.top+.34085*c),new _s(t.bounds.left+.39363*c,t.bounds.top+.79*c)]),this.ctx.fillStyle=ir(YA),this.ctx.fill(),this.ctx.restore()):t.type===XA&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+c/2,t.bounds.top+c/2,c/4,0,2*Math.PI,!0),this.ctx.fillStyle=ir(YA),this.ctx.fill(),this.ctx.restore())),dl(t)&&t.value.length){switch(d=this.createFontStyle(a),w=d[0],h=d[1],f=this.fontMetrics.getMetrics(w,h).baseline,this.ctx.font=w,this.ctx.fillStyle=ir(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=fl(t.styles.textAlign),B=Js(t),p=0,t.styles.textAlign){case 1:p+=B.width/2;break;case 2:p+=B.width}g=B.add(p,0,0,-B.height/2+1),this.ctx.save(),this.path([new _s(B.left,B.top),new _s(B.left+B.width,B.top),new _s(B.left+B.width,B.top+B.height),new _s(B.left,B.top+B.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new CA(t.value,g),a.letterSpacing,f),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!ia(t.styles.display,2048))return[3,20];if(null===t.styles.listStyleImage)return[3,19];if(0!==(m=t.styles.listStyleImage).type)return[3,18];v=void 0,y=m.url,i.label=15;case 15:return i.trys.push([15,17,,18]),[4,this.context.cache.match(y)];case 16:return v=i.sent(),this.ctx.drawImage(v,t.bounds.left-(v.width+10),t.bounds.top),[3,18];case 17:return i.sent(),this.context.logger.error("Error loading list-style-image "+y),[3,18];case 18:return[3,20];case 19:e.listValue&&-1!==t.styles.listStyleType&&(w=this.createFontStyle(a)[0],this.ctx.font=w,this.ctx.fillStyle=ir(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",B=new A(t.bounds.left,t.bounds.top+jn(t.styles.paddingTop,t.bounds.width),t.bounds.width,Bi(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new CA(e.listValue,B),a.letterSpacing,Bi(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),i.label=20;case 20:return[2]}}))}))},n.prototype.renderStackContent=function(e){return r(this,void 0,void 0,(function(){var t,n,r,a,A,o,s,l,u,c,d,h,f,p,g;return i(this,(function(i){switch(i.label){case 0:return ia(e.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:i.sent(),t=0,n=e.negativeZIndex,i.label=2;case 2:return t<n.length?(g=n[t],[4,this.renderStack(g)]):[3,5];case 3:i.sent(),i.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:i.sent(),r=0,a=e.nonInlineLevel,i.label=7;case 7:return r<a.length?(g=a[r],[4,this.renderNode(g)]):[3,10];case 8:i.sent(),i.label=9;case 9:return r++,[3,7];case 10:A=0,o=e.nonPositionedFloats,i.label=11;case 11:return A<o.length?(g=o[A],[4,this.renderStack(g)]):[3,14];case 12:i.sent(),i.label=13;case 13:return A++,[3,11];case 14:s=0,l=e.nonPositionedInlineLevel,i.label=15;case 15:return s<l.length?(g=l[s],[4,this.renderStack(g)]):[3,18];case 16:i.sent(),i.label=17;case 17:return s++,[3,15];case 18:u=0,c=e.inlineLevel,i.label=19;case 19:return u<c.length?(g=c[u],[4,this.renderNode(g)]):[3,22];case 20:i.sent(),i.label=21;case 21:return u++,[3,19];case 22:d=0,h=e.zeroOrAutoZIndexOrTransformedOrOpacity,i.label=23;case 23:return d<h.length?(g=h[d],[4,this.renderStack(g)]):[3,26];case 24:i.sent(),i.label=25;case 25:return d++,[3,23];case 26:f=0,p=e.positiveZIndex,i.label=27;case 27:return f<p.length?(g=p[f],[4,this.renderStack(g)]):[3,30];case 28:i.sent(),i.label=29;case 29:return f++,[3,27];case 30:return[2]}}))}))},n.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},n.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},n.prototype.formatPath=function(e){var t=this;e.forEach((function(e,n){var r=Cs(e)?e.start:e;0===n?t.ctx.moveTo(r.x,r.y):t.ctx.lineTo(r.x,r.y),Cs(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)}))},n.prototype.renderRepeat=function(e,t,n,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,r),this.ctx.fill(),this.ctx.translate(-n,-r)},n.prototype.resizeImage=function(e,t,n){var r;if(e.width===t&&e.height===n)return e;var i=(null!==(r=this.canvas.ownerDocument)&&void 0!==r?r:document).createElement("canvas");return i.width=Math.max(1,t),i.height=Math.max(1,n),i.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,n),i},n.prototype.renderBackgroundImage=function(e){return r(this,void 0,void 0,(function(){var t,n,r,a,A,o;return i(this,(function(s){switch(s.label){case 0:t=e.styles.backgroundImage.length-1,n=function(n){var a,A,o,s,l,u,c,d,h,f,p,g,m,v,y,w,B,_,b,x,C,S,E,U,M,F,T,k,Q,L,D;return i(this,(function(i){switch(i.label){case 0:if(0!==n.type)return[3,5];a=void 0,A=n.url,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r.context.cache.match(A)];case 2:return a=i.sent(),[3,4];case 3:return i.sent(),r.context.logger.error("Error loading background-image "+A),[3,4];case 4:return a&&(o=el(e,t,[a.width,a.height,a.width/a.height]),w=o[0],S=o[1],E=o[2],b=o[3],x=o[4],v=r.ctx.createPattern(r.resizeImage(a,b,x),"repeat"),r.renderRepeat(w,v,S,E)),[3,6];case 5:kr(n)?(s=el(e,t,[null,null,null]),w=s[0],S=s[1],E=s[2],b=s[3],x=s[4],l=vr(n.angle,b,x),u=l[0],c=l[1],d=l[2],h=l[3],f=l[4],(p=document.createElement("canvas")).width=b,p.height=x,g=p.getContext("2d"),m=g.createLinearGradient(c,h,d,f),gr(n.stops,u).forEach((function(e){return m.addColorStop(e.stop,ir(e.color))})),g.fillStyle=m,g.fillRect(0,0,b,x),b>0&&x>0&&(v=r.ctx.createPattern(p,"repeat"),r.renderRepeat(w,v,S,E))):Qr(n)&&(y=el(e,t,[null,null,null]),w=y[0],B=y[1],_=y[2],b=y[3],x=y[4],C=0===n.position.length?[Gn]:n.position,S=jn(C[0],b),E=jn(C[C.length-1],x),U=Br(n,S,E,b,x),M=U[0],F=U[1],M>0&&F>0&&(T=r.ctx.createRadialGradient(B+S,_+E,0,B+S,_+E,M),gr(n.stops,2*M).forEach((function(e){return T.addColorStop(e.stop,ir(e.color))})),r.path(w),r.ctx.fillStyle=T,M!==F?(k=e.bounds.left+.5*e.bounds.width,Q=e.bounds.top+.5*e.bounds.height,D=1/(L=F/M),r.ctx.save(),r.ctx.translate(k,Q),r.ctx.transform(1,0,0,L,0,0),r.ctx.translate(-k,-Q),r.ctx.fillRect(B,D*(_-Q)+Q,b,x*D),r.ctx.restore()):r.ctx.fill())),i.label=6;case 6:return t--,[2]}}))},r=this,a=0,A=e.styles.backgroundImage.slice(0).reverse(),s.label=1;case 1:return a<A.length?(o=A[a],[5,n(o)]):[3,4];case 2:s.sent(),s.label=3;case 3:return a++,[3,1];case 4:return[2]}}))}))},n.prototype.renderSolidBorder=function(e,t,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){return this.path(Gs(n,t)),this.ctx.fillStyle=ir(e),this.ctx.fill(),[2]}))}))},n.prototype.renderDoubleBorder=function(e,t,n,a){return r(this,void 0,void 0,(function(){var r,A;return i(this,(function(i){switch(i.label){case 0:return t<3?[4,this.renderSolidBorder(e,n,a)]:[3,2];case 1:return i.sent(),[2];case 2:return r=Ks(a,n),this.path(r),this.ctx.fillStyle=ir(e),this.ctx.fill(),A=Ws(a,n),this.path(A),this.ctx.fill(),[2]}}))}))},n.prototype.renderNodeBackgroundAndBorders=function(e){return r(this,void 0,void 0,(function(){var t,n,r,a,A,o,s,l,u=this;return i(this,(function(i){switch(i.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,n=!rr(t.backgroundColor)||t.backgroundImage.length,r=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],a=hl(il(t.backgroundClip,0),e.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(a),this.ctx.clip(),rr(t.backgroundColor)||(this.ctx.fillStyle=ir(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:i.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach((function(t){u.ctx.save();var n=Us(e.curves),r=t.inset?0:ul,i=Hs(n,-r+(t.inset?1:-1)*t.spread.number,(t.inset?1:-1)*t.spread.number,t.spread.number*(t.inset?-2:2),t.spread.number*(t.inset?-2:2));t.inset?(u.path(n),u.ctx.clip(),u.mask(i)):(u.mask(n),u.ctx.clip(),u.path(i)),u.ctx.shadowOffsetX=t.offsetX.number+r,u.ctx.shadowOffsetY=t.offsetY.number,u.ctx.shadowColor=ir(t.color),u.ctx.shadowBlur=t.blur.number,u.ctx.fillStyle=t.inset?ir(t.color):"rgba(0,0,0,1)",u.ctx.fill(),u.ctx.restore()})),i.label=2;case 2:A=0,o=0,s=r,i.label=3;case 3:return o<s.length?0!==(l=s[o]).style&&!rr(l.color)&&l.width>0?2!==l.style?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,A,e.curves,2)]:[3,11]:[3,13];case 4:return i.sent(),[3,11];case 5:return 3!==l.style?[3,7]:[4,this.renderDashedDottedBorder(l.color,l.width,A,e.curves,3)];case 6:return i.sent(),[3,11];case 7:return 4!==l.style?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,A,e.curves)];case 8:return i.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,A,e.curves)];case 10:i.sent(),i.label=11;case 11:A++,i.label=12;case 12:return o++,[3,3];case 13:return[2]}}))}))},n.prototype.renderDashedDottedBorder=function(e,t,n,a,A){return r(this,void 0,void 0,(function(){var r,o,s,l,u,c,d,h,f,p,g,m,v,y,w,B;return i(this,(function(i){return this.ctx.save(),r=js(a,n),o=Gs(a,n),2===A&&(this.path(o),this.ctx.clip()),Cs(o[0])?(s=o[0].start.x,l=o[0].start.y):(s=o[0].x,l=o[0].y),Cs(o[1])?(u=o[1].end.x,c=o[1].end.y):(u=o[1].x,c=o[1].y),d=0===n||2===n?Math.abs(s-u):Math.abs(l-c),this.ctx.beginPath(),3===A?this.formatPath(r):this.formatPath(o.slice(0,2)),h=t<3?3*t:2*t,f=t<3?2*t:t,3===A&&(h=t,f=t),p=!0,d<=2*h?p=!1:d<=2*h+f?(h*=g=d/(2*h+f),f*=g):(m=Math.floor((d+f)/(h+f)),v=(d-m*h)/(m-1),f=(y=(d-(m+1)*h)/m)<=0||Math.abs(f-v)<Math.abs(f-y)?v:y),p&&(3===A?this.ctx.setLineDash([0,h+f]):this.ctx.setLineDash([h,f])),3===A?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=ir(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===A&&(Cs(o[0])&&(w=o[3],B=o[0],this.ctx.beginPath(),this.formatPath([new _s(w.end.x,w.end.y),new _s(B.start.x,B.start.y)]),this.ctx.stroke()),Cs(o[1])&&(w=o[1],B=o[2],this.ctx.beginPath(),this.formatPath([new _s(w.end.x,w.end.y),new _s(B.start.x,B.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]}))}))},n.prototype.render=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=ir(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=zs(e),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}}))}))},n}(ll),dl=function(e){return e instanceof $A||e instanceof ZA||e instanceof JA&&e.type!==XA&&e.type!==jA},hl=function(e,t){switch(e){case 0:return Us(t);case 2:return Ms(t);default:return Fs(t)}},fl=function(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}},pl=["-apple-system","system-ui"],gl=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter((function(e){return-1===pl.indexOf(e)})):e},ml=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=n,r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),r}return t(n,e),n.prototype.render=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=_A(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,vl(t)];case 1:return n=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=ir(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}}))}))},n}(ll),vl=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},yl=function(){function e(e){var t=e.id,n=e.enabled;this.id=t,this.enabled=n,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!==typeof window&&window.console&&"function"===typeof console.debug?console.debug.apply(console,a([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&"undefined"!==typeof window&&window.console&&"function"===typeof console.info&&console.info.apply(console,a([this.id,this.getTime()+"ms"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!==typeof window&&window.console&&"function"===typeof console.warn?console.warn.apply(console,a([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!==typeof window&&window.console&&"function"===typeof console.error?console.error.apply(console,a([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.instances={},e}(),wl=function(){function e(t,n){var r;this.windowBounds=n,this.instanceName="#"+e.instanceCount++,this.logger=new yl({id:this.instanceName,enabled:t.logging}),this.cache=null!==(r=t.cache)&&void 0!==r?r:new hs(this,t)}return e.instanceCount=1,e}(),Bl=function(e,t){return void 0===t&&(t={}),_l(e,t)};"undefined"!==typeof window&&ds.setContext(window);var _l=function(e,t){return r(void 0,void 0,void 0,(function(){var r,a,l,u,c,d,h,f,p,g,m,v,y,w,B,_,b,x,C,S,E,U,M,F,T,k,Q,L,D,I,R,H,P,N,O,V,z,G;return i(this,(function(i){switch(i.label){case 0:if(!e||"object"!==typeof e)return[2,Promise.reject("Invalid element provided as first argument")];if(!(r=e.ownerDocument))throw new Error("Element is not attached to a Document");if(!(a=r.defaultView))throw new Error("Document is not attached to a Window");return l={allowTaint:null!==(U=t.allowTaint)&&void 0!==U&&U,imageTimeout:null!==(M=t.imageTimeout)&&void 0!==M?M:15e3,proxy:t.proxy,useCORS:null!==(F=t.useCORS)&&void 0!==F&&F},u=n({logging:null===(T=t.logging)||void 0===T||T,cache:t.cache},l),c={windowWidth:null!==(k=t.windowWidth)&&void 0!==k?k:a.innerWidth,windowHeight:null!==(Q=t.windowHeight)&&void 0!==Q?Q:a.innerHeight,scrollX:null!==(L=t.scrollX)&&void 0!==L?L:a.pageXOffset,scrollY:null!==(D=t.scrollY)&&void 0!==D?D:a.pageYOffset},d=new A(c.scrollX,c.scrollY,c.windowWidth,c.windowHeight),h=new wl(u,d),f=null!==(I=t.foreignObjectRendering)&&void 0!==I&&I,p={allowTaint:null!==(R=t.allowTaint)&&void 0!==R&&R,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:f,copyStyles:f},h.logger.debug("Starting document clone with size "+d.width+"x"+d.height+" scrolled to "+-d.left+","+-d.top),g=new Xo(h,e,p),(m=g.clonedReferenceElement)?[4,g.toIFrame(r,d)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return v=i.sent(),y=mo(m)||po(m)?s(m.ownerDocument):o(h,m),w=y.width,B=y.height,_=y.left,b=y.top,x=bl(h,m,t.backgroundColor),C={canvas:t.canvas,backgroundColor:x,scale:null!==(P=null!==(H=t.scale)&&void 0!==H?H:a.devicePixelRatio)&&void 0!==P?P:1,x:(null!==(N=t.x)&&void 0!==N?N:0)+_,y:(null!==(O=t.y)&&void 0!==O?O:0)+b,width:null!==(V=t.width)&&void 0!==V?V:Math.ceil(w),height:null!==(z=t.height)&&void 0!==z?z:Math.ceil(B)},f?(h.logger.debug("Document cloned, using foreign object rendering"),[4,new ml(h,C).render(m)]):[3,3];case 2:return S=i.sent(),[3,5];case 3:return h.logger.debug("Document cloned, element located at "+_+","+b+" with size "+w+"x"+B+" using computed rendering"),h.logger.debug("Starting DOM parsing"),E=io(h,m),x===E.styles.backgroundColor&&(E.styles.backgroundColor=dr.TRANSPARENT),h.logger.debug("Starting renderer for element at "+C.x+","+C.y+" with size "+C.width+"x"+C.height),[4,new cl(h,C).render(E)];case 4:S=i.sent(),i.label=5;case 5:return(null===(G=t.removeContainer)||void 0===G||G)&&(Xo.destroy(v)||h.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),h.logger.debug("Finished rendering"),[2,S]}}))}))},bl=function(e,t,n){var r=t.ownerDocument,i=r.documentElement?cr(e,getComputedStyle(r.documentElement).backgroundColor):dr.TRANSPARENT,a=r.body?cr(e,getComputedStyle(r.body).backgroundColor):dr.TRANSPARENT,A="string"===typeof n?cr(e,n):null===n?dr.TRANSPARENT:4294967295;return t===r.documentElement?rr(i)?rr(a)?A:a:i:A};return Bl}()},463:function(e,t,n){"use strict";var r=n(791),i=n(296);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var A=new Set,o={};function s(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(o[e]=t,e=0;e<t.length;e++)A.add(t[e])}var u=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),c=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},f={};function p(e,t,n,r,i,a,A){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=A}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new p(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new p(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new p(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new p(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new p(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new p(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new p(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new p(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new p(e,5,!1,e.toLowerCase(),null,!1,!1)}));var m=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function y(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!c.call(f,e)||!c.call(h,e)&&(d.test(e)?f[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(m,v);g[t]=new p(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(m,v);g[t]=new p(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(m,v);g[t]=new p(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new p(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new p("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new p(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,B=Symbol.for("react.element"),_=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),E=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),k=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var Q=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var L=Symbol.iterator;function D(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=L&&e[L]||e["@@iterator"])?e:null}var I,R=Object.assign;function H(e){if(void 0===I)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);I=t&&t[1]||""}return"\n"+I+e}var P=!1;function N(e,t){if(!e||P)return"";P=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"===typeof l.stack){for(var i=l.stack.split("\n"),a=r.stack.split("\n"),A=i.length-1,o=a.length-1;1<=A&&0<=o&&i[A]!==a[o];)o--;for(;1<=A&&0<=o;A--,o--)if(i[A]!==a[o]){if(1!==A||1!==o)do{if(A--,0>--o||i[A]!==a[o]){var s="\n"+i[A].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}}while(1<=A&&0<=o);break}}}finally{P=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?H(e):""}function O(e){switch(e.tag){case 5:return H(e.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return e=N(e.type,!1);case 11:return e=N(e.type.render,!1);case 1:return e=N(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case b:return"Fragment";case _:return"Portal";case C:return"Profiler";case x:return"StrictMode";case M:return"Suspense";case F:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case E:return(e.displayName||"Context")+".Consumer";case S:return(e._context.displayName||"Context")+".Provider";case U:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case T:return null!==(t=e.displayName||null)?t:V(e.type)||"Memo";case k:t=e._payload,e=e._init;try{return V(e(t))}catch(n){}}return null}function z(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return V(t);case 8:return t===x?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function G(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function W(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function j(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function q(e,t){var n=t.checked;return R({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=G(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&y(e,"checked",t,!1)}function Z(e,t){J(e,t);var n=G(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,G(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function $(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+G(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return R({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:G(n)}}function ae(e,t){var n=G(t.value),r=G(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function oe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function se(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?oe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var le,ue,ce=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((le=le||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function de(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var he={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fe=["Webkit","ms","Moz","O"];function pe(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=pe(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(he).forEach((function(e){fe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]}))}));var me=R({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ve(e,t){if(t){if(me[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function ye(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function Be(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var _e=null,be=null,xe=null;function Ce(e){if(e=yi(e)){if("function"!==typeof _e)throw Error(a(280));var t=e.stateNode;t&&(t=Bi(t),_e(e.stateNode,e.type,t))}}function Se(e){be?xe?xe.push(e):xe=[e]:be=e}function Ee(){if(be){var e=be,t=xe;if(xe=be=null,Ce(e),t)for(e=0;e<t.length;e++)Ce(t[e])}}function Ue(e,t){return e(t)}function Me(){}var Fe=!1;function Te(e,t,n){if(Fe)return e(t,n);Fe=!0;try{return Ue(e,t,n)}finally{Fe=!1,(null!==be||null!==xe)&&(Me(),Ee())}}function ke(e,t){var n=e.stateNode;if(null===n)return null;var r=Bi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Qe=!1;if(u)try{var Le={};Object.defineProperty(Le,"passive",{get:function(){Qe=!0}}),window.addEventListener("test",Le,Le),window.removeEventListener("test",Le,Le)}catch(ue){Qe=!1}function De(e,t,n,r,i,a,A,o,s){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(u){this.onError(u)}}var Ie=!1,Re=null,He=!1,Pe=null,Ne={onError:function(e){Ie=!0,Re=e}};function Oe(e,t,n,r,i,a,A,o,s){Ie=!1,Re=null,De.apply(Ne,arguments)}function Ve(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function ze(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ge(e){if(Ve(e)!==e)throw Error(a(188))}function Ke(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ve(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var A=i.alternate;if(null===A){if(null!==(r=i.return)){n=r;continue}break}if(i.child===A.child){for(A=i.child;A;){if(A===n)return Ge(i),e;if(A===r)return Ge(i),t;A=A.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=A;else{for(var o=!1,s=i.child;s;){if(s===n){o=!0,n=i,r=A;break}if(s===r){o=!0,r=i,n=A;break}s=s.sibling}if(!o){for(s=A.child;s;){if(s===n){o=!0,n=A,r=i;break}if(s===r){o=!0,r=A,n=i;break}s=s.sibling}if(!o)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?We(e):null}function We(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=We(e);if(null!==t)return t;e=e.sibling}return null}var je=i.unstable_scheduleCallback,Xe=i.unstable_cancelCallback,qe=i.unstable_shouldYield,Ye=i.unstable_requestPaint,Je=i.unstable_now,Ze=i.unstable_getCurrentPriorityLevel,$e=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,at=null;var At=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(ot(e)/st|0)|0},ot=Math.log,st=Math.LN2;var lt=64,ut=4194304;function ct(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,A=268435455&n;if(0!==A){var o=A&~i;0!==o?r=ct(o):0!==(a&=A)&&(r=ct(a))}else 0!==(A=n&~i)?r=ct(A):0!==a&&(r=ct(a));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!==(4194240&a)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-At(t)),r|=e[n],t&=~i;return r}function ht(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function pt(){var e=lt;return 0===(4194240&(lt<<=1))&&(lt=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function mt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-At(t)]=n}function vt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-At(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var yt=0;function wt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var Bt,_t,bt,xt,Ct,St=!1,Et=[],Ut=null,Mt=null,Ft=null,Tt=new Map,kt=new Map,Qt=[],Lt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Dt(e,t){switch(e){case"focusin":case"focusout":Ut=null;break;case"dragenter":case"dragleave":Mt=null;break;case"mouseover":case"mouseout":Ft=null;break;case"pointerover":case"pointerout":Tt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kt.delete(t.pointerId)}}function It(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&(null!==(t=yi(t))&&_t(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Rt(e){var t=vi(e.target);if(null!==t){var n=Ve(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=ze(n)))return e.blockedOn=t,void Ct(e.priority,(function(){bt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ht(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=yi(n))&&_t(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function Pt(e,t,n){Ht(e)&&n.delete(t)}function Nt(){St=!1,null!==Ut&&Ht(Ut)&&(Ut=null),null!==Mt&&Ht(Mt)&&(Mt=null),null!==Ft&&Ht(Ft)&&(Ft=null),Tt.forEach(Pt),kt.forEach(Pt)}function Ot(e,t){e.blockedOn===t&&(e.blockedOn=null,St||(St=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Nt)))}function Vt(e){function t(t){return Ot(t,e)}if(0<Et.length){Ot(Et[0],e);for(var n=1;n<Et.length;n++){var r=Et[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Ut&&Ot(Ut,e),null!==Mt&&Ot(Mt,e),null!==Ft&&Ot(Ft,e),Tt.forEach(t),kt.forEach(t),n=0;n<Qt.length;n++)(r=Qt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Qt.length&&null===(n=Qt[0]).blockedOn;)Rt(n),null===n.blockedOn&&Qt.shift()}var zt=w.ReactCurrentBatchConfig,Gt=!0;function Kt(e,t,n,r){var i=yt,a=zt.transition;zt.transition=null;try{yt=1,jt(e,t,n,r)}finally{yt=i,zt.transition=a}}function Wt(e,t,n,r){var i=yt,a=zt.transition;zt.transition=null;try{yt=4,jt(e,t,n,r)}finally{yt=i,zt.transition=a}}function jt(e,t,n,r){if(Gt){var i=qt(e,t,n,r);if(null===i)Gr(e,t,r,Xt,n),Dt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Ut=It(Ut,e,t,n,r,i),!0;case"dragenter":return Mt=It(Mt,e,t,n,r,i),!0;case"mouseover":return Ft=It(Ft,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Tt.set(a,It(Tt.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,kt.set(a,It(kt.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Dt(e,r),4&t&&-1<Lt.indexOf(e)){for(;null!==i;){var a=yi(i);if(null!==a&&Bt(a),null===(a=qt(e,t,n,r))&&Gr(e,t,r,Xt,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Gr(e,t,r,null,n)}}var Xt=null;function qt(e,t,n,r){if(Xt=null,null!==(e=vi(e=Be(r))))if(null===(t=Ve(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=ze(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Xt=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ze()){case $e:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Jt=null,Zt=null,$t=null;function en(){if($t)return $t;var e,t,n=Zt,r=n.length,i="value"in Jt?Jt.value:Jt.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var A=r-e;for(t=1;t<=A&&n[r-t]===i[a-t];t++);return $t=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function an(e){function t(t,n,r,i,a){for(var A in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(A)&&(t=e[A],this[A]=t?t(i):i[A]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return R(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var An,on,sn,ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=an(ln),cn=R({},ln,{view:0,detail:0}),dn=an(cn),hn=R({},cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sn&&(sn&&"mousemove"===e.type?(An=e.screenX-sn.screenX,on=e.screenY-sn.screenY):on=An=0,sn=e),An)},movementY:function(e){return"movementY"in e?e.movementY:on}}),fn=an(hn),pn=an(R({},hn,{dataTransfer:0})),gn=an(R({},cn,{relatedTarget:0})),mn=an(R({},ln,{animationName:0,elapsedTime:0,pseudoElement:0})),vn=R({},ln,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yn=an(vn),wn=an(R({},ln,{data:0})),Bn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_n={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},bn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=bn[e])&&!!t[e]}function Cn(){return xn}var Sn=R({},cn,{key:function(e){if(e.key){var t=Bn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?_n[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),En=an(Sn),Un=an(R({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Mn=an(R({},cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),Fn=an(R({},ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),Tn=R({},hn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),kn=an(Tn),Qn=[9,13,27,32],Ln=u&&"CompositionEvent"in window,Dn=null;u&&"documentMode"in document&&(Dn=document.documentMode);var In=u&&"TextEvent"in window&&!Dn,Rn=u&&(!Ln||Dn&&8<Dn&&11>=Dn),Hn=String.fromCharCode(32),Pn=!1;function Nn(e,t){switch(e){case"keyup":return-1!==Qn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function On(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Vn=!1;var zn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!zn[e.type]:"textarea"===t}function Kn(e,t,n,r){Se(r),0<(t=Wr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,jn=null;function Xn(e){Hr(e,0)}function qn(e){if(j(wi(e)))return e}function Yn(e,t){if("change"===e)return t}var Jn=!1;if(u){var Zn;if(u){var $n="oninput"in document;if(!$n){var er=document.createElement("div");er.setAttribute("oninput","return;"),$n="function"===typeof er.oninput}Zn=$n}else Zn=!1;Jn=Zn&&(!document.documentMode||9<document.documentMode)}function tr(){Wn&&(Wn.detachEvent("onpropertychange",nr),jn=Wn=null)}function nr(e){if("value"===e.propertyName&&qn(jn)){var t=[];Kn(t,jn,e,Be(e)),Te(Xn,t)}}function rr(e,t,n){"focusin"===e?(tr(),jn=n,(Wn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return qn(jn)}function ar(e,t){if("click"===e)return qn(t)}function Ar(e,t){if("input"===e||"change"===e)return qn(t)}var or="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function sr(e,t){if(or(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!c.call(t,i)||!or(e[i],t[i]))return!1}return!0}function lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=lr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=lr(r)}}function cr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?cr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function fr(e){var t=dr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&cr(n.ownerDocument.documentElement,n)){if(null!==r&&hr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=ur(n,a);var A=ur(n,r);i&&A&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==A.node||e.focusOffset!==A.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(A.node,A.offset)):(t.setEnd(A.node,A.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var pr=u&&"documentMode"in document&&11>=document.documentMode,gr=null,mr=null,vr=null,yr=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==gr||gr!==X(r)||("selectionStart"in(r=gr)&&hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&sr(vr,r)||(vr=r,0<(r=Wr(mr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function Br(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _r={animationend:Br("Animation","AnimationEnd"),animationiteration:Br("Animation","AnimationIteration"),animationstart:Br("Animation","AnimationStart"),transitionend:Br("Transition","TransitionEnd")},br={},xr={};function Cr(e){if(br[e])return br[e];if(!_r[e])return e;var t,n=_r[e];for(t in n)if(n.hasOwnProperty(t)&&t in xr)return br[e]=n[t];return e}u&&(xr=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);var Sr=Cr("animationend"),Er=Cr("animationiteration"),Ur=Cr("animationstart"),Mr=Cr("transitionend"),Fr=new Map,Tr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function kr(e,t){Fr.set(e,t),s(t,[e])}for(var Qr=0;Qr<Tr.length;Qr++){var Lr=Tr[Qr];kr(Lr.toLowerCase(),"on"+(Lr[0].toUpperCase()+Lr.slice(1)))}kr(Sr,"onAnimationEnd"),kr(Er,"onAnimationIteration"),kr(Ur,"onAnimationStart"),kr("dblclick","onDoubleClick"),kr("focusin","onFocus"),kr("focusout","onBlur"),kr(Mr,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ir=new Set("cancel close invalid load scroll toggle".split(" ").concat(Dr));function Rr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,A,o,s,l){if(Oe.apply(this,arguments),Ie){if(!Ie)throw Error(a(198));var u=Re;Ie=!1,Re=null,He||(He=!0,Pe=u)}}(r,t,void 0,e),e.currentTarget=null}function Hr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var A=r.length-1;0<=A;A--){var o=r[A],s=o.instance,l=o.currentTarget;if(o=o.listener,s!==a&&i.isPropagationStopped())break e;Rr(i,o,l),a=s}else for(A=0;A<r.length;A++){if(s=(o=r[A]).instance,l=o.currentTarget,o=o.listener,s!==a&&i.isPropagationStopped())break e;Rr(i,o,l),a=s}}}if(He)throw e=Pe,He=!1,Pe=null,e}function Pr(e,t){var n=t[pi];void 0===n&&(n=t[pi]=new Set);var r=e+"__bubble";n.has(r)||(zr(t,e,2,!1),n.add(r))}function Nr(e,t,n){var r=0;t&&(r|=4),zr(n,e,r,t)}var Or="_reactListening"+Math.random().toString(36).slice(2);function Vr(e){if(!e[Or]){e[Or]=!0,A.forEach((function(t){"selectionchange"!==t&&(Ir.has(t)||Nr(t,!1,e),Nr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Or]||(t[Or]=!0,Nr("selectionchange",!1,t))}}function zr(e,t,n,r){switch(Yt(t)){case 1:var i=Kt;break;case 4:i=Wt;break;default:i=jt}n=i.bind(null,t,n,e),i=void 0,!Qe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Gr(e,t,n,r,i){var a=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var A=r.tag;if(3===A||4===A){var o=r.stateNode.containerInfo;if(o===i||8===o.nodeType&&o.parentNode===i)break;if(4===A)for(A=r.return;null!==A;){var s=A.tag;if((3===s||4===s)&&((s=A.stateNode.containerInfo)===i||8===s.nodeType&&s.parentNode===i))return;A=A.return}for(;null!==o;){if(null===(A=vi(o)))return;if(5===(s=A.tag)||6===s){r=a=A;continue e}o=o.parentNode}}r=r.return}Te((function(){var r=a,i=Be(n),A=[];e:{var o=Fr.get(e);if(void 0!==o){var s=un,l=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":s=En;break;case"focusin":l="focus",s=gn;break;case"focusout":l="blur",s=gn;break;case"beforeblur":case"afterblur":s=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=fn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=pn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=Mn;break;case Sr:case Er:case Ur:s=mn;break;case Mr:s=Fn;break;case"scroll":s=dn;break;case"wheel":s=kn;break;case"copy":case"cut":case"paste":s=yn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=Un}var u=0!==(4&t),c=!u&&"scroll"===e,d=u?null!==o?o+"Capture":null:o;u=[];for(var h,f=r;null!==f;){var p=(h=f).stateNode;if(5===h.tag&&null!==p&&(h=p,null!==d&&(null!=(p=ke(f,d))&&u.push(Kr(f,p,h)))),c)break;f=f.return}0<u.length&&(o=new s(o,l,null,n,i),A.push({event:o,listeners:u}))}}if(0===(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(o="mouseover"===e||"pointerover"===e)||n===we||!(l=n.relatedTarget||n.fromElement)||!vi(l)&&!l[fi])&&(s||o)&&(o=i.window===i?i:(o=i.ownerDocument)?o.defaultView||o.parentWindow:window,s?(s=r,null!==(l=(l=n.relatedTarget||n.toElement)?vi(l):null)&&(l!==(c=Ve(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(s=null,l=r),s!==l)){if(u=fn,p="onMouseLeave",d="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=Un,p="onPointerLeave",d="onPointerEnter",f="pointer"),c=null==s?o:wi(s),h=null==l?o:wi(l),(o=new u(p,f+"leave",s,n,i)).target=c,o.relatedTarget=h,p=null,vi(i)===r&&((u=new u(d,f+"enter",l,n,i)).target=h,u.relatedTarget=c,p=u),c=p,s&&l)e:{for(d=l,f=0,h=u=s;h;h=jr(h))f++;for(h=0,p=d;p;p=jr(p))h++;for(;0<f-h;)u=jr(u),f--;for(;0<h-f;)d=jr(d),h--;for(;f--;){if(u===d||null!==d&&u===d.alternate)break e;u=jr(u),d=jr(d)}u=null}else u=null;null!==s&&Xr(A,o,s,u,!1),null!==l&&null!==c&&Xr(A,c,l,u,!0)}if("select"===(s=(o=r?wi(r):window).nodeName&&o.nodeName.toLowerCase())||"input"===s&&"file"===o.type)var g=Yn;else if(Gn(o))if(Jn)g=Ar;else{g=ir;var m=rr}else(s=o.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(g=ar);switch(g&&(g=g(e,r))?Kn(A,g,n,i):(m&&m(e,o,r),"focusout"===e&&(m=o._wrapperState)&&m.controlled&&"number"===o.type&&ee(o,"number",o.value)),m=r?wi(r):window,e){case"focusin":(Gn(m)||"true"===m.contentEditable)&&(gr=m,mr=r,vr=null);break;case"focusout":vr=mr=gr=null;break;case"mousedown":yr=!0;break;case"contextmenu":case"mouseup":case"dragend":yr=!1,wr(A,n,i);break;case"selectionchange":if(pr)break;case"keydown":case"keyup":wr(A,n,i)}var v;if(Ln)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else Vn?Nn(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(Rn&&"ko"!==n.locale&&(Vn||"onCompositionStart"!==y?"onCompositionEnd"===y&&Vn&&(v=en()):(Zt="value"in(Jt=i)?Jt.value:Jt.textContent,Vn=!0)),0<(m=Wr(r,y)).length&&(y=new wn(y,e,null,n,i),A.push({event:y,listeners:m}),v?y.data=v:null!==(v=On(n))&&(y.data=v))),(v=In?function(e,t){switch(e){case"compositionend":return On(t);case"keypress":return 32!==t.which?null:(Pn=!0,Hn);case"textInput":return(e=t.data)===Hn&&Pn?null:e;default:return null}}(e,n):function(e,t){if(Vn)return"compositionend"===e||!Ln&&Nn(e,t)?(e=en(),$t=Zt=Jt=null,Vn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Rn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Wr(r,"onBeforeInput")).length&&(i=new wn("onBeforeInput","beforeinput",null,n,i),A.push({event:i,listeners:r}),i.data=v))}Hr(A,t)}))}function Kr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=ke(e,n))&&r.unshift(Kr(e,a,i)),null!=(a=ke(e,t))&&r.push(Kr(e,a,i))),e=e.return}return r}function jr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Xr(e,t,n,r,i){for(var a=t._reactName,A=[];null!==n&&n!==r;){var o=n,s=o.alternate,l=o.stateNode;if(null!==s&&s===r)break;5===o.tag&&null!==l&&(o=l,i?null!=(s=ke(n,a))&&A.unshift(Kr(n,s,o)):i||null!=(s=ke(n,a))&&A.push(Kr(n,s,o))),n=n.return}0!==A.length&&e.push({event:t,listeners:A})}var qr=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Jr(e){return("string"===typeof e?e:""+e).replace(qr,"\n").replace(Yr,"")}function Zr(e,t,n){if(t=Jr(t),Jr(e)!==t&&n)throw Error(a(425))}function $r(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"===typeof setTimeout?setTimeout:void 0,ii="function"===typeof clearTimeout?clearTimeout:void 0,ai="function"===typeof Promise?Promise:void 0,Ai="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof ai?function(e){return ai.resolve(null).then(e).catch(oi)}:ri;function oi(e){setTimeout((function(){throw e}))}function si(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Vt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Vt(t)}function li(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ui(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ci=Math.random().toString(36).slice(2),di="__reactFiber$"+ci,hi="__reactProps$"+ci,fi="__reactContainer$"+ci,pi="__reactEvents$"+ci,gi="__reactListeners$"+ci,mi="__reactHandles$"+ci;function vi(e){var t=e[di];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fi]||n[di]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ui(e);null!==e;){if(n=e[di])return n;e=ui(e)}return t}n=(e=n).parentNode}return null}function yi(e){return!(e=e[di]||e[fi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function Bi(e){return e[hi]||null}var _i=[],bi=-1;function xi(e){return{current:e}}function Ci(e){0>bi||(e.current=_i[bi],_i[bi]=null,bi--)}function Si(e,t){bi++,_i[bi]=e.current,e.current=t}var Ei={},Ui=xi(Ei),Mi=xi(!1),Fi=Ei;function Ti(e,t){var n=e.type.contextTypes;if(!n)return Ei;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function ki(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Qi(){Ci(Mi),Ci(Ui)}function Li(e,t,n){if(Ui.current!==Ei)throw Error(a(168));Si(Ui,t),Si(Mi,n)}function Di(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(a(108,z(e)||"Unknown",i));return R({},n,r)}function Ii(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ei,Fi=Ui.current,Si(Ui,e),Si(Mi,Mi.current),!0}function Ri(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Di(e,t,Fi),r.__reactInternalMemoizedMergedChildContext=e,Ci(Mi),Ci(Ui),Si(Ui,e)):Ci(Mi),Si(Mi,n)}var Hi=null,Pi=!1,Ni=!1;function Oi(e){null===Hi?Hi=[e]:Hi.push(e)}function Vi(){if(!Ni&&null!==Hi){Ni=!0;var e=0,t=yt;try{var n=Hi;for(yt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Hi=null,Pi=!1}catch(i){throw null!==Hi&&(Hi=Hi.slice(e+1)),je($e,Vi),i}finally{yt=t,Ni=!1}}return null}var zi=[],Gi=0,Ki=null,Wi=0,ji=[],Xi=0,qi=null,Yi=1,Ji="";function Zi(e,t){zi[Gi++]=Wi,zi[Gi++]=Ki,Ki=e,Wi=t}function $i(e,t,n){ji[Xi++]=Yi,ji[Xi++]=Ji,ji[Xi++]=qi,qi=e;var r=Yi;e=Ji;var i=32-At(r)-1;r&=~(1<<i),n+=1;var a=32-At(t)+i;if(30<a){var A=i-i%5;a=(r&(1<<A)-1).toString(32),r>>=A,i-=A,Yi=1<<32-At(t)+i|n<<i|r,Ji=a+e}else Yi=1<<a|n<<i|r,Ji=e}function ea(e){null!==e.return&&(Zi(e,1),$i(e,1,0))}function ta(e){for(;e===Ki;)Ki=zi[--Gi],zi[Gi]=null,Wi=zi[--Gi],zi[Gi]=null;for(;e===qi;)qi=ji[--Xi],ji[Xi]=null,Ji=ji[--Xi],ji[Xi]=null,Yi=ji[--Xi],ji[Xi]=null}var na=null,ra=null,ia=!1,aa=null;function Aa(e,t){var n=kl(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function oa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,na=e,ra=li(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,na=e,ra=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==qi?{id:Yi,overflow:Ji}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=kl(18,null,null,0)).stateNode=t,n.return=e,e.child=n,na=e,ra=null,!0);default:return!1}}function sa(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function la(e){if(ia){var t=ra;if(t){var n=t;if(!oa(e,t)){if(sa(e))throw Error(a(418));t=li(n.nextSibling);var r=na;t&&oa(e,t)?Aa(r,n):(e.flags=-4097&e.flags|2,ia=!1,na=e)}}else{if(sa(e))throw Error(a(418));e.flags=-4097&e.flags|2,ia=!1,na=e}}}function ua(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;na=e}function ca(e){if(e!==na)return!1;if(!ia)return ua(e),ia=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ra)){if(sa(e))throw da(),Error(a(418));for(;t;)Aa(e,t),t=li(t.nextSibling)}if(ua(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ra=li(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ra=null}}else ra=na?li(e.stateNode.nextSibling):null;return!0}function da(){for(var e=ra;e;)e=li(e.nextSibling)}function ha(){ra=na=null,ia=!1}function fa(e){null===aa?aa=[e]:aa.push(e)}var pa=w.ReactCurrentBatchConfig;function ga(e,t){if(e&&e.defaultProps){for(var n in t=R({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var ma=xi(null),va=null,ya=null,wa=null;function Ba(){wa=ya=va=null}function _a(e){var t=ma.current;Ci(ma),e._currentValue=t}function ba(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function xa(e,t){va=e,wa=ya=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(wo=!0),e.firstContext=null)}function Ca(e){var t=e._currentValue;if(wa!==e)if(e={context:e,memoizedValue:t,next:null},null===ya){if(null===va)throw Error(a(308));ya=e,va.dependencies={lanes:0,firstContext:e}}else ya=ya.next=e;return t}var Sa=null;function Ea(e){null===Sa?Sa=[e]:Sa.push(e)}function Ua(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ea(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ma(e,r)}function Ma(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Fa=!1;function Ta(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ka(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Qa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function La(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Ms)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ma(e,n)}return null===(i=r.interleaved)?(t.next=t,Ea(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ma(e,n)}function Da(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}function Ia(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var A={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=A:a=a.next=A,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ra(e,t,n,r){var i=e.updateQueue;Fa=!1;var a=i.firstBaseUpdate,A=i.lastBaseUpdate,o=i.shared.pending;if(null!==o){i.shared.pending=null;var s=o,l=s.next;s.next=null,null===A?a=l:A.next=l,A=s;var u=e.alternate;null!==u&&((o=(u=u.updateQueue).lastBaseUpdate)!==A&&(null===o?u.firstBaseUpdate=l:o.next=l,u.lastBaseUpdate=s))}if(null!==a){var c=i.baseState;for(A=0,u=l=s=null,o=a;;){var d=o.lane,h=o.eventTime;if((r&d)===d){null!==u&&(u=u.next={eventTime:h,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var f=e,p=o;switch(d=t,h=n,p.tag){case 1:if("function"===typeof(f=p.payload)){c=f.call(h,c,d);break e}c=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null===(d="function"===typeof(f=p.payload)?f.call(h,c,d):f)||void 0===d)break e;c=R({},c,d);break e;case 2:Fa=!0}}null!==o.callback&&0!==o.lane&&(e.flags|=64,null===(d=i.effects)?i.effects=[o]:d.push(o))}else h={eventTime:h,lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===u?(l=u=h,s=c):u=u.next=h,A|=d;if(null===(o=o.next)){if(null===(o=i.shared.pending))break;o=(d=o).next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}if(null===u&&(s=c),i.baseState=s,i.firstBaseUpdate=l,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{A|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);Rs|=A,e.lanes=A,e.memoizedState=c}}function Ha(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(a(191,i));i.call(r)}}}var Pa=(new r.Component).refs;function Na(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:R({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Oa={isMounted:function(e){return!!(e=e._reactInternals)&&Ve(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tl(),i=nl(e),a=Qa(r,i);a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=La(e,a,i))&&(rl(t,e,i,r),Da(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tl(),i=nl(e),a=Qa(r,i);a.tag=1,a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=La(e,a,i))&&(rl(t,e,i,r),Da(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tl(),r=nl(e),i=Qa(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=La(e,i,r))&&(rl(t,e,r,n),Da(t,e,r))}};function Va(e,t,n,r,i,a,A){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,A):!t.prototype||!t.prototype.isPureReactComponent||(!sr(n,r)||!sr(i,a))}function za(e,t,n){var r=!1,i=Ei,a=t.contextType;return"object"===typeof a&&null!==a?a=Ca(a):(i=ki(t)?Fi:Ui.current,a=(r=null!==(r=t.contextTypes)&&void 0!==r)?Ti(e,i):Ei),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Oa,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ga(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Oa.enqueueReplaceState(t,t.state,null)}function Ka(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Pa,Ta(e);var a=t.contextType;"object"===typeof a&&null!==a?i.context=Ca(a):(a=ki(t)?Fi:Ui.current,i.context=Ti(e,a)),i.state=e.memoizedState,"function"===typeof(a=t.getDerivedStateFromProps)&&(Na(e,t,a,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Oa.enqueueReplaceState(i,i.state,null),Ra(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function Wa(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=r,A=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===A?t.ref:(t=function(e){var t=i.refs;t===Pa&&(t=i.refs={}),null===e?delete t[A]:t[A]=e},t._stringRef=A,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function ja(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Xa(e){return(0,e._init)(e._payload)}function qa(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Ll(e,t)).index=0,e.sibling=null,e}function A(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function o(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Hl(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var a=n.type;return a===b?c(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"===typeof a&&null!==a&&a.$$typeof===k&&Xa(a)===t.type)?((r=i(t,n.props)).ref=Wa(e,t,n),r.return=e,r):((r=Dl(n.type,n.key,n.props,null,e.mode,r)).ref=Wa(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Pl(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function c(e,t,n,r,a){return null===t||7!==t.tag?((t=Il(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Hl(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case B:return(n=Dl(t.type,t.key,t.props,null,e.mode,n)).ref=Wa(e,null,t),n.return=e,n;case _:return(t=Pl(t,e.mode,n)).return=e,t;case k:return d(e,(0,t._init)(t._payload),n)}if(te(t)||D(t))return(t=Il(t,e.mode,n,null)).return=e,t;ja(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==i?null:s(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case B:return n.key===i?l(e,t,n,r):null;case _:return n.key===i?u(e,t,n,r):null;case k:return h(e,t,(i=n._init)(n._payload),r)}if(te(n)||D(n))return null!==i?null:c(e,t,n,r,null);ja(e,n)}return null}function f(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case B:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case _:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case k:return f(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||D(r))return c(t,e=e.get(n)||null,r,i,null);ja(t,r)}return null}function p(i,a,o,s){for(var l=null,u=null,c=a,p=a=0,g=null;null!==c&&p<o.length;p++){c.index>p?(g=c,c=null):g=c.sibling;var m=h(i,c,o[p],s);if(null===m){null===c&&(c=g);break}e&&c&&null===m.alternate&&t(i,c),a=A(m,a,p),null===u?l=m:u.sibling=m,u=m,c=g}if(p===o.length)return n(i,c),ia&&Zi(i,p),l;if(null===c){for(;p<o.length;p++)null!==(c=d(i,o[p],s))&&(a=A(c,a,p),null===u?l=c:u.sibling=c,u=c);return ia&&Zi(i,p),l}for(c=r(i,c);p<o.length;p++)null!==(g=f(c,i,p,o[p],s))&&(e&&null!==g.alternate&&c.delete(null===g.key?p:g.key),a=A(g,a,p),null===u?l=g:u.sibling=g,u=g);return e&&c.forEach((function(e){return t(i,e)})),ia&&Zi(i,p),l}function g(i,o,s,l){var u=D(s);if("function"!==typeof u)throw Error(a(150));if(null==(s=u.call(s)))throw Error(a(151));for(var c=u=null,p=o,g=o=0,m=null,v=s.next();null!==p&&!v.done;g++,v=s.next()){p.index>g?(m=p,p=null):m=p.sibling;var y=h(i,p,v.value,l);if(null===y){null===p&&(p=m);break}e&&p&&null===y.alternate&&t(i,p),o=A(y,o,g),null===c?u=y:c.sibling=y,c=y,p=m}if(v.done)return n(i,p),ia&&Zi(i,g),u;if(null===p){for(;!v.done;g++,v=s.next())null!==(v=d(i,v.value,l))&&(o=A(v,o,g),null===c?u=v:c.sibling=v,c=v);return ia&&Zi(i,g),u}for(p=r(i,p);!v.done;g++,v=s.next())null!==(v=f(p,i,g,v.value,l))&&(e&&null!==v.alternate&&p.delete(null===v.key?g:v.key),o=A(v,o,g),null===c?u=v:c.sibling=v,c=v);return e&&p.forEach((function(e){return t(i,e)})),ia&&Zi(i,g),u}return function e(r,a,A,s){if("object"===typeof A&&null!==A&&A.type===b&&null===A.key&&(A=A.props.children),"object"===typeof A&&null!==A){switch(A.$$typeof){case B:e:{for(var l=A.key,u=a;null!==u;){if(u.key===l){if((l=A.type)===b){if(7===u.tag){n(r,u.sibling),(a=i(u,A.props.children)).return=r,r=a;break e}}else if(u.elementType===l||"object"===typeof l&&null!==l&&l.$$typeof===k&&Xa(l)===u.type){n(r,u.sibling),(a=i(u,A.props)).ref=Wa(r,u,A),a.return=r,r=a;break e}n(r,u);break}t(r,u),u=u.sibling}A.type===b?((a=Il(A.props.children,r.mode,s,A.key)).return=r,r=a):((s=Dl(A.type,A.key,A.props,null,r.mode,s)).ref=Wa(r,a,A),s.return=r,r=s)}return o(r);case _:e:{for(u=A.key;null!==a;){if(a.key===u){if(4===a.tag&&a.stateNode.containerInfo===A.containerInfo&&a.stateNode.implementation===A.implementation){n(r,a.sibling),(a=i(a,A.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Pl(A,r.mode,s)).return=r,r=a}return o(r);case k:return e(r,a,(u=A._init)(A._payload),s)}if(te(A))return p(r,a,A,s);if(D(A))return g(r,a,A,s);ja(r,A)}return"string"===typeof A&&""!==A||"number"===typeof A?(A=""+A,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,A)).return=r,r=a):(n(r,a),(a=Hl(A,r.mode,s)).return=r,r=a),o(r)):n(r,a)}}var Ya=qa(!0),Ja=qa(!1),Za={},$a=xi(Za),eA=xi(Za),tA=xi(Za);function nA(e){if(e===Za)throw Error(a(174));return e}function rA(e,t){switch(Si(tA,t),Si(eA,e),Si($a,Za),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:se(null,"");break;default:t=se(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ci($a),Si($a,t)}function iA(){Ci($a),Ci(eA),Ci(tA)}function aA(e){nA(tA.current);var t=nA($a.current),n=se(t,e.type);t!==n&&(Si(eA,e),Si($a,n))}function AA(e){eA.current===e&&(Ci($a),Ci(eA))}var oA=xi(0);function sA(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var lA=[];function uA(){for(var e=0;e<lA.length;e++)lA[e]._workInProgressVersionPrimary=null;lA.length=0}var cA=w.ReactCurrentDispatcher,dA=w.ReactCurrentBatchConfig,hA=0,fA=null,pA=null,gA=null,mA=!1,vA=!1,yA=0,wA=0;function BA(){throw Error(a(321))}function _A(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function bA(e,t,n,r,i,A){if(hA=A,fA=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,cA.current=null===e||null===e.memoizedState?Ao:oo,e=n(r,i),vA){A=0;do{if(vA=!1,yA=0,25<=A)throw Error(a(301));A+=1,gA=pA=null,t.updateQueue=null,cA.current=so,e=n(r,i)}while(vA)}if(cA.current=ao,t=null!==pA&&null!==pA.next,hA=0,gA=pA=fA=null,mA=!1,t)throw Error(a(300));return e}function xA(){var e=0!==yA;return yA=0,e}function CA(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===gA?fA.memoizedState=gA=e:gA=gA.next=e,gA}function SA(){if(null===pA){var e=fA.alternate;e=null!==e?e.memoizedState:null}else e=pA.next;var t=null===gA?fA.memoizedState:gA.next;if(null!==t)gA=t,pA=e;else{if(null===e)throw Error(a(310));e={memoizedState:(pA=e).memoizedState,baseState:pA.baseState,baseQueue:pA.baseQueue,queue:pA.queue,next:null},null===gA?fA.memoizedState=gA=e:gA=gA.next=e}return gA}function EA(e,t){return"function"===typeof t?t(e):t}function UA(e){var t=SA(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=pA,i=r.baseQueue,A=n.pending;if(null!==A){if(null!==i){var o=i.next;i.next=A.next,A.next=o}r.baseQueue=i=A,n.pending=null}if(null!==i){A=i.next,r=r.baseState;var s=o=null,l=null,u=A;do{var c=u.lane;if((hA&c)===c)null!==l&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===l?(s=l=d,o=r):l=l.next=d,fA.lanes|=c,Rs|=c}u=u.next}while(null!==u&&u!==A);null===l?o=r:l.next=s,or(r,t.memoizedState)||(wo=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{A=i.lane,fA.lanes|=A,Rs|=A,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function MA(e){var t=SA(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,A=t.memoizedState;if(null!==i){n.pending=null;var o=i=i.next;do{A=e(A,o.action),o=o.next}while(o!==i);or(A,t.memoizedState)||(wo=!0),t.memoizedState=A,null===t.baseQueue&&(t.baseState=A),n.lastRenderedState=A}return[A,r]}function FA(){}function TA(e,t){var n=fA,r=SA(),i=t(),A=!or(r.memoizedState,i);if(A&&(r.memoizedState=i,wo=!0),r=r.queue,zA(LA.bind(null,n,r,e),[e]),r.getSnapshot!==t||A||null!==gA&&1&gA.memoizedState.tag){if(n.flags|=2048,HA(9,QA.bind(null,n,r,i,t),void 0,null),null===Fs)throw Error(a(349));0!==(30&hA)||kA(n,t,i)}return i}function kA(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=fA.updateQueue)?(t={lastEffect:null,stores:null},fA.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function QA(e,t,n,r){t.value=n,t.getSnapshot=r,DA(t)&&IA(e)}function LA(e,t,n){return n((function(){DA(t)&&IA(e)}))}function DA(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!or(e,n)}catch(r){return!0}}function IA(e){var t=Ma(e,1);null!==t&&rl(t,e,1,-1)}function RA(e){var t=CA();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:EA,lastRenderedState:e},t.queue=e,e=e.dispatch=to.bind(null,fA,e),[t.memoizedState,e]}function HA(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=fA.updateQueue)?(t={lastEffect:null,stores:null},fA.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function PA(){return SA().memoizedState}function NA(e,t,n,r){var i=CA();fA.flags|=e,i.memoizedState=HA(1|t,n,void 0,void 0===r?null:r)}function OA(e,t,n,r){var i=SA();r=void 0===r?null:r;var a=void 0;if(null!==pA){var A=pA.memoizedState;if(a=A.destroy,null!==r&&_A(r,A.deps))return void(i.memoizedState=HA(t,n,a,r))}fA.flags|=e,i.memoizedState=HA(1|t,n,a,r)}function VA(e,t){return NA(8390656,8,e,t)}function zA(e,t){return OA(2048,8,e,t)}function GA(e,t){return OA(4,2,e,t)}function KA(e,t){return OA(4,4,e,t)}function WA(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function jA(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,OA(4,4,WA.bind(null,t,e),n)}function XA(){}function qA(e,t){var n=SA();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&_A(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function YA(e,t){var n=SA();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&_A(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function JA(e,t,n){return 0===(21&hA)?(e.baseState&&(e.baseState=!1,wo=!0),e.memoizedState=n):(or(n,t)||(n=pt(),fA.lanes|=n,Rs|=n,e.baseState=!0),t)}function ZA(e,t){var n=yt;yt=0!==n&&4>n?n:4,e(!0);var r=dA.transition;dA.transition={};try{e(!1),t()}finally{yt=n,dA.transition=r}}function $A(){return SA().memoizedState}function eo(e,t,n){var r=nl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},no(e))ro(t,n);else if(null!==(n=Ua(e,t,n,r))){rl(n,e,r,tl()),io(n,t,r)}}function to(e,t,n){var r=nl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(no(e))ro(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var A=t.lastRenderedState,o=a(A,n);if(i.hasEagerState=!0,i.eagerState=o,or(o,A)){var s=t.interleaved;return null===s?(i.next=i,Ea(t)):(i.next=s.next,s.next=i),void(t.interleaved=i)}}catch(l){}null!==(n=Ua(e,t,i,r))&&(rl(n,e,r,i=tl()),io(n,t,r))}}function no(e){var t=e.alternate;return e===fA||null!==t&&t===fA}function ro(e,t){vA=mA=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function io(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}var ao={readContext:Ca,useCallback:BA,useContext:BA,useEffect:BA,useImperativeHandle:BA,useInsertionEffect:BA,useLayoutEffect:BA,useMemo:BA,useReducer:BA,useRef:BA,useState:BA,useDebugValue:BA,useDeferredValue:BA,useTransition:BA,useMutableSource:BA,useSyncExternalStore:BA,useId:BA,unstable_isNewReconciler:!1},Ao={readContext:Ca,useCallback:function(e,t){return CA().memoizedState=[e,void 0===t?null:t],e},useContext:Ca,useEffect:VA,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,NA(4194308,4,WA.bind(null,t,e),n)},useLayoutEffect:function(e,t){return NA(4194308,4,e,t)},useInsertionEffect:function(e,t){return NA(4,2,e,t)},useMemo:function(e,t){var n=CA();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=CA();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=eo.bind(null,fA,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},CA().memoizedState=e},useState:RA,useDebugValue:XA,useDeferredValue:function(e){return CA().memoizedState=e},useTransition:function(){var e=RA(!1),t=e[0];return e=ZA.bind(null,e[1]),CA().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fA,i=CA();if(ia){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Fs)throw Error(a(349));0!==(30&hA)||kA(r,t,n)}i.memoizedState=n;var A={value:n,getSnapshot:t};return i.queue=A,VA(LA.bind(null,r,A,e),[e]),r.flags|=2048,HA(9,QA.bind(null,r,A,n,t),void 0,null),n},useId:function(){var e=CA(),t=Fs.identifierPrefix;if(ia){var n=Ji;t=":"+t+"R"+(n=(Yi&~(1<<32-At(Yi)-1)).toString(32)+n),0<(n=yA++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=wA++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},oo={readContext:Ca,useCallback:qA,useContext:Ca,useEffect:zA,useImperativeHandle:jA,useInsertionEffect:GA,useLayoutEffect:KA,useMemo:YA,useReducer:UA,useRef:PA,useState:function(){return UA(EA)},useDebugValue:XA,useDeferredValue:function(e){return JA(SA(),pA.memoizedState,e)},useTransition:function(){return[UA(EA)[0],SA().memoizedState]},useMutableSource:FA,useSyncExternalStore:TA,useId:$A,unstable_isNewReconciler:!1},so={readContext:Ca,useCallback:qA,useContext:Ca,useEffect:zA,useImperativeHandle:jA,useInsertionEffect:GA,useLayoutEffect:KA,useMemo:YA,useReducer:MA,useRef:PA,useState:function(){return MA(EA)},useDebugValue:XA,useDeferredValue:function(e){var t=SA();return null===pA?t.memoizedState=e:JA(t,pA.memoizedState,e)},useTransition:function(){return[MA(EA)[0],SA().memoizedState]},useMutableSource:FA,useSyncExternalStore:TA,useId:$A,unstable_isNewReconciler:!1};function lo(e,t){try{var n="",r=t;do{n+=O(r),r=r.return}while(r);var i=n}catch(a){i="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:i,digest:null}}function uo(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function co(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ho="function"===typeof WeakMap?WeakMap:Map;function fo(e,t,n){(n=Qa(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ks||(Ks=!0,Ws=r),co(0,t)},n}function po(e,t,n){(n=Qa(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){co(0,t)}}var a=e.stateNode;return null!==a&&"function"===typeof a.componentDidCatch&&(n.callback=function(){co(0,t),"function"!==typeof r&&(null===js?js=new Set([this]):js.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function go(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ho;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Sl.bind(null,e,t,n),t.then(e,e))}function mo(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vo(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Qa(-1,1)).tag=2,La(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var yo=w.ReactCurrentOwner,wo=!1;function Bo(e,t,n,r){t.child=null===e?Ja(t,null,n,r):Ya(t,e.child,n,r)}function _o(e,t,n,r,i){n=n.render;var a=t.ref;return xa(t,i),r=bA(e,t,n,r,a,i),n=xA(),null===e||wo?(ia&&n&&ea(t),t.flags|=1,Bo(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ko(e,t,i))}function bo(e,t,n,r,i){if(null===e){var a=n.type;return"function"!==typeof a||Ql(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Dl(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,xo(e,t,a,r,i))}if(a=e.child,0===(e.lanes&i)){var A=a.memoizedProps;if((n=null!==(n=n.compare)?n:sr)(A,r)&&e.ref===t.ref)return Ko(e,t,i)}return t.flags|=1,(e=Ll(a,r)).ref=t.ref,e.return=t,t.child=e}function xo(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(sr(a,r)&&e.ref===t.ref){if(wo=!1,t.pendingProps=r=a,0===(e.lanes&i))return t.lanes=e.lanes,Ko(e,t,i);0!==(131072&e.flags)&&(wo=!0)}}return Eo(e,t,n,r,i)}function Co(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Si(Ls,Qs),Qs|=n;else{if(0===(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Si(Ls,Qs),Qs|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Si(Ls,Qs),Qs|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Si(Ls,Qs),Qs|=r;return Bo(e,t,i,n),t.child}function So(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Eo(e,t,n,r,i){var a=ki(n)?Fi:Ui.current;return a=Ti(t,a),xa(t,i),n=bA(e,t,n,r,a,i),r=xA(),null===e||wo?(ia&&r&&ea(t),t.flags|=1,Bo(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ko(e,t,i))}function Uo(e,t,n,r,i){if(ki(n)){var a=!0;Ii(t)}else a=!1;if(xa(t,i),null===t.stateNode)Go(e,t),za(t,n,r),Ka(t,n,r,i),r=!0;else if(null===e){var A=t.stateNode,o=t.memoizedProps;A.props=o;var s=A.context,l=n.contextType;"object"===typeof l&&null!==l?l=Ca(l):l=Ti(t,l=ki(n)?Fi:Ui.current);var u=n.getDerivedStateFromProps,c="function"===typeof u||"function"===typeof A.getSnapshotBeforeUpdate;c||"function"!==typeof A.UNSAFE_componentWillReceiveProps&&"function"!==typeof A.componentWillReceiveProps||(o!==r||s!==l)&&Ga(t,A,r,l),Fa=!1;var d=t.memoizedState;A.state=d,Ra(t,r,A,i),s=t.memoizedState,o!==r||d!==s||Mi.current||Fa?("function"===typeof u&&(Na(t,n,u,r),s=t.memoizedState),(o=Fa||Va(t,n,o,r,d,s,l))?(c||"function"!==typeof A.UNSAFE_componentWillMount&&"function"!==typeof A.componentWillMount||("function"===typeof A.componentWillMount&&A.componentWillMount(),"function"===typeof A.UNSAFE_componentWillMount&&A.UNSAFE_componentWillMount()),"function"===typeof A.componentDidMount&&(t.flags|=4194308)):("function"===typeof A.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),A.props=r,A.state=s,A.context=l,r=o):("function"===typeof A.componentDidMount&&(t.flags|=4194308),r=!1)}else{A=t.stateNode,ka(e,t),o=t.memoizedProps,l=t.type===t.elementType?o:ga(t.type,o),A.props=l,c=t.pendingProps,d=A.context,"object"===typeof(s=n.contextType)&&null!==s?s=Ca(s):s=Ti(t,s=ki(n)?Fi:Ui.current);var h=n.getDerivedStateFromProps;(u="function"===typeof h||"function"===typeof A.getSnapshotBeforeUpdate)||"function"!==typeof A.UNSAFE_componentWillReceiveProps&&"function"!==typeof A.componentWillReceiveProps||(o!==c||d!==s)&&Ga(t,A,r,s),Fa=!1,d=t.memoizedState,A.state=d,Ra(t,r,A,i);var f=t.memoizedState;o!==c||d!==f||Mi.current||Fa?("function"===typeof h&&(Na(t,n,h,r),f=t.memoizedState),(l=Fa||Va(t,n,l,r,d,f,s)||!1)?(u||"function"!==typeof A.UNSAFE_componentWillUpdate&&"function"!==typeof A.componentWillUpdate||("function"===typeof A.componentWillUpdate&&A.componentWillUpdate(r,f,s),"function"===typeof A.UNSAFE_componentWillUpdate&&A.UNSAFE_componentWillUpdate(r,f,s)),"function"===typeof A.componentDidUpdate&&(t.flags|=4),"function"===typeof A.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof A.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof A.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),A.props=r,A.state=f,A.context=s,r=l):("function"!==typeof A.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof A.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Mo(e,t,n,r,a,i)}function Mo(e,t,n,r,i,a){So(e,t);var A=0!==(128&t.flags);if(!r&&!A)return i&&Ri(t,n,!1),Ko(e,t,a);r=t.stateNode,yo.current=t;var o=A&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&A?(t.child=Ya(t,e.child,null,a),t.child=Ya(t,null,o,a)):Bo(e,t,o,a),t.memoizedState=r.state,i&&Ri(t,n,!0),t.child}function Fo(e){var t=e.stateNode;t.pendingContext?Li(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Li(0,t.context,!1),rA(e,t.containerInfo)}function To(e,t,n,r,i){return ha(),fa(i),t.flags|=256,Bo(e,t,n,r),t.child}var ko,Qo,Lo,Do,Io={dehydrated:null,treeContext:null,retryLane:0};function Ro(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ho(e,t,n){var r,i=t.pendingProps,A=oA.current,o=!1,s=0!==(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&0!==(2&A)),r?(o=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(A|=1),Si(oA,1&A),null===e)return la(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(s=i.children,e=i.fallback,o?(i=t.mode,o=t.child,s={mode:"hidden",children:s},0===(1&i)&&null!==o?(o.childLanes=0,o.pendingProps=s):o=Rl(s,i,0,null),e=Il(e,i,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ro(n),t.memoizedState=Io,e):Po(t,s));if(null!==(A=e.memoizedState)&&null!==(r=A.dehydrated))return function(e,t,n,r,i,A,o){if(n)return 256&t.flags?(t.flags&=-257,No(e,t,o,r=uo(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(A=r.fallback,i=t.mode,r=Rl({mode:"visible",children:r.children},i,0,null),(A=Il(A,i,o,null)).flags|=2,r.return=t,A.return=t,r.sibling=A,t.child=r,0!==(1&t.mode)&&Ya(t,e.child,null,o),t.child.memoizedState=Ro(o),t.memoizedState=Io,A);if(0===(1&t.mode))return No(e,t,o,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,No(e,t,o,r=uo(A=Error(a(419)),r,void 0))}if(s=0!==(o&e.childLanes),wo||s){if(null!==(r=Fs)){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|o))?0:i)&&i!==A.retryLane&&(A.retryLane=i,Ma(e,i),rl(r,e,i,-1))}return gl(),No(e,t,o,r=uo(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Ul.bind(null,e),i._reactRetry=t,null):(e=A.treeContext,ra=li(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(ji[Xi++]=Yi,ji[Xi++]=Ji,ji[Xi++]=qi,Yi=e.id,Ji=e.overflow,qi=t),t=Po(t,r.children),t.flags|=4096,t)}(e,t,s,i,r,A,n);if(o){o=i.fallback,s=t.mode,r=(A=e.child).sibling;var l={mode:"hidden",children:i.children};return 0===(1&s)&&t.child!==A?((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null):(i=Ll(A,l)).subtreeFlags=14680064&A.subtreeFlags,null!==r?o=Ll(r,o):(o=Il(o,s,n,null)).flags|=2,o.return=t,i.return=t,i.sibling=o,t.child=i,i=o,o=t.child,s=null===(s=e.child.memoizedState)?Ro(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=Io,i}return e=(o=e.child).sibling,i=Ll(o,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Po(e,t){return(t=Rl({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function No(e,t,n,r){return null!==r&&fa(r),Ya(t,e.child,null,n),(e=Po(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Oo(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),ba(e.return,t,n)}function Vo(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function zo(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Bo(e,t,r.children,n),0!==(2&(r=oA.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Oo(e,n,t);else if(19===e.tag)Oo(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Si(oA,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===sA(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Vo(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===sA(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Vo(t,!0,n,null,a);break;case"together":Vo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Go(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ko(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Rs|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ll(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ll(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Wo(e,t){if(!ia)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function jo(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Xo(e,t,n){var r=t.pendingProps;switch(ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jo(t),null;case 1:case 17:return ki(t.type)&&Qi(),jo(t),null;case 3:return r=t.stateNode,iA(),Ci(Mi),Ci(Ui),uA(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ca(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==aa&&(ol(aa),aa=null))),Qo(e,t),jo(t),null;case 5:AA(t);var i=nA(tA.current);if(n=t.type,null!==e&&null!=t.stateNode)Lo(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return jo(t),null}if(e=nA($a.current),ca(t)){r=t.stateNode,n=t.type;var A=t.memoizedProps;switch(r[di]=t,r[hi]=A,e=0!==(1&t.mode),n){case"dialog":Pr("cancel",r),Pr("close",r);break;case"iframe":case"object":case"embed":Pr("load",r);break;case"video":case"audio":for(i=0;i<Dr.length;i++)Pr(Dr[i],r);break;case"source":Pr("error",r);break;case"img":case"image":case"link":Pr("error",r),Pr("load",r);break;case"details":Pr("toggle",r);break;case"input":Y(r,A),Pr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!A.multiple},Pr("invalid",r);break;case"textarea":ie(r,A),Pr("invalid",r)}for(var s in ve(n,A),i=null,A)if(A.hasOwnProperty(s)){var l=A[s];"children"===s?"string"===typeof l?r.textContent!==l&&(!0!==A.suppressHydrationWarning&&Zr(r.textContent,l,e),i=["children",l]):"number"===typeof l&&r.textContent!==""+l&&(!0!==A.suppressHydrationWarning&&Zr(r.textContent,l,e),i=["children",""+l]):o.hasOwnProperty(s)&&null!=l&&"onScroll"===s&&Pr("scroll",r)}switch(n){case"input":W(r),$(r,A,!0);break;case"textarea":W(r),Ae(r);break;case"select":case"option":break;default:"function"===typeof A.onClick&&(r.onclick=$r)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{s=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=oe(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[di]=t,e[hi]=r,ko(e,t,!1,!1),t.stateNode=e;e:{switch(s=ye(n,r),n){case"dialog":Pr("cancel",e),Pr("close",e),i=r;break;case"iframe":case"object":case"embed":Pr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Dr.length;i++)Pr(Dr[i],e);i=r;break;case"source":Pr("error",e),i=r;break;case"img":case"image":case"link":Pr("error",e),Pr("load",e),i=r;break;case"details":Pr("toggle",e),i=r;break;case"input":Y(e,r),i=q(e,r),Pr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=R({},r,{value:void 0}),Pr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Pr("invalid",e)}for(A in ve(n,i),l=i)if(l.hasOwnProperty(A)){var u=l[A];"style"===A?ge(e,u):"dangerouslySetInnerHTML"===A?null!=(u=u?u.__html:void 0)&&ce(e,u):"children"===A?"string"===typeof u?("textarea"!==n||""!==u)&&de(e,u):"number"===typeof u&&de(e,""+u):"suppressContentEditableWarning"!==A&&"suppressHydrationWarning"!==A&&"autoFocus"!==A&&(o.hasOwnProperty(A)?null!=u&&"onScroll"===A&&Pr("scroll",e):null!=u&&y(e,A,u,s))}switch(n){case"input":W(e),$(e,r,!1);break;case"textarea":W(e),Ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+G(r.value));break;case"select":e.multiple=!!r.multiple,null!=(A=r.value)?ne(e,!!r.multiple,A,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=$r)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return jo(t),null;case 6:if(e&&null!=t.stateNode)Do(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));if(n=nA(tA.current),nA($a.current),ca(t)){if(r=t.stateNode,n=t.memoizedProps,r[di]=t,(A=r.nodeValue!==n)&&null!==(e=na))switch(e.tag){case 3:Zr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Zr(r.nodeValue,n,0!==(1&e.mode))}A&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[di]=t,t.stateNode=r}return jo(t),null;case 13:if(Ci(oA),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ia&&null!==ra&&0!==(1&t.mode)&&0===(128&t.flags))da(),ha(),t.flags|=98560,A=!1;else if(A=ca(t),null!==r&&null!==r.dehydrated){if(null===e){if(!A)throw Error(a(318));if(!(A=null!==(A=t.memoizedState)?A.dehydrated:null))throw Error(a(317));A[di]=t}else ha(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;jo(t),A=!1}else null!==aa&&(ol(aa),aa=null),A=!0;if(!A)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&oA.current)?0===Ds&&(Ds=3):gl())),null!==t.updateQueue&&(t.flags|=4),jo(t),null);case 4:return iA(),Qo(e,t),null===e&&Vr(t.stateNode.containerInfo),jo(t),null;case 10:return _a(t.type._context),jo(t),null;case 19:if(Ci(oA),null===(A=t.memoizedState))return jo(t),null;if(r=0!==(128&t.flags),null===(s=A.rendering))if(r)Wo(A,!1);else{if(0!==Ds||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(s=sA(e))){for(t.flags|=128,Wo(A,!1),null!==(r=s.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(A=n).flags&=14680066,null===(s=A.alternate)?(A.childLanes=0,A.lanes=e,A.child=null,A.subtreeFlags=0,A.memoizedProps=null,A.memoizedState=null,A.updateQueue=null,A.dependencies=null,A.stateNode=null):(A.childLanes=s.childLanes,A.lanes=s.lanes,A.child=s.child,A.subtreeFlags=0,A.deletions=null,A.memoizedProps=s.memoizedProps,A.memoizedState=s.memoizedState,A.updateQueue=s.updateQueue,A.type=s.type,e=s.dependencies,A.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Si(oA,1&oA.current|2),t.child}e=e.sibling}null!==A.tail&&Je()>zs&&(t.flags|=128,r=!0,Wo(A,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=sA(s))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Wo(A,!0),null===A.tail&&"hidden"===A.tailMode&&!s.alternate&&!ia)return jo(t),null}else 2*Je()-A.renderingStartTime>zs&&1073741824!==n&&(t.flags|=128,r=!0,Wo(A,!1),t.lanes=4194304);A.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=A.last)?n.sibling=s:t.child=s,A.last=s)}return null!==A.tail?(t=A.tail,A.rendering=t,A.tail=t.sibling,A.renderingStartTime=Je(),t.sibling=null,n=oA.current,Si(oA,r?1&n|2:1&n),t):(jo(t),null);case 22:case 23:return dl(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Qs)&&(jo(t),6&t.subtreeFlags&&(t.flags|=8192)):jo(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function qo(e,t){switch(ta(t),t.tag){case 1:return ki(t.type)&&Qi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return iA(),Ci(Mi),Ci(Ui),uA(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return AA(t),null;case 13:if(Ci(oA),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));ha()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ci(oA),null;case 4:return iA(),null;case 10:return _a(t.type._context),null;case 22:case 23:return dl(),null;default:return null}}ko=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Qo=function(){},Lo=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,nA($a.current);var a,A=null;switch(n){case"input":i=q(e,i),r=q(e,r),A=[];break;case"select":i=R({},i,{value:void 0}),r=R({},r,{value:void 0}),A=[];break;case"textarea":i=re(e,i),r=re(e,r),A=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=$r)}for(u in ve(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(o.hasOwnProperty(u)?A||(A=[]):(A=A||[]).push(u,null));for(u in r){var l=r[u];if(s=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(null!=l||null!=s))if("style"===u)if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(A||(A=[]),A.push(u,n)),n=l;else"dangerouslySetInnerHTML"===u?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(A=A||[]).push(u,l)):"children"===u?"string"!==typeof l&&"number"!==typeof l||(A=A||[]).push(u,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(o.hasOwnProperty(u)?(null!=l&&"onScroll"===u&&Pr("scroll",e),A||s===l||(A=[])):(A=A||[]).push(u,l))}n&&(A=A||[]).push("style",n);var u=A;(t.updateQueue=u)&&(t.flags|=4)}},Do=function(e,t,n,r){n!==r&&(t.flags|=4)};var Yo=!1,Jo=!1,Zo="function"===typeof WeakSet?WeakSet:Set,$o=null;function es(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Cl(e,t,r)}else n.current=null}function ts(e,t,n){try{n()}catch(r){Cl(e,t,r)}}var ns=!1;function rs(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&ts(t,n,a)}i=i.next}while(i!==r)}}function is(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function as(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function As(e){var t=e.alternate;null!==t&&(e.alternate=null,As(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[di],delete t[hi],delete t[pi],delete t[gi],delete t[mi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function os(e){return 5===e.tag||3===e.tag||4===e.tag}function ss(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||os(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ls(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=$r));else if(4!==r&&null!==(e=e.child))for(ls(e,t,n),e=e.sibling;null!==e;)ls(e,t,n),e=e.sibling}function us(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(us(e,t,n),e=e.sibling;null!==e;)us(e,t,n),e=e.sibling}var cs=null,ds=!1;function hs(e,t,n){for(n=n.child;null!==n;)fs(e,t,n),n=n.sibling}function fs(e,t,n){if(at&&"function"===typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(o){}switch(n.tag){case 5:Jo||es(n,t);case 6:var r=cs,i=ds;cs=null,hs(e,t,n),ds=i,null!==(cs=r)&&(ds?(e=cs,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cs.removeChild(n.stateNode));break;case 18:null!==cs&&(ds?(e=cs,n=n.stateNode,8===e.nodeType?si(e.parentNode,n):1===e.nodeType&&si(e,n),Vt(e)):si(cs,n.stateNode));break;case 4:r=cs,i=ds,cs=n.stateNode.containerInfo,ds=!0,hs(e,t,n),cs=r,ds=i;break;case 0:case 11:case 14:case 15:if(!Jo&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var a=i,A=a.destroy;a=a.tag,void 0!==A&&(0!==(2&a)||0!==(4&a))&&ts(n,t,A),i=i.next}while(i!==r)}hs(e,t,n);break;case 1:if(!Jo&&(es(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){Cl(n,t,o)}hs(e,t,n);break;case 21:hs(e,t,n);break;case 22:1&n.mode?(Jo=(r=Jo)||null!==n.memoizedState,hs(e,t,n),Jo=r):hs(e,t,n);break;default:hs(e,t,n)}}function ps(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Zo),t.forEach((function(t){var r=Ml.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function gs(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var A=e,o=t,s=o;e:for(;null!==s;){switch(s.tag){case 5:cs=s.stateNode,ds=!1;break e;case 3:case 4:cs=s.stateNode.containerInfo,ds=!0;break e}s=s.return}if(null===cs)throw Error(a(160));fs(A,o,i),cs=null,ds=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(u){Cl(i,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ms(t,e),t=t.sibling}function ms(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gs(t,e),vs(e),4&r){try{rs(3,e,e.return),is(3,e)}catch(g){Cl(e,e.return,g)}try{rs(5,e,e.return)}catch(g){Cl(e,e.return,g)}}break;case 1:gs(t,e),vs(e),512&r&&null!==n&&es(n,n.return);break;case 5:if(gs(t,e),vs(e),512&r&&null!==n&&es(n,n.return),32&e.flags){var i=e.stateNode;try{de(i,"")}catch(g){Cl(e,e.return,g)}}if(4&r&&null!=(i=e.stateNode)){var A=e.memoizedProps,o=null!==n?n.memoizedProps:A,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===A.type&&null!=A.name&&J(i,A),ye(s,o);var u=ye(s,A);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];"style"===c?ge(i,d):"dangerouslySetInnerHTML"===c?ce(i,d):"children"===c?de(i,d):y(i,c,d,u)}switch(s){case"input":Z(i,A);break;case"textarea":ae(i,A);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!A.multiple;var f=A.value;null!=f?ne(i,!!A.multiple,f,!1):h!==!!A.multiple&&(null!=A.defaultValue?ne(i,!!A.multiple,A.defaultValue,!0):ne(i,!!A.multiple,A.multiple?[]:"",!1))}i[hi]=A}catch(g){Cl(e,e.return,g)}}break;case 6:if(gs(t,e),vs(e),4&r){if(null===e.stateNode)throw Error(a(162));i=e.stateNode,A=e.memoizedProps;try{i.nodeValue=A}catch(g){Cl(e,e.return,g)}}break;case 3:if(gs(t,e),vs(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Vt(t.containerInfo)}catch(g){Cl(e,e.return,g)}break;case 4:default:gs(t,e),vs(e);break;case 13:gs(t,e),vs(e),8192&(i=e.child).flags&&(A=null!==i.memoizedState,i.stateNode.isHidden=A,!A||null!==i.alternate&&null!==i.alternate.memoizedState||(Vs=Je())),4&r&&ps(e);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&e.mode?(Jo=(u=Jo)||c,gs(t,e),Jo=u):gs(t,e),vs(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!c&&0!==(1&e.mode))for($o=e,c=e.child;null!==c;){for(d=$o=c;null!==$o;){switch(f=(h=$o).child,h.tag){case 0:case 11:case 14:case 15:rs(4,h,h.return);break;case 1:es(h,h.return);var p=h.stateNode;if("function"===typeof p.componentWillUnmount){r=h,n=h.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(g){Cl(r,n,g)}}break;case 5:es(h,h.return);break;case 22:if(null!==h.memoizedState){_s(d);continue}}null!==f?(f.return=h,$o=f):_s(d)}c=c.sibling}e:for(c=null,d=e;;){if(5===d.tag){if(null===c){c=d;try{i=d.stateNode,u?"function"===typeof(A=i.style).setProperty?A.setProperty("display","none","important"):A.display="none":(s=d.stateNode,o=void 0!==(l=d.memoizedProps.style)&&null!==l&&l.hasOwnProperty("display")?l.display:null,s.style.display=pe("display",o))}catch(g){Cl(e,e.return,g)}}}else if(6===d.tag){if(null===c)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(g){Cl(e,e.return,g)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:gs(t,e),vs(e),4&r&&ps(e);case 21:}}function vs(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(os(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(de(i,""),r.flags&=-33),us(e,ss(e),i);break;case 3:case 4:var A=r.stateNode.containerInfo;ls(e,ss(e),A);break;default:throw Error(a(161))}}catch(o){Cl(e,e.return,o)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ys(e,t,n){$o=e,ws(e,t,n)}function ws(e,t,n){for(var r=0!==(1&e.mode);null!==$o;){var i=$o,a=i.child;if(22===i.tag&&r){var A=null!==i.memoizedState||Yo;if(!A){var o=i.alternate,s=null!==o&&null!==o.memoizedState||Jo;o=Yo;var l=Jo;if(Yo=A,(Jo=s)&&!l)for($o=i;null!==$o;)s=(A=$o).child,22===A.tag&&null!==A.memoizedState?bs(i):null!==s?(s.return=A,$o=s):bs(i);for(;null!==a;)$o=a,ws(a,t,n),a=a.sibling;$o=i,Yo=o,Jo=l}Bs(e)}else 0!==(8772&i.subtreeFlags)&&null!==a?(a.return=i,$o=a):Bs(e)}}function Bs(e){for(;null!==$o;){var t=$o;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Jo||is(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Jo)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ga(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var A=t.updateQueue;null!==A&&Ha(t,A,r);break;case 3:var o=t.updateQueue;if(null!==o){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ha(t,o,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&Vt(d)}}}break;default:throw Error(a(163))}Jo||512&t.flags&&as(t)}catch(h){Cl(t,t.return,h)}}if(t===e){$o=null;break}if(null!==(n=t.sibling)){n.return=t.return,$o=n;break}$o=t.return}}function _s(e){for(;null!==$o;){var t=$o;if(t===e){$o=null;break}var n=t.sibling;if(null!==n){n.return=t.return,$o=n;break}$o=t.return}}function bs(e){for(;null!==$o;){var t=$o;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{is(4,t)}catch(s){Cl(t,n,s)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(s){Cl(t,i,s)}}var a=t.return;try{as(t)}catch(s){Cl(t,a,s)}break;case 5:var A=t.return;try{as(t)}catch(s){Cl(t,A,s)}}}catch(s){Cl(t,t.return,s)}if(t===e){$o=null;break}var o=t.sibling;if(null!==o){o.return=t.return,$o=o;break}$o=t.return}}var xs,Cs=Math.ceil,Ss=w.ReactCurrentDispatcher,Es=w.ReactCurrentOwner,Us=w.ReactCurrentBatchConfig,Ms=0,Fs=null,Ts=null,ks=0,Qs=0,Ls=xi(0),Ds=0,Is=null,Rs=0,Hs=0,Ps=0,Ns=null,Os=null,Vs=0,zs=1/0,Gs=null,Ks=!1,Ws=null,js=null,Xs=!1,qs=null,Ys=0,Js=0,Zs=null,$s=-1,el=0;function tl(){return 0!==(6&Ms)?Je():-1!==$s?$s:$s=Je()}function nl(e){return 0===(1&e.mode)?1:0!==(2&Ms)&&0!==ks?ks&-ks:null!==pa.transition?(0===el&&(el=pt()),el):0!==(e=yt)?e:e=void 0===(e=window.event)?16:Yt(e.type)}function rl(e,t,n,r){if(50<Js)throw Js=0,Zs=null,Error(a(185));mt(e,n,r),0!==(2&Ms)&&e===Fs||(e===Fs&&(0===(2&Ms)&&(Hs|=n),4===Ds&&sl(e,ks)),il(e,r),1===n&&0===Ms&&0===(1&t.mode)&&(zs=Je()+500,Pi&&Vi()))}function il(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var A=31-At(a),o=1<<A,s=i[A];-1===s?0!==(o&n)&&0===(o&r)||(i[A]=ht(o,t)):s<=t&&(e.expiredLanes|=o),a&=~o}}(e,t);var r=dt(e,e===Fs?ks:0);if(0===r)null!==n&&Xe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Xe(n),1===t)0===e.tag?function(e){Pi=!0,Oi(e)}(ll.bind(null,e)):Oi(ll.bind(null,e)),Ai((function(){0===(6&Ms)&&Vi()})),n=null;else{switch(wt(r)){case 1:n=$e;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Fl(n,al.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function al(e,t){if($s=-1,el=0,0!==(6&Ms))throw Error(a(327));var n=e.callbackNode;if(bl()&&e.callbackNode!==n)return null;var r=dt(e,e===Fs?ks:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=ml(e,r);else{t=r;var i=Ms;Ms|=2;var A=pl();for(Fs===e&&ks===t||(Gs=null,zs=Je()+500,hl(e,t));;)try{yl();break}catch(s){fl(e,s)}Ba(),Ss.current=A,Ms=i,null!==Ts?t=0:(Fs=null,ks=0,t=Ds)}if(0!==t){if(2===t&&(0!==(i=ft(e))&&(r=i,t=Al(e,i))),1===t)throw n=Is,hl(e,0),sl(e,r),il(e,Je()),n;if(6===t)sl(e,r);else{if(i=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!or(a(),i))return!1}catch(o){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=ml(e,r))&&(0!==(A=ft(e))&&(r=A,t=Al(e,A))),1===t))throw n=Is,hl(e,0),sl(e,r),il(e,Je()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:_l(e,Os,Gs);break;case 3:if(sl(e,r),(130023424&r)===r&&10<(t=Vs+500-Je())){if(0!==dt(e,0))break;if(((i=e.suspendedLanes)&r)!==r){tl(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(_l.bind(null,e,Os,Gs),t);break}_l(e,Os,Gs);break;case 4:if(sl(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-At(r);A=1<<o,(o=t[o])>i&&(i=o),r&=~A}if(r=i,10<(r=(120>(r=Je()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cs(r/1960))-r)){e.timeoutHandle=ri(_l.bind(null,e,Os,Gs),r);break}_l(e,Os,Gs);break;default:throw Error(a(329))}}}return il(e,Je()),e.callbackNode===n?al.bind(null,e):null}function Al(e,t){var n=Ns;return e.current.memoizedState.isDehydrated&&(hl(e,t).flags|=256),2!==(e=ml(e,t))&&(t=Os,Os=n,null!==t&&ol(t)),e}function ol(e){null===Os?Os=e:Os.push.apply(Os,e)}function sl(e,t){for(t&=~Ps,t&=~Hs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-At(t),r=1<<n;e[n]=-1,t&=~r}}function ll(e){if(0!==(6&Ms))throw Error(a(327));bl();var t=dt(e,0);if(0===(1&t))return il(e,Je()),null;var n=ml(e,t);if(0!==e.tag&&2===n){var r=ft(e);0!==r&&(t=r,n=Al(e,r))}if(1===n)throw n=Is,hl(e,0),sl(e,t),il(e,Je()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,_l(e,Os,Gs),il(e,Je()),null}function ul(e,t){var n=Ms;Ms|=1;try{return e(t)}finally{0===(Ms=n)&&(zs=Je()+500,Pi&&Vi())}}function cl(e){null!==qs&&0===qs.tag&&0===(6&Ms)&&bl();var t=Ms;Ms|=1;var n=Us.transition,r=yt;try{if(Us.transition=null,yt=1,e)return e()}finally{yt=r,Us.transition=n,0===(6&(Ms=t))&&Vi()}}function dl(){Qs=Ls.current,Ci(Ls)}function hl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Ts)for(n=Ts.return;null!==n;){var r=n;switch(ta(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Qi();break;case 3:iA(),Ci(Mi),Ci(Ui),uA();break;case 5:AA(r);break;case 4:iA();break;case 13:case 19:Ci(oA);break;case 10:_a(r.type._context);break;case 22:case 23:dl()}n=n.return}if(Fs=e,Ts=e=Ll(e.current,null),ks=Qs=t,Ds=0,Is=null,Ps=Hs=Rs=0,Os=Ns=null,null!==Sa){for(t=0;t<Sa.length;t++)if(null!==(r=(n=Sa[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var A=a.next;a.next=i,r.next=A}n.pending=r}Sa=null}return e}function fl(e,t){for(;;){var n=Ts;try{if(Ba(),cA.current=ao,mA){for(var r=fA.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}mA=!1}if(hA=0,gA=pA=fA=null,vA=!1,yA=0,Es.current=null,null===n||null===n.return){Ds=1,Is=t,Ts=null;break}e:{var A=e,o=n.return,s=n,l=t;if(t=ks,s.flags|=32768,null!==l&&"object"===typeof l&&"function"===typeof l.then){var u=l,c=s,d=c.tag;if(0===(1&c.mode)&&(0===d||11===d||15===d)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var f=mo(o);if(null!==f){f.flags&=-257,vo(f,o,s,0,t),1&f.mode&&go(A,u,t),l=u;var p=(t=f).updateQueue;if(null===p){var g=new Set;g.add(l),t.updateQueue=g}else p.add(l);break e}if(0===(1&t)){go(A,u,t),gl();break e}l=Error(a(426))}else if(ia&&1&s.mode){var m=mo(o);if(null!==m){0===(65536&m.flags)&&(m.flags|=256),vo(m,o,s,0,t),fa(lo(l,s));break e}}A=l=lo(l,s),4!==Ds&&(Ds=2),null===Ns?Ns=[A]:Ns.push(A),A=o;do{switch(A.tag){case 3:A.flags|=65536,t&=-t,A.lanes|=t,Ia(A,fo(0,l,t));break e;case 1:s=l;var v=A.type,y=A.stateNode;if(0===(128&A.flags)&&("function"===typeof v.getDerivedStateFromError||null!==y&&"function"===typeof y.componentDidCatch&&(null===js||!js.has(y)))){A.flags|=65536,t&=-t,A.lanes|=t,Ia(A,po(A,s,t));break e}}A=A.return}while(null!==A)}Bl(n)}catch(w){t=w,Ts===n&&null!==n&&(Ts=n=n.return);continue}break}}function pl(){var e=Ss.current;return Ss.current=ao,null===e?ao:e}function gl(){0!==Ds&&3!==Ds&&2!==Ds||(Ds=4),null===Fs||0===(268435455&Rs)&&0===(268435455&Hs)||sl(Fs,ks)}function ml(e,t){var n=Ms;Ms|=2;var r=pl();for(Fs===e&&ks===t||(Gs=null,hl(e,t));;)try{vl();break}catch(i){fl(e,i)}if(Ba(),Ms=n,Ss.current=r,null!==Ts)throw Error(a(261));return Fs=null,ks=0,Ds}function vl(){for(;null!==Ts;)wl(Ts)}function yl(){for(;null!==Ts&&!qe();)wl(Ts)}function wl(e){var t=xs(e.alternate,e,Qs);e.memoizedProps=e.pendingProps,null===t?Bl(e):Ts=t,Es.current=null}function Bl(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Xo(n,t,Qs)))return void(Ts=n)}else{if(null!==(n=qo(n,t)))return n.flags&=32767,void(Ts=n);if(null===e)return Ds=6,void(Ts=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Ts=t);Ts=t=e}while(null!==t);0===Ds&&(Ds=5)}function _l(e,t,n){var r=yt,i=Us.transition;try{Us.transition=null,yt=1,function(e,t,n,r){do{bl()}while(null!==qs);if(0!==(6&Ms))throw Error(a(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var A=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-At(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,A),e===Fs&&(Ts=Fs=null,ks=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Xs||(Xs=!0,Fl(tt,(function(){return bl(),null}))),A=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||A){A=Us.transition,Us.transition=null;var o=yt;yt=1;var s=Ms;Ms|=4,Es.current=null,function(e,t){if(ei=Gt,hr(e=dr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,A=r.focusNode;r=r.focusOffset;try{n.nodeType,A.nodeType}catch(B){n=null;break e}var o=0,s=-1,l=-1,u=0,c=0,d=e,h=null;t:for(;;){for(var f;d!==n||0!==i&&3!==d.nodeType||(s=o+i),d!==A||0!==r&&3!==d.nodeType||(l=o+r),3===d.nodeType&&(o+=d.nodeValue.length),null!==(f=d.firstChild);)h=d,d=f;for(;;){if(d===e)break t;if(h===n&&++u===i&&(s=o),h===A&&++c===r&&(l=o),null!==(f=d.nextSibling))break;h=(d=h).parentNode}d=f}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Gt=!1,$o=t;null!==$o;)if(e=(t=$o).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,$o=e;else for(;null!==$o;){t=$o;try{var p=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==p){var g=p.memoizedProps,m=p.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:ga(t.type,g),m);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(a(163))}}catch(B){Cl(t,t.return,B)}if(null!==(e=t.sibling)){e.return=t.return,$o=e;break}$o=t.return}p=ns,ns=!1}(e,n),ms(n,e),fr(ti),Gt=!!ei,ti=ei=null,e.current=n,ys(n,e,i),Ye(),Ms=s,yt=o,Us.transition=A}else e.current=n;if(Xs&&(Xs=!1,qs=e,Ys=i),A=e.pendingLanes,0===A&&(js=null),function(e){if(at&&"function"===typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(it,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),il(e,Je()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ks)throw Ks=!1,e=Ws,Ws=null,e;0!==(1&Ys)&&0!==e.tag&&bl(),A=e.pendingLanes,0!==(1&A)?e===Zs?Js++:(Js=0,Zs=e):Js=0,Vi()}(e,t,n,r)}finally{Us.transition=i,yt=r}return null}function bl(){if(null!==qs){var e=wt(Ys),t=Us.transition,n=yt;try{if(Us.transition=null,yt=16>e?16:e,null===qs)var r=!1;else{if(e=qs,qs=null,Ys=0,0!==(6&Ms))throw Error(a(331));var i=Ms;for(Ms|=4,$o=e.current;null!==$o;){var A=$o,o=A.child;if(0!==(16&$o.flags)){var s=A.deletions;if(null!==s){for(var l=0;l<s.length;l++){var u=s[l];for($o=u;null!==$o;){var c=$o;switch(c.tag){case 0:case 11:case 15:rs(8,c,A)}var d=c.child;if(null!==d)d.return=c,$o=d;else for(;null!==$o;){var h=(c=$o).sibling,f=c.return;if(As(c),c===u){$o=null;break}if(null!==h){h.return=f,$o=h;break}$o=f}}}var p=A.alternate;if(null!==p){var g=p.child;if(null!==g){p.child=null;do{var m=g.sibling;g.sibling=null,g=m}while(null!==g)}}$o=A}}if(0!==(2064&A.subtreeFlags)&&null!==o)o.return=A,$o=o;else e:for(;null!==$o;){if(0!==(2048&(A=$o).flags))switch(A.tag){case 0:case 11:case 15:rs(9,A,A.return)}var v=A.sibling;if(null!==v){v.return=A.return,$o=v;break e}$o=A.return}}var y=e.current;for($o=y;null!==$o;){var w=(o=$o).child;if(0!==(2064&o.subtreeFlags)&&null!==w)w.return=o,$o=w;else e:for(o=y;null!==$o;){if(0!==(2048&(s=$o).flags))try{switch(s.tag){case 0:case 11:case 15:is(9,s)}}catch(_){Cl(s,s.return,_)}if(s===o){$o=null;break e}var B=s.sibling;if(null!==B){B.return=s.return,$o=B;break e}$o=s.return}}if(Ms=i,Vi(),at&&"function"===typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(_){}r=!0}return r}finally{yt=n,Us.transition=t}}return!1}function xl(e,t,n){e=La(e,t=fo(0,t=lo(n,t),1),1),t=tl(),null!==e&&(mt(e,1,t),il(e,t))}function Cl(e,t,n){if(3===e.tag)xl(e,e,n);else for(;null!==t;){if(3===t.tag){xl(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===js||!js.has(r))){t=La(t,e=po(t,e=lo(n,e),1),1),e=tl(),null!==t&&(mt(t,1,e),il(t,e));break}}t=t.return}}function Sl(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tl(),e.pingedLanes|=e.suspendedLanes&n,Fs===e&&(ks&n)===n&&(4===Ds||3===Ds&&(130023424&ks)===ks&&500>Je()-Vs?hl(e,0):Ps|=n),il(e,t)}function El(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ut,0===(130023424&(ut<<=1))&&(ut=4194304)));var n=tl();null!==(e=Ma(e,t))&&(mt(e,t,n),il(e,n))}function Ul(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),El(e,n)}function Ml(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),El(e,n)}function Fl(e,t){return je(e,t)}function Tl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kl(e,t,n,r){return new Tl(e,t,n,r)}function Ql(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ll(e,t){var n=e.alternate;return null===n?((n=kl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Dl(e,t,n,r,i,A){var o=2;if(r=e,"function"===typeof e)Ql(e)&&(o=1);else if("string"===typeof e)o=5;else e:switch(e){case b:return Il(n.children,i,A,t);case x:o=8,i|=8;break;case C:return(e=kl(12,n,t,2|i)).elementType=C,e.lanes=A,e;case M:return(e=kl(13,n,t,i)).elementType=M,e.lanes=A,e;case F:return(e=kl(19,n,t,i)).elementType=F,e.lanes=A,e;case Q:return Rl(n,i,A,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case S:o=10;break e;case E:o=9;break e;case U:o=11;break e;case T:o=14;break e;case k:o=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=kl(o,n,t,i)).elementType=e,t.type=r,t.lanes=A,t}function Il(e,t,n,r){return(e=kl(7,e,r,t)).lanes=n,e}function Rl(e,t,n,r){return(e=kl(22,e,r,t)).elementType=Q,e.lanes=n,e.stateNode={isHidden:!1},e}function Hl(e,t,n){return(e=kl(6,e,null,t)).lanes=n,e}function Pl(e,t,n){return(t=kl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Nl(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ol(e,t,n,r,i,a,A,o,s){return e=new Nl(e,t,n,o,s),1===t?(t=1,!0===a&&(t|=8)):t=0,a=kl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ta(a),e}function Vl(e){if(!e)return Ei;e:{if(Ve(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ki(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(ki(n))return Di(e,n,t)}return t}function zl(e,t,n,r,i,a,A,o,s){return(e=Ol(n,r,!0,e,0,a,0,o,s)).context=Vl(null),n=e.current,(a=Qa(r=tl(),i=nl(n))).callback=void 0!==t&&null!==t?t:null,La(n,a,i),e.current.lanes=i,mt(e,i,r),il(e,r),e}function Gl(e,t,n,r){var i=t.current,a=tl(),A=nl(i);return n=Vl(n),null===t.context?t.context=n:t.pendingContext=n,(t=Qa(a,A)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=La(i,t,A))&&(rl(e,i,A,a),Da(e,i,A)),A}function Kl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Wl(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function jl(e,t){Wl(e,t),(e=e.alternate)&&Wl(e,t)}xs=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Mi.current)wo=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return wo=!1,function(e,t,n){switch(t.tag){case 3:Fo(t),ha();break;case 5:aA(t);break;case 1:ki(t.type)&&Ii(t);break;case 4:rA(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Si(ma,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Si(oA,1&oA.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Ho(e,t,n):(Si(oA,1&oA.current),null!==(e=Ko(e,t,n))?e.sibling:null);Si(oA,1&oA.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return zo(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Si(oA,oA.current),r)break;return null;case 22:case 23:return t.lanes=0,Co(e,t,n)}return Ko(e,t,n)}(e,t,n);wo=0!==(131072&e.flags)}else wo=!1,ia&&0!==(1048576&t.flags)&&$i(t,Wi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Go(e,t),e=t.pendingProps;var i=Ti(t,Ui.current);xa(t,n),i=bA(null,t,r,e,i,n);var A=xA();return t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ki(r)?(A=!0,Ii(t)):A=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Ta(t),i.updater=Oa,t.stateNode=i,i._reactInternals=t,Ka(t,r,e,n),t=Mo(null,t,r,!0,A,n)):(t.tag=0,ia&&A&&ea(t),Bo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Go(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"===typeof e)return Ql(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===U)return 11;if(e===T)return 14}return 2}(r),e=ga(r,e),i){case 0:t=Eo(null,t,r,e,n);break e;case 1:t=Uo(null,t,r,e,n);break e;case 11:t=_o(null,t,r,e,n);break e;case 14:t=bo(null,t,r,ga(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Eo(e,t,r,i=t.elementType===r?i:ga(r,i),n);case 1:return r=t.type,i=t.pendingProps,Uo(e,t,r,i=t.elementType===r?i:ga(r,i),n);case 3:e:{if(Fo(t),null===e)throw Error(a(387));r=t.pendingProps,i=(A=t.memoizedState).element,ka(e,t),Ra(t,r,null,n);var o=t.memoizedState;if(r=o.element,A.isDehydrated){if(A={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=A,t.memoizedState=A,256&t.flags){t=To(e,t,r,n,i=lo(Error(a(423)),t));break e}if(r!==i){t=To(e,t,r,n,i=lo(Error(a(424)),t));break e}for(ra=li(t.stateNode.containerInfo.firstChild),na=t,ia=!0,aa=null,n=Ja(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ha(),r===i){t=Ko(e,t,n);break e}Bo(e,t,r,n)}t=t.child}return t;case 5:return aA(t),null===e&&la(t),r=t.type,i=t.pendingProps,A=null!==e?e.memoizedProps:null,o=i.children,ni(r,i)?o=null:null!==A&&ni(r,A)&&(t.flags|=32),So(e,t),Bo(e,t,o,n),t.child;case 6:return null===e&&la(t),null;case 13:return Ho(e,t,n);case 4:return rA(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ya(t,null,r,n):Bo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,_o(e,t,r,i=t.elementType===r?i:ga(r,i),n);case 7:return Bo(e,t,t.pendingProps,n),t.child;case 8:case 12:return Bo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,A=t.memoizedProps,o=i.value,Si(ma,r._currentValue),r._currentValue=o,null!==A)if(or(A.value,o)){if(A.children===i.children&&!Mi.current){t=Ko(e,t,n);break e}}else for(null!==(A=t.child)&&(A.return=t);null!==A;){var s=A.dependencies;if(null!==s){o=A.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===A.tag){(l=Qa(-1,n&-n)).tag=2;var u=A.updateQueue;if(null!==u){var c=(u=u.shared).pending;null===c?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}A.lanes|=n,null!==(l=A.alternate)&&(l.lanes|=n),ba(A.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===A.tag)o=A.type===t.type?null:A.child;else if(18===A.tag){if(null===(o=A.return))throw Error(a(341));o.lanes|=n,null!==(s=o.alternate)&&(s.lanes|=n),ba(o,n,t),o=A.sibling}else o=A.child;if(null!==o)o.return=A;else for(o=A;null!==o;){if(o===t){o=null;break}if(null!==(A=o.sibling)){A.return=o.return,o=A;break}o=o.return}A=o}Bo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,xa(t,n),r=r(i=Ca(i)),t.flags|=1,Bo(e,t,r,n),t.child;case 14:return i=ga(r=t.type,t.pendingProps),bo(e,t,r,i=ga(r.type,i),n);case 15:return xo(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ga(r,i),Go(e,t),t.tag=1,ki(r)?(e=!0,Ii(t)):e=!1,xa(t,n),za(t,r,i),Ka(t,r,i,n),Mo(null,t,r,!0,e,n);case 19:return zo(e,t,n);case 22:return Co(e,t,n)}throw Error(a(156,t.tag))};var Xl="function"===typeof reportError?reportError:function(e){console.error(e)};function ql(e){this._internalRoot=e}function Yl(e){this._internalRoot=e}function Jl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Zl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function $l(){}function eu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var A=a;if("function"===typeof i){var o=i;i=function(){var e=Kl(A);o.call(e)}}Gl(t,A,e,i)}else A=function(e,t,n,r,i){if(i){if("function"===typeof r){var a=r;r=function(){var e=Kl(A);a.call(e)}}var A=zl(t,r,e,0,null,!1,0,"",$l);return e._reactRootContainer=A,e[fi]=A.current,Vr(8===e.nodeType?e.parentNode:e),cl(),A}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof r){var o=r;r=function(){var e=Kl(s);o.call(e)}}var s=Ol(e,0,!1,null,0,!1,0,"",$l);return e._reactRootContainer=s,e[fi]=s.current,Vr(8===e.nodeType?e.parentNode:e),cl((function(){Gl(t,s,n,r)})),s}(n,t,e,i,r);return Kl(A)}Yl.prototype.render=ql.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Gl(e,t,null,null)},Yl.prototype.unmount=ql.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cl((function(){Gl(null,e,null,null)})),t[fi]=null}},Yl.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qt.length&&0!==t&&t<Qt[n].priority;n++);Qt.splice(n,0,e),0===n&&Rt(e)}},Bt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ct(t.pendingLanes);0!==n&&(vt(t,1|n),il(t,Je()),0===(6&Ms)&&(zs=Je()+500,Vi()))}break;case 13:cl((function(){var t=Ma(e,1);if(null!==t){var n=tl();rl(t,e,1,n)}})),jl(e,1)}},_t=function(e){if(13===e.tag){var t=Ma(e,134217728);if(null!==t)rl(t,e,134217728,tl());jl(e,134217728)}},bt=function(e){if(13===e.tag){var t=nl(e),n=Ma(e,t);if(null!==n)rl(n,e,t,tl());jl(e,t)}},xt=function(){return yt},Ct=function(e,t){var n=yt;try{return yt=e,t()}finally{yt=n}},_e=function(e,t,n){switch(t){case"input":if(Z(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Bi(r);if(!i)throw Error(a(90));j(r),Z(r,i)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ue=ul,Me=cl;var tu={usingClientEntryPoint:!1,Events:[yi,wi,Bi,Se,Ee,ul]},nu={findFiberByHostInstance:vi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ru={bundleType:nu.bundleType,version:nu.version,rendererPackageName:nu.rendererPackageName,rendererConfig:nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ke(e))?null:e.stateNode},findFiberByHostInstance:nu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var iu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!iu.isDisabled&&iu.supportsFiber)try{it=iu.inject(ru),at=iu}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Jl(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:_,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Jl(e))throw Error(a(299));var n=!1,r="",i=Xl;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Ol(e,1,!1,null,0,n,0,r,i),e[fi]=t.current,Vr(8===e.nodeType?e.parentNode:e),new ql(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=null===(e=Ke(t))?null:e.stateNode},t.flushSync=function(e){return cl(e)},t.hydrate=function(e,t,n){if(!Zl(t))throw Error(a(200));return eu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Jl(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,i=!1,A="",o=Xl;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(A=n.identifierPrefix),void 0!==n.onRecoverableError&&(o=n.onRecoverableError)),t=zl(t,null,e,1,null!=n?n:null,i,0,A,o),e[fi]=t.current,Vr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Yl(t)},t.render=function(e,t,n){if(!Zl(t))throw Error(a(200));return eu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Zl(e))throw Error(a(40));return!!e._reactRootContainer&&(cl((function(){eu(null,null,e,!1,(function(){e._reactRootContainer=null,e[fi]=null}))})),!0)},t.unstable_batchedUpdates=ul,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Zl(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return eu(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},250:function(e,t,n){"use strict";var r=n(164);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},164:function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(463)},374:function(e,t,n){"use strict";var r=n(791),i=Symbol.for("react.element"),a=Symbol.for("react.fragment"),A=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,a={},l=null,u=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)A.call(t,r)&&!s.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:i,type:e,key:l,ref:u,props:a,_owner:o.current}}t.Fragment=a,t.jsx=l,t.jsxs=l},117:function(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,g={};function m(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}function v(){}function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=m.prototype;var w=y.prototype=new v;w.constructor=y,p(w,m.prototype),w.isPureReactComponent=!0;var B=Array.isArray,_=Object.prototype.hasOwnProperty,b={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,r){var i,a={},A=null,o=null;if(null!=t)for(i in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(A=""+t.key),t)_.call(t,i)&&!x.hasOwnProperty(i)&&(a[i]=t[i]);var s=arguments.length-2;if(1===s)a.children=r;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in s=e.defaultProps)void 0===a[i]&&(a[i]=s[i]);return{$$typeof:n,type:e,key:A,ref:o,props:a,_owner:b.current}}function S(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var E=/\/+/g;function U(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function M(e,t,i,a,A){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var s=!1;if(null===e)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case n:case r:s=!0}}if(s)return A=A(s=e),e=""===a?"."+U(s,0):a,B(A)?(i="",null!=e&&(i=e.replace(E,"$&/")+"/"),M(A,t,i,"",(function(e){return e}))):null!=A&&(S(A)&&(A=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(A,i+(!A.key||s&&s.key===A.key?"":(""+A.key).replace(E,"$&/")+"/")+e)),t.push(A)),1;if(s=0,a=""===a?".":a+":",B(e))for(var l=0;l<e.length;l++){var u=a+U(o=e[l],l);s+=M(o,t,i,u,A)}else if(u=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"===typeof u)for(e=u.call(e),l=0;!(o=e.next()).done;)s+=M(o=o.value,t,i,u=a+U(o,l++),A);else if("object"===o)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function F(e,t,n){if(null==e)return e;var r=[],i=0;return M(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function T(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var k={current:null},Q={transition:null},L={ReactCurrentDispatcher:k,ReactCurrentBatchConfig:Q,ReactCurrentOwner:b};t.Children={map:F,forEach:function(e,t,n){F(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return F(e,(function(){t++})),t},toArray:function(e){return F(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=m,t.Fragment=i,t.Profiler=A,t.PureComponent=y,t.StrictMode=a,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=p({},e.props),a=e.key,A=e.ref,o=e._owner;if(null!=t){if(void 0!==t.ref&&(A=t.ref,o=b.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)_.call(t,l)&&!x.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==s?s[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];i.children=s}return{$$typeof:n,type:e.type,key:a,ref:A,props:i,_owner:o}},t.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},t.createElement=C,t.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:T}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=Q.transition;Q.transition={};try{e()}finally{Q.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return k.current.useCallback(e,t)},t.useContext=function(e){return k.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return k.current.useDeferredValue(e)},t.useEffect=function(e,t){return k.current.useEffect(e,t)},t.useId=function(){return k.current.useId()},t.useImperativeHandle=function(e,t,n){return k.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return k.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return k.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return k.current.useMemo(e,t)},t.useReducer=function(e,t,n){return k.current.useReducer(e,t,n)},t.useRef=function(e){return k.current.useRef(e)},t.useState=function(e){return k.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return k.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return k.current.useTransition()},t.version="18.2.0"},791:function(e,t,n){"use strict";e.exports=n(117)},184:function(e,t,n){"use strict";e.exports=n(374)},813:function(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,A=i>>>1;r<A;){var o=2*(r+1)-1,s=e[o],l=o+1,u=e[l];if(0>a(s,n))l<i&&0>a(u,s)?(e[r]=u,e[l]=n,r=l):(e[r]=s,e[o]=n,r=o);else{if(!(l<i&&0>a(u,n)))break e;e[r]=u,e[l]=n,r=l}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var A=performance;t.unstable_now=function(){return A.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,d=null,h=3,f=!1,p=!1,g=!1,m="function"===typeof setTimeout?setTimeout:null,v="function"===typeof clearTimeout?clearTimeout:null,y="undefined"!==typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(l,t)}t=r(u)}}function B(e){if(g=!1,w(e),!p)if(null!==r(l))p=!0,Q(_);else{var t=r(u);null!==t&&L(B,t.startTime-e)}}function _(e,n){p=!1,g&&(g=!1,v(S),S=-1),f=!0;var a=h;try{for(w(n),d=r(l);null!==d&&(!(d.expirationTime>n)||e&&!M());){var A=d.callback;if("function"===typeof A){d.callback=null,h=d.priorityLevel;var o=A(d.expirationTime<=n);n=t.unstable_now(),"function"===typeof o?d.callback=o:d===r(l)&&i(l),w(n)}else i(l);d=r(l)}if(null!==d)var s=!0;else{var c=r(u);null!==c&&L(B,c.startTime-n),s=!1}return s}finally{d=null,h=a,f=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var b,x=!1,C=null,S=-1,E=5,U=-1;function M(){return!(t.unstable_now()-U<E)}function F(){if(null!==C){var e=t.unstable_now();U=e;var n=!0;try{n=C(!0,e)}finally{n?b():(x=!1,C=null)}}else x=!1}if("function"===typeof y)b=function(){y(F)};else if("undefined"!==typeof MessageChannel){var T=new MessageChannel,k=T.port2;T.port1.onmessage=F,b=function(){k.postMessage(null)}}else b=function(){m(F,0)};function Q(e){C=e,x||(x=!0,b())}function L(e,n){S=m((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){p||f||(p=!0,Q(_))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},t.unstable_scheduleCallback=function(e,i,a){var A=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?A+a:A:a=A,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return e={id:c++,callback:i,priorityLevel:e,startTime:a,expirationTime:o=a+o,sortIndex:-1},a>A?(e.sortIndex=a,n(u,e),null===r(l)&&e===r(u)&&(g?(v(S),S=-1):g=!0,L(B,a-A))):(e.sortIndex=o,n(l,e),p||f||(p=!0,Q(_))),e},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},296:function(e,t,n){"use strict";e.exports=n(813)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var a=Object.create(null);n.r(a);var A={};e=e||[null,t({}),t([]),t(t)];for(var o=2&i&&r;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((function(e){A[e]=function(){return r[e]}}));return A.default=function(){return r},n.d(a,A),a}}(),n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",function(){"use strict";var e={};n.r(e),n.d(e,{Decoder:function(){return yh},Encoder:function(){return mh},PacketType:function(){return fh},protocol:function(){return gh}});var t,r,i,a,A,o=n(791),s=n.t(o,2),l=n(250);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(){c=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},A=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,A=Object.create(a.prototype),o=new k(r||[]);return i(A,"_invoke",{value:U(e,n,o)}),A}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var f="suspendedStart",p="suspendedYield",g="executing",m="completed",v={};function y(){}function w(){}function B(){}var _={};l(_,A,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(Q([])));x&&x!==n&&r.call(x,A)&&(_=x);var C=B.prototype=y.prototype=Object.create(_);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(i,a,A,o){var s=h(e[i],e,a);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==u(c)&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,A,o)}),(function(e){n("throw",e,A,o)})):t.resolve(c).then((function(e){l.value=e,A(l)}),(function(e){return n("throw",e,A,o)}))}o(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return a=a?a.then(i,i):i()}})}function U(t,n,r){var i=f;return function(a,A){if(i===g)throw new Error("Generator is already running");if(i===m){if("throw"===a)throw A;return{value:e,done:!0}}for(r.method=a,r.arg=A;;){var o=r.delegate;if(o){var s=M(o,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var l=h(t,n,r);if("normal"===l.type){if(i=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=m,r.method="throw",r.arg=l.arg)}}}function M(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=h(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var A=a.arg;return A?A.done?(n[t.resultName]=A.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):A:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function F(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(F,this),this.reset(!0)}function Q(t){if(t||""===t){var n=t[A];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(u(t)+" is not iterable")}return w.prototype=B,i(C,"constructor",{value:B,configurable:!0}),i(B,"constructor",{value:w,configurable:!0}),w.displayName=l(B,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,B):(e.__proto__=B,l(e,s,"GeneratorFunction")),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},S(E.prototype),l(E.prototype,o,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var A=new E(d(e,n,r,i),a);return t.isGeneratorFunction(n)?A:A.next().then((function(e){return e.done?e.value:A.next()}))},S(C),l(C,s,"Generator"),l(C,A,(function(){return this})),l(C,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=Q,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return o.type="throw",o.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var A=this.tryEntries[a],o=A.completion;if("root"===A.tryLoc)return i("end");if(A.tryLoc<=this.prev){var s=r.call(A,"catchLoc"),l=r.call(A,"finallyLoc");if(s&&l){if(this.prev<A.catchLoc)return i(A.catchLoc,!0);if(this.prev<A.finallyLoc)return i(A.finallyLoc)}else if(s){if(this.prev<A.catchLoc)return i(A.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return i(A.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var A=a?a.completion:{};return A.type=e,A.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(A)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:Q(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function d(e,t,n,r,i,a,A){try{var o=e[a](A),s=o.value}catch(l){return void n(l)}o.done?t(s):Promise.resolve(s).then(r,i)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function A(e){d(a,r,i,A,o,"next",e)}function o(e){d(a,r,i,A,o,"throw",e)}A(void 0)}))}}function f(e){if(Array.isArray(e))return e}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){if(e){if("string"===typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function m(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e,t){return f(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,A,o=[],s=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);s=!0);}catch(e){l=!0,i=e}finally{try{if(!s&&null!=n.return&&(A=n.return(),Object(A)!==A))return}finally{if(l)throw i}}return o}}(e,t)||g(e,t)||m()}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e){var t=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===u(t)?t:String(t)}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,w(r.key),r)}}function _(e,t,n){return t&&B(e.prototype,t),n&&B(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function x(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function S(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U(e){var t=S();return function(){var n,r=C(e);if(t){var i=C(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}(this,n)}}function M(e,t,n){return(t=w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(e,t,n){return F=S()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&b(i,n.prototype),i},F.apply(null,arguments)}function T(e){var t="function"===typeof Map?new Map:void 0;return T=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return F(e,arguments,C(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),b(r,e)},T(e)}function k(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Q(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=g(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,A=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return A=e.done,e},e:function(e){o=!0,a=e},f:function(){try{A||null==n.return||n.return()}finally{if(o)throw a}}}}function L(e){return function(e){if(Array.isArray(e))return p(e)}(e)||k(e)||g(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(A||(A={}));var I,R="popstate";function H(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function P(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function N(e,t){return{usr:e.state,key:e.key,idx:t}}function O(e,t,n,r){return void 0===n&&(n=null),D({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?z(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function V(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,a=e.hash,A=void 0===a?"":a;return i&&"?"!==i&&(n+="?"===i.charAt(0)?i:"?"+i),A&&"#"!==A&&(n+="#"===A.charAt(0)?A:"#"+A),n}function z(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function G(e,t,n,r){void 0===r&&(r={});var i=r,a=i.window,o=void 0===a?document.defaultView:a,s=i.v5Compat,l=void 0!==s&&s,u=o.history,c=A.Pop,d=null,h=f();function f(){return(u.state||{idx:null}).idx}function p(){c=A.Pop;var e=f(),t=null==e?null:e-h;h=e,d&&d({action:c,location:m.location,delta:t})}function g(e){var t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"===typeof e?e:V(e);return H(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==h&&(h=0,u.replaceState(D({},u.state,{idx:h}),""));var m={get action(){return c},get location(){return e(o,u)},listen:function(e){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(R,p),d=e,function(){o.removeEventListener(R,p),d=null}},createHref:function(e){return t(o,e)},createURL:g,encodeLocation:function(e){var t=g(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=A.Push;var r=O(m.location,e,t);n&&n(r,e);var i=N(r,h=f()+1),a=m.createHref(r);try{u.pushState(i,"",a)}catch(s){if(s instanceof DOMException&&"DataCloneError"===s.name)throw s;o.location.assign(a)}l&&d&&d({action:c,location:m.location,delta:1})},replace:function(e,t){c=A.Replace;var r=O(m.location,e,t);n&&n(r,e);var i=N(r,h=f()),a=m.createHref(r);u.replaceState(i,"",a),l&&d&&d({action:c,location:m.location,delta:0})},go:function(e){return u.go(e)}};return m}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(I||(I={}));var K=new Set(["lazy","caseSensitive","path","id","index","children"]);function W(e,t,n,r){return void 0===n&&(n=[]),void 0===r&&(r={}),e.map((function(e,i){var a=[].concat(L(n),[i]),A="string"===typeof e.id?e.id:a.join("-");if(H(!0!==e.index||!e.children,"Cannot specify children on an index route"),H(!r[A],'Found a route id collision on id "'+A+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){var o=D({},e,t(e),{id:A});return r[A]=o,o}var s=D({},e,t(e),{id:A,children:void 0});return r[A]=s,e.children&&(s.children=W(e.children,t,a,r)),s}))}function j(e,t,n){void 0===n&&(n="/");var r=oe(("string"===typeof t?z(t):t).pathname||"/",n);if(null==r)return null;var i=X(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var a=null,A=0;null==a&&A<i.length;++A)a=ie(i[A],Ae(r));return a}function X(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");var i=function(e,i,a){var A={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};A.relativePath.startsWith("/")&&(H(A.relativePath.startsWith(r),'Absolute route path "'+A.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),A.relativePath=A.relativePath.slice(r.length));var o=ce([r,A.relativePath]),s=n.concat(A);e.children&&e.children.length>0&&(H(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),X(e.children,t,s,o)),(null!=e.path||e.index)&&t.push({path:o,score:re(o,e.index),routesMeta:s})};return e.forEach((function(e,t){var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?")){var r,a=Q(q(e.path));try{for(a.s();!(r=a.n()).done;){var A=r.value;i(e,t,A)}}catch(o){a.e(o)}finally{a.f()}}else i(e,t)})),t}function q(e){var t=e.split("/");if(0===t.length)return[];var n,r=f(n=t)||k(n)||g(n)||m(),i=r[0],a=r.slice(1),A=i.endsWith("?"),o=i.replace(/\?$/,"");if(0===a.length)return A?[o,""]:[o];var s=q(a.join("/")),l=[];return l.push.apply(l,L(s.map((function(e){return""===e?o:[o,e].join("/")})))),A&&l.push.apply(l,L(s)),l.map((function(t){return e.startsWith("/")&&""===t?"/":t}))}var Y=/^:\w+$/,J=3,Z=2,$=1,ee=10,te=-2,ne=function(e){return"*"===e};function re(e,t){var n=e.split("/"),r=n.length;return n.some(ne)&&(r+=te),t&&(r+=Z),n.filter((function(e){return!ne(e)})).reduce((function(e,t){return e+(Y.test(t)?J:""===t?$:ee)}),r)}function ie(e,t){for(var n=e.routesMeta,r={},i="/",a=[],A=0;A<n.length;++A){var o=n[A],s=A===n.length-1,l="/"===i?t:t.slice(i.length)||"/",u=ae({path:o.relativePath,caseSensitive:o.caseSensitive,end:s},l);if(!u)return null;Object.assign(r,u.params);var c=o.route;a.push({params:r,pathname:ce([i,u.pathname]),pathnameBase:de(ce([i,u.pathnameBase])),route:c}),"/"!==u.pathnameBase&&(i=ce([i,u.pathnameBase]))}return a}function ae(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});var n=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);P("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');var r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(function(e,t){return r.push(t),"/([^\\/]+)"}));e.endsWith("*")?(r.push("*"),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");var a=new RegExp(i,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),r=v(n,2),i=r[0],a=r[1],A=t.match(i);if(!A)return null;var o=A[0],s=o.replace(/(.)\/+$/,"$1"),l=A.slice(1),u=a.reduce((function(e,t,n){if("*"===t){var r=l[n]||"";s=o.slice(0,o.length-r.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return P(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(l[n]||"",t),e}),{});return{params:u,pathname:o,pathnameBase:s,pattern:e}}function Ae(e){try{return decodeURI(e)}catch(t){return P(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function oe(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function se(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function le(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function ue(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=z(e):(H(!(i=D({},e)).pathname||!i.pathname.includes("?"),se("?","pathname","search",i)),H(!i.pathname||!i.pathname.includes("#"),se("#","pathname","hash",i)),H(!i.search||!i.search.includes("#"),se("#","search","hash",i)));var a,A=""===e||""===i.pathname,o=A?"/":i.pathname;if(r||null==o)a=n;else{var s=t.length-1;if(o.startsWith("..")){for(var l=o.split("/");".."===l[0];)l.shift(),s-=1;i.pathname=l.join("/")}a=s>=0?t[s]:"/"}var u=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?z(e):e,r=n.pathname,i=n.search,a=void 0===i?"":i,A=n.hash,o=void 0===A?"":A,s=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:s,search:he(a),hash:fe(o)}}(i,a),c=o&&"/"!==o&&o.endsWith("/"),d=(A||"."===o)&&n.endsWith("/");return u.pathname.endsWith("/")||!c&&!d||(u.pathname+="/"),u}var ce=function(e){return e.join("/").replace(/\/\/+/g,"/")},de=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},he=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},fe=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},pe=function(e){x(n,e);var t=U(n);function n(){return y(this,n),t.apply(this,arguments)}return _(n)}(T(Error));var ge=_((function e(t,n,r,i){y(this,e),void 0===i&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}));function me(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}var ve=["post","put","patch","delete"],ye=new Set(ve),we=["get"].concat(ve),Be=new Set(we),_e=new Set([301,302,303,307,308]),be=new Set([307,308]),xe={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ce={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Se={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ee=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ue=function(e){return{hasErrorBoundary:Boolean(e.hasErrorBoundary)}};function Me(e){var t,n,r,i,a,o,s,l,u,d=e.window?e.window:"undefined"!==typeof window?window:void 0,f="undefined"!==typeof d&&"undefined"!==typeof d.document&&"undefined"!==typeof d.document.createElement,p=!f;if(H(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)u=e.mapRouteProperties;else if(e.detectErrorBoundary){var g=e.detectErrorBoundary;u=function(e){return{hasErrorBoundary:g(e)}}}else u=Ue;var m,y={},w=W(e.routes,u,void 0,y),B=e.basename||"/",_=D({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),b=null,x=new Set,C=null,S=null,E=null,U=null!=e.hydrationData,F=j(w,e.history.location,B),T=null;if(null==F){var k=We(404,{pathname:e.history.location.pathname}),R=Ke(w);F=R.matches,T=M({},R.route.id,k)}var N,V,z=!F.some((function(e){return e.route.lazy}))&&(!F.some((function(e){return e.route.loader}))||null!=e.hydrationData),G={historyAction:e.history.action,location:e.history.location,matches:F,initialized:z,navigation:xe,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||T,fetchers:new Map,blockers:new Map},K=A.Pop,X=!1,q=!1,Y=!1,J=[],Z=[],$=new Map,ee=0,te=-1,ne=new Map,re=new Set,ie=new Map,ae=new Map,Ae=new Map,se=!1;function le(e){G=D({},G,e),x.forEach((function(e){return e(G)}))}function ue(t,n){var r,i,a,o=null!=G.actionData&&null!=G.navigation.formMethod&&nt(G.navigation.formMethod)&&"loading"===G.navigation.state&&!0!==(null==(r=t.state)?void 0:r._isRedirect);a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:o?G.actionData:null;var s=n.loaderData?ze(G.loaderData,n.loaderData,n.matches||[],n.errors):G.loaderData,l=G.blockers;l.size>0&&(l=new Map(l)).forEach((function(e,t){return l.set(t,Se)}));var u=!0===X||null!=G.navigation.formMethod&&nt(G.navigation.formMethod)&&!0!==(null==(i=t.state)?void 0:i._isRedirect);m&&(w=m,m=void 0),q||K===A.Pop||(K===A.Push?e.history.push(t,t.state):K===A.Replace&&e.history.replace(t,t.state)),le(D({},n,{actionData:a,loaderData:s,historyAction:K,location:t,initialized:!0,navigation:xe,revalidation:"idle",restoreScrollPosition:Oe(t,n.matches||G.matches),preventScrollReset:u,blockers:l})),K=A.Pop,X=!1,q=!1,Y=!1,J=[],Z=[]}function ce(t,r,i){return(n=n||h(c().mark((function t(n,r,i){var a,A,o,s,l,u,d,h,f,p,g,v,y,_,b;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(V&&V.abort(),V=null,K=n,q=!0===(i&&i.startUninterruptedRevalidation),Ne(G.location,G.matches),X=!0===(i&&i.preventScrollReset),a=m||w,A=i&&i.overrideNavigation,o=j(a,r,B)){t.next=15;break}return s=We(404,{pathname:r.pathname}),l=Ke(a),u=l.matches,d=l.route,Ie(),ue(r,{matches:u,loaderData:{},errors:M({},d.id,s)}),t.abrupt("return");case 15:if(!G.initialized||Y||!qe(G.location,r)||i&&i.submission&&nt(i.submission.formMethod)){t.next=18;break}return ue(r,{matches:o}),t.abrupt("return");case 18:if(V=new AbortController,h=He(e.history,r,V.signal,i&&i.submission),!i||!i.pendingError){t.next=24;break}p=M({},Ge(o).route.id,i.pendingError),t.next=34;break;case 24:if(!(i&&i.submission&&nt(i.submission.formMethod))){t.next=34;break}return t.next=27,de(h,r,i.submission,o,{replace:i.replace});case 27:if(!(g=t.sent).shortCircuited){t.next=30;break}return t.abrupt("return");case 30:f=g.pendingActionData,p=g.pendingActionError,A=st(r,i.submission),h=new Request(h.url,{signal:h.signal});case 34:return t.next=36,he(h,r,o,A,i&&i.submission,i&&i.fetcherSubmission,i&&i.replace,f,p);case 36:if(v=t.sent,y=v.shortCircuited,_=v.loaderData,b=v.errors,!y){t.next=42;break}return t.abrupt("return");case 42:V=null,ue(r,D({matches:o},f?{actionData:f}:{},{loaderData:_,errors:b}));case 44:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function de(e,t,n,i,a){return(r=r||h(c().mark((function e(t,n,r,i,a){var o,s,l,d;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===a&&(a={}),me(),le({navigation:lt(n,r)}),(s=At(i,n)).route.action||s.route.lazy){e.next=9;break}o={type:I.error,error:We(405,{method:t.method,pathname:n.pathname,routeId:s.route.id})},e.next=14;break;case 9:return e.next=11,Re("action",t,s,i,y,u,B);case 11:if(o=e.sent,!t.signal.aborted){e.next=14;break}return e.abrupt("return",{shortCircuited:!0});case 14:if(!Ze(o)){e.next=19;break}return l=a&&null!=a.replace?a.replace:o.location===G.location.pathname+G.location.search,e.next=18,pe(G,o,{submission:r,replace:l});case 18:return e.abrupt("return",{shortCircuited:!0});case 19:if(!Je(o)){e.next=23;break}return d=Ge(i,s.route.id),!0!==(a&&a.replace)&&(K=A.Push),e.abrupt("return",{pendingActionData:{},pendingActionError:M({},d.route.id,o.error)});case 23:if(!Ye(o)){e.next=25;break}throw We(400,{type:"defer-action"});case 25:return e.abrupt("return",{pendingActionData:M({},s.route.id,o.data)});case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function he(t,n,r,a,A,o,s,l,u){return(i=i||h(c().mark((function t(n,r,i,a,A,o,s,l,u){var d,h,f,p,g,y,_,b,x,C,S,E,U,M,F,T,k,Q,L,I,R,H;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d=a||st(r,A),h=A||o||ot(d),f=m||w,p=Qe(e.history,G,i,h,r,Y,J,Z,ie,re,f,B,l,u),g=v(p,2),y=g[0],_=g[1],Ie((function(e){return!(i&&i.some((function(t){return t.route.id===e})))||y&&y.some((function(t){return t.route.id===e}))})),te=++ee,0!==y.length||0!==_.length){t.next=10;break}return b=_e(),ue(r,D({matches:i,loaderData:{},errors:u||null},l?{actionData:l}:{},b?{fetchers:new Map(G.fetchers)}:{})),t.abrupt("return",{shortCircuited:!0});case 10:return q||(_.forEach((function(e){var t=G.fetchers.get(e.key),n=ut(void 0,t?t.data:void 0);G.fetchers.set(e.key,n)})),x=l||G.actionData,le(D({navigation:d},x?0===Object.keys(x).length?{actionData:null}:{actionData:x}:{},_.length>0?{fetchers:new Map(G.fetchers)}:{}))),_.forEach((function(e){$.has(e.key)&&we(e.key),e.controller&&$.set(e.key,e.controller)})),C=function(){return _.forEach((function(e){return we(e.key)}))},V&&V.signal.addEventListener("abort",C),t.next=16,ge(G.matches,i,y,_,n);case 16:if(S=t.sent,E=S.results,U=S.loaderResults,M=S.fetcherResults,!n.signal.aborted){t.next=22;break}return t.abrupt("return",{shortCircuited:!0});case 22:if(V&&V.signal.removeEventListener("abort",C),_.forEach((function(e){return $.delete(e.key)})),!(F=je(E))){t.next=30;break}return F.idx>=y.length&&(T=_[F.idx-y.length].key,re.add(T)),t.next=29,pe(G,F.result,{replace:s});case 29:return t.abrupt("return",{shortCircuited:!0});case 30:return k=Ve(G,i,y,U,u,_,M,ae),Q=k.loaderData,L=k.errors,ae.forEach((function(e,t){e.subscribe((function(n){(n||e.done)&&ae.delete(t)}))})),I=_e(),R=Me(te),H=I||R||_.length>0,t.abrupt("return",D({loaderData:Q,errors:L},H?{fetchers:new Map(G.fetchers)}:{}));case 36:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function fe(e){return G.fetchers.get(e)||Ce}function pe(t,n,r){return(s=s||h(c().mark((function t(n,r,i){var a,o,s,l,u,h,p,g,m,v,y,w,_,b;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=(a=void 0===i?{}:i).submission,s=a.fetcherSubmission,l=a.replace,r.revalidate&&(Y=!0),H(u=O(n.location,r.location,{_isRedirect:!0}),"Expected a location on the redirect navigation"),!f){t.next=10;break}if(h=!1,r.reloadDocument?h=!0:Ee.test(r.location)&&(p=e.history.createURL(r.location),h=p.origin!==d.location.origin||null==oe(p.pathname,B)),!h){t.next=10;break}return l?d.location.replace(r.location):d.location.assign(r.location),t.abrupt("return");case 10:if(V=null,g=!0===l?A.Replace:A.Push,m=n.navigation,v=m.formMethod,y=m.formAction,w=m.formEncType,!o&&!s&&v&&y&&w&&(o=ot(n.navigation)),_=o||s,!(be.has(r.status)&&_&&nt(_.formMethod))){t.next=20;break}return t.next=18,ce(g,u,{submission:D({},_,{formAction:r.location}),preventScrollReset:X});case 18:t.next=23;break;case 20:return b=st(u,o),t.next=23,ce(g,u,{overrideNavigation:b,fetcherSubmission:s,preventScrollReset:X});case 23:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ge(t,n,r,i,a){return(l=l||h(c().mark((function t(n,r,i,a,A){var o,s,l;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([].concat(L(i.map((function(e){return Re("loader",A,e,r,y,u,B)}))),L(a.map((function(t){return t.matches&&t.match&&t.controller?Re("loader",He(e.history,t.path,t.controller.signal),t.match,t.matches,y,u,B):{type:I.error,error:We(404,{pathname:t.path})}})))));case 2:return o=t.sent,s=o.slice(0,i.length),l=o.slice(i.length),t.next=7,Promise.all([rt(n,i,s,s.map((function(){return A.signal})),!1,G.loaderData),rt(n,a.map((function(e){return e.match})),l,a.map((function(e){return e.controller?e.controller.signal:null})),!0)]);case 7:return t.abrupt("return",{results:o,loaderResults:s,fetcherResults:l});case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function me(){var e;Y=!0,(e=J).push.apply(e,L(Ie())),ie.forEach((function(e,t){$.has(t)&&(Z.push(t),we(t))}))}function ve(e,t,n){var r=Ge(G.matches,t);ye(e),le({errors:M({},r.route.id,n),fetchers:new Map(G.fetchers)})}function ye(e){var t=G.fetchers.get(e);!$.has(e)||t&&"loading"===t.state&&ne.has(e)||we(e),ie.delete(e),ne.delete(e),re.delete(e),G.fetchers.delete(e)}function we(e){var t=$.get(e);H(t,"Expected fetch controller: "+e),t.abort(),$.delete(e)}function Be(e){var t,n=Q(e);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=dt(fe(r).data);G.fetchers.set(r,i)}}catch(a){n.e(a)}finally{n.f()}}function _e(){var e,t=[],n=!1,r=Q(re);try{for(r.s();!(e=r.n()).done;){var i=e.value,a=G.fetchers.get(i);H(a,"Expected fetcher: "+i),"loading"===a.state&&(re.delete(i),t.push(i),n=!0)}}catch(A){r.e(A)}finally{r.f()}return Be(t),n}function Me(e){var t,n=[],r=Q(ne);try{for(r.s();!(t=r.n()).done;){var i=v(t.value,2),a=i[0];if(i[1]<e){var A=G.fetchers.get(a);H(A,"Expected fetcher: "+a),"loading"===A.state&&(we(a),ne.delete(a),n.push(a))}}}catch(o){r.e(o)}finally{r.f()}return Be(n),n.length>0}function ke(e){G.blockers.delete(e),Ae.delete(e)}function Le(e,t){var n=G.blockers.get(e)||Se;H("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state);var r=new Map(G.blockers);r.set(e,t),le({blockers:r})}function De(e){var t=e.currentLocation,n=e.nextLocation,r=e.historyAction;if(0!==Ae.size){Ae.size>1&&P(!1,"A router only supports one blocker at a time");var i=Array.from(Ae.entries()),a=v(i[i.length-1],2),A=a[0],o=a[1],s=G.blockers.get(A);if(!s||"proceeding"!==s.state)return o({currentLocation:t,nextLocation:n,historyAction:r})?A:void 0}}function Ie(e){var t=[];return ae.forEach((function(n,r){e&&!e(r)||(n.cancel(),t.push(r),ae.delete(r))})),t}function Pe(e,t){if(S){var n=S(e,t.map((function(e){return function(e,t){var n=e.route,r=e.pathname,i=e.params;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}(e,G.loaderData)})));return n||e.key}return e.key}function Ne(e,t){if(C&&E){var n=Pe(e,t);C[n]=E()}}function Oe(e,t){if(C){var n=Pe(e,t),r=C[n];if("number"===typeof r)return r}return null}return N={get basename(){return B},get state(){return G},get routes(){return w},initialize:function(){return b=e.history.listen((function(t){var n=t.action,r=t.location,i=t.delta;if(!se){P(0===Ae.size||null!=i,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");var a=De({currentLocation:G.location,nextLocation:r,historyAction:n});return a&&null!=i?(se=!0,e.history.go(-1*i),void Le(a,{state:"blocked",location:r,proceed:function(){Le(a,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),e.history.go(i)},reset:function(){var e=new Map(G.blockers);e.set(a,Se),le({blockers:e})}})):ce(n,r)}se=!1})),G.initialized||ce(A.Pop,G.location),N},subscribe:function(e){return x.add(e),function(){return x.delete(e)}},enableScrollRestoration:function(e,t,n){if(C=e,E=t,S=n||null,!U&&G.navigation===xe){U=!0;var r=Oe(G.location,G.matches);null!=r&&le({restoreScrollPosition:r})}return function(){C=null,E=null,S=null}},navigate:function n(r,i){return(t=t||h(c().mark((function t(r,i){var a,o,s,l,u,d,h,f,p,g,m;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("number"!==typeof r){t.next=3;break}return e.history.go(r),t.abrupt("return");case 3:if(a=Fe(G.location,G.matches,B,_.v7_prependBasename,r,null==i?void 0:i.fromRouteId,null==i?void 0:i.relative),o=Te(_.v7_normalizeFormMethod,!1,a,i),s=o.path,l=o.submission,u=o.error,d=G.location,h=D({},h=O(G.location,s,i&&i.state),e.history.encodeLocation(h)),f=i&&null!=i.replace?i.replace:void 0,p=A.Push,!0===f?p=A.Replace:!1===f||null!=l&&nt(l.formMethod)&&l.formAction===G.location.pathname+G.location.search&&(p=A.Replace),g=i&&"preventScrollReset"in i?!0===i.preventScrollReset:void 0,!(m=De({currentLocation:d,nextLocation:h,historyAction:p}))){t.next=16;break}return Le(m,{state:"blocked",location:h,proceed:function(){Le(m,{state:"proceeding",proceed:void 0,reset:void 0,location:h}),n(r,i)},reset:function(){var e=new Map(G.blockers);e.set(m,Se),le({blockers:e})}}),t.abrupt("return");case 16:return t.next=18,ce(p,h,{submission:l,pendingError:u,preventScrollReset:g,replace:i&&i.replace});case 18:return t.abrupt("return",t.sent);case 19:case"end":return t.stop()}}),t)})))).apply(this,arguments)},fetch:function(t,n,r,i){if(p)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");$.has(t)&&we(t);var A=m||w,s=Fe(G.location,G.matches,B,_.v7_prependBasename,r,n,null==i?void 0:i.relative),l=j(A,s,B);if(l){var d=Te(_.v7_normalizeFormMethod,!0,s,i),f=d.path,g=d.submission,b=d.error;if(b)ve(t,n,b);else{var x=At(l,f);X=!0===(i&&i.preventScrollReset),g&&nt(g.formMethod)?function(t,n,r,i,A,o){(a=a||h(c().mark((function t(n,r,i,a,A,o){var s,l,d,h,f,p,g,_,b,x,C,S,E,U,F,T,k,Q,L,I,R,P,N,O,z,W,X,q,Ae,oe,se;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(me(),ie.delete(n),a.route.action||a.route.lazy){t.next=6;break}return s=We(405,{method:o.formMethod,pathname:i,routeId:r}),ve(n,r,s),t.abrupt("return");case 6:return l=G.fetchers.get(n),d=ct(o,l),G.fetchers.set(n,d),le({fetchers:new Map(G.fetchers)}),h=new AbortController,f=He(e.history,i,h.signal,o),$.set(n,h),p=ee,t.next=16,Re("action",f,a,A,y,u,B);case 16:if(g=t.sent,!f.signal.aborted){t.next=20;break}return $.get(n)===h&&$.delete(n),t.abrupt("return");case 20:if(!Ze(g)){t.next=34;break}if($.delete(n),!(te>p)){t.next=29;break}return _=dt(void 0),G.fetchers.set(n,_),le({fetchers:new Map(G.fetchers)}),t.abrupt("return");case 29:return re.add(n),b=ut(o),G.fetchers.set(n,b),le({fetchers:new Map(G.fetchers)}),t.abrupt("return",pe(G,g,{fetcherSubmission:o}));case 34:if(!Je(g)){t.next=37;break}return ve(n,r,g.error),t.abrupt("return");case 37:if(!Ye(g)){t.next=39;break}throw We(400,{type:"defer-action"});case 39:return x=G.navigation.location||G.location,C=He(e.history,x,h.signal),S=m||w,H(E="idle"!==G.navigation.state?j(S,G.navigation.location,B):G.matches,"Didn't find any matches after fetcher action"),U=++ee,ne.set(n,U),F=ut(o,g.data),G.fetchers.set(n,F),T=Qe(e.history,G,E,o,x,Y,J,Z,ie,re,S,B,M({},a.route.id,g.data),void 0),k=v(T,2),Q=k[0],(L=k[1]).filter((function(e){return e.key!==n})).forEach((function(e){var t=e.key,n=G.fetchers.get(t),r=ut(void 0,n?n.data:void 0);G.fetchers.set(t,r),$.has(t)&&we(t),e.controller&&$.set(t,e.controller)})),le({fetchers:new Map(G.fetchers)}),I=function(){return L.forEach((function(e){return we(e.key)}))},h.signal.addEventListener("abort",I),t.next=55,ge(G.matches,E,Q,L,C);case 55:if(R=t.sent,P=R.results,N=R.loaderResults,O=R.fetcherResults,!h.signal.aborted){t.next=61;break}return t.abrupt("return");case 61:if(h.signal.removeEventListener("abort",I),ne.delete(n),$.delete(n),L.forEach((function(e){return $.delete(e.key)})),!(z=je(P))){t.next=69;break}return z.idx>=Q.length&&(W=L[z.idx-Q.length].key,re.add(W)),t.abrupt("return",pe(G,z.result));case 69:X=Ve(G,G.matches,Q,N,void 0,L,O,ae),q=X.loaderData,Ae=X.errors,G.fetchers.has(n)&&(oe=dt(g.data),G.fetchers.set(n,oe)),se=Me(U),"loading"===G.navigation.state&&U>te?(H(K,"Expected pending action"),V&&V.abort(),ue(G.navigation.location,{matches:E,loaderData:q,errors:Ae,fetchers:new Map(G.fetchers)})):(le(D({errors:Ae,loaderData:ze(G.loaderData,q,E,Ae)},se||L.length>0?{fetchers:new Map(G.fetchers)}:{})),Y=!1);case 73:case"end":return t.stop()}}),t)})))).apply(this,arguments)}(t,n,f,x,l,g):(ie.set(t,{routeId:n,path:f}),function(t,n,r,i,a,A){(o=o||h(c().mark((function t(n,r,i,a,A,o){var s,l,d,h,f,p,g,m,v;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=G.fetchers.get(n),l=ut(o,s?s.data:void 0),G.fetchers.set(n,l),le({fetchers:new Map(G.fetchers)}),d=new AbortController,h=He(e.history,i,d.signal),$.set(n,d),f=ee,t.next=10,Re("loader",h,a,A,y,u,B);case 10:if(!Ye(p=t.sent)){t.next=18;break}return t.next=14,it(p,h.signal,!0);case 14:if(t.t0=t.sent,t.t0){t.next=17;break}t.t0=p;case 17:p=t.t0;case 18:if($.get(n)===d&&$.delete(n),!h.signal.aborted){t.next=21;break}return t.abrupt("return");case 21:if(!Ze(p)){t.next=33;break}if(!(te>f)){t.next=29;break}return g=dt(void 0),G.fetchers.set(n,g),le({fetchers:new Map(G.fetchers)}),t.abrupt("return");case 29:return re.add(n),t.next=32,pe(G,p);case 32:return t.abrupt("return");case 33:if(!Je(p)){t.next=38;break}return m=Ge(G.matches,r),G.fetchers.delete(n),le({fetchers:new Map(G.fetchers),errors:M({},m.route.id,p.error)}),t.abrupt("return");case 38:H(!Ye(p),"Unhandled fetcher deferred data"),v=dt(p.data),G.fetchers.set(n,v),le({fetchers:new Map(G.fetchers)});case 42:case"end":return t.stop()}}),t)})))).apply(this,arguments)}(t,n,f,x,l,g))}}else ve(t,n,We(404,{pathname:s}))},revalidate:function(){me(),le({revalidation:"loading"}),"submitting"!==G.navigation.state&&("idle"!==G.navigation.state?ce(K||G.historyAction,G.navigation.location,{overrideNavigation:G.navigation}):ce(G.historyAction,G.location,{startUninterruptedRevalidation:!0}))},createHref:function(t){return e.history.createHref(t)},encodeLocation:function(t){return e.history.encodeLocation(t)},getFetcher:fe,deleteFetcher:ye,dispose:function(){b&&b(),x.clear(),V&&V.abort(),G.fetchers.forEach((function(e,t){return ye(t)})),G.blockers.forEach((function(e,t){return ke(t)}))},getBlocker:function(e,t){var n=G.blockers.get(e)||Se;return Ae.get(e)!==t&&Ae.set(e,t),n},deleteBlocker:ke,_internalFetchControllers:$,_internalActiveDeferreds:ae,_internalSetRoutes:function(e){m=W(e,u,void 0,y={})}},N}Symbol("deferred");function Fe(e,t,n,r,i,a,A){var o,s;if(null!=a&&"path"!==A){o=[];var l,u=Q(t);try{for(u.s();!(l=u.n()).done;){var c=l.value;if(o.push(c),c.route.id===a){s=c;break}}}catch(h){u.e(h)}finally{u.f()}}else o=t,s=t[t.length-1];var d=ue(i||".",le(o).map((function(e){return e.pathnameBase})),oe(e.pathname,n)||e.pathname,"path"===A);return null==i&&(d.search=e.search,d.hash=e.hash),null!=i&&""!==i&&"."!==i||!s||!s.route.index||at(d.search)||(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&"/"!==n&&(d.pathname="/"===d.pathname?n:ce([n,d.pathname])),V(d)}function Te(e,t,n,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:n};if(r.formMethod&&!tt(r.formMethod))return{path:n,error:We(405,{method:r.formMethod})};var i,a,A=function(){return{path:n,error:We(400,{type:"invalid-body"})}},o=r.formMethod||"get",s=e?o.toUpperCase():o.toLowerCase(),l=Xe(n);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!nt(s))return A();var u="string"===typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((function(e,t){var n=v(t,2);return""+e+n[0]+"="+n[1]+"\n"}),""):String(r.body);return{path:n,submission:{formMethod:s,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:u}}}if("application/json"===r.formEncType){if(!nt(s))return A();try{var c="string"===typeof r.body?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:l,formEncType:r.formEncType,formData:void 0,json:c,text:void 0}}}catch(f){return A()}}}if(H("function"===typeof FormData,"FormData is not available in this environment"),r.formData)i=Pe(r.formData),a=r.formData;else if(r.body instanceof FormData)i=Pe(r.body),a=r.body;else if(r.body instanceof URLSearchParams)a=Ne(i=r.body);else if(null==r.body)i=new URLSearchParams,a=new FormData;else try{a=Ne(i=new URLSearchParams(r.body))}catch(f){return A()}var d={formMethod:s,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:a,json:void 0,text:void 0};if(nt(d.formMethod))return{path:n,submission:d};var h=z(n);return t&&h.search&&at(h.search)&&i.append("index",""),h.search="?"+i,{path:V(h),submission:d}}function ke(e,t){var n=e;if(t){var r=e.findIndex((function(e){return e.route.id===t}));r>=0&&(n=e.slice(0,r))}return n}function Qe(e,t,n,r,i,a,A,o,s,l,u,c,d,h){var f=h?Object.values(h)[0]:d?Object.values(d)[0]:void 0,p=e.createURL(t.location),g=e.createURL(i),m=h?Object.keys(h)[0]:void 0,v=ke(n,m).filter((function(e,n){if(e.route.lazy)return!0;if(null==e.route.loader)return!1;if(function(e,t,n){var r=!t||n.route.id!==t.route.id,i=void 0===e[n.route.id];return r||i}(t.loaderData,t.matches[n],e)||A.some((function(t){return t===e.route.id})))return!0;var i=t.matches[n],o=e;return De(e,D({currentUrl:p,currentParams:i.params,nextUrl:g,nextParams:o.params},r,{actionResult:f,defaultShouldRevalidate:a||p.pathname+p.search===g.pathname+g.search||p.search!==g.search||Le(i,o)}))})),y=[];return s.forEach((function(e,i){if(n.some((function(t){return t.route.id===e.routeId}))){var A=j(u,e.path,c);if(A){var s=t.fetchers.get(i),d=At(A,e.path);!l.has(i)&&(!!o.includes(i)||(s&&"idle"!==s.state&&void 0===s.data?a:De(d,D({currentUrl:p,currentParams:t.matches[t.matches.length-1].params,nextUrl:g,nextParams:n[n.length-1].params},r,{actionResult:f,defaultShouldRevalidate:a}))))&&y.push({key:i,routeId:e.routeId,path:e.path,matches:A,match:d,controller:new AbortController})}else y.push({key:i,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null})}})),[v,y]}function Le(e,t){var n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function De(e,t){if(e.route.shouldRevalidate){var n=e.route.shouldRevalidate(t);if("boolean"===typeof n)return n}return t.defaultShouldRevalidate}function Ie(e,n,r){return(t=t||h(c().mark((function e(t,n,r){var i,a,A,o,s,l;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.lazy){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.lazy();case 4:if(i=e.sent,t.lazy){e.next=7;break}return e.abrupt("return");case 7:for(o in H(a=r[t.id],"No route found in manifest"),A={},i)s=a[o],P(!(l=void 0!==s&&"hasErrorBoundary"!==o),'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+o+'" will be ignored.'),l||K.has(o)||(A[o]=i[o]);Object.assign(a,A),Object.assign(a,D({},n(a),{lazy:void 0}));case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Re(e,t,n,i,a,A,o,s){return(r=r||h(c().mark((function e(t,n,r,i,a,A,o,s){var l,u,d,h,f,p,g,m,v,y,w,B,_,b,x,C,S,E,U;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===s&&(s={}),h=function(e){var t,i=new Promise((function(e,n){return t=n}));return d=function(){return t()},n.signal.addEventListener("abort",d),Promise.race([e({request:n,params:r.params,context:s.requestContext}),i])},e.prev=2,f=r.route[t],!r.route.lazy){e.next=32;break}if(!f){e.next=14;break}return e.next=8,Promise.all([h(f).catch((function(e){p=e})),Ie(r.route,A,a)]);case 8:if(g=e.sent,!p){e.next=11;break}throw p;case 11:u=g[0],e.next=30;break;case 14:return e.next=16,Ie(r.route,A,a);case 16:if(!(f=r.route[t])){e.next=23;break}return e.next=20,h(f);case 20:u=e.sent,e.next=30;break;case 23:if("action"!==t){e.next=29;break}throw m=new URL(n.url),v=m.pathname+m.search,We(405,{method:n.method,pathname:v,routeId:r.route.id});case 29:return e.abrupt("return",{type:I.data,data:void 0});case 30:e.next=41;break;case 32:if(f){e.next=38;break}throw y=new URL(n.url),We(404,{pathname:y.pathname+y.search});case 38:return e.next=40,h(f);case 40:u=e.sent;case 41:H(void 0!==u,"You defined "+("action"===t?"an action":"a loader")+' for route "'+r.route.id+"\" but didn't return anything from your `"+t+"` function. Please return a value or `null`."),e.next=48;break;case 44:e.prev=44,e.t0=e.catch(2),l=I.error,u=e.t0;case 48:return e.prev=48,d&&n.signal.removeEventListener("abort",d),e.finish(48);case 51:if(!et(u)){e.next=77;break}if(w=u.status,!_e.has(w)){e.next=61;break}if(H(B=u.headers.get("Location"),"Redirects returned/thrown from loaders/actions must have a Location header"),Ee.test(B)?s.isStaticRequest||(_=new URL(n.url),b=B.startsWith("//")?new URL(_.protocol+B):new URL(B),x=null!=oe(b.pathname,o),b.origin===_.origin&&x&&(B=b.pathname+b.search+b.hash)):B=Fe(new URL(n.url),i.slice(0,i.indexOf(r)+1),o,!0,B),!s.isStaticRequest){e.next=60;break}throw u.headers.set("Location",B),u;case 60:return e.abrupt("return",{type:I.redirect,status:w,location:B,revalidate:null!==u.headers.get("X-Remix-Revalidate"),reloadDocument:null!==u.headers.get("X-Remix-Reload-Document")});case 61:if(!s.isRouteRequest){e.next=64;break}throw{type:l===I.error?I.error:I.data,response:u};case 64:if(!(S=u.headers.get("Content-Type"))||!/\bapplication\/json\b/.test(S)){e.next=71;break}return e.next=68,u.json();case 68:C=e.sent,e.next=74;break;case 71:return e.next=73,u.text();case 73:C=e.sent;case 74:if(l!==I.error){e.next=76;break}return e.abrupt("return",{type:l,error:new ge(w,u.statusText,C),headers:u.headers});case 76:return e.abrupt("return",{type:I.data,data:C,statusCode:u.status,headers:u.headers});case 77:if(l!==I.error){e.next=79;break}return e.abrupt("return",{type:l,error:u});case 79:if(!$e(u)){e.next=81;break}return e.abrupt("return",{type:I.deferred,deferredData:u,statusCode:null==(E=u.init)?void 0:E.status,headers:(null==(U=u.init)?void 0:U.headers)&&new Headers(u.init.headers)});case 81:return e.abrupt("return",{type:I.data,data:u});case 82:case"end":return e.stop()}}),e,null,[[2,44,48,51]])})))).apply(this,arguments)}function He(e,t,n,r){var i=e.createURL(Xe(t)).toString(),a={signal:n};if(r&&nt(r.formMethod)){var A=r.formMethod,o=r.formEncType;a.method=A.toUpperCase(),"application/json"===o?(a.headers=new Headers({"Content-Type":o}),a.body=JSON.stringify(r.json)):"text/plain"===o?a.body=r.text:"application/x-www-form-urlencoded"===o&&r.formData?a.body=Pe(r.formData):a.body=r.formData}return new Request(i,a)}function Pe(e){var t,n=new URLSearchParams,r=Q(e.entries());try{for(r.s();!(t=r.n()).done;){var i=v(t.value,2),a=i[0],A=i[1];n.append(a,"string"===typeof A?A:A.name)}}catch(o){r.e(o)}finally{r.f()}return n}function Ne(e){var t,n=new FormData,r=Q(e.entries());try{for(r.s();!(t=r.n()).done;){var i=v(t.value,2),a=i[0],A=i[1];n.append(a,A)}}catch(o){r.e(o)}finally{r.f()}return n}function Oe(e,t,n,r,i){var a,A={},o=null,s=!1,l={};return n.forEach((function(n,u){var c=t[u].route.id;if(H(!Ze(n),"Cannot handle redirect results in processLoaderData"),Je(n)){var d=Ge(e,c),h=n.error;r&&(h=Object.values(r)[0],r=void 0),null==(o=o||{})[d.route.id]&&(o[d.route.id]=h),A[c]=void 0,s||(s=!0,a=me(n.error)?n.error.status:500),n.headers&&(l[c]=n.headers)}else Ye(n)?(i.set(c,n.deferredData),A[c]=n.deferredData.data):A[c]=n.data,null==n.statusCode||200===n.statusCode||s||(a=n.statusCode),n.headers&&(l[c]=n.headers)})),r&&(o=r,A[Object.keys(r)[0]]=void 0),{loaderData:A,errors:o,statusCode:a||200,loaderHeaders:l}}function Ve(e,t,n,r,i,a,A,o){for(var s=Oe(t,n,r,i,o),l=s.loaderData,u=s.errors,c=0;c<a.length;c++){var d=a[c],h=d.key,f=d.match,p=d.controller;H(void 0!==A&&void 0!==A[c],"Did not find corresponding fetcher result");var g=A[c];if(!p||!p.signal.aborted)if(Je(g)){var m=Ge(e.matches,null==f?void 0:f.route.id);u&&u[m.route.id]||(u=D({},u,M({},m.route.id,g.error))),e.fetchers.delete(h)}else if(Ze(g))H(!1,"Unhandled fetcher revalidation redirect");else if(Ye(g))H(!1,"Unhandled fetcher deferred data");else{var v=dt(g.data);e.fetchers.set(h,v)}}return{loaderData:l,errors:u}}function ze(e,t,n,r){var i,a=D({},t),A=Q(n);try{for(A.s();!(i=A.n()).done;){var o=i.value,s=o.route.id;if(t.hasOwnProperty(s)?void 0!==t[s]&&(a[s]=t[s]):void 0!==e[s]&&o.route.loader&&(a[s]=e[s]),r&&r.hasOwnProperty(s))break}}catch(l){A.e(l)}finally{A.f()}return a}function Ge(e,t){return(t?e.slice(0,e.findIndex((function(e){return e.route.id===t}))+1):L(e)).reverse().find((function(e){return!0===e.route.hasErrorBoundary}))||e[0]}function Ke(e){var t=e.find((function(e){return e.index||!e.path||"/"===e.path}))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function We(e,t){var n=void 0===t?{}:t,r=n.pathname,i=n.routeId,a=n.method,A=n.type,o="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(o="Bad Request",a&&r&&i?s="You made a "+a+' request to "'+r+'" but did not provide a `loader` for route "'+i+'", so there is no way to handle the request.':"defer-action"===A?s="defer() is not supported in actions":"invalid-body"===A&&(s="Unable to encode submission body")):403===e?(o="Forbidden",s='Route "'+i+'" does not match URL "'+r+'"'):404===e?(o="Not Found",s='No route matches URL "'+r+'"'):405===e&&(o="Method Not Allowed",a&&r&&i?s="You made a "+a.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+i+'", so there is no way to handle the request.':a&&(s='Invalid request method "'+a.toUpperCase()+'"')),new ge(e||500,o,new Error(s),!0)}function je(e){for(var t=e.length-1;t>=0;t--){var n=e[t];if(Ze(n))return{result:n,idx:t}}}function Xe(e){return V(D({},"string"===typeof e?z(e):e,{hash:""}))}function qe(e,t){return e.pathname===t.pathname&&e.search===t.search&&(""===e.hash?""!==t.hash:e.hash===t.hash||""!==t.hash)}function Ye(e){return e.type===I.deferred}function Je(e){return e.type===I.error}function Ze(e){return(e&&e.type)===I.redirect}function $e(e){var t=e;return t&&"object"===typeof t&&"object"===typeof t.data&&"function"===typeof t.subscribe&&"function"===typeof t.cancel&&"function"===typeof t.resolveData}function et(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"object"===typeof e.headers&&"undefined"!==typeof e.body}function tt(e){return Be.has(e.toLowerCase())}function nt(e){return ye.has(e.toLowerCase())}function rt(e,t,n,r,a,A){return(i=i||h(c().mark((function e(t,n,r,i,a,A){var o,s;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=c().mark((function e(o){var s,l,u,d,h;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=r[o],l=n[o]){e.next=4;break}return e.abrupt("return",1);case 4:if(u=t.find((function(e){return e.route.id===l.route.id})),d=null!=u&&!Le(u,l)&&void 0!==(A&&A[l.route.id]),!Ye(s)||!a&&!d){e.next=11;break}return H(h=i[o],"Expected an AbortSignal for revalidating fetcher deferred result"),e.next=11,it(s,h,a).then((function(e){e&&(r[o]=e||r[o])}));case 11:case"end":return e.stop()}}),e)})),s=0;case 2:if(!(s<r.length)){e.next=9;break}return e.delegateYield(o(s),"t0",4);case 4:if(!e.t0){e.next=6;break}return e.abrupt("continue",6);case 6:s++,e.next=2;break;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function it(e,t,n){return(a=a||h(c().mark((function e(t,n,r){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===r&&(r=!1),e.next=3,t.deferredData.resolveData(n);case 3:if(!e.sent){e.next=6;break}return e.abrupt("return");case 6:if(!r){e.next=14;break}return e.prev=7,e.abrupt("return",{type:I.data,data:t.deferredData.unwrappedData});case 11:return e.prev=11,e.t0=e.catch(7),e.abrupt("return",{type:I.error,error:e.t0});case 14:return e.abrupt("return",{type:I.data,data:t.deferredData.data});case 15:case"end":return e.stop()}}),e,null,[[7,11]])})))).apply(this,arguments)}function at(e){return new URLSearchParams(e).getAll("index").some((function(e){return""===e}))}function At(e,t){var n="string"===typeof t?z(t).search:t.search;if(e[e.length-1].route.index&&at(n||""))return e[e.length-1];var r=le(e);return r[r.length-1]}function ot(e){var t=e.formMethod,n=e.formAction,r=e.formEncType,i=e.text,a=e.formData,A=e.json;if(t&&n&&r)return null!=i?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i}:null!=a?{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0}:void 0!==A?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:A,text:void 0}:void 0}function st(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function lt(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function ut(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function ct(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function dt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function ht(){return ht=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ht.apply(this,arguments)}var ft=o.createContext(null);var pt=o.createContext(null);var gt=o.createContext(null);var mt=o.createContext(null);var vt=o.createContext(null);var yt=o.createContext({outlet:null,matches:[],isDataRoute:!1});var wt=o.createContext(null);function Bt(){return null!=o.useContext(vt)}function _t(){return Bt()||H(!1),o.useContext(vt).location}function bt(e){o.useContext(mt).static||o.useLayoutEffect(e)}function xt(){return o.useContext(yt).isDataRoute?function(){var e=Qt(Tt.UseNavigateStable).router,t=Dt(kt.UseNavigateStable),n=o.useRef(!1);bt((function(){n.current=!0}));var r=o.useCallback((function(r,i){void 0===i&&(i={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,ht({fromRouteId:t},i)))}),[e,t]);return r}():function(){Bt()||H(!1);var e=o.useContext(ft),t=o.useContext(mt),n=t.basename,r=t.navigator,i=o.useContext(yt).matches,a=_t().pathname,A=JSON.stringify(le(i).map((function(e){return e.pathnameBase}))),s=o.useRef(!1);return bt((function(){s.current=!0})),o.useCallback((function(t,i){if(void 0===i&&(i={}),s.current)if("number"!==typeof t){var o=ue(t,JSON.parse(A),a,"path"===i.relative);null==e&&"/"!==n&&(o.pathname="/"===o.pathname?n:ce([n,o.pathname])),(i.replace?r.replace:r.push)(o,i.state,i)}else r.go(t)}),[n,r,A,a,e])}()}function Ct(e,t,n){Bt()||H(!1);var r,i=o.useContext(mt).navigator,a=o.useContext(yt).matches,s=a[a.length-1],l=s?s.params:{},u=(s&&s.pathname,s?s.pathnameBase:"/"),c=(s&&s.route,_t());if(t){var d,h="string"===typeof t?z(t):t;"/"===u||(null==(d=h.pathname)?void 0:d.startsWith(u))||H(!1),r=h}else r=c;var f=r.pathname||"/",p=j(e,{pathname:"/"===u?f:f.slice(u.length)||"/"});var g=Ft(p&&p.map((function(e){return Object.assign({},e,{params:Object.assign({},l,e.params),pathname:ce([u,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:ce([u,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})})),a,n);return t&&g?o.createElement(vt.Provider,{value:{location:ht({pathname:"/",search:"",hash:"",state:null,key:"default"},r),navigationType:A.Pop}},g):g}function St(){var e=function(){var e,t=o.useContext(wt),n=Lt(kt.UseRouteError),r=Dt(kt.UseRouteError);if(t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=me(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r};return o.createElement(o.Fragment,null,o.createElement("h2",null,"Unexpected Application Error!"),o.createElement("h3",{style:{fontStyle:"italic"}},t),n?o.createElement("pre",{style:i},n):null,null)}var Et=o.createElement(St,null),Ut=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),(r=t.call(this,e)).state={location:e.location,revalidation:e.revalidation,error:e.error},r}return _(n,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?o.createElement(yt.Provider,{value:this.props.routeContext},o.createElement(wt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}}]),n}(o.Component);function Mt(e){var t=e.routeContext,n=e.match,r=e.children,i=o.useContext(ft);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),o.createElement(yt.Provider,{value:t},r)}function Ft(e,t,n){var r;if(void 0===t&&(t=[]),void 0===n&&(n=null),null==e){var i;if(null==(i=n)||!i.errors)return null;e=n.matches}var a=e,A=null==(r=n)?void 0:r.errors;if(null!=A){var s=a.findIndex((function(e){return e.route.id&&(null==A?void 0:A[e.route.id])}));s>=0||H(!1),a=a.slice(0,Math.min(a.length,s+1))}return a.reduceRight((function(e,r,i){var s=r.route.id?null==A?void 0:A[r.route.id]:null,l=null;n&&(l=r.route.errorElement||Et);var u=t.concat(a.slice(0,i+1)),c=function(){var t;return t=s?l:r.route.Component?o.createElement(r.route.Component,null):r.route.element?r.route.element:e,o.createElement(Mt,{match:r,routeContext:{outlet:e,matches:u,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?o.createElement(Ut,{location:n.location,revalidation:n.revalidation,component:l,error:s,children:c(),routeContext:{outlet:null,matches:u,isDataRoute:!0}}):c()}),null)}var Tt=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Tt||{}),kt=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(kt||{});function Qt(e){var t=o.useContext(ft);return t||H(!1),t}function Lt(e){var t=o.useContext(pt);return t||H(!1),t}function Dt(e){var t=function(e){var t=o.useContext(yt);return t||H(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||H(!1),n.route.id}var It=s.startTransition;function Rt(e){var t=e.fallbackElement,n=e.router,r=e.future,i=v(o.useState(n.state),2),a=i[0],A=i[1],s=(r||{}).v7_startTransition,l=o.useCallback((function(e){s&&It?It((function(){return A(e)})):A(e)}),[A,s]);o.useLayoutEffect((function(){return n.subscribe(l)}),[n,l]);var u=o.useMemo((function(){return{createHref:n.createHref,encodeLocation:n.encodeLocation,go:function(e){return n.navigate(e)},push:function(e,t,r){return n.navigate(e,{state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})},replace:function(e,t,r){return n.navigate(e,{replace:!0,state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})}}}),[n]),c=n.basename||"/",d=o.useMemo((function(){return{router:n,navigator:u,static:!1,basename:c}}),[n,u,c]);return o.createElement(o.Fragment,null,o.createElement(ft.Provider,{value:d},o.createElement(pt.Provider,{value:a},o.createElement(Pt,{basename:c,location:a.location,navigationType:a.historyAction,navigator:u},a.initialized?o.createElement(Ht,{routes:n.routes,state:a}):t))),null)}function Ht(e){return Ct(e.routes,void 0,e.state)}function Pt(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,i=void 0===r?null:r,a=e.location,s=e.navigationType,l=void 0===s?A.Pop:s,u=e.navigator,c=e.static,d=void 0!==c&&c;Bt()&&H(!1);var h=n.replace(/^\/*/,"/"),f=o.useMemo((function(){return{basename:h,navigator:u,static:d}}),[h,u,d]);"string"===typeof a&&(a=z(a));var p=a,g=p.pathname,m=void 0===g?"/":g,v=p.search,y=void 0===v?"":v,w=p.hash,B=void 0===w?"":w,_=p.state,b=void 0===_?null:_,x=p.key,C=void 0===x?"default":x,S=o.useMemo((function(){var e=oe(m,h);return null==e?null:{location:{pathname:e,search:y,hash:B,state:b,key:C},navigationType:l}}),[h,m,y,B,b,C,l]);return null==S?null:o.createElement(mt.Provider,{value:f},o.createElement(vt.Provider,{children:i,value:S}))}var Nt=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(Nt||{}),Ot=new Promise((function(){}));o.Component;function Vt(e){var t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:o.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:o.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function zt(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gt(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Wt=n(164),jt=["override"],Xt=["cachePolicyForParams_UNSTABLE"],qt=c().mark(Mr),Yt=c().mark(Ni);var Jt=function(e){var t=new Error(e);if(void 0===t.stack)try{throw t}catch(n){}return t};var Zt=function(e){return!!e&&"function"===typeof e.then};var $t=function(e,t){if(null!=e)return e;throw Jt(null!==t&&void 0!==t?t:"Got unexpected null or undefined")};function en(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tn=function(){function e(){y(this,e)}return _(e,[{key:"getValue",value:function(){throw Jt("BaseLoadable")}},{key:"toPromise",value:function(){throw Jt("BaseLoadable")}},{key:"valueMaybe",value:function(){throw Jt("BaseLoadable")}},{key:"valueOrThrow",value:function(){throw Jt('Loadable expected value, but in "'.concat(this.state,'" state'))}},{key:"promiseMaybe",value:function(){throw Jt("BaseLoadable")}},{key:"promiseOrThrow",value:function(){throw Jt('Loadable expected promise, but in "'.concat(this.state,'" state'))}},{key:"errorMaybe",value:function(){throw Jt("BaseLoadable")}},{key:"errorOrThrow",value:function(){throw Jt('Loadable expected error, but in "'.concat(this.state,'" state'))}},{key:"is",value:function(e){return e.state===this.state&&e.contents===this.contents}},{key:"map",value:function(e){throw Jt("BaseLoadable")}}]),e}(),nn=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),en(E(r=t.call(this)),"state","hasValue"),en(E(r),"contents",void 0),r.contents=e,r}return _(n,[{key:"getValue",value:function(){return this.contents}},{key:"toPromise",value:function(){return Promise.resolve(this.contents)}},{key:"valueMaybe",value:function(){return this.contents}},{key:"valueOrThrow",value:function(){return this.contents}},{key:"promiseMaybe",value:function(){}},{key:"errorMaybe",value:function(){}},{key:"map",value:function(e){var t=this;try{var n=e(this.contents);return Zt(n)?sn(n):cn(n)?n:An(n)}catch(r){return Zt(r)?sn(r.next((function(){return t.map(e)}))):on(r)}}}]),n}(tn),rn=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),en(E(r=t.call(this)),"state","hasError"),en(E(r),"contents",void 0),r.contents=e,r}return _(n,[{key:"getValue",value:function(){throw this.contents}},{key:"toPromise",value:function(){return Promise.reject(this.contents)}},{key:"valueMaybe",value:function(){}},{key:"promiseMaybe",value:function(){}},{key:"errorMaybe",value:function(){return this.contents}},{key:"errorOrThrow",value:function(){return this.contents}},{key:"map",value:function(e){return this}}]),n}(tn),an=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),en(E(r=t.call(this)),"state","loading"),en(E(r),"contents",void 0),r.contents=e,r}return _(n,[{key:"getValue",value:function(){throw this.contents}},{key:"toPromise",value:function(){return this.contents}},{key:"valueMaybe",value:function(){}},{key:"promiseMaybe",value:function(){return this.contents}},{key:"promiseOrThrow",value:function(){return this.contents}},{key:"errorMaybe",value:function(){}},{key:"map",value:function(e){var t=this;return sn(this.contents.then((function(t){var n=e(t);if(cn(n)){var r=n;switch(r.state){case"hasValue":case"loading":return r.contents;case"hasError":throw r.contents}}return n})).catch((function(n){if(Zt(n))return n.then((function(){return t.map(e).contents}));throw n})))}}]),n}(tn);function An(e){return Object.freeze(new nn(e))}function on(e){return Object.freeze(new rn(e))}function sn(e){return Object.freeze(new an(e))}function ln(){return Object.freeze(new an(new Promise((function(){}))))}function un(e){var t=function(e){return e.every((function(e){return"hasValue"===e.state}))?An(e.map((function(e){return e.contents}))):e.some((function(e){return"hasError"===e.state}))?on($t(e.find((function(e){return"hasError"===e.state})),"Invalid loadable passed to loadableAll").contents):sn(Promise.all(e.map((function(e){return e.contents}))))}((Array.isArray(e)?e:Object.getOwnPropertyNames(e).map((function(t){return e[t]}))).map((function(e){return cn(e)?e:Zt(e)?sn(e):An(e)})));return Array.isArray(e)?t:t.map((function(t){return Object.getOwnPropertyNames(e).reduce((function(e,n,r){return Kt(Kt({},e),{},M({},n,t[r]))}),{})}))}function cn(e){return e instanceof tn}var dn={of:function(e){return Zt(e)?sn(e):cn(e)?e:An(e)},error:function(e){return on(e)},loading:function(){return ln()},all:un,isLoadable:cn},hn={loadableWithValue:An,loadableWithError:on,loadableWithPromise:sn,loadableLoading:ln,loadableAll:un,isLoadable:cn,RecoilLoadable:dn},fn=hn.loadableWithValue,pn=hn.loadableWithError,gn=hn.loadableWithPromise,mn=hn.loadableLoading,vn=hn.loadableAll,yn=hn.isLoadable,wn=hn.RecoilLoadable,Bn=Object.freeze({__proto__:null,loadableWithValue:fn,loadableWithError:pn,loadableWithPromise:gn,loadableLoading:mn,loadableAll:vn,isLoadable:yn,RecoilLoadable:wn}),_n={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:!0,RECOIL_GKS_ENABLED:new Set(["recoil_hamt_2020","recoil_sync_external_store","recoil_suppress_rerender_in_callback","recoil_memory_managament_2020"])};!function(){var e;"undefined"!==typeof process&&null!=(null===(e=process)||void 0===e?void 0:{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0})&&(function(e,t){var n,r,i=null===(n={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}[e])||void 0===n||null===(r=n.toLowerCase())||void 0===r?void 0:r.trim();if(null!=i&&""!==i){if(!["true","false"].includes(i))throw Jt("process.env.".concat(e," value must be 'true', 'false', or empty: ").concat(i));t("true"===i)}}("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",(function(e){_n.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=e})),function(e,t){var n,r=null===(n={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}[e])||void 0===n?void 0:n.trim();null!=r&&""!==r&&t(r.split(/\s*,\s*|\s+/))}("RECOIL_GKS_ENABLED",(function(e){e.forEach((function(e){_n.RECOIL_GKS_ENABLED.add(e)}))})))}();var bn=_n;function xn(e){return bn.RECOIL_GKS_ENABLED.has(e)}xn.setPass=function(e){bn.RECOIL_GKS_ENABLED.add(e)},xn.setFail=function(e){bn.RECOIL_GKS_ENABLED.delete(e)},xn.clear=function(){bn.RECOIL_GKS_ENABLED.clear()};var Cn=xn;var Sn,En,Un,Mn=function(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).error,null},Fn=Mn,Tn=null!==(Sn=o.createMutableSource)&&void 0!==Sn?Sn:o.unstable_createMutableSource,kn=null!==(En=o.useMutableSource)&&void 0!==En?En:o.unstable_useMutableSource,Qn=null!==(Un=o.useSyncExternalStore)&&void 0!==Un?Un:o.unstable_useSyncExternalStore,Ln=!1;var Dn={createMutableSource:Tn,useMutableSource:kn,useSyncExternalStore:Qn,currentRendererSupportsUseSyncExternalStore:function(){var e,t=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,n=t.ReactCurrentDispatcher,r=t.ReactCurrentOwner,i=null!=(null!==(e=null===n||void 0===n?void 0:n.current)&&void 0!==e?e:r.currentDispatcher).useSyncExternalStore;return!Qn||i||Ln||(Ln=!0,Fn("A React renderer without React 18+ API support is being used with React 18+.")),i},reactMode:function(){return Cn("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:Cn("recoil_sync_external_store")&&null!=Qn?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:Cn("recoil_mutable_source")&&null!=kn&&"undefined"!==typeof window&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?Cn("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:Cn("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}},isFastRefreshEnabled:function(){return!1}},In=function(){function e(t){y(this,e),en(this,"key",void 0),this.key=t}return _(e,[{key:"toJSON",value:function(){return{key:this.key}}}]),e}(),Rn=function(e){x(n,e);var t=U(n);function n(){return y(this,n),t.apply(this,arguments)}return _(n)}(In),Hn=function(e){x(n,e);var t=U(n);function n(){return y(this,n),t.apply(this,arguments)}return _(n)}(In);var Pn={AbstractRecoilValue:In,RecoilState:Rn,RecoilValueReadOnly:Hn,isRecoilValue:function(e){return e instanceof Rn||e instanceof Hn}},Nn=Pn.AbstractRecoilValue,On=Pn.RecoilState,Vn=Pn.RecoilValueReadOnly,zn=Pn.isRecoilValue,Gn=Object.freeze({__proto__:null,AbstractRecoilValue:Nn,RecoilState:On,RecoilValueReadOnly:Vn,isRecoilValue:zn});var Kn=function(e){};var Wn=function(e,t){return c().mark((function n(){var r,i,a,A;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=0,i=Q(e),n.prev=2,i.s();case 4:if((a=i.n()).done){n.next=10;break}return A=a.value,n.next=8,t(A,r++);case 8:n.next=4;break;case 10:n.next=15;break;case 12:n.prev=12,n.t0=n.catch(2),i.e(n.t0);case 15:return n.prev=15,i.f(),n.finish(15);case 18:case"end":return n.stop()}}),n,null,[[2,12,15,18]])}))()},jn=_((function e(){y(this,e)})),Xn=new jn,qn=new Map,Yn=new Map;var Jn=function(e){x(n,e);var t=U(n);function n(){return y(this,n),t.apply(this,arguments)}return _(n)}(T(Error));var Zn=new Map;function $n(e){return Zn.get(e)}var er={nodes:qn,recoilValues:Yn,registerNode:function(e){bn.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&function(e){if(qn.has(e)){var t='Duplicate atom key "'.concat(e,'". This is a FATAL ERROR in\n production. But it is safe to ignore this warning if it occurred because of\n hot module replacement.');console.warn(t)}}(e.key),qn.set(e.key,e);var t=null==e.set?new Gn.RecoilValueReadOnly(e.key):new Gn.RecoilState(e.key);return Yn.set(e.key,t),t},getNode:function(e){var t=qn.get(e);if(null==t)throw new Jn('Missing definition for RecoilValue: "'.concat(e,'""'));return t},getNodeMaybe:function(e){return qn.get(e)},deleteNodeConfigIfPossible:function(e){var t;if(Cn("recoil_memory_managament_2020")){var n,r=qn.get(e);if(null!==r&&void 0!==r&&null!==(t=r.shouldDeleteConfigOnRelease)&&void 0!==t&&t.call(r))qn.delete(e),null===(n=$n(e))||void 0===n||n(),Zn.delete(e)}},setConfigDeletionHandler:function(e,t){Cn("recoil_memory_managament_2020")&&(void 0===t?Zn.delete(e):Zn.set(e,t))},getConfigDeletionHandler:$n,recoilValuesForKeys:function(e){return Wn(e,(function(e){return $t(Yn.get(e))}))},NodeMissingError:Jn,DefaultValue:jn,DEFAULT_VALUE:Xn};var tr={enqueueExecution:function(e,t){t()}};var nr,rr,ir=(nr=function(e){var t="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n={},r=Math.pow(2,5),i=r-1,a=r/2,A=r/4,o={},s=function(e){return function(){return e}},l=n.hash=function(e){var n="undefined"===typeof e?"undefined":t(e);if("number"===n)return e;"string"!==n&&(e+="");for(var r=0,i=0,a=e.length;i<a;++i)r=(r<<5)-r+e.charCodeAt(i)|0;return r},u=function(e,t){return t>>>e&i},c=function(e){return 1<<e},d=function(e,t){return n=e&t-1,n=(n=(858993459&(n-=n>>1&1431655765))+(n>>2&858993459))+(n>>4)&252645135,127&(n+=n>>8)+(n>>16);var n},h=function(e,t,n,r){var i=r;if(!e){var a=r.length;i=new Array(a);for(var A=0;A<a;++A)i[A]=r[A]}return i[t]=n,i},f=function(e,t,n){var r=n.length-1,i=0,a=0,A=n;if(e)i=a=t;else for(A=new Array(r);i<t;)A[a++]=n[i++];for(++i;i<=r;)A[a++]=n[i++];return e&&(A.length=r),A},p={__hamt_isEmpty:!0},g=function(e){return e===p||e&&e.__hamt_isEmpty},m=function(e,t,n,r){return{type:1,edit:e,hash:t,key:n,value:r,_modify:b}},v=function(e,t,n){return{type:2,edit:e,hash:t,children:n,_modify:x}},y=function(e,t,n){return{type:3,edit:e,mask:t,children:n,_modify:C}},w=function(e,t,n){return{type:4,edit:e,size:t,children:n,_modify:S}},B=function e(t,n,r,i,a,A){if(r===a)return v(t,r,[A,i]);var o=u(n,r),s=u(n,a);return y(t,c(o)|c(s),o===s?[e(t,n+5,r,i,a,A)]:o<s?[i,A]:[A,i])},_=function(e,t){return e===t.edit},b=function(e,t,n,r,i,a,A){if(t(a,this.key)){var s=r(this.value);return s===this.value?this:s===o?(--A.value,p):_(e,this)?(this.value=s,this):m(e,i,a,s)}var l=r();return l===o?this:(++A.value,B(e,n,this.hash,this,i,m(e,i,a,l)))},x=function(e,t,n,r,i,a,A){if(i===this.hash){var s=function(e,t,n,r,i,a,A,s){for(var l=i.length,u=0;u<l;++u){var c=i[u];if(n(A,c.key)){var d=c.value,p=a(d);return p===d?i:p===o?(--s.value,f(e,u,i)):h(e,u,m(t,r,A,p),i)}}var g=a();return g===o?i:(++s.value,h(e,l,m(t,r,A,g),i))}(_(e,this),e,t,this.hash,this.children,r,a,A);return s===this.children?this:s.length>1?v(e,this.hash,s):s[0]}var l=r();return l===o?this:(++A.value,B(e,n,this.hash,this,i,m(e,i,a,l)))},C=function(e,t,n,r,i,A,o){var s=this.mask,l=this.children,m=u(n,i),v=c(m),B=d(s,v),b=s&v,x=b?l[B]:p,C=x._modify(e,t,n+5,r,i,A,o);if(x===C)return this;var S,E=_(e,this),U=s,M=void 0;if(b&&g(C)){if(!(U&=~v))return p;if(l.length<=2&&((S=l[1^B])===p||1===S.type||2===S.type))return l[1^B];M=f(E,B,l)}else if(b||g(C))M=h(E,B,C,l);else{if(l.length>=a)return function(e,t,n,r,i){for(var a=[],A=r,o=0,s=0;A;++s)1&A&&(a[s]=i[o++]),A>>>=1;return a[t]=n,w(e,o+1,a)}(e,m,C,s,l);U|=v,M=function(e,t,n,r){var i=r.length;if(e){for(var a=i;a>=t;)r[a--]=r[a];return r[t]=n,r}for(var A=0,o=0,s=new Array(i+1);A<t;)s[o++]=r[A++];for(s[t]=n;A<i;)s[++o]=r[A++];return s}(E,B,C,l)}return E?(this.mask=U,this.children=M,this):y(e,U,M)},S=function(e,t,n,r,i,a,o){var s=this.size,l=this.children,c=u(n,i),d=l[c],f=(d||p)._modify(e,t,n+5,r,i,a,o);if(d===f)return this;var m=_(e,this),v=void 0;if(g(d)&&!g(f))++s,v=h(m,c,f,l);else if(!g(d)&&g(f)){if(--s<=A)return function(e,t,n,r){for(var i=new Array(t-1),a=0,A=0,o=0,s=r.length;o<s;++o)if(o!==n){var l=r[o];l&&!g(l)&&(i[a++]=l,A|=1<<o)}return y(e,A,i)}(e,s,c,l);v=h(m,c,p,l)}else v=h(m,c,f,l);return m?(this.size=s,this.children=v,this):w(e,s,v)};function E(e,t,n,r,i){this._editable=e,this._edit=t,this._config=n,this._root=r,this._size=i}p._modify=function(e,t,n,r,i,a,A){var s=r();return s===o?p:(++A.value,m(e,i,a,s))},E.prototype.setTree=function(e,t){return this._editable?(this._root=e,this._size=t,this):e===this._root?this:new E(this._editable,this._edit,this._config,e,t)};var U=n.tryGetHash=function(e,t,n,r){for(var i=r._root,a=0,A=r._config.keyEq;;)switch(i.type){case 1:return A(n,i.key)?i.value:e;case 2:if(t===i.hash)for(var o=i.children,s=0,l=o.length;s<l;++s){var h=o[s];if(A(n,h.key))return h.value}return e;case 3:var f=u(a,t),p=c(f);if(i.mask&p){i=i.children[d(i.mask,p)],a+=5;break}return e;case 4:if(i=i.children[u(a,t)]){a+=5;break}return e;default:return e}};E.prototype.tryGetHash=function(e,t,n){return U(e,t,n,this)};var M=n.tryGet=function(e,t,n){return U(e,n._config.hash(t),t,n)};E.prototype.tryGet=function(e,t){return M(e,t,this)};var F=n.getHash=function(e,t,n){return U(void 0,e,t,n)};E.prototype.getHash=function(e,t){return F(e,t,this)},n.get=function(e,t){return U(void 0,t._config.hash(e),e,t)},E.prototype.get=function(e,t){return M(t,e,this)};var T=n.has=function(e,t,n){return U(o,e,t,n)!==o};E.prototype.hasHash=function(e,t){return T(e,t,this)};var k=n.has=function(e,t){return T(t._config.hash(e),e,t)};E.prototype.has=function(e){return k(e,this)};var Q=function(e,t){return e===t};n.make=function(e){return new E(0,0,{keyEq:e&&e.keyEq||Q,hash:e&&e.hash||l},p,0)},n.empty=n.make();var L=n.isEmpty=function(e){return e&&!!g(e._root)};E.prototype.isEmpty=function(){return L(this)};var D=n.modifyHash=function(e,t,n,r){var i={value:r._size},a=r._root._modify(r._editable?r._edit:NaN,r._config.keyEq,0,e,t,n,i);return r.setTree(a,i.value)};E.prototype.modifyHash=function(e,t,n){return D(n,e,t,this)};var I=n.modify=function(e,t,n){return D(e,n._config.hash(t),t,n)};E.prototype.modify=function(e,t){return I(t,e,this)};var R=n.setHash=function(e,t,n,r){return D(s(n),e,t,r)};E.prototype.setHash=function(e,t,n){return R(e,t,n,this)};var H=n.set=function(e,t,n){return R(n._config.hash(e),e,t,n)};E.prototype.set=function(e,t){return H(e,t,this)};var P=s(o),N=n.removeHash=function(e,t,n){return D(P,e,t,n)};E.prototype.removeHash=E.prototype.deleteHash=function(e,t){return N(e,t,this)};var O=n.remove=function(e,t){return N(t._config.hash(e),e,t)};E.prototype.remove=E.prototype.delete=function(e){return O(e,this)};var V=n.beginMutation=function(e){return new E(e._editable+1,e._edit+1,e._config,e._root,e._size)};E.prototype.beginMutation=function(){return V(this)};var z=n.endMutation=function(e){return e._editable=e._editable&&e._editable-1,e};E.prototype.endMutation=function(){return z(this)};var G=n.mutate=function(e,t){var n=V(t);return e(n),z(n)};E.prototype.mutate=function(e){return G(e,this)};var K=function(e){return e&&W(e[0],e[1],e[2],e[3],e[4])},W=function(e,t,n,r,i){for(;n<e;){var a=t[n++];if(a&&!g(a))return j(a,r,[e,t,n,r,i])}return K(i)},j=function(e,t,n){switch(e.type){case 1:return{value:t(e),rest:n};case 2:case 4:case 3:var r=e.children;return W(r.length,r,0,t,n);default:return K(n)}},X={done:!0};function q(e){this.v=e}q.prototype.next=function(){if(!this.v)return X;var e=this.v;return this.v=K(e.rest),e},q.prototype[Symbol.iterator]=function(){return this};var Y=function(e,t){return new q(j(e._root,t))},J=function(e){return[e.key,e.value]},Z=n.entries=function(e){return Y(e,J)};E.prototype.entries=E.prototype[Symbol.iterator]=function(){return Z(this)};var $=function(e){return e.key},ee=n.keys=function(e){return Y(e,$)};E.prototype.keys=function(){return ee(this)};var te=function(e){return e.value},ne=n.values=E.prototype.values=function(e){return Y(e,te)};E.prototype.values=function(){return ne(this)};var re=n.fold=function(e,t,n){var r=n._root;if(1===r.type)return e(t,r.value,r.key);for(var i=[r.children],a=void 0;a=i.pop();)for(var A=0,o=a.length;A<o;){var s=a[A++];s&&s.type&&(1===s.type?t=e(t,s.value,s.key):i.push(s.children))}return t};E.prototype.fold=function(e,t){return re(e,t,this)};var ie=n.forEach=function(e,t){return re((function(n,r,i){return e(r,i,t)}),null,t)};E.prototype.forEach=function(e){return ie(e,this)};var ae=n.count=function(e){return e._size};E.prototype.count=function(){return ae(this)},Object.defineProperty(E.prototype,"size",{get:E.prototype.count}),e.exports?e.exports=n:(void 0).hamt=n},nr(rr={exports:{}},rr.exports),rr.exports),ar=function(){function e(t){y(this,e),en(this,"_map",void 0),this._map=new Map(null===t||void 0===t?void 0:t.entries())}return _(e,[{key:"keys",value:function(){return this._map.keys()}},{key:"entries",value:function(){return this._map.entries()}},{key:"get",value:function(e){return this._map.get(e)}},{key:"has",value:function(e){return this._map.has(e)}},{key:"set",value:function(e,t){return this._map.set(e,t),this}},{key:"delete",value:function(e){return this._map.delete(e),this}},{key:"clone",value:function(){return or(this)}},{key:"toMap",value:function(){return new Map(this._map)}}]),e}(),Ar=function(){function e(t){if(y(this,e),en(this,"_hamt",ir.empty.beginMutation()),t instanceof e){var n=t._hamt.endMutation();t._hamt=n.beginMutation(),this._hamt=n.beginMutation()}else if(t){var r,i=Q(t.entries());try{for(i.s();!(r=i.n()).done;){var a=v(r.value,2),A=a[0],o=a[1];this._hamt.set(A,o)}}catch(s){i.e(s)}finally{i.f()}}}return _(e,[{key:"keys",value:function(){return this._hamt.keys()}},{key:"entries",value:function(){return this._hamt.entries()}},{key:"get",value:function(e){return this._hamt.get(e)}},{key:"has",value:function(e){return this._hamt.has(e)}},{key:"set",value:function(e,t){return this._hamt.set(e,t),this}},{key:"delete",value:function(e){return this._hamt.delete(e),this}},{key:"clone",value:function(){return or(this)}},{key:"toMap",value:function(){return new Map(this._hamt)}}]),e}();function or(e){return Cn("recoil_hamt_2020")?new Ar(e):new ar(e)}var sr=or;var lr=function(e){for(var t=new Set,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a,A=Q(e);try{e:for(A.s();!(a=A.n()).done;){var o,s=a.value,l=Q(r);try{for(l.s();!(o=l.n()).done;){if(o.value.has(s))continue e}}catch(u){l.e(u)}finally{l.f()}t.add(s)}}catch(u){A.e(u)}finally{A.f()}return t};var ur=function(e,t){var n=new Map;return e.forEach((function(e,r){n.set(r,t(e,r))})),n};function cr(e,t,n,r){var i=n.nodeDeps,a=n.nodeToNodeSubscriptions,A=i.get(e);if(!A||!r||A===r.nodeDeps.get(e)){i.set(e,t);var o,s=Q(null==A?t:lr(t,A));try{for(s.s();!(o=s.n()).done;){var l=o.value;a.has(l)||a.set(l,new Set),$t(a.get(l)).add(e)}}catch(f){s.e(f)}finally{s.f()}if(A){var u,c=Q(lr(A,t));try{for(c.s();!(u=c.n()).done;){var d=u.value;if(!a.has(d))return;var h=$t(a.get(d));h.delete(e),0===h.size&&a.delete(d)}}catch(f){c.e(f)}finally{c.f()}}}}var dr=function(e){return{nodeDeps:ur(e.nodeDeps,(function(e){return new Set(e)})),nodeToNodeSubscriptions:ur(e.nodeToNodeSubscriptions,(function(e){return new Set(e)}))}},hr=function(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}},fr=function(e,t,n,r){var i,a,A,o,s=n.getState();r!==s.currentTree.version&&r!==(null===(i=s.nextTree)||void 0===i?void 0:i.version)&&r!==(null===(a=s.previousTree)||void 0===a?void 0:a.version)&&Fn("Tried to save dependencies to a discarded tree");var l=n.getGraph(r);if(cr(e,t,l),r===(null===(A=s.previousTree)||void 0===A?void 0:A.version)&&cr(e,t,n.getGraph(s.currentTree.version),l),r===(null===(o=s.previousTree)||void 0===o?void 0:o.version)||r===s.currentTree.version){var u,c=null===(u=s.nextTree)||void 0===u?void 0:u.version;if(void 0!==c)cr(e,t,n.getGraph(c),l)}},pr=0,gr=0,mr=0,vr=function(){return pr++},yr=function(){return gr++},wr=function(){return mr++},Br=Object.freeze({__proto__:null,persistentMap:sr}).persistentMap,_r=hr,br=vr;function xr(){var e=br();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:Br(),nonvalidatedAtoms:Br()}}var Cr={makeEmptyTreeState:xr,makeEmptyStoreState:function(){var e=xr();return{currentTree:e,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set,knownSelectors:new Set,transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:(new Map).set(e.version,_r()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}},getNextTreeStateVersion:br},Sr=_((function e(){y(this,e)}));var Er={RetentionZone:Sr,retentionZone:function(){return new Sr}};var Ur=function(e,t){var n=new Set(e);return n.add(t),n};function Mr(e,t){var n,r,i,a;return c().wrap((function(A){for(;;)switch(A.prev=A.next){case 0:n=0,r=Q(e),A.prev=2,r.s();case 4:if((i=r.n()).done){A.next=11;break}if(a=i.value,!t(a,n++)){A.next=9;break}return A.next=9,a;case 9:A.next=4;break;case 11:A.next=16;break;case 13:A.prev=13,A.t0=A.catch(2),r.e(A.t0);case 16:return A.prev=16,r.f(),A.finish(16);case 19:case"end":return A.stop()}}),qt,null,[[2,13,16,19]])}var Fr=Mr;var Tr=function(e,t){return new Proxy(e,{get:function(e,n){return!(n in e)&&n in t&&(e[n]=t[n]()),e[n]},ownKeys:function(e){return Object.keys(e)}})},kr=er.getNode,Qr=er.getNodeMaybe,Lr=er.recoilValuesForKeys,Dr=Er.RetentionZone,Ir=Ur,Rr=Object.freeze(new Set),Hr=function(e){x(n,e);var t=U(n);function n(){return y(this,n),t.apply(this,arguments)}return _(n)}(T(Error));function Pr(e,t,n,r){var i=e.getState();if(!i.nodeCleanupFunctions.has(n)){var a=kr(n),A=function(e,t,n){if(!Cn("recoil_memory_managament_2020"))return function(){};var r=e.getState().retention.nodesRetainedByZone;function i(e){var n=r.get(e);n||r.set(e,n=new Set),n.add(t)}if(n instanceof Dr)i(n);else if(Array.isArray(n)){var a,A=Q(n);try{for(A.s();!(a=A.n()).done;)i(a.value)}catch(o){A.e(o)}finally{A.f()}}return function(){if(Cn("recoil_memory_managament_2020")){var r=e.getState().retention;if(n instanceof Dr)A(n);else if(Array.isArray(n)){var i,a=Q(n);try{for(a.s();!(i=a.n()).done;)A(i.value)}catch(o){a.e(o)}finally{a.f()}}}function A(e){var n=r.nodesRetainedByZone.get(e);null===n||void 0===n||n.delete(t),n&&0===n.size&&r.nodesRetainedByZone.delete(e)}}}(e,n,a.retainedBy),o=a.init(e,t,r);i.nodeCleanupFunctions.set(n,(function(){o(),A()}))}}function Nr(e,t,n){return kr(n).peek(e,t)}function Or(e,t,n){for(var r=new Set,i=Array.from(n),a=e.getGraph(t.version),A=i.pop();A;A=i.pop()){var o;r.add(A);var s,l=Q(null!==(o=a.nodeToNodeSubscriptions.get(A))&&void 0!==o?o:Rr);try{for(l.s();!(s=l.n()).done;){var u=s.value;r.has(u)||i.push(u)}}catch(c){l.e(c)}finally{l.f()}}return r}var Vr=function(e,t,n){return Pr(e,t,n,"get"),kr(n).get(e,t)},zr=Nr,Gr=function(e,t,n,r){var i=kr(n);if(null==i.set)throw new Hr("Attempt to set read-only RecoilValue: ".concat(n));var a=i.set;return Pr(e,t,n,"set"),a(e,t,r)},Kr=function(e,t,n){Pr(e,e.getState().currentTree,t,n)},Wr=function(e,t){var n,r=e.getState();null===(n=r.nodeCleanupFunctions.get(t))||void 0===n||n(),r.nodeCleanupFunctions.delete(t)},jr=function(e,t,n){var r,i=Qr(t);return null===i||void 0===i||null===(r=i.invalidate)||void 0===r||r.call(i,e),Kt(Kt({},e),{},{atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:Ir(e.dirtyAtoms,t)})},Xr=function(e,t,n){var r=e.getState(),i=e.getGraph(t.version),a=kr(n).nodeType;return Tr({type:a},{loadable:function(){return Nr(e,t,n)},isActive:function(){return r.knownAtoms.has(n)||r.knownSelectors.has(n)},isSet:function(){return"selector"!==a&&t.atomValues.has(n)},isModified:function(){return t.dirtyAtoms.has(n)},deps:function(){var e;return Lr(null!==(e=i.nodeDeps.get(n))&&void 0!==e?e:[])},subscribers:function(){var i,a;return{nodes:Lr(Fr(Or(e,t,new Set([n])),(function(e){return e!==n}))),components:Wn(null!==(i=null===(a=r.nodeToComponentSubscriptions.get(n))||void 0===a?void 0:a.values())&&void 0!==i?i:[],(function(e){return{name:v(e,1)[0]}}))}}})},qr=Or,Yr=null;var Jr=function(e){Yr=e},Zr=function(){var e;null===(e=Yr)||void 0===e||e()},$r=qr,ei=Vr,ti=Gr,ni=wr,ri=er.getNode,ii=er.getNodeMaybe,ai=er.DefaultValue,Ai=Dn.reactMode,oi=Gn.AbstractRecoilValue,si=Gn.RecoilState,li=Gn.RecoilValueReadOnly,ui=Gn.isRecoilValue,ci=Zr;function di(e,t,n){if("set"===n.type){var r,i=n.recoilValue,a=function(e,t,n,r){var i=n.key;if("function"===typeof r){var a=ei(e,t,i);if("loading"===a.state){var A='Tried to set atom or selector "'.concat(i,'" using an updater function while the current state is pending, this is not currently supported.');throw Fn(A),Jt(A)}if("hasError"===a.state)throw a.contents;return r(a.contents)}return r}(e,t,i,n.valueOrUpdater),A=Q(ti(e,t,i.key,a).entries());try{for(A.s();!(r=A.n()).done;){var o=v(r.value,2);hi(t,o[0],o[1])}}catch(h){A.e(h)}finally{A.f()}}else if("setLoadable"===n.type){hi(t,n.recoilValue.key,n.loadable)}else if("markModified"===n.type){var s=n.recoilValue.key;t.dirtyAtoms.add(s)}else if("setUnvalidated"===n.type){var l,u=n.recoilValue.key,c=n.unvalidatedValue,d=ii(u);null===d||void 0===d||null===(l=d.invalidate)||void 0===l||l.call(d,t),t.atomValues.delete(u),t.nonvalidatedAtoms.set(u,c),t.dirtyAtoms.add(u)}else Fn("Unknown action ".concat(n.type))}function hi(e,t,n){"hasValue"===n.state&&n.contents instanceof ai?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function fi(e,t){e.replaceState((function(n){var r,i=mi(n),a=Q(t);try{for(a.s();!(r=a.n()).done;){var A=r.value;di(e,i,A)}}catch(o){a.e(o)}finally{a.f()}return vi(e,i),ci(),i}))}function pi(e,t){if(gi.length){var n=gi[gi.length-1],r=n.get(e);r||n.set(e,r=[]),r.push(t)}else fi(e,[t])}var gi=[];function mi(e){return Kt(Kt({},e),{},{atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)})}function vi(e,t){var n,r=Q($r(e,t,t.dirtyAtoms));try{for(r.s();!(n=r.n()).done;){var i,a,A=n.value;null===(i=ii(A))||void 0===i||null===(a=i.invalidate)||void 0===a||a.call(i,t)}}catch(o){r.e(o)}finally{r.f()}}function yi(e,t,n){pi(e,{type:"set",recoilValue:t,valueOrUpdater:n})}var wi={RecoilValueReadOnly:li,AbstractRecoilValue:oi,RecoilState:si,getRecoilValueAsLoadable:function(e,t){var n,r,i=t.key,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.getState().currentTree,A=e.getState();a.version!==A.currentTree.version&&a.version!==(null===(n=A.nextTree)||void 0===n?void 0:n.version)&&a.version!==(null===(r=A.previousTree)||void 0===r?void 0:r.version)&&Fn("Tried to read from a discarded tree");var o=ei(e,a,i);return"loading"===o.state&&o.contents.catch((function(){})),o},setRecoilValue:yi,setRecoilValueLoadable:function(e,t,n){if(n instanceof ai)return yi(e,t,n);pi(e,{type:"setLoadable",recoilValue:t,loadable:n})},markRecoilValueModified:function(e,t){pi(e,{type:"markModified",recoilValue:t})},setUnvalidatedRecoilValue:function(e,t,n){pi(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})},subscribeToRecoilValue:function(e,t,n){var r=t.key,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=ni(),A=e.getState();A.nodeToComponentSubscriptions.has(r)||A.nodeToComponentSubscriptions.set(r,new Map),$t(A.nodeToComponentSubscriptions.get(r)).set(a,[null!==i&&void 0!==i?i:"<not captured>",n]);var o=Ai();if(o.early&&("LEGACY"===o.mode||"MUTABLE_SOURCE"===o.mode)){var s=e.getState().nextTree;s&&s.dirtyAtoms.has(r)&&n(s)}return{release:function(){var t=e.getState(),n=t.nodeToComponentSubscriptions.get(r);void 0!==n&&n.has(a)?(n.delete(a),0===n.size&&t.nodeToComponentSubscriptions.delete(r)):Fn("Subscription missing at release time for atom ".concat(r,". This is a bug in Recoil."))}}},isRecoilValue:ui,applyAtomValueWrites:function(e,t){var n=e.clone();return t.forEach((function(e,t){"hasValue"===e.state&&e.contents instanceof ai?n.delete(t):n.set(t,e)})),n},batchStart:function(){var e=new Map;return gi.push(e),function(){var t,n=Q(e);try{for(n.s();!(t=n.n()).done;){var r=v(t.value,2);fi(r[0],r[1])}}catch(i){n.e(i)}finally{n.f()}gi.pop()!==e&&Fn("Incorrect order of batch popping")}},writeLoadableToTreeState:hi,invalidateDownstreams:vi,copyTreeState:mi,refreshRecoilValue:function(e,t){var n,r=e.getState().currentTree,i=ri(t.key);null===(n=i.clearCache)||void 0===n||n.call(i,e,r)}};var Bi=function(e,t,n){for(var r=e.entries(),i=r.next();!i.done;){var a=i.value;if(t.call(n,a[1],a[0],e))return!0;i=r.next()}return!1},_i=Wr,bi=er.deleteNodeConfigIfPossible,xi=er.getNode,Ci=Er.RetentionZone,Si=new Set;function Ei(e,t){var n=e.getState(),r=n.currentTree;if(n.nextTree)Fn("releaseNodesNowOnCurrentTree should only be called at the end of a batch");else{var i,a=new Set,A=Q(t);try{for(A.s();!(i=A.n()).done;){var o=i.value;if(o instanceof Ci){var s,l=Q(Mi(n,o));try{for(l.s();!(s=l.n()).done;){var u=s.value;a.add(u)}}catch(f){l.e(f)}finally{l.f()}}else a.add(o)}}catch(f){A.e(f)}finally{A.f()}var c,d=function(e,t){var n=e.getState(),r=n.currentTree,i=e.getGraph(r.version),a=new Set,A=new Set;return o(t),a;function o(t){var s,l=new Set,u=function(e,t,n,r,i){var a=e.getGraph(t.version),A=[],o=new Set;for(;n.size>0;)s($t(n.values().next().value));return A;function s(e){if(r.has(e)||i.has(e))n.delete(e);else if(!o.has(e)){var t=a.nodeToNodeSubscriptions.get(e);if(t){var l,u=Q(t);try{for(u.s();!(l=u.n()).done;){s(l.value)}}catch(f){u.e(f)}finally{u.f()}}o.add(e),n.delete(e),A.push(e)}}}(e,r,t,a,A),c=Q(u);try{for(c.s();!(s=c.n()).done;){var d,h=s.value;if("recoilRoot"!==xi(h).retainedBy)if((null!==(d=n.retention.referenceCounts.get(h))&&void 0!==d?d:0)>0)A.add(h);else if(Fi(h).some((function(e){return n.retention.referenceCounts.get(e)})))A.add(h);else{var p=i.nodeToNodeSubscriptions.get(h);p&&Bi(p,(function(e){return A.has(e)}))?A.add(h):(a.add(h),l.add(h))}else A.add(h)}}catch(f){c.e(f)}finally{c.f()}var g,m=new Set,v=Q(l);try{for(v.s();!(g=v.n()).done;){var y,w=g.value,B=Q(null!==(_=i.nodeDeps.get(w))&&void 0!==_?_:Si);try{for(B.s();!(y=B.n()).done;){var _,b=y.value;a.has(b)||m.add(b)}}catch(f){B.e(f)}finally{B.f()}}}catch(f){v.e(f)}finally{v.f()}m.size&&o(m)}}(e,a),h=Q(d);try{for(h.s();!(c=h.n()).done;){Ui(e,r,c.value)}}catch(f){h.e(f)}finally{h.f()}}}function Ui(e,t,n){if(Cn("recoil_memory_managament_2020")){_i(e,n);var r=e.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);var i,a=Q(Fi(n));try{for(a.s();!(i=a.n()).done;){var A,o=i.value;null===(A=r.retention.nodesRetainedByZone.get(o))||void 0===A||A.delete(n)}}catch(f){a.e(f)}finally{a.f()}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);var s=r.graphsByVersion.get(t.version);if(s){var l=s.nodeDeps.get(n);if(void 0!==l){s.nodeDeps.delete(n);var u,c=Q(l);try{for(c.s();!(u=c.n()).done;){var d,h=u.value;null===(d=s.nodeToNodeSubscriptions.get(h))||void 0===d||d.delete(n)}}catch(f){c.e(f)}finally{c.f()}}s.nodeToNodeSubscriptions.delete(n)}bi(n)}}function Mi(e,t){var n;return null!==(n=e.retention.nodesRetainedByZone.get(t))&&void 0!==n?n:Si}function Fi(e){var t=xi(e).retainedBy;return void 0===t||"components"===t||"recoilRoot"===t?[]:t instanceof Ci?[t]:t}function Ti(e,t){Cn("recoil_memory_managament_2020")&&(e.getState().retention.referenceCounts.delete(t),function(e,t){var n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):Ei(e,new Set([t]))}(e,t))}var ki=12e4,Qi=function(e,t,n){var r;if(Cn("recoil_memory_managament_2020")){var i=e.getState().retention.referenceCounts,a=(null!==(r=i.get(t))&&void 0!==r?r:0)+n;0===a?Ti(e,t):i.set(t,a)}},Li=function(e){if(Cn("recoil_memory_managament_2020")){var t=e.getState();Ei(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}},Di=function(e){return void 0===e?"recoilRoot":e},Ii=Wt.unstable_batchedUpdates,Ri=wi.batchStart,Hi={unstable_batchedUpdates:{unstable_batchedUpdates:Ii}.unstable_batchedUpdates}.unstable_batchedUpdates||function(e){return e()},Pi=function(e){Hi((function(){var t=function(){};try{t=Ri(),e()}finally{t()}}))};function Ni(e){var t,n,r,i,a,A;return c().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:t=Q(e),o.prev=1,t.s();case 3:if((n=t.n()).done){o.next=24;break}r=n.value,i=Q(r),o.prev=6,i.s();case 8:if((a=i.n()).done){o.next=14;break}return A=a.value,o.next=12,A;case 12:o.next=8;break;case 14:o.next=19;break;case 16:o.prev=16,o.t0=o.catch(6),i.e(o.t0);case 19:return o.prev=19,i.f(),o.finish(19);case 22:o.next=3;break;case 24:o.next=29;break;case 26:o.prev=26,o.t1=o.catch(1),t.e(o.t1);case 29:return o.prev=29,t.f(),o.finish(29);case 32:case"end":return o.stop()}}),Yt,null,[[1,26,29,32],[6,16,19,22]])}var Oi=Ni,Vi="undefined"===typeof Window||"undefined"===typeof window,zi="undefined"!==typeof navigator&&"ReactNative"===navigator.product,Gi={isSSR:Vi,isReactNative:zi,isWindow:function(e){return!Vi&&(e===window||e instanceof Window)}};var Ki=function(e,t){var n,r;return[function(){var i=t.apply(void 0,arguments);return n===i?r:(n=i,r=e.apply(void 0,arguments))},function(){n=null}]},Wi=Pi,ji=Kr,Xi=Xr,qi=hr,Yi=yr,Ji=er.DEFAULT_VALUE,Zi=er.recoilValues,$i=er.recoilValuesForKeys,ea=wi.AbstractRecoilValue,ta=wi.getRecoilValueAsLoadable,na=wi.setRecoilValue,ra=wi.setUnvalidatedRecoilValue,ia=Qi,aa=Jr,Aa=Cr.getNextTreeStateVersion,oa=Cr.makeEmptyStoreState,sa=Gi.isSSR,la=Ki,ua=function(){function e(t,n){var r,i=this;y(this,e),en(this,"_store",void 0),en(this,"_refCount",1),en(this,"getLoadable",(function(e){return i.checkRefCount_INTERNAL(),ta(i._store,e)})),en(this,"getPromise",(function(e){return i.checkRefCount_INTERNAL(),i.getLoadable(e).toPromise()})),en(this,"getNodes_UNSTABLE",(function(e){if(i.checkRefCount_INTERNAL(),!0===(null===e||void 0===e?void 0:e.isModified)){if(!1===(null===e||void 0===e?void 0:e.isInitialized))return[];var t=i._store.getState().currentTree;return $i(t.dirtyAtoms)}var n=i._store.getState().knownAtoms,r=i._store.getState().knownSelectors;return null==(null===e||void 0===e?void 0:e.isInitialized)?Zi.values():!0===e.isInitialized?$i(Oi([n,r])):Fr(Zi.values(),(function(e){var t=e.key;return!n.has(t)&&!r.has(t)}))})),en(this,"getInfo_UNSTABLE",(function(e){var t=e.key;return i.checkRefCount_INTERNAL(),Xi(i._store,i._store.getState().currentTree,t)})),en(this,"map",(function(e){i.checkRefCount_INTERNAL();var t=new pa(i,Wi);return e(t),t})),en(this,"asyncMap",(function(e){return(r=r||h(c().mark((function e(t){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.checkRefCount_INTERNAL(),(n=new pa(i,Wi)).retain(),e.next=5,t(n);case 5:return n.autoRelease_INTERNAL(),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)})),this._store={storeID:Yi(),parentStoreID:n,getState:function(){return t},replaceState:function(e){t.currentTree=e(t.currentTree)},getGraph:function(e){var n=t.graphsByVersion;if(n.has(e))return $t(n.get(e));var r=qi();return n.set(e,r),r},subscribeToTransactions:function(){return{release:function(){}}},addTransactionMetadata:function(){throw Jt("Cannot subscribe to Snapshots")}};var a,A=Q(this._store.getState().knownAtoms);try{for(A.s();!(a=A.n()).done;){var o=a.value;ji(this._store,o,"get"),ia(this._store,o,1)}}catch(s){A.e(s)}finally{A.f()}this.autoRelease_INTERNAL()}return _(e,[{key:"retain",value:function(){var e=this;this._refCount<=0&&Fn("Attempt to retain() Snapshot that was already released."),this._refCount++;var t=!1;return function(){t||(t=!0,e._release())}}},{key:"autoRelease_INTERNAL",value:function(){var e=this;sa||window.setTimeout((function(){return e._release()}),10)}},{key:"_release",value:function(){if(this._refCount--,0===this._refCount){if(this._store.getState().nodeCleanupFunctions.forEach((function(e){return e()})),this._store.getState().nodeCleanupFunctions.clear(),!Cn("recoil_memory_managament_2020"))return}else this._refCount}},{key:"isRetained",value:function(){return this._refCount>0}},{key:"checkRefCount_INTERNAL",value:function(){Cn("recoil_memory_managament_2020")&&this._refCount}},{key:"getStore_INTERNAL",value:function(){return this.checkRefCount_INTERNAL(),this._store}},{key:"getID",value:function(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}},{key:"getStoreID",value:function(){return this.checkRefCount_INTERNAL(),this._store.storeID}}]),e}();function ca(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.getState(),i=n?Aa():t.version;return{currentTree:{version:n?i:t.version,stateID:n?i:t.stateID,transactionMetadata:Kt({},t.transactionMetadata),dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(r.knownAtoms),knownSelectors:new Set(r.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:(new Map).set(i,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(Wn(r.nodeCleanupFunctions.entries(),(function(e){return[v(e,1)[0],function(){}]})))}}var da=v(la((function(e,t){var n,r=e.getState(),i="latest"===t?null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree:$t(r.previousTree);return new ua(ca(e,i),e.storeID)}),(function(e,t){var n,r;return String(t)+String(e.storeID)+String(null===(n=e.getState().nextTree)||void 0===n?void 0:n.version)+String(e.getState().currentTree.version)+String(null===(r=e.getState().previousTree)||void 0===r?void 0:r.version)})),2),ha=da[0],fa=da[1];aa(fa);var pa=function(e){x(n,e);var t=U(n);function n(e,r){var i;return y(this,n),en(E(i=t.call(this,ca(e.getStore_INTERNAL(),e.getStore_INTERNAL().getState().currentTree,!0),e.getStoreID())),"_batch",void 0),en(E(i),"set",(function(e,t){i.checkRefCount_INTERNAL();var n=i.getStore_INTERNAL();i._batch((function(){ia(n,e.key,1),na(i.getStore_INTERNAL(),e,t)}))})),en(E(i),"reset",(function(e){i.checkRefCount_INTERNAL();var t=i.getStore_INTERNAL();i._batch((function(){ia(t,e.key,1),na(i.getStore_INTERNAL(),e,Ji)}))})),en(E(i),"setUnvalidatedAtomValues_DEPRECATED",(function(e){i.checkRefCount_INTERNAL();var t=i.getStore_INTERNAL();Wi((function(){var n,r=Q(e.entries());try{for(r.s();!(n=r.n()).done;){var i=v(n.value,2),a=i[0],A=i[1];ia(t,a,1),ra(t,new ea(a),A)}}catch(o){r.e(o)}finally{r.f()}}))})),i._batch=r,i}return _(n)}(ua),ga={Snapshot:ua,MutableSnapshot:pa,freshSnapshot:function(e){var t=new ua(oa());return null!=e?t.map(e):t},cloneSnapshot:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"latest",n=ha(e,t);return n.isRetained()?n:(fa(),ha(e,t))}},ma=ga.Snapshot,va=ga.MutableSnapshot,ya=ga.freshSnapshot,wa=ga.cloneSnapshot,Ba=Object.freeze({__proto__:null,Snapshot:ma,MutableSnapshot:va,freshSnapshot:ya,cloneSnapshot:wa});var _a=function(){for(var e=new Set,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var A,o=Q(a[i]);try{for(o.s();!(A=o.n()).done;){var s=A.value;e.add(s)}}catch(l){o.e(l)}finally{o.f()}}return e},ba=o.useRef;var xa=function(e){var t=ba(e);return t.current===e&&"function"===typeof e&&(t.current=e()),t},Ca=Cr.getNextTreeStateVersion,Sa=Cr.makeEmptyStoreState,Ea=Wr,Ua=qr,Ma=Kr,Fa=Gr,Ta=jr,ka=hr,Qa=dr,La=yr,Da=Dn.createMutableSource,Ia=Dn.reactMode,Ra=wi.applyAtomValueWrites,Ha=Li,Pa=Ba.freshSnapshot,Na=o.useCallback,Oa=o.useContext,Va=o.useEffect,za=o.useMemo,Ga=o.useRef,Ka=o.useState;function Wa(){throw Jt("This component must be used inside a <RecoilRoot> component.")}var ja=Object.freeze({storeID:La(),getState:Wa,replaceState:Wa,getGraph:Wa,subscribeToTransactions:Wa,addTransactionMetadata:Wa}),Xa=!1;function qa(e){if(Xa)throw Jt("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");var t=e.getState();if(null===t.nextTree){Cn("recoil_memory_managament_2020")&&Cn("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&Ha(e);var n=t.currentTree.version,r=Ca();t.nextTree=Kt(Kt({},t.currentTree),{},{version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}}),t.graphsByVersion.set(r,Qa($t(t.graphsByVersion.get(n))))}}var Ya=o.createContext({current:ja}),Ja=function(){return Oa(Ya)},Za=o.createContext(null);function $a(e,t,n){var r,i=Q(Ua(e,n,n.dirtyAtoms));try{for(i.s();!(r=i.n()).done;){var a=r.value,A=t.nodeToComponentSubscriptions.get(a);if(A){var o,s=Q(A);try{for(s.s();!(o=s.n()).done;){var l=v(o.value,2),u=(l[0],v(l[1],2));u[0];(0,u[1])(n)}}catch(c){s.e(c)}finally{s.f()}}}}catch(c){i.e(c)}finally{i.f()}}function eA(e){var t=e.getState(),n=t.currentTree,r=n.dirtyAtoms;if(r.size){var i,a=Q(t.nodeTransactionSubscriptions);try{for(a.s();!(i=a.n()).done;){var A=v(i.value,2),o=A[0],s=A[1];if(r.has(o)){var l,u=Q(s);try{for(u.s();!(l=u.n()).done;){var c=v(l.value,2);c[0];(0,c[1])(e)}}catch(p){u.e(p)}finally{u.f()}}}}catch(p){a.e(p)}finally{a.f()}var d,h=Q(t.transactionSubscriptions);try{for(h.s();!(d=h.n()).done;){var f=v(d.value,2);f[0];(0,f[1])(e)}}catch(p){h.e(p)}finally{h.f()}(!Ia().early||t.suspendedComponentResolvers.size>0)&&($a(e,t,n),t.suspendedComponentResolvers.forEach((function(e){return e()})),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach((function(e){return e(n)})),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function tA(e){var t=e.setNotifyBatcherOfChange,n=Ja(),r=v(Ka([]),2)[1];return t((function(){return r({})})),Va((function(){return t((function(){return r({})})),function(){t((function(){}))}}),[t]),Va((function(){tr.enqueueExecution("Batcher",(function(){!function(e){var t=e.getState();t.commitDepth++;try{var n=t.nextTree;if(null==n)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,eA(e),null!=t.previousTree?t.graphsByVersion.delete(t.previousTree.version):Fn("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,Cn("recoil_memory_managament_2020")&&null==n&&Ha(e)}finally{t.commitDepth--}}(n.current)}))})),null}var nA=0;function rA(e){var t,n=e.initializeState_DEPRECATED,r=e.initializeState,i=e.store_INTERNAL,a=e.children,A=function(e){var n=t.current.graphsByVersion;if(n.has(e))return $t(n.get(e));var r=ka();return n.set(e,r),r},s=function(e,t){if(null==t){var n=h.current.getState().transactionSubscriptions,r=nA++;return n.set(r,e),{release:function(){n.delete(r)}}}var i=h.current.getState().nodeTransactionSubscriptions;i.has(t)||i.set(t,new Map);var a=nA++;return $t(i.get(t)).set(a,e),{release:function(){var e=i.get(t);e&&(e.delete(a),0===e.size&&i.delete(t))}}},l=function(e){qa(h.current);for(var t=0,n=Object.keys(e);t<n.length;t++){var r=n[t];$t(h.current.getState().nextTree).transactionMetadata[r]=e[r]}},u=function(e){qa(h.current);var n,r=$t(t.current.nextTree);try{Xa=!0,n=e(r)}finally{Xa=!1}n!==r&&(t.current.nextTree=n,Ia().early&&$a(h.current,t.current,n),$t(c.current)())},c=Ga(null),d=Na((function(e){c.current=e}),[c]),h=xa((function(){return null!==i&&void 0!==i?i:{storeID:La(),getState:function(){return t.current},replaceState:u,getGraph:A,subscribeToTransactions:s,addTransactionMetadata:l}}));null!=i&&(h.current=i),t=xa((function(){return null!=n?function(e,t){var n=Sa();return t({set:function(t,r){var i,a=n.currentTree,A=Fa(e,a,t.key,r),o=new Set(A.keys()),s=a.nonvalidatedAtoms.clone(),l=Q(o);try{for(l.s();!(i=l.n()).done;){var u=i.value;s.delete(u)}}catch(c){l.e(c)}finally{l.f()}n.currentTree=Kt(Kt({},a),{},{dirtyAtoms:_a(a.dirtyAtoms,o),atomValues:Ra(a.atomValues,A),nonvalidatedAtoms:s})},setUnvalidatedAtomValues:function(e){e.forEach((function(e,t){n.currentTree=Ta(n.currentTree,t,e)}))}}),n}(h.current,n):null!=r?function(e){var t=Pa(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach((function(e){return e()})),n.nodeCleanupFunctions.clear(),n}(r):Sa()}));var f=za((function(){return null===Da||void 0===Da?void 0:Da(t,(function(){return t.current.currentTree.version}))}),[t]);return Va((function(){var e,t=h.current,n=Q(new Set(t.getState().knownAtoms));try{for(n.s();!(e=n.n()).done;){var r=e.value;Ma(t,r,"get")}}catch(i){n.e(i)}finally{n.f()}return function(){var e,n=Q(t.getState().knownAtoms);try{for(n.s();!(e=n.n()).done;){var r=e.value;Ea(t,r)}}catch(i){n.e(i)}finally{n.f()}}}),[h]),o.createElement(Ya.Provider,{value:h},o.createElement(Za.Provider,{value:f},o.createElement(tA,{setNotifyBatcherOfChange:d}),a))}var iA=function(e){var t=e.override,n=zt(e,jt),r=Ja();return!1===t&&r.current!==ja?e.children:o.createElement(rA,n)},aA=Ja,AA=function(){var e=Oa(Za);return null==e&&Kn("Attempted to use a Recoil hook outside of a <RecoilRoot>. <RecoilRoot> must be an ancestor of any component that uses Recoil hooks."),e},oA=function(){return Ja().current.storeID};var sA=function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0},lA=o.useEffect,uA=o.useRef;var cA=function(e){var t=uA();return lA((function(){t.current=e})),t.current},dA=aA,hA=ki,fA=Qi,pA=Er.RetentionZone,gA=o.useEffect,mA=o.useRef,vA=Gi.isSSR;var yA=function(e){if(Cn("recoil_memory_managament_2020"))return function(e){var t=Array.isArray(e)?e:[e],n=t.map((function(e){return e instanceof pA?e:e.key})),r=dA();gA((function(){if(Cn("recoil_memory_managament_2020")){var e=r.current;if(i.current&&!vA)window.clearTimeout(i.current),i.current=null;else{var t,a=Q(n);try{for(a.s();!(t=a.n()).done;){var A=t.value;fA(e,A,1)}}catch(o){a.e(o)}finally{a.f()}}return function(){var t,r=Q(n);try{for(r.s();!(t=r.n()).done;){var i=t.value;fA(e,i,-1)}}catch(o){r.e(o)}finally{r.f()}}}}),[r].concat(L(n)));var i=mA(),a=cA(n);if(!vA&&(void 0===a||!sA(a,n))){var A,o=r.current,s=Q(n);try{for(s.s();!(A=s.n()).done;){var l=A.value;fA(o,l,1)}}catch(h){s.e(h)}finally{s.f()}if(a){var u,c=Q(a);try{for(c.s();!(u=c.n()).done;){var d=u.value;fA(o,d,-1)}}catch(h){c.e(h)}finally{c.f()}}i.current&&window.clearTimeout(i.current),i.current=window.setTimeout((function(){i.current=null;var e,t=Q(n);try{for(t.s();!(e=t.n()).done;){var r=e.value;fA(o,r,-1)}}catch(h){t.e(h)}finally{t.f()}}),hA)}}(e)};var wA=function(){return"<component name not available>"},BA=er.DEFAULT_VALUE,_A=Dn.currentRendererSupportsUseSyncExternalStore,bA=Dn.reactMode,xA=Dn.useMutableSource,CA=Dn.useSyncExternalStore,SA=AA,EA=aA,UA=(Gn.isRecoilValue,wi.getRecoilValueAsLoadable),MA=wi.setRecoilValue,FA=wi.subscribeToRecoilValue,TA=o.useCallback,kA=o.useEffect,QA=o.useMemo,LA=o.useRef,DA=o.useState,IA=Gi.isSSR;function RA(e,t,n){if("hasValue"===e.state)return e.contents;if("loading"===e.state)throw new Promise((function(t){var r=n.current.getState().suspendedComponentResolvers;r.add(t),IA&&Zt(e.contents)&&e.contents.finally((function(){r.delete(t)}))}));throw"hasError"===e.state?e.contents:Jt('Invalid value of loadable atom "'.concat(t.key,'"'))}function HA(e){var t=EA(),n=wA(),r=TA((function(){var n;var r=t.current,i=r.getState(),a=bA().early&&null!==(n=i.nextTree)&&void 0!==n?n:i.currentTree;return{loadable:UA(r,e,a),key:e.key}}),[t,e]),i=TA((function(e){var t;return function(){var n,r,i=e();return null!==(n=t)&&void 0!==n&&n.loadable.is(i.loadable)&&(null===(r=t)||void 0===r?void 0:r.key)===i.key?t:(t=i,i)}}),[]),a=QA((function(){return i(r)}),[r,i]),A=TA((function(r){var i=t.current;return FA(i,e,r,n).release}),[t,e,n]);return CA(A,a,a).loadable}function PA(e){var t=EA(),n=TA((function(){var n,r=t.current,i=r.getState(),a=bA().early&&null!==(n=i.nextTree)&&void 0!==n?n:i.currentTree;return UA(r,e,a)}),[t,e]),r=TA((function(){return n()}),[n]),i=wA(),a=TA((function(r,a){var A=t.current;return FA(A,e,(function(){if(!Cn("recoil_suppress_rerender_in_callback"))return a();var e=n();s.current.is(e)||a(),s.current=e}),i).release}),[t,e,i,n]),A=SA();if(null==A)throw Jt("Recoil hooks must be used in components contained within a <RecoilRoot> component.");var o=xA(A,r,a),s=LA(o);return kA((function(){s.current=o})),o}function NA(e){var t=EA(),n=wA(),r=TA((function(){var n;var r=t.current,i=r.getState(),a=bA().early&&null!==(n=i.nextTree)&&void 0!==n?n:i.currentTree;return UA(r,e,a)}),[t,e]),i=TA((function(){return{loadable:r(),key:e.key}}),[r,e.key]),a=TA((function(e){var t=i();return e.loadable.is(t.loadable)&&e.key===t.key?e:t}),[i]);kA((function(){var r=FA(t.current,e,(function(e){s(a)}),n);return s(a),r.release}),[n,e,t,a]);var A=v(DA(i),2),o=A[0],s=A[1];return o.key!==e.key?i().loadable:o.loadable}function OA(e){var t=EA(),n=v(DA([]),2)[1],r=wA(),i=TA((function(){var n;var r=t.current,i=r.getState(),a=bA().early&&null!==(n=i.nextTree)&&void 0!==n?n:i.currentTree;return UA(r,e,a)}),[t,e]),a=i(),A=LA(a);return kA((function(){A.current=a})),kA((function(){var a=t.current,o=a.getState(),s=FA(a,e,(function(e){var t;if(!Cn("recoil_suppress_rerender_in_callback"))return n([]);var r=i();null!==(t=A.current)&&void 0!==t&&t.is(r)||n(r),A.current=r}),r);if(o.nextTree)a.getState().queuedComponentCallbacks_DEPRECATED.push((function(){A.current=null,n([])}));else{var l;if(!Cn("recoil_suppress_rerender_in_callback"))return n([]);var u=i();null!==(l=A.current)&&void 0!==l&&l.is(u)||n(u),A.current=u}return s.release}),[r,i,e,t]),a}function VA(e){return Cn("recoil_memory_managament_2020")&&yA(e),{TRANSITION_SUPPORT:NA,SYNC_EXTERNAL_STORE:_A()?HA:NA,MUTABLE_SOURCE:PA,LEGACY:OA}[bA().mode](e)}function zA(e){var t=EA();return RA(VA(e),e,t)}function GA(e){var t=EA();return TA((function(n){MA(t.current,e,n)}),[t,e])}function KA(e){return Cn("recoil_memory_managament_2020")&&yA(e),NA(e)}function WA(e){var t=EA();return RA(KA(e),e,t)}var jA=function(e){return[zA(e),GA(e)]},XA=function(e){return[VA(e),GA(e)]},qA=zA,YA=VA,JA=function(e){var t=EA();return TA((function(){MA(t.current,e,BA)}),[t,e])},ZA=GA,$A=KA,eo=WA,to=function(e){return[WA(e),GA(e)]};var no=Pi,ro=er.DEFAULT_VALUE,io=er.getNode,ao=aA,Ao=wi.AbstractRecoilValue,oo=wi.setRecoilValueLoadable,so=ki,lo=Ba.cloneSnapshot,uo=o.useCallback,co=o.useEffect,ho=o.useRef,fo=o.useState,po=Gi.isSSR;function go(e){var t=ao();co((function(){return t.current.subscribeToTransactions(e).release}),[e,t])}function mo(e,t){var n,r=e.getState(),i=null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree,a=t.getStore_INTERNAL().getState().currentTree;no((function(){for(var n=new Set,r=0,A=[i.atomValues.keys(),a.atomValues.keys()];r<A.length;r++){var o,s=Q(A[r]);try{for(s.s();!(o=s.n()).done;){var l,u,c=o.value;(null===(l=i.atomValues.get(c))||void 0===l?void 0:l.contents)!==(null===(u=a.atomValues.get(c))||void 0===u?void 0:u.contents)&&io(c).shouldRestoreFromSnapshots&&n.add(c)}}catch(d){s.e(d)}finally{s.f()}}n.forEach((function(t){oo(e,new Ao(t),a.atomValues.has(t)?$t(a.atomValues.get(t)):ro)})),e.replaceState((function(e){return Kt(Kt({},e),{},{stateID:t.getID()})}))}))}var vo=function(){var e=ao(),t=v(fo((function(){return lo(e.current)})),2),n=t[0],r=t[1],i=cA(n),a=ho(),A=ho();if(go(uo((function(e){return r(lo(e))}),[])),co((function(){var e,t=n.retain();a.current&&!po&&(window.clearTimeout(a.current),a.current=null,null===(e=A.current)||void 0===e||e.call(A),A.current=null);return function(){window.setTimeout(t,10)}}),[n]),i!==n&&!po){var o;if(a.current)window.clearTimeout(a.current),a.current=null,null===(o=A.current)||void 0===o||o.call(A),A.current=null;A.current=n.retain(),a.current=window.setTimeout((function(){var e;a.current=null,null===(e=A.current)||void 0===e||e.call(A),A.current=null}),so)}return n},yo=mo,wo=function(){var e=ao();return uo((function(t){return mo(e.current,t)}),[e])},Bo=function(e){go(uo((function(t){var n=lo(t,"latest"),r=lo(t,"previous");e({snapshot:n,previousSnapshot:r})}),[e]))},_o=Xr,bo=aA;var xo=function(){var e=bo();return function(t){var n=t.key;return _o(e.current,e.current.getState().currentTree,n)}},Co=Dn.reactMode,So=iA,Eo=aA,Uo=o.useMemo;var Mo=function(){"MUTABLE_SOURCE"===Co().mode&&console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode. Please consider upgrading to recoil_sync_external_store mode.");var e=Eo().current;return Uo((function(){return function(t){var n=t.children;return o.createElement(So,{store_INTERNAL:e},n)}}),[e])},Fo=Bn.loadableWithValue,To=Kr,ko=er.DEFAULT_VALUE,Qo=er.getNode,Lo=wi.copyTreeState,Do=wi.getRecoilValueAsLoadable,Io=wi.invalidateDownstreams,Ro=wi.writeLoadableToTreeState;function Ho(e){return"atom"===Qo(e.key).nodeType}var Po=function(){function e(t,n){var r=this;y(this,e),en(this,"_store",void 0),en(this,"_treeState",void 0),en(this,"_changes",void 0),en(this,"get",(function(e){if(r._changes.has(e.key))return r._changes.get(e.key);if(!Ho(e))throw Jt("Reading selectors within atomicUpdate is not supported");var t=Do(r._store,e,r._treeState);if("hasValue"===t.state)return t.contents;throw"hasError"===t.state?t.contents:Jt("Expected Recoil atom ".concat(e.key," to have a value, but it is in a loading state."))})),en(this,"set",(function(e,t){if(!Ho(e))throw Jt("Setting selectors within atomicUpdate is not supported");if("function"===typeof t){var n=r.get(e);r._changes.set(e.key,t(n))}else To(r._store,e.key,"set"),r._changes.set(e.key,t)})),en(this,"reset",(function(e){r.set(e,ko)})),this._store=t,this._treeState=n,this._changes=new Map}return _(e,[{key:"newTreeState_INTERNAL",value:function(){if(0===this._changes.size)return this._treeState;var e,t=Lo(this._treeState),n=Q(this._changes);try{for(n.s();!(e=n.n()).done;){var r=v(e.value,2),i=r[0],a=r[1];Ro(t,i,Fo(a))}}catch(A){n.e(A)}finally{n.f()}return Io(this._store,t),t}}]),e}();var No=function(e){return function(t){e.replaceState((function(n){var r=new Po(e,n);return t(r),r.newTreeState_INTERNAL()}))}},Oo=No,Vo=Object.freeze({__proto__:null,atomicUpdater:Oo});var zo=function(e,t){if(!e)throw new Error(t)},Go=Vo.atomicUpdater,Ko=Pi,Wo=er.DEFAULT_VALUE,jo=aA,Xo=wi.refreshRecoilValue,qo=wi.setRecoilValue,Yo=Ba.cloneSnapshot,Jo=yo,Zo=o.useCallback,$o=_((function e(){y(this,e)})),es=new $o;function ts(e,t,n,r){var i,a,A=es;(Ko((function(){var a="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if("function"!==typeof t)throw Jt(a);var o=Tr(Kt(Kt({},null!==r&&void 0!==r?r:{}),{},{set:function(t,n){return qo(e,t,n)},reset:function(t){return qo(e,t,Wo)},refresh:function(t){return Xo(e,t)},gotoSnapshot:function(t){return Jo(e,t)},transact_UNSTABLE:function(t){return Go(e)(t)}}),{snapshot:function(){var t=Yo(e);return i=t.retain(),t}}),s=t(o);if("function"!==typeof s)throw Jt(a);A=s.apply(void 0,L(n))})),A instanceof $o&&zo(!1),Zt(A))?A=A.finally((function(){var e;null===(e=i)||void 0===e||e()})):null===(a=i)||void 0===a||a();return A}var ns=ts,rs=function(e,t){var n=jo();return Zo((function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return ts(n.current,e,r)}),null!=t?[].concat(L(t),[n]):void 0)},is=aA,as=wi.refreshRecoilValue,As=o.useCallback;var os=function(e){var t=is();return As((function(){var n=t.current;as(n,e)}),[e,t])},ss=Vo.atomicUpdater,ls=aA,us=o.useMemo;var cs=function(e,t){var n=ls();return us((function(){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];ss(n.current)((function(t){e(t).apply(void 0,r)}))}}),null!=t?[].concat(L(t),[n]):void 0)},ds=_((function e(t){y(this,e),en(this,"value",void 0),this.value=t})),hs={WrappedValue:ds}.WrappedValue,fs=Object.freeze({__proto__:null,WrappedValue:hs}),ps=Dn.isFastRefreshEnabled,gs=function(e){x(n,e);var t=U(n);function n(){return y(this,n),t.apply(this,arguments)}return _(n)}(T(Error)),ms=function(){function e(t){var n,r,i;y(this,e),en(this,"_name",void 0),en(this,"_numLeafs",void 0),en(this,"_root",void 0),en(this,"_onHit",void 0),en(this,"_onSet",void 0),en(this,"_mapNodeValue",void 0),this._name=null===t||void 0===t?void 0:t.name,this._numLeafs=0,this._root=null,this._onHit=null!==(n=null===t||void 0===t?void 0:t.onHit)&&void 0!==n?n:function(){},this._onSet=null!==(r=null===t||void 0===t?void 0:t.onSet)&&void 0!==r?r:function(){},this._mapNodeValue=null!==(i=null===t||void 0===t?void 0:t.mapNodeValue)&&void 0!==i?i:function(e){return e}}return _(e,[{key:"size",value:function(){return this._numLeafs}},{key:"root",value:function(){return this._root}},{key:"get",value:function(e,t){var n;return null===(n=this.getLeafNode(e,t))||void 0===n?void 0:n.value}},{key:"getLeafNode",value:function(e,t){if(null!=this._root)for(var n=this._root;n;){if(null===t||void 0===t||t.onNodeVisit(n),"leaf"===n.type)return this._onHit(n),n;var r=this._mapNodeValue(e(n.nodeKey));n=n.branches.get(r)}}},{key:"set",value:function(e,t,n){var r=this,i=function(){var i,a,A,o,s,l,u,c=Q(e);try{for(c.s();!(u=c.n()).done;){var d,h,f,p=v(u.value,2),g=p[0],m=p[1],y=r._root;if("leaf"===(null===y||void 0===y?void 0:y.type))throw r.invalidCacheError();var w=s;if("branch"!==(s=null!==(d=s=w?w.branches.get(l):y)&&void 0!==d?d:{type:"branch",nodeKey:g,parent:w,branches:new Map,branchKey:l}).type||s.nodeKey!==g)throw r.invalidCacheError();null===w||void 0===w||w.branches.set(l,s),null===n||void 0===n||null===(h=n.onNodeVisit)||void 0===h||h.call(n,s),l=r._mapNodeValue(m),r._root=null!==(f=r._root)&&void 0!==f?f:s}}catch(b){c.e(b)}finally{c.f()}var B=s?null===(i=s)||void 0===i?void 0:i.branches.get(l):r._root;if(null!=B&&("leaf"!==B.type||B.branchKey!==l))throw r.invalidCacheError();var _={type:"leaf",value:t,parent:s,branchKey:l};null===(a=s)||void 0===a||a.branches.set(l,_),r._root=null!==(A=r._root)&&void 0!==A?A:_,r._numLeafs++,r._onSet(_),null===n||void 0===n||null===(o=n.onNodeVisit)||void 0===o||o.call(n,_)};try{i()}catch(a){if(!(a instanceof gs))throw a;this.clear(),i()}}},{key:"delete",value:function(e){var t=this.root();if(!t)return!1;if(e===t)return this._root=null,this._numLeafs=0,!0;for(var n=e.parent,r=e.branchKey;n;){var i;if(n.branches.delete(r),n===t)return 0===n.branches.size?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(n.branches.size>0)break;r=null===(i=n)||void 0===i?void 0:i.branchKey,n=n.parent}for(;n!==t;n=n.parent)if(null==n)return!1;return this._numLeafs--,!0}},{key:"clear",value:function(){this._numLeafs=0,this._root=null}},{key:"invalidCacheError",value:function(){var e=ps()?"Possible Fast Refresh module reload detected. This may also be caused by an selector returning inconsistent values. Resetting cache.":"Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache.";throw Fn(e+(null!=this._name?" - ".concat(this._name):"")),new gs}}]),e}(),vs={TreeCache:ms}.TreeCache,ys=Object.freeze({__proto__:null,TreeCache:vs}),ws={LRUCache:function(){function e(t){var n;y(this,e),en(this,"_maxSize",void 0),en(this,"_size",void 0),en(this,"_head",void 0),en(this,"_tail",void 0),en(this,"_map",void 0),en(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=null!==(n=t.mapKey)&&void 0!==n?n:function(e){return e}}return _(e,[{key:"head",value:function(){return this._head}},{key:"tail",value:function(){return this._tail}},{key:"size",value:function(){return this._size}},{key:"maxSize",value:function(){return this._maxSize}},{key:"has",value:function(e){return this._map.has(this._keyMapper(e))}},{key:"get",value:function(e){var t=this._keyMapper(e),n=this._map.get(t);if(n)return this.set(e,n.value),n.value}},{key:"set",value:function(e,t){var n=this._keyMapper(e);this._map.get(n)&&this.delete(e);var r=this.head(),i={key:e,right:r,left:null,value:t};r?r.left=i:this._tail=i,this._map.set(n,i),this._head=i,this._size++,this._maybeDeleteLRU()}},{key:"_maybeDeleteLRU",value:function(){this.size()>this.maxSize()&&this.deleteLru()}},{key:"deleteLru",value:function(){var e=this.tail();e&&this.delete(e.key)}},{key:"delete",value:function(e){var t=this._keyMapper(e);if(this._size&&this._map.has(t)){var n=$t(this._map.get(t)),r=n.right,i=n.left;r&&(r.left=n.left),i&&(i.right=n.right),n===this.head()&&(this._head=r),n===this.tail()&&(this._tail=i),this._map.delete(t),this._size--}}},{key:"clear",value:function(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}]),e}()}.LRUCache,Bs=Object.freeze({__proto__:null,LRUCache:ws}),_s=Bs.LRUCache,bs=ys.TreeCache;var xs=function(e){var t=e.name,n=e.maxSize,r=e.mapNodeValue,i=void 0===r?function(e){return e}:r,a=new _s({maxSize:n}),A=new bs({name:t,mapNodeValue:i,onHit:function(e){a.set(e,!0)},onSet:function(e){var t=a.tail();a.set(e,!0),t&&A.size()>n&&A.delete(t.key)}});return A};function Cs(e,t,n){if("string"===typeof e&&!e.includes('"')&&!e.includes("\\"))return'"'.concat(e,'"');switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if(!0!==(null===t||void 0===t?void 0:t.allowFunctions))throw Jt("Attempt to serialize function in a Recoil cache key");return"__FUNCTION(".concat(e.name,")__")}if(null===e)return"null";var r;if("object"!==typeof e)return null!==(r=JSON.stringify(e))&&void 0!==r?r:"";if(Zt(e))return"__PROMISE__";if(Array.isArray(e))return"[".concat(e.map((function(e,n){return Cs(e,t,n.toString())})),"]");if("function"===typeof e.toJSON)return Cs(e.toJSON(n),t,n);if(e instanceof Map){var i,a={},A=Q(e);try{for(A.s();!(i=A.n()).done;){var o=v(i.value,2),s=o[0],l=o[1];a["string"===typeof s?s:Cs(s,t)]=l}}catch(u){A.e(u)}finally{A.f()}return Cs(a,t,n)}return e instanceof Set?Cs(Array.from(e).sort((function(e,n){return Cs(e,t).localeCompare(Cs(n,t))})),t,n):void 0!==Symbol&&null!=e[Symbol.iterator]&&"function"===typeof e[Symbol.iterator]?Cs(Array.from(e),t,n):"{".concat(Object.keys(e).filter((function(t){return void 0!==e[t]})).sort().map((function(n){return"".concat(Cs(n,t),":").concat(Cs(e[n],t,n))})).join(","),"}")}var Ss=function(e){return Cs(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{allowFunctions:!1})},Es=ys.TreeCache,Us={equality:"reference",eviction:"keep-all",maxSize:1/0};var Ms=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Us,t=e.equality,n=void 0===t?Us.equality:t,r=e.eviction,i=void 0===r?Us.eviction:r,a=e.maxSize,A=void 0===a?Us.maxSize:a,o=arguments.length>1?arguments[1]:void 0,s=function(e){switch(e){case"reference":return function(e){return e};case"value":return function(e){return Ss(e)}}throw Jt("Unrecognized equality policy ".concat(e))}(n);return function(e,t,n,r){switch(e){case"keep-all":return new Es({name:r,mapNodeValue:n});case"lru":return xs({name:r,maxSize:$t(t),mapNodeValue:n});case"most-recent":return xs({name:r,maxSize:1,mapNodeValue:n})}throw Jt("Unrecognized eviction policy ".concat(e))}(i,A,s,o)};var Fs=function(e){return function(){return null}},Ts=Bn.isLoadable,ks=Bn.loadableWithError,Qs=Bn.loadableWithPromise,Ls=Bn.loadableWithValue,Ds=fs.WrappedValue,Is=Vr,Rs=zr,Hs=Gr,Ps=fr,Ns=er.DEFAULT_VALUE,Os=er.getConfigDeletionHandler,Vs=er.getNode,zs=er.registerNode,Gs=Gn.isRecoilValue,Ks=wi.markRecoilValueModified,Ws=Di,js=ns,Xs=Fs,qs=_((function e(){y(this,e)})),Ys=new qs,Js=[],Zs=new Map,$s=function(){var e=0;return function(){return e++}}();function el(e){var t=null,n=e.key,r=e.get,i=e.cachePolicy_UNSTABLE,a=null!=e.set?e.set:void 0;var A=new Set,o=Ms(null!==i&&void 0!==i?i:{equality:"reference",eviction:"keep-all"},n),s=Ws(e.retainedBy_UNSTABLE),l=new Map,u=0;function c(){return!Cn("recoil_memory_managament_2020")||u>0}function d(e){return e.getState().knownSelectors.add(n),u++,function(){u--}}function h(){return void 0!==Os(n)&&!c()}function f(e,t,n,r,i){U(t,r,i),p(e,n)}function p(e,t){E(e,t)&&S(e),g(t,!0)}function g(e,n){var r=Zs.get(e);if(null!=r){var i,a=Q(r);try{for(a.s();!(i=a.n()).done;){var A=i.value;Ks(A,$t(t))}}catch(o){a.e(o)}finally{a.f()}n&&Zs.delete(e)}}function m(e,t){var n=Zs.get(t);null==n&&Zs.set(t,n=new Set),n.add(e)}function y(e,t,n,r,i,a){return t.then((function(r){if(!c())throw S(e),Ys;null!=a.loadingDepKey&&a.loadingDepPromise===t?n.atomValues.set(a.loadingDepKey,Ls(r)):e.getState().knownSelectors.forEach((function(e){n.atomValues.delete(e)}));var A=_(e,n);if(A&&"loading"!==A.state){if((E(e,i)||null==C(e))&&p(e,i),"hasValue"===A.state)return A.contents;throw A.contents}if(!E(e,i)){var o=x(e,n);if(null!=o)return o.loadingLoadable.contents}var s=v(B(e,n,i),2),l=s[0],u=s[1];if("loading"!==l.state&&f(e,n,i,l,u),"hasError"===l.state)throw l.contents;return l.contents})).catch((function(t){if(t instanceof qs)throw Ys;if(!c())throw S(e),Ys;var a=ks(t);throw f(e,n,i,a,r),t}))}function w(e,t,r,i){var a,o,s,l,u,c,d;(E(e,i)||t.version===(null===(a=e.getState())||void 0===a||null===(o=a.currentTree)||void 0===o?void 0:o.version)||t.version===(null===(s=e.getState())||void 0===s||null===(l=s.nextTree)||void 0===l?void 0:l.version))&&Ps(n,r,e,null!==(u=null===(c=e.getState())||void 0===c||null===(d=c.nextTree)||void 0===d?void 0:d.version)&&void 0!==u?u:e.getState().currentTree.version);var h,f=Q(r);try{for(f.s();!(h=f.n()).done;){var p=h.value;A.add(p)}}catch(g){f.e(g)}finally{f.f()}}function B(e,i,a){var A,o,s=Xs(n),l=!0,u=!0,d=function(){s(),u=!1},h=!1,p={loadingDepKey:null,loadingDepPromise:null},m=new Map;function v(t){var n=t.key,r=Is(e,i,n);switch(m.set(n,r),l||(w(e,i,new Set(m.keys()),a),function(e,t){E(e,t)&&($t(C(e)).stateVersions.clear(),g(t,!1))}(e,a)),r.state){case"hasValue":return r.contents;case"hasError":throw r.contents;case"loading":throw p.loadingDepKey=n,p.loadingDepPromise=r.contents,r.contents}throw Jt("Invalid Loadable state")}try{A=r({get:v,getCallback:function(n){return function(){if(u)throw Jt("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");null==t&&zo(!1);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return js(e,n,i,{node:t})}}}),A=Gs(A)?v(A):A,Ts(A)&&("hasError"===A.state&&(h=!0),A=A.contents),Zt(A)?A=function(e,t,n,r,i,a){return t.then((function(t){if(!c())throw S(e),Ys;var a=Ls(t);return f(e,n,i,a,r),t})).catch((function(t){if(!c())throw S(e),Ys;if(Zt(t))return y(e,t,n,r,i,a);var A=ks(t);throw f(e,n,i,A,r),t}))}(e,A,i,m,a,p).finally(d):d(),A=A instanceof Ds?A.value:A}catch(B){Zt(A=B)?A=y(e,A,i,m,a,p).finally(d):(h=!0,d())}return o=h?ks(A):Zt(A)?Qs(A):Ls(A),l=!1,function(e,t,n){if(E(e,t)){var r=C(e);null!=r&&(r.depValuesDiscoveredSoFarDuringAsyncWork=n)}}(e,a,m),w(e,i,new Set(m.keys()),a),[o,m]}function _(e,t){var r=t.atomValues.get(n);if(null!=r)return r;var i,a=new Set;try{r=o.get((function(n){return"string"!==typeof n&&zo(!1),Is(e,t,n).contents}),{onNodeVisit:function(e){"branch"===e.type&&e.nodeKey!==n&&a.add(e.nodeKey)}})}catch(A){throw Jt('Problem with cache lookup for selector "'.concat(n,'": ').concat(A.message))}r&&(t.atomValues.set(n,r),w(e,t,a,null===(i=C(e))||void 0===i?void 0:i.executionID));return r}function b(e,t){var n=_(e,t);if(null!=n)return S(e),n;var r,i=x(e,t);if(null!=i)return"loading"===(null===(r=i.loadingLoadable)||void 0===r?void 0:r.state)&&m(e,i.executionID),i.loadingLoadable;var a=$s(),A=v(B(e,t,a),2),o=A[0],s=A[1];return"loading"===o.state?(!function(e,t,n,r,i){l.set(e,{depValuesDiscoveredSoFarDuringAsyncWork:r,executionID:t,loadingLoadable:n,stateVersions:new Map([[i.version,!0]])})}(e,a,o,s,t),m(e,a)):(S(e),U(t,o,s)),o}function x(e,t){function n(n){var r,i=Q(n);try{for(i.s();!(r=i.n()).done;){var a=v(r.value,2),A=a[0],o=a[1];if(!Is(e,t,A).is(o))return!0}}catch(s){i.e(s)}finally{i.f()}return!1}var r,i=Q(Oi([l.has(e)?[$t(l.get(e))]:[],Wn(Fr(l,(function(t){return v(t,1)[0]!==e})),(function(e){return v(e,2)[1]}))]));try{for(i.s();!(r=i.n()).done;){var a=r.value;if(a.stateVersions.get(t.version)||!n(a.depValuesDiscoveredSoFarDuringAsyncWork))return a.stateVersions.set(t.version,!0),a;a.stateVersions.set(t.version,!1)}}catch(A){i.e(A)}finally{i.f()}}function C(e){return l.get(e)}function S(e){l.delete(e)}function E(e,t){var n;return t===(null===(n=C(e))||void 0===n?void 0:n.executionID)}function U(e,t,r){e.atomValues.set(n,t);try{o.set(function(e){return Array.from(e.entries()).map((function(e){var t=v(e,2);return[t[0],t[1].contents]}))}(r),t)}catch(i){throw Jt('Problem with setting cache for selector "'.concat(n,'": ').concat(i.message))}}function M(e,t){var r=t.atomValues.get(n);return null!=r?r:o.get((function(n){var r;return"string"!==typeof n&&zo(!1),null===(r=Rs(e,t,n))||void 0===r?void 0:r.contents}))}function F(e,t){return function(e){if(Js.includes(n)){var t="Recoil selector has circular dependencies: ".concat(Js.slice(Js.indexOf(n)).join(" \u2192 "));return ks(Jt(t))}Js.push(n);try{return e()}finally{Js.pop()}}((function(){return b(e,t)}))}function T(e){e.atomValues.delete(n)}function k(e,n){null==t&&zo(!1);var r,i=Q(A);try{for(i.s();!(r=i.n()).done;){var a,s=r.value,l=Vs(s);null===(a=l.clearCache)||void 0===a||a.call(l,e,n)}}catch(u){i.e(u)}finally{i.f()}A.clear(),T(n),o.clear(),Ks(e,t)}if(null!=a){return t=zs({key:n,nodeType:"selector",peek:M,get:F,set:function(e,t,r){var i=!1,A=new Map;function o(r){var a=r.key;if(i)throw Jt("Recoil: Async selector sets are not currently supported.");var A=Is(e,t,a);if("hasValue"===A.state)return A.contents;if("loading"===A.state){var o='Getting value of asynchronous atom or selector "'.concat(a,'" in a pending state while setting selector "').concat(n,'" is not yet supported.');throw Fn(o),Jt(o)}throw A.contents}function s(n,r){if(i){var a="Recoil: Async selector sets are not currently supported.";throw Fn(a),Jt(a)}var s="function"===typeof r?r(o(n)):r;Hs(e,t,n.key,s).forEach((function(e,t){return A.set(t,e)}))}var l=a({set:s,get:o,reset:function(e){s(e,Ns)}},r);if(void 0!==l)throw Zt(l)?Jt("Recoil: Async selector sets are not currently supported."):Jt("Recoil: selector set should be a void function.");return i=!0,A},init:d,invalidate:T,clearCache:k,shouldDeleteConfigOnRelease:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:s})}return t=zs({key:n,nodeType:"selector",peek:M,get:F,init:d,invalidate:T,clearCache:k,shouldDeleteConfigOnRelease:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:s})}el.value=function(e){return new Ds(e)};var tl=el,nl=Bn.isLoadable,rl=Bn.loadableWithError,il=Bn.loadableWithPromise,al=Bn.loadableWithValue,Al=fs.WrappedValue,ol=Xr,sl=er.DEFAULT_VALUE,ll=er.DefaultValue,ul=er.getConfigDeletionHandler,cl=er.registerNode,dl=er.setConfigDeletionHandler,hl=Gn.isRecoilValue,fl=wi.getRecoilValueAsLoadable,pl=wi.markRecoilValueModified,gl=wi.setRecoilValue,ml=wi.setRecoilValueLoadable,vl=Di,yl=function(e){return e instanceof Al?e.value:e};function wl(e){var t=e.key,n=e.persistence_UNSTABLE,r=vl(e.retainedBy_UNSTABLE),i=0;function a(e){return il(e.then((function(e){return A=al(e),e})).catch((function(e){throw A=rl(e),e})))}var A=Zt(e.default)?a(e.default):nl(e.default)?"loading"===e.default.state?a(e.default.contents):e.default:al(yl(e.default));l(A.contents);var o=void 0,s=new Map;function l(e){return e}function u(e,n){var r,i;return null!==(r=null!==(i=n.atomValues.get(t))&&void 0!==i?i:o)&&void 0!==r?r:A}var c=cl({key:t,nodeType:"atom",peek:u,get:function(e,r){if(r.atomValues.has(t))return $t(r.atomValues.get(t));if(r.nonvalidatedAtoms.has(t)){if(null!=o)return o;if(null==n)return Kn("Tried to restore a persisted value for atom ".concat(t," but it has no persistence settings.")),A;var i=r.nonvalidatedAtoms.get(t),a=n.validator(i,sl),s=a instanceof ll?A:al(a);return o=s}return A},set:function(e,n,r){if(n.atomValues.has(t)){var i=$t(n.atomValues.get(t));if("hasValue"===i.state&&r===i.contents)return new Map}else if(!n.nonvalidatedAtoms.has(t)&&r instanceof ll)return new Map;return o=void 0,(new Map).set(t,al(r))},init:function(n,r,a){var o;if(i++,n.getState().knownAtoms.add(t),"loading"===A.state){A.contents.finally((function(){var e;(null!==(e=n.getState().nextTree)&&void 0!==e?e:n.getState().currentTree).atomValues.has(t)||pl(n,c)}))}var l=null!==(o=e.effects)&&void 0!==o?o:e.effects_UNSTABLE;if(null!=l){var d,h=function(e){if(m&&e.key===t){var i=g;return i instanceof ll?u(n,r):Zt(i)?il(i.then((function(e){return e instanceof ll?A.toPromise():e}))):al(i)}return fl(n,e)},f=function(e){return h(e).toPromise()},p=function(e){var r,i=ol(n,null!==(r=n.getState().nextTree)&&void 0!==r?r:n.getState().currentTree,e.key);return!m||e.key!==t||g instanceof ll?i:Kt(Kt({},i),{},{isSet:!0,loadable:h(e)})},g=sl,m=!0,v=!1,y=null,w=function(e){return function(t){if(m){var r=h(c),i="hasValue"===r.state?r.contents:sl;g="function"===typeof t?t(i):t,Zt(g)&&(g=g.then((function(t){return y={effect:e,value:t},t})))}else{if(Zt(t))throw Jt("Setting atoms to async values is not implemented.");"function"!==typeof t&&(y={effect:e,value:yl(t)}),gl(n,c,"function"===typeof t?function(n){var r=yl(t(n));return y={effect:e,value:r},r}:yl(t))}}},B=function(e){return function(){return w(e)(sl)}},_=function(e){return function(r){var i,a=n.subscribeToTransactions((function(n){var i,a=n.getState(),o=a.currentTree,s=a.previousTree;s||(Fn("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"),s=o);var l=null!==(i=o.atomValues.get(t))&&void 0!==i?i:A;if("hasValue"===l.state){var u,c,d,h,f=l.contents,p=null!==(u=s.atomValues.get(t))&&void 0!==u?u:A,g="hasValue"===p.state?p.contents:sl;(null===(c=y)||void 0===c?void 0:c.effect)!==e||(null===(d=y)||void 0===d?void 0:d.value)!==f?r(f,g,!o.atomValues.has(t)):(null===(h=y)||void 0===h?void 0:h.effect)===e&&(y=null)}}),t).release;s.set(n,[].concat(L(null!==(i=s.get(n))&&void 0!==i?i:[]),[a]))}},b=Q(l);try{for(b.s();!(d=b.n()).done;){var x=d.value;try{var C,S=x({node:c,storeID:n.storeID,parentStoreID_UNSTABLE:n.parentStoreID,trigger:a,setSelf:w(x),resetSelf:B(x),onSet:_(x),getPromise:f,getLoadable:h,getInfo_UNSTABLE:p});if(null!=S)s.set(n,[].concat(L(null!==(C=s.get(n))&&void 0!==C?C:[]),[S]))}catch(M){g=M,v=!0}}}catch(F){b.e(F)}finally{b.f()}if(m=!1,!(g instanceof ll)){var E,U=v?rl(g):Zt(g)?il(function(e,n){var r=n.then((function(n){var i,a;return(null===(a=(null!==(i=e.getState().nextTree)&&void 0!==i?i:e.getState().currentTree).atomValues.get(t))||void 0===a?void 0:a.contents)===r&&gl(e,c,n),n})).catch((function(n){var i,a;throw(null===(a=(null!==(i=e.getState().nextTree)&&void 0!==i?i:e.getState().currentTree).atomValues.get(t))||void 0===a?void 0:a.contents)===r&&ml(e,c,rl(n)),n}));return r}(n,g)):al(yl(g));U.contents,r.atomValues.set(t,U),null===(E=n.getState().nextTree)||void 0===E||E.atomValues.set(t,U)}}return function(){var e;i--,null===(e=s.get(n))||void 0===e||e.forEach((function(e){return e()})),s.delete(n)}},invalidate:function(){o=void 0},shouldDeleteConfigOnRelease:function(){return void 0!==ul(t)&&i<=0},dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:r});return c}function Bl(e){var t=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e)),n="default"in e?e.default:new Promise((function(){}));return hl(n)?function(e){var t=Bl(Kt(Kt({},e),{},{default:sl,persistence_UNSTABLE:void 0===e.persistence_UNSTABLE?void 0:Kt(Kt({},e.persistence_UNSTABLE),{},{validator:function(t){return t instanceof ll?t:$t(e.persistence_UNSTABLE).validator(t,sl)}}),effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE})),n=tl({key:"".concat(e.key,"__withFallback"),get:function(n){var r=(0,n.get)(t);return r instanceof ll?e.default:r},set:function(e,n){return(0,e.set)(t,n)},cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return dl(n.key,ul(e.key)),n}(Kt(Kt({},t),{},{default:n})):wl(Kt(Kt({},t),{},{default:n}))}Bl.value=function(e){return new Al(e)};var _l=Bl,bl={MapCache:function(){function e(t){var n;y(this,e),en(this,"_map",void 0),en(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=null!==(n=null===t||void 0===t?void 0:t.mapKey)&&void 0!==n?n:function(e){return e}}return _(e,[{key:"size",value:function(){return this._map.size}},{key:"has",value:function(e){return this._map.has(this._keyMapper(e))}},{key:"get",value:function(e){return this._map.get(this._keyMapper(e))}},{key:"set",value:function(e,t){this._map.set(this._keyMapper(e),t)}},{key:"delete",value:function(e){this._map.delete(this._keyMapper(e))}},{key:"clear",value:function(){this._map.clear()}}]),e}()}.MapCache,xl=Object.freeze({__proto__:null,MapCache:bl}),Cl=Bs.LRUCache,Sl=xl.MapCache,El={equality:"reference",eviction:"none",maxSize:1/0};var Ul=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:El,t=e.equality,n=void 0===t?El.equality:t,r=e.eviction,i=void 0===r?El.eviction:r,a=e.maxSize,A=void 0===a?El.maxSize:a,o=function(e){switch(e){case"reference":return function(e){return e};case"value":return function(e){return Ss(e)}}throw Jt("Unrecognized equality policy ".concat(e))}(n),s=function(e,t,n){switch(e){case"keep-all":return new Sl({mapKey:n});case"lru":return new Cl({mapKey:n,maxSize:$t(t)});case"most-recent":return new Cl({mapKey:n,maxSize:1})}throw Jt("Unrecognized eviction policy ".concat(e))}(i,A,o);return s},Ml=er.setConfigDeletionHandler;var Fl=function(e){var t,n,r=Ul({equality:null!==(t=null===(n=e.cachePolicyForParams_UNSTABLE)||void 0===n?void 0:n.equality)&&void 0!==t?t:"value",eviction:"keep-all"});return function(t){var n,i,a=r.get(t);if(null!=a)return a;e.cachePolicyForParams_UNSTABLE;var A=zt(e,Xt),o="default"in e?e.default:new Promise((function(){})),s=_l(Kt(Kt({},A),{},{key:"".concat(e.key,"__").concat(null!==(n=Ss(t))&&void 0!==n?n:"void"),default:"function"===typeof o?o(t):o,retainedBy_UNSTABLE:"function"===typeof e.retainedBy_UNSTABLE?e.retainedBy_UNSTABLE(t):e.retainedBy_UNSTABLE,effects:"function"===typeof e.effects?e.effects(t):"function"===typeof e.effects_UNSTABLE?e.effects_UNSTABLE(t):null!==(i=e.effects)&&void 0!==i?i:e.effects_UNSTABLE}));return r.set(t,s),Ml(s.key,(function(){r.delete(t)})),s}},Tl=er.setConfigDeletionHandler,kl=0;var Ql=function(e){var t,n,r=Ul({equality:null!==(t=null===(n=e.cachePolicyForParams_UNSTABLE)||void 0===n?void 0:n.equality)&&void 0!==t?t:"value",eviction:"keep-all"});return function(t){var n,i;try{i=r.get(t)}catch(c){throw Jt("Problem with cache lookup for selector ".concat(e.key,": ").concat(c.message))}if(null!=i)return i;var a,A="".concat(e.key,"__selectorFamily/").concat(null!==(n=Ss(t,{allowFunctions:!0}))&&void 0!==n?n:"void","/").concat(kl++),o=function(n){return e.get(t)(n)},s=e.cachePolicy_UNSTABLE,l="function"===typeof e.retainedBy_UNSTABLE?e.retainedBy_UNSTABLE(t):e.retainedBy_UNSTABLE;if(null!=e.set){var u=e.set;a=tl({key:A,get:o,set:function(e,n){return u(t)(e,n)},cachePolicy_UNSTABLE:s,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:l})}else a=tl({key:A,get:o,cachePolicy_UNSTABLE:s,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:l});return r.set(t,a),Tl(a.key,(function(){r.delete(t)})),a}},Ll=Ql({key:"__constant",get:function(e){return function(){return e}},cachePolicyForParams_UNSTABLE:{equality:"reference"}});var Dl=function(e){return Ll(e)},Il=Ql({key:"__error",get:function(e){return function(){throw Jt(e)}},cachePolicyForParams_UNSTABLE:{equality:"reference"}});var Rl=function(e){return Il(e)};var Hl=function(e){return e},Pl=Bn.loadableWithError,Nl=Bn.loadableWithPromise,Ol=Bn.loadableWithValue;function Vl(e,t){var n,r=Array(t.length).fill(void 0),i=Array(t.length).fill(void 0),a=Q(t.entries());try{for(a.s();!(n=a.n()).done;){var A=v(n.value,2),o=A[0],s=A[1];try{r[o]=e(s)}catch(l){i[o]=l}}}catch(u){a.e(u)}finally{a.f()}return[r,i]}function zl(e){return null!=e&&!Zt(e)}function Gl(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map((function(t){return e[t]}))}function Kl(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((function(e,n,r){return Kt(Kt({},e),{},M({},n,t[r]))}),{})}function Wl(e,t,n){return Kl(e,n.map((function(e,n){return null==e?Ol(t[n]):Zt(e)?Nl(e):Pl(e)})))}var jl=Ql({key:"__waitForNone",get:function(e){return function(t){var n=v(Vl(t.get,Gl(e)),2),r=n[0],i=n[1];return Wl(e,r,i)}},dangerouslyAllowMutability:!0}),Xl=Ql({key:"__waitForAny",get:function(e){return function(t){var n=v(Vl(t.get,Gl(e)),2),r=n[0],i=n[1];return i.some((function(e){return!Zt(e)}))?Wl(e,r,i):new Promise((function(t){var n,a=Q(i.entries());try{var A=function(){var a=v(n.value,2),A=a[0],o=a[1];Zt(o)&&o.then((function(n){r[A]=n,i[A]=void 0,t(Wl(e,r,i))})).catch((function(n){i[A]=n,t(Wl(e,r,i))}))};for(a.s();!(n=a.n()).done;)A()}catch(o){a.e(o)}finally{a.f()}}))}},dangerouslyAllowMutability:!0}),ql=Ql({key:"__waitForAll",get:function(e){return function(t){var n=v(Vl(t.get,Gl(e)),2),r=n[0],i=n[1];if(i.every((function(e){return null==e})))return Kl(e,r);var a=i.find(zl);if(null!=a)throw a;return Promise.all(i).then((function(t){return Kl(e,(n=r,t.map((function(e,t){return void 0===e?n[t]:e}))));var n}))}},dangerouslyAllowMutability:!0}),Yl=Ql({key:"__waitForAllSettled",get:function(e){return function(t){var n=v(Vl(t.get,Gl(e)),2),r=n[0],i=n[1];return i.every((function(e){return!Zt(e)}))?Wl(e,r,i):Promise.all(i.map((function(e,t){return Zt(e)?e.then((function(e){r[t]=e,i[t]=void 0})).catch((function(e){r[t]=void 0,i[t]=e})):null}))).then((function(){return Wl(e,r,i)}))}},dangerouslyAllowMutability:!0}),Jl={waitForNone:jl,waitForAny:Xl,waitForAll:ql,waitForAllSettled:Yl,noWait:Ql({key:"__noWait",get:function(e){return function(t){var n=t.get;try{return tl.value(Ol(n(e)))}catch(r){return tl.value(Zt(r)?Nl(r):Pl(r))}}},dangerouslyAllowMutability:!0})},Zl=Bn.RecoilLoadable,$l=er.DefaultValue,eu=iA,tu=oA,nu=Gn.isRecoilValue,ru=Er.retentionZone,iu=Ba.freshSnapshot,au={DefaultValue:$l,isRecoilValue:nu,RecoilLoadable:Zl,RecoilEnv:bn,RecoilRoot:eu,useRecoilStoreID:tu,useRecoilBridgeAcrossReactRoots_UNSTABLE:Mo,atom:_l,selector:tl,atomFamily:Fl,selectorFamily:Ql,constSelector:Dl,errorSelector:Rl,readOnlySelector:Hl,noWait:Jl.noWait,waitForNone:Jl.waitForNone,waitForAny:Jl.waitForAny,waitForAll:Jl.waitForAll,waitForAllSettled:Jl.waitForAllSettled,useRecoilValue:qA,useRecoilValueLoadable:YA,useRecoilState:jA,useRecoilStateLoadable:XA,useSetRecoilState:ZA,useResetRecoilState:JA,useGetRecoilValueInfo_UNSTABLE:xo,useRecoilRefresher_UNSTABLE:os,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:$A,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:eo,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:to,useRecoilCallback:rs,useRecoilTransaction_UNSTABLE:cs,useGotoRecoilSnapshot:wo,useRecoilSnapshot:vo,useRecoilTransactionObserver_UNSTABLE:Bo,snapshot_UNSTABLE:iu,useRetain:yA,retentionZone:ru},Au=au.RecoilRoot,ou=au.atom,su=au.useRecoilValue,lu=au.useRecoilState,uu=au.useSetRecoilState,cu={con:"gallery_con__MqM+8",menuCon:"gallery_menuCon__ZbjQR",menu:"gallery_menu__chTCW",selected:"gallery_selected__9FMZy",cardsCon:"gallery_cardsCon__ZyPY7",card:"gallery_card__BhmBF",coverImg:"gallery_coverImg__BUl+D",prompt:"gallery_prompt__8rfWe",show:"gallery_show__vNBZq",infoCon:"gallery_infoCon__YLeZI",avatar:"gallery_avatar__xjAFH",spaceholder:"gallery_spaceholder__uAj4T"};function du(e,t){return function(){return e.apply(t,arguments)}}var hu=Object.prototype.toString,fu=Object.getPrototypeOf,pu=function(e){return function(t){var n=hu.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())}}(Object.create(null)),gu=function(e){return e=e.toLowerCase(),function(t){return pu(t)===e}},mu=function(e){return function(t){return typeof t===e}},vu=Array.isArray,yu=mu("undefined");var wu=gu("ArrayBuffer");var Bu=mu("string"),_u=mu("function"),bu=mu("number"),xu=function(e){return null!==e&&"object"===typeof e},Cu=function(e){if("object"!==pu(e))return!1;var t=fu(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Su=gu("Date"),Eu=gu("File"),Uu=gu("Blob"),Mu=gu("FileList"),Fu=gu("URLSearchParams");function Tu(e,t){var n,r,i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,a=void 0!==i&&i;if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),vu(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{var A,o=a?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;for(n=0;n<s;n++)A=o[n],t.call(null,e[A],A,e)}}function ku(e,t){t=t.toLowerCase();for(var n,r=Object.keys(e),i=r.length;i-- >0;)if(t===(n=r[i]).toLowerCase())return n;return null}var Qu="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,Lu=function(e){return!yu(e)&&e!==Qu};var Du,Iu=(Du="undefined"!==typeof Uint8Array&&fu(Uint8Array),function(e){return Du&&e instanceof Du}),Ru=gu("HTMLFormElement"),Hu=function(e){var t=Object.prototype.hasOwnProperty;return function(e,n){return t.call(e,n)}}(),Pu=gu("RegExp"),Nu=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};Tu(n,(function(n,i){!1!==t(n,i,e)&&(r[i]=n)})),Object.defineProperties(e,r)},Ou="abcdefghijklmnopqrstuvwxyz",Vu="0123456789",zu={DIGIT:Vu,ALPHA:Ou,ALPHA_DIGIT:Ou+Ou.toUpperCase()+Vu};var Gu={isArray:vu,isArrayBuffer:wu,isBuffer:function(e){return null!==e&&!yu(e)&&null!==e.constructor&&!yu(e.constructor)&&_u(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"===typeof FormData&&e instanceof FormData||hu.call(e)===t||_u(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&wu(e.buffer)},isString:Bu,isNumber:bu,isBoolean:function(e){return!0===e||!1===e},isObject:xu,isPlainObject:Cu,isUndefined:yu,isDate:Su,isFile:Eu,isBlob:Uu,isRegExp:Pu,isFunction:_u,isStream:function(e){return xu(e)&&_u(e.pipe)},isURLSearchParams:Fu,isTypedArray:Iu,isFileList:Mu,forEach:Tu,merge:function e(){for(var t=(Lu(this)&&this||{}).caseless,n={},r=function(r,i){var a=t&&ku(n,i)||i;Cu(n[a])&&Cu(r)?n[a]=e(n[a],r):Cu(r)?n[a]=e({},r):vu(r)?n[a]=r.slice():n[a]=r},i=0,a=arguments.length;i<a;i++)arguments[i]&&Tu(arguments[i],r);return n},extend:function(e,t,n){return Tu(t,(function(t,r){n&&_u(t)?e[r]=du(t,n):e[r]=t}),{allOwnKeys:(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var i,a,A,o={};if(t=t||{},null==e)return t;do{for(a=(i=Object.getOwnPropertyNames(e)).length;a-- >0;)A=i[a],r&&!r(A,e,t)||o[A]||(t[A]=e[A],o[A]=!0);e=!1!==n&&fu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:pu,kindOfTest:gu,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(vu(e))return e;var t=e.length;if(!bu(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,r=(e&&e[Symbol.iterator]).call(e);(n=r.next())&&!n.done;){var i=n.value;t.call(e,i[0],i[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Ru,hasOwnProperty:Hu,hasOwnProp:Hu,reduceDescriptors:Nu,freezeMethods:function(e){Nu(e,(function(t,n){if(_u(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];_u(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:function(e,t){var n={},r=function(e){e.forEach((function(e){n[e]=!0}))};return vu(e)?r(e):r(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))},noop:function(){},toFiniteNumber:function(e,t){return e=+e,Number.isFinite(e)?e:t},findKey:ku,global:Qu,isContextDefined:Lu,ALPHABET:zu,generateString:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zu.ALPHA_DIGIT,n="",r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&_u(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(n,r){if(xu(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[r]=n;var i=vu(n)?[]:{};return Tu(n,(function(t,n){var a=e(t,r+1);!yu(a)&&(i[n]=a)})),t[r]=void 0,i}}return n}(e,0)}};function Ku(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}Gu.inherits(Ku,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Gu.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Wu=Ku.prototype,ju={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){ju[e]={value:e}})),Object.defineProperties(Ku,ju),Object.defineProperty(Wu,"isAxiosError",{value:!0}),Ku.from=function(e,t,n,r,i,a){var A=Object.create(Wu);return Gu.toFlatObject(e,A,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),Ku.call(A,e.message,t,n,r,i),A.cause=e,A.name=e.name,a&&Object.assign(A,a),A};var Xu=Ku;function qu(e){return Gu.isPlainObject(e)||Gu.isArray(e)}function Yu(e){return Gu.endsWith(e,"[]")?e.slice(0,-2):e}function Ju(e,t,n){return e?e.concat(t).map((function(e,t){return e=Yu(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var Zu=Gu.toFlatObject(Gu,{},null,(function(e){return/^is[A-Z]/.test(e)}));var $u=function(e,t,n){if(!Gu.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Gu.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Gu.isUndefined(t[e])}));var r=n.metaTokens,i=n.visitor||l,a=n.dots,A=n.indexes,o=(n.Blob||"undefined"!==typeof Blob&&Blob)&&Gu.isSpecCompliantForm(t);if(!Gu.isFunction(i))throw new TypeError("visitor must be a function");function s(e){if(null===e)return"";if(Gu.isDate(e))return e.toISOString();if(!o&&Gu.isBlob(e))throw new Xu("Blob is not supported. Use a Buffer instead.");return Gu.isArrayBuffer(e)||Gu.isTypedArray(e)?o&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,i){var o=e;if(e&&!i&&"object"===typeof e)if(Gu.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Gu.isArray(e)&&function(e){return Gu.isArray(e)&&!e.some(qu)}(e)||(Gu.isFileList(e)||Gu.endsWith(n,"[]"))&&(o=Gu.toArray(e)))return n=Yu(n),o.forEach((function(e,r){!Gu.isUndefined(e)&&null!==e&&t.append(!0===A?Ju([n],r,a):null===A?n:n+"[]",s(e))})),!1;return!!qu(e)||(t.append(Ju(i,n,a),s(e)),!1)}var u=[],c=Object.assign(Zu,{defaultVisitor:l,convertValue:s,isVisitable:qu});if(!Gu.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Gu.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Gu.forEach(n,(function(n,a){!0===(!(Gu.isUndefined(n)||null===n)&&i.call(t,n,Gu.isString(a)?a.trim():a,r,c))&&e(n,r?r.concat(a):[a])})),u.pop()}}(e),t};function ec(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function tc(e,t){this._pairs=[],e&&$u(e,this,t)}var nc=tc.prototype;nc.append=function(e,t){this._pairs.push([e,t])},nc.toString=function(e){var t=e?function(t){return e.call(this,t,ec)}:ec;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var rc=tc;function ic(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ac(e,t,n){if(!t)return e;var r,i=n&&n.encode||ic,a=n&&n.serialize;if(r=a?a(t,n):Gu.isURLSearchParams(t)?t.toString():new rc(t,n).toString(i)){var A=e.indexOf("#");-1!==A&&(e=e.slice(0,A)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}var Ac=function(){function e(){y(this,e),this.handlers=[]}return _(e,[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){Gu.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),e}(),oc=Ac,sc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},lc="undefined"!==typeof URLSearchParams?URLSearchParams:rc,uc="undefined"!==typeof FormData?FormData:null,cc=function(){var e;return("undefined"===typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!==typeof window&&"undefined"!==typeof document)}(),dc="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,hc={isBrowser:!0,classes:{URLSearchParams:lc,FormData:uc,Blob:Blob},isStandardBrowserEnv:cc,isStandardBrowserWebWorkerEnv:dc,protocols:["http","https","file","blob","url","data"]};var fc=function(e){function t(e,n,r,i){var a=e[i++],A=Number.isFinite(+a),o=i>=e.length;return a=!a&&Gu.isArray(r)?r.length:a,o?(Gu.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!A):(r[a]&&Gu.isObject(r[a])||(r[a]=[]),t(e,n,r[a],i)&&Gu.isArray(r[a])&&(r[a]=function(e){var t,n,r={},i=Object.keys(e),a=i.length;for(t=0;t<a;t++)r[n=i[t]]=e[n];return r}(r[a])),!A)}if(Gu.isFormData(e)&&Gu.isFunction(e.entries)){var n={};return Gu.forEachEntry(e,(function(e,r){t(function(e){return Gu.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),r,n,0)})),n}return null},pc={"Content-Type":void 0};var gc={transitional:sc,adapter:["xhr","http"],transformRequest:[function(e,t){var n,r=t.getContentType()||"",i=r.indexOf("application/json")>-1,a=Gu.isObject(e);if(a&&Gu.isHTMLForm(e)&&(e=new FormData(e)),Gu.isFormData(e))return i&&i?JSON.stringify(fc(e)):e;if(Gu.isArrayBuffer(e)||Gu.isBuffer(e)||Gu.isStream(e)||Gu.isFile(e)||Gu.isBlob(e))return e;if(Gu.isArrayBufferView(e))return e.buffer;if(Gu.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return $u(e,new hc.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return hc.isNode&&Gu.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=Gu.isFileList(e))||r.indexOf("multipart/form-data")>-1){var A=this.env&&this.env.FormData;return $u(n?{"files[]":e}:e,A&&new A,this.formSerializer)}}return a||i?(t.setContentType("application/json",!1),function(e,t,n){if(Gu.isString(e))try{return(t||JSON.parse)(e),Gu.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||gc.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&Gu.isString(e)&&(n&&!this.responseType||r)){var i=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(a){if(i){if("SyntaxError"===a.name)throw Xu.from(a,Xu.ERR_BAD_RESPONSE,this,null,this.response);throw a}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:hc.classes.FormData,Blob:hc.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Gu.forEach(["delete","get","head"],(function(e){gc.headers[e]={}})),Gu.forEach(["post","put","patch"],(function(e){gc.headers[e]=Gu.merge(pc)}));var mc=gc,vc=Gu.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),yc=Symbol("internals");function wc(e){return e&&String(e).trim().toLowerCase()}function Bc(e){return!1===e||null==e?e:Gu.isArray(e)?e.map(Bc):String(e)}function _c(e,t,n,r,i){return Gu.isFunction(r)?r.call(this,t,n):(i&&(t=n),Gu.isString(t)?Gu.isString(r)?-1!==t.indexOf(r):Gu.isRegExp(r)?r.test(t):void 0:void 0)}var bc=function(e,t){function n(e){y(this,n),e&&this.set(e)}return _(n,[{key:"set",value:function(e,t,n){var r=this;function i(e,t,n){var i=wc(t);if(!i)throw new Error("header name must be a non-empty string");var a=Gu.findKey(r,i);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=Bc(e))}var a=function(e,t){return Gu.forEach(e,(function(e,n){return i(e,n,t)}))};return Gu.isPlainObject(e)||e instanceof this.constructor?a(e,t):Gu.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z]+$/.test(e.trim())?a(function(e){var t,n,r,i={};return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!t||i[t]&&vc[t]||("set-cookie"===t?i[t]?i[t].push(n):i[t]=[n]:i[t]=i[t]?i[t]+", "+n:n)})),i}(e),t):null!=e&&i(t,e,n),this}},{key:"get",value:function(e,t){if(e=wc(e)){var n=Gu.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return function(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}(r);if(Gu.isFunction(t))return t.call(this,r,n);if(Gu.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=wc(e)){var n=Gu.findKey(this,e);return!(!n||void 0===this[n]||t&&!_c(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function i(e){if(e=wc(e)){var i=Gu.findKey(n,e);!i||t&&!_c(0,n[i],i,t)||(delete n[i],r=!0)}}return Gu.isArray(e)?e.forEach(i):i(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var i=t[n];e&&!_c(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return Gu.forEach(this,(function(r,i){var a=Gu.findKey(n,i);if(a)return t[a]=Bc(r),void delete t[i];var A=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))}(i):String(i).trim();A!==i&&delete t[i],t[A]=Bc(r),n[A]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=this.constructor).concat.apply(e,[this].concat(n))}},{key:"toJSON",value:function(e){var t=Object.create(null);return Gu.forEach(this,(function(n,r){null!=n&&!1!==n&&(t[r]=e&&Gu.isArray(n)?n.join(", "):n)})),t}},{key:Symbol.iterator,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map((function(e){var t=v(e,2);return t[0]+": "+t[1]})).join("\n")}},{key:Symbol.toStringTag,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.forEach((function(e){return t.set(e)})),t}},{key:"accessor",value:function(e){var t=(this[yc]=this[yc]={accessors:{}}).accessors,n=this.prototype;function r(e){var r=wc(e);t[r]||(!function(e,t){var n=Gu.toCamelCase(" "+t);["get","set","has"].forEach((function(r){Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return Gu.isArray(e)?e.forEach(r):r(e),this}}]),n}();bc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Gu.freezeMethods(bc.prototype),Gu.freezeMethods(bc);var xc=bc;function Cc(e,t){var n=this||mc,r=t||n,i=xc.from(r.headers),a=r.data;return Gu.forEach(e,(function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)})),i.normalize(),a}function Sc(e){return!(!e||!e.__CANCEL__)}function Ec(e,t,n){Xu.call(this,null==e?"canceled":e,Xu.ERR_CANCELED,t,n),this.name="CanceledError"}Gu.inherits(Ec,Xu,{__CANCEL__:!0});var Uc=Ec;var Mc=hc.isStandardBrowserEnv?{write:function(e,t,n,r,i,a){var A=[];A.push(e+"="+encodeURIComponent(t)),Gu.isNumber(n)&&A.push("expires="+new Date(n).toGMTString()),Gu.isString(r)&&A.push("path="+r),Gu.isString(i)&&A.push("domain="+i),!0===a&&A.push("secure"),document.cookie=A.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Fc(e,t){return e&&!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Tc=hc.isStandardBrowserEnv?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=Gu.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0};var kc=function(e,t){e=e||10;var n,r=new Array(e),i=new Array(e),a=0,A=0;return t=void 0!==t?t:1e3,function(o){var s=Date.now(),l=i[A];n||(n=s),r[a]=o,i[a]=s;for(var u=A,c=0;u!==a;)c+=r[u++],u%=e;if((a=(a+1)%e)===A&&(A=(A+1)%e),!(s-n<t)){var d=l&&s-l;return d?Math.round(1e3*c/d):void 0}}};function Qc(e,t){var n=0,r=kc(50,250);return function(i){var a=i.loaded,A=i.lengthComputable?i.total:void 0,o=a-n,s=r(o);n=a;var l={loaded:a,total:A,progress:A?a/A:void 0,bytes:o,rate:s||void 0,estimated:s&&A&&a<=A?(A-a)/s:void 0,event:i};l[t?"download":"upload"]=!0,e(l)}}var Lc="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){var r,i=e.data,a=xc.from(e.headers).normalize(),A=e.responseType;function o(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}Gu.isFormData(i)&&(hc.isStandardBrowserEnv||hc.isStandardBrowserWebWorkerEnv)&&a.setContentType(!1);var s=new XMLHttpRequest;if(e.auth){var l=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(l+":"+u))}var c=Fc(e.baseURL,e.url);function d(){if(s){var r=xc.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders());!function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Xu("Request failed with status code "+n.status,[Xu.ERR_BAD_REQUEST,Xu.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),o()}),(function(e){n(e),o()}),{data:A&&"text"!==A&&"json"!==A?s.response:s.responseText,status:s.status,statusText:s.statusText,headers:r,config:e,request:s}),s=null}}if(s.open(e.method.toUpperCase(),ac(c,e.params,e.paramsSerializer),!0),s.timeout=e.timeout,"onloadend"in s?s.onloadend=d:s.onreadystatechange=function(){s&&4===s.readyState&&(0!==s.status||s.responseURL&&0===s.responseURL.indexOf("file:"))&&setTimeout(d)},s.onabort=function(){s&&(n(new Xu("Request aborted",Xu.ECONNABORTED,e,s)),s=null)},s.onerror=function(){n(new Xu("Network Error",Xu.ERR_NETWORK,e,s)),s=null},s.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||sc;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Xu(t,r.clarifyTimeoutError?Xu.ETIMEDOUT:Xu.ECONNABORTED,e,s)),s=null},hc.isStandardBrowserEnv){var h=(e.withCredentials||Tc(c))&&e.xsrfCookieName&&Mc.read(e.xsrfCookieName);h&&a.set(e.xsrfHeaderName,h)}void 0===i&&a.setContentType(null),"setRequestHeader"in s&&Gu.forEach(a.toJSON(),(function(e,t){s.setRequestHeader(t,e)})),Gu.isUndefined(e.withCredentials)||(s.withCredentials=!!e.withCredentials),A&&"json"!==A&&(s.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&s.addEventListener("progress",Qc(e.onDownloadProgress,!0)),"function"===typeof e.onUploadProgress&&s.upload&&s.upload.addEventListener("progress",Qc(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=function(t){s&&(n(!t||t.type?new Uc(null,e,s):t),s.abort(),s=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r)));var f=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(c);f&&-1===hc.protocols.indexOf(f)?n(new Xu("Unsupported protocol "+f+":",Xu.ERR_BAD_REQUEST,e)):s.send(i||null)}))},Dc={http:null,xhr:Lc};Gu.forEach(Dc,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));var Ic=function(e){for(var t,n,r=(e=Gu.isArray(e)?e:[e]).length,i=0;i<r&&(t=e[i],!(n=Gu.isString(t)?Dc[t.toLowerCase()]:t));i++);if(!n){if(!1===n)throw new Xu("Adapter ".concat(t," is not supported by the environment"),"ERR_NOT_SUPPORT");throw new Error(Gu.hasOwnProp(Dc,t)?"Adapter '".concat(t,"' is not available in the build"):"Unknown adapter '".concat(t,"'"))}if(!Gu.isFunction(n))throw new TypeError("adapter is not a function");return n};function Rc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Uc(null,e)}function Hc(e){return Rc(e),e.headers=xc.from(e.headers),e.data=Cc.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ic(e.adapter||mc.adapter)(e).then((function(t){return Rc(e),t.data=Cc.call(e,e.transformResponse,t),t.headers=xc.from(t.headers),t}),(function(t){return Sc(t)||(Rc(e),t&&t.response&&(t.response.data=Cc.call(e,e.transformResponse,t.response),t.response.headers=xc.from(t.response.headers))),Promise.reject(t)}))}var Pc=function(e){return e instanceof xc?e.toJSON():e};function Nc(e,t){t=t||{};var n={};function r(e,t,n){return Gu.isPlainObject(e)&&Gu.isPlainObject(t)?Gu.merge.call({caseless:n},e,t):Gu.isPlainObject(t)?Gu.merge({},t):Gu.isArray(t)?t.slice():t}function i(e,t,n){return Gu.isUndefined(t)?Gu.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function a(e,t){if(!Gu.isUndefined(t))return r(void 0,t)}function A(e,t){return Gu.isUndefined(t)?Gu.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function o(n,i,a){return a in t?r(n,i):a in e?r(void 0,n):void 0}var s={url:a,method:a,data:a,baseURL:A,transformRequest:A,transformResponse:A,paramsSerializer:A,timeout:A,timeoutMessage:A,withCredentials:A,adapter:A,responseType:A,xsrfCookieName:A,xsrfHeaderName:A,onUploadProgress:A,onDownloadProgress:A,decompress:A,maxContentLength:A,maxBodyLength:A,beforeRedirect:A,transport:A,httpAgent:A,httpsAgent:A,cancelToken:A,socketPath:A,responseEncoding:A,validateStatus:o,headers:function(e,t){return i(Pc(e),Pc(t),!0)}};return Gu.forEach(Object.keys(e).concat(Object.keys(t)),(function(r){var a=s[r]||i,A=a(e[r],t[r],r);Gu.isUndefined(A)&&a!==o||(n[r]=A)})),n}var Oc="1.3.3",Vc={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Vc[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var zc={};Vc.transitional=function(e,t,n){function r(e,t){return"[Axios v1.3.3] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,a){if(!1===e)throw new Xu(r(i," has been removed"+(t?" in "+t:"")),Xu.ERR_DEPRECATED);return t&&!zc[i]&&(zc[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,a)}};var Gc={assertOptions:function(e,t,n){if("object"!==typeof e)throw new Xu("options must be an object",Xu.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),i=r.length;i-- >0;){var a=r[i],A=t[a];if(A){var o=e[a],s=void 0===o||A(o,a,e);if(!0!==s)throw new Xu("option "+a+" must be "+s,Xu.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Xu("Unknown option "+a,Xu.ERR_BAD_OPTION)}},validators:Vc},Kc=Gc.validators,Wc=function(){function e(t){y(this,e),this.defaults=t,this.interceptors={request:new oc,response:new oc}}return _(e,[{key:"request",value:function(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{};var n,r=t=Nc(this.defaults,t),i=r.transitional,a=r.paramsSerializer,A=r.headers;void 0!==i&&Gc.assertOptions(i,{silentJSONParsing:Kc.transitional(Kc.boolean),forcedJSONParsing:Kc.transitional(Kc.boolean),clarifyTimeoutError:Kc.transitional(Kc.boolean)},!1),void 0!==a&&Gc.assertOptions(a,{encode:Kc.function,serialize:Kc.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase(),(n=A&&Gu.merge(A.common,A[t.method]))&&Gu.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete A[e]})),t.headers=xc.concat(n,A);var o=[],s=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));var l,u=[];this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));var c,d=0;if(!s){var h=[Hc.bind(this),void 0];for(h.unshift.apply(h,o),h.push.apply(h,u),c=h.length,l=Promise.resolve(t);d<c;)l=l.then(h[d++],h[d++]);return l}c=o.length;var f=t;for(d=0;d<c;){var p=o[d++],g=o[d++];try{f=p(f)}catch(m){g.call(this,m);break}}try{l=Hc.call(this,f)}catch(m){return Promise.reject(m)}for(d=0,c=u.length;d<c;)l=l.then(u[d++],u[d++]);return l}},{key:"getUri",value:function(e){return ac(Fc((e=Nc(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}]),e}();Gu.forEach(["delete","get","head","options"],(function(e){Wc.prototype[e]=function(t,n){return this.request(Nc(n||{},{method:e,url:t,data:(n||{}).data}))}})),Gu.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(Nc(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Wc.prototype[e]=t(),Wc.prototype[e+"Form"]=t(!0)}));var jc=Wc,Xc=function(){function e(t){if(y(this,e),"function"!==typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;this.promise.then((function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},t((function(e,t,i){r.reason||(r.reason=new Uc(e,t,i),n(r.reason))}))}return _(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}}],[{key:"source",value:function(){var t;return{token:new e((function(e){t=e})),cancel:t}}}]),e}(),qc=Xc;var Yc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Yc).forEach((function(e){var t=v(e,2),n=t[0],r=t[1];Yc[r]=n}));var Jc=Yc;var Zc=function e(t){var n=new jc(t),r=du(jc.prototype.request,n);return Gu.extend(r,jc.prototype,n,{allOwnKeys:!0}),Gu.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Nc(t,n))},r}(mc);Zc.Axios=jc,Zc.CanceledError=Uc,Zc.CancelToken=qc,Zc.isCancel=Sc,Zc.VERSION=Oc,Zc.toFormData=$u,Zc.AxiosError=Xu,Zc.Cancel=Zc.CanceledError,Zc.all=function(e){return Promise.all(e)},Zc.spread=function(e){return function(t){return e.apply(null,t)}},Zc.isAxiosError=function(e){return Gu.isObject(e)&&!0===e.isAxiosError},Zc.mergeConfig=Nc,Zc.AxiosHeaders=xc,Zc.formToJSON=function(e){return fc(Gu.isHTMLForm(e)?new FormData(e):e)},Zc.HttpStatusCode=Jc,Zc.default=Zc;var $c=Zc;function ed(){return ed="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=C(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ed.apply(this,arguments)}var td=Object.create(null);td.open="0",td.close="1",td.ping="2",td.pong="3",td.message="4",td.upgrade="5",td.noop="6";var nd=Object.create(null);Object.keys(td).forEach((function(e){nd[td[e]]=e}));var rd,id={type:"error",data:"parser error"},ad="function"===typeof Blob||"undefined"!==typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),Ad="function"===typeof ArrayBuffer,od=function(e){return"function"===typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},sd=function(e,t,n){var r=e.type,i=e.data;return ad&&i instanceof Blob?t?n(i):ld(i,n):Ad&&(i instanceof ArrayBuffer||od(i))?t?n(i):ld(new Blob([i]),n):n(td[r]+(i||""))},ld=function(e,t){var n=new FileReader;return n.onload=function(){var e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)};function ud(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}for(var cd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dd="undefined"===typeof Uint8Array?[]:new Uint8Array(256),hd=0;hd<64;hd++)dd[cd.charCodeAt(hd)]=hd;var fd,pd="function"===typeof ArrayBuffer,gd=function(e,t){if("string"!==typeof e)return{type:"message",data:vd(e,t)};var n=e.charAt(0);return"b"===n?{type:"message",data:md(e.substring(1),t)}:nd[n]?e.length>1?{type:nd[n],data:e.substring(1)}:{type:nd[n]}:id},md=function(e,t){if(pd){var n=function(e){var t,n,r,i,a,A=.75*e.length,o=e.length,s=0;"="===e[e.length-1]&&(A--,"="===e[e.length-2]&&A--);var l=new ArrayBuffer(A),u=new Uint8Array(l);for(t=0;t<o;t+=4)n=dd[e.charCodeAt(t)],r=dd[e.charCodeAt(t+1)],i=dd[e.charCodeAt(t+2)],a=dd[e.charCodeAt(t+3)],u[s++]=n<<2|r>>4,u[s++]=(15&r)<<4|i>>2,u[s++]=(3&i)<<6|63&a;return l}(e);return vd(n,t)}return{base64:!0,data:e}},vd=function(e,t){return"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer},yd=String.fromCharCode(30);function wd(){return new TransformStream({transform:function(e,t){!function(e,t){ad&&e.data instanceof Blob?e.data.arrayBuffer().then(ud).then(t):Ad&&(e.data instanceof ArrayBuffer||od(e.data))?t(ud(e.data)):sd(e,!1,(function(e){rd||(rd=new TextEncoder),t(rd.encode(e))}))}(e,(function(n){var r,i=n.length;if(i<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,i);else if(i<65536){r=new Uint8Array(3);var a=new DataView(r.buffer);a.setUint8(0,126),a.setUint16(1,i)}else{r=new Uint8Array(9);var A=new DataView(r.buffer);A.setUint8(0,127),A.setBigUint64(1,BigInt(i))}e.data&&"string"!==typeof e.data&&(r[0]|=128),t.enqueue(r),t.enqueue(n)}))}})}function Bd(e){return e.reduce((function(e,t){return e+t.length}),0)}function _d(e,t){if(e[0].length===t)return e.shift();for(var n=new Uint8Array(t),r=0,i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function bd(e){if(e)return function(e){for(var t in bd.prototype)e[t]=bd.prototype[t];return e}(e)}bd.prototype.on=bd.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},bd.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},bd.prototype.off=bd.prototype.removeListener=bd.prototype.removeAllListeners=bd.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},bd.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},bd.prototype.emitReserved=bd.prototype.emit,bd.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},bd.prototype.hasListeners=function(e){return!!this.listeners(e).length};var xd="undefined"!==typeof self?self:"undefined"!==typeof window?window:Function("return this")();function Cd(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((function(t,n){return e.hasOwnProperty(n)&&(t[n]=e[n]),t}),{})}var Sd=xd.setTimeout,Ed=xd.clearTimeout;function Ud(e,t){t.useNativeTimers?(e.setTimeoutFn=Sd.bind(xd),e.clearTimeoutFn=Ed.bind(xd)):(e.setTimeoutFn=xd.setTimeout.bind(xd),e.clearTimeoutFn=xd.clearTimeout.bind(xd))}var Md,Fd=function(e){x(n,e);var t=U(n);function n(e,r,i){var a;return y(this,n),(a=t.call(this,e)).description=r,a.context=i,a.type="TransportError",a}return _(n)}(T(Error)),Td=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),(r=t.call(this)).writable=!1,Ud(E(r),e),r.opts=e,r.query=e.query,r.socket=e.socket,r}return _(n,[{key:"onError",value:function(e,t,r){return ed(C(n.prototype),"emitReserved",this).call(this,"error",new Fd(e,t,r)),this}},{key:"open",value:function(){return this.readyState="opening",this.doOpen(),this}},{key:"close",value:function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}},{key:"send",value:function(e){"open"===this.readyState&&this.write(e)}},{key:"onOpen",value:function(){this.readyState="open",this.writable=!0,ed(C(n.prototype),"emitReserved",this).call(this,"open")}},{key:"onData",value:function(e){var t=gd(e,this.socket.binaryType);this.onPacket(t)}},{key:"onPacket",value:function(e){ed(C(n.prototype),"emitReserved",this).call(this,"packet",e)}},{key:"onClose",value:function(e){this.readyState="closed",ed(C(n.prototype),"emitReserved",this).call(this,"close",e)}},{key:"pause",value:function(e){}},{key:"createUri",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}},{key:"_hostname",value:function(){var e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}},{key:"_port",value:function(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}},{key:"_query",value:function(e){var t=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}(e);return t.length?"?"+t:""}}]),n}(bd),kd="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Qd=64,Ld={},Dd=0,Id=0;function Rd(e){var t="";do{t=kd[e%Qd]+t,e=Math.floor(e/Qd)}while(e>0);return t}function Hd(){var e=Rd(+new Date);return e!==Md?(Dd=0,Md=e):e+"."+Rd(Dd++)}for(;Id<Qd;Id++)Ld[kd[Id]]=Id;var Pd=!1;try{Pd="undefined"!==typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(FC){}var Nd=Pd;function Od(e){var t=e.xdomain;try{if("undefined"!==typeof XMLHttpRequest&&(!t||Nd))return new XMLHttpRequest}catch(n){}if(!t)try{return new(xd[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(n){}}function Vd(){}var zd=null!=new Od({xdomain:!1}).responseType,Gd=function(e){x(n,e);var t=U(n);function n(e){var r;if(y(this,n),(r=t.call(this,e)).polling=!1,"undefined"!==typeof location){var i="https:"===location.protocol,a=location.port;a||(a=i?"443":"80"),r.xd="undefined"!==typeof location&&e.hostname!==location.hostname||a!==e.port}var A=e&&e.forceBase64;return r.supportsBinary=zd&&!A,r.opts.withCredentials&&(r.cookieJar=void 0),r}return _(n,[{key:"name",get:function(){return"polling"}},{key:"doOpen",value:function(){this.poll()}},{key:"pause",value:function(e){var t=this;this.readyState="pausing";var n=function(){t.readyState="paused",e()};if(this.polling||!this.writable){var r=0;this.polling&&(r++,this.once("pollComplete",(function(){--r||n()}))),this.writable||(r++,this.once("drain",(function(){--r||n()})))}else n()}},{key:"poll",value:function(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}},{key:"onData",value:function(e){var t=this;(function(e,t){for(var n=e.split(yd),r=[],i=0;i<n.length;i++){var a=gd(n[i],t);if(r.push(a),"error"===a.type)break}return r})(e,this.socket.binaryType).forEach((function(e){if("opening"===t.readyState&&"open"===e.type&&t.onOpen(),"close"===e.type)return t.onClose({description:"transport closed by the server"}),!1;t.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}},{key:"doClose",value:function(){var e=this,t=function(){e.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}},{key:"write",value:function(e){var t=this;this.writable=!1,function(e,t){var n=e.length,r=new Array(n),i=0;e.forEach((function(e,a){sd(e,!1,(function(e){r[a]=e,++i===n&&t(r.join(yd))}))}))}(e,(function(e){t.doWrite(e,(function(){t.writable=!0,t.emitReserved("drain")}))}))}},{key:"uri",value:function(){var e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Hd()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}},{key:"request",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Kd(this.uri(),e)}},{key:"doWrite",value:function(e,t){var n=this,r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",(function(e,t){n.onError("xhr post error",e,t)}))}},{key:"doPoll",value:function(){var e=this,t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(function(t,n){e.onError("xhr poll error",t,n)})),this.pollXhr=t}}]),n}(Td),Kd=function(e){x(n,e);var t=U(n);function n(e,r){var i;return y(this,n),Ud(E(i=t.call(this)),r),i.opts=r,i.method=r.method||"GET",i.uri=e,i.data=void 0!==r.data?r.data:null,i.create(),i}return _(n,[{key:"create",value:function(){var e,t=this,r=Cd(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;var i=this.xhr=new Od(r);try{i.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders)for(var a in i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0),this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(a)&&i.setRequestHeader(a,this.opts.extraHeaders[a])}catch(A){}if("POST"===this.method)try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(A){}try{i.setRequestHeader("Accept","*/*")}catch(A){}null===(e=this.opts.cookieJar)||void 0===e||e.addCookies(i),"withCredentials"in i&&(i.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(i.timeout=this.opts.requestTimeout),i.onreadystatechange=function(){var e;3===i.readyState&&(null===(e=t.opts.cookieJar)||void 0===e||e.parseCookies(i)),4===i.readyState&&(200===i.status||1223===i.status?t.onLoad():t.setTimeoutFn((function(){t.onError("number"===typeof i.status?i.status:0)}),0))},i.send(this.data)}catch(A){return void this.setTimeoutFn((function(){t.onError(A)}),0)}"undefined"!==typeof document&&(this.index=n.requestsCount++,n.requests[this.index]=this)}},{key:"onError",value:function(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}},{key:"cleanup",value:function(e){if("undefined"!==typeof this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=Vd,e)try{this.xhr.abort()}catch(t){}"undefined"!==typeof document&&delete n.requests[this.index],this.xhr=null}}},{key:"onLoad",value:function(){var e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}},{key:"abort",value:function(){this.cleanup()}}]),n}(bd);if(Kd.requestsCount=0,Kd.requests={},"undefined"!==typeof document)if("function"===typeof attachEvent)attachEvent("onunload",Wd);else if("function"===typeof addEventListener){addEventListener("onpagehide"in xd?"pagehide":"unload",Wd,!1)}function Wd(){for(var e in Kd.requests)Kd.requests.hasOwnProperty(e)&&Kd.requests[e].abort()}var jd="function"===typeof Promise&&"function"===typeof Promise.resolve?function(e){return Promise.resolve().then(e)}:function(e,t){return t(e,0)},Xd=xd.WebSocket||xd.MozWebSocket,qd="undefined"!==typeof navigator&&"string"===typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),Yd=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),(r=t.call(this,e)).supportsBinary=!e.forceBase64,r}return _(n,[{key:"name",get:function(){return"websocket"}},{key:"doOpen",value:function(){if(this.check()){var e=this.uri(),t=this.opts.protocols,n=qd?{}:Cd(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=qd?new Xd(e,t,n):t?new Xd(e,t):new Xd(e)}catch(FC){return this.emitReserved("error",FC)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}}},{key:"addEventListeners",value:function(){var e=this;this.ws.onopen=function(){e.opts.autoUnref&&e.ws._socket.unref(),e.onOpen()},this.ws.onclose=function(t){return e.onClose({description:"websocket connection closed",context:t})},this.ws.onmessage=function(t){return e.onData(t.data)},this.ws.onerror=function(t){return e.onError("websocket error",t)}}},{key:"write",value:function(e){var t=this;this.writable=!1;for(var n=function(){var n=e[r],i=r===e.length-1;sd(n,t.supportsBinary,(function(e){try{t.ws.send(e)}catch(n){}i&&jd((function(){t.writable=!0,t.emitReserved("drain")}),t.setTimeoutFn)}))},r=0;r<e.length;r++)n()}},{key:"doClose",value:function(){"undefined"!==typeof this.ws&&(this.ws.close(),this.ws=null)}},{key:"uri",value:function(){var e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Hd()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},{key:"check",value:function(){return!!Xd}}]),n}(Td),Jd=function(e){x(n,e);var t=U(n);function n(){return y(this,n),t.apply(this,arguments)}return _(n,[{key:"name",get:function(){return"webtransport"}},{key:"doOpen",value:function(){var e=this;"function"===typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then((function(){e.onClose()})).catch((function(t){e.onError("webtransport error",t)})),this.transport.ready.then((function(){e.transport.createBidirectionalStream().then((function(t){var n=function(e,t){fd||(fd=new TextDecoder);var n=[],r=0,i=-1,a=!1;return new TransformStream({transform:function(A,o){for(n.push(A);;){if(0===r){if(Bd(n)<1)break;var s=_d(n,1);a=128===(128&s[0]),i=127&s[0],r=i<126?3:126===i?1:2}else if(1===r){if(Bd(n)<2)break;var l=_d(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(2===r){if(Bd(n)<8)break;var u=_d(n,8),c=new DataView(u.buffer,u.byteOffset,u.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){o.enqueue(id);break}i=d*Math.pow(2,32)+c.getUint32(4),r=3}else{if(Bd(n)<i)break;var h=_d(n,i);o.enqueue(gd(a?h:fd.decode(h),t)),r=0}if(0===i||i>e){o.enqueue(id);break}}}})}(Number.MAX_SAFE_INTEGER,e.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=wd();i.readable.pipeTo(t.writable),e.writer=i.writable.getWriter();!function t(){r.read().then((function(n){var r=n.done,i=n.value;r||(e.onPacket(i),t())})).catch((function(e){}))}();var a={type:"open"};e.query.sid&&(a.data='{"sid":"'.concat(e.query.sid,'"}')),e.writer.write(a).then((function(){return e.onOpen()}))}))})))}},{key:"write",value:function(e){var t=this;this.writable=!1;for(var n=function(){var n=e[r],i=r===e.length-1;t.writer.write(n).then((function(){i&&jd((function(){t.writable=!0,t.emitReserved("drain")}),t.setTimeoutFn)}))},r=0;r<e.length;r++)n()}},{key:"doClose",value:function(){var e;null===(e=this.transport)||void 0===e||e.close()}}]),n}(Td),Zd={websocket:Yd,webtransport:Jd,polling:Gd},$d=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,eh=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function th(e){var t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));for(var i=$d.exec(e||""),a={},A=14;A--;)a[eh[A]]=i[A]||"";return-1!=n&&-1!=r&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(e,t){var n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,a.path),a.queryKey=function(e,t){var n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,r){t&&(n[t]=r)})),n}(0,a.query),a}var nh=function(e){x(n,e);var t=U(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return y(this,n),(r=t.call(this)).binaryType="arraybuffer",r.writeBuffer=[],e&&"object"===typeof e&&(i=e,e=null),e?(e=th(e),i.hostname=e.host,i.secure="https"===e.protocol||"wss"===e.protocol,i.port=e.port,e.query&&(i.query=e.query)):i.host&&(i.hostname=th(i.host).host),Ud(E(r),i),r.secure=null!=i.secure?i.secure:"undefined"!==typeof location&&"https:"===location.protocol,i.hostname&&!i.port&&(i.port=r.secure?"443":"80"),r.hostname=i.hostname||("undefined"!==typeof location?location.hostname:"localhost"),r.port=i.port||("undefined"!==typeof location&&location.port?location.port:r.secure?"443":"80"),r.transports=i.transports||["polling","websocket","webtransport"],r.writeBuffer=[],r.prevBufferLen=0,r.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),r.opts.path=r.opts.path.replace(/\/$/,"")+(r.opts.addTrailingSlash?"/":""),"string"===typeof r.opts.query&&(r.opts.query=function(e){for(var t={},n=e.split("&"),r=0,i=n.length;r<i;r++){var a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}(r.opts.query)),r.id=null,r.upgrades=null,r.pingInterval=null,r.pingTimeout=null,r.pingTimeoutTimer=null,"function"===typeof addEventListener&&(r.opts.closeOnBeforeunload&&(r.beforeunloadEventListener=function(){r.transport&&(r.transport.removeAllListeners(),r.transport.close())},addEventListener("beforeunload",r.beforeunloadEventListener,!1)),"localhost"!==r.hostname&&(r.offlineEventListener=function(){r.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",r.offlineEventListener,!1))),r.open(),r}return _(n,[{key:"createTransport",value:function(e){var t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);var n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new Zd[e](n)}},{key:"open",value:function(){var e,t=this;if(this.opts.rememberUpgrade&&n.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((function(){t.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(r){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}},{key:"setTransport",value:function(e){var t=this;this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(function(e){return t.onClose("transport close",e)}))}},{key:"probe",value:function(e){var t=this,r=this.createTransport(e),i=!1;n.priorWebsocketSuccess=!1;var a=function(){i||(r.send([{type:"ping",data:"probe"}]),r.once("packet",(function(e){if(!i)if("pong"===e.type&&"probe"===e.data){if(t.upgrading=!0,t.emitReserved("upgrading",r),!r)return;n.priorWebsocketSuccess="websocket"===r.name,t.transport.pause((function(){i||"closed"!==t.readyState&&(c(),t.setTransport(r),r.send([{type:"upgrade"}]),t.emitReserved("upgrade",r),r=null,t.upgrading=!1,t.flush())}))}else{var a=new Error("probe error");a.transport=r.name,t.emitReserved("upgradeError",a)}})))};function A(){i||(i=!0,c(),r.close(),r=null)}var o=function(e){var n=new Error("probe error: "+e);n.transport=r.name,A(),t.emitReserved("upgradeError",n)};function s(){o("transport closed")}function l(){o("socket closed")}function u(e){r&&e.name!==r.name&&A()}var c=function(){r.removeListener("open",a),r.removeListener("error",o),r.removeListener("close",s),t.off("close",l),t.off("upgrading",u)};r.once("open",a),r.once("error",o),r.once("close",s),this.once("close",l),this.once("upgrading",u),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn((function(){i||r.open()}),200):r.open()}},{key:"onOpen",value:function(){if(this.readyState="open",n.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade)for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},{key:"onPacket",value:function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}},{key:"onHandshake",value:function(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}},{key:"resetPingTimeout",value:function(){var e=this;this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((function(){e.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}},{key:"onDrain",value:function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}},{key:"flush",value:function(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){var e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}},{key:"getWritablePackets",value:function(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;for(var e,t=1,n=0;n<this.writeBuffer.length;n++){var r=this.writeBuffer[n].data;if(r&&(t+="string"===typeof(e=r)?function(e){for(var t=0,n=0,r=0,i=e.length;r<i;r++)(t=e.charCodeAt(r))<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(e):Math.ceil(1.33*(e.byteLength||e.size))),n>0&&t>this.maxPayload)return this.writeBuffer.slice(0,n);t+=2}return this.writeBuffer}},{key:"write",value:function(e,t,n){return this.sendPacket("message",e,t,n),this}},{key:"send",value:function(e,t,n){return this.sendPacket("message",e,t,n),this}},{key:"sendPacket",value:function(e,t,n,r){if("function"===typeof t&&(r=t,t=void 0),"function"===typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var i={type:e,data:t,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}}},{key:"close",value:function(){var e=this,t=function(){e.onClose("forced close"),e.transport.close()},n=function n(){e.off("upgrade",n),e.off("upgradeError",n),t()},r=function(){e.once("upgrade",n),e.once("upgradeError",n)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){e.upgrading?r():t()})):this.upgrading?r():t()),this}},{key:"onError",value:function(e){n.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}},{key:"onClose",value:function(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"===typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}},{key:"filterUpgrades",value:function(e){for(var t=[],n=0,r=e.length;n<r;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}]),n}(bd);nh.protocol=4;nh.protocol;var rh="function"===typeof ArrayBuffer,ih=function(e){return"function"===typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer},ah=Object.prototype.toString,Ah="function"===typeof Blob||"undefined"!==typeof Blob&&"[object BlobConstructor]"===ah.call(Blob),oh="function"===typeof File||"undefined"!==typeof File&&"[object FileConstructor]"===ah.call(File);function sh(e){return rh&&(e instanceof ArrayBuffer||ih(e))||Ah&&e instanceof Blob||oh&&e instanceof File}function lh(e,t){if(!e||"object"!==typeof e)return!1;if(Array.isArray(e)){for(var n=0,r=e.length;n<r;n++)if(lh(e[n]))return!0;return!1}if(sh(e))return!0;if(e.toJSON&&"function"===typeof e.toJSON&&1===arguments.length)return lh(e.toJSON(),!0);for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&lh(e[i]))return!0;return!1}function uh(e){var t=[],n=e.data,r=e;return r.data=ch(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ch(e,t){if(!e)return e;if(sh(e)){var n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){for(var r=new Array(e.length),i=0;i<e.length;i++)r[i]=ch(e[i],t);return r}if("object"===typeof e&&!(e instanceof Date)){var a={};for(var A in e)Object.prototype.hasOwnProperty.call(e,A)&&(a[A]=ch(e[A],t));return a}return e}function dh(e,t){return e.data=hh(e.data,t),delete e.attachments,e}function hh(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"===typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(var n=0;n<e.length;n++)e[n]=hh(e[n],t);else if("object"===typeof e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=hh(e[r],t));return e}var fh,ph=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],gh=5;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(fh||(fh={}));var mh=function(){function e(t){y(this,e),this.replacer=t}return _(e,[{key:"encode",value:function(e){return e.type!==fh.EVENT&&e.type!==fh.ACK||!lh(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===fh.EVENT?fh.BINARY_EVENT:fh.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}},{key:"encodeAsString",value:function(e){var t=""+e.type;return e.type!==fh.BINARY_EVENT&&e.type!==fh.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}},{key:"encodeAsBinary",value:function(e){var t=uh(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}}]),e}();function vh(e){return"[object Object]"===Object.prototype.toString.call(e)}var yh=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),(r=t.call(this)).reviver=e,r}return _(n,[{key:"add",value:function(e){var t;if("string"===typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");var r=(t=this.decodeString(e)).type===fh.BINARY_EVENT;r||t.type===fh.BINARY_ACK?(t.type=r?fh.EVENT:fh.ACK,this.reconstructor=new wh(t),0===t.attachments&&ed(C(n.prototype),"emitReserved",this).call(this,"decoded",t)):ed(C(n.prototype),"emitReserved",this).call(this,"decoded",t)}else{if(!sh(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(t=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,ed(C(n.prototype),"emitReserved",this).call(this,"decoded",t))}}},{key:"decodeString",value:function(e){var t=0,r={type:Number(e.charAt(0))};if(void 0===fh[r.type])throw new Error("unknown packet type "+r.type);if(r.type===fh.BINARY_EVENT||r.type===fh.BINARY_ACK){for(var i=t+1;"-"!==e.charAt(++t)&&t!=e.length;);var a=e.substring(i,t);if(a!=Number(a)||"-"!==e.charAt(t))throw new Error("Illegal attachments");r.attachments=Number(a)}if("/"===e.charAt(t+1)){for(var A=t+1;++t;){if(","===e.charAt(t))break;if(t===e.length)break}r.nsp=e.substring(A,t)}else r.nsp="/";var o=e.charAt(t+1);if(""!==o&&Number(o)==o){for(var s=t+1;++t;){var l=e.charAt(t);if(null==l||Number(l)!=l){--t;break}if(t===e.length)break}r.id=Number(e.substring(s,t+1))}if(e.charAt(++t)){var u=this.tryParse(e.substr(t));if(!n.isPayloadValid(r.type,u))throw new Error("invalid payload");r.data=u}return r}},{key:"tryParse",value:function(e){try{return JSON.parse(e,this.reviver)}catch(t){return!1}}},{key:"destroy",value:function(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}],[{key:"isPayloadValid",value:function(e,t){switch(e){case fh.CONNECT:return vh(t);case fh.DISCONNECT:return void 0===t;case fh.CONNECT_ERROR:return"string"===typeof t||vh(t);case fh.EVENT:case fh.BINARY_EVENT:return Array.isArray(t)&&("number"===typeof t[0]||"string"===typeof t[0]&&-1===ph.indexOf(t[0]));case fh.ACK:case fh.BINARY_ACK:return Array.isArray(t)}}}]),n}(bd),wh=function(){function e(t){y(this,e),this.packet=t,this.buffers=[],this.reconPack=t}return _(e,[{key:"takeBinaryData",value:function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=dh(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}},{key:"finishedReconstruction",value:function(){this.reconPack=null,this.buffers=[]}}]),e}();function Bh(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var _h=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),bh=function(e){x(n,e);var t=U(n);function n(e,r,i){var a;return y(this,n),(a=t.call(this)).connected=!1,a.recovered=!1,a.receiveBuffer=[],a.sendBuffer=[],a._queue=[],a._queueSeq=0,a.ids=0,a.acks={},a.flags={},a.io=e,a.nsp=r,i&&i.auth&&(a.auth=i.auth),a._opts=Object.assign({},i),a.io._autoConnect&&a.open(),a}return _(n,[{key:"disconnected",get:function(){return!this.connected}},{key:"subEvents",value:function(){if(!this.subs){var e=this.io;this.subs=[Bh(e,"open",this.onopen.bind(this)),Bh(e,"packet",this.onpacket.bind(this)),Bh(e,"error",this.onerror.bind(this)),Bh(e,"close",this.onclose.bind(this))]}}},{key:"active",get:function(){return!!this.subs}},{key:"connect",value:function(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}},{key:"open",value:function(){return this.connect()}},{key:"send",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.unshift("message"),this.emit.apply(this,t),this}},{key:"emit",value:function(e){if(_h.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;var i={type:fh.EVENT,data:n,options:{}};if(i.options.compress=!1!==this.flags.compress,"function"===typeof n[n.length-1]){var a=this.ids++,A=n.pop();this._registerAckCallback(a,A),i.id=a}var o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)||(this.connected?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}},{key:"_registerAckCallback",value:function(e,t){var n,r=this,i=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0!==i){var a=this.io.setTimeoutFn((function(){delete r.acks[e];for(var n=0;n<r.sendBuffer.length;n++)r.sendBuffer[n].id===e&&r.sendBuffer.splice(n,1);t.call(r,new Error("operation has timed out"))}),i);this.acks[e]=function(){r.io.clearTimeoutFn(a);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];t.apply(r,[null].concat(n))}}else this.acks[e]=t}},{key:"emitWithAck",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise((function(n,i){r.push((function(e,t){return a?e?i(e):n(t):n(e)})),t.emit.apply(t,[e].concat(r))}))}},{key:"_addToQueue",value:function(e){var t,n=this;"function"===typeof e[e.length-1]&&(t=e.pop());var r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((function(e){if(r===n._queue[0]){if(null!==e)r.tryCount>n._opts.retries&&(n._queue.shift(),t&&t(e));else if(n._queue.shift(),t){for(var i=arguments.length,a=new Array(i>1?i-1:0),A=1;A<i;A++)a[A-1]=arguments[A];t.apply(void 0,[null].concat(a))}return r.pending=!1,n._drainQueue()}})),this._queue.push(r),this._drainQueue()}},{key:"_drainQueue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.connected&&0!==this._queue.length){var t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}}},{key:"packet",value:function(e){e.nsp=this.nsp,this.io._packet(e)}},{key:"onopen",value:function(){var e=this;"function"==typeof this.auth?this.auth((function(t){e._sendConnectPacket(t)})):this._sendConnectPacket(this.auth)}},{key:"_sendConnectPacket",value:function(e){this.packet({type:fh.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}},{key:"onerror",value:function(e){this.connected||this.emitReserved("connect_error",e)}},{key:"onclose",value:function(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t)}},{key:"onpacket",value:function(e){if(e.nsp===this.nsp)switch(e.type){case fh.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case fh.EVENT:case fh.BINARY_EVENT:this.onevent(e);break;case fh.ACK:case fh.BINARY_ACK:this.onack(e);break;case fh.DISCONNECT:this.ondisconnect();break;case fh.CONNECT_ERROR:this.destroy();var t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}},{key:"onevent",value:function(e){var t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}},{key:"emitEvent",value:function(e){if(this._anyListeners&&this._anyListeners.length){var t,r=Q(this._anyListeners.slice());try{for(r.s();!(t=r.n()).done;){t.value.apply(this,e)}}catch(FC){r.e(FC)}finally{r.f()}}ed(C(n.prototype),"emit",this).apply(this,e),this._pid&&e.length&&"string"===typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}},{key:"ack",value:function(e){var t=this,n=!1;return function(){if(!n){n=!0;for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];t.packet({type:fh.ACK,id:e,data:i})}}}},{key:"onack",value:function(e){var t=this.acks[e.id];"function"===typeof t&&(t.apply(this,e.data),delete this.acks[e.id])}},{key:"onconnect",value:function(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}},{key:"emitBuffered",value:function(){var e=this;this.receiveBuffer.forEach((function(t){return e.emitEvent(t)})),this.receiveBuffer=[],this.sendBuffer.forEach((function(t){e.notifyOutgoingListeners(t),e.packet(t)})),this.sendBuffer=[]}},{key:"ondisconnect",value:function(){this.destroy(),this.onclose("io server disconnect")}},{key:"destroy",value:function(){this.subs&&(this.subs.forEach((function(e){return e()})),this.subs=void 0),this.io._destroy(this)}},{key:"disconnect",value:function(){return this.connected&&this.packet({type:fh.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}},{key:"close",value:function(){return this.disconnect()}},{key:"compress",value:function(e){return this.flags.compress=e,this}},{key:"volatile",get:function(){return this.flags.volatile=!0,this}},{key:"timeout",value:function(e){return this.flags.timeout=e,this}},{key:"onAny",value:function(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}},{key:"prependAny",value:function(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}},{key:"offAny",value:function(e){if(!this._anyListeners)return this;if(e){for(var t=this._anyListeners,n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}},{key:"listenersAny",value:function(){return this._anyListeners||[]}},{key:"onAnyOutgoing",value:function(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}},{key:"prependAnyOutgoing",value:function(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}},{key:"offAnyOutgoing",value:function(e){if(!this._anyOutgoingListeners)return this;if(e){for(var t=this._anyOutgoingListeners,n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}},{key:"listenersAnyOutgoing",value:function(){return this._anyOutgoingListeners||[]}},{key:"notifyOutgoingListeners",value:function(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){var t,n=Q(this._anyOutgoingListeners.slice());try{for(n.s();!(t=n.n()).done;){t.value.apply(this,e.data)}}catch(FC){n.e(FC)}finally{n.f()}}}}]),n}(bd);function xh(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}xh.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},xh.prototype.reset=function(){this.attempts=0},xh.prototype.setMin=function(e){this.ms=e},xh.prototype.setMax=function(e){this.max=e},xh.prototype.setJitter=function(e){this.jitter=e};var Ch,Sh=function(t){x(r,t);var n=U(r);function r(t,i){var a,A;y(this,r),(a=n.call(this)).nsps={},a.subs=[],t&&"object"===typeof t&&(i=t,t=void 0),(i=i||{}).path=i.path||"/socket.io",a.opts=i,Ud(E(a),i),a.reconnection(!1!==i.reconnection),a.reconnectionAttempts(i.reconnectionAttempts||1/0),a.reconnectionDelay(i.reconnectionDelay||1e3),a.reconnectionDelayMax(i.reconnectionDelayMax||5e3),a.randomizationFactor(null!==(A=i.randomizationFactor)&&void 0!==A?A:.5),a.backoff=new xh({min:a.reconnectionDelay(),max:a.reconnectionDelayMax(),jitter:a.randomizationFactor()}),a.timeout(null==i.timeout?2e4:i.timeout),a._readyState="closed",a.uri=t;var o=i.parser||e;return a.encoder=new o.Encoder,a.decoder=new o.Decoder,a._autoConnect=!1!==i.autoConnect,a._autoConnect&&a.open(),a}return _(r,[{key:"reconnection",value:function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}},{key:"reconnectionAttempts",value:function(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}},{key:"reconnectionDelay",value:function(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}},{key:"randomizationFactor",value:function(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}},{key:"reconnectionDelayMax",value:function(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}},{key:"timeout",value:function(e){return arguments.length?(this._timeout=e,this):this._timeout}},{key:"maybeReconnectOnOpen",value:function(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}},{key:"open",value:function(e){var t=this;if(~this._readyState.indexOf("open"))return this;this.engine=new nh(this.uri,this.opts);var n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;var i=Bh(n,"open",(function(){r.onopen(),e&&e()})),a=function(n){t.cleanup(),t._readyState="closed",t.emitReserved("error",n),e?e(n):t.maybeReconnectOnOpen()},A=Bh(n,"error",a);if(!1!==this._timeout){var o=this._timeout,s=this.setTimeoutFn((function(){i(),a(new Error("timeout")),n.close()}),o);this.opts.autoUnref&&s.unref(),this.subs.push((function(){t.clearTimeoutFn(s)}))}return this.subs.push(i),this.subs.push(A),this}},{key:"connect",value:function(e){return this.open(e)}},{key:"onopen",value:function(){this.cleanup(),this._readyState="open",this.emitReserved("open");var e=this.engine;this.subs.push(Bh(e,"ping",this.onping.bind(this)),Bh(e,"data",this.ondata.bind(this)),Bh(e,"error",this.onerror.bind(this)),Bh(e,"close",this.onclose.bind(this)),Bh(this.decoder,"decoded",this.ondecoded.bind(this)))}},{key:"onping",value:function(){this.emitReserved("ping")}},{key:"ondata",value:function(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}},{key:"ondecoded",value:function(e){var t=this;jd((function(){t.emitReserved("packet",e)}),this.setTimeoutFn)}},{key:"onerror",value:function(e){this.emitReserved("error",e)}},{key:"socket",value:function(e,t){var n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new bh(this,e,t),this.nsps[e]=n),n}},{key:"_destroy",value:function(e){for(var t=0,n=Object.keys(this.nsps);t<n.length;t++){var r=n[t];if(this.nsps[r].active)return}this._close()}},{key:"_packet",value:function(e){for(var t=this.encoder.encode(e),n=0;n<t.length;n++)this.engine.write(t[n],e.options)}},{key:"cleanup",value:function(){this.subs.forEach((function(e){return e()})),this.subs.length=0,this.decoder.destroy()}},{key:"_close",value:function(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}},{key:"disconnect",value:function(){return this._close()}},{key:"onclose",value:function(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}},{key:"reconnect",value:function(){var e=this;if(this._reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{var n=this.backoff.duration();this._reconnecting=!0;var r=this.setTimeoutFn((function(){t.skipReconnect||(e.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((function(n){n?(t._reconnecting=!1,t.reconnect(),e.emitReserved("reconnect_error",n)):t.onreconnect()})))}),n);this.opts.autoUnref&&r.unref(),this.subs.push((function(){e.clearTimeoutFn(r)}))}}},{key:"onreconnect",value:function(){var e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}]),r}(bd),Eh={};function Uh(e,t){"object"===typeof e&&(t=e,e=void 0);var n,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=e;n=n||"undefined"!==typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"===typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e="undefined"!==typeof n?n.protocol+"//"+e:"https://"+e),r=th(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),i=r.source,a=r.id,A=r.path,o=Eh[a]&&A in Eh[a].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||o?n=new Sh(i,t):(Eh[a]||(Eh[a]=new Sh(i,t)),n=Eh[a]),r.query&&!t.query&&(t.query=r.queryKey),n.socket(r.path,t)}Object.assign(Uh,{Manager:Sh,Socket:bh,io:Uh,connect:Uh});var Mh,Fh="https://hyperhuman.deemos.com/api",Th=$c,kh="merife6322@duiter.com",Qh="lrhswjj1314",Lh=function(e){var t=e.email,n=e.password;return Th.post("".concat(Fh,"/user/login"),{email:t,password:n})},Dh=function(){return(Ch=Ch||h(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Mh){e.next=2;break}return e.abrupt("return",!1);case 2:return console.log("start chat"),e.abrupt("return",Th.get("".concat(Fh,"/chat").concat("")));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)},Ih=function(){Mh&&Mh.connected&&(console.log("close ws"),Mh.close(),console.log(Mh))},Rh=function(e){var t=e.task_uuid,n=e.prompt;return Th.post("".concat(Fh,"/task/generate"),{task_uuid:t,prompt:"face, ".concat(n),settings:{type:"dreamface_new"}})},Hh=function(e){return Th.post("".concat(Fh,"/task/check_progress/").concat(e))},Ph=function(e){var t=e.type,n=e.page_num,r=e.task_type;return Th.post("".concat(Fh,"/task/cards"),{type:t,page_num:n,task_type:r})},Nh=function(e){return Th.post("".concat(Fh,"/task/card/").concat(e))},Oh=function(e){var t=e.task_uuid,n=e.type,r=e.name;return Th.post("".concat(Fh,"/task/get_download"),{task_uuid:t,type:n,name:r}).then((function(e){return e.data.url}))},Vh=$c.CancelToken.source(),zh=function(e){return Th.post("".concat(Fh,"/task/imagineface_view_selection"),{task_uuid:e},{cancelToken:Vh.token}).catch((function(e){return console.log(e)}))},Gh=function(e){return Th.post("".concat(Fh,"/task/imagineface_generate"),{task_uuid:e,settings:{constrain_skull_distance:!1,f_36_box:200,jawline:!0,view_weights:[.2,.2,.2,.2,.2]}})},Kh=function(e){return Th.post("".concat(Fh,"/task/imagineface_preview"),{task_uuid:e})},Wh=function(e){var t="".concat(Fh,"/task/imagineface_submit");return Th({method:"POST",data:e,url:t})},jh=ou({key:"taskInitAtom",default:!1}),Xh=ou({key:"taskDetailAtom",default:!1}),qh=ou({key:"meshProfileAtom",default:!1}),Yh=ou({key:"chatHistoryAtom",default:{}}),Jh=(ou({key:"chatGuessAtom",default:[]}),ou({key:"promptAtom",default:""})),Zh=ou({key:"stopChatAtom",default:!1}),$h=(ou({key:"assistantChatStatusAtom",default:""}),ou({key:"guessChatStatusAtom",default:""}),ou({key:"chatTextAtom",default:""}),ou({key:"chatLangAtom",default:"Chinese"}),ou({key:"generateProgressAtom",default:{}})),ef=(ou({key:"needStartWsAtom",default:!1}),ou({key:"chatDialogStartAtom",default:!1})),tf=ou({key:"generateStageAtom",default:"generate"}),nf=(ou({key:"taskCandidateAtom",default:[]}),ou({default:!1,key:"modelSelected"})),rf=ou({default:!1,key:"modelHide"}),af=ou({default:"ImagineFace",key:"currentCards"}),Af=ou({default:!1,key:"imgurls"}),of=ou({default:!1,key:"taskid"}),sf=ou({default:!1,key:"generateprocess"}),lf=ou({default:!1,key:"generatestate"}),uf=(ou({default:!1,key:"inputSize"}),ou({default:0,key:"time"}),ou({default:[],key:"generateurls"})),cf=ou({default:!1,key:"imgCard"}),df=ou({default:!1,key:"isUploading"}),hf=ou({default:"",key:"imgfile"}),ff=ou({default:!1,key:"generated"}),pf=ou({default:!1,key:"generatingAtom"}),gf={con:"result_con__XmNwJ",board:"result_board__tnKqw",changeButton:"result_changeButton__7lKDO",changeIButton:"result_changeIButton__CpOc4",colHead:"result_colHead__rwEVf",fileDropBox:"result_fileDropBox__Y5d6Z",uploadHover:"result_uploadHover__dPt1r",uploadIcon:"result_uploadIcon__DAtuj",tipText:"result_tipText__0ZvcZ",placehoderText:"result_placehoderText__S3bdX",textspan:"result_textspan__VxHTy",spanhover:"result_spanhover__k2Xqe",previewWrapper:"result_previewWrapper__rOivJ",previewBox:"result_previewBox__zWRep",thumbnailItem:"result_thumbnailItem__WDJgi",uploadBtn:"result_uploadBtn__-KhxD",modelmove:"result_modelmove__c3mgX",progressText:"result_progressText__YqpY9",ProgressBar:"result_ProgressBar__9Fh++",filler:"result_filler__I2Vnn",gradient:"result_gradient__xyr+E",colimgHead:"result_colimgHead__Y-eQp",colInner:"result_colInner__MkDny",colimgInner:"result_colimgInner__gLeVv",preview:"result_preview__wPwcx",imagehead:"result_imagehead__WuURZ",imagediv:"result_imagediv__vfWnW",imagespan:"result_imagespan__+jnpZ",colDetail:"result_colDetail__S0MVA",colContent:"result_colContent__F086n",col:"result_col__iqqgM",colTitle:"result_colTitle__Sq5cI",passwordCon:"result_passwordCon__et4RP",emailCon:"result_emailCon__A00bg",restart:"result_restart__-oTNk",spaceholder:"result_spaceholder__JnuiG",lang:"result_lang__gYkVs",en:"result_en__+SBoD",selected:"result_selected__TFxCE",regene:"result_regene__BF34D",chatCon:"result_chatCon__XqyhW",chatMsgCon:"result_chatMsgCon__m7pJG",chatMsgRow:"result_chatMsgRow__PNJDq",user:"result_user__539uR",avatar:"result_avatar__1PPI9",bubble:"result_bubble__nrLea",unactive:"result_unactive__hHgg+",chatIptCon:"result_chatIptCon__hrwhF",chatTipsCon:"result_chatTipsCon__0nvd9",chatTips:"result_chatTips__OZqBj",chatRowCon:"result_chatRowCon__+a9fT",iptLineCon:"result_iptLineCon__hJZNY",iptSpaceholder:"result_iptSpaceholder__e9U9J",ipt:"result_ipt__t44rN",btn:"result_btn__d8hT8",disabled:"result_disabled__IxnGZ",iptArea:"result_iptArea__19Z5O",clearBtn:"result_clearBtn__ZmM7F",clearBtnLogin:"result_clearBtnLogin__Joyh5",inputError:"result_inputError__3y-2-",btnCon:"result_btnCon__NQObl",generateBtn:"result_generateBtn__W17SO",generateBtnLogin:"result_generateBtnLogin__vR6W3",candidateCon:"result_candidateCon__HIwir",candidateCol:"result_candidateCol__xXiMR",creatorCon:"result_creatorCon__S6HUG",creatorInfoCon:"result_creatorInfoCon__2oI4h",creatorName:"result_creatorName__6BXzo",creatorInfo:"result_creatorInfo__A1+Uz",modelView:"result_modelView__KzWSE",imgBox:"result_imgBox__U-UzQ",FrameBox:"result_FrameBox__cj2x2",modelInfoCon:"result_modelInfoCon__BKNl0",progressInfo:"result_progressInfo__yhYYW",progressTrack:"result_progressTrack__BiTiv",progressThumb:"result_progressThumb__CAmET",modelPrompt:"result_modelPrompt__+LJD6",progressCon:"result_progressCon__lYaDj",loadingCon:"result_loadingCon__f2MQ2",icon:"result_icon__Po3e2",hideModel:"result_hideModel__jgIKx",descriptionLogin:"result_descriptionLogin__dZaBT"},mf=ou({key:"logInfoAtom",default:!1}),vf=ou({key:"showLoginAtom",default:!1}),yf=ou({key:"showUserAtom",default:!1}),wf={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Bf=o.createContext&&o.createContext(wf),_f=["attr","size","title"];function bf(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function xf(){return xf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xf.apply(this,arguments)}function Cf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cf(Object(n),!0).forEach((function(t){Ef(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ef(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uf(e){return e&&e.map((function(e,t){return o.createElement(e.tag,Sf({key:t},e.attr),Uf(e.child))}))}function Mf(e){return function(t){return o.createElement(Ff,xf({attr:Sf({},e.attr)},t),Uf(e.child))}}function Ff(e){var t=function(t){var n,r=e.attr,i=e.size,a=e.title,A=bf(e,_f),s=i||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),o.createElement("svg",xf({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,A,{className:n,style:Sf(Sf({color:e.color||t.color},t.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&o.createElement("title",null,a),e.children)};return void 0!==Bf?o.createElement(Bf.Consumer,null,(function(e){return t(e)})):t(wf)}function Tf(e){return Mf({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 2a5.53 5.53 0 0 0-3.594 1.342c-.766.66-1.321 1.52-1.464 2.383C1.266 6.095 0 7.555 0 9.318 0 11.366 1.708 13 3.781 13h8.906C14.502 13 16 11.57 16 9.773c0-1.636-1.242-2.969-2.834-3.194C12.923 3.999 10.69 2 8 2zm2.354 5.146a.5.5 0 0 1-.708.708L8.5 6.707V10.5a.5.5 0 0 1-1 0V6.707L6.354 7.854a.5.5 0 1 1-.708-.708l2-2a.5.5 0 0 1 .708 0l2 2z"},child:[]}]})(e)}var kf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAAAXNSR0IArs4c6QAAAkxJREFUaEPtmfFVwjAQxr9s4Ag6gTqBsIFucGwgE4gTqBNwG8gGwgSygYzABvg+XuuDUkmaliTtS/5tm8vvvtxdcjUY+DAD50MG7LvCWcGsYOIeyFs0cYGsy8sKWl2U+AtZwTqBRGQE4BbAVSABtwBWqrpuaq+RgiJyDWAOgIAxxgLAVFU3rsadAQu4LwCEjDkIN3aFbAL4kwBc6dilqo5dvOwEWMQc1UtpUMWlbUGugG8Anm2TBX7+rqpTm01XQCYWOTMZsxwTAOMzVAJSVZ2EADzypIjQEVT80iUkCOBGVW+qXhSRFwAzm3dbPg8CWBsHgZJSEMBaIyLyCODTUyHGMrMjk9q5mhsEkMnlvlp0ReQbwJ0H4ExVX/mdw8EiCCDXsjHGzHa73arwOOPPJ5P+wZWOsUAGA/QQ6uSTEzgHyN4A/gtngewFoBXuDGTygM5wB5CH9TVpwMZwRWbtBaAXXGqAbC3wLFot1N5wKQHuIUSEgLxDlgW/FVwqgEcQBSTjhofyj7YFs3KID55kWitkc0BMwIvDxdyiQeBiAQaDuzRgXdNpoapPtrjp8rmI8I7JuyZHp00nXn+qbUPn3mQXkEWvh82v/TDGjObzOa9oZ4dTV63YHgSs3vN4+278v8C2qMpz1lPW0kPbtb2gunmbAPJUMtzWfaEiIRmPZRw0FKP16+zVTFz/S+y3so9JEeGWeQjQ+yyXtzXGrF1irsrjBejjlFjfZMBYnu/KblawK0/GmicrGMvzXdnNCnblyVjzZAVjeb4ru4NX8BeXoSxIsE8NKAAAAABJRU5ErkJggg==",Qf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAAAXNSR0IArs4c6QAAAmdJREFUaEPtmU9yElEQxr+e0kqVbvAGHAFPoK5Iyo25AS7BskxOEDgBbIAqN+AJWOKwgRuYG8gNZBWNSeazXpSxyhjnvZnXw0g9tvR096+/nvenR7DnP9lzPgTA/13hoGBQsOIVCC1acYEy0wsKZpao4gbeFJyPWSfREKJWiDnBOomweflGzgv5+fVwIcDZhLVHFzgR4B2lINhdmrUIVjdA76gt67ywuQHjIbtKYHdYkhv0jt5KNw+kM6BR7fE3zEg8zxMw7zMEVl8vcXx8KhsXH86A8YifADRcgviyNZCHHXnh4s8J0LQlBGcuARRsB82OnNr6tQY0q2REfLZ1rGl3TTy1XWWtARdjTki0NBO39e3SqlaAyz5r3w/wxTaBMuwuLvHEZsGxAoxHfAVgVkbiDjFazY58yLK3AxzzDESufSgrgQL/Wy02VoAfx5xIRd6/bUEomB625XVWgQKgqVBQMKtPFP4PLepyXXJpURLT6CGmqWjXGPD+s+u5PMDJ1ja5QkvE7jCxOwUF3WZbetukF2Mu77t5/HkiiR22owCo1aLYdwWF2FCQXkrNjCZjnJGOIyxs01d7dy2qsCX8zWUAVHsHg4J+KuC1ReMR+8DvDdlPisW8eAVcDGkGu4NiKfl92itglQZOKvdB4/RfRy6/2th586qgCVm1uYx3wKqpqAI477MeHWAJoG7XSHpWKoC3Kg7ZoNyOEHcKqQZoIKugpCrgtvHmQ7ainx9jSlezFMD01v6ez3CFRhKV91lNiJW3ybbeUqHv2Wrwq5+GXoQAqFfbcjwHBcups16UoKBebcvxvPcK/gAMdkFIuKWHyAAAAABJRU5ErkJggg==",Lf=n(184);function Df(){var e,t,n,r,i=v(lu(hf),2),a=i[0],A=i[1],s=v((0,o.useState)(!1),2)[1],l=v(lu(Af),2),u=l[0],d=l[1],f=v(lu(of),2),p=f[0],g=f[1],m=v(lu(uf),2)[1],y=v(lu(sf),2)[1],w=v(lu(lf),2)[1],B=v(lu(Jh),2),_=B[0],b=B[1],x=su(jh),C=v(lu(Xh),2),S=C[0],E=C[1],U=(0,o.useRef)(null),M=(0,o.useRef)(null),F=(0,o.useRef)(null),T=(0,o.useRef)(null),k=v((0,o.useState)(null),2),Q=k[0],D=k[1],I=v((0,o.useState)(!1),2),R=I[0],H=I[1],P=v(lu(df),2),N=P[0],O=P[1],V=v((0,o.useState)(!1),2),z=V[0],G=V[1],K=v((0,o.useState)(0),2),W=K[0],j=K[1],X=v(lu($h),2),q=X[0],Y=X[1],J=v(lu(Zh),2),Z=J[0],$=J[1],ee=v(lu(tf),2)[1],te=uu(jh),ne=uu(qh),re=v(lu(mf),1)[0],ie=v(lu(rf),2)[1],ae=v(lu(af),2),Ae=ae[0],oe=ae[1],se=v(lu(cf),2)[1],le=v(lu(ff),2),ue=le[0],ce=le[1],de=v(lu(pf),2)[1];v((0,o.useState)(!0),1)[0];(0,o.useEffect)((function(){x&&($(!0),Rh({task_uuid:x.task_uuid,prompt:_}))}),[x]),(0,o.useEffect)((function(){if(S||!Z)return clearInterval(U.current),void(U.current=null);clearInterval(U.current),U.current=setInterval(h(c().mark((function e(){var t,n,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Hh(x.task_uuid);case 2:if(t=e.sent,"Done"!==(n=t.data).stage){e.next=15;break}return Y({stage:"Downloading",percent:100,payload:n}),clearInterval(U.current),U.current=null,e.next=10,Nh(x.task_uuid);case 10:r=e.sent,E(r.data),de(!1),e.next=16;break;case 15:Y({stage:n.stage,percent:n.percentage||0,payload:n});case 16:case"end":return e.stop()}}),e)}))),1e3)}),[S,Z]);(0,o.useEffect)((function(){u.length>0&&he()}),[u]);var he=function(){return(r=r||h(c().mark((function e(){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a){e.next=7;break}return A(null),de(!0),e.next=5,Gh(p);case 5:t=e.sent,M.current=setInterval(h(c().mark((function e(){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Hh(t.data.message);case 2:n=e.sent,y(n.data.percentage),n.data.on_progress&&w(n.data.on_progress[0]),Y({stage:n.data.stage,percent:n.data.percentage||0,payload:n.data}),"Done"===n.data.stage&&(Y({stage:"Done",percent:100,payload:n.data}),y(100),w("Done"),de(!1),clearInterval(M.current));case 7:case"end":return e.stop()}}),e)}))),1500);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)};return(0,Lf.jsxs)(Lf.Fragment,{children:[(0,Lf.jsxs)("div",{children:[(0,Lf.jsx)("h2",{children:"Deemos Technology - Hyperhuman Demo"}),(0,Lf.jsxs)("div",{style:{display:"flex",justifyContent:"center",gap:2,userSelect:"none"},children:[(0,Lf.jsx)("button",{onClick:function(){"DreamFace"===Ae&&(clearInterval(U.current),window.static_project&&window.static_project.stop(),oe("ImagineFace"),Y(!1),w(!1),b(""),E(!1),ne(!1),ce(!1),g(!1),de(!1))},className:gf.changeIButton,style:{background:"DreamFace"===Ae?"white":""},children:(0,Lf.jsx)("img",{src:kf})}),(0,Lf.jsx)("button",{onClick:function(){"ImagineFace"===Ae&&(clearInterval(M.current),oe("DreamFace"),j(0),D(null),Y(!1),w(!1),d(!1),E(!1),g(!1),m([]),se(!1),O(!1),A(null),ce(!1),de(!1))},className:gf.changeButton,style:{background:"DreamFace"===Ae?"":"white"},children:(0,Lf.jsx)("img",{src:Qf})})]}),(0,Lf.jsxs)("p",{className:gf.descriptionLogin,children:["This is a demo of Deemos Technology's Hyperhuman platform. For more features, please visit our main site",(0,Lf.jsx)("a",{href:"https://hyperhuman.deemos.com",target:"_blank",children:" hyperhuman.deemos.com"})]})]}),"DreamFace"===Ae?(0,Lf.jsxs)("div",{className:gf.colHead,children:[(0,Lf.jsxs)("div",{className:gf.colInner,children:[(0,Lf.jsx)("div",{className:gf.colTitle,children:"Positive Prompt"}),(0,Lf.jsx)("textarea",{className:gf.iptArea,value:_,placeholder:"Type your prompt here.",onChange:function(e){b(e.currentTarget.value)}})]}),(0,Lf.jsxs)("div",{className:gf.btnCon,children:[(0,Lf.jsx)("div",{className:"".concat(gf.clearBtn," ").concat(_&&!ue?"":gf.disabled),onPointerDown:function(e){Y(!1),window.static_project&&(console.log("hide scene"),window.static_project.hide_scene(),ie(!0)),b(""),E(!1)},children:"Clear"}),(0,Lf.jsx)("div",{className:"".concat(gf.generateBtn," ").concat(_&&!ue?"":gf.disabled),onPointerDown:function(e){_&&re&&(q.stage?console.log(q.stage):(de(!0),ce(!0),E(!1),$(!1),ne(!1),ee("generate"),Y(!1),Dh().then((function(e){if(e){var t=e.data;te(t)}})).catch((function(e){console.log(e.message)})).finally()))},children:"Generate"})]})]}):(0,Lf.jsxs)("div",{className:gf.colHead,children:[(0,Lf.jsxs)("div",{className:"".concat(gf.fileDropBox," ").concat(R?gf.uploadHover:""),onClick:function(){m(null),g(!1),F.current.value="",F.current.click()},onDrop:function(e){return(t=t||h(c().mark((function e(t){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),H(!1),D.apply(void 0,L(t.dataTransfer.files)),(n=new FileReader).readAsDataURL.apply(n,L(t.dataTransfer.files)),n.onloadend=function(e){A(e.target.result)};case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)},onDragOver:function(e){e.preventDefault(),H(!0)},onDragEnter:function(e){e.preventDefault(),H(!0)},onDragLeave:function(e){e.preventDefault(),H(!1)},children:[!a&&!N&&(0,Lf.jsx)(Tf,{className:gf.uploadIcon}),!N&&(0,Lf.jsx)("div",{className:gf.tipText,children:"Drag & Drop or Choose File to Upload Images."}),!a&&!N&&(0,Lf.jsxs)("div",{onMouseLeave:function(){return G(!1)},className:gf.placehoderText,children:[(0,Lf.jsx)("span",{onMouseEnter:function(){return G(!0)},className:"".concat(z?gf.spanhover:""," ").concat(gf.textspan),children:z?(0,Lf.jsx)("span",{className:gf.hoverText,children:"Recommended style reference"}):(0,Lf.jsxs)(Lf.Fragment,{children:[" ","Please provide a clear portrait with"," ",(0,Lf.jsx)("span",{children:"bright lighting"})," ","and"," ",(0,Lf.jsx)("span",{children:"no shadows."})]})}),z&&(0,Lf.jsxs)(Lf.Fragment,{children:[(0,Lf.jsx)("div",{className:gf.placeHodler}),(0,Lf.jsx)("div",{className:gf.previewWrapper,children:["/assets/imagedemo-girl.jpg","/assets/imagedemo-older.jpg","/assets/imagedemo-boy.jpg"].map((function(e,t){return(0,Lf.jsx)("div",{className:gf.previewBox,children:(0,Lf.jsx)("img",{src:e,alt:"defaultImg"})},t)}))})]})]}),a&&!N&&(0,Lf.jsx)("div",{className:gf.thumbnailItem,children:(0,Lf.jsx)("img",{src:a,alt:"thumbnail"})}),N&&(0,Lf.jsxs)(Lf.Fragment,{children:[(0,Lf.jsx)("div",{className:gf.progressText,children:100===W?"Complete":"Uploading..."}),(0,Lf.jsx)("div",{className:gf.ProgressBar,children:(0,Lf.jsx)("div",{className:gf.filler,style:{width:"".concat(W,"%")}})})]}),(0,Lf.jsx)("input",{type:"file",ref:F,style:{display:"none"},onChange:function(t){return(e=e||h(c().mark((function e(t){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s(!0),D(t.target.files[0]),(n=new FileReader).readAsDataURL(t.target.files[0]),n.onloadend=function(e){A(e.target.result)};case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)},accept:".jpg, .jpeg, .png"},Math.random)]}),(0,Lf.jsxs)("div",{className:gf.btnCon,children:[(0,Lf.jsx)("div",{className:"".concat(gf.clearBtn," ").concat(a&&!ue?"":gf.disabled),onPointerDown:function(){F.current.value="",clearInterval(T.current),A(null),D(null),O(!1),d(!1),g(!1),y(!1),m([])},children:"Clear"}),(0,Lf.jsx)("div",{className:"".concat(gf.generateBtn," ").concat(a&&!ue?"":gf.disabled),onPointerDown:function(){return(n=n||h(c().mark((function e(){var t,n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O(!0),j(0),ce(!0),(t=new FormData).append("images",Q),e.next=7,Wh(t);case 7:n=e.sent,g(n.data.message),T.current=setInterval(h(c().mark((function e(){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return W<=80&&j((function(e){return e+20})),W>=80&&j(80),e.next=4,zh(n.data.message);case 4:void 0===(t=e.sent)?clearInterval(T.current):t.data.urls&&t.data.urls.length>=1&&(j(100),d(t.data.urls[0]),clearInterval(T.current));case 6:case"end":return e.stop()}}),e)}))),1e3);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)},children:"Generate"})]})]})]})}var If,Rf={Recent:"Recent",Featured:"Featured",Mine:"Mine"};function Hf(){var e,t=v(lu(hf),2)[1],n=v(lu(df),2)[1],r=uu(Xh),i=v((0,o.useState)(Rf.Featured),1)[0],a=v((0,o.useState)([]),2),A=a[0],s=a[1],l=v(lu(of),2)[1],u=v((0,o.useState)(null),2),d=u[0],f=u[1],p=(0,o.useRef)(0),g=(0,o.useRef)(0),m=(0,o.useRef)(0),y=(0,o.useRef)(null),w=v(lu($h),2)[1],B=v(lu(uf),2)[1],_=v(lu(cf),2)[1],b=v(lu(rf),2)[1],x=su(af);(0,o.useEffect)((function(){p.current=0,g.current=0,m.current=0,Ph({type:i,page_num:p.current,task_type:x}).then((function(e){s(e.data)}))}),[i,x]);var C=function(e){var t;return function(n){return(t=t||h(c().mark((function t(n){var i;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,w(!1),b(!0),window.static_project&&window.static_project.start(),r(!1),t.next=7,Nh(e);case 7:i=t.sent,r(i.data),t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:case"end":return t.stop()}}),t,null,[[0,11]])})))).apply(this,arguments)}},S=function(e){var r;return function(i){return(r=r||h(c().mark((function r(i){var a;return c().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,_(!0),t(null),n(!1),w(!1),l(e),r.next=8,Kh(e);case 8:a=r.sent,B([a.data.files[0].face,a.data.files[0].render,a.data.files[0].render_statue]),r.next=14;break;case 12:r.prev=12,r.t0=r.catch(0);case 14:case"end":return r.stop()}}),r,null,[[0,12]])})))).apply(this,arguments)}};return(0,Lf.jsx)("div",{className:cu.con,children:(0,Lf.jsx)("div",{className:cu.cardsCon,ref:y,onWheel:function(t){return(e=e||h(c().mark((function e(t){var n,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.deltaY<=0)){e.next=2;break}return e.abrupt("return");case 2:if((n=y.current).scrollTop!==m.current){e.next=13;break}if(!(Date.now()-g.current>=1e3)){e.next=11;break}return g.current=Date.now(),e.next=8,Ph({type:i,page_num:p.current+1,task_type:x});case 8:r=e.sent,p.current+=1,s([].concat(L(A),L(r.data)));case 11:e.next=14;break;case 13:m.current=n.scrollTop;case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)},children:A.slice(0,9).map((function(e){return(0,Lf.jsxs)("div",{className:"".concat(cu.card),onPointerDown:"DreamFace"===x?C(e.task_uuid):S(e.task_uuid),onMouseEnter:function(){return f(e.task_uuid)},onMouseLeave:function(e){return f(!1)},children:[(0,Lf.jsx)("div",{className:cu.coverImg,children:(0,Lf.jsx)("img",{alt:"cover",src:e.image_url})}),"DreamFace"===x?(0,Lf.jsx)("div",{className:"".concat(cu.prompt," ").concat(d===e.task_uuid?cu.show:""),children:e.prompt}):null]},e.task_uuid)}))})})}var Pf="149",Nf=0,Of=1,Vf=2,zf=1,Gf=2,Kf=3,Wf=0,jf=1,Xf=2,qf=0,Yf=1,Jf=2,Zf=3,$f=4,ep=5,tp=100,np=101,rp=102,ip=103,ap=104,Ap=200,op=201,sp=202,lp=203,up=204,cp=205,dp=206,hp=207,fp=208,pp=209,gp=210,mp=0,vp=1,yp=2,wp=3,Bp=4,_p=5,bp=6,xp=7,Cp=0,Sp=1,Ep=2,Up=0,Mp=1,Fp=2,Tp=3,kp=4,Qp=5,Lp=301,Dp=302,Ip=303,Rp=304,Hp=306,Pp=1e3,Np=1001,Op=1002,Vp=1003,zp=1004,Gp=1005,Kp=1006,Wp=1007,jp=1008,Xp=1009,qp=1010,Yp=1011,Jp=1012,Zp=1013,$p=1014,eg=1015,tg=1016,ng=1017,rg=1018,ig=1020,ag=1021,Ag=1023,og=1024,sg=1025,lg=1026,ug=1027,cg=1028,dg=1029,hg=1030,fg=1031,pg=1033,gg=33776,mg=33777,vg=33778,yg=33779,wg=35840,Bg=35841,_g=35842,bg=35843,xg=36196,Cg=37492,Sg=37496,Eg=37808,Ug=37809,Mg=37810,Fg=37811,Tg=37812,kg=37813,Qg=37814,Lg=37815,Dg=37816,Ig=37817,Rg=37818,Hg=37819,Pg=37820,Ng=37821,Og=36492,Vg=36283,zg=36284,Gg=36285,Kg=36286,Wg=2300,jg=2301,Xg=2302,qg=2400,Yg=2401,Jg=2402,Zg=3e3,$g=3001,em=3201,tm=0,nm=1,rm="srgb",im="srgb-linear",am=7680,Am=35044,om="300 es",sm=1035,lm=function(){function e(){y(this,e)}return _(e,[{key:"addEventListener",value:function(e,t){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}},{key:"hasEventListener",value:function(e,t){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}},{key:"removeEventListener",value:function(e,t){if(void 0!==this._listeners){var n=this._listeners[e];if(void 0!==n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}}}},{key:"dispatchEvent",value:function(e){if(void 0!==this._listeners){var t=this._listeners[e.type];if(void 0!==t){e.target=this;for(var n=t.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,e);e.target=null}}}}]),e}(),um=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],cm=1234567,dm=Math.PI/180,hm=180/Math.PI;function fm(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(um[255&e]+um[e>>8&255]+um[e>>16&255]+um[e>>24&255]+"-"+um[255&t]+um[t>>8&255]+"-"+um[t>>16&15|64]+um[t>>24&255]+"-"+um[63&n|128]+um[n>>8&255]+"-"+um[n>>16&255]+um[n>>24&255]+um[255&r]+um[r>>8&255]+um[r>>16&255]+um[r>>24&255]).toLowerCase()}function pm(e,t,n){return Math.max(t,Math.min(n,e))}function gm(e,t){return(e%t+t)%t}function mm(e,t,n){return(1-n)*e+n*t}function vm(e){return 0===(e&e-1)&&0!==e}function ym(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function wm(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function Bm(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function _m(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}var bm=Object.freeze({__proto__:null,DEG2RAD:dm,RAD2DEG:hm,ceilPowerOfTwo:ym,clamp:pm,damp:function(e,t,n,r){return mm(e,t,1-Math.exp(-n*r))},degToRad:function(e){return e*dm},denormalize:Bm,euclideanModulo:gm,floorPowerOfTwo:wm,generateUUID:fm,inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},isPowerOfTwo:vm,lerp:mm,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},normalize:_m,pingpong:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t-Math.abs(gm(e,2*t)-t)},radToDeg:function(e){return e*hm},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},seededRandom:function(e){void 0!==e&&(cm=e);var t=cm+=1831565813;return t=Math.imul(t^t>>>15,1|t),(((t^=t+Math.imul(t^t>>>7,61|t))^t>>>14)>>>0)/4294967296},setQuaternionFromProperEuler:function(e,t,n,r,i){var a=Math.cos,A=Math.sin,o=a(n/2),s=A(n/2),l=a((t+r)/2),u=A((t+r)/2),c=a((t-r)/2),d=A((t-r)/2),h=a((r-t)/2),f=A((r-t)/2);switch(i){case"XYX":e.set(o*u,s*c,s*d,o*l);break;case"YZY":e.set(s*d,o*u,s*c,o*l);break;case"ZXZ":e.set(s*c,s*d,o*u,o*l);break;case"XZX":e.set(o*u,s*f,s*h,o*l);break;case"YXY":e.set(s*h,o*u,s*f,o*l);break;case"ZYZ":e.set(s*f,s*h,o*u,o*l);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)}}),xm=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;y(this,t),t.prototype.isVector2=!0,this.x=e,this.y=n}return _(t,[{key:"width",get:function(){return this.x},set:function(e){this.x=e}},{key:"height",get:function(){return this.y},set:function(e){this.y=e}},{key:"set",value:function(e,t){return this.x=e,this.y=t,this}},{key:"setScalar",value:function(e){return this.x=e,this.y=e,this}},{key:"setX",value:function(e){return this.x=e,this}},{key:"setY",value:function(e){return this.y=e,this}},{key:"setComponent",value:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}},{key:"getComponent",value:function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}},{key:"clone",value:function(){return new this.constructor(this.x,this.y)}},{key:"copy",value:function(e){return this.x=e.x,this.y=e.y,this}},{key:"add",value:function(e){return this.x+=e.x,this.y+=e.y,this}},{key:"addScalar",value:function(e){return this.x+=e,this.y+=e,this}},{key:"addVectors",value:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}},{key:"addScaledVector",value:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}},{key:"sub",value:function(e){return this.x-=e.x,this.y-=e.y,this}},{key:"subScalar",value:function(e){return this.x-=e,this.y-=e,this}},{key:"subVectors",value:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}},{key:"multiply",value:function(e){return this.x*=e.x,this.y*=e.y,this}},{key:"multiplyScalar",value:function(e){return this.x*=e,this.y*=e,this}},{key:"divide",value:function(e){return this.x/=e.x,this.y/=e.y,this}},{key:"divideScalar",value:function(e){return this.multiplyScalar(1/e)}},{key:"applyMatrix3",value:function(e){var t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}},{key:"min",value:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}},{key:"max",value:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}},{key:"clamp",value:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}},{key:"clampScalar",value:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}},{key:"clampLength",value:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}},{key:"floor",value:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}},{key:"ceil",value:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}},{key:"round",value:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},{key:"roundToZero",value: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}},{key:"negate",value:function(){return this.x=-this.x,this.y=-this.y,this}},{key:"dot",value:function(e){return this.x*e.x+this.y*e.y}},{key:"cross",value:function(e){return this.x*e.y-this.y*e.x}},{key:"lengthSq",value:function(){return this.x*this.x+this.y*this.y}},{key:"length",value:function(){return Math.sqrt(this.x*this.x+this.y*this.y)}},{key:"manhattanLength",value:function(){return Math.abs(this.x)+Math.abs(this.y)}},{key:"normalize",value:function(){return this.divideScalar(this.length()||1)}},{key:"angle",value:function(){var e=Math.atan2(-this.y,-this.x)+Math.PI;return e}},{key:"distanceTo",value:function(e){return Math.sqrt(this.distanceToSquared(e))}},{key:"distanceToSquared",value:function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n}},{key:"manhattanDistanceTo",value:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}},{key:"setLength",value:function(e){return this.normalize().multiplyScalar(e)}},{key:"lerp",value:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}},{key:"lerpVectors",value:function(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}},{key:"equals",value:function(e){return e.x===this.x&&e.y===this.y}},{key:"fromArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e}},{key:"fromBufferAttribute",value:function(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}},{key:"rotateAround",value:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}},{key:"random",value:function(){return this.x=Math.random(),this.y=Math.random(),this}},{key:Symbol.iterator,value:c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.x;case 2:return e.next=4,this.y;case 4:case"end":return e.stop()}}),e,this)}))}]),t}(),Cm=function(){function e(){y(this,e),e.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}return _(e,[{key:"set",value:function(e,t,n,r,i,a,A,o,s){var l=this.elements;return l[0]=e,l[1]=r,l[2]=A,l[3]=t,l[4]=i,l[5]=o,l[6]=n,l[7]=a,l[8]=s,this}},{key:"identity",value:function(){return this.set(1,0,0,0,1,0,0,0,1),this}},{key:"copy",value:function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}},{key:"extractBasis",value:function(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}},{key:"setFromMatrix4",value:function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}},{key:"multiply",value:function(e){return this.multiplyMatrices(this,e)}},{key:"premultiply",value:function(e){return this.multiplyMatrices(e,this)}},{key:"multiplyMatrices",value:function(e,t){var n=e.elements,r=t.elements,i=this.elements,a=n[0],A=n[3],o=n[6],s=n[1],l=n[4],u=n[7],c=n[2],d=n[5],h=n[8],f=r[0],p=r[3],g=r[6],m=r[1],v=r[4],y=r[7],w=r[2],B=r[5],_=r[8];return i[0]=a*f+A*m+o*w,i[3]=a*p+A*v+o*B,i[6]=a*g+A*y+o*_,i[1]=s*f+l*m+u*w,i[4]=s*p+l*v+u*B,i[7]=s*g+l*y+u*_,i[2]=c*f+d*m+h*w,i[5]=c*p+d*v+h*B,i[8]=c*g+d*y+h*_,this}},{key:"multiplyScalar",value:function(e){var t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}},{key:"determinant",value:function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],A=e[5],o=e[6],s=e[7],l=e[8];return t*a*l-t*A*s-n*i*l+n*A*o+r*i*s-r*a*o}},{key:"invert",value:function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],A=e[5],o=e[6],s=e[7],l=e[8],u=l*a-A*s,c=A*o-l*i,d=s*i-a*o,h=t*u+n*c+r*d;if(0===h)return this.set(0,0,0,0,0,0,0,0,0);var f=1/h;return e[0]=u*f,e[1]=(r*s-l*n)*f,e[2]=(A*n-r*a)*f,e[3]=c*f,e[4]=(l*t-r*o)*f,e[5]=(r*i-A*t)*f,e[6]=d*f,e[7]=(n*o-s*t)*f,e[8]=(a*t-n*i)*f,this}},{key:"transpose",value:function(){var e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}},{key:"getNormalMatrix",value:function(e){return this.setFromMatrix4(e).invert().transpose()}},{key:"transposeIntoArray",value:function(e){var t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}},{key:"setUvTransform",value:function(e,t,n,r,i,a,A){var o=Math.cos(i),s=Math.sin(i);return this.set(n*o,n*s,-n*(o*a+s*A)+a+e,-r*s,r*o,-r*(-s*a+o*A)+A+t,0,0,1),this}},{key:"scale",value:function(e,t){return this.premultiply(Sm.makeScale(e,t)),this}},{key:"rotate",value:function(e){return this.premultiply(Sm.makeRotation(-e)),this}},{key:"translate",value:function(e,t){return this.premultiply(Sm.makeTranslation(e,t)),this}},{key:"makeTranslation",value:function(e,t){return this.set(1,0,e,0,1,t,0,0,1),this}},{key:"makeRotation",value:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}},{key:"makeScale",value:function(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}},{key:"equals",value:function(e){for(var t=this.elements,n=e.elements,r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<9;n++)this.elements[n]=e[n+t];return this}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}},{key:"clone",value:function(){return(new this.constructor).fromArray(this.elements)}}]),e}(),Sm=new Cm;function Em(e){for(var t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;function Um(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function Mm(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Fm(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}var Tm=(M(If={},rm,M({},im,Mm)),M(If,im,M({},rm,Fm)),If),km={legacyMode:!0,get workingColorSpace(){return im},set workingColorSpace(e){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(e,t,n){if(this.legacyMode||t===n||!t||!n)return e;if(Tm[t]&&void 0!==Tm[t][n]){var r=Tm[t][n];return e.r=r(e.r),e.g=r(e.g),e.b=r(e.b),e}throw new Error("Unsupported color space conversion.")},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)}},Qm={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},Lm={r:0,g:0,b:0},Dm={h:0,s:0,l:0},Im={h:0,s:0,l:0};function Rm(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function Hm(e,t){return t.r=e.r,t.g=e.g,t.b=e.b,t}var Pm,Nm=function(e){function t(e,n,r){return y(this,t),this.isColor=!0,this.r=1,this.g=1,this.b=1,void 0===n&&void 0===r?this.set(e):this.setRGB(e,n,r)}return _(t,[{key:"set",value:function(e){return e&&e.isColor?this.copy(e):"number"===typeof e?this.setHex(e):"string"===typeof e&&this.setStyle(e),this}},{key:"setScalar",value:function(e){return this.r=e,this.g=e,this.b=e,this}},{key:"setHex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rm;return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,km.toWorkingColorSpace(this,t),this}},{key:"setRGB",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:km.workingColorSpace;return this.r=e,this.g=t,this.b=n,km.toWorkingColorSpace(this,r),this}},{key:"setHSL",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:km.workingColorSpace;if(e=gm(e,1),t=pm(t,0,1),n=pm(n,0,1),0===t)this.r=this.g=this.b=n;else{var i=n<=.5?n*(1+t):n+t-n*t,a=2*n-i;this.r=Rm(a,i,e+1/3),this.g=Rm(a,i,e),this.b=Rm(a,i,e-1/3)}return km.toWorkingColorSpace(this,r),this}},{key:"setStyle",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rm;function r(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}if(t=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){var i,a=t[1],A=t[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(A))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,km.toWorkingColorSpace(this,n),r(i[4]),this;if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(A))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,km.toWorkingColorSpace(this,n),r(i[4]),this;break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(A)){var o=parseFloat(i[1])/360,s=parseFloat(i[2])/100,l=parseFloat(i[3])/100;return r(i[4]),this.setHSL(o,s,l,n)}}}else if(t=/^\#([A-Fa-f\d]+)$/.exec(e)){var u=t[1],c=u.length;if(3===c)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,km.toWorkingColorSpace(this,n),this;if(6===c)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,km.toWorkingColorSpace(this,n),this}return e&&e.length>0?this.setColorName(e,n):this}},{key:"setColorName",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rm,n=Qm[e.toLowerCase()];return void 0!==n?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}},{key:"clone",value:function(){return new this.constructor(this.r,this.g,this.b)}},{key:"copy",value:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}},{key:"copySRGBToLinear",value:function(e){return this.r=Mm(e.r),this.g=Mm(e.g),this.b=Mm(e.b),this}},{key:"copyLinearToSRGB",value:function(e){return this.r=Fm(e.r),this.g=Fm(e.g),this.b=Fm(e.b),this}},{key:"convertSRGBToLinear",value:function(){return this.copySRGBToLinear(this),this}},{key:"convertLinearToSRGB",value:function(){return this.copyLinearToSRGB(this),this}},{key:"getHex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rm;return km.fromWorkingColorSpace(Hm(this,Lm),e),pm(255*Lm.r,0,255)<<16^pm(255*Lm.g,0,255)<<8^pm(255*Lm.b,0,255)<<0}},{key:"getHexString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rm;return("000000"+this.getHex(e).toString(16)).slice(-6)}},{key:"getHSL",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:km.workingColorSpace;km.fromWorkingColorSpace(Hm(this,Lm),t);var n,r,i=Lm.r,a=Lm.g,A=Lm.b,o=Math.max(i,a,A),s=Math.min(i,a,A),l=(s+o)/2;if(s===o)n=0,r=0;else{var u=o-s;switch(r=l<=.5?u/(o+s):u/(2-o-s),o){case i:n=(a-A)/u+(a<A?6:0);break;case a:n=(A-i)/u+2;break;case A:n=(i-a)/u+4}n/=6}return e.h=n,e.s=r,e.l=l,e}},{key:"getRGB",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:km.workingColorSpace;return km.fromWorkingColorSpace(Hm(this,Lm),t),e.r=Lm.r,e.g=Lm.g,e.b=Lm.b,e}},{key:"getStyle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rm;return km.fromWorkingColorSpace(Hm(this,Lm),e),e!==rm?"color(".concat(e," ").concat(Lm.r," ").concat(Lm.g," ").concat(Lm.b,")"):"rgb(".concat(255*Lm.r|0,",").concat(255*Lm.g|0,",").concat(255*Lm.b|0,")")}},{key:"offsetHSL",value:function(e,t,n){return this.getHSL(Dm),Dm.h+=e,Dm.s+=t,Dm.l+=n,this.setHSL(Dm.h,Dm.s,Dm.l),this}},{key:"add",value:function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}},{key:"addColors",value:function(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}},{key:"addScalar",value:function(e){return this.r+=e,this.g+=e,this.b+=e,this}},{key:"sub",value:function(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}},{key:"multiply",value:function(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}},{key:"multiplyScalar",value:function(e){return this.r*=e,this.g*=e,this.b*=e,this}},{key:"lerp",value:function(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}},{key:"lerpColors",value:function(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}},{key:"lerpHSL",value:function(e,t){this.getHSL(Dm),e.getHSL(Im);var n=mm(Dm.h,Im.h,t),r=mm(Dm.s,Im.s,t),i=mm(Dm.l,Im.l,t);return this.setHSL(n,r,i),this}},{key:"equals",value:function(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}},{key:"fromArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}},{key:"fromBufferAttribute",value:function(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}},{key:"toJSON",value:function(){return this.getHex()}},{key:Symbol.iterator,value:c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.r;case 2:return e.next=4,this.g;case 4:return e.next=6,this.b;case 6:case"end":return e.stop()}}),e,this)}))}]),t}();Nm.NAMES=Qm;var Om=function(){function e(){y(this,e)}return _(e,null,[{key:"getDataURL",value:function(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;var t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Pm&&(Pm=Um("canvas")),Pm.width=e.width,Pm.height=e.height;var n=Pm.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=Pm}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}},{key:"sRGBToLinear",value:function(e){if("undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap){var t=Um("canvas");t.width=e.width,t.height=e.height;var n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);for(var r=n.getImageData(0,0,e.width,e.height),i=r.data,a=0;a<i.length;a++)i[a]=255*Mm(i[a]/255);return n.putImageData(r,0,0),t}if(e.data){for(var A=e.data.slice(0),o=0;o<A.length;o++)A instanceof Uint8Array||A instanceof Uint8ClampedArray?A[o]=Math.floor(255*Mm(A[o]/255)):A[o]=Mm(A[o]);return{data:A,width:e.width,height:e.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}]),e}(),Vm=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;y(this,e),this.isSource=!0,this.uuid=fm(),this.data=t,this.version=0}return _(e,[{key:"needsUpdate",set:function(e){!0===e&&this.version++}},{key:"toJSON",value:function(e){var t=void 0===e||"string"===typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];var n={uuid:this.uuid,url:""},r=this.data;if(null!==r){var i;if(Array.isArray(r)){i=[];for(var a=0,A=r.length;a<A;a++)r[a].isDataTexture?i.push(zm(r[a].image)):i.push(zm(r[a]))}else i=zm(r);n.url=i}return t||(e.images[this.uuid]=n),n}}]),e}();function zm(e){return"undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap?Om.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var Gm=0,Km=function(e){x(n,e);var t=U(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.DEFAULT_IMAGE,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.DEFAULT_MAPPING,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Np,A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Np,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Kp,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:jp,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Ag,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:Xp,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:n.DEFAULT_ANISOTROPY,d=arguments.length>9&&void 0!==arguments[9]?arguments[9]:Zg;return y(this,n),(e=t.call(this)).isTexture=!0,Object.defineProperty(E(e),"id",{value:Gm++}),e.uuid=fm(),e.name="",e.source=new Vm(r),e.mipmaps=[],e.mapping=i,e.wrapS=a,e.wrapT=A,e.magFilter=o,e.minFilter=s,e.anisotropy=c,e.format=l,e.internalFormat=null,e.type=u,e.offset=new xm(0,0),e.repeat=new xm(1,1),e.center=new xm(0,0),e.rotation=0,e.matrixAutoUpdate=!0,e.matrix=new Cm,e.generateMipmaps=!0,e.premultiplyAlpha=!1,e.flipY=!0,e.unpackAlignment=4,e.encoding=d,e.userData={},e.version=0,e.onUpdate=null,e.isRenderTargetTexture=!1,e.needsPMREMUpdate=!1,e}return _(n,[{key:"image",get:function(){return this.source.data},set:function(e){this.source.data=e}},{key:"updateMatrix",value:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}},{key:"toJSON",value:function(e){var t=void 0===e||"string"===typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,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,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}},{key:"dispose",value:function(){this.dispatchEvent({type:"dispose"})}},{key:"transformUv",value:function(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Pp:e.x=e.x-Math.floor(e.x);break;case Np:e.x=e.x<0?0:1;break;case Op:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case Pp:e.y=e.y-Math.floor(e.y);break;case Np:e.y=e.y<0?0:1;break;case Op:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}},{key:"needsUpdate",set:function(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}}]),n}(lm);Km.DEFAULT_IMAGE=null,Km.DEFAULT_MAPPING=300,Km.DEFAULT_ANISOTROPY=1;var Wm=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;y(this,t),t.prototype.isVector4=!0,this.x=e,this.y=n,this.z=r,this.w=i}return _(t,[{key:"width",get:function(){return this.z},set:function(e){this.z=e}},{key:"height",get:function(){return this.w},set:function(e){this.w=e}},{key:"set",value:function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}},{key:"setScalar",value:function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}},{key:"setX",value:function(e){return this.x=e,this}},{key:"setY",value:function(e){return this.y=e,this}},{key:"setZ",value:function(e){return this.z=e,this}},{key:"setW",value:function(e){return this.w=e,this}},{key:"setComponent",value:function(e,t){switch(e){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: "+e)}return this}},{key:"getComponent",value:function(e){switch(e){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: "+e)}}},{key:"clone",value:function(){return new this.constructor(this.x,this.y,this.z,this.w)}},{key:"copy",value:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}},{key:"add",value:function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}},{key:"addScalar",value:function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}},{key:"addVectors",value:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}},{key:"addScaledVector",value:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}},{key:"sub",value:function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}},{key:"subScalar",value:function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}},{key:"subVectors",value:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}},{key:"multiply",value:function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}},{key:"multiplyScalar",value:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}},{key:"applyMatrix4",value:function(e){var t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}},{key:"divideScalar",value:function(e){return this.multiplyScalar(1/e)}},{key:"setAxisAngleFromQuaternion",value:function(e){this.w=2*Math.acos(e.w);var t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}},{key:"setAxisAngleFromRotationMatrix",value:function(e){var t,n,r,i,a=.01,A=.1,o=e.elements,s=o[0],l=o[4],u=o[8],c=o[1],d=o[5],h=o[9],f=o[2],p=o[6],g=o[10];if(Math.abs(l-c)<a&&Math.abs(u-f)<a&&Math.abs(h-p)<a){if(Math.abs(l+c)<A&&Math.abs(u+f)<A&&Math.abs(h+p)<A&&Math.abs(s+d+g-3)<A)return this.set(1,0,0,0),this;t=Math.PI;var m=(s+1)/2,v=(d+1)/2,y=(g+1)/2,w=(l+c)/4,B=(u+f)/4,_=(h+p)/4;return m>v&&m>y?m<a?(n=0,r=.707106781,i=.707106781):(r=w/(n=Math.sqrt(m)),i=B/n):v>y?v<a?(n=.707106781,r=0,i=.707106781):(n=w/(r=Math.sqrt(v)),i=_/r):y<a?(n=.707106781,r=.707106781,i=0):(n=B/(i=Math.sqrt(y)),r=_/i),this.set(n,r,i,t),this}var b=Math.sqrt((p-h)*(p-h)+(u-f)*(u-f)+(c-l)*(c-l));return Math.abs(b)<.001&&(b=1),this.x=(p-h)/b,this.y=(u-f)/b,this.z=(c-l)/b,this.w=Math.acos((s+d+g-1)/2),this}},{key:"min",value:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}},{key:"max",value:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}},{key:"clamp",value:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}},{key:"clampScalar",value:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}},{key:"clampLength",value:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}},{key:"floor",value:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}},{key:"ceil",value:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}},{key:"round",value:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}},{key:"roundToZero",value: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.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}},{key:"negate",value:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}},{key:"dot",value:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}},{key:"lengthSq",value:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}},{key:"length",value:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}},{key:"manhattanLength",value:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}},{key:"normalize",value:function(){return this.divideScalar(this.length()||1)}},{key:"setLength",value:function(e){return this.normalize().multiplyScalar(e)}},{key:"lerp",value:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}},{key:"lerpVectors",value:function(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}},{key:"equals",value:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}},{key:"fromArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}},{key:"fromBufferAttribute",value:function(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}},{key:"random",value:function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}},{key:Symbol.iterator,value:c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.x;case 2:return e.next=4,this.y;case 4:return e.next=6,this.z;case 6:return e.next=8,this.w;case 8:case"end":return e.stop()}}),e,this)}))}]),t}(),jm=function(e){x(n,e);var t=U(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};y(this,n),(e=t.call(this)).isWebGLRenderTarget=!0,e.width=r,e.height=i,e.depth=1,e.scissor=new Wm(0,0,r,i),e.scissorTest=!1,e.viewport=new Wm(0,0,r,i);var A={width:r,height:i,depth:1};return e.texture=new Km(A,a.mapping,a.wrapS,a.wrapT,a.magFilter,a.minFilter,a.format,a.type,a.anisotropy,a.encoding),e.texture.isRenderTargetTexture=!0,e.texture.flipY=!1,e.texture.generateMipmaps=void 0!==a.generateMipmaps&&a.generateMipmaps,e.texture.internalFormat=void 0!==a.internalFormat?a.internalFormat:null,e.texture.minFilter=void 0!==a.minFilter?a.minFilter:Kp,e.depthBuffer=void 0===a.depthBuffer||a.depthBuffer,e.stencilBuffer=void 0!==a.stencilBuffer&&a.stencilBuffer,e.depthTexture=void 0!==a.depthTexture?a.depthTexture:null,e.samples=void 0!==a.samples?a.samples:0,e}return _(n,[{key:"setSize",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;var t=Object.assign({},e.texture.image);return this.texture.source=new Vm(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}},{key:"dispose",value:function(){this.dispatchEvent({type:"dispose"})}}]),n}(lm),Xm=function(e){x(n,e);var t=U(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return y(this,n),(e=t.call(this,null)).isDataArrayTexture=!0,e.image={data:r,width:i,height:a,depth:A},e.magFilter=Vp,e.minFilter=Vp,e.wrapR=Np,e.generateMipmaps=!1,e.flipY=!1,e.unpackAlignment=1,e}return _(n)}(Km),qm=function(e){x(n,e);var t=U(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return y(this,n),(e=t.call(this,null)).isData3DTexture=!0,e.image={data:r,width:i,height:a,depth:A},e.magFilter=Vp,e.minFilter=Vp,e.wrapR=Np,e.generateMipmaps=!1,e.flipY=!1,e.unpackAlignment=1,e}return _(n)}(Km),Ym=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;y(this,t),this.isQuaternion=!0,this._x=e,this._y=n,this._z=r,this._w=i}return _(t,[{key:"x",get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},{key:"w",get:function(){return this._w},set:function(e){this._w=e,this._onChangeCallback()}},{key:"set",value:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}},{key:"clone",value:function(){return new this.constructor(this._x,this._y,this._z,this._w)}},{key:"copy",value:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}},{key:"setFromEuler",value:function(e,t){var n=e._x,r=e._y,i=e._z,a=e._order,A=Math.cos,o=Math.sin,s=A(n/2),l=A(r/2),u=A(i/2),c=o(n/2),d=o(r/2),h=o(i/2);switch(a){case"XYZ":this._x=c*l*u+s*d*h,this._y=s*d*u-c*l*h,this._z=s*l*h+c*d*u,this._w=s*l*u-c*d*h;break;case"YXZ":this._x=c*l*u+s*d*h,this._y=s*d*u-c*l*h,this._z=s*l*h-c*d*u,this._w=s*l*u+c*d*h;break;case"ZXY":this._x=c*l*u-s*d*h,this._y=s*d*u+c*l*h,this._z=s*l*h+c*d*u,this._w=s*l*u-c*d*h;break;case"ZYX":this._x=c*l*u-s*d*h,this._y=s*d*u+c*l*h,this._z=s*l*h-c*d*u,this._w=s*l*u+c*d*h;break;case"YZX":this._x=c*l*u+s*d*h,this._y=s*d*u+c*l*h,this._z=s*l*h-c*d*u,this._w=s*l*u-c*d*h;break;case"XZY":this._x=c*l*u-s*d*h,this._y=s*d*u-c*l*h,this._z=s*l*h+c*d*u,this._w=s*l*u+c*d*h;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!1!==t&&this._onChangeCallback(),this}},{key:"setFromAxisAngle",value:function(e,t){var n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}},{key:"setFromRotationMatrix",value:function(e){var t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],A=t[5],o=t[9],s=t[2],l=t[6],u=t[10],c=n+A+u;if(c>0){var d=.5/Math.sqrt(c+1);this._w=.25/d,this._x=(l-o)*d,this._y=(i-s)*d,this._z=(a-r)*d}else if(n>A&&n>u){var h=2*Math.sqrt(1+n-A-u);this._w=(l-o)/h,this._x=.25*h,this._y=(r+a)/h,this._z=(i+s)/h}else if(A>u){var f=2*Math.sqrt(1+A-n-u);this._w=(i-s)/f,this._x=(r+a)/f,this._y=.25*f,this._z=(o+l)/f}else{var p=2*Math.sqrt(1+u-n-A);this._w=(a-r)/p,this._x=(i+s)/p,this._y=(o+l)/p,this._z=.25*p}return this._onChangeCallback(),this}},{key:"setFromUnitVectors",value:function(e,t){var n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}},{key:"angleTo",value:function(e){return 2*Math.acos(Math.abs(pm(this.dot(e),-1,1)))}},{key:"rotateTowards",value:function(e,t){var n=this.angleTo(e);if(0===n)return this;var r=Math.min(1,t/n);return this.slerp(e,r),this}},{key:"identity",value:function(){return this.set(0,0,0,1)}},{key:"invert",value:function(){return this.conjugate()}},{key:"conjugate",value:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}},{key:"dot",value:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}},{key:"lengthSq",value:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}},{key:"length",value:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}},{key:"normalize",value:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}},{key:"multiply",value:function(e){return this.multiplyQuaternions(this,e)}},{key:"premultiply",value:function(e){return this.multiplyQuaternions(e,this)}},{key:"multiplyQuaternions",value:function(e,t){var n=e._x,r=e._y,i=e._z,a=e._w,A=t._x,o=t._y,s=t._z,l=t._w;return this._x=n*l+a*A+r*s-i*o,this._y=r*l+a*o+i*A-n*s,this._z=i*l+a*s+n*o-r*A,this._w=a*l-n*A-r*o-i*s,this._onChangeCallback(),this}},{key:"slerp",value:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,i=this._z,a=this._w,A=a*e._w+n*e._x+r*e._y+i*e._z;if(A<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,A=-A):this.copy(e),A>=1)return this._w=a,this._x=n,this._y=r,this._z=i,this;var o=1-A*A;if(o<=Number.EPSILON){var s=1-t;return this._w=s*a+t*this._w,this._x=s*n+t*this._x,this._y=s*r+t*this._y,this._z=s*i+t*this._z,this.normalize(),this._onChangeCallback(),this}var l=Math.sqrt(o),u=Math.atan2(l,A),c=Math.sin((1-t)*u)/l,d=Math.sin(t*u)/l;return this._w=a*c+this._w*d,this._x=n*c+this._x*d,this._y=r*c+this._y*d,this._z=i*c+this._z*d,this._onChangeCallback(),this}},{key:"slerpQuaternions",value:function(e,t,n){return this.copy(e).slerp(t,n)}},{key:"random",value:function(){var e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(i),n*Math.cos(i),t*Math.sin(r))}},{key:"equals",value:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}},{key:"fromArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}},{key:"fromBufferAttribute",value:function(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}},{key:"_onChange",value:function(e){return this._onChangeCallback=e,this}},{key:"_onChangeCallback",value:function(){}},{key:Symbol.iterator,value:c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._x;case 2:return e.next=4,this._y;case 4:return e.next=6,this._z;case 6:return e.next=8,this._w;case 8:case"end":return e.stop()}}),e,this)}))}],[{key:"slerpFlat",value:function(e,t,n,r,i,a,A){var o=n[r+0],s=n[r+1],l=n[r+2],u=n[r+3],c=i[a+0],d=i[a+1],h=i[a+2],f=i[a+3];if(0===A)return e[t+0]=o,e[t+1]=s,e[t+2]=l,void(e[t+3]=u);if(1===A)return e[t+0]=c,e[t+1]=d,e[t+2]=h,void(e[t+3]=f);if(u!==f||o!==c||s!==d||l!==h){var p=1-A,g=o*c+s*d+l*h+u*f,m=g>=0?1:-1,v=1-g*g;if(v>Number.EPSILON){var y=Math.sqrt(v),w=Math.atan2(y,g*m);p=Math.sin(p*w)/y,A=Math.sin(A*w)/y}var B=A*m;if(o=o*p+c*B,s=s*p+d*B,l=l*p+h*B,u=u*p+f*B,p===1-A){var _=1/Math.sqrt(o*o+s*s+l*l+u*u);o*=_,s*=_,l*=_,u*=_}}e[t]=o,e[t+1]=s,e[t+2]=l,e[t+3]=u}},{key:"multiplyQuaternionsFlat",value:function(e,t,n,r,i,a){var A=n[r],o=n[r+1],s=n[r+2],l=n[r+3],u=i[a],c=i[a+1],d=i[a+2],h=i[a+3];return e[t]=A*h+l*u+o*d-s*c,e[t+1]=o*h+l*c+s*u-A*d,e[t+2]=s*h+l*d+A*c-o*u,e[t+3]=l*h-A*u-o*c-s*d,e}}]),t}(),Jm=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;y(this,t),t.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}return _(t,[{key:"set",value:function(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}},{key:"setScalar",value:function(e){return this.x=e,this.y=e,this.z=e,this}},{key:"setX",value:function(e){return this.x=e,this}},{key:"setY",value:function(e){return this.y=e,this}},{key:"setZ",value:function(e){return this.z=e,this}},{key:"setComponent",value:function(e,t){switch(e){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: "+e)}return this}},{key:"getComponent",value:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}},{key:"clone",value:function(){return new this.constructor(this.x,this.y,this.z)}},{key:"copy",value:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}},{key:"add",value:function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}},{key:"addScalar",value:function(e){return this.x+=e,this.y+=e,this.z+=e,this}},{key:"addVectors",value:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}},{key:"addScaledVector",value:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}},{key:"sub",value:function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}},{key:"subScalar",value:function(e){return this.x-=e,this.y-=e,this.z-=e,this}},{key:"subVectors",value:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}},{key:"multiply",value:function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}},{key:"multiplyScalar",value:function(e){return this.x*=e,this.y*=e,this.z*=e,this}},{key:"multiplyVectors",value:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}},{key:"applyEuler",value:function(e){return this.applyQuaternion($m.setFromEuler(e))}},{key:"applyAxisAngle",value:function(e,t){return this.applyQuaternion($m.setFromAxisAngle(e,t))}},{key:"applyMatrix3",value:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}},{key:"applyNormalMatrix",value:function(e){return this.applyMatrix3(e).normalize()}},{key:"applyMatrix4",value:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}},{key:"applyQuaternion",value:function(e){var t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,A=e.z,o=e.w,s=o*t+a*r-A*n,l=o*n+A*t-i*r,u=o*r+i*n-a*t,c=-i*t-a*n-A*r;return this.x=s*o+c*-i+l*-A-u*-a,this.y=l*o+c*-a+u*-i-s*-A,this.z=u*o+c*-A+s*-a-l*-i,this}},{key:"project",value:function(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}},{key:"unproject",value:function(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}},{key:"transformDirection",value:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}},{key:"divide",value:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}},{key:"divideScalar",value:function(e){return this.multiplyScalar(1/e)}},{key:"min",value:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}},{key:"max",value:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}},{key:"clamp",value:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}},{key:"clampScalar",value:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}},{key:"clampLength",value:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}},{key:"floor",value:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}},{key:"ceil",value:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}},{key:"round",value:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}},{key:"roundToZero",value: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}},{key:"negate",value:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}},{key:"dot",value:function(e){return this.x*e.x+this.y*e.y+this.z*e.z}},{key:"lengthSq",value:function(){return this.x*this.x+this.y*this.y+this.z*this.z}},{key:"length",value:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}},{key:"manhattanLength",value:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}},{key:"normalize",value:function(){return this.divideScalar(this.length()||1)}},{key:"setLength",value:function(e){return this.normalize().multiplyScalar(e)}},{key:"lerp",value:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}},{key:"lerpVectors",value:function(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}},{key:"cross",value:function(e){return this.crossVectors(this,e)}},{key:"crossVectors",value:function(e,t){var n=e.x,r=e.y,i=e.z,a=t.x,A=t.y,o=t.z;return this.x=r*o-i*A,this.y=i*a-n*o,this.z=n*A-r*a,this}},{key:"projectOnVector",value:function(e){var t=e.lengthSq();if(0===t)return this.set(0,0,0);var n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}},{key:"projectOnPlane",value:function(e){return Zm.copy(this).projectOnVector(e),this.sub(Zm)}},{key:"reflect",value:function(e){return this.sub(Zm.copy(e).multiplyScalar(2*this.dot(e)))}},{key:"angleTo",value:function(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;var n=this.dot(e)/t;return Math.acos(pm(n,-1,1))}},{key:"distanceTo",value:function(e){return Math.sqrt(this.distanceToSquared(e))}},{key:"distanceToSquared",value:function(e){var t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}},{key:"manhattanDistanceTo",value:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}},{key:"setFromSpherical",value:function(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}},{key:"setFromSphericalCoords",value:function(e,t,n){var r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}},{key:"setFromCylindrical",value:function(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}},{key:"setFromCylindricalCoords",value:function(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}},{key:"setFromMatrixPosition",value:function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}},{key:"setFromMatrixScale",value:function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}},{key:"setFromMatrixColumn",value:function(e,t){return this.fromArray(e.elements,4*t)}},{key:"setFromMatrix3Column",value:function(e,t){return this.fromArray(e.elements,3*t)}},{key:"setFromEuler",value:function(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}},{key:"equals",value:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}},{key:"fromArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}},{key:"fromBufferAttribute",value:function(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}},{key:"random",value:function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}},{key:"randomDirection",value:function(){var e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-Math.pow(e,2));return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}},{key:Symbol.iterator,value:c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.x;case 2:return e.next=4,this.y;case 4:return e.next=6,this.z;case 6:case"end":return e.stop()}}),e,this)}))}]),t}(),Zm=new Jm,$m=new Ym,ev=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Jm(1/0,1/0,1/0),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Jm(-1/0,-1/0,-1/0);y(this,e),this.isBox3=!0,this.min=t,this.max=n}return _(e,[{key:"set",value:function(e,t){return this.min.copy(e),this.max.copy(t),this}},{key:"setFromArray",value:function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,A=-1/0,o=0,s=e.length;o<s;o+=3){var l=e[o],u=e[o+1],c=e[o+2];l<t&&(t=l),u<n&&(n=u),c<r&&(r=c),l>i&&(i=l),u>a&&(a=u),c>A&&(A=c)}return this.min.set(t,n,r),this.max.set(i,a,A),this}},{key:"setFromBufferAttribute",value:function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,A=-1/0,o=0,s=e.count;o<s;o++){var l=e.getX(o),u=e.getY(o),c=e.getZ(o);l<t&&(t=l),u<n&&(n=u),c<r&&(r=c),l>i&&(i=l),u>a&&(a=u),c>A&&(A=c)}return this.min.set(t,n,r),this.max.set(i,a,A),this}},{key:"setFromPoints",value:function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}},{key:"setFromCenterAndSize",value:function(e,t){var n=nv.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}},{key:"setFromObject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.makeEmpty(),this.expandByObject(e,t)}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(e){return this.min.copy(e.min),this.max.copy(e.max),this}},{key:"makeEmpty",value:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}},{key:"isEmpty",value:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}},{key:"getCenter",value:function(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}},{key:"getSize",value:function(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}},{key:"expandByPoint",value:function(e){return this.min.min(e),this.max.max(e),this}},{key:"expandByVector",value:function(e){return this.min.sub(e),this.max.add(e),this}},{key:"expandByScalar",value:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this}},{key:"expandByObject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.updateWorldMatrix(!1,!1);var n=e.geometry;if(void 0!==n)if(t&&void 0!=n.attributes&&void 0!==n.attributes.position)for(var r=n.attributes.position,i=0,a=r.count;i<a;i++)nv.fromBufferAttribute(r,i).applyMatrix4(e.matrixWorld),this.expandByPoint(nv);else null===n.boundingBox&&n.computeBoundingBox(),rv.copy(n.boundingBox),rv.applyMatrix4(e.matrixWorld),this.union(rv);for(var A=e.children,o=0,s=A.length;o<s;o++)this.expandByObject(A[o],t);return this}},{key:"containsPoint",value:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}},{key:"containsBox",value:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}},{key:"getParameter",value:function(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}},{key:"intersectsBox",value:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}},{key:"intersectsSphere",value:function(e){return this.clampPoint(e.center,nv),nv.distanceToSquared(e.center)<=e.radius*e.radius}},{key:"intersectsPlane",value:function(e){var t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}},{key:"intersectsTriangle",value:function(e){if(this.isEmpty())return!1;this.getCenter(uv),cv.subVectors(this.max,uv),iv.subVectors(e.a,uv),av.subVectors(e.b,uv),Av.subVectors(e.c,uv),ov.subVectors(av,iv),sv.subVectors(Av,av),lv.subVectors(iv,Av);var t=[0,-ov.z,ov.y,0,-sv.z,sv.y,0,-lv.z,lv.y,ov.z,0,-ov.x,sv.z,0,-sv.x,lv.z,0,-lv.x,-ov.y,ov.x,0,-sv.y,sv.x,0,-lv.y,lv.x,0];return!!fv(t,iv,av,Av,cv)&&(!!fv(t=[1,0,0,0,1,0,0,0,1],iv,av,Av,cv)&&(dv.crossVectors(ov,sv),fv(t=[dv.x,dv.y,dv.z],iv,av,Av,cv)))}},{key:"clampPoint",value:function(e,t){return t.copy(e).clamp(this.min,this.max)}},{key:"distanceToPoint",value:function(e){return nv.copy(e).clamp(this.min,this.max).sub(e).length()}},{key:"getBoundingSphere",value:function(e){return this.getCenter(e.center),e.radius=.5*this.getSize(nv).length(),e}},{key:"intersect",value:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}},{key:"union",value:function(e){return this.min.min(e.min),this.max.max(e.max),this}},{key:"applyMatrix4",value:function(e){return this.isEmpty()||(tv[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),tv[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),tv[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),tv[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),tv[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),tv[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),tv[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),tv[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(tv)),this}},{key:"translate",value:function(e){return this.min.add(e),this.max.add(e),this}},{key:"equals",value:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}]),e}(),tv=[new Jm,new Jm,new Jm,new Jm,new Jm,new Jm,new Jm,new Jm],nv=new Jm,rv=new ev,iv=new Jm,av=new Jm,Av=new Jm,ov=new Jm,sv=new Jm,lv=new Jm,uv=new Jm,cv=new Jm,dv=new Jm,hv=new Jm;function fv(e,t,n,r,i){for(var a=0,A=e.length-3;a<=A;a+=3){hv.fromArray(e,a);var o=i.x*Math.abs(hv.x)+i.y*Math.abs(hv.y)+i.z*Math.abs(hv.z),s=t.dot(hv),l=n.dot(hv),u=r.dot(hv);if(Math.max(-Math.max(s,l,u),Math.min(s,l,u))>o)return!1}return!0}var pv=new ev,gv=new Jm,mv=new Jm,vv=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Jm,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;y(this,e),this.center=t,this.radius=n}return _(e,[{key:"set",value:function(e,t){return this.center.copy(e),this.radius=t,this}},{key:"setFromPoints",value:function(e,t){var n=this.center;void 0!==t?n.copy(t):pv.setFromPoints(e).getCenter(n);for(var r=0,i=0,a=e.length;i<a;i++)r=Math.max(r,n.distanceToSquared(e[i]));return this.radius=Math.sqrt(r),this}},{key:"copy",value:function(e){return this.center.copy(e.center),this.radius=e.radius,this}},{key:"isEmpty",value:function(){return this.radius<0}},{key:"makeEmpty",value:function(){return this.center.set(0,0,0),this.radius=-1,this}},{key:"containsPoint",value:function(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}},{key:"distanceToPoint",value:function(e){return e.distanceTo(this.center)-this.radius}},{key:"intersectsSphere",value:function(e){var t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}},{key:"intersectsBox",value:function(e){return e.intersectsSphere(this)}},{key:"intersectsPlane",value:function(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}},{key:"clampPoint",value:function(e,t){var n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}},{key:"getBoundingBox",value:function(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}},{key:"applyMatrix4",value:function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}},{key:"translate",value:function(e){return this.center.add(e),this}},{key:"expandByPoint",value:function(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;gv.subVectors(e,this.center);var t=gv.lengthSq();if(t>this.radius*this.radius){var n=Math.sqrt(t),r=.5*(n-this.radius);this.center.addScaledVector(gv,r/n),this.radius+=r}return this}},{key:"union",value:function(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(mv.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(gv.copy(e.center).add(mv)),this.expandByPoint(gv.copy(e.center).sub(mv))),this)}},{key:"equals",value:function(e){return e.center.equals(this.center)&&e.radius===this.radius}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}]),e}(),yv=new Jm,wv=new Jm,Bv=new Jm,_v=new Jm,bv=new Jm,xv=new Jm,Cv=new Jm,Sv=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Jm,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Jm(0,0,-1);y(this,e),this.origin=t,this.direction=n}return _(e,[{key:"set",value:function(e,t){return this.origin.copy(e),this.direction.copy(t),this}},{key:"copy",value:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}},{key:"at",value:function(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}},{key:"lookAt",value:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this}},{key:"recast",value:function(e){return this.origin.copy(this.at(e,yv)),this}},{key:"closestPointToPoint",value:function(e,t){t.subVectors(e,this.origin);var n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}},{key:"distanceToPoint",value:function(e){return Math.sqrt(this.distanceSqToPoint(e))}},{key:"distanceSqToPoint",value:function(e){var t=yv.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(yv.copy(this.direction).multiplyScalar(t).add(this.origin),yv.distanceToSquared(e))}},{key:"distanceSqToSegment",value:function(e,t,n,r){wv.copy(e).add(t).multiplyScalar(.5),Bv.copy(t).sub(e).normalize(),_v.copy(this.origin).sub(wv);var i,a,A,o,s=.5*e.distanceTo(t),l=-this.direction.dot(Bv),u=_v.dot(this.direction),c=-_v.dot(Bv),d=_v.lengthSq(),h=Math.abs(1-l*l);if(h>0)if(a=l*u-c,o=s*h,(i=l*c-u)>=0)if(a>=-o)if(a<=o){var f=1/h;A=(i*=f)*(i+l*(a*=f)+2*u)+a*(l*i+a+2*c)+d}else a=s,A=-(i=Math.max(0,-(l*a+u)))*i+a*(a+2*c)+d;else a=-s,A=-(i=Math.max(0,-(l*a+u)))*i+a*(a+2*c)+d;else a<=-o?A=-(i=Math.max(0,-(-l*s+u)))*i+(a=i>0?-s:Math.min(Math.max(-s,-c),s))*(a+2*c)+d:a<=o?(i=0,A=(a=Math.min(Math.max(-s,-c),s))*(a+2*c)+d):A=-(i=Math.max(0,-(l*s+u)))*i+(a=i>0?s:Math.min(Math.max(-s,-c),s))*(a+2*c)+d;else a=l>0?-s:s,A=-(i=Math.max(0,-(l*a+u)))*i+a*(a+2*c)+d;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(Bv).multiplyScalar(a).add(wv),A}},{key:"intersectSphere",value:function(e,t){yv.subVectors(e.center,this.origin);var n=yv.dot(this.direction),r=yv.dot(yv)-n*n,i=e.radius*e.radius;if(r>i)return null;var a=Math.sqrt(i-r),A=n-a,o=n+a;return A<0&&o<0?null:A<0?this.at(o,t):this.at(A,t)}},{key:"intersectsSphere",value:function(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}},{key:"distanceToPlane",value:function(e){var t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}},{key:"intersectPlane",value:function(e,t){var n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}},{key:"intersectsPlane",value:function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0}},{key:"intersectBox",value:function(e,t){var n,r,i,a,A,o,s=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,c=this.origin;return s>=0?(n=(e.min.x-c.x)*s,r=(e.max.x-c.x)*s):(n=(e.max.x-c.x)*s,r=(e.min.x-c.x)*s),l>=0?(i=(e.min.y-c.y)*l,a=(e.max.y-c.y)*l):(i=(e.max.y-c.y)*l,a=(e.min.y-c.y)*l),n>a||i>r?null:((i>n||isNaN(n))&&(n=i),(a<r||isNaN(r))&&(r=a),u>=0?(A=(e.min.z-c.z)*u,o=(e.max.z-c.z)*u):(A=(e.max.z-c.z)*u,o=(e.min.z-c.z)*u),n>o||A>r?null:((A>n||n!==n)&&(n=A),(o<r||r!==r)&&(r=o),r<0?null:this.at(n>=0?n:r,t)))}},{key:"intersectsBox",value:function(e){return null!==this.intersectBox(e,yv)}},{key:"intersectTriangle",value:function(e,t,n,r,i){bv.subVectors(t,e),xv.subVectors(n,e),Cv.crossVectors(bv,xv);var a,A=this.direction.dot(Cv);if(A>0){if(r)return null;a=1}else{if(!(A<0))return null;a=-1,A=-A}_v.subVectors(this.origin,e);var o=a*this.direction.dot(xv.crossVectors(_v,xv));if(o<0)return null;var s=a*this.direction.dot(bv.cross(_v));if(s<0)return null;if(o+s>A)return null;var l=-a*_v.dot(Cv);return l<0?null:this.at(l/A,i)}},{key:"applyMatrix4",value:function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}},{key:"equals",value:function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}]),e}(),Ev=function(){function e(){y(this,e),e.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}return _(e,[{key:"set",value:function(e,t,n,r,i,a,A,o,s,l,u,c,d,h,f,p){var g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=a,g[9]=A,g[13]=o,g[2]=s,g[6]=l,g[10]=u,g[14]=c,g[3]=d,g[7]=h,g[11]=f,g[15]=p,this}},{key:"identity",value:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}},{key:"clone",value:function(){return(new e).fromArray(this.elements)}},{key:"copy",value:function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}},{key:"copyPosition",value:function(e){var t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}},{key:"setFromMatrix3",value:function(e){var t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}},{key:"extractBasis",value:function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}},{key:"makeBasis",value:function(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}},{key:"extractRotation",value:function(e){var t=this.elements,n=e.elements,r=1/Uv.setFromMatrixColumn(e,0).length(),i=1/Uv.setFromMatrixColumn(e,1).length(),a=1/Uv.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}},{key:"makeRotationFromEuler",value:function(e){var t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),A=Math.sin(n),o=Math.cos(r),s=Math.sin(r),l=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){var c=a*l,d=a*u,h=A*l,f=A*u;t[0]=o*l,t[4]=-o*u,t[8]=s,t[1]=d+h*s,t[5]=c-f*s,t[9]=-A*o,t[2]=f-c*s,t[6]=h+d*s,t[10]=a*o}else if("YXZ"===e.order){var p=o*l,g=o*u,m=s*l,v=s*u;t[0]=p+v*A,t[4]=m*A-g,t[8]=a*s,t[1]=a*u,t[5]=a*l,t[9]=-A,t[2]=g*A-m,t[6]=v+p*A,t[10]=a*o}else if("ZXY"===e.order){var y=o*l,w=o*u,B=s*l,_=s*u;t[0]=y-_*A,t[4]=-a*u,t[8]=B+w*A,t[1]=w+B*A,t[5]=a*l,t[9]=_-y*A,t[2]=-a*s,t[6]=A,t[10]=a*o}else if("ZYX"===e.order){var b=a*l,x=a*u,C=A*l,S=A*u;t[0]=o*l,t[4]=C*s-x,t[8]=b*s+S,t[1]=o*u,t[5]=S*s+b,t[9]=x*s-C,t[2]=-s,t[6]=A*o,t[10]=a*o}else if("YZX"===e.order){var E=a*o,U=a*s,M=A*o,F=A*s;t[0]=o*l,t[4]=F-E*u,t[8]=M*u+U,t[1]=u,t[5]=a*l,t[9]=-A*l,t[2]=-s*l,t[6]=U*u+M,t[10]=E-F*u}else if("XZY"===e.order){var T=a*o,k=a*s,Q=A*o,L=A*s;t[0]=o*l,t[4]=-u,t[8]=s*l,t[1]=T*u+L,t[5]=a*l,t[9]=k*u-Q,t[2]=Q*u-k,t[6]=A*l,t[10]=L*u+T}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}},{key:"makeRotationFromQuaternion",value:function(e){return this.compose(Fv,e,Tv)}},{key:"lookAt",value:function(e,t,n){var r=this.elements;return Lv.subVectors(e,t),0===Lv.lengthSq()&&(Lv.z=1),Lv.normalize(),kv.crossVectors(n,Lv),0===kv.lengthSq()&&(1===Math.abs(n.z)?Lv.x+=1e-4:Lv.z+=1e-4,Lv.normalize(),kv.crossVectors(n,Lv)),kv.normalize(),Qv.crossVectors(Lv,kv),r[0]=kv.x,r[4]=Qv.x,r[8]=Lv.x,r[1]=kv.y,r[5]=Qv.y,r[9]=Lv.y,r[2]=kv.z,r[6]=Qv.z,r[10]=Lv.z,this}},{key:"multiply",value:function(e){return this.multiplyMatrices(this,e)}},{key:"premultiply",value:function(e){return this.multiplyMatrices(e,this)}},{key:"multiplyMatrices",value:function(e,t){var n=e.elements,r=t.elements,i=this.elements,a=n[0],A=n[4],o=n[8],s=n[12],l=n[1],u=n[5],c=n[9],d=n[13],h=n[2],f=n[6],p=n[10],g=n[14],m=n[3],v=n[7],y=n[11],w=n[15],B=r[0],_=r[4],b=r[8],x=r[12],C=r[1],S=r[5],E=r[9],U=r[13],M=r[2],F=r[6],T=r[10],k=r[14],Q=r[3],L=r[7],D=r[11],I=r[15];return i[0]=a*B+A*C+o*M+s*Q,i[4]=a*_+A*S+o*F+s*L,i[8]=a*b+A*E+o*T+s*D,i[12]=a*x+A*U+o*k+s*I,i[1]=l*B+u*C+c*M+d*Q,i[5]=l*_+u*S+c*F+d*L,i[9]=l*b+u*E+c*T+d*D,i[13]=l*x+u*U+c*k+d*I,i[2]=h*B+f*C+p*M+g*Q,i[6]=h*_+f*S+p*F+g*L,i[10]=h*b+f*E+p*T+g*D,i[14]=h*x+f*U+p*k+g*I,i[3]=m*B+v*C+y*M+w*Q,i[7]=m*_+v*S+y*F+w*L,i[11]=m*b+v*E+y*T+w*D,i[15]=m*x+v*U+y*k+w*I,this}},{key:"multiplyScalar",value:function(e){var t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}},{key:"determinant",value:function(){var e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],A=e[5],o=e[9],s=e[13],l=e[2],u=e[6],c=e[10],d=e[14];return e[3]*(+i*o*u-r*s*u-i*A*c+n*s*c+r*A*d-n*o*d)+e[7]*(+t*o*d-t*s*c+i*a*c-r*a*d+r*s*l-i*o*l)+e[11]*(+t*s*u-t*A*d-i*a*u+n*a*d+i*A*l-n*s*l)+e[15]*(-r*A*l-t*o*u+t*A*c+r*a*u-n*a*c+n*o*l)}},{key:"transpose",value:function(){var e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}},{key:"setPosition",value:function(e,t,n){var r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}},{key:"invert",value:function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],A=e[5],o=e[6],s=e[7],l=e[8],u=e[9],c=e[10],d=e[11],h=e[12],f=e[13],p=e[14],g=e[15],m=u*p*s-f*c*s+f*o*d-A*p*d-u*o*g+A*c*g,v=h*c*s-l*p*s-h*o*d+a*p*d+l*o*g-a*c*g,y=l*f*s-h*u*s+h*A*d-a*f*d-l*A*g+a*u*g,w=h*u*o-l*f*o-h*A*c+a*f*c+l*A*p-a*u*p,B=t*m+n*v+r*y+i*w;if(0===B)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);var _=1/B;return e[0]=m*_,e[1]=(f*c*i-u*p*i-f*r*d+n*p*d+u*r*g-n*c*g)*_,e[2]=(A*p*i-f*o*i+f*r*s-n*p*s-A*r*g+n*o*g)*_,e[3]=(u*o*i-A*c*i-u*r*s+n*c*s+A*r*d-n*o*d)*_,e[4]=v*_,e[5]=(l*p*i-h*c*i+h*r*d-t*p*d-l*r*g+t*c*g)*_,e[6]=(h*o*i-a*p*i-h*r*s+t*p*s+a*r*g-t*o*g)*_,e[7]=(a*c*i-l*o*i+l*r*s-t*c*s-a*r*d+t*o*d)*_,e[8]=y*_,e[9]=(h*u*i-l*f*i-h*n*d+t*f*d+l*n*g-t*u*g)*_,e[10]=(a*f*i-h*A*i+h*n*s-t*f*s-a*n*g+t*A*g)*_,e[11]=(l*A*i-a*u*i-l*n*s+t*u*s+a*n*d-t*A*d)*_,e[12]=w*_,e[13]=(l*f*r-h*u*r+h*n*c-t*f*c-l*n*p+t*u*p)*_,e[14]=(h*A*r-a*f*r-h*n*o+t*f*o+a*n*p-t*A*p)*_,e[15]=(a*u*r-l*A*r+l*n*o-t*u*o-a*n*c+t*A*c)*_,this}},{key:"scale",value:function(e){var t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}},{key:"getMaxScaleOnAxis",value:function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}},{key:"makeTranslation",value:function(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}},{key:"makeRotationX",value:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}},{key:"makeRotationY",value:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}},{key:"makeRotationZ",value:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}},{key:"makeRotationAxis",value:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,A=e.y,o=e.z,s=i*a,l=i*A;return this.set(s*a+n,s*A-r*o,s*o+r*A,0,s*A+r*o,l*A+n,l*o-r*a,0,s*o-r*A,l*o+r*a,i*o*o+n,0,0,0,0,1),this}},{key:"makeScale",value:function(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}},{key:"makeShear",value:function(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}},{key:"compose",value:function(e,t,n){var r=this.elements,i=t._x,a=t._y,A=t._z,o=t._w,s=i+i,l=a+a,u=A+A,c=i*s,d=i*l,h=i*u,f=a*l,p=a*u,g=A*u,m=o*s,v=o*l,y=o*u,w=n.x,B=n.y,_=n.z;return r[0]=(1-(f+g))*w,r[1]=(d+y)*w,r[2]=(h-v)*w,r[3]=0,r[4]=(d-y)*B,r[5]=(1-(c+g))*B,r[6]=(p+m)*B,r[7]=0,r[8]=(h+v)*_,r[9]=(p-m)*_,r[10]=(1-(c+f))*_,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}},{key:"decompose",value:function(e,t,n){var r=this.elements,i=Uv.set(r[0],r[1],r[2]).length(),a=Uv.set(r[4],r[5],r[6]).length(),A=Uv.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],Mv.copy(this);var o=1/i,s=1/a,l=1/A;return Mv.elements[0]*=o,Mv.elements[1]*=o,Mv.elements[2]*=o,Mv.elements[4]*=s,Mv.elements[5]*=s,Mv.elements[6]*=s,Mv.elements[8]*=l,Mv.elements[9]*=l,Mv.elements[10]*=l,t.setFromRotationMatrix(Mv),n.x=i,n.y=a,n.z=A,this}},{key:"makePerspective",value:function(e,t,n,r,i,a){var A=this.elements,o=2*i/(t-e),s=2*i/(n-r),l=(t+e)/(t-e),u=(n+r)/(n-r),c=-(a+i)/(a-i),d=-2*a*i/(a-i);return A[0]=o,A[4]=0,A[8]=l,A[12]=0,A[1]=0,A[5]=s,A[9]=u,A[13]=0,A[2]=0,A[6]=0,A[10]=c,A[14]=d,A[3]=0,A[7]=0,A[11]=-1,A[15]=0,this}},{key:"makeOrthographic",value:function(e,t,n,r,i,a){var A=this.elements,o=1/(t-e),s=1/(n-r),l=1/(a-i),u=(t+e)*o,c=(n+r)*s,d=(a+i)*l;return A[0]=2*o,A[4]=0,A[8]=0,A[12]=-u,A[1]=0,A[5]=2*s,A[9]=0,A[13]=-c,A[2]=0,A[6]=0,A[10]=-2*l,A[14]=-d,A[3]=0,A[7]=0,A[11]=0,A[15]=1,this}},{key:"equals",value:function(e){for(var t=this.elements,n=e.elements,r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<16;n++)this.elements[n]=e[n+t];return this}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}]),e}(),Uv=new Jm,Mv=new Ev,Fv=new Jm(0,0,0),Tv=new Jm(1,1,1),kv=new Jm,Qv=new Jm,Lv=new Jm,Dv=new Ev,Iv=new Ym,Rv=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.DEFAULT_ORDER;y(this,t),this.isEuler=!0,this._x=e,this._y=n,this._z=r,this._order=i}return _(t,[{key:"x",get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},{key:"order",get:function(){return this._order},set:function(e){this._order=e,this._onChangeCallback()}},{key:"set",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this._order;return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}},{key:"clone",value:function(){return new this.constructor(this._x,this._y,this._z,this._order)}},{key:"copy",value:function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}},{key:"setFromRotationMatrix",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._order,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e.elements,i=r[0],a=r[4],A=r[8],o=r[1],s=r[5],l=r[9],u=r[2],c=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(pm(A,-1,1)),Math.abs(A)<.9999999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(c,s),this._z=0);break;case"YXZ":this._x=Math.asin(-pm(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(A,d),this._z=Math.atan2(o,s)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(pm(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(-u,d),this._z=Math.atan2(-a,s)):(this._y=0,this._z=Math.atan2(o,i));break;case"ZYX":this._y=Math.asin(-pm(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(c,d),this._z=Math.atan2(o,i)):(this._x=0,this._z=Math.atan2(-a,s));break;case"YZX":this._z=Math.asin(pm(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-l,s),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(A,d));break;case"XZY":this._z=Math.asin(-pm(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(c,s),this._y=Math.atan2(A,i)):(this._x=Math.atan2(-l,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}},{key:"setFromQuaternion",value:function(e,t,n){return Dv.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Dv,t,n)}},{key:"setFromVector3",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._order;return this.set(e.x,e.y,e.z,t)}},{key:"reorder",value:function(e){return Iv.setFromEuler(this),this.setFromQuaternion(Iv,e)}},{key:"equals",value:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}},{key:"fromArray",value:function(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}},{key:"_onChange",value:function(e){return this._onChangeCallback=e,this}},{key:"_onChangeCallback",value:function(){}},{key:Symbol.iterator,value:c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._x;case 2:return e.next=4,this._y;case 4:return e.next=6,this._z;case 6:return e.next=8,this._order;case 8:case"end":return e.stop()}}),e,this)}))}]),t}();Rv.DEFAULT_ORDER="XYZ";var Hv=function(){function e(){y(this,e),this.mask=1}return _(e,[{key:"set",value:function(e){this.mask=(1<<e|0)>>>0}},{key:"enable",value:function(e){this.mask|=1<<e|0}},{key:"enableAll",value:function(){this.mask=-1}},{key:"toggle",value:function(e){this.mask^=1<<e|0}},{key:"disable",value:function(e){this.mask&=~(1<<e|0)}},{key:"disableAll",value:function(){this.mask=0}},{key:"test",value:function(e){return 0!==(this.mask&e.mask)}},{key:"isEnabled",value:function(e){return 0!==(this.mask&(1<<e|0))}}]),e}(),Pv=0,Nv=new Jm,Ov=new Ym,Vv=new Ev,zv=new Jm,Gv=new Jm,Kv=new Jm,Wv=new Ym,jv=new Jm(1,0,0),Xv=new Jm(0,1,0),qv=new Jm(0,0,1),Yv={type:"added"},Jv={type:"removed"},Zv=function(e){x(n,e);var t=U(n);function n(){var e;y(this,n),(e=t.call(this)).isObject3D=!0,Object.defineProperty(E(e),"id",{value:Pv++}),e.uuid=fm(),e.name="",e.type="Object3D",e.parent=null,e.children=[],e.up=n.DEFAULT_UP.clone();var r=new Jm,i=new Rv,a=new Ym,A=new Jm(1,1,1);return i._onChange((function(){a.setFromEuler(i,!1)})),a._onChange((function(){i.setFromQuaternion(a,void 0,!1)})),Object.defineProperties(E(e),{position:{configurable:!0,enumerable:!0,value:r},rotation:{configurable:!0,enumerable:!0,value:i},quaternion:{configurable:!0,enumerable:!0,value:a},scale:{configurable:!0,enumerable:!0,value:A},modelViewMatrix:{value:new Ev},normalMatrix:{value:new Cm}}),e.matrix=new Ev,e.matrixWorld=new Ev,e.matrixAutoUpdate=n.DEFAULT_MATRIX_AUTO_UPDATE,e.matrixWorldNeedsUpdate=!1,e.matrixWorldAutoUpdate=n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,e.layers=new Hv,e.visible=!0,e.castShadow=!1,e.receiveShadow=!1,e.frustumCulled=!0,e.renderOrder=0,e.animations=[],e.userData={},e}return _(n,[{key:"onBeforeRender",value:function(){}},{key:"onAfterRender",value:function(){}},{key:"applyMatrix4",value:function(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}},{key:"applyQuaternion",value:function(e){return this.quaternion.premultiply(e),this}},{key:"setRotationFromAxisAngle",value:function(e,t){this.quaternion.setFromAxisAngle(e,t)}},{key:"setRotationFromEuler",value:function(e){this.quaternion.setFromEuler(e,!0)}},{key:"setRotationFromMatrix",value:function(e){this.quaternion.setFromRotationMatrix(e)}},{key:"setRotationFromQuaternion",value:function(e){this.quaternion.copy(e)}},{key:"rotateOnAxis",value:function(e,t){return Ov.setFromAxisAngle(e,t),this.quaternion.multiply(Ov),this}},{key:"rotateOnWorldAxis",value:function(e,t){return Ov.setFromAxisAngle(e,t),this.quaternion.premultiply(Ov),this}},{key:"rotateX",value:function(e){return this.rotateOnAxis(jv,e)}},{key:"rotateY",value:function(e){return this.rotateOnAxis(Xv,e)}},{key:"rotateZ",value:function(e){return this.rotateOnAxis(qv,e)}},{key:"translateOnAxis",value:function(e,t){return Nv.copy(e).applyQuaternion(this.quaternion),this.position.add(Nv.multiplyScalar(t)),this}},{key:"translateX",value:function(e){return this.translateOnAxis(jv,e)}},{key:"translateY",value:function(e){return this.translateOnAxis(Xv,e)}},{key:"translateZ",value:function(e){return this.translateOnAxis(qv,e)}},{key:"localToWorld",value:function(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}},{key:"worldToLocal",value:function(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Vv.copy(this.matrixWorld).invert())}},{key:"lookAt",value:function(e,t,n){e.isVector3?zv.copy(e):zv.set(e,t,n);var r=this.parent;this.updateWorldMatrix(!0,!1),Gv.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Vv.lookAt(Gv,zv,this.up):Vv.lookAt(zv,Gv,this.up),this.quaternion.setFromRotationMatrix(Vv),r&&(Vv.extractRotation(r.matrixWorld),Ov.setFromRotationMatrix(Vv),this.quaternion.premultiply(Ov.invert()))}},{key:"add",value:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(Yv)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}},{key:"remove",value:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}var n=this.children.indexOf(e);return-1!==n&&(e.parent=null,this.children.splice(n,1),e.dispatchEvent(Jv)),this}},{key:"removeFromParent",value:function(){var e=this.parent;return null!==e&&e.remove(this),this}},{key:"clear",value:function(){for(var e=0;e<this.children.length;e++){var t=this.children[e];t.parent=null,t.dispatchEvent(Jv)}return this.children.length=0,this}},{key:"attach",value:function(e){return this.updateWorldMatrix(!0,!1),Vv.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),Vv.multiply(e.parent.matrixWorld)),e.applyMatrix4(Vv),this.add(e),e.updateWorldMatrix(!1,!0),this}},{key:"getObjectById",value:function(e){return this.getObjectByProperty("id",e)}},{key:"getObjectByName",value:function(e){return this.getObjectByProperty("name",e)}},{key:"getObjectByProperty",value:function(e,t){if(this[e]===t)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(e,t);if(void 0!==i)return i}}},{key:"getObjectsByProperty",value:function(e,t){var n=[];this[e]===t&&n.push(this);for(var r=0,i=this.children.length;r<i;r++){var a=this.children[r].getObjectsByProperty(e,t);a.length>0&&(n=n.concat(a))}return n}},{key:"getWorldPosition",value:function(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}},{key:"getWorldQuaternion",value:function(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Gv,e,Kv),e}},{key:"getWorldScale",value:function(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Gv,Wv,e),e}},{key:"getWorldDirection",value:function(e){this.updateWorldMatrix(!0,!1);var t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}},{key:"raycast",value:function(){}},{key:"traverse",value:function(e){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverse(e)}},{key:"traverseVisible",value:function(e){if(!1!==this.visible){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}}},{key:"traverseAncestors",value:function(e){var t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}},{key:"updateMatrix",value:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}},{key:"updateMatrixWorld",value:function(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);for(var t=this.children,n=0,r=t.length;n<r;n++){var i=t[n];!0!==i.matrixWorldAutoUpdate&&!0!==e||i.updateMatrixWorld(e)}}},{key:"updateWorldMatrix",value:function(e,t){var n=this.parent;if(!0===e&&null!==n&&!0===n.matrixWorldAutoUpdate&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t)for(var r=this.children,i=0,a=r.length;i<a;i++){var A=r[i];!0===A.matrixWorldAutoUpdate&&A.updateWorldMatrix(!1,!0)}}},{key:"toJSON",value:function(e){var t=void 0===e||"string"===typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);var a=this.geometry.parameters;if(void 0!==a&&void 0!==a.shapes){var A=a.shapes;if(Array.isArray(A))for(var o=0,s=A.length;o<s;o++){var l=A[o];i(e.shapes,l)}else i(e.shapes,A)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){for(var u=[],c=0,d=this.material.length;c<d;c++)u.push(i(e.materials,this.material[c]));r.material=u}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(var h=0;h<this.children.length;h++)r.children.push(this.children[h].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(var f=0;f<this.animations.length;f++){var p=this.animations[f];r.animations.push(i(e.animations,p))}}if(t){var g=x(e.geometries),m=x(e.materials),v=x(e.textures),y=x(e.images),w=x(e.shapes),B=x(e.skeletons),_=x(e.animations),b=x(e.nodes);g.length>0&&(n.geometries=g),m.length>0&&(n.materials=m),v.length>0&&(n.textures=v),y.length>0&&(n.images=y),w.length>0&&(n.shapes=w),B.length>0&&(n.skeletons=B),_.length>0&&(n.animations=_),b.length>0&&(n.nodes=b)}return n.object=r,n;function x(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}}},{key:"clone",value:function(e){return(new this.constructor).copy(this,e)}},{key:"copy",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(var n=0;n<e.children.length;n++){var r=e.children[n];this.add(r.clone())}return this}}]),n}(lm);Zv.DEFAULT_UP=new Jm(0,1,0),Zv.DEFAULT_MATRIX_AUTO_UPDATE=!0,Zv.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var $v=new Jm,ey=new Jm,ty=new Jm,ny=new Jm,ry=new Jm,iy=new Jm,ay=new Jm,Ay=new Jm,oy=new Jm,sy=new Jm,ly=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Jm,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Jm,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Jm;y(this,e),this.a=t,this.b=n,this.c=r}return _(e,[{key:"set",value:function(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}},{key:"setFromPointsAndIndices",value:function(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}},{key:"setFromAttributeAndIndices",value:function(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}},{key:"getArea",value:function(){return $v.subVectors(this.c,this.b),ey.subVectors(this.a,this.b),.5*$v.cross(ey).length()}},{key:"getMidpoint",value:function(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}},{key:"getNormal",value:function(t){return e.getNormal(this.a,this.b,this.c,t)}},{key:"getPlane",value:function(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}},{key:"getBarycoord",value:function(t,n){return e.getBarycoord(t,this.a,this.b,this.c,n)}},{key:"getUV",value:function(t,n,r,i,a){return e.getUV(t,this.a,this.b,this.c,n,r,i,a)}},{key:"containsPoint",value:function(t){return e.containsPoint(t,this.a,this.b,this.c)}},{key:"isFrontFacing",value:function(t){return e.isFrontFacing(this.a,this.b,this.c,t)}},{key:"intersectsBox",value:function(e){return e.intersectsTriangle(this)}},{key:"closestPointToPoint",value:function(e,t){var n,r,i=this.a,a=this.b,A=this.c;ry.subVectors(a,i),iy.subVectors(A,i),Ay.subVectors(e,i);var o=ry.dot(Ay),s=iy.dot(Ay);if(o<=0&&s<=0)return t.copy(i);oy.subVectors(e,a);var l=ry.dot(oy),u=iy.dot(oy);if(l>=0&&u<=l)return t.copy(a);var c=o*u-l*s;if(c<=0&&o>=0&&l<=0)return n=o/(o-l),t.copy(i).addScaledVector(ry,n);sy.subVectors(e,A);var d=ry.dot(sy),h=iy.dot(sy);if(h>=0&&d<=h)return t.copy(A);var f=d*s-o*h;if(f<=0&&s>=0&&h<=0)return r=s/(s-h),t.copy(i).addScaledVector(iy,r);var p=l*h-d*u;if(p<=0&&u-l>=0&&d-h>=0)return ay.subVectors(A,a),r=(u-l)/(u-l+(d-h)),t.copy(a).addScaledVector(ay,r);var g=1/(p+f+c);return n=f*g,r=c*g,t.copy(i).addScaledVector(ry,n).addScaledVector(iy,r)}},{key:"equals",value:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}],[{key:"getNormal",value:function(e,t,n,r){r.subVectors(n,t),$v.subVectors(e,t),r.cross($v);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}},{key:"getBarycoord",value:function(e,t,n,r,i){$v.subVectors(r,t),ey.subVectors(n,t),ty.subVectors(e,t);var a=$v.dot($v),A=$v.dot(ey),o=$v.dot(ty),s=ey.dot(ey),l=ey.dot(ty),u=a*s-A*A;if(0===u)return i.set(-2,-1,-1);var c=1/u,d=(s*o-A*l)*c,h=(a*l-A*o)*c;return i.set(1-d-h,h,d)}},{key:"containsPoint",value:function(e,t,n,r){return this.getBarycoord(e,t,n,r,ny),ny.x>=0&&ny.y>=0&&ny.x+ny.y<=1}},{key:"getUV",value:function(e,t,n,r,i,a,A,o){return this.getBarycoord(e,t,n,r,ny),o.set(0,0),o.addScaledVector(i,ny.x),o.addScaledVector(a,ny.y),o.addScaledVector(A,ny.z),o}},{key:"isFrontFacing",value:function(e,t,n,r){return $v.subVectors(n,t),ey.subVectors(e,t),$v.cross(ey).dot(r)<0}}]),e}(),uy=0,cy=function(e){x(n,e);var t=U(n);function n(){var e;return y(this,n),(e=t.call(this)).isMaterial=!0,Object.defineProperty(E(e),"id",{value:uy++}),e.uuid=fm(),e.name="",e.type="Material",e.blending=Yf,e.side=Wf,e.vertexColors=!1,e.opacity=1,e.transparent=!1,e.blendSrc=up,e.blendDst=cp,e.blendEquation=tp,e.blendSrcAlpha=null,e.blendDstAlpha=null,e.blendEquationAlpha=null,e.depthFunc=wp,e.depthTest=!0,e.depthWrite=!0,e.stencilWriteMask=255,e.stencilFunc=519,e.stencilRef=0,e.stencilFuncMask=255,e.stencilFail=am,e.stencilZFail=am,e.stencilZPass=am,e.stencilWrite=!1,e.clippingPlanes=null,e.clipIntersection=!1,e.clipShadows=!1,e.shadowSide=null,e.colorWrite=!0,e.precision=null,e.polygonOffset=!1,e.polygonOffsetFactor=0,e.polygonOffsetUnits=0,e.dithering=!1,e.alphaToCoverage=!1,e.premultipliedAlpha=!1,e.forceSinglePass=!1,e.visible=!0,e.toneMapped=!0,e.userData={},e.version=0,e._alphaTest=0,e}return _(n,[{key:"alphaTest",get:function(){return this._alphaTest},set:function(e){this._alphaTest>0!==e>0&&this.version++,this._alphaTest=e}},{key:"onBuild",value:function(){}},{key:"onBeforeRender",value:function(){}},{key:"onBeforeCompile",value:function(){}},{key:"customProgramCacheKey",value:function(){return this.onBeforeCompile.toString()}},{key:"setValues",value:function(e){if(void 0!==e)for(var t in e){var n=e[t];if(void 0!==n){var r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE.Material: '"+t+"' parameter is undefined.")}}},{key:"toJSON",value:function(e){var t=void 0===e||"string"===typeof e;t&&(e={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Yf&&(n.blending=this.blending),this.side!==Wf&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.forceSinglePass&&(n.forceSinglePass=this.forceSinglePass),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){var i=r(e.textures),a=r(e.images);i.length>0&&(n.textures=i),a.length>0&&(n.images=a)}return n}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;var t=e.clippingPlanes,n=null;if(null!==t){var r=t.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=t[i].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}},{key:"dispose",value:function(){this.dispatchEvent({type:"dispose"})}},{key:"needsUpdate",set:function(e){!0===e&&this.version++}}]),n}(lm),dy=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),(r=t.call(this)).isMeshBasicMaterial=!0,r.type="MeshBasicMaterial",r.color=new Nm(16777215),r.map=null,r.lightMap=null,r.lightMapIntensity=1,r.aoMap=null,r.aoMapIntensity=1,r.specularMap=null,r.alphaMap=null,r.envMap=null,r.combine=Cp,r.reflectivity=1,r.refractionRatio=.98,r.wireframe=!1,r.wireframeLinewidth=1,r.wireframeLinecap="round",r.wireframeLinejoin="round",r.fog=!0,r.setValues(e),r}return _(n,[{key:"copy",value:function(e){return ed(C(n.prototype),"copy",this).call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}]),n}(cy),hy=new Jm,fy=new xm,py=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(y(this,e),Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=n,this.count=void 0!==t?t.length/n:0,this.normalized=r,this.usage=Am,this.updateRange={offset:0,count:-1},this.version=0}return _(e,[{key:"onUploadCallback",value:function(){}},{key:"needsUpdate",set:function(e){!0===e&&this.version++}},{key:"setUsage",value:function(e){return this.usage=e,this}},{key:"copy",value:function(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}},{key:"copyAt",value:function(e,t,n){e*=this.itemSize,n*=t.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}},{key:"copyArray",value:function(e){return this.array.set(e),this}},{key:"applyMatrix3",value:function(e){if(2===this.itemSize)for(var t=0,n=this.count;t<n;t++)fy.fromBufferAttribute(this,t),fy.applyMatrix3(e),this.setXY(t,fy.x,fy.y);else if(3===this.itemSize)for(var r=0,i=this.count;r<i;r++)hy.fromBufferAttribute(this,r),hy.applyMatrix3(e),this.setXYZ(r,hy.x,hy.y,hy.z);return this}},{key:"applyMatrix4",value:function(e){for(var t=0,n=this.count;t<n;t++)hy.fromBufferAttribute(this,t),hy.applyMatrix4(e),this.setXYZ(t,hy.x,hy.y,hy.z);return this}},{key:"applyNormalMatrix",value:function(e){for(var t=0,n=this.count;t<n;t++)hy.fromBufferAttribute(this,t),hy.applyNormalMatrix(e),this.setXYZ(t,hy.x,hy.y,hy.z);return this}},{key:"transformDirection",value:function(e){for(var t=0,n=this.count;t<n;t++)hy.fromBufferAttribute(this,t),hy.transformDirection(e),this.setXYZ(t,hy.x,hy.y,hy.z);return this}},{key:"set",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.array.set(e,t),this}},{key:"getX",value:function(e){var t=this.array[e*this.itemSize];return this.normalized&&(t=Bm(t,this.array)),t}},{key:"setX",value:function(e,t){return this.normalized&&(t=_m(t,this.array)),this.array[e*this.itemSize]=t,this}},{key:"getY",value:function(e){var t=this.array[e*this.itemSize+1];return this.normalized&&(t=Bm(t,this.array)),t}},{key:"setY",value:function(e,t){return this.normalized&&(t=_m(t,this.array)),this.array[e*this.itemSize+1]=t,this}},{key:"getZ",value:function(e){var t=this.array[e*this.itemSize+2];return this.normalized&&(t=Bm(t,this.array)),t}},{key:"setZ",value:function(e,t){return this.normalized&&(t=_m(t,this.array)),this.array[e*this.itemSize+2]=t,this}},{key:"getW",value:function(e){var t=this.array[e*this.itemSize+3];return this.normalized&&(t=Bm(t,this.array)),t}},{key:"setW",value:function(e,t){return this.normalized&&(t=_m(t,this.array)),this.array[e*this.itemSize+3]=t,this}},{key:"setXY",value:function(e,t,n){return e*=this.itemSize,this.normalized&&(t=_m(t,this.array),n=_m(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}},{key:"setXYZ",value:function(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=_m(t,this.array),n=_m(n,this.array),r=_m(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}},{key:"setXYZW",value:function(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=_m(t,this.array),n=_m(n,this.array),r=_m(r,this.array),i=_m(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}},{key:"onUpload",value:function(e){return this.onUploadCallback=e,this}},{key:"clone",value:function(){return new this.constructor(this.array,this.itemSize).copy(this)}},{key:"toJSON",value:function(){var e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==Am&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}},{key:"copyColorsArray",value:function(){console.error("THREE.BufferAttribute: copyColorsArray() was removed in r144.")}},{key:"copyVector2sArray",value:function(){console.error("THREE.BufferAttribute: copyVector2sArray() was removed in r144.")}},{key:"copyVector3sArray",value:function(){console.error("THREE.BufferAttribute: copyVector3sArray() was removed in r144.")}},{key:"copyVector4sArray",value:function(){console.error("THREE.BufferAttribute: copyVector4sArray() was removed in r144.")}}]),e}(),gy=function(e){x(n,e);var t=U(n);function n(e,r,i){return y(this,n),t.call(this,new Uint16Array(e),r,i)}return _(n)}(py),my=function(e){x(n,e);var t=U(n);function n(e,r,i){return y(this,n),t.call(this,new Uint32Array(e),r,i)}return _(n)}(py),vy=function(e){x(n,e);var t=U(n);function n(e,r,i){return y(this,n),t.call(this,new Float32Array(e),r,i)}return _(n)}(py),yy=0,wy=new Ev,By=new Zv,_y=new Jm,by=new ev,xy=new ev,Cy=new Jm,Sy=function(e){x(n,e);var t=U(n);function n(){var e;return y(this,n),(e=t.call(this)).isBufferGeometry=!0,Object.defineProperty(E(e),"id",{value:yy++}),e.uuid=fm(),e.name="",e.type="BufferGeometry",e.index=null,e.attributes={},e.morphAttributes={},e.morphTargetsRelative=!1,e.groups=[],e.boundingBox=null,e.boundingSphere=null,e.drawRange={start:0,count:1/0},e.userData={},e}return _(n,[{key:"getIndex",value:function(){return this.index}},{key:"setIndex",value:function(e){return Array.isArray(e)?this.index=new(Em(e)?my:gy)(e,1):this.index=e,this}},{key:"getAttribute",value:function(e){return this.attributes[e]}},{key:"setAttribute",value:function(e,t){return this.attributes[e]=t,this}},{key:"deleteAttribute",value:function(e){return delete this.attributes[e],this}},{key:"hasAttribute",value:function(e){return void 0!==this.attributes[e]}},{key:"addGroup",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.groups.push({start:e,count:t,materialIndex:n})}},{key:"clearGroups",value:function(){this.groups=[]}},{key:"setDrawRange",value:function(e,t){this.drawRange.start=e,this.drawRange.count=t}},{key:"applyMatrix4",value:function(e){var t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);var n=this.attributes.normal;if(void 0!==n){var r=(new Cm).getNormalMatrix(e);n.applyNormalMatrix(r),n.needsUpdate=!0}var i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(e),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}},{key:"applyQuaternion",value:function(e){return wy.makeRotationFromQuaternion(e),this.applyMatrix4(wy),this}},{key:"rotateX",value:function(e){return wy.makeRotationX(e),this.applyMatrix4(wy),this}},{key:"rotateY",value:function(e){return wy.makeRotationY(e),this.applyMatrix4(wy),this}},{key:"rotateZ",value:function(e){return wy.makeRotationZ(e),this.applyMatrix4(wy),this}},{key:"translate",value:function(e,t,n){return wy.makeTranslation(e,t,n),this.applyMatrix4(wy),this}},{key:"scale",value:function(e,t,n){return wy.makeScale(e,t,n),this.applyMatrix4(wy),this}},{key:"lookAt",value:function(e){return By.lookAt(e),By.updateMatrix(),this.applyMatrix4(By.matrix),this}},{key:"center",value:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(_y).negate(),this.translate(_y.x,_y.y,_y.z),this}},{key:"setFromPoints",value:function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];t.push(i.x,i.y,i.z||0)}return this.setAttribute("position",new vy(t,3)),this}},{key:"computeBoundingBox",value:function(){null===this.boundingBox&&(this.boundingBox=new ev);var e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new Jm(-1/0,-1/0,-1/0),new Jm(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(var n=0,r=t.length;n<r;n++){var i=t[n];by.setFromBufferAttribute(i),this.morphTargetsRelative?(Cy.addVectors(this.boundingBox.min,by.min),this.boundingBox.expandByPoint(Cy),Cy.addVectors(this.boundingBox.max,by.max),this.boundingBox.expandByPoint(Cy)):(this.boundingBox.expandByPoint(by.min),this.boundingBox.expandByPoint(by.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}},{key:"computeBoundingSphere",value:function(){null===this.boundingSphere&&(this.boundingSphere=new vv);var e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new Jm,1/0);if(e){var n=this.boundingSphere.center;if(by.setFromBufferAttribute(e),t)for(var r=0,i=t.length;r<i;r++){var a=t[r];xy.setFromBufferAttribute(a),this.morphTargetsRelative?(Cy.addVectors(by.min,xy.min),by.expandByPoint(Cy),Cy.addVectors(by.max,xy.max),by.expandByPoint(Cy)):(by.expandByPoint(xy.min),by.expandByPoint(xy.max))}by.getCenter(n);for(var A=0,o=0,s=e.count;o<s;o++)Cy.fromBufferAttribute(e,o),A=Math.max(A,n.distanceToSquared(Cy));if(t)for(var l=0,u=t.length;l<u;l++)for(var c=t[l],d=this.morphTargetsRelative,h=0,f=c.count;h<f;h++)Cy.fromBufferAttribute(c,h),d&&(_y.fromBufferAttribute(e,h),Cy.add(_y)),A=Math.max(A,n.distanceToSquared(Cy));this.boundingSphere.radius=Math.sqrt(A),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}},{key:"computeTangents",value:function(){var e=this.index,t=this.attributes;if(null!==e&&void 0!==t.position&&void 0!==t.normal&&void 0!==t.uv){var n=e.array,r=t.position.array,i=t.normal.array,a=t.uv.array,A=r.length/3;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new py(new Float32Array(4*A),4));for(var o=this.getAttribute("tangent").array,s=[],l=[],u=0;u<A;u++)s[u]=new Jm,l[u]=new Jm;var c=new Jm,d=new Jm,h=new Jm,f=new xm,p=new xm,g=new xm,m=new Jm,v=new Jm,y=this.groups;0===y.length&&(y=[{start:0,count:n.length}]);for(var w=0,B=y.length;w<B;++w)for(var _=y[w],b=_.start,x=b,C=b+_.count;x<C;x+=3)I(n[x+0],n[x+1],n[x+2]);for(var S=new Jm,E=new Jm,U=new Jm,M=new Jm,F=0,T=y.length;F<T;++F)for(var k=y[F],Q=k.start,L=Q,D=Q+k.count;L<D;L+=3)R(n[L+0]),R(n[L+1]),R(n[L+2])}else console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");function I(e,t,n){c.fromArray(r,3*e),d.fromArray(r,3*t),h.fromArray(r,3*n),f.fromArray(a,2*e),p.fromArray(a,2*t),g.fromArray(a,2*n),d.sub(c),h.sub(c),p.sub(f),g.sub(f);var i=1/(p.x*g.y-g.x*p.y);isFinite(i)&&(m.copy(d).multiplyScalar(g.y).addScaledVector(h,-p.y).multiplyScalar(i),v.copy(h).multiplyScalar(p.x).addScaledVector(d,-g.x).multiplyScalar(i),s[e].add(m),s[t].add(m),s[n].add(m),l[e].add(v),l[t].add(v),l[n].add(v))}function R(e){U.fromArray(i,3*e),M.copy(U);var t=s[e];S.copy(t),S.sub(U.multiplyScalar(U.dot(t))).normalize(),E.crossVectors(M,t);var n=E.dot(l[e])<0?-1:1;o[4*e]=S.x,o[4*e+1]=S.y,o[4*e+2]=S.z,o[4*e+3]=n}}},{key:"computeVertexNormals",value:function(){var e=this.index,t=this.getAttribute("position");if(void 0!==t){var n=this.getAttribute("normal");if(void 0===n)n=new py(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(var r=0,i=n.count;r<i;r++)n.setXYZ(r,0,0,0);var a=new Jm,A=new Jm,o=new Jm,s=new Jm,l=new Jm,u=new Jm,c=new Jm,d=new Jm;if(e)for(var h=0,f=e.count;h<f;h+=3){var p=e.getX(h+0),g=e.getX(h+1),m=e.getX(h+2);a.fromBufferAttribute(t,p),A.fromBufferAttribute(t,g),o.fromBufferAttribute(t,m),c.subVectors(o,A),d.subVectors(a,A),c.cross(d),s.fromBufferAttribute(n,p),l.fromBufferAttribute(n,g),u.fromBufferAttribute(n,m),s.add(c),l.add(c),u.add(c),n.setXYZ(p,s.x,s.y,s.z),n.setXYZ(g,l.x,l.y,l.z),n.setXYZ(m,u.x,u.y,u.z)}else for(var v=0,y=t.count;v<y;v+=3)a.fromBufferAttribute(t,v+0),A.fromBufferAttribute(t,v+1),o.fromBufferAttribute(t,v+2),c.subVectors(o,A),d.subVectors(a,A),c.cross(d),n.setXYZ(v+0,c.x,c.y,c.z),n.setXYZ(v+1,c.x,c.y,c.z),n.setXYZ(v+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}},{key:"merge",value:function(){return console.error("THREE.BufferGeometry.merge() has been removed. Use THREE.BufferGeometryUtils.mergeBufferGeometries() instead."),this}},{key:"normalizeNormals",value:function(){for(var e=this.attributes.normal,t=0,n=e.count;t<n;t++)Cy.fromBufferAttribute(e,t),Cy.normalize(),e.setXYZ(t,Cy.x,Cy.y,Cy.z)}},{key:"toNonIndexed",value:function(){function e(e,t){for(var n=e.array,r=e.itemSize,i=e.normalized,a=new n.constructor(t.length*r),A=0,o=0,s=0,l=t.length;s<l;s++){A=e.isInterleavedBufferAttribute?t[s]*e.data.stride+e.offset:t[s]*r;for(var u=0;u<r;u++)a[o++]=n[A++]}return new py(a,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;var t=new n,r=this.index.array,i=this.attributes;for(var a in i){var A=e(i[a],r);t.setAttribute(a,A)}var o=this.morphAttributes;for(var s in o){for(var l=[],u=o[s],c=0,d=u.length;c<d;c++){var h=e(u[c],r);l.push(h)}t.morphAttributes[s]=l}t.morphTargetsRelative=this.morphTargetsRelative;for(var f=this.groups,p=0,g=f.length;p<g;p++){var m=f[p];t.addGroup(m.start,m.count,m.materialIndex)}return t}},{key:"toJSON",value:function(){var e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){var t=this.parameters;for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};var r=this.index;null!==r&&(e.data.index={type:r.array.constructor.name,array:Array.prototype.slice.call(r.array)});var i=this.attributes;for(var a in i){var A=i[a];e.data.attributes[a]=A.toJSON(e.data)}var o={},s=!1;for(var l in this.morphAttributes){for(var u=this.morphAttributes[l],c=[],d=0,h=u.length;d<h;d++){var f=u[d];c.push(f.toJSON(e.data))}c.length>0&&(o[l]=c,s=!0)}s&&(e.data.morphAttributes=o,e.data.morphTargetsRelative=this.morphTargetsRelative);var p=this.groups;p.length>0&&(e.data.groups=JSON.parse(JSON.stringify(p)));var g=this.boundingSphere;return null!==g&&(e.data.boundingSphere={center:g.center.toArray(),radius:g.radius}),e}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;var t={};this.name=e.name;var n=e.index;null!==n&&this.setIndex(n.clone(t));var r=e.attributes;for(var i in r){var a=r[i];this.setAttribute(i,a.clone(t))}var A=e.morphAttributes;for(var o in A){for(var s=[],l=A[o],u=0,c=l.length;u<c;u++)s.push(l[u].clone(t));this.morphAttributes[o]=s}this.morphTargetsRelative=e.morphTargetsRelative;for(var d=e.groups,h=0,f=d.length;h<f;h++){var p=d[h];this.addGroup(p.start,p.count,p.materialIndex)}var g=e.boundingBox;null!==g&&(this.boundingBox=g.clone());var m=e.boundingSphere;return null!==m&&(this.boundingSphere=m.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,void 0!==e.parameters&&(this.parameters=Object.assign({},e.parameters)),this}},{key:"dispose",value:function(){this.dispatchEvent({type:"dispose"})}}]),n}(lm),Ey=new Ev,Uy=new Sv,My=new vv,Fy=new Jm,Ty=new Jm,ky=new Jm,Qy=new Jm,Ly=new Jm,Dy=new xm,Iy=new xm,Ry=new xm,Hy=new Jm,Py=new Jm,Ny=function(e){x(n,e);var t=U(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Sy,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new dy;return y(this,n),(e=t.call(this)).isMesh=!0,e.type="Mesh",e.geometry=r,e.material=i,e.updateMorphTargets(),e}return _(n,[{key:"copy",value:function(e,t){return ed(C(n.prototype),"copy",this).call(this,e,t),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}},{key:"updateMorphTargets",value:function(){var e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){var n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var r=0,i=n.length;r<i;r++){var a=n[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}},{key:"getVertexPosition",value:function(e,t){var n=this.geometry,r=n.attributes.position,i=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(r,e);var A=this.morphTargetInfluences;if(i&&A){Ly.set(0,0,0);for(var o=0,s=i.length;o<s;o++){var l=A[o],u=i[o];0!==l&&(Qy.fromBufferAttribute(u,e),a?Ly.addScaledVector(Qy,l):Ly.addScaledVector(Qy.sub(t),l))}t.add(Ly)}return this.isSkinnedMesh&&this.boneTransform(e,t),t}},{key:"raycast",value:function(e,t){var n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0!==r&&(null===n.boundingSphere&&n.computeBoundingSphere(),My.copy(n.boundingSphere),My.applyMatrix4(i),!1!==e.ray.intersectsSphere(My)&&(Ey.copy(i).invert(),Uy.copy(e.ray).applyMatrix4(Ey),null===n.boundingBox||!1!==Uy.intersectsBox(n.boundingBox)))){var a,A=n.index,o=n.attributes.position,s=n.attributes.uv,l=n.attributes.uv2,u=n.groups,c=n.drawRange;if(null!==A)if(Array.isArray(r))for(var d=0,h=u.length;d<h;d++)for(var f=u[d],p=r[f.materialIndex],g=Math.max(f.start,c.start),m=Math.min(A.count,Math.min(f.start+f.count,c.start+c.count));g<m;g+=3){var v=A.getX(g),y=A.getX(g+1),w=A.getX(g+2);(a=Oy(this,p,e,Uy,s,l,v,y,w))&&(a.faceIndex=Math.floor(g/3),a.face.materialIndex=f.materialIndex,t.push(a))}else for(var B=Math.max(0,c.start),_=Math.min(A.count,c.start+c.count);B<_;B+=3){var b=A.getX(B),x=A.getX(B+1),C=A.getX(B+2);(a=Oy(this,r,e,Uy,s,l,b,x,C))&&(a.faceIndex=Math.floor(B/3),t.push(a))}else if(void 0!==o)if(Array.isArray(r))for(var S=0,E=u.length;S<E;S++)for(var U=u[S],M=r[U.materialIndex],F=Math.max(U.start,c.start),T=Math.min(o.count,Math.min(U.start+U.count,c.start+c.count));F<T;F+=3){(a=Oy(this,M,e,Uy,s,l,F,F+1,F+2))&&(a.faceIndex=Math.floor(F/3),a.face.materialIndex=U.materialIndex,t.push(a))}else for(var k=Math.max(0,c.start),Q=Math.min(o.count,c.start+c.count);k<Q;k+=3){(a=Oy(this,r,e,Uy,s,l,k,k+1,k+2))&&(a.faceIndex=Math.floor(k/3),t.push(a))}}}}]),n}(Zv);function Oy(e,t,n,r,i,a,A,o,s){e.getVertexPosition(A,Fy),e.getVertexPosition(o,Ty),e.getVertexPosition(s,ky);var l=function(e,t,n,r,i,a,A,o){if(null===(t.side===jf?r.intersectTriangle(A,a,i,!0,o):r.intersectTriangle(i,a,A,t.side===Wf,o)))return null;Py.copy(o),Py.applyMatrix4(e.matrixWorld);var s=n.ray.origin.distanceTo(Py);return s<n.near||s>n.far?null:{distance:s,point:Py.clone(),object:e}}(e,t,n,r,Fy,Ty,ky,Hy);if(l){i&&(Dy.fromBufferAttribute(i,A),Iy.fromBufferAttribute(i,o),Ry.fromBufferAttribute(i,s),l.uv=ly.getUV(Hy,Fy,Ty,ky,Dy,Iy,Ry,new xm)),a&&(Dy.fromBufferAttribute(a,A),Iy.fromBufferAttribute(a,o),Ry.fromBufferAttribute(a,s),l.uv2=ly.getUV(Hy,Fy,Ty,ky,Dy,Iy,Ry,new xm));var u={a:A,b:o,c:s,normal:new Jm,materialIndex:0};ly.getNormal(Fy,Ty,ky,u.normal),l.face=u}return l}var Vy=function(e){x(n,e);var t=U(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;y(this,n),(e=t.call(this)).type="BoxGeometry",e.parameters={width:r,height:i,depth:a,widthSegments:A,heightSegments:o,depthSegments:s};var l=E(e);A=Math.floor(A),o=Math.floor(o),s=Math.floor(s);var u=[],c=[],d=[],h=[],f=0,p=0;function g(e,t,n,r,i,a,A,o,s,g,m){for(var v=a/s,y=A/g,w=a/2,B=A/2,_=o/2,b=s+1,x=g+1,C=0,S=0,E=new Jm,U=0;U<x;U++)for(var M=U*y-B,F=0;F<b;F++){var T=F*v-w;E[e]=T*r,E[t]=M*i,E[n]=_,c.push(E.x,E.y,E.z),E[e]=0,E[t]=0,E[n]=o>0?1:-1,d.push(E.x,E.y,E.z),h.push(F/s),h.push(1-U/g),C+=1}for(var k=0;k<g;k++)for(var Q=0;Q<s;Q++){var L=f+Q+b*k,D=f+Q+b*(k+1),I=f+(Q+1)+b*(k+1),R=f+(Q+1)+b*k;u.push(L,D,R),u.push(D,I,R),S+=6}l.addGroup(p,S,m),p+=S,f+=C}return g("z","y","x",-1,-1,a,i,r,s,o,0),g("z","y","x",1,-1,a,i,-r,s,o,1),g("x","z","y",1,1,r,a,i,A,s,2),g("x","z","y",1,-1,r,a,-i,A,s,3),g("x","y","z",1,-1,r,i,a,A,o,4),g("x","y","z",-1,-1,r,i,-a,A,o,5),e.setIndex(u),e.setAttribute("position",new vy(c,3)),e.setAttribute("normal",new vy(d,3)),e.setAttribute("uv",new vy(h,2)),e}return _(n,null,[{key:"fromJSON",value:function(e){return new n(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}]),n}(Sy);function zy(e){var t={};for(var n in e)for(var r in t[n]={},e[n]){var i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}return t}function Gy(e){for(var t={},n=0;n<e.length;n++){var r=zy(e[n]);for(var i in r)t[i]=r[i]}return t}function Ky(e){return null===e.getRenderTarget()&&e.outputEncoding===$g?rm:im}var Wy={clone:zy,merge:Gy},jy=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),(r=t.call(this)).isShaderMaterial=!0,r.type="ShaderMaterial",r.defines={},r.uniforms={},r.uniformsGroups=[],r.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",r.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",r.linewidth=1,r.wireframe=!1,r.wireframeLinewidth=1,r.fog=!1,r.lights=!1,r.clipping=!1,r.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},r.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},r.index0AttributeName=void 0,r.uniformsNeedUpdate=!1,r.glslVersion=null,void 0!==e&&r.setValues(e),r}return _(n,[{key:"copy",value:function(e){return ed(C(n.prototype),"copy",this).call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=zy(e.uniforms),this.uniformsGroups=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].clone());return t}(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}},{key:"toJSON",value:function(e){var t=ed(C(n.prototype),"toJSON",this).call(this,e);for(var r in t.glslVersion=this.glslVersion,t.uniforms={},this.uniforms){var i=this.uniforms[r].value;i&&i.isTexture?t.uniforms[r]={type:"t",value:i.toJSON(e).uuid}:i&&i.isColor?t.uniforms[r]={type:"c",value:i.getHex()}:i&&i.isVector2?t.uniforms[r]={type:"v2",value:i.toArray()}:i&&i.isVector3?t.uniforms[r]={type:"v3",value:i.toArray()}:i&&i.isVector4?t.uniforms[r]={type:"v4",value:i.toArray()}:i&&i.isMatrix3?t.uniforms[r]={type:"m3",value:i.toArray()}:i&&i.isMatrix4?t.uniforms[r]={type:"m4",value:i.toArray()}:t.uniforms[r]={value:i}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;var a={};for(var A in this.extensions)!0===this.extensions[A]&&(a[A]=!0);return Object.keys(a).length>0&&(t.extensions=a),t}}]),n}(cy),Xy=function(e){x(n,e);var t=U(n);function n(){var e;return y(this,n),(e=t.call(this)).isCamera=!0,e.type="Camera",e.matrixWorldInverse=new Ev,e.projectionMatrix=new Ev,e.projectionMatrixInverse=new Ev,e}return _(n,[{key:"copy",value:function(e,t){return ed(C(n.prototype),"copy",this).call(this,e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}},{key:"getWorldDirection",value:function(e){this.updateWorldMatrix(!0,!1);var t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}},{key:"updateMatrixWorld",value:function(e){ed(C(n.prototype),"updateMatrixWorld",this).call(this,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}},{key:"updateWorldMatrix",value:function(e,t){ed(C(n.prototype),"updateWorldMatrix",this).call(this,e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}]),n}(Zv),qy=function(e){x(n,e);var t=U(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1,A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2e3;return y(this,n),(e=t.call(this)).isPerspectiveCamera=!0,e.type="PerspectiveCamera",e.fov=r,e.zoom=1,e.near=a,e.far=A,e.focus=10,e.aspect=i,e.view=null,e.filmGauge=35,e.filmOffset=0,e.updateProjectionMatrix(),e}return _(n,[{key:"copy",value:function(e,t){return ed(C(n.prototype),"copy",this).call(this,e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}},{key:"setFocalLength",value:function(e){var t=.5*this.getFilmHeight()/e;this.fov=2*hm*Math.atan(t),this.updateProjectionMatrix()}},{key:"getFocalLength",value:function(){var e=Math.tan(.5*dm*this.fov);return.5*this.getFilmHeight()/e}},{key:"getEffectiveFOV",value:function(){return 2*hm*Math.atan(Math.tan(.5*dm*this.fov)/this.zoom)}},{key:"getFilmWidth",value:function(){return this.filmGauge*Math.min(this.aspect,1)}},{key:"getFilmHeight",value:function(){return this.filmGauge/Math.max(this.aspect,1)}},{key:"setViewOffset",value:function(e,t,n,r,i,a){this.aspect=e/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=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}},{key:"clearViewOffset",value:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}},{key:"updateProjectionMatrix",value:function(){var e=this.near,t=e*Math.tan(.5*dm*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,a=this.view;if(null!==this.view&&this.view.enabled){var A=a.fullWidth,o=a.fullHeight;i+=a.offsetX*r/A,t-=a.offsetY*n/o,r*=a.width/A,n*=a.height/o}var s=this.filmOffset;0!==s&&(i+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}},{key:"toJSON",value:function(e){var t=ed(C(n.prototype),"toJSON",this).call(this,e);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}}]),n}(Xy),Yy=-90,Jy=function(e){x(n,e);var t=U(n);function n(e,r,i){var a;y(this,n),(a=t.call(this)).type="CubeCamera",a.renderTarget=i;var A=new qy(Yy,1,e,r);A.layers=a.layers,A.up.set(0,1,0),A.lookAt(1,0,0),a.add(A);var o=new qy(Yy,1,e,r);o.layers=a.layers,o.up.set(0,1,0),o.lookAt(-1,0,0),a.add(o);var s=new qy(Yy,1,e,r);s.layers=a.layers,s.up.set(0,0,-1),s.lookAt(0,1,0),a.add(s);var l=new qy(Yy,1,e,r);l.layers=a.layers,l.up.set(0,0,1),l.lookAt(0,-1,0),a.add(l);var u=new qy(Yy,1,e,r);u.layers=a.layers,u.up.set(0,1,0),u.lookAt(0,0,1),a.add(u);var c=new qy(Yy,1,e,r);return c.layers=a.layers,c.up.set(0,1,0),c.lookAt(0,0,-1),a.add(c),a}return _(n,[{key:"update",value:function(e,t){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,r=v(this.children,6),i=r[0],a=r[1],A=r[2],o=r[3],s=r[4],l=r[5],u=e.getRenderTarget(),c=e.toneMapping,d=e.xr.enabled;e.toneMapping=Up,e.xr.enabled=!1;var h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,i),e.setRenderTarget(n,1),e.render(t,a),e.setRenderTarget(n,2),e.render(t,A),e.setRenderTarget(n,3),e.render(t,o),e.setRenderTarget(n,4),e.render(t,s),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(u),e.toneMapping=c,e.xr.enabled=d,n.texture.needsPMREMUpdate=!0}}]),n}(Zv),Zy=function(e){x(n,e);var t=U(n);function n(e,r,i,a,A,o,s,l,u,c){var d;return y(this,n),e=void 0!==e?e:[],r=void 0!==r?r:Lp,(d=t.call(this,e,r,i,a,A,o,s,l,u,c)).isCubeTexture=!0,d.flipY=!1,d}return _(n,[{key:"images",get:function(){return this.image},set:function(e){this.image=e}}]),n}(Km),$y=function(e){x(n,e);var t=U(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y(this,n),(e=t.call(this,r,r,i)).isWebGLCubeRenderTarget=!0;var a={width:r,height:r,depth:1},A=[a,a,a,a,a,a];return e.texture=new Zy(A,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),e.texture.isRenderTargetTexture=!0,e.texture.generateMipmaps=void 0!==i.generateMipmaps&&i.generateMipmaps,e.texture.minFilter=void 0!==i.minFilter?i.minFilter:Kp,e}return _(n,[{key:"fromEquirectangularTexture",value:function(e,t){this.texture.type=t.type,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;var n={tEquirect:{value:null}},r="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",i="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",a=new Vy(5,5,5),A=new jy({name:"CubemapFromEquirect",uniforms:zy(n),vertexShader:r,fragmentShader:i,side:jf,blending:qf});A.uniforms.tEquirect.value=t;var o=new Ny(a,A),s=t.minFilter;return t.minFilter===jp&&(t.minFilter=Kp),new Jy(1,10,this).update(e,o),t.minFilter=s,o.geometry.dispose(),o.material.dispose(),this}},{key:"clear",value:function(e,t,n,r){for(var i=e.getRenderTarget(),a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(t,n,r);e.setRenderTarget(i)}}]),n}(jm),ew=new Jm,tw=new Jm,nw=new Cm,rw=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Jm(1,0,0),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;y(this,e),this.isPlane=!0,this.normal=t,this.constant=n}return _(e,[{key:"set",value:function(e,t){return this.normal.copy(e),this.constant=t,this}},{key:"setComponents",value:function(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}},{key:"setFromNormalAndCoplanarPoint",value:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}},{key:"setFromCoplanarPoints",value:function(e,t,n){var r=ew.subVectors(n,t).cross(tw.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}},{key:"copy",value:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this}},{key:"normalize",value:function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}},{key:"negate",value:function(){return this.constant*=-1,this.normal.negate(),this}},{key:"distanceToPoint",value:function(e){return this.normal.dot(e)+this.constant}},{key:"distanceToSphere",value:function(e){return this.distanceToPoint(e.center)-e.radius}},{key:"projectPoint",value:function(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}},{key:"intersectLine",value:function(e,t){var n=e.delta(ew),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;var i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(n).multiplyScalar(i).add(e.start)}},{key:"intersectsLine",value:function(e){var t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}},{key:"intersectsBox",value:function(e){return e.intersectsPlane(this)}},{key:"intersectsSphere",value:function(e){return e.intersectsPlane(this)}},{key:"coplanarPoint",value:function(e){return e.copy(this.normal).multiplyScalar(-this.constant)}},{key:"applyMatrix4",value:function(e,t){var n=t||nw.getNormalMatrix(e),r=this.coplanarPoint(ew).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}},{key:"translate",value:function(e){return this.constant-=e.dot(this.normal),this}},{key:"equals",value:function(e){return e.normal.equals(this.normal)&&e.constant===this.constant}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}]),e}(),iw=new vv,aw=new Jm,Aw=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new rw,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new rw,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new rw,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new rw,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new rw,A=arguments.length>5&&void 0!==arguments[5]?arguments[5]:new rw;y(this,e),this.planes=[t,n,r,i,a,A]}return _(e,[{key:"set",value:function(e,t,n,r,i,a){var A=this.planes;return A[0].copy(e),A[1].copy(t),A[2].copy(n),A[3].copy(r),A[4].copy(i),A[5].copy(a),this}},{key:"copy",value:function(e){for(var t=this.planes,n=0;n<6;n++)t[n].copy(e.planes[n]);return this}},{key:"setFromProjectionMatrix",value:function(e){var t=this.planes,n=e.elements,r=n[0],i=n[1],a=n[2],A=n[3],o=n[4],s=n[5],l=n[6],u=n[7],c=n[8],d=n[9],h=n[10],f=n[11],p=n[12],g=n[13],m=n[14],v=n[15];return t[0].setComponents(A-r,u-o,f-c,v-p).normalize(),t[1].setComponents(A+r,u+o,f+c,v+p).normalize(),t[2].setComponents(A+i,u+s,f+d,v+g).normalize(),t[3].setComponents(A-i,u-s,f-d,v-g).normalize(),t[4].setComponents(A-a,u-l,f-h,v-m).normalize(),t[5].setComponents(A+a,u+l,f+h,v+m).normalize(),this}},{key:"intersectsObject",value:function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),iw.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(iw)}},{key:"intersectsSprite",value:function(e){return iw.center.set(0,0,0),iw.radius=.7071067811865476,iw.applyMatrix4(e.matrixWorld),this.intersectsSphere(iw)}},{key:"intersectsSphere",value:function(e){for(var t=this.planes,n=e.center,r=-e.radius,i=0;i<6;i++){if(t[i].distanceToPoint(n)<r)return!1}return!0}},{key:"intersectsBox",value:function(e){for(var t=this.planes,n=0;n<6;n++){var r=t[n];if(aw.x=r.normal.x>0?e.max.x:e.min.x,aw.y=r.normal.y>0?e.max.y:e.min.y,aw.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(aw)<0)return!1}return!0}},{key:"containsPoint",value:function(e){for(var t=this.planes,n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}]),e}();function ow(){var e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function sw(e,t){var n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);var n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){var a=r.get(t);(!a||a.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version})}else{t.isInterleavedBufferAttribute&&(t=t.data);var A=r.get(t);void 0===A?r.set(t,function(t,r){var i,a=t.array,A=t.usage,o=e.createBuffer();if(e.bindBuffer(r,o),e.bufferData(r,a,A),t.onUploadCallback(),a instanceof Float32Array)i=5126;else if(a instanceof Uint16Array)if(t.isFloat16BufferAttribute){if(!n)throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");i=5131}else i=5123;else if(a instanceof Int16Array)i=5122;else if(a instanceof Uint32Array)i=5125;else if(a instanceof Int32Array)i=5124;else if(a instanceof Int8Array)i=5120;else if(a instanceof Uint8Array)i=5121;else{if(!(a instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+a);i=5121}return{buffer:o,type:i,bytesPerElement:a.BYTES_PER_ELEMENT,version:t.version}}(t,i)):A.version<t.version&&(!function(t,r,i){var a=r.array,A=r.updateRange;e.bindBuffer(i,t),-1===A.count?e.bufferSubData(i,0,a):(n?e.bufferSubData(i,A.offset*a.BYTES_PER_ELEMENT,a,A.offset,A.count):e.bufferSubData(i,A.offset*a.BYTES_PER_ELEMENT,a.subarray(A.offset,A.offset+A.count)),A.count=-1),r.onUploadCallback()}(A.buffer,t,i),A.version=t.version)}}}}var lw=function(e){x(n,e);var t=U(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;y(this,n),(e=t.call(this)).type="PlaneGeometry",e.parameters={width:r,height:i,widthSegments:a,heightSegments:A};for(var o=r/2,s=i/2,l=Math.floor(a),u=Math.floor(A),c=l+1,d=u+1,h=r/l,f=i/u,p=[],g=[],m=[],v=[],w=0;w<d;w++)for(var B=w*f-s,_=0;_<c;_++){var b=_*h-o;g.push(b,-B,0),m.push(0,0,1),v.push(_/l),v.push(1-w/u)}for(var x=0;x<u;x++)for(var C=0;C<l;C++){var S=C+c*x,E=C+c*(x+1),U=C+1+c*(x+1),M=C+1+c*x;p.push(S,E,M),p.push(E,U,M)}return e.setIndex(p),e.setAttribute("position",new vy(g,3)),e.setAttribute("normal",new vy(m,3)),e.setAttribute("uv",new vy(v,2)),e}return _(n,null,[{key:"fromJSON",value:function(e){return new n(e.width,e.height,e.widthSegments,e.heightSegments)}}]),n}(Sy),uw={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_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_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( V * D );\n}\n#ifdef USE_IRIDESCENCE\n\tvec3 BRDF_GGX_Iridescence( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float iridescence, const in vec3 iridescenceFresnel, const in float roughness ) {\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = mix( F_Schlick( f0, f90, dotVH ), iridescenceFresnel, iridescence );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\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}\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_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\t return vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat R21 = R12;\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\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, float faceDirection ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos.xyz );\n\t\tvec3 vSigmaY = dFdy( surf_pos.xyz );\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 ) * faceDirection;\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:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.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; }\nvec3 pow2( const in vec3 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 max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\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 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 USE_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}\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 luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn 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\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\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\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:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\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}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\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#else\n\t\tvec4 envColor = vec4( 0.0 );\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\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 ) || defined( LAMBERT )\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 ) || defined( LAMBERT )\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\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\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\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\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 vFogDepth;\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 vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",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 vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\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 getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.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 getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.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 getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.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 vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\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\treflectedLight.directDiffuse += irradiance * BRDF_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_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",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;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\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\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, 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_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",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.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\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_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\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.roughness;\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#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\treflectedLight.directSpecular += irradiance * BRDF_GGX_Iridescence( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness );\n\t#else\n\t\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_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_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 USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += 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 USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\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\tgetPointLightInfo( 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 *= ( 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\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\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\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ 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\tgetDirectionalLightInfo( 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 *= ( 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.normal );\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.normal );\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 = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\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 sampledDiffuseColor = texture2D( map, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\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\tdiffuseColor *= texture2D( map, uv );\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",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\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 * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\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 * faceDirection;\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, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#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",normal_pars_vertex:"#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",normal_vertex:"#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",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, float faceDirection ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_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, faceDirection );\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",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",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}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\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:"#if NUM_SPOT_LIGHT_COORDS > 0\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#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\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\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\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:"#if NUM_SPOT_LIGHT_COORDS > 0\n uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#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\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:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\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, vSpotLightCoord[ 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\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\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; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef texture2DLodEXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",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 ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\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_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}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\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}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\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#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\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 <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\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 <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}"},cw={common:{diffuse:{value:new Nm(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Cm},uv2Transform:{value:new Cm},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},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 xm(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 Nm(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:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{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:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Nm(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Cm}},sprite:{diffuse:{value:new Nm(16777215)},opacity:{value:1},center:{value:new xm(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Cm}}},dw={basic:{uniforms:Gy([cw.common,cw.specularmap,cw.envmap,cw.aomap,cw.lightmap,cw.fog]),vertexShader:uw.meshbasic_vert,fragmentShader:uw.meshbasic_frag},lambert:{uniforms:Gy([cw.common,cw.specularmap,cw.envmap,cw.aomap,cw.lightmap,cw.emissivemap,cw.bumpmap,cw.normalmap,cw.displacementmap,cw.fog,cw.lights,{emissive:{value:new Nm(0)}}]),vertexShader:uw.meshlambert_vert,fragmentShader:uw.meshlambert_frag},phong:{uniforms:Gy([cw.common,cw.specularmap,cw.envmap,cw.aomap,cw.lightmap,cw.emissivemap,cw.bumpmap,cw.normalmap,cw.displacementmap,cw.fog,cw.lights,{emissive:{value:new Nm(0)},specular:{value:new Nm(1118481)},shininess:{value:30}}]),vertexShader:uw.meshphong_vert,fragmentShader:uw.meshphong_frag},standard:{uniforms:Gy([cw.common,cw.envmap,cw.aomap,cw.lightmap,cw.emissivemap,cw.bumpmap,cw.normalmap,cw.displacementmap,cw.roughnessmap,cw.metalnessmap,cw.fog,cw.lights,{emissive:{value:new Nm(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:uw.meshphysical_vert,fragmentShader:uw.meshphysical_frag},toon:{uniforms:Gy([cw.common,cw.aomap,cw.lightmap,cw.emissivemap,cw.bumpmap,cw.normalmap,cw.displacementmap,cw.gradientmap,cw.fog,cw.lights,{emissive:{value:new Nm(0)}}]),vertexShader:uw.meshtoon_vert,fragmentShader:uw.meshtoon_frag},matcap:{uniforms:Gy([cw.common,cw.bumpmap,cw.normalmap,cw.displacementmap,cw.fog,{matcap:{value:null}}]),vertexShader:uw.meshmatcap_vert,fragmentShader:uw.meshmatcap_frag},points:{uniforms:Gy([cw.points,cw.fog]),vertexShader:uw.points_vert,fragmentShader:uw.points_frag},dashed:{uniforms:Gy([cw.common,cw.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:uw.linedashed_vert,fragmentShader:uw.linedashed_frag},depth:{uniforms:Gy([cw.common,cw.displacementmap]),vertexShader:uw.depth_vert,fragmentShader:uw.depth_frag},normal:{uniforms:Gy([cw.common,cw.bumpmap,cw.normalmap,cw.displacementmap,{opacity:{value:1}}]),vertexShader:uw.meshnormal_vert,fragmentShader:uw.meshnormal_frag},sprite:{uniforms:Gy([cw.sprite,cw.fog]),vertexShader:uw.sprite_vert,fragmentShader:uw.sprite_frag},background:{uniforms:{uvTransform:{value:new Cm},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:uw.background_vert,fragmentShader:uw.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:uw.backgroundCube_vert,fragmentShader:uw.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:uw.cube_vert,fragmentShader:uw.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:uw.equirect_vert,fragmentShader:uw.equirect_frag},distanceRGBA:{uniforms:Gy([cw.common,cw.displacementmap,{referencePosition:{value:new Jm},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:uw.distanceRGBA_vert,fragmentShader:uw.distanceRGBA_frag},shadow:{uniforms:Gy([cw.lights,cw.fog,{color:{value:new Nm(0)},opacity:{value:1}}]),vertexShader:uw.shadow_vert,fragmentShader:uw.shadow_frag}};dw.physical={uniforms:Gy([dw.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new xm(1,1)},clearcoatNormalMap:{value:null},iridescence:{value:0},iridescenceMap:{value:null},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},sheen:{value:0},sheenColor:{value:new Nm(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new xm},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Nm(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Nm(1,1,1)},specularColorMap:{value:null}}]),vertexShader:uw.meshphysical_vert,fragmentShader:uw.meshphysical_frag};var hw={r:0,b:0,g:0};function fw(e,t,n,r,i,a,A){var o,s,l=new Nm(0),u=!0===a?0:1,c=null,d=0,h=null;function f(t,n){t.getRGB(hw,Ky(e)),r.buffers.color.setClear(hw.r,hw.g,hw.b,n,A)}return{getClearColor:function(){return l},setClearColor:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;l.set(e),f(l,u=t)},getClearAlpha:function(){return u},setClearAlpha:function(e){f(l,u=e)},render:function(r,a){var A=!1,p=!0===a.isScene?a.background:null;p&&p.isTexture&&(p=(a.backgroundBlurriness>0?n:t).get(p));var g=e.xr,m=g.getSession&&g.getSession();m&&"additive"===m.environmentBlendMode&&(p=null),null===p?f(l,u):p&&p.isColor&&(f(p,1),A=!0),(e.autoClear||A)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),p&&(p.isCubeTexture||p.mapping===Hp)?(void 0===s&&((s=new Ny(new Vy(1,1,1),new jy({name:"BackgroundCubeMaterial",uniforms:zy(dw.backgroundCube.uniforms),vertexShader:dw.backgroundCube.vertexShader,fragmentShader:dw.backgroundCube.fragmentShader,side:jf,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),s.geometry.deleteAttribute("uv"),s.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(s.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(s)),s.material.uniforms.envMap.value=p,s.material.uniforms.flipEnvMap.value=p.isCubeTexture&&!1===p.isRenderTargetTexture?-1:1,s.material.uniforms.backgroundBlurriness.value=a.backgroundBlurriness,s.material.uniforms.backgroundIntensity.value=a.backgroundIntensity,s.material.toneMapped=p.encoding!==$g,c===p&&d===p.version&&h===e.toneMapping||(s.material.needsUpdate=!0,c=p,d=p.version,h=e.toneMapping),s.layers.enableAll(),r.unshift(s,s.geometry,s.material,0,0,null)):p&&p.isTexture&&(void 0===o&&((o=new Ny(new lw(2,2),new jy({name:"BackgroundMaterial",uniforms:zy(dw.background.uniforms),vertexShader:dw.background.vertexShader,fragmentShader:dw.background.fragmentShader,side:Wf,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(o.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(o)),o.material.uniforms.t2D.value=p,o.material.uniforms.backgroundIntensity.value=a.backgroundIntensity,o.material.toneMapped=p.encoding!==$g,!0===p.matrixAutoUpdate&&p.updateMatrix(),o.material.uniforms.uvTransform.value.copy(p.matrix),c===p&&d===p.version&&h===e.toneMapping||(o.material.needsUpdate=!0,c=p,d=p.version,h=e.toneMapping),o.layers.enableAll(),r.unshift(o,o.geometry,o.material,0,0,null))}}}function pw(e,t,n,r){var i=e.getParameter(34921),a=r.isWebGL2?null:t.get("OES_vertex_array_object"),A=r.isWebGL2||null!==a,o={},s=h(null),l=s,u=!1;function c(t){return r.isWebGL2?e.bindVertexArray(t):a.bindVertexArrayOES(t)}function d(t){return r.isWebGL2?e.deleteVertexArray(t):a.deleteVertexArrayOES(t)}function h(e){for(var t=[],n=[],r=[],a=0;a<i;a++)t[a]=0,n[a]=0,r[a]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function f(){for(var e=l.newAttributes,t=0,n=e.length;t<n;t++)e[t]=0}function p(e){g(e,0)}function g(n,i){var a=l.newAttributes,A=l.enabledAttributes,o=l.attributeDivisors;(a[n]=1,0===A[n]&&(e.enableVertexAttribArray(n),A[n]=1),o[n]!==i)&&((r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),o[n]=i)}function m(){for(var t=l.newAttributes,n=l.enabledAttributes,r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function v(t,n,i,a,A,o){!0!==r.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,n,i,a,A,o):e.vertexAttribIPointer(t,n,i,A,o)}function y(){w(),u=!0,l!==s&&c((l=s).object)}function w(){s.geometry=null,s.program=null,s.wireframe=!1}return{setup:function(i,s,d,y,w){var B=!1;if(A){var _=function(t,n,i){var A=!0===i.wireframe,s=o[t.id];void 0===s&&(s={},o[t.id]=s);var l=s[n.id];void 0===l&&(l={},s[n.id]=l);var u=l[A];void 0===u&&(u=h(r.isWebGL2?e.createVertexArray():a.createVertexArrayOES()),l[A]=u);return u}(y,d,s);l!==_&&c((l=_).object),B=function(e,t,n,r){var i=l.attributes,a=t.attributes,A=0,o=n.getAttributes();for(var s in o){if(o[s].location>=0){var u=i[s],c=a[s];if(void 0===c&&("instanceMatrix"===s&&e.instanceMatrix&&(c=e.instanceMatrix),"instanceColor"===s&&e.instanceColor&&(c=e.instanceColor)),void 0===u)return!0;if(u.attribute!==c)return!0;if(c&&u.data!==c.data)return!0;A++}}return l.attributesNum!==A||l.index!==r}(i,y,d,w),B&&function(e,t,n,r){var i={},a=t.attributes,A=0,o=n.getAttributes();for(var s in o){if(o[s].location>=0){var u=a[s];void 0===u&&("instanceMatrix"===s&&e.instanceMatrix&&(u=e.instanceMatrix),"instanceColor"===s&&e.instanceColor&&(u=e.instanceColor));var c={};c.attribute=u,u&&u.data&&(c.data=u.data),i[s]=c,A++}}l.attributes=i,l.attributesNum=A,l.index=r}(i,y,d,w)}else{var b=!0===s.wireframe;l.geometry===y.id&&l.program===d.id&&l.wireframe===b||(l.geometry=y.id,l.program=d.id,l.wireframe=b,B=!0)}null!==w&&n.update(w,34963),(B||u)&&(u=!1,function(i,a,A,o){if(!1===r.isWebGL2&&(i.isInstancedMesh||o.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;f();var s=o.attributes,l=A.getAttributes(),u=a.defaultAttributeValues;for(var c in l){var d=l[c];if(d.location>=0){var h=s[c];if(void 0===h&&("instanceMatrix"===c&&i.instanceMatrix&&(h=i.instanceMatrix),"instanceColor"===c&&i.instanceColor&&(h=i.instanceColor)),void 0!==h){var y=h.normalized,w=h.itemSize,B=n.get(h);if(void 0===B)continue;var _=B.buffer,b=B.type,x=B.bytesPerElement;if(h.isInterleavedBufferAttribute){var C=h.data,S=C.stride,E=h.offset;if(C.isInstancedInterleavedBuffer){for(var U=0;U<d.locationSize;U++)g(d.location+U,C.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===o._maxInstanceCount&&(o._maxInstanceCount=C.meshPerAttribute*C.count)}else for(var M=0;M<d.locationSize;M++)p(d.location+M);e.bindBuffer(34962,_);for(var F=0;F<d.locationSize;F++)v(d.location+F,w/d.locationSize,b,y,S*x,(E+w/d.locationSize*F)*x)}else{if(h.isInstancedBufferAttribute){for(var T=0;T<d.locationSize;T++)g(d.location+T,h.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===o._maxInstanceCount&&(o._maxInstanceCount=h.meshPerAttribute*h.count)}else for(var k=0;k<d.locationSize;k++)p(d.location+k);e.bindBuffer(34962,_);for(var Q=0;Q<d.locationSize;Q++)v(d.location+Q,w/d.locationSize,b,y,w*x,w/d.locationSize*Q*x)}}else if(void 0!==u){var L=u[c];if(void 0!==L)switch(L.length){case 2:e.vertexAttrib2fv(d.location,L);break;case 3:e.vertexAttrib3fv(d.location,L);break;case 4:e.vertexAttrib4fv(d.location,L);break;default:e.vertexAttrib1fv(d.location,L)}}}}m()}(i,s,d,y),null!==w&&e.bindBuffer(34963,n.get(w).buffer))},reset:y,resetDefaultState:w,dispose:function(){for(var e in y(),o){var t=o[e];for(var n in t){var r=t[n];for(var i in r)d(r[i].object),delete r[i];delete t[n]}delete o[e]}},releaseStatesOfGeometry:function(e){if(void 0!==o[e.id]){var t=o[e.id];for(var n in t){var r=t[n];for(var i in r)d(r[i].object),delete r[i];delete t[n]}delete o[e.id]}},releaseStatesOfProgram:function(e){for(var t in o){var n=o[t];if(void 0!==n[e.id]){var r=n[e.id];for(var i in r)d(r[i].object),delete r[i];delete n[e.id]}}},initAttributes:f,enableAttribute:p,disableUnusedAttributes:m}}function gw(e,t,n,r){var i,a=r.isWebGL2;this.setMode=function(e){i=e},this.render=function(t,r){e.drawArrays(i,t,r),n.update(r,i,1)},this.renderInstances=function(r,A,o){if(0!==o){var s,l;if(a)s=e,l="drawArraysInstanced";else if(l="drawArraysInstancedANGLE",null===(s=t.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");s[l](i,r,A,o),n.update(A,i,o)}}}function mw(e,t,n){var r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}var a="undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext,A=void 0!==n.precision?n.precision:"highp",o=i(A);o!==A&&(console.warn("THREE.WebGLRenderer:",A,"not supported, using",o,"instead."),A=o);var s=a||t.has("WEBGL_draw_buffers"),l=!0===n.logarithmicDepthBuffer,u=e.getParameter(34930),c=e.getParameter(35660),d=e.getParameter(3379),h=e.getParameter(34076),f=e.getParameter(34921),p=e.getParameter(36347),g=e.getParameter(36348),m=e.getParameter(36349),v=c>0,y=a||t.has("OES_texture_float");return{isWebGL2:a,drawBuffers:s,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){var n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:A,logarithmicDepthBuffer:l,maxTextures:u,maxVertexTextures:c,maxTextureSize:d,maxCubemapSize:h,maxAttributes:f,maxVertexUniforms:p,maxVaryings:g,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:a?e.getParameter(36183):0}}function vw(e){var t=this,n=null,r=0,i=!1,a=!1,A=new rw,o=new Cm,s={value:null,needsUpdate:!1};function l(e,n,r,i){var a=null!==e?e.length:0,l=null;if(0!==a){if(l=s.value,!0!==i||null===l){var u=r+4*a,c=n.matrixWorldInverse;o.getNormalMatrix(c),(null===l||l.length<u)&&(l=new Float32Array(u));for(var d=0,h=r;d!==a;++d,h+=4)A.copy(e[d]).applyMatrix4(c,o),A.normal.toArray(l,h),l[h+3]=A.constant}s.value=l,s.needsUpdate=!0}return t.numPlanes=a,t.numIntersection=0,l}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t){var n=0!==e.length||t||0!==r||i;return i=t,r=e.length,n},this.beginShadows=function(){a=!0,l(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(e,t){n=l(e,t,0)},this.setState=function(A,o,u){var c=A.clippingPlanes,d=A.clipIntersection,h=A.clipShadows,f=e.get(A);if(!i||null===c||0===c.length||a&&!h)a?l(null):function(){s.value!==n&&(s.value=n,s.needsUpdate=r>0);t.numPlanes=r,t.numIntersection=0}();else{var p=a?0:r,g=4*p,m=f.clippingState||null;s.value=m,m=l(c,o,g,u);for(var v=0;v!==g;++v)m[v]=n[v];f.clippingState=m,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=p}}}function yw(e){var t=new WeakMap;function n(e,t){return t===Ip?e.mapping=Lp:t===Rp&&(e.mapping=Dp),e}function r(e){var n=e.target;n.removeEventListener("dispose",r);var i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture&&!1===i.isRenderTargetTexture){var a=i.mapping;if(a===Ip||a===Rp){if(t.has(i))return n(t.get(i).texture,i.mapping);var A=i.image;if(A&&A.height>0){var o=new $y(A.height/2);return o.fromEquirectangularTexture(e,i),t.set(i,o),i.addEventListener("dispose",r),n(o.texture,i.mapping)}return null}}return i},dispose:function(){t=new WeakMap}}}var ww=function(e){x(n,e);var t=U(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.1,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2e3;return y(this,n),(e=t.call(this)).isOrthographicCamera=!0,e.type="OrthographicCamera",e.zoom=1,e.view=null,e.left=r,e.right=i,e.top=a,e.bottom=A,e.near=o,e.far=s,e.updateProjectionMatrix(),e}return _(n,[{key:"copy",value:function(e,t){return ed(C(n.prototype),"copy",this).call(this,e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}},{key:"setViewOffset",value:function(e,t,n,r,i,a){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=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}},{key:"clearViewOffset",value:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}},{key:"updateProjectionMatrix",value:function(){var e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-e,a=n+e,A=r+t,o=r-t;if(null!==this.view&&this.view.enabled){var s=(this.right-this.left)/this.view.fullWidth/this.zoom,l=(this.top-this.bottom)/this.view.fullHeight/this.zoom;a=(i+=s*this.view.offsetX)+s*this.view.width,o=(A-=l*this.view.offsetY)-l*this.view.height}this.projectionMatrix.makeOrthographic(i,a,A,o,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}},{key:"toJSON",value:function(e){var t=ed(C(n.prototype),"toJSON",this).call(this,e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}]),n}(Xy),Bw=[.125,.215,.35,.446,.526,.582],_w=20,bw=new ww,xw=new Nm,Cw=null,Sw=(1+Math.sqrt(5))/2,Ew=1/Sw,Uw=[new Jm(1,1,1),new Jm(-1,1,1),new Jm(1,1,-1),new Jm(-1,1,-1),new Jm(0,Sw,Ew),new Jm(0,Sw,-Ew),new Jm(Ew,0,Sw),new Jm(-Ew,0,Sw),new Jm(Sw,Ew,0),new Jm(-Sw,Ew,0)],Mw=function(){function e(t){y(this,e),this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}return _(e,[{key:"fromScene",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100;Cw=this._renderer.getRenderTarget(),this._setSize(256);var i=this._allocateTargets();return i.depthBuffer=!0,this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}},{key:"fromEquirectangular",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this._fromTexture(e,t)}},{key:"fromCubemap",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this._fromTexture(e,t)}},{key:"compileCubemapShader",value:function(){null===this._cubemapMaterial&&(this._cubemapMaterial=Qw(),this._compileMaterial(this._cubemapMaterial))}},{key:"compileEquirectangularShader",value:function(){null===this._equirectMaterial&&(this._equirectMaterial=kw(),this._compileMaterial(this._equirectMaterial))}},{key:"dispose",value:function(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}},{key:"_setSize",value:function(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}},{key:"_dispose",value:function(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(var e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}},{key:"_cleanup",value:function(e){this._renderer.setRenderTarget(Cw),e.scissorTest=!1,Tw(e,0,0,e.width,e.height)}},{key:"_fromTexture",value:function(e,t){e.mapping===Lp||e.mapping===Dp?this._setSize(0===e.image.length?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),Cw=this._renderer.getRenderTarget();var n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}},{key:"_allocateTargets",value:function(){var e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:Kp,minFilter:Kp,generateMipmaps:!1,type:tg,format:Ag,encoding:Zg,depthBuffer:!1},r=Fw(e,t,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=Fw(e,t,n);var i=this._lodMax,a=function(e){for(var t=[],n=[],r=[],i=e,a=e-4+1+Bw.length,A=0;A<a;A++){var o=Math.pow(2,i);n.push(o);var s=1/o;A>e-4?s=Bw[A-e+4-1]:0===A&&(s=0),r.push(s);for(var l=1/(o-2),u=-l,c=1+l,d=[u,u,c,u,c,c,u,u,c,c,u,c],h=6,f=6,p=3,g=2,m=1,v=new Float32Array(p*f*h),y=new Float32Array(g*f*h),w=new Float32Array(m*f*h),B=0;B<h;B++){var _=B%3*2/3-1,b=B>2?0:-1,x=[_,b,0,_+2/3,b,0,_+2/3,b+1,0,_,b,0,_+2/3,b+1,0,_,b+1,0];v.set(x,p*f*B),y.set(d,g*f*B);var C=[B,B,B,B,B,B];w.set(C,m*f*B)}var S=new Sy;S.setAttribute("position",new py(v,p)),S.setAttribute("uv",new py(y,g)),S.setAttribute("faceIndex",new py(w,m)),t.push(S),i>4&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}(i);this._sizeLods=a.sizeLods,this._lodPlanes=a.lodPlanes,this._sigmas=a.sigmas,this._blurMaterial=function(e,t,n){var r=new Float32Array(_w),i=new Jm(0,1,0),a=new jy({name:"SphericalGaussianBlur",defines:{n:_w,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:"".concat(e,".0")},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:qf,depthTest:!1,depthWrite:!1});return a}(i,e,t)}return r}},{key:"_compileMaterial",value:function(e){var t=new Ny(this._lodPlanes[0],e);this._renderer.compile(t,bw)}},{key:"_sceneToCubeUV",value:function(e,t,n,r){var i=new qy(90,1,t,n),a=[1,-1,1,1,1,1],A=[1,1,1,-1,-1,-1],o=this._renderer,s=o.autoClear,l=o.toneMapping;o.getClearColor(xw),o.toneMapping=Up,o.autoClear=!1;var u=new dy({name:"PMREM.Background",side:jf,depthWrite:!1,depthTest:!1}),c=new Ny(new Vy,u),d=!1,h=e.background;h?h.isColor&&(u.color.copy(h),e.background=null,d=!0):(u.color.copy(xw),d=!0);for(var f=0;f<6;f++){var p=f%3;0===p?(i.up.set(0,a[f],0),i.lookAt(A[f],0,0)):1===p?(i.up.set(0,0,a[f]),i.lookAt(0,A[f],0)):(i.up.set(0,a[f],0),i.lookAt(0,0,A[f]));var g=this._cubeSize;Tw(r,p*g,f>2?g:0,g,g),o.setRenderTarget(r),d&&o.render(c,i),o.render(e,i)}c.geometry.dispose(),c.material.dispose(),o.toneMapping=l,o.autoClear=s,e.background=h}},{key:"_textureToCubeUV",value:function(e,t){var n=this._renderer,r=e.mapping===Lp||e.mapping===Dp;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=Qw()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=kw());var i=r?this._cubemapMaterial:this._equirectMaterial,a=new Ny(this._lodPlanes[0],i);i.uniforms.envMap.value=e;var A=this._cubeSize;Tw(t,0,0,3*A,2*A),n.setRenderTarget(t),n.render(a,bw)}},{key:"_applyPMREM",value:function(e){var t=this._renderer,n=t.autoClear;t.autoClear=!1;for(var r=1;r<this._lodPlanes.length;r++){var i=Math.sqrt(this._sigmas[r]*this._sigmas[r]-this._sigmas[r-1]*this._sigmas[r-1]),a=Uw[(r-1)%Uw.length];this._blur(e,r-1,r,i,a)}t.autoClear=n}},{key:"_blur",value:function(e,t,n,r,i){var a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,r,"latitudinal",i),this._halfBlur(a,e,n,n,r,"longitudinal",i)}},{key:"_halfBlur",value:function(e,t,n,r,i,a,A){var o=this._renderer,s=this._blurMaterial;"latitudinal"!==a&&"longitudinal"!==a&&console.error("blur direction must be either latitudinal or longitudinal!");var l=new Ny(this._lodPlanes[r],s),u=s.uniforms,c=this._sizeLods[n]-1,d=isFinite(i)?Math.PI/(2*c):2*Math.PI/39,h=i/d,f=isFinite(i)?1+Math.floor(3*h):_w;f>_w&&console.warn("sigmaRadians, ".concat(i,", is too large and will clip, as it requested ").concat(f," samples when the maximum is set to ").concat(_w));for(var p=[],g=0,m=0;m<_w;++m){var v=m/h,y=Math.exp(-v*v/2);p.push(y),0===m?g+=y:m<f&&(g+=2*y)}for(var w=0;w<p.length;w++)p[w]=p[w]/g;u.envMap.value=e.texture,u.samples.value=f,u.weights.value=p,u.latitudinal.value="latitudinal"===a,A&&(u.poleAxis.value=A);var B=this._lodMax;u.dTheta.value=d,u.mipInt.value=B-n;var _=this._sizeLods[r];Tw(t,3*_*(r>B-4?r-B+4:0),4*(this._cubeSize-_),3*_,2*_),o.setRenderTarget(t),o.render(l,bw)}}]),e}();function Fw(e,t,n){var r=new jm(e,t,n);return r.texture.mapping=Hp,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Tw(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function kw(){return new jy({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:qf,depthTest:!1,depthWrite:!1})}function Qw(){return new jy({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:qf,depthTest:!1,depthWrite:!1})}function Lw(e){var t=new WeakMap,n=null;function r(e){var n=e.target;n.removeEventListener("dispose",r);var i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){var a=i.mapping,A=a===Ip||a===Rp,o=a===Lp||a===Dp;if(A||o){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;var s=t.get(i);return null===n&&(n=new Mw(e)),s=A?n.fromEquirectangular(i,s):n.fromCubemap(i,s),t.set(i,s),s.texture}if(t.has(i))return t.get(i).texture;var l=i.image;if(A&&l&&l.height>0||o&&l&&function(e){for(var t=0,n=6,r=0;r<n;r++)void 0!==e[r]&&t++;return t===n}(l)){null===n&&(n=new Mw(e));var u=A?n.fromEquirectangular(i):n.fromCubemap(i);return t.set(i,u),i.addEventListener("dispose",r),u.texture}return null}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function Dw(e){var t={};function n(n){if(void 0!==t[n])return t[n];var r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(e){var t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function Iw(e,t,n,r){var i={},a=new WeakMap;function A(e){var o=e.target;for(var s in null!==o.index&&t.remove(o.index),o.attributes)t.remove(o.attributes[s]);o.removeEventListener("dispose",A),delete i[o.id];var l=a.get(o);l&&(t.remove(l),a.delete(o)),r.releaseStatesOfGeometry(o),!0===o.isInstancedBufferGeometry&&delete o._maxInstanceCount,n.memory.geometries--}function o(e){var n=[],r=e.index,i=e.attributes.position,A=0;if(null!==r){var o=r.array;A=r.version;for(var s=0,l=o.length;s<l;s+=3){var u=o[s+0],c=o[s+1],d=o[s+2];n.push(u,c,c,d,d,u)}}else{var h=i.array;A=i.version;for(var f=0,p=h.length/3-1;f<p;f+=3){var g=f+0,m=f+1,v=f+2;n.push(g,m,m,v,v,g)}}var y=new(Em(n)?my:gy)(n,1);y.version=A;var w=a.get(e);w&&t.remove(w),a.set(e,y)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",A),i[t.id]=!0,n.memory.geometries++),t},update:function(e){var n=e.attributes;for(var r in n)t.update(n[r],34962);var i=e.morphAttributes;for(var a in i)for(var A=i[a],o=0,s=A.length;o<s;o++)t.update(A[o],34962)},getWireframeAttribute:function(e){var t=a.get(e);if(t){var n=e.index;null!==n&&t.version<n.version&&o(e)}else o(e);return a.get(e)}}}function Rw(e,t,n,r){var i,a,A,o=r.isWebGL2;this.setMode=function(e){i=e},this.setIndex=function(e){a=e.type,A=e.bytesPerElement},this.render=function(t,r){e.drawElements(i,r,a,t*A),n.update(r,i,1)},this.renderInstances=function(r,s,l){if(0!==l){var u,c;if(o)u=e,c="drawElementsInstanced";else if(c="drawElementsInstancedANGLE",null===(u=t.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[c](i,s,a,r*A,l),n.update(s,i,l)}}}function Hw(e){var t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,r){switch(t.calls++,n){case 4:t.triangles+=r*(e/3);break;case 1:t.lines+=r*(e/2);break;case 3:t.lines+=r*(e-1);break;case 2:t.lines+=r*e;break;case 0:t.points+=r*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function Pw(e,t){return e[0]-t[0]}function Nw(e,t){return Math.abs(t[1])-Math.abs(e[1])}function Ow(e,t,n){for(var r={},i=new Float32Array(8),a=new WeakMap,A=new Wm,o=[],s=0;s<8;s++)o[s]=[s,0];return{update:function(s,l,u,c){var d=s.morphTargetInfluences;if(!0===t.isWebGL2){var h=l.morphAttributes.position||l.morphAttributes.normal||l.morphAttributes.color,f=void 0!==h?h.length:0,p=a.get(l);if(void 0===p||p.count!==f){void 0!==p&&p.texture.dispose();var g=void 0!==l.morphAttributes.position,m=void 0!==l.morphAttributes.normal,v=void 0!==l.morphAttributes.color,y=l.morphAttributes.position||[],w=l.morphAttributes.normal||[],B=l.morphAttributes.color||[],_=0;!0===g&&(_=1),!0===m&&(_=2),!0===v&&(_=3);var b=l.attributes.position.count*_,x=1;b>t.maxTextureSize&&(x=Math.ceil(b/t.maxTextureSize),b=t.maxTextureSize);var C=new Float32Array(b*x*4*f),S=new Xm(C,b,x,f);S.type=eg,S.needsUpdate=!0;for(var E=4*_,U=0;U<f;U++)for(var M=y[U],F=w[U],T=B[U],k=b*x*4*U,Q=0;Q<M.count;Q++){var L=Q*E;!0===g&&(A.fromBufferAttribute(M,Q),C[k+L+0]=A.x,C[k+L+1]=A.y,C[k+L+2]=A.z,C[k+L+3]=0),!0===m&&(A.fromBufferAttribute(F,Q),C[k+L+4]=A.x,C[k+L+5]=A.y,C[k+L+6]=A.z,C[k+L+7]=0),!0===v&&(A.fromBufferAttribute(T,Q),C[k+L+8]=A.x,C[k+L+9]=A.y,C[k+L+10]=A.z,C[k+L+11]=4===T.itemSize?A.w:1)}p={count:f,texture:S,size:new xm(b,x)},a.set(l,p),l.addEventListener("dispose",(function e(){S.dispose(),a.delete(l),l.removeEventListener("dispose",e)}))}for(var D=0,I=0;I<d.length;I++)D+=d[I];var R=l.morphTargetsRelative?1:1-D;c.getUniforms().setValue(e,"morphTargetBaseInfluence",R),c.getUniforms().setValue(e,"morphTargetInfluences",d),c.getUniforms().setValue(e,"morphTargetsTexture",p.texture,n),c.getUniforms().setValue(e,"morphTargetsTextureSize",p.size)}else{var H=void 0===d?0:d.length,P=r[l.id];if(void 0===P||P.length!==H){P=[];for(var N=0;N<H;N++)P[N]=[N,0];r[l.id]=P}for(var O=0;O<H;O++){var V=P[O];V[0]=O,V[1]=d[O]}P.sort(Nw);for(var z=0;z<8;z++)z<H&&P[z][1]?(o[z][0]=P[z][0],o[z][1]=P[z][1]):(o[z][0]=Number.MAX_SAFE_INTEGER,o[z][1]=0);o.sort(Pw);for(var G=l.morphAttributes.position,K=l.morphAttributes.normal,W=0,j=0;j<8;j++){var X=o[j],q=X[0],Y=X[1];q!==Number.MAX_SAFE_INTEGER&&Y?(G&&l.getAttribute("morphTarget"+j)!==G[q]&&l.setAttribute("morphTarget"+j,G[q]),K&&l.getAttribute("morphNormal"+j)!==K[q]&&l.setAttribute("morphNormal"+j,K[q]),i[j]=Y,W+=Y):(G&&!0===l.hasAttribute("morphTarget"+j)&&l.deleteAttribute("morphTarget"+j),K&&!0===l.hasAttribute("morphNormal"+j)&&l.deleteAttribute("morphNormal"+j),i[j]=0)}var J=l.morphTargetsRelative?1:1-W;c.getUniforms().setValue(e,"morphTargetBaseInfluence",J),c.getUniforms().setValue(e,"morphTargetInfluences",i)}}}}function Vw(e,t,n,r){var i=new WeakMap;function a(e){var t=e.target;t.removeEventListener("dispose",a),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){var A=r.render.frame,o=e.geometry,s=t.get(e,o);return i.get(s)!==A&&(t.update(s),i.set(s,A)),e.isInstancedMesh&&(!1===e.hasEventListener("dispose",a)&&e.addEventListener("dispose",a),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),s},dispose:function(){i=new WeakMap}}}var zw=new Km,Gw=new Xm,Kw=new qm,Ww=new Zy,jw=[],Xw=[],qw=new Float32Array(16),Yw=new Float32Array(9),Jw=new Float32Array(4);function Zw(e,t,n){var r=e[0];if(r<=0||r>0)return e;var i=t*n,a=jw[i];if(void 0===a&&(a=new Float32Array(i),jw[i]=a),0!==t){r.toArray(a,0);for(var A=1,o=0;A!==t;++A)o+=n,e[A].toArray(a,o)}return a}function $w(e,t){if(e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function eB(e,t){for(var n=0,r=t.length;n<r;n++)e[n]=t[n]}function tB(e,t){var n=Xw[t];void 0===n&&(n=new Int32Array(t),Xw[t]=n);for(var r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function nB(e,t){var n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function rB(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if($w(n,t))return;e.uniform2fv(this.addr,t),eB(n,t)}}function iB(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if($w(n,t))return;e.uniform3fv(this.addr,t),eB(n,t)}}function aB(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if($w(n,t))return;e.uniform4fv(this.addr,t),eB(n,t)}}function AB(e,t){var n=this.cache,r=t.elements;if(void 0===r){if($w(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),eB(n,t)}else{if($w(n,r))return;Jw.set(r),e.uniformMatrix2fv(this.addr,!1,Jw),eB(n,r)}}function oB(e,t){var n=this.cache,r=t.elements;if(void 0===r){if($w(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),eB(n,t)}else{if($w(n,r))return;Yw.set(r),e.uniformMatrix3fv(this.addr,!1,Yw),eB(n,r)}}function sB(e,t){var n=this.cache,r=t.elements;if(void 0===r){if($w(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),eB(n,t)}else{if($w(n,r))return;qw.set(r),e.uniformMatrix4fv(this.addr,!1,qw),eB(n,r)}}function lB(e,t){var n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function uB(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2i(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if($w(n,t))return;e.uniform2iv(this.addr,t),eB(n,t)}}function cB(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3i(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if($w(n,t))return;e.uniform3iv(this.addr,t),eB(n,t)}}function dB(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4i(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if($w(n,t))return;e.uniform4iv(this.addr,t),eB(n,t)}}function hB(e,t){var n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function fB(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2ui(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if($w(n,t))return;e.uniform2uiv(this.addr,t),eB(n,t)}}function pB(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3ui(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if($w(n,t))return;e.uniform3uiv(this.addr,t),eB(n,t)}}function gB(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4ui(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if($w(n,t))return;e.uniform4uiv(this.addr,t),eB(n,t)}}function mB(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2D(t||zw,i)}function vB(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||Kw,i)}function yB(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTextureCube(t||Ww,i)}function wB(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||Gw,i)}function BB(e,t){e.uniform1fv(this.addr,t)}function _B(e,t){var n=Zw(t,this.size,2);e.uniform2fv(this.addr,n)}function bB(e,t){var n=Zw(t,this.size,3);e.uniform3fv(this.addr,n)}function xB(e,t){var n=Zw(t,this.size,4);e.uniform4fv(this.addr,n)}function CB(e,t){var n=Zw(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function SB(e,t){var n=Zw(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function EB(e,t){var n=Zw(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function UB(e,t){e.uniform1iv(this.addr,t)}function MB(e,t){e.uniform2iv(this.addr,t)}function FB(e,t){e.uniform3iv(this.addr,t)}function TB(e,t){e.uniform4iv(this.addr,t)}function kB(e,t){e.uniform1uiv(this.addr,t)}function QB(e,t){e.uniform2uiv(this.addr,t)}function LB(e,t){e.uniform3uiv(this.addr,t)}function DB(e,t){e.uniform4uiv(this.addr,t)}function IB(e,t,n){var r=this.cache,i=t.length,a=tB(n,i);$w(r,a)||(e.uniform1iv(this.addr,a),eB(r,a));for(var A=0;A!==i;++A)n.setTexture2D(t[A]||zw,a[A])}function RB(e,t,n){var r=this.cache,i=t.length,a=tB(n,i);$w(r,a)||(e.uniform1iv(this.addr,a),eB(r,a));for(var A=0;A!==i;++A)n.setTexture3D(t[A]||Kw,a[A])}function HB(e,t,n){var r=this.cache,i=t.length,a=tB(n,i);$w(r,a)||(e.uniform1iv(this.addr,a),eB(r,a));for(var A=0;A!==i;++A)n.setTextureCube(t[A]||Ww,a[A])}function PB(e,t,n){var r=this.cache,i=t.length,a=tB(n,i);$w(r,a)||(e.uniform1iv(this.addr,a),eB(r,a));for(var A=0;A!==i;++A)n.setTexture2DArray(t[A]||Gw,a[A])}var NB=_((function e(t,n,r){y(this,e),this.id=t,this.addr=r,this.cache=[],this.setValue=function(e){switch(e){case 5126:return nB;case 35664:return rB;case 35665:return iB;case 35666:return aB;case 35674:return AB;case 35675:return oB;case 35676:return sB;case 5124:case 35670:return lB;case 35667:case 35671:return uB;case 35668:case 35672:return cB;case 35669:case 35673:return dB;case 5125:return hB;case 36294:return fB;case 36295:return pB;case 36296:return gB;case 35678:case 36198:case 36298:case 36306:case 35682:return mB;case 35679:case 36299:case 36307:return vB;case 35680:case 36300:case 36308:case 36293:return yB;case 36289:case 36303:case 36311:case 36292:return wB}}(n.type)})),OB=_((function e(t,n,r){y(this,e),this.id=t,this.addr=r,this.cache=[],this.size=n.size,this.setValue=function(e){switch(e){case 5126:return BB;case 35664:return _B;case 35665:return bB;case 35666:return xB;case 35674:return CB;case 35675:return SB;case 35676:return EB;case 5124:case 35670:return UB;case 35667:case 35671:return MB;case 35668:case 35672:return FB;case 35669:case 35673:return TB;case 5125:return kB;case 36294:return QB;case 36295:return LB;case 36296:return DB;case 35678:case 36198:case 36298:case 36306:case 35682:return IB;case 35679:case 36299:case 36307:return RB;case 35680:case 36300:case 36308:case 36293:return HB;case 36289:case 36303:case 36311:case 36292:return PB}}(n.type)})),VB=function(){function e(t){y(this,e),this.id=t,this.seq=[],this.map={}}return _(e,[{key:"setValue",value:function(e,t,n){for(var r=this.seq,i=0,a=r.length;i!==a;++i){var A=r[i];A.setValue(e,t[A.id],n)}}}]),e}(),zB=/(\w+)(\])?(\[|\.)?/g;function GB(e,t){e.seq.push(t),e.map[t.id]=t}function KB(e,t,n){var r=e.name,i=r.length;for(zB.lastIndex=0;;){var a=zB.exec(r),A=zB.lastIndex,o=a[1],s="]"===a[2],l=a[3];if(s&&(o|=0),void 0===l||"["===l&&A+2===i){GB(n,void 0===l?new NB(o,e,t):new OB(o,e,t));break}var u=n.map[o];void 0===u&&GB(n,u=new VB(o)),n=u}}var WB=function(){function e(t,n){y(this,e),this.seq=[],this.map={};for(var r=t.getProgramParameter(n,35718),i=0;i<r;++i){var a=t.getActiveUniform(n,i);KB(a,t.getUniformLocation(n,a.name),this)}}return _(e,[{key:"setValue",value:function(e,t,n,r){var i=this.map[t];void 0!==i&&i.setValue(e,n,r)}},{key:"setOptional",value:function(e,t,n){var r=t[n];void 0!==r&&this.setValue(e,n,r)}}],[{key:"upload",value:function(e,t,n,r){for(var i=0,a=t.length;i!==a;++i){var A=t[i],o=n[A.id];!1!==o.needsUpdate&&A.setValue(e,o.value,r)}}},{key:"seqWithValue",value:function(e,t){for(var n=[],r=0,i=e.length;r!==i;++r){var a=e[r];a.id in t&&n.push(a)}return n}}]),e}();function jB(e,t,n){var r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}var XB=0;function qB(e,t,n){var r=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();if(r&&""===i)return"";var a=/ERROR: 0:(\d+)/.exec(i);if(a){var A=parseInt(a[1]);return n.toUpperCase()+"\n\n"+i+"\n\n"+function(e,t){for(var n=e.split("\n"),r=[],i=Math.max(t-6,0),a=Math.min(t+6,n.length),A=i;A<a;A++){var o=A+1;r.push("".concat(o===t?">":" "," ").concat(o,": ").concat(n[A]))}return r.join("\n")}(e.getShaderSource(t),A)}return i}function YB(e,t){var n=function(e){switch(e){case Zg:return["Linear","( value )"];case $g:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function JB(e,t){var n;switch(t){case Mp:n="Linear";break;case Fp:n="Reinhard";break;case Tp:n="OptimizedCineon";break;case kp:n="ACESFilmic";break;case Qp:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function ZB(e){return""!==e}function $B(e,t){var n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function e_(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var t_=/^[ \t]*#include +<([\w\d./]+)>/gm;function n_(e){return e.replace(t_,r_)}function r_(e,t){var n=uw[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return n_(n)}var i_=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function a_(e){return e.replace(i_,A_)}function A_(e,t,n,r){for(var i="",a=parseInt(t);a<parseInt(n);a++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+a+" ]").replace(/UNROLLED_LOOP_INDEX/g,a);return i}function o_(e){var t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function s_(e,t,n,r){var i,a,A=e.getContext(),o=n.defines,s=n.vertexShader,l=n.fragmentShader,u=function(e){var t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===zf?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===Gf?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===Kf&&(t="SHADOWMAP_TYPE_VSM"),t}(n),c=function(e){var t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case Lp:case Dp:t="ENVMAP_TYPE_CUBE";break;case Hp:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),d=function(e){var t="ENVMAP_MODE_REFLECTION";e.envMap&&e.envMapMode===Dp&&(t="ENVMAP_MODE_REFRACTION");return t}(n),h=function(e){var t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case Cp:t="ENVMAP_BLENDING_MULTIPLY";break;case Sp:t="ENVMAP_BLENDING_MIX";break;case Ep:t="ENVMAP_BLENDING_ADD"}return t}(n),f=function(e){var t=e.envMapCubeUVHeight;if(null===t)return null;var n=Math.log2(t)-2,r=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:r,maxMip:n}}(n),p=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUVHeight||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(ZB).join("\n")}(n),g=function(e){var t=[];for(var n in e){var r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(o),m=A.createProgram(),v=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?((i=[g].filter(ZB).join("\n")).length>0&&(i+="\n"),(a=[p,g].filter(ZB).join("\n")).length>0&&(a+="\n")):(i=[o_(n),"#define SHADER_NAME "+n.shaderName,g,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+d:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+u:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.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","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\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(ZB).join("\n"),a=[p,o_(n),"#define SHADER_NAME "+n.shaderName,g,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+d:"",n.envMap?"#define "+h:"",f?"#define CUBEUV_TEXEL_WIDTH "+f.texelWidth:"",f?"#define CUBEUV_TEXEL_HEIGHT "+f.texelHeight:"",f?"#define CUBEUV_MAX_MIP "+f.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+u:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Up?"#define TONE_MAPPING":"",n.toneMapping!==Up?uw.tonemapping_pars_fragment:"",n.toneMapping!==Up?JB("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",uw.encodings_pars_fragment,YB("linearToOutputTexel",n.outputEncoding),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(ZB).join("\n")),s=e_(s=$B(s=n_(s),n),n),l=e_(l=$B(l=n_(l),n),n),s=a_(s),l=a_(l),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(v="#version 300 es\n",i=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+i,a=["#define varying in",n.glslVersion===om?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===om?"":"#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"+a);var y,w,B=v+a+l,_=jB(A,35633,v+i+s),b=jB(A,35632,B);if(A.attachShader(m,_),A.attachShader(m,b),void 0!==n.index0AttributeName?A.bindAttribLocation(m,0,n.index0AttributeName):!0===n.morphTargets&&A.bindAttribLocation(m,0,"position"),A.linkProgram(m),e.debug.checkShaderErrors){var x=A.getProgramInfoLog(m).trim(),C=A.getShaderInfoLog(_).trim(),S=A.getShaderInfoLog(b).trim(),E=!0,U=!0;if(!1===A.getProgramParameter(m,35714)){E=!1;var M=qB(A,_,"vertex"),F=qB(A,b,"fragment");console.error("THREE.WebGLProgram: Shader Error "+A.getError()+" - VALIDATE_STATUS "+A.getProgramParameter(m,35715)+"\n\nProgram Info Log: "+x+"\n"+M+"\n"+F)}else""!==x?console.warn("THREE.WebGLProgram: Program Info Log:",x):""!==C&&""!==S||(U=!1);U&&(this.diagnostics={runnable:E,programLog:x,vertexShader:{log:C,prefix:i},fragmentShader:{log:S,prefix:a}})}return A.deleteShader(_),A.deleteShader(b),this.getUniforms=function(){return void 0===y&&(y=new WB(A,m)),y},this.getAttributes=function(){return void 0===w&&(w=function(e,t){for(var n={},r=e.getProgramParameter(t,35721),i=0;i<r;i++){var a=e.getActiveAttrib(t,i),A=a.name,o=1;35674===a.type&&(o=2),35675===a.type&&(o=3),35676===a.type&&(o=4),n[A]={type:a.type,location:e.getAttribLocation(t,A),locationSize:o}}return n}(A,m)),w},this.destroy=function(){r.releaseStatesOfProgram(this),A.deleteProgram(m),this.program=void 0},this.name=n.shaderName,this.id=XB++,this.cacheKey=t,this.usedTimes=1,this.program=m,this.vertexShader=_,this.fragmentShader=b,this}var l_=0,u_=function(){function e(){y(this,e),this.shaderCache=new Map,this.materialCache=new Map}return _(e,[{key:"update",value:function(e){var t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),i=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return!1===a.has(r)&&(a.add(r),r.usedTimes++),!1===a.has(i)&&(a.add(i),i.usedTimes++),this}},{key:"remove",value:function(e){var t,n=Q(this.materialCache.get(e));try{for(n.s();!(t=n.n()).done;){var r=t.value;r.usedTimes--,0===r.usedTimes&&this.shaderCache.delete(r.code)}}catch(FC){n.e(FC)}finally{n.f()}return this.materialCache.delete(e),this}},{key:"getVertexShaderID",value:function(e){return this._getShaderStage(e.vertexShader).id}},{key:"getFragmentShaderID",value:function(e){return this._getShaderStage(e.fragmentShader).id}},{key:"dispose",value:function(){this.shaderCache.clear(),this.materialCache.clear()}},{key:"_getShaderCacheForMaterial",value:function(e){var t=this.materialCache,n=t.get(e);return void 0===n&&(n=new Set,t.set(e,n)),n}},{key:"_getShaderStage",value:function(e){var t=this.shaderCache,n=t.get(e);return void 0===n&&(n=new c_(e),t.set(e,n)),n}}]),e}(),c_=_((function e(t){y(this,e),this.id=l_++,this.code=t,this.usedTimes=0}));function d_(e,t,n,r,i,a,A){var o=new Hv,s=new u_,l=[],u=i.isWebGL2,c=i.logarithmicDepthBuffer,d=i.vertexTextures,h=i.precision,f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};return{getParameters:function(a,o,l,p,g){var m=p.fog,v=g.geometry,y=a.isMeshStandardMaterial?p.environment:null,w=(a.isMeshStandardMaterial?n:t).get(a.envMap||y),B=w&&w.mapping===Hp?w.image.height:null,_=f[a.type];null!==a.precision&&(h=i.getMaxPrecision(a.precision))!==a.precision&&console.warn("THREE.WebGLProgram.getParameters:",a.precision,"not supported, using",h,"instead.");var b,x,C,S,E=v.morphAttributes.position||v.morphAttributes.normal||v.morphAttributes.color,U=void 0!==E?E.length:0,M=0;if(void 0!==v.morphAttributes.position&&(M=1),void 0!==v.morphAttributes.normal&&(M=2),void 0!==v.morphAttributes.color&&(M=3),_){var F=dw[_];b=F.vertexShader,x=F.fragmentShader}else b=a.vertexShader,x=a.fragmentShader,s.update(a),C=s.getVertexShaderID(a),S=s.getFragmentShaderID(a);var T=e.getRenderTarget(),k=a.alphaTest>0,Q=a.clearcoat>0,L=a.iridescence>0;return{isWebGL2:u,shaderID:_,shaderName:a.type,vertexShader:b,fragmentShader:x,defines:a.defines,customVertexShaderID:C,customFragmentShaderID:S,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:h,instancing:!0===g.isInstancedMesh,instancingColor:!0===g.isInstancedMesh&&null!==g.instanceColor,supportsVertexTextures:d,outputEncoding:null===T?e.outputEncoding:!0===T.isXRRenderTarget?T.texture.encoding:Zg,map:!!a.map,matcap:!!a.matcap,envMap:!!w,envMapMode:w&&w.mapping,envMapCubeUVHeight:B,lightMap:!!a.lightMap,aoMap:!!a.aoMap,emissiveMap:!!a.emissiveMap,bumpMap:!!a.bumpMap,normalMap:!!a.normalMap,objectSpaceNormalMap:a.normalMapType===nm,tangentSpaceNormalMap:a.normalMapType===tm,decodeVideoTexture:!!a.map&&!0===a.map.isVideoTexture&&a.map.encoding===$g,clearcoat:Q,clearcoatMap:Q&&!!a.clearcoatMap,clearcoatRoughnessMap:Q&&!!a.clearcoatRoughnessMap,clearcoatNormalMap:Q&&!!a.clearcoatNormalMap,iridescence:L,iridescenceMap:L&&!!a.iridescenceMap,iridescenceThicknessMap:L&&!!a.iridescenceThicknessMap,displacementMap:!!a.displacementMap,roughnessMap:!!a.roughnessMap,metalnessMap:!!a.metalnessMap,specularMap:!!a.specularMap,specularIntensityMap:!!a.specularIntensityMap,specularColorMap:!!a.specularColorMap,opaque:!1===a.transparent&&a.blending===Yf,alphaMap:!!a.alphaMap,alphaTest:k,gradientMap:!!a.gradientMap,sheen:a.sheen>0,sheenColorMap:!!a.sheenColorMap,sheenRoughnessMap:!!a.sheenRoughnessMap,transmission:a.transmission>0,transmissionMap:!!a.transmissionMap,thicknessMap:!!a.thicknessMap,combine:a.combine,vertexTangents:!!a.normalMap&&!!v.attributes.tangent,vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!v.attributes.color&&4===v.attributes.color.itemSize,vertexUvs:!!a.map||!!a.bumpMap||!!a.normalMap||!!a.specularMap||!!a.alphaMap||!!a.emissiveMap||!!a.roughnessMap||!!a.metalnessMap||!!a.clearcoatMap||!!a.clearcoatRoughnessMap||!!a.clearcoatNormalMap||!!a.iridescenceMap||!!a.iridescenceThicknessMap||!!a.displacementMap||!!a.transmissionMap||!!a.thicknessMap||!!a.specularIntensityMap||!!a.specularColorMap||!!a.sheenColorMap||!!a.sheenRoughnessMap,uvsVertexOnly:!(a.map||a.bumpMap||a.normalMap||a.specularMap||a.alphaMap||a.emissiveMap||a.roughnessMap||a.metalnessMap||a.clearcoatNormalMap||a.iridescenceMap||a.iridescenceThicknessMap||a.transmission>0||a.transmissionMap||a.thicknessMap||a.specularIntensityMap||a.specularColorMap||a.sheen>0||a.sheenColorMap||a.sheenRoughnessMap)&&!!a.displacementMap,fog:!!m,useFog:!0===a.fog,fogExp2:m&&m.isFogExp2,flatShading:!!a.flatShading,sizeAttenuation:a.sizeAttenuation,logarithmicDepthBuffer:c,skinning:!0===g.isSkinnedMesh,morphTargets:void 0!==v.morphAttributes.position,morphNormals:void 0!==v.morphAttributes.normal,morphColors:void 0!==v.morphAttributes.color,morphTargetsCount:U,morphTextureStride:M,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numSpotLightMaps:o.spotLightMap.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numSpotLightShadowsWithMaps:o.numSpotLightShadowsWithMaps,numClippingPlanes:A.numPlanes,numClipIntersection:A.numIntersection,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&l.length>0,shadowMapType:e.shadowMap.type,toneMapping:a.toneMapped?e.toneMapping:Up,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:a.premultipliedAlpha,doubleSided:a.side===Xf,flipSided:a.side===jf,useDepthPacking:!!a.depthPacking,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionDerivatives:a.extensions&&a.extensions.derivatives,extensionFragDepth:a.extensions&&a.extensions.fragDepth,extensionDrawBuffers:a.extensions&&a.extensions.drawBuffers,extensionShaderTextureLOD:a.extensions&&a.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),customProgramCacheKey:a.customProgramCacheKey()}},getProgramCacheKey:function(t){var n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(var r in t.defines)n.push(r),n.push(t.defines[r]);return!1===t.isRawShaderMaterial&&(!function(e,t){e.push(t.precision),e.push(t.outputEncoding),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.combine),e.push(t.vertexUvs),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(n,t),function(e,t){o.disableAll(),t.isWebGL2&&o.enable(0);t.supportsVertexTextures&&o.enable(1);t.instancing&&o.enable(2);t.instancingColor&&o.enable(3);t.map&&o.enable(4);t.matcap&&o.enable(5);t.envMap&&o.enable(6);t.lightMap&&o.enable(7);t.aoMap&&o.enable(8);t.emissiveMap&&o.enable(9);t.bumpMap&&o.enable(10);t.normalMap&&o.enable(11);t.objectSpaceNormalMap&&o.enable(12);t.tangentSpaceNormalMap&&o.enable(13);t.clearcoat&&o.enable(14);t.clearcoatMap&&o.enable(15);t.clearcoatRoughnessMap&&o.enable(16);t.clearcoatNormalMap&&o.enable(17);t.iridescence&&o.enable(18);t.iridescenceMap&&o.enable(19);t.iridescenceThicknessMap&&o.enable(20);t.displacementMap&&o.enable(21);t.specularMap&&o.enable(22);t.roughnessMap&&o.enable(23);t.metalnessMap&&o.enable(24);t.gradientMap&&o.enable(25);t.alphaMap&&o.enable(26);t.alphaTest&&o.enable(27);t.vertexColors&&o.enable(28);t.vertexAlphas&&o.enable(29);t.vertexUvs&&o.enable(30);t.vertexTangents&&o.enable(31);t.uvsVertexOnly&&o.enable(32);e.push(o.mask),o.disableAll(),t.fog&&o.enable(0);t.useFog&&o.enable(1);t.flatShading&&o.enable(2);t.logarithmicDepthBuffer&&o.enable(3);t.skinning&&o.enable(4);t.morphTargets&&o.enable(5);t.morphNormals&&o.enable(6);t.morphColors&&o.enable(7);t.premultipliedAlpha&&o.enable(8);t.shadowMapEnabled&&o.enable(9);t.physicallyCorrectLights&&o.enable(10);t.doubleSided&&o.enable(11);t.flipSided&&o.enable(12);t.useDepthPacking&&o.enable(13);t.dithering&&o.enable(14);t.specularIntensityMap&&o.enable(15);t.specularColorMap&&o.enable(16);t.transmission&&o.enable(17);t.transmissionMap&&o.enable(18);t.thicknessMap&&o.enable(19);t.sheen&&o.enable(20);t.sheenColorMap&&o.enable(21);t.sheenRoughnessMap&&o.enable(22);t.decodeVideoTexture&&o.enable(23);t.opaque&&o.enable(24);e.push(o.mask)}(n,t),n.push(e.outputEncoding)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){var t,n=f[e.type];if(n){var r=dw[n];t=Wy.clone(r.uniforms)}else t=e.uniforms;return t},acquireProgram:function(t,n){for(var r,i=0,A=l.length;i<A;i++){var o=l[i];if(o.cacheKey===n){++(r=o).usedTimes;break}}return void 0===r&&(r=new s_(e,n,t,a),l.push(r)),r},releaseProgram:function(e){if(0===--e.usedTimes){var t=l.indexOf(e);l[t]=l[l.length-1],l.pop(),e.destroy()}},releaseShaderCache:function(e){s.remove(e)},programs:l,dispose:function(){s.dispose()}}}function h_(){var e=new WeakMap;return{get:function(t){var n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function f_(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function p_(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function g_(){var e=[],t=0,n=[],r=[],i=[];function a(n,r,i,a,A,o){var s=e[t];return void 0===s?(s={id:n.id,object:n,geometry:r,material:i,groupOrder:a,renderOrder:n.renderOrder,z:A,group:o},e[t]=s):(s.id=n.id,s.object=n,s.geometry=r,s.material=i,s.groupOrder=a,s.renderOrder=n.renderOrder,s.z=A,s.group=o),t++,s}return{opaque:n,transmissive:r,transparent:i,init:function(){t=0,n.length=0,r.length=0,i.length=0},push:function(e,t,A,o,s,l){var u=a(e,t,A,o,s,l);A.transmission>0?r.push(u):!0===A.transparent?i.push(u):n.push(u)},unshift:function(e,t,A,o,s,l){var u=a(e,t,A,o,s,l);A.transmission>0?r.unshift(u):!0===A.transparent?i.unshift(u):n.unshift(u)},finish:function(){for(var n=t,r=e.length;n<r;n++){var i=e[n];if(null===i.id)break;i.id=null,i.object=null,i.geometry=null,i.material=null,i.group=null}},sort:function(e,t){n.length>1&&n.sort(e||f_),r.length>1&&r.sort(t||p_),i.length>1&&i.sort(t||p_)}}}function m_(){var e=new WeakMap;return{get:function(t,n){var r,i=e.get(t);return void 0===i?(r=new g_,e.set(t,[r])):n>=i.length?(r=new g_,i.push(r)):r=i[n],r},dispose:function(){e=new WeakMap}}}function v_(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var n;switch(t.type){case"DirectionalLight":n={direction:new Jm,color:new Nm};break;case"SpotLight":n={position:new Jm,direction:new Jm,color:new Nm,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Jm,color:new Nm,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Jm,skyColor:new Nm,groundColor:new Nm};break;case"RectAreaLight":n={color:new Nm,position:new Jm,halfWidth:new Jm,halfHeight:new Jm}}return e[t.id]=n,n}}}var y_=0;function w_(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function B_(e,t){for(var n=new v_,r=function(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xm};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xm,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0},a=0;a<9;a++)i.probe.push(new Jm);var A=new Jm,o=new Ev,s=new Ev;return{setup:function(a,A){for(var o=0,s=0,l=0,u=0;u<9;u++)i.probe[u].set(0,0,0);var c=0,d=0,h=0,f=0,p=0,g=0,m=0,v=0,y=0,w=0;a.sort(w_);for(var B=!0!==A?Math.PI:1,_=0,b=a.length;_<b;_++){var x=a[_],C=x.color,S=x.intensity,E=x.distance,U=x.shadow&&x.shadow.map?x.shadow.map.texture:null;if(x.isAmbientLight)o+=C.r*S*B,s+=C.g*S*B,l+=C.b*S*B;else if(x.isLightProbe)for(var M=0;M<9;M++)i.probe[M].addScaledVector(x.sh.coefficients[M],S);else if(x.isDirectionalLight){var F=n.get(x);if(F.color.copy(x.color).multiplyScalar(x.intensity*B),x.castShadow){var T=x.shadow,k=r.get(x);k.shadowBias=T.bias,k.shadowNormalBias=T.normalBias,k.shadowRadius=T.radius,k.shadowMapSize=T.mapSize,i.directionalShadow[c]=k,i.directionalShadowMap[c]=U,i.directionalShadowMatrix[c]=x.shadow.matrix,g++}i.directional[c]=F,c++}else if(x.isSpotLight){var Q=n.get(x);Q.position.setFromMatrixPosition(x.matrixWorld),Q.color.copy(C).multiplyScalar(S*B),Q.distance=E,Q.coneCos=Math.cos(x.angle),Q.penumbraCos=Math.cos(x.angle*(1-x.penumbra)),Q.decay=x.decay,i.spot[h]=Q;var L=x.shadow;if(x.map&&(i.spotLightMap[y]=x.map,y++,L.updateMatrices(x),x.castShadow&&w++),i.spotLightMatrix[h]=L.matrix,x.castShadow){var D=r.get(x);D.shadowBias=L.bias,D.shadowNormalBias=L.normalBias,D.shadowRadius=L.radius,D.shadowMapSize=L.mapSize,i.spotShadow[h]=D,i.spotShadowMap[h]=U,v++}h++}else if(x.isRectAreaLight){var I=n.get(x);I.color.copy(C).multiplyScalar(S),I.halfWidth.set(.5*x.width,0,0),I.halfHeight.set(0,.5*x.height,0),i.rectArea[f]=I,f++}else if(x.isPointLight){var R=n.get(x);if(R.color.copy(x.color).multiplyScalar(x.intensity*B),R.distance=x.distance,R.decay=x.decay,x.castShadow){var H=x.shadow,P=r.get(x);P.shadowBias=H.bias,P.shadowNormalBias=H.normalBias,P.shadowRadius=H.radius,P.shadowMapSize=H.mapSize,P.shadowCameraNear=H.camera.near,P.shadowCameraFar=H.camera.far,i.pointShadow[d]=P,i.pointShadowMap[d]=U,i.pointShadowMatrix[d]=x.shadow.matrix,m++}i.point[d]=R,d++}else if(x.isHemisphereLight){var N=n.get(x);N.skyColor.copy(x.color).multiplyScalar(S*B),N.groundColor.copy(x.groundColor).multiplyScalar(S*B),i.hemi[p]=N,p++}}f>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=cw.LTC_FLOAT_1,i.rectAreaLTC2=cw.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=cw.LTC_HALF_1,i.rectAreaLTC2=cw.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=o,i.ambient[1]=s,i.ambient[2]=l;var O=i.hash;O.directionalLength===c&&O.pointLength===d&&O.spotLength===h&&O.rectAreaLength===f&&O.hemiLength===p&&O.numDirectionalShadows===g&&O.numPointShadows===m&&O.numSpotShadows===v&&O.numSpotMaps===y||(i.directional.length=c,i.spot.length=h,i.rectArea.length=f,i.point.length=d,i.hemi.length=p,i.directionalShadow.length=g,i.directionalShadowMap.length=g,i.pointShadow.length=m,i.pointShadowMap.length=m,i.spotShadow.length=v,i.spotShadowMap.length=v,i.directionalShadowMatrix.length=g,i.pointShadowMatrix.length=m,i.spotLightMatrix.length=v+y-w,i.spotLightMap.length=y,i.numSpotLightShadowsWithMaps=w,O.directionalLength=c,O.pointLength=d,O.spotLength=h,O.rectAreaLength=f,O.hemiLength=p,O.numDirectionalShadows=g,O.numPointShadows=m,O.numSpotShadows=v,O.numSpotMaps=y,i.version=y_++)},setupView:function(e,t){for(var n=0,r=0,a=0,l=0,u=0,c=t.matrixWorldInverse,d=0,h=e.length;d<h;d++){var f=e[d];if(f.isDirectionalLight){var p=i.directional[n];p.direction.setFromMatrixPosition(f.matrixWorld),A.setFromMatrixPosition(f.target.matrixWorld),p.direction.sub(A),p.direction.transformDirection(c),n++}else if(f.isSpotLight){var g=i.spot[a];g.position.setFromMatrixPosition(f.matrixWorld),g.position.applyMatrix4(c),g.direction.setFromMatrixPosition(f.matrixWorld),A.setFromMatrixPosition(f.target.matrixWorld),g.direction.sub(A),g.direction.transformDirection(c),a++}else if(f.isRectAreaLight){var m=i.rectArea[l];m.position.setFromMatrixPosition(f.matrixWorld),m.position.applyMatrix4(c),s.identity(),o.copy(f.matrixWorld),o.premultiply(c),s.extractRotation(o),m.halfWidth.set(.5*f.width,0,0),m.halfHeight.set(0,.5*f.height,0),m.halfWidth.applyMatrix4(s),m.halfHeight.applyMatrix4(s),l++}else if(f.isPointLight){var v=i.point[r];v.position.setFromMatrixPosition(f.matrixWorld),v.position.applyMatrix4(c),r++}else if(f.isHemisphereLight){var y=i.hemi[u];y.direction.setFromMatrixPosition(f.matrixWorld),y.direction.transformDirection(c),u++}}},state:i}}function __(e,t){var n=new B_(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(e){n.setup(r,e)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function b_(e,t){var n=new WeakMap;return{get:function(r){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=n.get(r);return void 0===A?(i=new __(e,t),n.set(r,[i])):a>=A.length?(i=new __(e,t),A.push(i)):i=A[a],i},dispose:function(){n=new WeakMap}}}var x_=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),(r=t.call(this)).isMeshDepthMaterial=!0,r.type="MeshDepthMaterial",r.depthPacking=3200,r.map=null,r.alphaMap=null,r.displacementMap=null,r.displacementScale=1,r.displacementBias=0,r.wireframe=!1,r.wireframeLinewidth=1,r.setValues(e),r}return _(n,[{key:"copy",value:function(e){return ed(C(n.prototype),"copy",this).call(this,e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}]),n}(cy),C_=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),(r=t.call(this)).isMeshDistanceMaterial=!0,r.type="MeshDistanceMaterial",r.referencePosition=new Jm,r.nearDistance=1,r.farDistance=1e3,r.map=null,r.alphaMap=null,r.displacementMap=null,r.displacementScale=1,r.displacementBias=0,r.setValues(e),r}return _(n,[{key:"copy",value:function(e){return ed(C(n.prototype),"copy",this).call(this,e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}]),n}(cy),S_="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",E_="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}";function U_(e,t,n){var r,i=new Aw,a=new xm,A=new xm,o=new Wm,s=new x_({depthPacking:em}),l=new C_,u={},c=n.maxTextureSize,d=(M(r={},Wf,jf),M(r,jf,Wf),M(r,Xf,Xf),r),h=new jy({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xm},radius:{value:4}},vertexShader:S_,fragmentShader:E_}),f=h.clone();f.defines.HORIZONTAL_PASS=1;var p=new Sy;p.setAttribute("position",new py(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var g=new Ny(p,h),m=this;function v(n,r){var i=t.update(g);h.defines.VSM_SAMPLES!==n.blurSamples&&(h.defines.VSM_SAMPLES=n.blurSamples,f.defines.VSM_SAMPLES=n.blurSamples,h.needsUpdate=!0,f.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new jm(a.x,a.y)),h.uniforms.shadow_pass.value=n.map.texture,h.uniforms.resolution.value=n.mapSize,h.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,i,h,g,null),f.uniforms.shadow_pass.value=n.mapPass.texture,f.uniforms.resolution.value=n.mapSize,f.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,f,g,null)}function y(t,n,r,i,a,A){var o=null,c=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==c)o=c;else if(o=!0===r.isPointLight?l:s,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){var h=o.uuid,f=n.uuid,p=u[h];void 0===p&&(p={},u[h]=p);var g=p[f];void 0===g&&(g=o.clone(),p[f]=g),o=g}return o.visible=n.visible,o.wireframe=n.wireframe,o.side=A===Kf?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:d[n.side],o.alphaMap=n.alphaMap,o.alphaTest=n.alphaTest,o.map=n.map,o.clipShadows=n.clipShadows,o.clippingPlanes=n.clippingPlanes,o.clipIntersection=n.clipIntersection,o.displacementMap=n.displacementMap,o.displacementScale=n.displacementScale,o.displacementBias=n.displacementBias,o.wireframeLinewidth=n.wireframeLinewidth,o.linewidth=n.linewidth,!0===r.isPointLight&&!0===o.isMeshDistanceMaterial&&(o.referencePosition.setFromMatrixPosition(r.matrixWorld),o.nearDistance=i,o.farDistance=a),o}function w(n,r,a,A,o){if(!1!==n.visible){if(n.layers.test(r.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&o===Kf)&&(!n.frustumCulled||i.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);var s=t.update(n),l=n.material;if(Array.isArray(l))for(var u=s.groups,c=0,d=u.length;c<d;c++){var h=u[c],f=l[h.materialIndex];if(f&&f.visible){var p=y(n,f,A,a.near,a.far,o);e.renderBufferDirect(a,null,s,p,n,h)}}else if(l.visible){var g=y(n,l,A,a.near,a.far,o);e.renderBufferDirect(a,null,s,g,n,null)}}for(var m=n.children,v=0,B=m.length;v<B;v++)w(m[v],r,a,A,o)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=zf,this.render=function(t,n,r){if(!1!==m.enabled&&(!1!==m.autoUpdate||!1!==m.needsUpdate)&&0!==t.length){var s=e.getRenderTarget(),l=e.getActiveCubeFace(),u=e.getActiveMipmapLevel(),d=e.state;d.setBlending(qf),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);for(var h=0,f=t.length;h<f;h++){var p=t[h],g=p.shadow;if(void 0!==g){if(!1!==g.autoUpdate||!1!==g.needsUpdate){a.copy(g.mapSize);var y=g.getFrameExtents();if(a.multiply(y),A.copy(g.mapSize),(a.x>c||a.y>c)&&(a.x>c&&(A.x=Math.floor(c/y.x),a.x=A.x*y.x,g.mapSize.x=A.x),a.y>c&&(A.y=Math.floor(c/y.y),a.y=A.y*y.y,g.mapSize.y=A.y)),null===g.map){var B=this.type!==Kf?{minFilter:Vp,magFilter:Vp}:{};g.map=new jm(a.x,a.y,B),g.map.texture.name=p.name+".shadowMap",g.camera.updateProjectionMatrix()}e.setRenderTarget(g.map),e.clear();for(var _=g.getViewportCount(),b=0;b<_;b++){var x=g.getViewport(b);o.set(A.x*x.x,A.y*x.y,A.x*x.z,A.y*x.w),d.viewport(o),g.updateMatrices(p,b),i=g.getFrustum(),w(n,r,g.camera,p,this.type)}!0!==g.isPointLightShadow&&this.type===Kf&&v(g,r),g.needsUpdate=!1}}else console.warn("THREE.WebGLShadowMap:",p,"has no shadow.")}m.needsUpdate=!1,e.setRenderTarget(s,l,u)}}}function M_(e,t,n){var r,i,a=n.isWebGL2;var A=new function(){var t=!1,n=new Wm,r=null,i=new Wm(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,a,A,o){!0===o&&(t*=A,r*=A,a*=A),n.set(t,r,a,A),!1===i.equals(n)&&(e.clearColor(t,r,a,A),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},o=new function(){var t=!1,n=null,r=null,i=null;return{setTest:function(e){e?z(2929):G(2929)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){switch(t){case mp:e.depthFunc(512);break;case vp:e.depthFunc(519);break;case yp:e.depthFunc(513);break;case wp:e.depthFunc(515);break;case Bp:e.depthFunc(514);break;case _p:e.depthFunc(518);break;case bp:e.depthFunc(516);break;case xp:e.depthFunc(517);break;default:e.depthFunc(515)}r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}},s=new function(){var t=!1,n=null,r=null,i=null,a=null,A=null,o=null,s=null,l=null;return{setTest:function(e){t||(e?z(2960):G(2960))},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,A){r===t&&i===n&&a===A||(e.stencilFunc(t,n,A),r=t,i=n,a=A)},setOp:function(t,n,r){A===t&&o===n&&s===r||(e.stencilOp(t,n,r),A=t,o=n,s=r)},setLocked:function(e){t=e},setClear:function(t){l!==t&&(e.clearStencil(t),l=t)},reset:function(){t=!1,n=null,r=null,i=null,a=null,A=null,o=null,s=null,l=null}}},l=new WeakMap,u=new WeakMap,c={},d={},h=new WeakMap,f=[],p=null,g=!1,m=null,v=null,y=null,w=null,B=null,_=null,b=null,x=!1,C=null,S=null,E=null,U=null,F=null,T=e.getParameter(35661),k=!1,Q=0,L=e.getParameter(7938);-1!==L.indexOf("WebGL")?(Q=parseFloat(/^WebGL (\d)/.exec(L)[1]),k=Q>=1):-1!==L.indexOf("OpenGL ES")&&(Q=parseFloat(/^OpenGL ES (\d)/.exec(L)[1]),k=Q>=2);var D=null,I={},R=e.getParameter(3088),H=e.getParameter(2978),P=(new Wm).fromArray(R),N=(new Wm).fromArray(H);function O(t,n,r){var i=new Uint8Array(4),a=e.createTexture();e.bindTexture(t,a),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(var A=0;A<r;A++)e.texImage2D(n+A,0,6408,1,1,0,6408,5121,i);return a}var V={};function z(t){!0!==c[t]&&(e.enable(t),c[t]=!0)}function G(t){!1!==c[t]&&(e.disable(t),c[t]=!1)}V[3553]=O(3553,3553,1),V[34067]=O(34067,34069,6),A.setClear(0,0,0,1),o.setClear(1),s.setClear(0),z(2929),o.setFunc(wp),q(!1),Y(Of),z(2884),X(qf);var K=(M(r={},tp,32774),M(r,np,32778),M(r,rp,32779),r);if(a)K[ip]=32775,K[ap]=32776;else{var W=t.get("EXT_blend_minmax");null!==W&&(K[ip]=W.MIN_EXT,K[ap]=W.MAX_EXT)}var j=(M(i={},Ap,0),M(i,op,1),M(i,sp,768),M(i,up,770),M(i,gp,776),M(i,fp,774),M(i,dp,772),M(i,lp,769),M(i,cp,771),M(i,pp,775),M(i,hp,773),i);function X(t,n,r,i,a,A,o,s){if(t!==qf){if(!1===g&&(z(3042),g=!0),t===ep)a=a||n,A=A||r,o=o||i,n===v&&a===B||(e.blendEquationSeparate(K[n],K[a]),v=n,B=a),r===y&&i===w&&A===_&&o===b||(e.blendFuncSeparate(j[r],j[i],j[A],j[o]),y=r,w=i,_=A,b=o),m=t,x=!1;else if(t!==m||s!==x){if(v===tp&&B===tp||(e.blendEquation(32774),v=tp,B=tp),s)switch(t){case Yf:e.blendFuncSeparate(1,771,1,771);break;case Jf:e.blendFunc(1,1);break;case Zf:e.blendFuncSeparate(0,769,0,1);break;case $f:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case Yf:e.blendFuncSeparate(770,771,1,771);break;case Jf:e.blendFunc(770,1);break;case Zf:e.blendFuncSeparate(0,769,0,1);break;case $f:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}y=null,w=null,_=null,b=null,m=t,x=s}}else!0===g&&(G(3042),g=!1)}function q(t){C!==t&&(t?e.frontFace(2304):e.frontFace(2305),C=t)}function Y(t){t!==Nf?(z(2884),t!==S&&(t===Of?e.cullFace(1029):t===Vf?e.cullFace(1028):e.cullFace(1032))):G(2884),S=t}function J(t,n,r){t?(z(32823),U===n&&F===r||(e.polygonOffset(n,r),U=n,F=r)):G(32823)}return{buffers:{color:A,depth:o,stencil:s},enable:z,disable:G,bindFramebuffer:function(t,n){return d[t]!==n&&(e.bindFramebuffer(t,n),d[t]=n,a&&(36009===t&&(d[36160]=n),36160===t&&(d[36009]=n)),!0)},drawBuffers:function(r,i){var a=f,A=!1;if(r)if(void 0===(a=h.get(i))&&(a=[],h.set(i,a)),r.isWebGLMultipleRenderTargets){var o=r.texture;if(a.length!==o.length||36064!==a[0]){for(var s=0,l=o.length;s<l;s++)a[s]=36064+s;a.length=o.length,A=!0}}else 36064!==a[0]&&(a[0]=36064,A=!0);else 1029!==a[0]&&(a[0]=1029,A=!0);A&&(n.isWebGL2?e.drawBuffers(a):t.get("WEBGL_draw_buffers").drawBuffersWEBGL(a))},useProgram:function(t){return p!==t&&(e.useProgram(t),p=t,!0)},setBlending:X,setMaterial:function(e,t){e.side===Xf?G(2884):z(2884);var n=e.side===jf;t&&(n=!n),q(n),e.blending===Yf&&!1===e.transparent?X(qf):X(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),o.setFunc(e.depthFunc),o.setTest(e.depthTest),o.setMask(e.depthWrite),A.setMask(e.colorWrite);var r=e.stencilWrite;s.setTest(r),r&&(s.setMask(e.stencilWriteMask),s.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),s.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),J(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),!0===e.alphaToCoverage?z(32926):G(32926)},setFlipSided:q,setCullFace:Y,setLineWidth:function(t){t!==E&&(k&&e.lineWidth(t),E=t)},setPolygonOffset:J,setScissorTest:function(e){e?z(3089):G(3089)},activeTexture:function(t){void 0===t&&(t=33984+T-1),D!==t&&(e.activeTexture(t),D=t)},bindTexture:function(t,n,r){void 0===r&&(r=null===D?33984+T-1:D);var i=I[r];void 0===i&&(i={type:void 0,texture:void 0},I[r]=i),i.type===t&&i.texture===n||(D!==r&&(e.activeTexture(r),D=r),e.bindTexture(t,n||V[t]),i.type=t,i.texture=n)},unbindTexture:function(){var t=I[D];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},compressedTexImage3D:function(){try{e.compressedTexImage3D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},updateUBOMapping:function(t,n){var r=u.get(n);void 0===r&&(r=new WeakMap,u.set(n,r));var i=r.get(t);void 0===i&&(i=e.getUniformBlockIndex(n,t.name),r.set(t,i))},uniformBlockBinding:function(t,n){var r=u.get(n).get(t);l.get(n)!==r&&(e.uniformBlockBinding(n,r,t.__bindingPointIndex),l.set(n,r))},texStorage2D:function(){try{e.texStorage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texStorage3D:function(){try{e.texStorage3D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texSubImage2D:function(){try{e.texSubImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texSubImage3D:function(){try{e.texSubImage3D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},compressedTexSubImage2D:function(){try{e.compressedTexSubImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},compressedTexSubImage3D:function(){try{e.compressedTexSubImage3D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(t){!1===P.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),P.copy(t))},viewport:function(t){!1===N.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),N.copy(t))},reset:function(){e.disable(3042),e.disable(2884),e.disable(2929),e.disable(32823),e.disable(3089),e.disable(2960),e.disable(32926),e.blendEquation(32774),e.blendFunc(1,0),e.blendFuncSeparate(1,0,1,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(513),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(519,0,4294967295),e.stencilOp(7680,7680,7680),e.clearStencil(0),e.cullFace(1029),e.frontFace(2305),e.polygonOffset(0,0),e.activeTexture(33984),e.bindFramebuffer(36160,null),!0===a&&(e.bindFramebuffer(36009,null),e.bindFramebuffer(36008,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),c={},D=null,I={},d={},h=new WeakMap,f=[],p=null,g=!1,m=null,v=null,y=null,w=null,B=null,_=null,b=null,x=!1,C=null,S=null,E=null,U=null,F=null,P.set(0,0,e.canvas.width,e.canvas.height),N.set(0,0,e.canvas.width,e.canvas.height),A.reset(),o.reset(),s.reset()}}}function F_(e,t,n,r,i,a,A){var o,s,l,u=i.isWebGL2,c=i.maxTextures,d=i.maxCubemapSize,h=i.maxTextureSize,f=i.maxSamples,p=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,g="undefined"!==typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),m=new WeakMap,v=new WeakMap,y=!1;try{y="undefined"!==typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(FC){}function w(e,t){return y?new OffscreenCanvas(e,t):Um("canvas")}function B(e,t,n,r){var i=1;if((e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap){var a=t?wm:Math.floor,A=a(i*e.width),o=a(i*e.height);void 0===l&&(l=w(A,o));var s=n?w(A,o):l;return s.width=A,s.height=o,s.getContext("2d").drawImage(e,0,0,A,o),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+A+"x"+o+")."),s}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function _(e){return vm(e.width)&&vm(e.height)}function b(e,t){return e.generateMipmaps&&t&&e.minFilter!==Vp&&e.minFilter!==Kp}function x(t){e.generateMipmap(t)}function C(n,r,i,a){var A=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!1===u)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}var o=r;return 6403===r&&(5126===i&&(o=33326),5131===i&&(o=33325),5121===i&&(o=33321)),33319===r&&(5126===i&&(o=33328),5131===i&&(o=33327),5121===i&&(o=33323)),6408===r&&(5126===i&&(o=34836),5131===i&&(o=34842),5121===i&&(o=a===$g&&!1===A?35907:32856),32819===i&&(o=32854),32820===i&&(o=32855)),33325!==o&&33326!==o&&33327!==o&&33328!==o&&34842!==o&&34836!==o||t.get("EXT_color_buffer_float"),o}function S(e,t,n){return!0===b(e,n)||e.isFramebufferTexture&&e.minFilter!==Vp&&e.minFilter!==Kp?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function E(e){return e===Vp||e===zp||e===Gp?9728:9729}function U(e){var t=e.target;t.removeEventListener("dispose",U),function(e){var t=r.get(e);if(void 0===t.__webglInit)return;var n=e.source,i=v.get(n);if(i){var a=i[t.__cacheKey];a.usedTimes--,0===a.usedTimes&&T(e),0===Object.keys(i).length&&v.delete(n)}r.remove(e)}(t),t.isVideoTexture&&m.delete(t)}function F(t){var n=t.target;n.removeEventListener("dispose",F),function(t){var n=t.texture,i=r.get(t),a=r.get(n);void 0!==a.__webglTexture&&(e.deleteTexture(a.__webglTexture),A.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(var o=0;o<6;o++)e.deleteFramebuffer(i.__webglFramebuffer[o]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[o]);else{if(e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer)for(var s=0;s<i.__webglColorRenderbuffer.length;s++)i.__webglColorRenderbuffer[s]&&e.deleteRenderbuffer(i.__webglColorRenderbuffer[s]);i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer)}if(t.isWebGLMultipleRenderTargets)for(var l=0,u=n.length;l<u;l++){var c=r.get(n[l]);c.__webglTexture&&(e.deleteTexture(c.__webglTexture),A.memory.textures--),r.remove(n[l])}r.remove(n),r.remove(t)}(n)}function T(t){var n=r.get(t);e.deleteTexture(n.__webglTexture);var i=t.source;delete v.get(i)[n.__cacheKey],A.memory.textures--}var k=0;function Q(e,t){var i=r.get(e);if(e.isVideoTexture&&function(e){var t=A.render.frame;m.get(e)!==t&&(m.set(e,t),e.update())}(e),!1===e.isRenderTargetTexture&&e.version>0&&i.__version!==e.version){var a=e.image;if(null===a)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==a.complete)return void H(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.bindTexture(3553,i.__webglTexture,33984+t)}var L=(M(o={},Pp,10497),M(o,Np,33071),M(o,Op,33648),o),D=(M(s={},Vp,9728),M(s,zp,9984),M(s,Gp,9986),M(s,Kp,9729),M(s,Wp,9985),M(s,jp,9987),s);function I(n,a,A){if(A?(e.texParameteri(n,10242,L[a.wrapS]),e.texParameteri(n,10243,L[a.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,L[a.wrapR]),e.texParameteri(n,10240,D[a.magFilter]),e.texParameteri(n,10241,D[a.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),a.wrapS===Np&&a.wrapT===Np||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,E(a.magFilter)),e.texParameteri(n,10241,E(a.minFilter)),a.minFilter!==Vp&&a.minFilter!==Kp&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){var o=t.get("EXT_texture_filter_anisotropic");if(a.magFilter===Vp)return;if(a.minFilter!==Gp&&a.minFilter!==jp)return;if(a.type===eg&&!1===t.has("OES_texture_float_linear"))return;if(!1===u&&a.type===tg&&!1===t.has("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(e.texParameterf(n,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function R(t,n){var r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",U));var i=n.source,a=v.get(i);void 0===a&&(a={},v.set(i,a));var o=function(e){var t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.encoding),t.join()}(n);if(o!==t.__cacheKey){void 0===a[o]&&(a[o]={texture:e.createTexture(),usedTimes:0},A.memory.textures++,r=!0),a[o].usedTimes++;var s=a[t.__cacheKey];void 0!==s&&(a[t.__cacheKey].usedTimes--,0===s.usedTimes&&T(n)),t.__cacheKey=o,t.__webglTexture=a[o].texture}return r}function H(t,i,A){var o=3553;(i.isDataArrayTexture||i.isCompressedArrayTexture)&&(o=35866),i.isData3DTexture&&(o=32879);var s=R(t,i),l=i.source;n.bindTexture(o,t.__webglTexture,33984+A);var c=r.get(l);if(l.version!==c.__version||!0===s){n.activeTexture(33984+A),e.pixelStorei(37440,i.flipY),e.pixelStorei(37441,i.premultiplyAlpha),e.pixelStorei(3317,i.unpackAlignment),e.pixelStorei(37443,0);var d,f=function(e){return!u&&(e.wrapS!==Np||e.wrapT!==Np||e.minFilter!==Vp&&e.minFilter!==Kp)}(i)&&!1===_(i.image),p=B(i.image,f,!1,h),g=_(p=G(i,p))||u,m=a.convert(i.format,i.encoding),v=a.convert(i.type),y=C(i.internalFormat,m,v,i.encoding,i.isVideoTexture);I(o,i,g);var w=i.mipmaps,E=u&&!0!==i.isVideoTexture,U=void 0===c.__version||!0===s,M=S(i,p,g);if(i.isDepthTexture)y=6402,u?y=i.type===eg?36012:i.type===$p?33190:i.type===ig?35056:33189:i.type===eg&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===lg&&6402===y&&i.type!==Jp&&i.type!==$p&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=$p,v=a.convert(i.type)),i.format===ug&&6402===y&&(y=34041,i.type!==ig&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=ig,v=a.convert(i.type))),U&&(E?n.texStorage2D(3553,1,y,p.width,p.height):n.texImage2D(3553,0,y,p.width,p.height,0,m,v,null));else if(i.isDataTexture)if(w.length>0&&g){E&&U&&n.texStorage2D(3553,M,y,w[0].width,w[0].height);for(var F=0,T=w.length;F<T;F++)d=w[F],E?n.texSubImage2D(3553,F,0,0,d.width,d.height,m,v,d.data):n.texImage2D(3553,F,y,d.width,d.height,0,m,v,d.data);i.generateMipmaps=!1}else E?(U&&n.texStorage2D(3553,M,y,p.width,p.height),n.texSubImage2D(3553,0,0,0,p.width,p.height,m,v,p.data)):n.texImage2D(3553,0,y,p.width,p.height,0,m,v,p.data);else if(i.isCompressedTexture)if(i.isCompressedArrayTexture){E&&U&&n.texStorage3D(35866,M,y,w[0].width,w[0].height,p.depth);for(var k=0,Q=w.length;k<Q;k++)d=w[k],i.format!==Ag?null!==m?E?n.compressedTexSubImage3D(35866,k,0,0,0,d.width,d.height,p.depth,m,d.data,0,0):n.compressedTexImage3D(35866,k,y,d.width,d.height,p.depth,0,d.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):E?n.texSubImage3D(35866,k,0,0,0,d.width,d.height,p.depth,m,v,d.data):n.texImage3D(35866,k,y,d.width,d.height,p.depth,0,m,v,d.data)}else{E&&U&&n.texStorage2D(3553,M,y,w[0].width,w[0].height);for(var L=0,D=w.length;L<D;L++)d=w[L],i.format!==Ag?null!==m?E?n.compressedTexSubImage2D(3553,L,0,0,d.width,d.height,m,d.data):n.compressedTexImage2D(3553,L,y,d.width,d.height,0,d.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):E?n.texSubImage2D(3553,L,0,0,d.width,d.height,m,v,d.data):n.texImage2D(3553,L,y,d.width,d.height,0,m,v,d.data)}else if(i.isDataArrayTexture)E?(U&&n.texStorage3D(35866,M,y,p.width,p.height,p.depth),n.texSubImage3D(35866,0,0,0,0,p.width,p.height,p.depth,m,v,p.data)):n.texImage3D(35866,0,y,p.width,p.height,p.depth,0,m,v,p.data);else if(i.isData3DTexture)E?(U&&n.texStorage3D(32879,M,y,p.width,p.height,p.depth),n.texSubImage3D(32879,0,0,0,0,p.width,p.height,p.depth,m,v,p.data)):n.texImage3D(32879,0,y,p.width,p.height,p.depth,0,m,v,p.data);else if(i.isFramebufferTexture){if(U)if(E)n.texStorage2D(3553,M,y,p.width,p.height);else for(var H=p.width,P=p.height,N=0;N<M;N++)n.texImage2D(3553,N,y,H,P,0,m,v,null),H>>=1,P>>=1}else if(w.length>0&&g){E&&U&&n.texStorage2D(3553,M,y,w[0].width,w[0].height);for(var O=0,V=w.length;O<V;O++)d=w[O],E?n.texSubImage2D(3553,O,0,0,m,v,d):n.texImage2D(3553,O,y,m,v,d);i.generateMipmaps=!1}else E?(U&&n.texStorage2D(3553,M,y,p.width,p.height),n.texSubImage2D(3553,0,0,0,m,v,p)):n.texImage2D(3553,0,y,m,v,p);b(i,g)&&x(o),c.__version=l.version,i.onUpdate&&i.onUpdate(i)}t.__version=i.version}function P(t,i,A,o,s){var l=a.convert(A.format,A.encoding),u=a.convert(A.type),c=C(A.internalFormat,l,u,A.encoding);r.get(i).__hasExternalTextures||(32879===s||35866===s?n.texImage3D(s,0,c,i.width,i.height,i.depth,0,l,u,null):n.texImage2D(s,0,c,i.width,i.height,0,l,u,null)),n.bindFramebuffer(36160,t),z(i)?p.framebufferTexture2DMultisampleEXT(36160,o,s,r.get(A).__webglTexture,0,V(i)):(3553===s||s>=34069&&s<=34074)&&e.framebufferTexture2D(36160,o,s,r.get(A).__webglTexture,0),n.bindFramebuffer(36160,null)}function N(t,n,r){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){var i=33189;if(r||z(n)){var A=n.depthTexture;A&&A.isDepthTexture&&(A.type===eg?i=36012:A.type===$p&&(i=33190));var o=V(n);z(n)?p.renderbufferStorageMultisampleEXT(36161,o,i,n.width,n.height):e.renderbufferStorageMultisample(36161,o,i,n.width,n.height)}else e.renderbufferStorage(36161,i,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){var s=V(n);r&&!1===z(n)?e.renderbufferStorageMultisample(36161,s,35056,n.width,n.height):z(n)?p.renderbufferStorageMultisampleEXT(36161,s,35056,n.width,n.height):e.renderbufferStorage(36161,34041,n.width,n.height),e.framebufferRenderbuffer(36160,33306,36161,t)}else for(var l=!0===n.isWebGLMultipleRenderTargets?n.texture:[n.texture],u=0;u<l.length;u++){var c=l[u],d=a.convert(c.format,c.encoding),h=a.convert(c.type),f=C(c.internalFormat,d,h,c.encoding),g=V(n);r&&!1===z(n)?e.renderbufferStorageMultisample(36161,g,f,n.width,n.height):z(n)?p.renderbufferStorageMultisampleEXT(36161,g,f,n.width,n.height):e.renderbufferStorage(36161,f,n.width,n.height)}e.bindRenderbuffer(36161,null)}function O(t){var i=r.get(t),a=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture&&!i.__autoAllocateDepthBuffer){if(a)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,i){if(i&&i.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(36160,t),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),Q(i.depthTexture,0);var a=r.get(i.depthTexture).__webglTexture,A=V(i);if(i.depthTexture.format===lg)z(i)?p.framebufferTexture2DMultisampleEXT(36160,36096,3553,a,0,A):e.framebufferTexture2D(36160,36096,3553,a,0);else{if(i.depthTexture.format!==ug)throw new Error("Unknown depthTexture format");z(i)?p.framebufferTexture2DMultisampleEXT(36160,33306,3553,a,0,A):e.framebufferTexture2D(36160,33306,3553,a,0)}}(i.__webglFramebuffer,t)}else if(a){i.__webglDepthbuffer=[];for(var A=0;A<6;A++)n.bindFramebuffer(36160,i.__webglFramebuffer[A]),i.__webglDepthbuffer[A]=e.createRenderbuffer(),N(i.__webglDepthbuffer[A],t,!1)}else n.bindFramebuffer(36160,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),N(i.__webglDepthbuffer,t,!1);n.bindFramebuffer(36160,null)}function V(e){return Math.min(f,e.samples)}function z(e){var n=r.get(e);return u&&e.samples>0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function G(e,n){var r=e.encoding,i=e.format,a=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||e.format===sm||r!==Zg&&(r===$g?!1===u?!0===t.has("EXT_sRGB")&&i===Ag?(e.format=sm,e.minFilter=Kp,e.generateMipmaps=!1):n=Om.sRGBToLinear(n):i===Ag&&a===Xp||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",r)),n}this.allocateTextureUnit=function(){var e=k;return e>=c&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+c),k+=1,e},this.resetTextureUnits=function(){k=0},this.setTexture2D=Q,this.setTexture2DArray=function(e,t){var i=r.get(e);e.version>0&&i.__version!==e.version?H(i,e,t):n.bindTexture(35866,i.__webglTexture,33984+t)},this.setTexture3D=function(e,t){var i=r.get(e);e.version>0&&i.__version!==e.version?H(i,e,t):n.bindTexture(32879,i.__webglTexture,33984+t)},this.setTextureCube=function(t,i){var A=r.get(t);t.version>0&&A.__version!==t.version?function(t,i,A){if(6!==i.image.length)return;var o=R(t,i),s=i.source;n.bindTexture(34067,t.__webglTexture,33984+A);var l=r.get(s);if(s.version!==l.__version||!0===o){n.activeTexture(33984+A),e.pixelStorei(37440,i.flipY),e.pixelStorei(37441,i.premultiplyAlpha),e.pixelStorei(3317,i.unpackAlignment),e.pixelStorei(37443,0);for(var c=i.isCompressedTexture||i.image[0].isCompressedTexture,h=i.image[0]&&i.image[0].isDataTexture,f=[],p=0;p<6;p++)f[p]=c||h?h?i.image[p].image:i.image[p]:B(i.image[p],!1,!0,d),f[p]=G(i,f[p]);var g,m=f[0],v=_(m)||u,y=a.convert(i.format,i.encoding),w=a.convert(i.type),E=C(i.internalFormat,y,w,i.encoding),U=u&&!0!==i.isVideoTexture,M=void 0===l.__version||!0===o,F=S(i,m,v);if(I(34067,i,v),c){U&&M&&n.texStorage2D(34067,F,E,m.width,m.height);for(var T=0;T<6;T++){g=f[T].mipmaps;for(var k=0;k<g.length;k++){var Q=g[k];i.format!==Ag?null!==y?U?n.compressedTexSubImage2D(34069+T,k,0,0,Q.width,Q.height,y,Q.data):n.compressedTexImage2D(34069+T,k,E,Q.width,Q.height,0,Q.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):U?n.texSubImage2D(34069+T,k,0,0,Q.width,Q.height,y,w,Q.data):n.texImage2D(34069+T,k,E,Q.width,Q.height,0,y,w,Q.data)}}}else{g=i.mipmaps,U&&M&&(g.length>0&&F++,n.texStorage2D(34067,F,E,f[0].width,f[0].height));for(var L=0;L<6;L++)if(h){U?n.texSubImage2D(34069+L,0,0,0,f[L].width,f[L].height,y,w,f[L].data):n.texImage2D(34069+L,0,E,f[L].width,f[L].height,0,y,w,f[L].data);for(var D=0;D<g.length;D++){var H=g[D].image[L].image;U?n.texSubImage2D(34069+L,D+1,0,0,H.width,H.height,y,w,H.data):n.texImage2D(34069+L,D+1,E,H.width,H.height,0,y,w,H.data)}}else{U?n.texSubImage2D(34069+L,0,0,0,y,w,f[L]):n.texImage2D(34069+L,0,E,y,w,f[L]);for(var P=0;P<g.length;P++){var N=g[P];U?n.texSubImage2D(34069+L,P+1,0,0,y,w,N.image[L]):n.texImage2D(34069+L,P+1,E,y,w,N.image[L])}}}b(i,v)&&x(34067),l.__version=s.version,i.onUpdate&&i.onUpdate(i)}t.__version=i.version}(A,t,i):n.bindTexture(34067,A.__webglTexture,33984+i)},this.rebindTextures=function(e,t,n){var i=r.get(e);void 0!==t&&P(i.__webglFramebuffer,e,e.texture,36064,3553),void 0!==n&&O(e)},this.setupRenderTarget=function(t){var o=t.texture,s=r.get(t),l=r.get(o);t.addEventListener("dispose",F),!0!==t.isWebGLMultipleRenderTargets&&(void 0===l.__webglTexture&&(l.__webglTexture=e.createTexture()),l.__version=o.version,A.memory.textures++);var c=!0===t.isWebGLCubeRenderTarget,d=!0===t.isWebGLMultipleRenderTargets,h=_(t)||u;if(c){s.__webglFramebuffer=[];for(var f=0;f<6;f++)s.__webglFramebuffer[f]=e.createFramebuffer()}else{if(s.__webglFramebuffer=e.createFramebuffer(),d)if(i.drawBuffers)for(var p=t.texture,g=0,m=p.length;g<m;g++){var v=r.get(p[g]);void 0===v.__webglTexture&&(v.__webglTexture=e.createTexture(),A.memory.textures++)}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(u&&t.samples>0&&!1===z(t)){var y=d?o:[o];s.__webglMultisampledFramebuffer=e.createFramebuffer(),s.__webglColorRenderbuffer=[],n.bindFramebuffer(36160,s.__webglMultisampledFramebuffer);for(var w=0;w<y.length;w++){var B=y[w];s.__webglColorRenderbuffer[w]=e.createRenderbuffer(),e.bindRenderbuffer(36161,s.__webglColorRenderbuffer[w]);var S=a.convert(B.format,B.encoding),E=a.convert(B.type),U=C(B.internalFormat,S,E,B.encoding,!0===t.isXRRenderTarget),M=V(t);e.renderbufferStorageMultisample(36161,M,U,t.width,t.height),e.framebufferRenderbuffer(36160,36064+w,36161,s.__webglColorRenderbuffer[w])}e.bindRenderbuffer(36161,null),t.depthBuffer&&(s.__webglDepthRenderbuffer=e.createRenderbuffer(),N(s.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(36160,null)}}if(c){n.bindTexture(34067,l.__webglTexture),I(34067,o,h);for(var T=0;T<6;T++)P(s.__webglFramebuffer[T],t,o,36064,34069+T);b(o,h)&&x(34067),n.unbindTexture()}else if(d){for(var k=t.texture,Q=0,L=k.length;Q<L;Q++){var D=k[Q],R=r.get(D);n.bindTexture(3553,R.__webglTexture),I(3553,D,h),P(s.__webglFramebuffer,t,D,36064+Q,3553),b(D,h)&&x(3553)}n.unbindTexture()}else{var H=3553;(t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(u?H=t.isWebGL3DRenderTarget?32879:35866:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),n.bindTexture(H,l.__webglTexture),I(H,o,h),P(s.__webglFramebuffer,t,o,36064,H),b(o,h)&&x(H),n.unbindTexture()}t.depthBuffer&&O(t)},this.updateRenderTargetMipmap=function(e){for(var t=_(e)||u,i=!0===e.isWebGLMultipleRenderTargets?e.texture:[e.texture],a=0,A=i.length;a<A;a++){var o=i[a];if(b(o,t)){var s=e.isWebGLCubeRenderTarget?34067:3553,l=r.get(o).__webglTexture;n.bindTexture(s,l),x(s),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(u&&t.samples>0&&!1===z(t)){var i=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],a=t.width,A=t.height,o=16384,s=[],l=t.stencilBuffer?33306:36096,c=r.get(t),d=!0===t.isWebGLMultipleRenderTargets;if(d)for(var h=0;h<i.length;h++)n.bindFramebuffer(36160,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064+h,36161,null),n.bindFramebuffer(36160,c.__webglFramebuffer),e.framebufferTexture2D(36009,36064+h,3553,null,0);n.bindFramebuffer(36008,c.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,c.__webglFramebuffer);for(var f=0;f<i.length;f++){s.push(36064+f),t.depthBuffer&&s.push(l);var p=void 0!==c.__ignoreDepthValues&&c.__ignoreDepthValues;if(!1===p&&(t.depthBuffer&&(o|=256),t.stencilBuffer&&(o|=1024)),d&&e.framebufferRenderbuffer(36008,36064,36161,c.__webglColorRenderbuffer[f]),!0===p&&(e.invalidateFramebuffer(36008,[l]),e.invalidateFramebuffer(36009,[l])),d){var m=r.get(i[f]).__webglTexture;e.framebufferTexture2D(36009,36064,3553,m,0)}e.blitFramebuffer(0,0,a,A,0,0,a,A,o,9728),g&&e.invalidateFramebuffer(36008,s)}if(n.bindFramebuffer(36008,null),n.bindFramebuffer(36009,null),d)for(var v=0;v<i.length;v++){n.bindFramebuffer(36160,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064+v,36161,c.__webglColorRenderbuffer[v]);var y=r.get(i[v]).__webglTexture;n.bindFramebuffer(36160,c.__webglFramebuffer),e.framebufferTexture2D(36009,36064+v,3553,y,0)}n.bindFramebuffer(36009,c.__webglMultisampledFramebuffer)}},this.setupDepthRenderbuffer=O,this.setupFrameBufferTexture=P,this.useMultisampledRTT=z}function T_(e,t,n){var r=n.isWebGL2;return{convert:function(n){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(n===Xp)return 5121;if(n===ng)return 32819;if(n===rg)return 32820;if(n===qp)return 5120;if(n===Yp)return 5122;if(n===Jp)return 5123;if(n===Zp)return 5124;if(n===$p)return 5125;if(n===eg)return 5126;if(n===tg)return r?5131:null!==(i=t.get("OES_texture_half_float"))?i.HALF_FLOAT_OES:null;if(n===ag)return 6406;if(n===Ag)return 6408;if(n===og)return 6409;if(n===sg)return 6410;if(n===lg)return 6402;if(n===ug)return 34041;if(n===sm)return null!==(i=t.get("EXT_sRGB"))?i.SRGB_ALPHA_EXT:null;if(n===cg)return 6403;if(n===dg)return 36244;if(n===hg)return 33319;if(n===fg)return 33320;if(n===pg)return 36249;if(n===gg||n===mg||n===vg||n===yg)if(a===$g){if(null===(i=t.get("WEBGL_compressed_texture_s3tc_srgb")))return null;if(n===gg)return i.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===mg)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===vg)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===yg)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(null===(i=t.get("WEBGL_compressed_texture_s3tc")))return null;if(n===gg)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===mg)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===vg)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===yg)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(n===wg||n===Bg||n===_g||n===bg){if(null===(i=t.get("WEBGL_compressed_texture_pvrtc")))return null;if(n===wg)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Bg)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===_g)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===bg)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===xg)return null!==(i=t.get("WEBGL_compressed_texture_etc1"))?i.COMPRESSED_RGB_ETC1_WEBGL:null;if(n===Cg||n===Sg){if(null===(i=t.get("WEBGL_compressed_texture_etc")))return null;if(n===Cg)return a===$g?i.COMPRESSED_SRGB8_ETC2:i.COMPRESSED_RGB8_ETC2;if(n===Sg)return a===$g?i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:i.COMPRESSED_RGBA8_ETC2_EAC}if(n===Eg||n===Ug||n===Mg||n===Fg||n===Tg||n===kg||n===Qg||n===Lg||n===Dg||n===Ig||n===Rg||n===Hg||n===Pg||n===Ng){if(null===(i=t.get("WEBGL_compressed_texture_astc")))return null;if(n===Eg)return a===$g?i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:i.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===Ug)return a===$g?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:i.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===Mg)return a===$g?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:i.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===Fg)return a===$g?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:i.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===Tg)return a===$g?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:i.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===kg)return a===$g?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:i.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===Qg)return a===$g?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:i.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===Lg)return a===$g?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:i.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===Dg)return a===$g?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:i.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===Ig)return a===$g?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:i.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===Rg)return a===$g?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:i.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===Hg)return a===$g?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:i.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===Pg)return a===$g?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:i.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Ng)return a===$g?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:i.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===Og){if(null===(i=t.get("EXT_texture_compression_bptc")))return null;if(n===Og)return a===$g?i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:i.COMPRESSED_RGBA_BPTC_UNORM_EXT}if(n===Vg||n===zg||n===Gg||n===Kg){if(null===(i=t.get("EXT_texture_compression_rgtc")))return null;if(n===Og)return i.COMPRESSED_RED_RGTC1_EXT;if(n===zg)return i.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===Gg)return i.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===Kg)return i.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return n===ig?r?34042:null!==(i=t.get("WEBGL_depth_texture"))?i.UNSIGNED_INT_24_8_WEBGL:null:void 0!==e[n]?e[n]:null}}}var k_=function(e){x(n,e);var t=U(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return y(this,n),(e=t.call(this)).isArrayCamera=!0,e.cameras=r,e}return _(n)}(qy),Q_=function(e){x(n,e);var t=U(n);function n(){var e;return y(this,n),(e=t.call(this)).isGroup=!0,e.type="Group",e}return _(n)}(Zv),L_={type:"move"},D_=function(){function e(){y(this,e),this._targetRay=null,this._grip=null,this._hand=null}return _(e,[{key:"getHandSpace",value:function(){return null===this._hand&&(this._hand=new Q_,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}},{key:"getTargetRaySpace",value:function(){return null===this._targetRay&&(this._targetRay=new Q_,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Jm,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Jm),this._targetRay}},{key:"getGripSpace",value:function(){return null===this._grip&&(this._grip=new Q_,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Jm,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Jm),this._grip}},{key:"dispatchEvent",value:function(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}},{key:"connect",value:function(e){if(e&&e.hand){var t=this._hand;if(t){var n,r=Q(e.hand.values());try{for(r.s();!(n=r.n()).done;){var i=n.value;this._getHandJoint(t,i)}}catch(FC){r.e(FC)}finally{r.f()}}}return this.dispatchEvent({type:"connected",data:e}),this}},{key:"disconnect",value:function(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}},{key:"update",value:function(e,t,n){var r=null,i=null,a=null,A=this._targetRay,o=this._grip,s=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState){if(s&&e.hand){a=!0;var l,u=Q(e.hand.values());try{for(u.s();!(l=u.n()).done;){var c=l.value,d=t.getJointPose(c,n),h=this._getHandJoint(s,c);null!==d&&(h.matrix.fromArray(d.transform.matrix),h.matrix.decompose(h.position,h.rotation,h.scale),h.jointRadius=d.radius),h.visible=null!==d}}catch(FC){u.e(FC)}finally{u.f()}var f=s.joints["index-finger-tip"],p=s.joints["thumb-tip"],g=f.position.distanceTo(p.position);s.inputState.pinching&&g>.025?(s.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!s.inputState.pinching&&g<=.015&&(s.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==o&&e.gripSpace&&null!==(i=t.getPose(e.gripSpace,n))&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1);null!==A&&(null===(r=t.getPose(e.targetRaySpace,n))&&null!==i&&(r=i),null!==r&&(A.matrix.fromArray(r.transform.matrix),A.matrix.decompose(A.position,A.rotation,A.scale),r.linearVelocity?(A.hasLinearVelocity=!0,A.linearVelocity.copy(r.linearVelocity)):A.hasLinearVelocity=!1,r.angularVelocity?(A.hasAngularVelocity=!0,A.angularVelocity.copy(r.angularVelocity)):A.hasAngularVelocity=!1,this.dispatchEvent(L_)))}return null!==A&&(A.visible=null!==r),null!==o&&(o.visible=null!==i),null!==s&&(s.visible=null!==a),this}},{key:"_getHandJoint",value:function(e,t){if(void 0===e.joints[t.jointName]){var n=new Q_;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}]),e}(),I_=function(e){x(n,e);var t=U(n);function n(e,r,i,a,A,o,s,l,u,c){var d;if(y(this,n),(c=void 0!==c?c:lg)!==lg&&c!==ug)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");return void 0===i&&c===lg&&(i=$p),void 0===i&&c===ug&&(i=ig),(d=t.call(this,null,a,A,o,s,l,c,i,u)).isDepthTexture=!0,d.image={width:e,height:r},d.magFilter=void 0!==s?s:Vp,d.minFilter=void 0!==l?l:Vp,d.flipY=!1,d.generateMipmaps=!1,d}return _(n)}(Km),R_=function(e){x(n,e);var t=U(n);function n(e,r){var i,a;y(this,n);var A=E(a=t.call(this)),o=null,s=1,l=null,u="local-floor",d=1,f=null,p=null,g=null,m=null,v=null,w=null,B=r.getContextAttributes(),_=null,b=null,x=[],C=[],S=new Set,U=new Map,M=new qy;M.layers.enable(1),M.viewport=new Wm;var F=new qy;F.layers.enable(2),F.viewport=new Wm;var T=[M,F],k=new k_;k.layers.enable(1),k.layers.enable(2);var L=null,D=null;function I(e){var t=C.indexOf(e.inputSource);if(-1!==t){var n=x[t];void 0!==n&&n.dispatchEvent({type:e.type,data:e.inputSource})}}function R(){o.removeEventListener("select",I),o.removeEventListener("selectstart",I),o.removeEventListener("selectend",I),o.removeEventListener("squeeze",I),o.removeEventListener("squeezestart",I),o.removeEventListener("squeezeend",I),o.removeEventListener("end",R),o.removeEventListener("inputsourceschange",H);for(var t=0;t<x.length;t++){var n=C[t];null!==n&&(C[t]=null,x[t].disconnect(n))}L=null,D=null,e.setRenderTarget(_),v=null,m=null,g=null,o=null,b=null,z.stop(),A.isPresenting=!1,A.dispatchEvent({type:"sessionend"})}function H(e){for(var t=0;t<e.removed.length;t++){var n=e.removed[t],r=C.indexOf(n);r>=0&&(C[r]=null,x[r].disconnect(n))}for(var i=0;i<e.added.length;i++){var a=e.added[i],A=C.indexOf(a);if(-1===A){for(var o=0;o<x.length;o++){if(o>=C.length){C.push(a),A=o;break}if(null===C[o]){C[o]=a,A=o;break}}if(-1===A)break}var s=x[A];s&&s.connect(a)}}a.cameraAutoUpdate=!0,a.enabled=!1,a.isPresenting=!1,a.getController=function(e){var t=x[e];return void 0===t&&(t=new D_,x[e]=t),t.getTargetRaySpace()},a.getControllerGrip=function(e){var t=x[e];return void 0===t&&(t=new D_,x[e]=t),t.getGripSpace()},a.getHand=function(e){var t=x[e];return void 0===t&&(t=new D_,x[e]=t),t.getHandSpace()},a.setFramebufferScaleFactor=function(e){s=e,!0===A.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},a.setReferenceSpaceType=function(e){u=e,!0===A.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},a.getReferenceSpace=function(){return f||l},a.setReferenceSpace=function(e){f=e},a.getBaseLayer=function(){return null!==m?m:v},a.getBinding=function(){return g},a.getFrame=function(){return w},a.getSession=function(){return o},a.setSession=function(t){return(i=i||h(c().mark((function t(n){var i,a,h,p,y;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null===(o=n)){t.next=25;break}if(_=e.getRenderTarget(),o.addEventListener("select",I),o.addEventListener("selectstart",I),o.addEventListener("selectend",I),o.addEventListener("squeeze",I),o.addEventListener("squeezestart",I),o.addEventListener("squeezeend",I),o.addEventListener("end",R),o.addEventListener("inputsourceschange",H),!0===B.xrCompatible){t.next=14;break}return t.next=14,r.makeXRCompatible();case 14:return void 0===o.renderState.layers||!1===e.capabilities.isWebGL2?(i={antialias:void 0!==o.renderState.layers||B.antialias,alpha:B.alpha,depth:B.depth,stencil:B.stencil,framebufferScaleFactor:s},v=new XRWebGLLayer(o,r,i),o.updateRenderState({baseLayer:v}),b=new jm(v.framebufferWidth,v.framebufferHeight,{format:Ag,type:Xp,encoding:e.outputEncoding,stencilBuffer:B.stencil})):(a=null,h=null,p=null,B.depth&&(p=B.stencil?35056:33190,a=B.stencil?ug:lg,h=B.stencil?ig:$p),y={colorFormat:32856,depthFormat:p,scaleFactor:s},g=new XRWebGLBinding(o,r),m=g.createProjectionLayer(y),o.updateRenderState({layers:[m]}),b=new jm(m.textureWidth,m.textureHeight,{format:Ag,type:Xp,depthTexture:new I_(m.textureWidth,m.textureHeight,h,void 0,void 0,void 0,void 0,void 0,void 0,a),stencilBuffer:B.stencil,encoding:e.outputEncoding,samples:B.antialias?4:0}),e.properties.get(b).__ignoreDepthValues=m.ignoreDepthValues),b.isXRRenderTarget=!0,this.setFoveation(d),f=null,t.next=20,o.requestReferenceSpace(u);case 20:l=t.sent,z.setContext(o),z.start(),A.isPresenting=!0,A.dispatchEvent({type:"sessionstart"});case 25:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)};var P=new Jm,N=new Jm;function O(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}a.updateCamera=function(e){if(null!==o){k.near=F.near=M.near=e.near,k.far=F.far=M.far=e.far,L===k.near&&D===k.far||(o.updateRenderState({depthNear:k.near,depthFar:k.far}),L=k.near,D=k.far);var t=e.parent,n=k.cameras;O(k,t);for(var r=0;r<n.length;r++)O(n[r],t);k.matrixWorld.decompose(k.position,k.quaternion,k.scale),e.matrix.copy(k.matrix),e.matrix.decompose(e.position,e.quaternion,e.scale);for(var i=e.children,a=0,A=i.length;a<A;a++)i[a].updateMatrixWorld(!0);2===n.length?function(e,t,n){P.setFromMatrixPosition(t.matrixWorld),N.setFromMatrixPosition(n.matrixWorld);var r=P.distanceTo(N),i=t.projectionMatrix.elements,a=n.projectionMatrix.elements,A=i[14]/(i[10]-1),o=i[14]/(i[10]+1),s=(i[9]+1)/i[5],l=(i[9]-1)/i[5],u=(i[8]-1)/i[0],c=(a[8]+1)/a[0],d=A*u,h=A*c,f=r/(-u+c),p=f*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(p),e.translateZ(f),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();var g=A+f,m=o+f,v=d-p,y=h+(r-p),w=s*o/m*g,B=l*o/m*g;e.projectionMatrix.makePerspective(v,y,w,B,g,m)}(k,M,F):k.projectionMatrix.copy(M.projectionMatrix)}},a.getCamera=function(){return k},a.getFoveation=function(){if(null!==m||null!==v)return d},a.setFoveation=function(e){d=e,null!==m&&(m.fixedFoveation=e),null!==v&&void 0!==v.fixedFoveation&&(v.fixedFoveation=e)},a.getPlanes=function(){return S};var V=null;var z=new ow;return z.setAnimationLoop((function(t,n){if(p=n.getViewerPose(f||l),w=n,null!==p){var r=p.views;null!==v&&(e.setRenderTargetFramebuffer(b,v.framebuffer),e.setRenderTarget(b));var i=!1;r.length!==k.cameras.length&&(k.cameras.length=0,i=!0);for(var a=0;a<r.length;a++){var o=r[a],s=null;if(null!==v)s=v.getViewport(o);else{var u=g.getViewSubImage(m,o);s=u.viewport,0===a&&(e.setRenderTargetTextures(b,u.colorTexture,m.ignoreDepthValues?void 0:u.depthStencilTexture),e.setRenderTarget(b))}var c=T[a];void 0===c&&((c=new qy).layers.enable(a),c.viewport=new Wm,T[a]=c),c.matrix.fromArray(o.transform.matrix),c.projectionMatrix.fromArray(o.projectionMatrix),c.viewport.set(s.x,s.y,s.width,s.height),0===a&&k.matrix.copy(c.matrix),!0===i&&k.cameras.push(c)}}for(var d=0;d<x.length;d++){var h=C[d],y=x[d];null!==h&&void 0!==y&&y.update(h,n,f||l)}if(V&&V(t,n),n.detectedPlanes){A.dispatchEvent({type:"planesdetected",data:n.detectedPlanes});var B,_=null,E=Q(S);try{for(E.s();!(B=E.n()).done;){var M=B.value;n.detectedPlanes.has(M)||(null===_&&(_=[]),_.push(M))}}catch(FC){E.e(FC)}finally{E.f()}if(null!==_){var F,L=Q(_);try{for(L.s();!(F=L.n()).done;){var D=F.value;S.delete(D),U.delete(D),A.dispatchEvent({type:"planeremoved",data:D})}}catch(FC){L.e(FC)}finally{L.f()}}var I,R=Q(n.detectedPlanes);try{for(R.s();!(I=R.n()).done;){var H=I.value;if(S.has(H)){var P=U.get(H);H.lastChangedTime>P&&(U.set(H,H.lastChangedTime),A.dispatchEvent({type:"planechanged",data:H}))}else S.add(H),U.set(H,n.lastChangedTime),A.dispatchEvent({type:"planeadded",data:H})}}catch(FC){R.e(FC)}finally{R.f()}}w=null})),a.setAnimationLoop=function(e){V=e},a.dispose=function(){},a}return _(n)}(lm);function H_(e,t){function n(n,r){n.opacity.value=r.opacity,r.color&&n.diffuse.value.copy(r.color),r.emissive&&n.emissive.value.copy(r.emissive).multiplyScalar(r.emissiveIntensity),r.map&&(n.map.value=r.map),r.alphaMap&&(n.alphaMap.value=r.alphaMap),r.bumpMap&&(n.bumpMap.value=r.bumpMap,n.bumpScale.value=r.bumpScale,r.side===jf&&(n.bumpScale.value*=-1)),r.displacementMap&&(n.displacementMap.value=r.displacementMap,n.displacementScale.value=r.displacementScale,n.displacementBias.value=r.displacementBias),r.emissiveMap&&(n.emissiveMap.value=r.emissiveMap),r.normalMap&&(n.normalMap.value=r.normalMap,n.normalScale.value.copy(r.normalScale),r.side===jf&&n.normalScale.value.negate()),r.specularMap&&(n.specularMap.value=r.specularMap),r.alphaTest>0&&(n.alphaTest.value=r.alphaTest);var i,a,A=t.get(r).envMap;if(A&&(n.envMap.value=A,n.flipEnvMap.value=A.isCubeTexture&&!1===A.isRenderTargetTexture?-1:1,n.reflectivity.value=r.reflectivity,n.ior.value=r.ior,n.refractionRatio.value=r.refractionRatio),r.lightMap){n.lightMap.value=r.lightMap;var o=!0!==e.physicallyCorrectLights?Math.PI:1;n.lightMapIntensity.value=r.lightMapIntensity*o}r.aoMap&&(n.aoMap.value=r.aoMap,n.aoMapIntensity.value=r.aoMapIntensity),r.map?i=r.map:r.specularMap?i=r.specularMap:r.displacementMap?i=r.displacementMap:r.normalMap?i=r.normalMap:r.bumpMap?i=r.bumpMap:r.roughnessMap?i=r.roughnessMap:r.metalnessMap?i=r.metalnessMap:r.alphaMap?i=r.alphaMap:r.emissiveMap?i=r.emissiveMap:r.clearcoatMap?i=r.clearcoatMap:r.clearcoatNormalMap?i=r.clearcoatNormalMap:r.clearcoatRoughnessMap?i=r.clearcoatRoughnessMap:r.iridescenceMap?i=r.iridescenceMap:r.iridescenceThicknessMap?i=r.iridescenceThicknessMap:r.specularIntensityMap?i=r.specularIntensityMap:r.specularColorMap?i=r.specularColorMap:r.transmissionMap?i=r.transmissionMap:r.thicknessMap?i=r.thicknessMap:r.sheenColorMap?i=r.sheenColorMap:r.sheenRoughnessMap&&(i=r.sheenRoughnessMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),n.uvTransform.value.copy(i.matrix)),r.aoMap?a=r.aoMap:r.lightMap&&(a=r.lightMap),void 0!==a&&(a.isWebGLRenderTarget&&(a=a.texture),!0===a.matrixAutoUpdate&&a.updateMatrix(),n.uv2Transform.value.copy(a.matrix))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,Ky(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,r,i,a,A){r.isMeshBasicMaterial||r.isMeshLambertMaterial?n(e,r):r.isMeshToonMaterial?(n(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,r)):r.isMeshPhongMaterial?(n(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,r)):r.isMeshStandardMaterial?(n(e,r),function(e,n){e.roughness.value=n.roughness,e.metalness.value=n.metalness,n.roughnessMap&&(e.roughnessMap.value=n.roughnessMap);n.metalnessMap&&(e.metalnessMap.value=n.metalnessMap);var r=t.get(n).envMap;r&&(e.envMapIntensity.value=n.envMapIntensity)}(e,r),r.isMeshPhysicalMaterial&&function(e,t,n){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap));t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===jf&&e.clearcoatNormalScale.value.negate()));t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap));t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=n.texture,e.transmissionSamplerSize.value.set(n.width,n.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor));e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap);t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap)}(e,r,A)):r.isMeshMatcapMaterial?(n(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,r)):r.isMeshDepthMaterial?n(e,r):r.isMeshDistanceMaterial?(n(e,r),function(e,t){e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,r)):r.isMeshNormalMaterial?n(e,r):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);t.alphaTest>0&&(e.alphaTest.value=t.alphaTest);var i;t.map?i=t.map:t.alphaMap&&(i=t.alphaMap);void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,a):r.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);t.alphaTest>0&&(e.alphaTest.value=t.alphaTest);var n;t.map?n=t.map:t.alphaMap&&(n=t.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function P_(e,t,n,r){var i={},a={},A=[],o=n.isWebGL2?e.getParameter(35375):0;function s(e,t,n){var r=e.value;if(void 0===n[t]){if("number"===typeof r)n[t]=r;else{for(var i=Array.isArray(r)?r:[r],a=[],A=0;A<i.length;A++)a.push(i[A].clone());n[t]=a}return!0}if("number"===typeof r){if(n[t]!==r)return n[t]=r,!0}else for(var o=Array.isArray(n[t])?n[t]:[n[t]],s=Array.isArray(r)?r:[r],l=0;l<o.length;l++){var u=o[l];if(!1===u.equals(s[l]))return u.copy(s[l]),!0}return!1}function l(e){var t={boundary:0,storage:0};return"number"===typeof e?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",e),t}function u(t){var n=t.target;n.removeEventListener("dispose",u);var r=A.indexOf(n.__bindingPointIndex);A.splice(r,1),e.deleteBuffer(i[n.id]),delete i[n.id],delete a[n.id]}return{bind:function(e,t){var n=t.program;r.uniformBlockBinding(e,n)},update:function(n,c){var d=i[n.id];void 0===d&&(!function(e){for(var t=e.uniforms,n=0,r=16,i=0,a=0,A=t.length;a<A;a++){for(var o=t[a],s={boundary:0,storage:0},u=Array.isArray(o.value)?o.value:[o.value],c=0,d=u.length;c<d;c++){var h=l(u[c]);s.boundary+=h.boundary,s.storage+=h.storage}if(o.__data=new Float32Array(s.storage/Float32Array.BYTES_PER_ELEMENT),o.__offset=n,a>0)0!==(i=n%r)&&r-i-s.boundary<0&&(n+=r-i,o.__offset=n);n+=s.storage}(i=n%r)>0&&(n+=r-i);e.__size=n,e.__cache={}}(n),d=function(t){var n=function(){for(var e=0;e<o;e++)if(-1===A.indexOf(e))return A.push(e),e;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}();t.__bindingPointIndex=n;var r=e.createBuffer(),i=t.__size,a=t.usage;return e.bindBuffer(35345,r),e.bufferData(35345,i,a),e.bindBuffer(35345,null),e.bindBufferBase(35345,n,r),r}(n),i[n.id]=d,n.addEventListener("dispose",u));var h=c.program;r.updateUBOMapping(n,h);var f=t.render.frame;a[n.id]!==f&&(!function(t){var n=i[t.id],r=t.uniforms,a=t.__cache;e.bindBuffer(35345,n);for(var A=0,o=r.length;A<o;A++){var u=r[A];if(!0===s(u,A,a)){for(var c=u.__offset,d=Array.isArray(u.value)?u.value:[u.value],h=0,f=0;f<d.length;f++){var p=d[f],g=l(p);"number"===typeof p?(u.__data[0]=p,e.bufferSubData(35345,c+h,u.__data)):p.isMatrix3?(u.__data[0]=p.elements[0],u.__data[1]=p.elements[1],u.__data[2]=p.elements[2],u.__data[3]=p.elements[0],u.__data[4]=p.elements[3],u.__data[5]=p.elements[4],u.__data[6]=p.elements[5],u.__data[7]=p.elements[0],u.__data[8]=p.elements[6],u.__data[9]=p.elements[7],u.__data[10]=p.elements[8],u.__data[11]=p.elements[0]):(p.toArray(u.__data,h),h+=g.storage/Float32Array.BYTES_PER_ELEMENT)}e.bufferSubData(35345,c,u.__data)}}e.bindBuffer(35345,null)}(n),a[n.id]=f)},dispose:function(){for(var t in i)e.deleteBuffer(i[t]);A=[],i={},a={}}}}function N_(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.isWebGLRenderer=!0;var t,n=void 0!==e.canvas?e.canvas:function(){var e=Um("canvas");return e.style.display="block",e}(),r=void 0!==e.context?e.context:null,i=void 0===e.depth||e.depth,a=void 0===e.stencil||e.stencil,A=void 0!==e.antialias&&e.antialias,o=void 0===e.premultipliedAlpha||e.premultipliedAlpha,s=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,l=void 0!==e.powerPreference?e.powerPreference:"default",u=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;t=null!==r?r.getContextAttributes().alpha:void 0!==e.alpha&&e.alpha;var c=null,d=null,h=[],f=[];this.domElement=n,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=Zg,this.physicallyCorrectLights=!1,this.toneMapping=Up,this.toneMappingExposure=1;var p=this,g=!1,m=0,v=0,y=null,w=-1,B=null,_=new Wm,b=new Wm,x=null,C=n.width,S=n.height,E=1,U=null,M=null,F=new Wm(0,0,C,S),T=new Wm(0,0,C,S),k=!1,Q=new Aw,L=!1,D=!1,I=null,R=new Ev,H=new xm,P=new Jm,N={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function O(){return null===y?E:1}var V,z,G,K,W,j,X,q,Y,J,Z,$,ee,te,ne,re,ie,ae,Ae,oe,se,le,ue,ce,de=r;function he(e,t){for(var r=0;r<e.length;r++){var i=e[r],a=n.getContext(i,t);if(null!==a)return a}return null}try{var fe={alpha:!0,depth:i,stencil:a,antialias:A,premultipliedAlpha:o,preserveDrawingBuffer:s,powerPreference:l,failIfMajorPerformanceCaveat:u};if("setAttribute"in n&&n.setAttribute("data-engine","three.js r".concat(Pf)),n.addEventListener("webglcontextlost",ve,!1),n.addEventListener("webglcontextrestored",ye,!1),n.addEventListener("webglcontextcreationerror",we,!1),null===de){var pe=["webgl2","webgl","experimental-webgl"];if(!0===p.isWebGL1Renderer&&pe.shift(),null===(de=he(pe,fe)))throw he(pe)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===de.getShaderPrecisionFormat&&(de.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(ke){throw console.error("THREE.WebGLRenderer: "+ke.message),ke}function ge(){V=new Dw(de),z=new mw(de,V,e),V.init(z),le=new T_(de,V,z),G=new M_(de,V,z),K=new Hw,W=new h_,j=new F_(de,V,G,W,z,le,K),X=new yw(p),q=new Lw(p),Y=new sw(de,z),ue=new pw(de,V,Y,z),J=new Iw(de,Y,K,ue),Z=new Vw(de,J,Y,K),Ae=new Ow(de,z,j),re=new vw(W),$=new d_(p,X,q,V,z,ue,re),ee=new H_(p,W),te=new m_,ne=new b_(V,z),ae=new fw(p,X,q,G,Z,t,o),ie=new U_(p,Z,z),ce=new P_(de,K,z,G),oe=new gw(de,V,K,z),se=new Rw(de,V,K,z),K.programs=$.programs,p.capabilities=z,p.extensions=V,p.properties=W,p.renderLists=te,p.shadowMap=ie,p.state=G,p.info=K}ge();var me=new R_(p,de);function ve(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),g=!0}function ye(){console.log("THREE.WebGLRenderer: Context Restored."),g=!1;var e=K.autoReset,t=ie.enabled,n=ie.autoUpdate,r=ie.needsUpdate,i=ie.type;ge(),K.autoReset=e,ie.enabled=t,ie.autoUpdate=n,ie.needsUpdate=r,ie.type=i}function we(e){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",e.statusMessage)}function Be(e){var t=e.target;t.removeEventListener("dispose",Be),function(e){(function(e){var t=W.get(e).programs;void 0!==t&&(t.forEach((function(e){$.releaseProgram(e)})),e.isShaderMaterial&&$.releaseShaderCache(e))})(e),W.remove(e)}(t)}this.xr=me,this.getContext=function(){return de},this.getContextAttributes=function(){return de.getContextAttributes()},this.forceContextLoss=function(){var e=V.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){var e=V.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return E},this.setPixelRatio=function(e){void 0!==e&&(E=e,this.setSize(C,S,!1))},this.getSize=function(e){return e.set(C,S)},this.setSize=function(e,t,r){me.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(C=e,S=t,n.width=Math.floor(e*E),n.height=Math.floor(t*E),!1!==r&&(n.style.width=e+"px",n.style.height=t+"px"),this.setViewport(0,0,e,t))},this.getDrawingBufferSize=function(e){return e.set(C*E,S*E).floor()},this.setDrawingBufferSize=function(e,t,r){C=e,S=t,E=r,n.width=Math.floor(e*r),n.height=Math.floor(t*r),this.setViewport(0,0,e,t)},this.getCurrentViewport=function(e){return e.copy(_)},this.getViewport=function(e){return e.copy(F)},this.setViewport=function(e,t,n,r){e.isVector4?F.set(e.x,e.y,e.z,e.w):F.set(e,t,n,r),G.viewport(_.copy(F).multiplyScalar(E).floor())},this.getScissor=function(e){return e.copy(T)},this.setScissor=function(e,t,n,r){e.isVector4?T.set(e.x,e.y,e.z,e.w):T.set(e,t,n,r),G.scissor(b.copy(T).multiplyScalar(E).floor())},this.getScissorTest=function(){return k},this.setScissorTest=function(e){G.setScissorTest(k=e)},this.setOpaqueSort=function(e){U=e},this.setTransparentSort=function(e){M=e},this.getClearColor=function(e){return e.copy(ae.getClearColor())},this.setClearColor=function(){ae.setClearColor.apply(ae,arguments)},this.getClearAlpha=function(){return ae.getClearAlpha()},this.setClearAlpha=function(){ae.setClearAlpha.apply(ae,arguments)},this.clear=function(){var e=0;(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(e|=16384),(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(e|=256),(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&(e|=1024),de.clear(e)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){n.removeEventListener("webglcontextlost",ve,!1),n.removeEventListener("webglcontextrestored",ye,!1),n.removeEventListener("webglcontextcreationerror",we,!1),te.dispose(),ne.dispose(),W.dispose(),X.dispose(),q.dispose(),Z.dispose(),ue.dispose(),ce.dispose(),$.dispose(),me.dispose(),me.removeEventListener("sessionstart",be),me.removeEventListener("sessionend",xe),I&&(I.dispose(),I=null),Ce.stop()},this.renderBufferDirect=function(e,t,n,r,i,a){null===t&&(t=N);var A=i.isMesh&&i.matrixWorld.determinant()<0,o=function(e,t,n,r,i){!0!==t.isScene&&(t=N);j.resetTextureUnits();var a=t.fog,A=r.isMeshStandardMaterial?t.environment:null,o=null===y?p.outputEncoding:!0===y.isXRRenderTarget?y.texture.encoding:Zg,s=(r.isMeshStandardMaterial?q:X).get(r.envMap||A),l=!0===r.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,u=!!r.normalMap&&!!n.attributes.tangent,c=!!n.morphAttributes.position,h=!!n.morphAttributes.normal,f=!!n.morphAttributes.color,g=r.toneMapped?p.toneMapping:Up,m=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,v=void 0!==m?m.length:0,_=W.get(r),b=d.state.lights;if(!0===L&&(!0===D||e!==B)){var x=e===B&&r.id===w;re.setState(r,e,x)}var C=!1;r.version===_.__version?_.needsLights&&_.lightsStateVersion!==b.state.version||_.outputEncoding!==o||i.isInstancedMesh&&!1===_.instancing?C=!0:i.isInstancedMesh||!0!==_.instancing?i.isSkinnedMesh&&!1===_.skinning?C=!0:i.isSkinnedMesh||!0!==_.skinning?_.envMap!==s||!0===r.fog&&_.fog!==a?C=!0:void 0===_.numClippingPlanes||_.numClippingPlanes===re.numPlanes&&_.numIntersection===re.numIntersection?(_.vertexAlphas!==l||_.vertexTangents!==u||_.morphTargets!==c||_.morphNormals!==h||_.morphColors!==f||_.toneMapping!==g||!0===z.isWebGL2&&_.morphTargetsCount!==v)&&(C=!0):C=!0:C=!0:C=!0:(C=!0,_.__version=r.version);var U=_.currentProgram;!0===C&&(U=Fe(r,t,i));var M=!1,F=!1,T=!1,k=U.getUniforms(),Q=_.uniforms;G.useProgram(U.program)&&(M=!0,F=!0,T=!0);r.id!==w&&(w=r.id,F=!0);if(M||B!==e){if(k.setValue(de,"projectionMatrix",e.projectionMatrix),z.logarithmicDepthBuffer&&k.setValue(de,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),B!==e&&(B=e,F=!0,T=!0),r.isShaderMaterial||r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshStandardMaterial||r.envMap){var R=k.map.cameraPosition;void 0!==R&&R.setValue(de,P.setFromMatrixPosition(e.matrixWorld))}(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&k.setValue(de,"isOrthographic",!0===e.isOrthographicCamera),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial||r.isShadowMaterial||i.isSkinnedMesh)&&k.setValue(de,"viewMatrix",e.matrixWorldInverse)}if(i.isSkinnedMesh){k.setOptional(de,i,"bindMatrix"),k.setOptional(de,i,"bindMatrixInverse");var H=i.skeleton;H&&(z.floatVertexTextures?(null===H.boneTexture&&H.computeBoneTexture(),k.setValue(de,"boneTexture",H.boneTexture,j),k.setValue(de,"boneTextureSize",H.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}var O=n.morphAttributes;(void 0!==O.position||void 0!==O.normal||void 0!==O.color&&!0===z.isWebGL2)&&Ae.update(i,n,r,U);(F||_.receiveShadow!==i.receiveShadow)&&(_.receiveShadow=i.receiveShadow,k.setValue(de,"receiveShadow",i.receiveShadow));r.isMeshGouraudMaterial&&null!==r.envMap&&(Q.envMap.value=s,Q.flipEnvMap.value=s.isCubeTexture&&!1===s.isRenderTargetTexture?-1:1);F&&(k.setValue(de,"toneMappingExposure",p.toneMappingExposure),_.needsLights&&function(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}(Q,T),a&&!0===r.fog&&ee.refreshFogUniforms(Q,a),ee.refreshMaterialUniforms(Q,r,E,S,I),WB.upload(de,_.uniformsList,Q,j));r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(WB.upload(de,_.uniformsList,Q,j),r.uniformsNeedUpdate=!1);r.isSpriteMaterial&&k.setValue(de,"center",i.center);if(k.setValue(de,"modelViewMatrix",i.modelViewMatrix),k.setValue(de,"normalMatrix",i.normalMatrix),k.setValue(de,"modelMatrix",i.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial)for(var V=r.uniformsGroups,K=0,Y=V.length;K<Y;K++)if(z.isWebGL2){var J=V[K];ce.update(J,U),ce.bind(J,U)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.");return U}(e,t,n,r,i);G.setMaterial(r,A);var s=n.index,l=1;!0===r.wireframe&&(s=J.getWireframeAttribute(n),l=2);var u=n.drawRange,c=n.attributes.position,h=u.start*l,f=(u.start+u.count)*l;null!==a&&(h=Math.max(h,a.start*l),f=Math.min(f,(a.start+a.count)*l)),null!==s?(h=Math.max(h,0),f=Math.min(f,s.count)):void 0!==c&&null!==c&&(h=Math.max(h,0),f=Math.min(f,c.count));var g=f-h;if(!(g<0||g===1/0)){var m;ue.setup(i,r,o,n,s);var v=oe;if(null!==s&&(m=Y.get(s),(v=se).setIndex(m)),i.isMesh)!0===r.wireframe?(G.setLineWidth(r.wireframeLinewidth*O()),v.setMode(1)):v.setMode(4);else if(i.isLine){var _=r.linewidth;void 0===_&&(_=1),G.setLineWidth(_*O()),i.isLineSegments?v.setMode(1):i.isLineLoop?v.setMode(2):v.setMode(3)}else i.isPoints?v.setMode(0):i.isSprite&&v.setMode(4);if(i.isInstancedMesh)v.renderInstances(h,g,i.count);else if(n.isInstancedBufferGeometry){var b=void 0!==n._maxInstanceCount?n._maxInstanceCount:1/0,x=Math.min(n.instanceCount,b);v.renderInstances(h,g,x)}else v.render(h,g)}},this.compile=function(e,t){function n(e,t,n){!0===e.transparent&&e.side===Xf&&!1===e.forceSinglePass?(e.side=jf,e.needsUpdate=!0,Fe(e,t,n),e.side=Wf,e.needsUpdate=!0,Fe(e,t,n),e.side=Xf):Fe(e,t,n)}(d=ne.get(e)).init(),f.push(d),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(d.pushLight(e),e.castShadow&&d.pushShadow(e))})),d.setupLights(p.physicallyCorrectLights),e.traverse((function(t){var r=t.material;if(r)if(Array.isArray(r))for(var i=0;i<r.length;i++){n(r[i],e,t)}else n(r,e,t)})),f.pop(),d=null};var _e=null;function be(){Ce.stop()}function xe(){Ce.start()}var Ce=new ow;function Se(e,t,n,r){if(!1!==e.visible){if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)d.pushLight(e),e.castShadow&&d.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||Q.intersectsSprite(e)){r&&P.setFromMatrixPosition(e.matrixWorld).applyMatrix4(R);var i=Z.update(e),a=e.material;a.visible&&c.push(e,i,a,n,P.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==K.render.frame&&(e.skeleton.update(),e.skeleton.frame=K.render.frame),!e.frustumCulled||Q.intersectsObject(e))){r&&P.setFromMatrixPosition(e.matrixWorld).applyMatrix4(R);var A=Z.update(e),o=e.material;if(Array.isArray(o))for(var s=A.groups,l=0,u=s.length;l<u;l++){var h=s[l],f=o[h.materialIndex];f&&f.visible&&c.push(e,A,f,n,P.z,h)}else o.visible&&c.push(e,A,o,n,P.z,null)}for(var p=e.children,g=0,m=p.length;g<m;g++)Se(p[g],t,n,r)}}function Ee(e,t,n,r){var i=e.opaque,a=e.transmissive,o=e.transparent;d.setupLightsView(n),!0===L&&re.setGlobalState(p.clippingPlanes,n),a.length>0&&function(e,t,n){var r=z.isWebGL2;null===I&&(I=new jm(1,1,{generateMipmaps:!0,type:V.has("EXT_color_buffer_half_float")?tg:Xp,minFilter:jp,samples:r&&!0===A?4:0}));p.getDrawingBufferSize(H),r?I.setSize(H.x,H.y):I.setSize(wm(H.x),wm(H.y));var i=p.getRenderTarget();p.setRenderTarget(I),p.clear();var a=p.toneMapping;p.toneMapping=Up,Ue(e,t,n),p.toneMapping=a,j.updateMultisampleRenderTarget(I),j.updateRenderTargetMipmap(I),p.setRenderTarget(i)}(i,t,n),r&&G.viewport(_.copy(r)),i.length>0&&Ue(i,t,n),a.length>0&&Ue(a,t,n),o.length>0&&Ue(o,t,n),G.buffers.depth.setTest(!0),G.buffers.depth.setMask(!0),G.buffers.color.setMask(!0),G.setPolygonOffset(!1)}function Ue(e,t,n){for(var r=!0===t.isScene?t.overrideMaterial:null,i=0,a=e.length;i<a;i++){var A=e[i],o=A.object,s=A.geometry,l=null===r?A.material:r,u=A.group;o.layers.test(n.layers)&&Me(o,t,n,s,l,u)}}function Me(e,t,n,r,i,a){e.onBeforeRender(p,t,n,r,i,a),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),i.onBeforeRender(p,t,n,r,e,a),!0===i.transparent&&i.side===Xf&&!1===i.forceSinglePass?(i.side=jf,i.needsUpdate=!0,p.renderBufferDirect(n,t,r,i,e,a),i.side=Wf,i.needsUpdate=!0,p.renderBufferDirect(n,t,r,i,e,a),i.side=Xf):p.renderBufferDirect(n,t,r,i,e,a),e.onAfterRender(p,t,n,r,i,a)}function Fe(e,t,n){!0!==t.isScene&&(t=N);var r=W.get(e),i=d.state.lights,a=d.state.shadowsArray,A=i.state.version,o=$.getParameters(e,i.state,a,t,n),s=$.getProgramCacheKey(o),l=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=(e.isMeshStandardMaterial?q:X).get(e.envMap||r.environment),void 0===l&&(e.addEventListener("dispose",Be),l=new Map,r.programs=l);var u=l.get(s);if(void 0!==u){if(r.currentProgram===u&&r.lightsStateVersion===A)return Te(e,o),u}else o.uniforms=$.getUniforms(e),e.onBuild(n,o,p),e.onBeforeCompile(o,p),u=$.acquireProgram(o,s),l.set(s,u),r.uniforms=o.uniforms;var c=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(c.clippingPlanes=re.uniform),Te(e,o),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=A,r.needsLights&&(c.ambientLightColor.value=i.state.ambient,c.lightProbe.value=i.state.probe,c.directionalLights.value=i.state.directional,c.directionalLightShadows.value=i.state.directionalShadow,c.spotLights.value=i.state.spot,c.spotLightShadows.value=i.state.spotShadow,c.rectAreaLights.value=i.state.rectArea,c.ltc_1.value=i.state.rectAreaLTC1,c.ltc_2.value=i.state.rectAreaLTC2,c.pointLights.value=i.state.point,c.pointLightShadows.value=i.state.pointShadow,c.hemisphereLights.value=i.state.hemi,c.directionalShadowMap.value=i.state.directionalShadowMap,c.directionalShadowMatrix.value=i.state.directionalShadowMatrix,c.spotShadowMap.value=i.state.spotShadowMap,c.spotLightMatrix.value=i.state.spotLightMatrix,c.spotLightMap.value=i.state.spotLightMap,c.pointShadowMap.value=i.state.pointShadowMap,c.pointShadowMatrix.value=i.state.pointShadowMatrix);var h=u.getUniforms(),f=WB.seqWithValue(h.seq,c);return r.currentProgram=u,r.uniformsList=f,u}function Te(e,t){var n=W.get(e);n.outputEncoding=t.outputEncoding,n.instancing=t.instancing,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}Ce.setAnimationLoop((function(e){_e&&_e(e)})),"undefined"!==typeof self&&Ce.setContext(self),this.setAnimationLoop=function(e){_e=e,me.setAnimationLoop(e),null===e?Ce.stop():Ce.start()},me.addEventListener("sessionstart",be),me.addEventListener("sessionend",xe),this.render=function(e,t){if(void 0===t||!0===t.isCamera){if(!0!==g){!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),!0===me.enabled&&!0===me.isPresenting&&(!0===me.cameraAutoUpdate&&me.updateCamera(t),t=me.getCamera()),!0===e.isScene&&e.onBeforeRender(p,e,t,y),(d=ne.get(e,f.length)).init(),f.push(d),R.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),Q.setFromProjectionMatrix(R),D=this.localClippingEnabled,L=re.init(this.clippingPlanes,D),(c=te.get(e,h.length)).init(),h.push(c),Se(e,t,0,p.sortObjects),c.finish(),!0===p.sortObjects&&c.sort(U,M),!0===L&&re.beginShadows();var n=d.state.shadowsArray;if(ie.render(n,e,t),!0===L&&re.endShadows(),!0===this.info.autoReset&&this.info.reset(),ae.render(c,e),d.setupLights(p.physicallyCorrectLights),t.isArrayCamera)for(var r=t.cameras,i=0,a=r.length;i<a;i++){var A=r[i];Ee(c,e,A,A.viewport)}else Ee(c,e,t);null!==y&&(j.updateMultisampleRenderTarget(y),j.updateRenderTargetMipmap(y)),!0===e.isScene&&e.onAfterRender(p,e,t),ue.resetDefaultState(),w=-1,B=null,f.pop(),d=f.length>0?f[f.length-1]:null,h.pop(),c=h.length>0?h[h.length-1]:null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.getActiveCubeFace=function(){return m},this.getActiveMipmapLevel=function(){return v},this.getRenderTarget=function(){return y},this.setRenderTargetTextures=function(e,t,n){W.get(e.texture).__webglTexture=t,W.get(e.depthTexture).__webglTexture=n;var r=W.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||!0===V.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),r.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){var n=W.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;y=e,m=t,v=n;var r=!0,i=null,a=!1,A=!1;if(e){var o=W.get(e);void 0!==o.__useDefaultFramebuffer?(G.bindFramebuffer(36160,null),r=!1):void 0===o.__webglFramebuffer?j.setupRenderTarget(e):o.__hasExternalTextures&&j.rebindTextures(e,W.get(e.texture).__webglTexture,W.get(e.depthTexture).__webglTexture);var s=e.texture;(s.isData3DTexture||s.isDataArrayTexture||s.isCompressedArrayTexture)&&(A=!0);var l=W.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(i=l[t],a=!0):i=z.isWebGL2&&e.samples>0&&!1===j.useMultisampledRTT(e)?W.get(e).__webglMultisampledFramebuffer:l,_.copy(e.viewport),b.copy(e.scissor),x=e.scissorTest}else _.copy(F).multiplyScalar(E).floor(),b.copy(T).multiplyScalar(E).floor(),x=k;if(G.bindFramebuffer(36160,i)&&z.drawBuffers&&r&&G.drawBuffers(e,i),G.viewport(_),G.scissor(b),G.setScissorTest(x),a){var u=W.get(e.texture);de.framebufferTexture2D(36160,36064,34069+t,u.__webglTexture,n)}else if(A){var c=W.get(e.texture),d=t||0;de.framebufferTextureLayer(36160,36064,c.__webglTexture,n||0,d)}w=-1},this.readRenderTargetPixels=function(e,t,n,r,i,a,A){if(e&&e.isWebGLRenderTarget){var o=W.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==A&&(o=o[A]),o){G.bindFramebuffer(36160,o);try{var s=e.texture,l=s.format,u=s.type;if(l!==Ag&&le.convert(l)!==de.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");var c=u===tg&&(V.has("EXT_color_buffer_half_float")||z.isWebGL2&&V.has("EXT_color_buffer_float"));if(u!==Xp&&le.convert(u)!==de.getParameter(35738)&&(u!==eg||!(z.isWebGL2||V.has("OES_texture_float")||V.has("WEBGL_color_buffer_float")))&&!c)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&de.readPixels(t,n,r,i,le.convert(l),le.convert(u),a)}finally{var d=null!==y?W.get(y).__webglFramebuffer:null;G.bindFramebuffer(36160,d)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Math.pow(2,-n),i=Math.floor(t.image.width*r),a=Math.floor(t.image.height*r);j.setTexture2D(t,0),de.copyTexSubImage2D(3553,n,0,0,e.x,e.y,i,a),G.unbindTexture()},this.copyTextureToTexture=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=t.image.width,a=t.image.height,A=le.convert(n.format),o=le.convert(n.type);j.setTexture2D(n,0),de.pixelStorei(37440,n.flipY),de.pixelStorei(37441,n.premultiplyAlpha),de.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?de.texSubImage2D(3553,r,e.x,e.y,i,a,A,o,t.image.data):t.isCompressedTexture?de.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,A,t.mipmaps[0].data):de.texSubImage2D(3553,r,e.x,e.y,A,o,t.image),0===r&&n.generateMipmaps&&de.generateMipmap(3553),G.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(p.isWebGL1Renderer)console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");else{var a,A=e.max.x-e.min.x+1,o=e.max.y-e.min.y+1,s=e.max.z-e.min.z+1,l=le.convert(r.format),u=le.convert(r.type);if(r.isData3DTexture)j.setTexture3D(r,0),a=32879;else{if(!r.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");j.setTexture2DArray(r,0),a=35866}de.pixelStorei(37440,r.flipY),de.pixelStorei(37441,r.premultiplyAlpha),de.pixelStorei(3317,r.unpackAlignment);var c=de.getParameter(3314),d=de.getParameter(32878),h=de.getParameter(3316),f=de.getParameter(3315),g=de.getParameter(32877),m=n.isCompressedTexture?n.mipmaps[0]:n.image;de.pixelStorei(3314,m.width),de.pixelStorei(32878,m.height),de.pixelStorei(3316,e.min.x),de.pixelStorei(3315,e.min.y),de.pixelStorei(32877,e.min.z),n.isDataTexture||n.isData3DTexture?de.texSubImage3D(a,i,t.x,t.y,t.z,A,o,s,l,u,m.data):n.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),de.compressedTexSubImage3D(a,i,t.x,t.y,t.z,A,o,s,l,m.data)):de.texSubImage3D(a,i,t.x,t.y,t.z,A,o,s,l,u,m),de.pixelStorei(3314,c),de.pixelStorei(32878,d),de.pixelStorei(3316,h),de.pixelStorei(3315,f),de.pixelStorei(32877,g),0===i&&r.generateMipmaps&&de.generateMipmap(a),G.unbindTexture()}},this.initTexture=function(e){e.isCubeTexture?j.setTextureCube(e,0):e.isData3DTexture?j.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?j.setTexture2DArray(e,0):j.setTexture2D(e,0),G.unbindTexture()},this.resetState=function(){m=0,v=0,y=null,G.reset(),ue.reset()},"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}var O_=function(e){x(n,e);var t=U(n);function n(){return y(this,n),t.apply(this,arguments)}return _(n)}(N_);O_.prototype.isWebGL1Renderer=!0;var V_=function(e){x(n,e);var t=U(n);function n(){var e;return y(this,n),(e=t.call(this)).isScene=!0,e.type="Scene",e.background=null,e.environment=null,e.fog=null,e.backgroundBlurriness=0,e.backgroundIntensity=1,e.overrideMaterial=null,"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:E(e)})),e}return _(n,[{key:"copy",value:function(e,t){return ed(C(n.prototype),"copy",this).call(this,e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}},{key:"toJSON",value:function(e){var t=ed(C(n.prototype),"toJSON",this).call(this,e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}},{key:"autoUpdate",get:function(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate},set:function(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}}]),n}(Zv);var z_=function(e){x(n,e);var t=U(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,A=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,l=arguments.length>6?arguments[6]:void 0,u=arguments.length>7?arguments[7]:void 0,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:Vp,d=arguments.length>9&&void 0!==arguments[9]?arguments[9]:Vp,h=arguments.length>10?arguments[10]:void 0,f=arguments.length>11?arguments[11]:void 0;return y(this,n),(e=t.call(this,null,s,l,u,c,d,A,o,h,f)).isDataTexture=!0,e.image={data:r,width:i,height:a},e.generateMipmaps=!1,e.flipY=!1,e.unpackAlignment=1,e}return _(n)}(Km),G_=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),(r=t.call(this)).isLineBasicMaterial=!0,r.type="LineBasicMaterial",r.color=new Nm(16777215),r.linewidth=1,r.linecap="round",r.linejoin="round",r.fog=!0,r.setValues(e),r}return _(n,[{key:"copy",value:function(e){return ed(C(n.prototype),"copy",this).call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}]),n}(cy),K_=new Jm,W_=new Jm,j_=new Ev,X_=new Sv,q_=new vv,Y_=function(e){x(n,e);var t=U(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Sy,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new G_;return y(this,n),(e=t.call(this)).isLine=!0,e.type="Line",e.geometry=r,e.material=i,e.updateMorphTargets(),e}return _(n,[{key:"copy",value:function(e,t){return ed(C(n.prototype),"copy",this).call(this,e,t),this.material=e.material,this.geometry=e.geometry,this}},{key:"computeLineDistances",value:function(){var e=this.geometry;if(null===e.index){for(var t=e.attributes.position,n=[0],r=1,i=t.count;r<i;r++)K_.fromBufferAttribute(t,r-1),W_.fromBufferAttribute(t,r),n[r]=n[r-1],n[r]+=K_.distanceTo(W_);e.setAttribute("lineDistance",new vy(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}},{key:"raycast",value:function(e,t){var n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),q_.copy(n.boundingSphere),q_.applyMatrix4(r),q_.radius+=i,!1!==e.ray.intersectsSphere(q_)){j_.copy(r).invert(),X_.copy(e.ray).applyMatrix4(j_);var A=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=A*A,s=new Jm,l=new Jm,u=new Jm,c=new Jm,d=this.isLineSegments?2:1,h=n.index,f=n.attributes.position;if(null!==h)for(var p=Math.max(0,a.start),g=Math.min(h.count,a.start+a.count)-1;p<g;p+=d){var m=h.getX(p),v=h.getX(p+1);if(s.fromBufferAttribute(f,m),l.fromBufferAttribute(f,v),!(X_.distanceSqToSegment(s,l,c,u)>o)){c.applyMatrix4(this.matrixWorld);var y=e.ray.origin.distanceTo(c);y<e.near||y>e.far||t.push({distance:y,point:u.clone().applyMatrix4(this.matrixWorld),index:p,face:null,faceIndex:null,object:this})}}else for(var w=Math.max(0,a.start),B=Math.min(f.count,a.start+a.count)-1;w<B;w+=d){if(s.fromBufferAttribute(f,w),l.fromBufferAttribute(f,w+1),!(X_.distanceSqToSegment(s,l,c,u)>o)){c.applyMatrix4(this.matrixWorld);var _=e.ray.origin.distanceTo(c);_<e.near||_>e.far||t.push({distance:_,point:u.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}}}},{key:"updateMorphTargets",value:function(){var e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){var n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var r=0,i=n.length;r<i;r++){var a=n[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}}]),n}(Zv),J_=new Jm,Z_=new Jm,$_=function(e){x(n,e);var t=U(n);function n(e,r){var i;return y(this,n),(i=t.call(this,e,r)).isLineSegments=!0,i.type="LineSegments",i}return _(n,[{key:"computeLineDistances",value:function(){var e=this.geometry;if(null===e.index){for(var t=e.attributes.position,n=[],r=0,i=t.count;r<i;r+=2)J_.fromBufferAttribute(t,r),Z_.fromBufferAttribute(t,r+1),n[r]=0===r?0:n[r-1],n[r+1]=n[r]+J_.distanceTo(Z_);e.setAttribute("lineDistance",new vy(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}]),n}(Y_),eb=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),(r=t.call(this)).isPointsMaterial=!0,r.type="PointsMaterial",r.color=new Nm(16777215),r.map=null,r.alphaMap=null,r.size=1,r.sizeAttenuation=!0,r.fog=!0,r.setValues(e),r}return _(n,[{key:"copy",value:function(e){return ed(C(n.prototype),"copy",this).call(this,e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}]),n}(cy),tb=new Ev,nb=new Sv,rb=new vv,ib=new Jm,ab=function(e){x(n,e);var t=U(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Sy,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new eb;return y(this,n),(e=t.call(this)).isPoints=!0,e.type="Points",e.geometry=r,e.material=i,e.updateMorphTargets(),e}return _(n,[{key:"copy",value:function(e,t){return ed(C(n.prototype),"copy",this).call(this,e,t),this.material=e.material,this.geometry=e.geometry,this}},{key:"raycast",value:function(e,t){var n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),rb.copy(n.boundingSphere),rb.applyMatrix4(r),rb.radius+=i,!1!==e.ray.intersectsSphere(rb)){tb.copy(r).invert(),nb.copy(e.ray).applyMatrix4(tb);var A=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=A*A,s=n.index,l=n.attributes.position;if(null!==s)for(var u=Math.max(0,a.start),c=Math.min(s.count,a.start+a.count);u<c;u++){var d=s.getX(u);ib.fromBufferAttribute(l,d),Ab(ib,d,o,r,e,t,this)}else for(var h=Math.max(0,a.start),f=Math.min(l.count,a.start+a.count);h<f;h++)ib.fromBufferAttribute(l,h),Ab(ib,h,o,r,e,t,this)}}},{key:"updateMorphTargets",value:function(){var e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){var n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var r=0,i=n.length;r<i;r++){var a=n[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}}]),n}(Zv);function Ab(e,t,n,r,i,a,A){var o=nb.distanceSqToPoint(e);if(o<n){var s=new Jm;nb.closestPointToPoint(e,s),s.applyMatrix4(r);var l=i.ray.origin.distanceTo(s);if(l<i.near||l>i.far)return;a.push({distance:l,distanceToRay:Math.sqrt(o),point:s,index:t,face:null,object:A})}}var ob=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),(r=t.call(this)).isMeshPhongMaterial=!0,r.type="MeshPhongMaterial",r.color=new Nm(16777215),r.specular=new Nm(1118481),r.shininess=30,r.map=null,r.lightMap=null,r.lightMapIntensity=1,r.aoMap=null,r.aoMapIntensity=1,r.emissive=new Nm(0),r.emissiveIntensity=1,r.emissiveMap=null,r.bumpMap=null,r.bumpScale=1,r.normalMap=null,r.normalMapType=tm,r.normalScale=new xm(1,1),r.displacementMap=null,r.displacementScale=1,r.displacementBias=0,r.specularMap=null,r.alphaMap=null,r.envMap=null,r.combine=Cp,r.reflectivity=1,r.refractionRatio=.98,r.wireframe=!1,r.wireframeLinewidth=1,r.wireframeLinecap="round",r.wireframeLinejoin="round",r.flatShading=!1,r.fog=!0,r.setValues(e),r}return _(n,[{key:"copy",value:function(e){return ed(C(n.prototype),"copy",this).call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}]),n}(cy);function sb(e,t,n){return ub(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)}function lb(e,t,n){return!e||!n&&e.constructor===t?e:"number"===typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)}function ub(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var cb=function(){function e(t,n,r,i){y(this,e),this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==i?i:new n.constructor(r),this.sampleValues=n,this.valueSize=r,this.settings=null,this.DefaultSettings_={}}return _(e,[{key:"evaluate",value:function(e){var t=this.parameterPositions,n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{var a;n:{r:if(!(e<r)){for(var A=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===A)break;if(i=r,e<(r=t[++n]))break t}a=t.length;break n}if(e>=i)break e;var o=t[1];e<o&&(n=2,i=o);for(var s=n-2;;){if(void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(n===s)break;if(r=i,e>=(i=t[--n-1]))break t}a=n,n=0}for(;n<a;){var l=n+a>>>1;e<t[l]?a=l:n=l+1}if(r=t[n],void 0===(i=t[n-1]))return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===r)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)}},{key:"getSettings_",value:function(){return this.settings||this.DefaultSettings_}},{key:"copySampleValue_",value:function(e){for(var t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r,a=0;a!==r;++a)t[a]=n[i+a];return t}},{key:"interpolate_",value:function(){throw new Error("call to abstract method")}},{key:"intervalChanged_",value:function(){}}]),e}(),db=function(e){x(n,e);var t=U(n);function n(e,r,i,a){var A;return y(this,n),(A=t.call(this,e,r,i,a))._weightPrev=-0,A._offsetPrev=-0,A._weightNext=-0,A._offsetNext=-0,A.DefaultSettings_={endingStart:qg,endingEnd:qg},A}return _(n,[{key:"intervalChanged_",value:function(e,t,n){var r=this.parameterPositions,i=e-2,a=e+1,A=r[i],o=r[a];if(void 0===A)switch(this.getSettings_().endingStart){case Yg:i=e,A=2*t-n;break;case Jg:A=t+r[i=r.length-2]-r[i+1];break;default:i=e,A=n}if(void 0===o)switch(this.getSettings_().endingEnd){case Yg:a=e,o=2*n-t;break;case Jg:a=1,o=n+r[1]-r[0];break;default:a=e-1,o=t}var s=.5*(n-t),l=this.valueSize;this._weightPrev=s/(t-A),this._weightNext=s/(o-n),this._offsetPrev=i*l,this._offsetNext=a*l}},{key:"interpolate_",value:function(e,t,n,r){for(var i=this.resultBuffer,a=this.sampleValues,A=this.valueSize,o=e*A,s=o-A,l=this._offsetPrev,u=this._offsetNext,c=this._weightPrev,d=this._weightNext,h=(n-t)/(r-t),f=h*h,p=f*h,g=-c*p+2*c*f-c*h,m=(1+c)*p+(-1.5-2*c)*f+(-.5+c)*h+1,v=(-1-d)*p+(1.5+d)*f+.5*h,y=d*p-d*f,w=0;w!==A;++w)i[w]=g*a[l+w]+m*a[s+w]+v*a[o+w]+y*a[u+w];return i}}]),n}(cb),hb=function(e){x(n,e);var t=U(n);function n(e,r,i,a){return y(this,n),t.call(this,e,r,i,a)}return _(n,[{key:"interpolate_",value:function(e,t,n,r){for(var i=this.resultBuffer,a=this.sampleValues,A=this.valueSize,o=e*A,s=o-A,l=(n-t)/(r-t),u=1-l,c=0;c!==A;++c)i[c]=a[s+c]*u+a[o+c]*l;return i}}]),n}(cb),fb=function(e){x(n,e);var t=U(n);function n(e,r,i,a){return y(this,n),t.call(this,e,r,i,a)}return _(n,[{key:"interpolate_",value:function(e){return this.copySampleValue_(e-1)}}]),n}(cb),pb=function(){function e(t,n,r,i){if(y(this,e),void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===n||0===n.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=lb(n,this.TimeBufferType),this.values=lb(r,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}return _(e,[{key:"InterpolantFactoryMethodDiscrete",value:function(e){return new fb(this.times,this.values,this.getValueSize(),e)}},{key:"InterpolantFactoryMethodLinear",value:function(e){return new hb(this.times,this.values,this.getValueSize(),e)}},{key:"InterpolantFactoryMethodSmooth",value:function(e){return new db(this.times,this.values,this.getValueSize(),e)}},{key:"setInterpolation",value:function(e){var t;switch(e){case Wg:t=this.InterpolantFactoryMethodDiscrete;break;case jg:t=this.InterpolantFactoryMethodLinear;break;case Xg:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this}},{key:"getInterpolation",value:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Wg;case this.InterpolantFactoryMethodLinear:return jg;case this.InterpolantFactoryMethodSmooth:return Xg}}},{key:"getValueSize",value:function(){return this.values.length/this.times.length}},{key:"shift",value:function(e){if(0!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]+=e;return this}},{key:"scale",value:function(e){if(1!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]*=e;return this}},{key:"trim",value:function(e,t){for(var n=this.times,r=n.length,i=0,a=r-1;i!==r&&n[i]<e;)++i;for(;-1!==a&&n[a]>t;)--a;if(++a,0!==i||a!==r){i>=a&&(i=(a=Math.max(a,1))-1);var A=this.getValueSize();this.times=sb(n,i,a),this.values=sb(this.values,i*A,a*A)}return this}},{key:"validate",value:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var a=null,A=0;A!==i;A++){var o=n[A];if("number"===typeof o&&isNaN(o)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,A,o),e=!1;break}if(null!==a&&a>o){console.error("THREE.KeyframeTrack: Out of order keys.",this,A,o,a),e=!1;break}a=o}if(void 0!==r&&ub(r))for(var s=0,l=r.length;s!==l;++s){var u=r[s];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,u),e=!1;break}}return e}},{key:"optimize",value:function(){for(var e=sb(this.times),t=sb(this.values),n=this.getValueSize(),r=this.getInterpolation()===Xg,i=e.length-1,a=1,A=1;A<i;++A){var o=!1,s=e[A];if(s!==e[A+1]&&(1!==A||s!==e[0]))if(r)o=!0;else for(var l=A*n,u=l-n,c=l+n,d=0;d!==n;++d){var h=t[l+d];if(h!==t[u+d]||h!==t[c+d]){o=!0;break}}if(o){if(A!==a){e[a]=e[A];for(var f=A*n,p=a*n,g=0;g!==n;++g)t[p+g]=t[f+g]}++a}}if(i>0){e[a]=e[i];for(var m=i*n,v=a*n,y=0;y!==n;++y)t[v+y]=t[m+y];++a}return a!==e.length?(this.times=sb(e,0,a),this.values=sb(t,0,a*n)):(this.times=e,this.values=t),this}},{key:"clone",value:function(){var e=sb(this.times,0),t=sb(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}],[{key:"toJSON",value:function(e){var t,n=e.constructor;if(n.toJSON!==this.toJSON)t=n.toJSON(e);else{t={name:e.name,times:lb(e.times,Array),values:lb(e.values,Array)};var r=e.getInterpolation();r!==e.DefaultInterpolation&&(t.interpolation=r)}return t.type=e.ValueTypeName,t}}]),e}();pb.prototype.TimeBufferType=Float32Array,pb.prototype.ValueBufferType=Float32Array,pb.prototype.DefaultInterpolation=jg;var gb=function(e){x(n,e);var t=U(n);function n(){return y(this,n),t.apply(this,arguments)}return _(n)}(pb);gb.prototype.ValueTypeName="bool",gb.prototype.ValueBufferType=Array,gb.prototype.DefaultInterpolation=Wg,gb.prototype.InterpolantFactoryMethodLinear=void 0,gb.prototype.InterpolantFactoryMethodSmooth=void 0;var mb=function(e){x(n,e);var t=U(n);function n(){return y(this,n),t.apply(this,arguments)}return _(n)}(pb);mb.prototype.ValueTypeName="color";var vb=function(e){x(n,e);var t=U(n);function n(){return y(this,n),t.apply(this,arguments)}return _(n)}(pb);vb.prototype.ValueTypeName="number";var yb=function(e){x(n,e);var t=U(n);function n(e,r,i,a){return y(this,n),t.call(this,e,r,i,a)}return _(n,[{key:"interpolate_",value:function(e,t,n,r){for(var i=this.resultBuffer,a=this.sampleValues,A=this.valueSize,o=(n-t)/(r-t),s=e*A,l=s+A;s!==l;s+=4)Ym.slerpFlat(i,0,a,s-A,a,s,o);return i}}]),n}(cb),wb=function(e){x(n,e);var t=U(n);function n(){return y(this,n),t.apply(this,arguments)}return _(n,[{key:"InterpolantFactoryMethodLinear",value:function(e){return new yb(this.times,this.values,this.getValueSize(),e)}}]),n}(pb);wb.prototype.ValueTypeName="quaternion",wb.prototype.DefaultInterpolation=jg,wb.prototype.InterpolantFactoryMethodSmooth=void 0;var Bb=function(e){x(n,e);var t=U(n);function n(){return y(this,n),t.apply(this,arguments)}return _(n)}(pb);Bb.prototype.ValueTypeName="string",Bb.prototype.ValueBufferType=Array,Bb.prototype.DefaultInterpolation=Wg,Bb.prototype.InterpolantFactoryMethodLinear=void 0,Bb.prototype.InterpolantFactoryMethodSmooth=void 0;var _b=function(e){x(n,e);var t=U(n);function n(){return y(this,n),t.apply(this,arguments)}return _(n)}(pb);_b.prototype.ValueTypeName="vector";var bb={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}},xb=_((function e(t,n,r){y(this,e);var i=this,a=!1,A=0,o=0,s=void 0,l=[];this.onStart=void 0,this.onLoad=t,this.onProgress=n,this.onError=r,this.itemStart=function(e){o++,!1===a&&void 0!==i.onStart&&i.onStart(e,A,o),a=!0},this.itemEnd=function(e){A++,void 0!==i.onProgress&&i.onProgress(e,A,o),A===o&&(a=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(e){void 0!==i.onError&&i.onError(e)},this.resolveURL=function(e){return s?s(e):e},this.setURLModifier=function(e){return s=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){var t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(var t=0,n=l.length;t<n;t+=2){var r=l[t],i=l[t+1];if(r.global&&(r.lastIndex=0),r.test(e))return i}return null}})),Cb=new xb,Sb=function(){function e(t){y(this,e),this.manager=void 0!==t?t:Cb,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}return _(e,[{key:"load",value:function(){}},{key:"loadAsync",value:function(e,t){var n=this;return new Promise((function(r,i){n.load(e,r,t,i)}))}},{key:"parse",value:function(){}},{key:"setCrossOrigin",value:function(e){return this.crossOrigin=e,this}},{key:"setWithCredentials",value:function(e){return this.withCredentials=e,this}},{key:"setPath",value:function(e){return this.path=e,this}},{key:"setResourcePath",value:function(e){return this.resourcePath=e,this}},{key:"setRequestHeader",value:function(e){return this.requestHeader=e,this}}]),e}(),Eb={},Ub=function(e){x(n,e);var t=U(n);function n(e,r){var i;return y(this,n),(i=t.call(this,e)).response=r,i}return _(n)}(T(Error)),Mb=function(e){x(n,e);var t=U(n);function n(e){return y(this,n),t.call(this,e)}return _(n,[{key:"load",value:function(e,t,n,r){var i=this;void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var a=bb.get(e);if(void 0!==a)return this.manager.itemStart(e),setTimeout((function(){t&&t(a),i.manager.itemEnd(e)}),0),a;if(void 0===Eb[e]){Eb[e]=[],Eb[e].push({onLoad:t,onProgress:n,onError:r});var A=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),o=this.mimeType,s=this.responseType;fetch(A).then((function(t){if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"===typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;var n=Eb[e],r=t.body.getReader(),i=t.headers.get("Content-Length")||t.headers.get("X-File-Size"),a=i?parseInt(i):0,A=0!==a,o=0,s=new ReadableStream({start:function(e){!function t(){r.read().then((function(r){var i=r.done,s=r.value;if(i)e.close();else{o+=s.byteLength;for(var l=new ProgressEvent("progress",{lengthComputable:A,loaded:o,total:a}),u=0,c=n.length;u<c;u++){var d=n[u];d.onProgress&&d.onProgress(l)}e.enqueue(s),t()}}))}()}});return new Response(s)}throw new Ub('fetch for "'.concat(t.url,'" responded with ').concat(t.status,": ").concat(t.statusText),t)})).then((function(e){switch(s){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((function(e){return(new DOMParser).parseFromString(e,o)}));case"json":return e.json();default:if(void 0===o)return e.text();var t=/charset="?([^;"\s]*)"?/i.exec(o),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then((function(e){return r.decode(e)}))}})).then((function(t){bb.add(e,t);var n=Eb[e];delete Eb[e];for(var r=0,i=n.length;r<i;r++){var a=n[r];a.onLoad&&a.onLoad(t)}})).catch((function(t){var n=Eb[e];if(void 0===n)throw i.manager.itemError(e),t;delete Eb[e];for(var r=0,a=n.length;r<a;r++){var A=n[r];A.onError&&A.onError(t)}i.manager.itemError(e)})).finally((function(){i.manager.itemEnd(e)})),this.manager.itemStart(e)}else Eb[e].push({onLoad:t,onProgress:n,onError:r})}},{key:"setResponseType",value:function(e){return this.responseType=e,this}},{key:"setMimeType",value:function(e){return this.mimeType=e,this}}]),n}(Sb),Fb=function(e){x(n,e);var t=U(n);function n(e){return y(this,n),t.call(this,e)}return _(n,[{key:"load",value:function(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,a=bb.get(e);if(void 0!==a)return i.manager.itemStart(e),setTimeout((function(){t&&t(a),i.manager.itemEnd(e)}),0),a;var A=Um("img");function o(){l(),bb.add(e,this),t&&t(this),i.manager.itemEnd(e)}function s(t){l(),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}function l(){A.removeEventListener("load",o,!1),A.removeEventListener("error",s,!1)}return A.addEventListener("load",o,!1),A.addEventListener("error",s,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(A.crossOrigin=this.crossOrigin),i.manager.itemStart(e),A.src=e,A}}]),n}(Sb),Tb=function(e){x(n,e);var t=U(n);function n(e){return y(this,n),t.call(this,e)}return _(n,[{key:"load",value:function(e,t,n,r){var i=this,a=new z_,A=new Mb(this.manager);return A.setResponseType("arraybuffer"),A.setRequestHeader(this.requestHeader),A.setPath(this.path),A.setWithCredentials(i.withCredentials),A.load(e,(function(e){var n=i.parse(e);n&&(void 0!==n.image?a.image=n.image:void 0!==n.data&&(a.image.width=n.width,a.image.height=n.height,a.image.data=n.data),a.wrapS=void 0!==n.wrapS?n.wrapS:Np,a.wrapT=void 0!==n.wrapT?n.wrapT:Np,a.magFilter=void 0!==n.magFilter?n.magFilter:Kp,a.minFilter=void 0!==n.minFilter?n.minFilter:Kp,a.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.encoding&&(a.encoding=n.encoding),void 0!==n.flipY&&(a.flipY=n.flipY),void 0!==n.format&&(a.format=n.format),void 0!==n.type&&(a.type=n.type),void 0!==n.mipmaps&&(a.mipmaps=n.mipmaps,a.minFilter=jp),1===n.mipmapCount&&(a.minFilter=Kp),void 0!==n.generateMipmaps&&(a.generateMipmaps=n.generateMipmaps),a.needsUpdate=!0,t&&t(a,n))}),n,r),a}}]),n}(Sb),kb=function(e){x(n,e);var t=U(n);function n(e){return y(this,n),t.call(this,e)}return _(n,[{key:"load",value:function(e,t,n,r){var i=new Km,a=new Fb(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,(function(e){i.image=e,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}]),n}(Sb),Qb=function(e){x(n,e);var t=U(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return y(this,n),(r=t.call(this)).isLight=!0,r.type="Light",r.color=new Nm(e),r.intensity=i,r}return _(n,[{key:"dispose",value:function(){}},{key:"copy",value:function(e,t){return ed(C(n.prototype),"copy",this).call(this,e,t),this.color.copy(e.color),this.intensity=e.intensity,this}},{key:"toJSON",value:function(e){var t=ed(C(n.prototype),"toJSON",this).call(this,e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}]),n}(Zv),Lb=new Ev,Db=new Jm,Ib=new Jm,Rb=function(){function e(t){y(this,e),this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xm(512,512),this.map=null,this.mapPass=null,this.matrix=new Ev,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Aw,this._frameExtents=new xm(1,1),this._viewportCount=1,this._viewports=[new Wm(0,0,1,1)]}return _(e,[{key:"getViewportCount",value:function(){return this._viewportCount}},{key:"getFrustum",value:function(){return this._frustum}},{key:"updateMatrices",value:function(e){var t=this.camera,n=this.matrix;Db.setFromMatrixPosition(e.matrixWorld),t.position.copy(Db),Ib.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Ib),t.updateMatrixWorld(),Lb.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Lb),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Lb)}},{key:"getViewport",value:function(e){return this._viewports[e]}},{key:"getFrameExtents",value:function(){return this._frameExtents}},{key:"dispose",value:function(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}},{key:"copy",value:function(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"toJSON",value:function(){var e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}]),e}(),Hb=function(e){x(n,e);var t=U(n);function n(){var e;return y(this,n),(e=t.call(this,new ww(-5,5,5,-5,.5,500))).isDirectionalLightShadow=!0,e}return _(n)}(Rb),Pb=function(e){x(n,e);var t=U(n);function n(e,r){var i;return y(this,n),(i=t.call(this,e,r)).isDirectionalLight=!0,i.type="DirectionalLight",i.position.copy(Zv.DEFAULT_UP),i.updateMatrix(),i.target=new Zv,i.shadow=new Hb,i}return _(n,[{key:"dispose",value:function(){this.shadow.dispose()}},{key:"copy",value:function(e){return ed(C(n.prototype),"copy",this).call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}]),n}(Qb),Nb=function(){function e(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];y(this,e),this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}return _(e,[{key:"start",value:function(){this.startTime=Ob(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}},{key:"stop",value:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}},{key:"getElapsedTime",value:function(){return this.getDelta(),this.elapsedTime}},{key:"getDelta",value:function(){var e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var t=Ob();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}]),e}();function Ob(){return("undefined"===typeof performance?Date:performance).now()}var Vb="\\[\\]\\.:\\/",zb=new RegExp("["+Vb+"]","g"),Gb="[^"+Vb+"]",Kb="[^"+Vb.replace("\\.","")+"]",Wb=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",Gb)+/(WCOD+)?/.source.replace("WCOD",Kb)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Gb)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Gb)+"$"),jb=["material","materials","bones","map"],Xb=function(){function e(t,n,r){y(this,e);var i=r||qb.parseTrackName(n);this._targetGroup=t,this._bindings=t.subscribe_(n,i)}return _(e,[{key:"getValue",value:function(e,t){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}},{key:"setValue",value:function(e,t){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}},{key:"bind",value:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}},{key:"unbind",value:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}]),e}(),qb=function(){function e(t,n,r){y(this,e),this.path=n,this.parsedPath=r||e.parseTrackName(n),this.node=e.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}return _(e,[{key:"_getValue_unavailable",value:function(){}},{key:"_setValue_unavailable",value:function(){}},{key:"_getValue_direct",value:function(e,t){e[t]=this.targetObject[this.propertyName]}},{key:"_getValue_array",value:function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)e[t++]=n[r]}},{key:"_getValue_arrayElement",value:function(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}},{key:"_getValue_toArray",value:function(e,t){this.resolvedProperty.toArray(e,t)}},{key:"_setValue_direct",value:function(e,t){this.targetObject[this.propertyName]=e[t]}},{key:"_setValue_direct_setNeedsUpdate",value:function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}},{key:"_setValue_direct_setMatrixWorldNeedsUpdate",value:function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}},{key:"_setValue_array",value:function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++]}},{key:"_setValue_array_setNeedsUpdate",value:function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}},{key:"_setValue_array_setMatrixWorldNeedsUpdate",value:function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}},{key:"_setValue_arrayElement",value:function(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}},{key:"_setValue_arrayElement_setNeedsUpdate",value:function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}},{key:"_setValue_arrayElement_setMatrixWorldNeedsUpdate",value:function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}},{key:"_setValue_fromArray",value:function(e,t){this.resolvedProperty.fromArray(e,t)}},{key:"_setValue_fromArray_setNeedsUpdate",value:function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}},{key:"_setValue_fromArray_setMatrixWorldNeedsUpdate",value:function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}},{key:"_getValue_unbound",value:function(e,t){this.bind(),this.getValue(e,t)}},{key:"_setValue_unbound",value:function(e,t){this.bind(),this.setValue(e,t)}},{key:"bind",value:function(){var t=this.node,n=this.parsedPath,r=n.objectName,i=n.propertyName,a=n.propertyIndex;if(t||(t=e.findNode(this.rootNode,n.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(r){var A=n.objectIndex;switch(r){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var o=0;o<t.length;o++)if(t[o].name===A){A=o;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.map)return void console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);t=t.material.map;break;default:if(void 0===t[r])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[r]}if(void 0!==A){if(void 0===t[A])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[A]}}var s=t[i];if(void 0!==s){var l=this.Versioning.None;this.targetObject=t,void 0!==t.needsUpdate?l=this.Versioning.NeedsUpdate:void 0!==t.matrixWorldNeedsUpdate&&(l=this.Versioning.MatrixWorldNeedsUpdate);var u=this.BindingType.Direct;if(void 0!==a){if("morphTargetInfluences"===i){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==t.morphTargetDictionary[a]&&(a=t.morphTargetDictionary[a])}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=a}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=i;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][l]}else{var c=n.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+i+" but it wasn't found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")}},{key:"unbind",value:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}],[{key:"create",value:function(t,n,r){return t&&t.isAnimationObjectGroup?new e.Composite(t,n,r):new e(t,n,r)}},{key:"sanitizeNodeName",value:function(e){return e.replace(/\s/g,"_").replace(zb,"")}},{key:"parseTrackName",value:function(e){var t=Wb.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);var n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==jb.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}},{key:"findNode",value:function(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){var n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){var r=function e(n){for(var r=0;r<n.length;r++){var i=n[r];if(i.name===t||i.uuid===t)return i;var a=e(i.children);if(a)return a}return null}(e.children);if(r)return r}return null}}]),e}();qb.Composite=Xb,qb.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},qb.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},qb.prototype.GetterByBindingType=[qb.prototype._getValue_direct,qb.prototype._getValue_array,qb.prototype._getValue_arrayElement,qb.prototype._getValue_toArray],qb.prototype.SetterByBindingTypeAndVersioning=[[qb.prototype._setValue_direct,qb.prototype._setValue_direct_setNeedsUpdate,qb.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[qb.prototype._setValue_array,qb.prototype._setValue_array_setNeedsUpdate,qb.prototype._setValue_array_setMatrixWorldNeedsUpdate],[qb.prototype._setValue_arrayElement,qb.prototype._setValue_arrayElement_setNeedsUpdate,qb.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[qb.prototype._setValue_fromArray,qb.prototype._setValue_fromArray_setNeedsUpdate,qb.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];new Float32Array(1);var Yb=Jb();function Jb(){for(var e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),i=new Uint32Array(512),a=0;a<256;++a){var A=a-127;A<-27?(r[a]=0,r[256|a]=32768,i[a]=24,i[256|a]=24):A<-14?(r[a]=1024>>-A-14,r[256|a]=1024>>-A-14|32768,i[a]=-A-1,i[256|a]=-A-1):A<=15?(r[a]=A+15<<10,r[256|a]=A+15<<10|32768,i[a]=13,i[256|a]=13):A<128?(r[a]=31744,r[256|a]=64512,i[a]=24,i[256|a]=24):(r[a]=31744,r[256|a]=64512,i[a]=13,i[256|a]=13)}for(var o=new Uint32Array(2048),s=new Uint32Array(64),l=new Uint32Array(64),u=1;u<1024;++u){for(var c=u<<13,d=0;0===(8388608&c);)c<<=1,d-=8388608;c&=-8388609,d+=947912704,o[u]=c|d}for(var h=1024;h<2048;++h)o[h]=939524096+(h-1024<<13);for(var f=1;f<31;++f)s[f]=f<<23;s[31]=1199570944,s[32]=2147483648;for(var p=33;p<63;++p)s[p]=2147483648+(p-32<<23);s[63]=3347054592;for(var g=1;g<64;++g)32!==g&&(l[g]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:o,exponentTable:s,offsetTable:l}}var Zb=Object.freeze({__proto__:null,fromHalfFloat:function(e){var t=e>>10;return Yb.uint32View[0]=Yb.mantissaTable[Yb.offsetTable[t]+(1023&e)]+Yb.exponentTable[t],Yb.floatView[0]},toHalfFloat:function(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=pm(e,-65504,65504),Yb.floatView[0]=e;var t=Yb.uint32View[0],n=t>>23&511;return Yb.baseTable[n]+((8388607&t)>>Yb.shiftTable[n])}});"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Pf}})),"undefined"!==typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Pf);var $b=/^[og]\s*(.+)?/,ex=/^mtllib /,tx=/^usemtl /,nx=/^usemap /,rx=/\s+/,ix=new Jm,ax=new Jm,Ax=new Jm,ox=new Jm,sx=new Jm,lx=new Nm;function ux(){var e={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=!1!==t);var n=this.object&&"function"===typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"===typeof this.object._finalize&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:!1!==t,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,t){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:e||"",mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){var t={index:"number"===typeof e?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){var t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}},n&&n.name&&"function"===typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"===typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){var n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseNormalIndex:function(e,t){var n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseUVIndex:function(e,t){var n=parseInt(e,10);return 2*(n>=0?n-1:n+t/2)},addVertex:function(e,t,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[e+0],r[e+1],r[e+2]),i.push(r[t+0],r[t+1],r[t+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[e+0],r[e+1],r[e+2]),i.push(r[t+0],r[t+1],r[t+2]),i.push(r[n+0],r[n+1],r[n+2])},addFaceNormal:function(e,t,n){var r=this.vertices,i=this.object.geometry.normals;ix.fromArray(r,e),ax.fromArray(r,t),Ax.fromArray(r,n),sx.subVectors(Ax,ax),ox.subVectors(ix,ax),sx.cross(ox),sx.normalize(),i.push(sx.x,sx.y,sx.z),i.push(sx.x,sx.y,sx.z),i.push(sx.x,sx.y,sx.z)},addColor:function(e,t,n){var r=this.colors,i=this.object.geometry.colors;void 0!==r[e]&&i.push(r[e+0],r[e+1],r[e+2]),void 0!==r[t]&&i.push(r[t+0],r[t+1],r[t+2]),void 0!==r[n]&&i.push(r[n+0],r[n+1],r[n+2])},addUV:function(e,t,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[e+0],r[e+1]),i.push(r[t+0],r[t+1]),i.push(r[n+0],r[n+1])},addDefaultUV:function(){var e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){var t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,n,r,i,a,A,o,s){var l=this.vertices.length,u=this.parseVertexIndex(e,l),c=this.parseVertexIndex(t,l),d=this.parseVertexIndex(n,l);if(this.addVertex(u,c,d),this.addColor(u,c,d),void 0!==A&&""!==A){var h=this.normals.length;u=this.parseNormalIndex(A,h),c=this.parseNormalIndex(o,h),d=this.parseNormalIndex(s,h),this.addNormal(u,c,d)}else this.addFaceNormal(u,c,d);if(void 0!==r&&""!==r){var f=this.uvs.length;u=this.parseUVIndex(r,f),c=this.parseUVIndex(i,f),d=this.parseUVIndex(a,f),this.addUV(u,c,d),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";for(var t=this.vertices.length,n=0,r=e.length;n<r;n++){var i=this.parseVertexIndex(e[n],t);this.addVertexPoint(i),this.addColor(i)}},addLineGeometry:function(e,t){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,a=e.length;i<a;i++)this.addVertexLine(this.parseVertexIndex(e[i],n));for(var A=0,o=t.length;A<o;A++)this.addUVLine(this.parseUVIndex(t[A],r))}};return e.startObject("",!1),e}var cx=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),(r=t.call(this,e)).materials=null,r}return _(n,[{key:"load",value:function(e,t,n,r){var i=this,a=new Mb(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{t(i.parse(n))}catch(a){r?r(a):console.error(a),i.manager.itemError(e)}}),n,r)}},{key:"setMaterials",value:function(e){return this.materials=e,this}},{key:"parse",value:function(e){var t=new ux;-1!==e.indexOf("\r\n")&&(e=e.replace(/\r\n/g,"\n")),-1!==e.indexOf("\\\n")&&(e=e.replace(/\\\n/g,""));for(var n=e.split("\n"),r=[],i=0,a=n.length;i<a;i++){var A=n[i].trimStart();if(0!==A.length){var o=A.charAt(0);if("#"!==o)if("v"===o){var s=A.split(rx);switch(s[0]){case"v":t.vertices.push(parseFloat(s[1]),parseFloat(s[2]),parseFloat(s[3])),s.length>=7?(lx.setRGB(parseFloat(s[4]),parseFloat(s[5]),parseFloat(s[6])).convertSRGBToLinear(),t.colors.push(lx.r,lx.g,lx.b)):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(s[1]),parseFloat(s[2]),parseFloat(s[3]));break;case"vt":t.uvs.push(parseFloat(s[1]),parseFloat(s[2]))}}else if("f"===o){for(var l=A.slice(1).trim().split(rx),u=[],c=0,d=l.length;c<d;c++){var h=l[c];if(h.length>0){var f=h.split("/");u.push(f)}}for(var p=u[0],g=1,m=u.length-1;g<m;g++){var v=u[g],y=u[g+1];t.addFace(p[0],v[0],y[0],p[1],v[1],y[1],p[2],v[2],y[2])}}else if("l"===o){var w=A.substring(1).trim().split(" "),B=[],_=[];if(-1===A.indexOf("/"))B=w;else for(var b=0,x=w.length;b<x;b++){var C=w[b].split("/");""!==C[0]&&B.push(C[0]),""!==C[1]&&_.push(C[1])}t.addLineGeometry(B,_)}else if("p"===o){var S=A.slice(1).trim().split(" ");t.addPointGeometry(S)}else if(null!==(r=$b.exec(A))){var E=(" "+r[0].slice(1).trim()).slice(1);t.startObject(E)}else if(tx.test(A))t.object.startMaterial(A.substring(7).trim(),t.materialLibraries);else if(ex.test(A))t.materialLibraries.push(A.substring(7).trim());else if(nx.test(A))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if("s"===o){if((r=A.split(" ")).length>1){var U=r[1].trim().toLowerCase();t.object.smooth="0"!==U&&"off"!==U}else t.object.smooth=!0;var M=t.object.currentMaterial();M&&(M.smooth=t.object.smooth)}else{if("\0"===A)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+A+'"')}}}t.finalize();var F=new Q_;if(F.materialLibraries=[].concat(t.materialLibraries),!0===!(1===t.objects.length&&0===t.objects[0].geometry.vertices.length))for(var T=0,k=t.objects.length;T<k;T++){var Q=t.objects[T],L=Q.geometry,D=Q.materials,I="Line"===L.type,R="Points"===L.type,H=!1;if(0!==L.vertices.length){var P=new Sy;P.setAttribute("position",new vy(L.vertices,3)),L.normals.length>0&&P.setAttribute("normal",new vy(L.normals,3)),L.colors.length>0&&(H=!0,P.setAttribute("color",new vy(L.colors,3))),!0===L.hasUVIndices&&P.setAttribute("uv",new vy(L.uvs,2));for(var N=[],O=0,V=D.length;O<V;O++){var z=D[O],G=z.name+"_"+z.smooth+"_"+H,K=t.materials[G];if(null!==this.materials)if(K=this.materials.create(z.name),!I||!K||K instanceof G_){if(R&&K&&!(K instanceof eb)){var W=new eb({size:10,sizeAttenuation:!1});cy.prototype.copy.call(W,K),W.color.copy(K.color),W.map=K.map,K=W}}else{var j=new G_;cy.prototype.copy.call(j,K),j.color.copy(K.color),K=j}void 0===K&&((K=I?new G_:R?new eb({size:1,sizeAttenuation:!1}):new ob).name=z.name,K.flatShading=!z.smooth,K.vertexColors=H,t.materials[G]=K),N.push(K)}var X=void 0;if(N.length>1){for(var q=0,Y=D.length;q<Y;q++){var J=D[q];P.addGroup(J.groupStart,J.groupCount,q)}X=I?new $_(P,N):R?new ab(P,N):new Ny(P,N)}else X=I?new $_(P,N[0]):R?new ab(P,N[0]):new Ny(P,N[0]);X.name=Q.name,F.add(X)}}else if(t.vertices.length>0){var Z=new eb({size:1,sizeAttenuation:!1}),$=new Sy;$.setAttribute("position",new vy(t.vertices,3)),t.colors.length>0&&void 0!==t.colors[0]&&($.setAttribute("color",new vy(t.colors,3)),Z.vertexColors=!0);var ee=new ab($,Z);F.add(ee)}return F}}]),n}(Sb),dx=function(e){x(n,e);var t=U(n);function n(e){var r;return y(this,n),(r=t.call(this,e)).type=tg,r}return _(n,[{key:"parse",value:function(e){var t=function(e,t){switch(e){case 1:console.error("THREE.RGBELoader Read Error: "+(t||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(t||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(t||""));break;default:console.error("THREE.RGBELoader: Error: "+(t||""))}return-1},n=function(e,t,n){t=t||1024;for(var r=e.pos,i=-1,a=0,A="",o=String.fromCharCode.apply(null,new Uint16Array(e.subarray(r,r+128)));0>(i=o.indexOf("\n"))&&a<t&&r<e.byteLength;)A+=o,a+=o.length,r+=128,o+=String.fromCharCode.apply(null,new Uint16Array(e.subarray(r,r+128)));return-1<i&&(!1!==n&&(e.pos+=a+i+1),A+o.slice(0,i))},r=function(e,t,n,r){var i=e[t+3],a=Math.pow(2,i-128)/255;n[r+0]=e[t+0]*a,n[r+1]=e[t+1]*a,n[r+2]=e[t+2]*a,n[r+3]=1},i=function(e,t,n,r){var i=e[t+3],a=Math.pow(2,i-128)/255;n[r+0]=Zb.toHalfFloat(Math.min(e[t+0]*a,65504)),n[r+1]=Zb.toHalfFloat(Math.min(e[t+1]*a,65504)),n[r+2]=Zb.toHalfFloat(Math.min(e[t+2]*a,65504)),n[r+3]=Zb.toHalfFloat(1)},a=new Uint8Array(e);a.pos=0;var A=function(e){var r,i,a=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,A=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,o=/^\s*FORMAT=(\S+)\s*$/,s=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,l={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};if(e.pos>=e.byteLength||!(r=n(e)))return t(1,"no header found");if(!(i=r.match(/^#\?(\S+)/)))return t(3,"bad initial token");for(l.valid|=1,l.programtype=i[1],l.string+=r+"\n";!1!==(r=n(e));)if(l.string+=r+"\n","#"!==r.charAt(0)){if((i=r.match(a))&&(l.gamma=parseFloat(i[1])),(i=r.match(A))&&(l.exposure=parseFloat(i[1])),(i=r.match(o))&&(l.valid|=2,l.format=i[1]),(i=r.match(s))&&(l.valid|=4,l.height=parseInt(i[1],10),l.width=parseInt(i[2],10)),2&l.valid&&4&l.valid)break}else l.comments+=r+"\n";return 2&l.valid?4&l.valid?l:t(3,"missing image size specifier"):t(3,"missing format specifier")}(a);if(-1!==A){var o=A.width,s=A.height,l=function(e,n,r){var i=n;if(i<8||i>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);if(i!==(e[2]<<8|e[3]))return t(3,"wrong scanline width");var a=new Uint8Array(4*n*r);if(!a.length)return t(4,"unable to allocate buffer space");for(var A=0,o=0,s=4*i,l=new Uint8Array(4),u=new Uint8Array(s),c=r;c>0&&o<e.byteLength;){if(o+4>e.byteLength)return t(1);if(l[0]=e[o++],l[1]=e[o++],l[2]=e[o++],l[3]=e[o++],2!=l[0]||2!=l[1]||(l[2]<<8|l[3])!=i)return t(3,"bad rgbe scanline format");for(var d=0,h=void 0;d<s&&o<e.byteLength;){var f=(h=e[o++])>128;if(f&&(h-=128),0===h||d+h>s)return t(3,"bad scanline data");if(f)for(var p=e[o++],g=0;g<h;g++)u[d++]=p;else u.set(e.subarray(o,o+h),d),d+=h,o+=h}for(var m=i,v=0;v<m;v++){var y=0;a[A]=u[v+y],y+=i,a[A+1]=u[v+y],y+=i,a[A+2]=u[v+y],y+=i,a[A+3]=u[v+y],A+=4}c--}return a}(a.subarray(a.pos),o,s);if(-1!==l){var u,c,d;switch(this.type){case eg:d=l.length/4;for(var h=new Float32Array(4*d),f=0;f<d;f++)r(l,4*f,h,4*f);u=h,c=eg;break;case tg:d=l.length/4;for(var p=new Uint16Array(4*d),g=0;g<d;g++)i(l,4*g,p,4*g);u=p,c=tg;break;default:console.error("THREE.RGBELoader: unsupported type: ",this.type)}return{width:o,height:s,data:u,header:A.string,gamma:A.gamma,exposure:A.exposure,type:c}}}return null}},{key:"setDataType",value:function(e){return this.type=e,this}},{key:"load",value:function(e,t,r,i){return ed(C(n.prototype),"load",this).call(this,e,(function(e,n){switch(e.type){case eg:case tg:e.encoding=Zg,e.minFilter=Kp,e.magFilter=Kp,e.generateMipmaps=!1,e.flipY=!0}t&&t(e,n)}),r,i)}}]),n}(Tb),hx={get:function(e){return hx.getInclude("include_common")+hx[e+".glsl"]},getInclude:function(e){return hx[e+".glsl"]+"\n"},"include_common.glsl":"\nvec4 encodeHDRE(vec3 color)\n{\n#ifdef HDRE\n float maxValue = max(max(color.r, color.g), color.b) + .01;\n float e = floor(max(log(maxValue), 0.0));\n color /= exp(e);\n return vec4(color, e / 5.0);\n#else\n return vec4(color, 1.0);\n#endif\n}\n\nvec3 decodeHDRE(vec4 hdre)\n{\n#ifdef HDRE\n return hdre.rgb * exp(hdre.a * 255.0 - 128.0);\n#else\n return hdre.xyz;\n#endif\n}\n\nfloat luminance(vec3 color)\n{\n return dot(color, vec3(.30, 0.59, .11));\n}\n\nfloat luminance(vec4 color)\n{\n return luminance(color.xyz);\n}\n\nfloat linearStep(float lower, float upper, float x)\n{\n return clamp((x - lower) / (upper - lower), 0.0, 1.0);\n}\n\n// Only for 0 - 1\nvec4 floatToRGBA8(float value)\n{\n vec4 enc = value * vec4(1.0, 255.0, 65025.0, 16581375.0);\n // cannot fract first value or 1 would not be encodable\n enc.yzw = fract(enc.yzw);\n return enc - enc.yzww * vec4(1.0/255.0, 1.0/255.0, 1.0/255.0, 0.0);\n}\n\nfloat RGBA8ToFloat(vec4 rgba)\n{\n return dot(rgba, vec4(1.0, 1.0/255.0, 1.0/65025.0, 1.0/16581375.0));\n}\n\nvec2 floatToRG8(float value)\n{\n vec2 enc = vec2(1.0, 255.0) * value;\n enc.y = fract(enc.y);\n enc.x -= enc.y / 255.0;\n return enc;\n}\n\nfloat RG8ToFloat(vec2 rg)\n{\n return dot(rg, vec2(1.0, 1.0/255.0));\n}\n\nvec3 intersectCubeMap(vec3 rayOrigin, vec3 rayDir, float cubeSize)\n{\n vec3 t = (cubeSize * sign(rayDir) - rayOrigin) / rayDir;\n float minT = min(min(t.x, t.y), t.z);\n return rayOrigin + minT * rayDir;\n}\n\nvec4 sampleLatLong(sampler2D tex, vec3 uvw)\n{\n vec2 uv;\n uv.x = atan(uvw.z, uvw.x) / 6.283184 + 0.5;\n uv.y = acos(-uvw.y) / 3.141592;\n return texture2D(tex, uv);\n}\n","include_beckmann.glsl":"\nstruct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n};\n\nstruct DirectionalLight {\n vec3 direction;\n vec3 color;\n};\n\n#if NUM_POINT_LIGHTS > 0\nuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n#endif\n\n#if NUM_DIR_LIGHTS > 0\nuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n#endif\n\n\nfloat beckmann_geometryTerm(vec3 normal, vec3 dir, float k)\n{\n float d = max(dot(normal, dir), 0.0);\n return d / (d * (1.0 - k) + k);\n}\n\n// schlick-beckman\nfloat beckmann_lightVisibility(vec3 normal, vec3 viewDir, vec3 lightDir, float roughness)\n{\n float k = roughness + 1.0;\n k = k * k * .125;\n return beckmann_geometryTerm(normal, viewDir, k) * beckmann_geometryTerm(normal, lightDir, k);\n}\n\nfloat beckmann_distribution(float roughness, vec3 normal, vec3 halfVector)\n{\n float roughSqr = roughness*roughness;\n float halfDotNormal = max(dot(halfVector, normal), 0.00001);\n float a = roughSqr * pow(halfDotNormal, 4.0);\n float b = (halfDotNormal * halfDotNormal - 1.0) / (roughSqr * halfDotNormal * halfDotNormal);\n return exp(b) / a;\n}\n\n// light dir is towards the light\n// view dir is toward the camera\nvoid beckmann_brdf(in vec3 normal, in float roughness, float normalSpecularReflectance, in vec3 lightDir, in vec3 viewDir, in vec3 viewPos, in vec3 lightColor, out vec3 diffuseLight, out vec3 specularLight)\n{\n float nDotL = max(dot(lightDir, normal), 0.0);\n vec3 irradiance = nDotL * lightColor; // in fact irradiance / PI\n\n vec3 halfVector = normalize(lightDir + viewDir);\n\n float mappedRoughness = roughness * roughness;\n\n // adapted for 2-lobed skin\n float distribution =\n (beckmann_distribution(mappedRoughness *.8, normal, halfVector) * .05 +\n beckmann_distribution(mappedRoughness, normal, halfVector)) * .95;\n\n float halfDotLight = max(dot(halfVector, lightDir), 0.0);\n float cosAngle = 1.0 - halfDotLight;\n float fresnel = normalSpecularReflectance + (1.0 - normalSpecularReflectance) * pow(cosAngle, 5.0);\n\n diffuseLight = irradiance;\n\n specularLight = irradiance * fresnel * distribution;\n\n specularLight *= beckmann_lightVisibility(normal, viewDir, lightDir, roughness);\n}\n\n// diffuse light only\nvec3 beckmann_getDiffuseLight(in vec3 normal, in vec3 viewPos, in float shadow)\n{\n vec3 diffuseLight = vec3(0.0);\n\n#if NUM_DIR_LIGHTS > 0\n for (int i = 0; i < NUM_DIR_LIGHTS; ++i) {\n float nDotL = max(dot(directionalLights[i].direction, normal), 0.0);\n diffuseLight += nDotL * directionalLights[i].color * shadow;\n }\n#endif\n\n return diffuseLight;\n}\n\nvoid beckmann_getLight(in vec3 normal, in float roughness, in float normalSpecularReflectance, in vec3 viewPos, in float shadow, out vec3 diffuseLight, out vec3 specularLight)\n{\n vec3 viewDir = -normalize(viewPos);\n diffuseLight = vec3(0.0);\n specularLight = vec3(0.0);\n\n#if NUM_DIR_LIGHTS > 0\n for (int i = 0; i < NUM_DIR_LIGHTS; ++i) {\n vec3 diff;\n vec3 spec;\n beckmann_brdf(normal, roughness, normalSpecularReflectance, directionalLights[i].direction, viewDir, viewPos, directionalLights[i].color, diff, spec);\n diffuseLight += diff * shadow;\n specularLight += spec * shadow;\n }\n#endif\n}\n","include_ggx.glsl":"\nstruct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n};\n\nstruct DirectionalLight {\n vec3 direction;\n vec3 color;\n};\n\n#if NUM_POINT_LIGHTS > 0\nuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n#endif\n\n#if NUM_DIR_LIGHTS > 0\nuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n#endif\n\n\nfloat ggx_geometryTerm(vec3 normal, vec3 dir, float k)\n{\n float d = max(dot(normal, dir), 0.0);\n return d / (d * (1.0 - k) + k);\n}\n\n// schlick-beckman\nfloat ggx_lightVisibility(vec3 normal, vec3 viewDir, vec3 lightDir, float roughness)\n{\n float k = roughness + 1.0;\n k = k * k * .125;\n return ggx_geometryTerm(normal, viewDir, k) * ggx_geometryTerm(normal, lightDir, k);\n}\n\nfloat ggx_distribution(float roughness, vec3 normal, vec3 halfVector)\n{\n float roughSqr = roughness*roughness;\n float halfDotNormal = max(dot(halfVector, normal), 0.0);\n float denom = (halfDotNormal * halfDotNormal) * (roughSqr - 1.0) + 1.0;\n return roughSqr / (denom * denom);\n}\n\n// light dir is towards the light\n// view dir is toward the camera\nvoid ggx_brdf(in vec3 normal, in float roughness, float normalSpecularReflectance, in vec3 lightDir, in vec3 viewDir, in vec3 viewPos, in vec3 lightColor, out vec3 diffuseLight, out vec3 specularLight)\n{\n float nDotL = max(dot(lightDir, normal), 0.0);\n vec3 irradiance = nDotL * lightColor; // in fact irradiance / PI\n\n vec3 halfVector = normalize(lightDir + viewDir);\n\n float mappedRoughness = roughness * roughness;\n\n float distribution = ggx_distribution(mappedRoughness, normal, halfVector);\n\n float halfDotLight = max(dot(halfVector, lightDir), 0.0);\n float cosAngle = 1.0 - halfDotLight;\n float fresnel = normalSpecularReflectance + (1.0 - normalSpecularReflectance) * pow(cosAngle, 5.0);\n\n diffuseLight = irradiance;\n\n specularLight = irradiance * fresnel * distribution;\n\n specularLight *= ggx_lightVisibility(normal, viewDir, lightDir, roughness);\n}\n\n// diffuse light only\nvec3 ggx_getDiffuseLight(in vec3 normal, in vec3 viewPos, in float shadow)\n{\n vec3 diffuseLight = vec3(0.0);\n\n#if NUM_DIR_LIGHTS > 0\n for (int i = 0; i < NUM_DIR_LIGHTS; ++i) {\n float nDotL = max(dot(directionalLights[i].direction, normal), 0.0);\n diffuseLight += nDotL * directionalLights[i].color * shadow;\n }\n#endif\n\n return diffuseLight;\n}\n\nvoid ggx_getLight(in vec3 normal, in float roughness, in float normalSpecularReflectance, in vec3 viewPos, in float shadow, out vec3 diffuseLight, out vec3 specularLight)\n{\n vec3 viewDir = -normalize(viewPos);\n diffuseLight = vec3(0.0);\n specularLight = vec3(0.0);\n\n#if NUM_DIR_LIGHTS > 0\n for (int i = 0; i < NUM_DIR_LIGHTS; ++i) {\n vec3 diff;\n vec3 spec;\n ggx_brdf(normal, roughness, normalSpecularReflectance, directionalLights[i].direction, viewDir, viewPos, directionalLights[i].color, diff, spec);\n diffuseLight += diff * shadow;\n specularLight += spec * shadow;\n }\n#endif\n}\n","linear_depth_vertex.glsl":"\nvarying vec2 vUV;\nvarying float linearDepth;\n\nuniform float cameraNear;\nuniform float rcpCameraRange;\n\nvoid main()\n{\n vec4 viewPosition = modelViewMatrix * vec4(position, 1.0);\n linearDepth = (-viewPosition.z - cameraNear) * rcpCameraRange;\n gl_Position = projectionMatrix * viewPosition;\n vUV = uv;\n}\n","linear_depth_fragment.glsl":"\nvarying float linearDepth;\n\nvoid main()\n{\n gl_FragColor = floatToRGBA8(linearDepth);\n}\n","linear_hair_depth_fragment.glsl":"\nvarying vec2 vUV;\nvarying float linearDepth;\nuniform sampler2D alphaMap;\nuniform float alpha_test;\n\n// uniform sampler2D depthMap_prev;\n// uniform vec2 screen_size;\nuniform int layer;\n\nvoid main()\n{\n float alpha = texture2D(alphaMap, vUV).g;\n if (alpha < alpha_test) discard;\n\n\n if(layer==0){\n gl_FragColor = floatToRGBA8(linearDepth);\n // gl_FragColor = vec4(1.,0.,0.,1.);\n } else {\n // // gl_FragColor = texture2D(depthMap_prev,uv_screen)*2.0;\n // gl_FragColor = floatToRGBA8(linearDepth);\n // // gl_FragColor = vec4(1.0,1.0,1.0,1.0);\n // return;\n\n // vec2 uv_screen = gl_FragCoord.xy/screen_size;\n // float depth_prev = RGBA8ToFloat(texture2D(depthMap_prev,uv_screen));\n\n // float uDepthOffset=0.0;\n // // if(depth_prev + uDepthOffset - linearDepth >= 0. ) discard;\n\n\n // if (uv_screen.x<0.5){\n // gl_FragColor = floatToRGBA8(depth_prev);\n // gl_FragColor = vec4(uv_screen,0.0,1.0);\n // gl_FragColor = texture2D(depthMap_prev,uv_screen);\n // }\n // else\n // gl_FragColor = floatToRGBA8(linearDepth);\n \n }\n\n // [0, 1]\n}\n","skin_vertex.glsl":"\nvarying vec2 vUV;\nvarying vec3 vViewNormal;\nvarying vec3 vViewPosition;\nvarying vec4 vShadowCoord;\nvarying vec4 vProjection;\n\nuniform mat4 shadowMapMatrix;\n\nvoid main() {\n vec3 localPos = position;\n vec4 viewPos = modelViewMatrix * vec4(localPos, 1.0);\n vec4 worldPos = modelMatrix * vec4(localPos, 1.0);\n\n gl_Position = vProjection = projectionMatrix * viewPos;\n vUV = uv;\n\n vViewNormal = normalMatrix * normal;\n vViewPosition = viewPos.xyz;\n vShadowCoord = shadowMapMatrix * worldPos * .5 + .5;\n}\n","skin_fragment.glsl":"\nvarying vec2 vUV;\nvarying vec3 vViewNormal;\nvarying vec3 vViewPosition;\nvarying vec4 vShadowCoord;\nvarying vec4 vProjection;\n\nuniform sampler2D diffuseMap;\nuniform sampler2D normalMap;\nuniform sampler2D roughnessAOThicknessMap;\nuniform sampler2D roughnessMap;\nuniform sampler2D roughnessDetailMap;\nuniform sampler2D irradianceMap;\nuniform sampler2D specularMap;\nuniform sampler2D shadowMap;\nuniform sampler2D sssMap;\n\nuniform float normalSpecularReflectance;\nuniform float roughnessMedian;\nuniform float roughnessMapRange;\nuniform float roughnessDetailRange;\nuniform float probeExposure;\nuniform float sssProfileScale;\nuniform float thicknessRange;\nuniform float specular_intensity;\nuniform vec3 sssTopLayerColor;\nuniform vec3 transmittanceColor;\nuniform mat4 shadowMapMatrix;\n\nuniform int return_stage;\n\nvec3 perturbNormal2Arb(vec3 position, vec3 normal, vec3 normalSample)\n{\n vec3 q0 = dFdx( position.xyz );\n vec3 q1 = dFdy( position.xyz );\n vec2 st0 = dFdx( vUV.st );\n vec2 st1 = dFdy( vUV.st );\n vec3 S = normalize( q0 * st1.t - q1 * st0.t );\n vec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n vec3 N = normalize( normal );\n mat3 tsn = mat3( S, T, N );\n return normalize( tsn * normalSample );\n}\n\nvec3 getNormal()\n{\n vec4 normalSample = texture2D(normalMap, vUV);\n vec3 normal = normalSample.xyz * 2.0 - 1.0;\n return perturbNormal2Arb(vViewPosition, vViewNormal, normal);\n}\n\nvec2 getVSMMoments(vec2 uv)\n{\n vec4 s = texture2D(shadowMap, uv);\n#ifdef VSM_FLOAT\n return s.xy;\n#else\n return vec2(RG8ToFloat(s.xy), RG8ToFloat(s.zw));\n#endif\n}\n\nfloat getShadow(float offset)\n{\n vec4 coord = vShadowCoord;\n coord.z -= offset;\n vec2 moments = getVSMMoments(coord.xy);\n float p = linearStep(coord.z - 0.002, coord.z, moments.x);\n float variance = moments.y - moments.x * moments.x;\n variance = max(variance, MIN_VARIANCE);\n\n float diff = coord.z - moments.x;\n float upperBound = variance / (variance + diff*diff);\n float shadow = linearStep(LIGHT_BLEED_REDUCTION, 1.0, upperBound);\n return clamp(max(shadow, p), 0.0, 1.0);\n}\n\nvoid main() {\n vec3 viewNormal = getNormal();\n vec3 worldNormal = viewNormal * mat3(viewMatrix);\n vec4 diffuse = texture2D(diffuseMap, vUV);\n\n vec3 diffuseLight = vec3(0.0);\n vec3 specularLight = vec3(0.0);\n\n vec4 roughnessAOThickness = texture2D(roughnessAOThicknessMap, vUV);\n float roughness_sample = texture2D(roughnessMap, vUV).g;\n\n // TODO: scale roughness UP by distance\n float roughness = roughnessMedian + (roughness_sample - 0.5) * roughnessMapRange;\n roughness = clamp(roughness, 0.001, 1.0);\n\n float roughnessDetail = texture2D(roughnessDetailMap, vUV * 20.0).x;\n roughness += -(roughnessDetail - 0.5) * roughnessDetailRange;\n\n float shadow = getShadow(0.0);\n beckmann_getLight(viewNormal, roughness, normalSpecularReflectance, vViewPosition, shadow, diffuseLight, specularLight);\n\n vec4 irradianceSample = sampleLatLong(irradianceMap, worldNormal);\n vec3 viewRefl = reflect(normalize(vViewPosition), viewNormal);\n vec3 worldReflection = viewRefl * mat3(viewMatrix);\n vec4 specularSample = sampleLatLong(specularMap, worldReflection);\n\n // TODO: Do this more correctly (remember Seb Lagarde (?)'s post?)\n float geomOcclusion = 1.0 - roughness * roughness;\n float NdotL = max(dot(worldNormal, worldReflection), 0.0);\n float cosAngle = 1.0 - NdotL;\n float fresnel = normalSpecularReflectance + (1.0 - normalSpecularReflectance) * pow(cosAngle, 5.0);\n // should be augmented with shadow test\n\n float probeStrength = probeExposure * roughnessAOThickness.y;\n diffuseLight += irradianceSample.xyz /** irradianceSample.xyz */* probeStrength;\n specularLight += specularSample.xyz /** specularSample.xyz */* fresnel * geomOcclusion * probeStrength;\n\n vec2 screenUV = vProjection.xy / vProjection.w * .5 + .5;\n vec3 sss = texture2D(sssMap, screenUV).xyz;\n \n vec3 diffuseLight_sss = diffuseLight * sssTopLayerColor + sss;\n\n\n float thickness = (1.0 - roughnessAOThickness.z) * thicknessRange + 0.01;\n float offset = roughnessAOThickness.z * thicknessRange + 0.01;\n float shadowTransmission = getShadow(2.0 * offset);\n vec3 transmission_color = exp(-transmittanceColor * thickness);\n vec3 shadow_diffuse_light = beckmann_getDiffuseLight(-viewNormal, vViewPosition, shadowTransmission);\n vec3 transmission_diffuse_light = transmission_color*shadow_diffuse_light;\n vec3 diffuseLight_sss_tm = diffuseLight_sss + transmission_diffuse_light;\n vec3 col = diffuse.xyz * diffuseLight_sss_tm + specularLight * specular_intensity;\n\n\n if (return_stage == 1) {\n gl_FragColor = vec4(diffuseLight_sss, 1.0);\n } else if (return_stage == 2) {\n gl_FragColor = vec4(shadowTransmission);\n } else if (return_stage == 3) {\n gl_FragColor = vec4(shadow_diffuse_light, 1.0);\n } else {\n gl_FragColor = vec4(col, 1.0);\n }\n}\n","hair_vertex.glsl":"\nvarying vec2 vUV;\nvarying vec3 vViewNormal;\nvarying vec3 vViewPosition;\nvarying vec4 vShadowCoord;\nvarying vec4 vProjection;\nvarying vec3 vTangent;\nvarying vec3 vNormal;\n\nuniform mat4 shadowMapMatrix;\n\nvoid main() {\n vec3 localPos = position;\n vec4 viewPos = modelViewMatrix * vec4(localPos, 1.0);\n vec4 worldPos = modelMatrix * vec4(localPos, 1.0);\n\n vTangent=(modelMatrix*tangent).xyz;\n vNormal=(modelMatrix*vec4(normal,1.0)).xyz;\n\n gl_Position = vProjection = projectionMatrix * viewPos;\n vUV = uv;\n\n vViewNormal = normalMatrix * normal;\n vViewPosition = viewPos.xyz;\n vShadowCoord = shadowMapMatrix * worldPos * .5 + .5;\n}\n","hair_fragment.glsl":'\nvarying vec2 vUV;\nvarying vec3 vViewNormal;\nvarying vec3 vViewPosition;\nvarying vec4 vShadowCoord;\nvarying vec4 vProjection;\nvarying vec3 vTangent;\nvarying vec3 vNormal;\n\nuniform float normalSpecularReflectance;\nuniform sampler2D diffuseMap;\nuniform sampler2D normalMap;\nuniform sampler2D irradianceMap;\nuniform sampler2D specularMap;\nuniform sampler2D shadowMap;\nuniform sampler2D alphaMap;\nuniform sampler2D roughnessMap;\n\nuniform sampler2D specular_map;\nuniform sampler2D scatter_map;\n\nuniform mat4 shadowMapMatrix;\nuniform float alpha_test;\n\nuniform float tangent_shift_0;\nuniform float specular_exp_0;\nuniform float tangent_shift_1;\nuniform float specular_exp_1;\n\nuniform int return_stage;\n\nvec2 getVSMMoments(vec2 uv)\n{\n vec4 s = texture2D(shadowMap, uv);\n#ifdef VSM_FLOAT\n return s.xy;\n#else\n return vec2(RG8ToFloat(s.xy), RG8ToFloat(s.zw));\n#endif\n}\n\nfloat getShadow(float offset)\n{\n vec4 coord = vShadowCoord;\n coord.z -= offset;\n vec2 moments = getVSMMoments(coord.xy);\n float p = linearStep(coord.z - 0.002, coord.z, moments.x);\n float variance = moments.y - moments.x * moments.x;\n variance = max(variance, MIN_VARIANCE);\n\n float diff = coord.z - moments.x;\n float upperBound = variance / (variance + diff*diff);\n float shadow = linearStep(LIGHT_BLEED_REDUCTION, 1.0, upperBound);\n return clamp(max(shadow, p), 0.0, 1.0);\n}\n\nfloat getShadow2(float offset)\n{\n vec4 coord = vShadowCoord;\n coord.z -= offset;\n vec2 moments = getVSMMoments(coord.xy);\n float p = linearStep(coord.z - 0.2, coord.z, moments.x);\n return p;\n float variance = moments.y - moments.x * moments.x;\n variance = max(variance, MIN_VARIANCE);\n\n float diff = coord.z - moments.x;\n float upperBound = variance / (variance + diff*diff);\n float shadow = linearStep(LIGHT_BLEED_REDUCTION, 1.0, upperBound);\n return clamp(max(shadow, p), 0.0, 1.0);\n}\n\nfloat StrandSpecular (vec3 strand_dir, vec3 normal_dir, vec3 view_dir, vec3 light_dir, float exponent){\n vec3 half_dir = normalize(light_dir + view_dir);\n float dotTH = dot(strand_dir, half_dir);\n float sinTH = sqrt(1.0 - dotTH*dotTH);\n float dirAtten = smoothstep(-1.0, 0.0, dotTH);\n\n // float dotNH = dot(normal_dir, half_dir);\n // dotNH=smoothstep(-1.0,1.0,dotNH);\n // dotNH=pow(dotNH,20.0);\n\n\n // return dotNH;\n // return dirAtten * pow(sinTH*dotNH, exponent);\n // return dirAtten * pow(dotNH, exponent);\n return dirAtten * pow(sinTH, exponent);\n}\n\nvec3 ShiftTangent (vec3 strand_dir, vec3 normal_dir, float shift) {\n vec3 strand_dir_shifted = strand_dir + shift * normal_dir;\n return normalize (strand_dir_shifted);\n}\n\nfloat fresnel_dielectric_cos(float cosi, float eta)\n{\n /* compute fresnel reflectance without explicitly computing\n * the refracted direction */\n float c = abs(cosi);\n float g = eta * eta - 1.0 + c * c;\n float result;\n\n if (g > 0.0) {\n g = sqrt(g);\n float A = (g - c) / (g + c);\n float B = (c * (g + c) - 1.0) / (c * (g - c) + 1.0);\n result = 0.5 * A * A * (1.0 + B * B);\n }\n else\n result = 1.0; /* TIR (no refracted component) */\n\n return result;\n}\n\nfloat fresnel_approx(float cosi, float F0){\n float NdotL = max(cosi, 0.0);\n float cosAngle = 1.0 - NdotL;\n float fresnel = normalSpecularReflectance + (1.0 - normalSpecularReflectance) * pow(cosAngle, 5.0);\n return fresnel;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n// #define _USE_LIGHT_FACING_NORMAL\n// #define _USE_ADVANCED_MULTIPLE_SCATTERING\n#define DEFAULT_HAIR_SPECULAR_VALUE 0.0465 // Hair is IOR 1.55\n\nstruct BSDFData {\n vec3 fresnel0;\n float cuticleAngleR;\n float cuticleAngleTT;\n float cuticleAngleTRT;\n float roughnessR;\n float roughnessTT;\n float roughnessTRT;\n vec3 absorption;\n float perceptualRoughnessRadial;\n};\n\nstruct HairAngle\n{\n float sinThetaI;\n float sinThetaO;\n float cosThetaI;\n float cosThetaO;\n float cosThetaD;\n float thetaH;\n float phiI;\n float phiO;\n float phi;\n float cosPhi;\n float sinThetaT;\n float cosThetaT;\n};\n\nstruct CBSDF {\n vec3 diffR;\n vec3 specR;\n};\n\nfloat saturate(float value){\n return clamp(value,0.0,1.0);\n}\n\nfloat rsqrt(float value)\n{\n return pow(value, -0.5);\n}\n\nfloat SafeSqrt(float x)\n{\n return sqrt(max(0.0, x));\n}\nfloat Sq(float x){\n return x*x;\n}\nvec3 Sq(vec3 x){\n return x*x;\n}\nfloat rcp(float x){\n return 1.0/x;\n}\nvec3 rcp(vec3 x){\n return 1.0/x;\n}\n\nfloat F_Schlick(float F0, float cosi){\n cosi = max(cosi, 0.0);\n float fresnel = F0 + (1.0 - F0) * pow(1.0 - cosi, 5.0);\n return fresnel;\n}\nvec3 F_Schlick(vec3 F0, float cosi){\n cosi = max(cosi, 0.0);\n vec3 fresnel = F0 + (1.0 - F0) * pow(1.0 - cosi, 5.0);\n return fresnel;\n}\n\nfloat ModifiedRefractionIndex(float cosThetaD)\n{\n // Original derivation of modified refraction index for arbitrary IOR.\n // float sinThetaD = sqrt(1 - Sq(cosThetaD));\n // return sqrt(Sq(eta) - Sq(sinThetaD)) / cosThetaD;\n\n // Karis approximation for the modified refraction index for human hair (1.55)\n return 1.19 / cosThetaD + (0.36 * cosThetaD);\n}\n\nvoid GetHairAngleWorld(vec3 V, vec3 L, vec3 T, inout HairAngle angles)\n{\n angles.sinThetaO = dot(T, V);\n angles.sinThetaI = dot(T, L);\n\n float thetaO = asin(angles.sinThetaO);\n float thetaI = asin(angles.sinThetaI);\n angles.thetaH = (thetaI + thetaO) * 0.5;\n\n angles.cosThetaD = cos((thetaO - thetaI) * 0.5);\n angles.cosThetaO = cos(thetaO);\n angles.cosThetaI = cos(thetaI);\n\n // Projection onto the normal plane, and since phi is the relative angle, we take the cosine in this projection.\n vec3 VProj = V - angles.sinThetaO * T;\n vec3 LProj = L - angles.sinThetaI * T;\n angles.cosPhi = dot(LProj, VProj) * rsqrt(dot(LProj, LProj) * dot(VProj, VProj) + 1e-5); // zero-div guard\n angles.phi = acos(angles.cosPhi);\n\n // Fixed for approximate human hair IOR\n angles.sinThetaT = angles.sinThetaO / 1.55;\n angles.cosThetaT = SafeSqrt(1.0 - Sq(angles.sinThetaT));\n}\n\nvec3 D_LongitudinalScatteringGaussian(vec3 thetaH, vec3 beta)\n{\n float sqrtTwoPi = 2.50662827463100050241;\n return rcp(beta * sqrtTwoPi) * exp(-Sq(thetaH) / (2.0 * Sq(beta)));\n}\n\n#define PI 3.14159265359\n#define TWO_PI 6.28318530717958647693\n#define FOUR_PI ((2.0*TWO_PI))\n#define INV_PI 0.31830988618379067153776752674502872406891929148091\n\nvec3 GetRoughenedAzimuthalScatteringDistribution(float phi, float cosThetaD, float beta)\n{\n float X = (phi + TWO_PI) / FOUR_PI;\n float Y = cosThetaD;\n float Z = beta;\n\n // TODO: It should be possible to reduce the domain of the integration to 0 -> HALF/PI as it repeats. This will save memory.\n // return SAMPLE_TEXTURE3D_LOD(_PreIntegratedAverageHairFiberScattering, s_linear_clamp_sampler, vec3(X, Y, Z), 0).xyz;\n return texture(scatter_map, vec2(X,Y)).xyz*3.23;\n return vec3(0.0);\n}\n\n\n#define HAIR_H_TT 0.0\n#define HAIR_H_TRT 0.86602540378\n\nvec3 AbsorptionFromReflectance(vec3 diffuseColor, float azimuthalRoughness)\n{\n float beta = azimuthalRoughness;\n float beta2 = beta * beta;\n float beta3 = beta2 * beta;\n float beta4 = beta3 * beta;\n float beta5 = beta4 * beta;\n\n // Least squares fit of an inverse mapping between scattering parameters and scattering albedo.\n float denom = 5.969 - (0.215 * beta) + (2.532 * beta2) - (10.73 * beta3) + (5.574 * beta4) + (0.245 * beta5);\n\n vec3 t = log(diffuseColor) / denom;\n return t * t;\n}\n\nBSDFData init_bsdf(){\n BSDFData bsdfData;\n\n bsdfData.fresnel0=vec3(DEFAULT_HAIR_SPECULAR_VALUE);\n\n float cuticleAngle=0.1;\n // bsdfData.cuticleAngle = -cuticleAngle;\n bsdfData.cuticleAngleR = -cuticleAngle;\n bsdfData.cuticleAngleTT = cuticleAngle * 0.5;\n bsdfData.cuticleAngleTRT = cuticleAngle * 1.5;\n\n float roughnessL=0.1;\n bsdfData.roughnessR = roughnessL;\n bsdfData.roughnessTT = roughnessL * 0.5;\n bsdfData.roughnessTRT = roughnessL * 2.0;\n\n bsdfData.perceptualRoughnessRadial=0.3;\n bsdfData.absorption=AbsorptionFromReflectance(vec3(0.1),bsdfData.perceptualRoughnessRadial);\n\n return bsdfData;\n}\n\nCBSDF EvaluateBSDF(vec3 V, vec3 L, vec3 T, vec3 N, BSDFData bsdfData)\n{\n\n CBSDF cbsdf;\n\n\n // Approximation of the three primary paths in a hair fiber (R, TT, TRT), with concepts from:\n // "Strand-Based Hair Rendering in Frostbite" (Tafuri 2019)\n // "A Practical and Controllable Hair and Fur Model for Production Path Tracing" (Chiang 2016)\n // "Physically Based Hair Shading in Unreal" (Karis 2016)\n // "An Energy-Conserving Hair Reflectance Model" (d\'Eon 2011)\n // "Light Scattering from Human Hair Fibers" (Marschner 2003)\n\n // Reminder: All of these flags are known at compile time and the compiler will strip away the unused paths.\n\n // Retrieve angles via spherical coordinates in the hair shading space.\n HairAngle angles;\n GetHairAngleWorld(V, L, T, angles);\n\n vec3 alpha = vec3(\n bsdfData.cuticleAngleR,\n bsdfData.cuticleAngleTT,\n bsdfData.cuticleAngleTRT\n );\n\n vec3 beta = vec3(\n bsdfData.roughnessR,\n bsdfData.roughnessTT,\n bsdfData.roughnessTRT\n );\n\n // The index of refraction that can be used to analyze scattering in the normal plane (Bravais\' Law).\n float etaPrime = ModifiedRefractionIndex(angles.cosThetaD);\n\n // Reduced absorption coefficient.\n vec3 mu = bsdfData.absorption;\n\n // Various misc. terms reused between lobe evaluation.\n vec3 F=vec3(0.0);\n vec3 Tr=vec3(0.0);\n vec3 S=vec3(0.0);\n\n // Evaluate the longitudinal scattering for all three paths.\n vec3 M = D_LongitudinalScatteringGaussian(angles.thetaH - alpha, beta);\n // greater thetaH => smaller M\n\n // Save the attenuations in case of multiple scattering.\n vec3 A[3];\n\n // Fetch the preintegrated azimuthal distributions for each path\n vec3 D = GetRoughenedAzimuthalScatteringDistribution(angles.phi, angles.cosThetaD, bsdfData.perceptualRoughnessRadial);\n // phi=0 => max\n // phi=+-pi => 0\n // cosThetaD is cos(IO/2); greater IO angle => smaller cosThetaD; \n // 0 angle => cosThetaD=1; \n // full angle => cosThetaD=0;\n // cosThetaD no affect on 0\n\n // Solve the first three lobes (R, TT, TRT).\n\n // R\n {\n // Attenuation for this path as proposed by d\'Eon et al, replaced with a trig identity for cos half phi.\n A[0] = F_Schlick(bsdfData.fresnel0, sqrt(0.5 + 0.5 * dot(L, V)));\n S += M[0] * A[0] * D[0];\n }\n\n // TT\n if (true)\n {\n // Attenutation (Simplified for H = 0)\n float cosGammaO = SafeSqrt(1.0 - Sq(HAIR_H_TT));\n float cosTheta = angles.cosThetaO * cosGammaO;\n F = F_Schlick(bsdfData.fresnel0, cosTheta);\n\n float sinGammaT = HAIR_H_TT / etaPrime;\n float cosGammaT = SafeSqrt(1.0 - Sq(sinGammaT));\n Tr = exp(-mu * (2.0 * cosGammaT / angles.cosThetaT));\n\n A[1] = Sq(1.0 - F) * Tr;\n\n S += M[1] * A[1] * D[1];\n }\n\n // TRT\n {\n // Attenutation (Simplified for H = \u221a3/2)\n float cosGammaO = SafeSqrt(1.0 - Sq(HAIR_H_TRT));\n float cosTheta = angles.cosThetaO * cosGammaO;\n F = F_Schlick(bsdfData.fresnel0, cosTheta);\n\n float sinGammaT = HAIR_H_TRT / etaPrime;\n float cosGammaT = SafeSqrt(1.0 - Sq(sinGammaT));\n Tr = exp(-mu * (2.0 * cosGammaT / angles.cosThetaT));\n\n A[2] = Sq(1.0 - F) * F * Sq(Tr);\n\n S += M[2] * A[2] * D[2];\n }\n\n // TODO: Residual TRRT+ Lobe. (accounts for ~15% energy otherwise lost by the first three lobes).\n\n // This seems necesarry to match the reference.\n S *= INV_PI;\n\n // Transmission event is built into the model.\n // Some stubborn NaNs have cropped up due to the angle optimization, we suppress them here with a max for now.\n cbsdf.specR = max(S, 0.0);\n\n // gl_FragColor=vec4(cbsdf.specR,1.0);\n\n\n // Multiple Scattering\n#ifdef _USE_ADVANCED_MULTIPLE_SCATTERING\n if (true)\n {\n cbsdf.specR = EvaluateMultipleScattering(L, cbsdf.specR, bsdfData, alpha, beta, angles.thetaH, angles.sinThetaI, D, A);\n }\n else\n#endif\n {\n\n #ifdef _USE_LIGHT_FACING_NORMAL\n // The Kajiya-Kay model has a "built-in" transmission, and the \'NdotL\' is always positive.\n float cosTL = dot(T, L);\n float sinTL = sqrt(saturate(1.0 - cosTL * cosTL));\n float NdotL = sinTL; // Corresponds to the cosine w.r.t. the light-facing normal\n #else\n // Double-sided Lambert.\n float NdotL = dot(N, L);\n #endif\n \n float clampedNdotL = saturate(NdotL);\n\n\n #ifdef _USE_LIGHT_FACING_NORMAL\n // See "Analytic Tangent Irradiance Environment Maps for Anisotropic Surfaces".\n cbsdf.diffR = vec3(rcp(PI * PI) * clampedNdotL);\n // // Transmission is built into the model, and it\'s not exactly clear how to split it.\n // cbsdf.diffT = 0;\n #else\n // Double-sided Lambert.\n // cbsdf.diffR = vec3(Lambert() * clampedNdotL);\n cbsdf.diffR = vec3(clampedNdotL);\n #endif // _USE_LIGHT_FACING_NORMAL\n }\n\n return cbsdf;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvoid main() {\n\n float alpha = texture2D(alphaMap, vUV).g;\n if (alpha < alpha_test) discard;\n \n float roughness = texture2D(roughnessMap, vUV).g;\n\n // ====== \n // normal \n // ======\n\n vec3 tangent=normalize(vTangent);\n vec3 normal=normalize(vNormal);\n vec3 bitangent=normalize(cross(normal,tangent));\n\n vec3 tangent_normal_sample = texture2D(normalMap, vUV).xyz * 2.0 - 1.0;\n tangent_normal_sample.x*=-1.0;\n\n mat3 BTN=mat3( bitangent, tangent, normal );\n vec3 normal_perturb=normalize(BTN*tangent_normal_sample);\n vec3 viewNormal = mat3(viewMatrix)* normal_perturb;\n\n vec3 strand_dir=-bitangent;\n\n vec3 view_dir=normalize(-vViewPosition) * mat3(viewMatrix);\n vec3 light_dir=normalize(directionalLights[0].direction * mat3(viewMatrix));\n\n\n // vec3 specular_color_0=vec3(0.2);\n // vec3 specular_color_1=vec3(0.18,0.15,0.15);\n\n // vec3 specular_hair_0 = specular_color_0* StrandSpecular(ShiftTangent(strand_dir,normal_perturb,tangent_shift_0),normal_perturb, view_dir, light_dir, specular_exp_0);\n // vec3 specular_hair_1 = specular_color_1* StrandSpecular(ShiftTangent(strand_dir,normal_perturb,tangent_shift_1),normal_perturb, view_dir, light_dir, specular_exp_1);\n\n // vec3 specular_color=(specular_hair_0+specular_hair_1)*(0.1+specularLight);\n\n // vec3 color=diffuse * diffuseLight*0.2 + specular_color;\n\n\n // ======\n // anisotropic\n // ======\n\n float anisotropic_roughness=0.038;\n float anisotropic_strength=1.0;\n float specular_sample=texture(specular_map,vUV).g;\n vec3 base_sample=texture(diffuseMap,vUV).rgb;\n vec3 anisotropic_color=vec3(1.0,0.799,0.69);\n\n\n float anisotropic_IOR=anisotropic_roughness*4.0+1.0;\n\n float fresnel=fresnel_dielectric_cos(dot(view_dir,-strand_dir),anisotropic_IOR);\n float specular_rate=fresnel*specular_sample;\n\n vec3 final_anisotropic_color=mix(base_sample*0.2,anisotropic_color,specular_rate);\n\n\n\n\n vec3 diffuseLight = vec3(0.0);\n vec3 specularLight = vec3(0.0);\n\n // float shadow = getShadow(0.05);\n float shadow = getShadow2(0.0);\n // gl_FragColor=vec4(shadow);\n // return;\n\n float normalSpecularReflectance=0.027;\n beckmann_getLight(viewNormal, roughness, normalSpecularReflectance, vViewPosition, shadow, diffuseLight, specularLight);\n\n\n float geomOcclusion=1.0-roughness*roughness;\n \n vec4 irradianceSample = sampleLatLong(irradianceMap, normal_perturb);\n diffuseLight += irradianceSample.xyz;\n\n vec3 env_specular_sample = sampleLatLong(specularMap, reflect(-view_dir,normal_perturb)).xyz;\n\n\n vec3 env_specular_light=env_specular_sample * fresnel * geomOcclusion;\n specularLight += env_specular_light;\n\n\n // vec3 col = diffuse * diffuseLight + specularLight;\n vec3 color = final_anisotropic_color * diffuseLight;\n\n\n // gl_FragColor=vec4(color,1.0);\n gl_FragColor=vec4(env_specular_light,1.0);\n\n\n\n BSDFData b=init_bsdf();\n CBSDF c=EvaluateBSDF(view_dir, light_dir, bitangent, normal_perturb, b);\n\n // gl_FragColor=vec4(c.specR,1.0);\n // gl_FragColor=vec4(c.specR*env_specular_sample*shadow+env_specular_light*0.2+base_sample* diffuseLight*0.5,1.0);\n\n vec3 specular_light_color=c.specR*specular_sample*shadow*5.0*anisotropic_color;\n\n gl_FragColor=vec4(specular_light_color+env_specular_light*0.2+base_sample* diffuseLight*0.5,1.0);\n\n}\n',"sky_vertex.glsl":"\nvarying vec3 worldViewDir;\n\nvoid main() {\n vec3 worldPosition = (modelMatrix * vec4(position, 1.0)).xyz;\n worldViewDir = worldPosition - cameraPosition;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n","sky_fragment.glsl":"\nvarying vec3 worldViewDir;\n\n#ifdef LAT_LONG\nuniform sampler2D envMap;\n#else\nuniform samplerCube envMap;\n#endif\n\nuniform float exposure;\n\nvoid main()\n{\n vec3 elementDir = normalize(worldViewDir);\n#ifdef LAT_LONG\n gl_FragColor = sampleLatLong(envMap, elementDir);\n#else\n gl_FragColor = textureCube(envMap, elementDir);\n#endif\n\n#ifdef HDRE\n gl_FragColor.xyz = decodeHDRE(gl_FragColor);\n gl_FragColor.w = 1.0;\n#endif\n gl_FragColor.xyz *= exposure;\n}\n","dof_fragment.glsl":"\nuniform sampler2D source;\nuniform sampler2D blurred1;\nuniform sampler2D blurred2;\nuniform sampler2D depth;\n\nuniform float strength;\nuniform float focusDepth;\nuniform float focusRange;\nuniform float focusFalloff;\n\nvarying vec2 vUV;\n\nvoid main()\n{\n const float blendCutoff = .5;\n float depth = RGBA8ToFloat(texture2D(depth, vUV));\n float distance = abs(depth - focusDepth);\n\n float blurAmount = clamp((distance - focusRange) / focusFalloff, 0.0, 1.0);\n\n vec3 mainCol = decodeHDRE(texture2D(source, vUV));\n vec3 blurredCol1 = decodeHDRE(texture2D(blurred1, vUV));\n vec3 blurredCol2 = decodeHDRE(texture2D(blurred2, vUV));\n\n // for little blurs (0.0 - 0.25), use smaller amount, for (.5, 1.0), use larger blur\n float smallBlur = linearStep(0.0, blendCutoff, blurAmount);\n float largeBlur = linearStep(blendCutoff, 1.0, blurAmount);\n vec3 color = mix(blurredCol1, blurredCol2, largeBlur);\n color = mix(mainCol, color, smallBlur * strength);\n\n gl_FragColor = encodeHDRE(color);\n}\n","fxaa_tonemap_fragment.glsl":"\nuniform sampler2D tDiffuse;\nuniform vec2 rcpRenderTargetResolution;\nuniform float whitePoint;\n\n#define FXAA_REDUCE_MIN (1.0/128.0)\n#define FXAA_REDUCE_MUL (1.0/8.0)\n#define FXAA_SPAN_MAX (8.0)\n\n// Jim Hejl and Richard Burgess-Dawson\n#define TM_A 6.2\n#define TM_B .5\n#define TM_C 6.2\n#define TM_D 1.7\n#define TM_E 0.06\n\nvec3 toneMap(vec3 color)\n{\n return (color*(TM_A*color+TM_B))/(color*(TM_C*color+TM_D)+TM_E);\n}\n\nfloat toneMap(float val)\n{\n return (val*(TM_A*val+TM_B))/(val*(TM_C*val+TM_D)+TM_E);\n}\n\n// refer to: https://github.com/mattdesl/glsl-fxaa/blob/master/fxaa.glsl\nvoid main() {\n \n vec3 rgbNW = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( -1.0, -1.0 ) ) * rcpRenderTargetResolution ).xyz;\n vec3 rgbNE = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( 1.0, -1.0 ) ) * rcpRenderTargetResolution ).xyz;\n vec3 rgbSW = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( -1.0, 1.0 ) ) * rcpRenderTargetResolution ).xyz;\n vec3 rgbSE = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( 1.0, 1.0 ) ) * rcpRenderTargetResolution ).xyz;\n vec4 rgbaM = texture2D( tDiffuse, gl_FragCoord.xy * rcpRenderTargetResolution );\n vec3 rgbM = rgbaM.xyz;\n vec3 luma = vec3( 0.299, 0.587, 0.114 );\n\n float lumaNW = dot( rgbNW, luma );\n float lumaNE = dot( rgbNE, luma );\n float lumaSW = dot( rgbSW, luma );\n float lumaSE = dot( rgbSE, luma );\n float lumaM = dot( rgbM, luma );\n float lumaMin = min( lumaM, min( min( lumaNW, lumaNE ), min( lumaSW, lumaSE ) ) );\n float lumaMax = max( lumaM, max( max( lumaNW, lumaNE) , max( lumaSW, lumaSE ) ) );\n\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max( ( lumaNW + lumaNE + lumaSW + lumaSE ) * ( 0.25 * FXAA_REDUCE_MUL ), FXAA_REDUCE_MIN );\n\n float rcpDirMin = 1.0 / ( min( abs( dir.x ), abs( dir.y ) ) + dirReduce );\n dir = min( vec2( FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max( vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * rcpRenderTargetResolution;\n vec4 rgbA = (1.0/2.0) * (\n texture2D(tDiffuse, gl_FragCoord.xy * rcpRenderTargetResolution + dir * (1.0/3.0 - 0.5)) +\n texture2D(tDiffuse, gl_FragCoord.xy * rcpRenderTargetResolution + dir * (2.0/3.0 - 0.5)));\n vec4 rgbB = rgbA * (1.0/2.0) + (1.0/4.0) * (\n texture2D(tDiffuse, gl_FragCoord.xy * rcpRenderTargetResolution + dir * (0.0/3.0 - 0.5)) +\n texture2D(tDiffuse, gl_FragCoord.xy * rcpRenderTargetResolution + dir * (3.0/3.0 - 0.5)));\n float lumaB = dot(rgbB, vec4(luma, 0.0));\n\n vec3 color;\n if ( ( lumaB < lumaMin ) || ( lumaB > lumaMax ) ) {\n \n color = rgbA.xyz;\n\n } else {\n color = rgbB.xyz;\n }\n\n\n color = max(vec3(0.0), color - vec3(.004));\n color = toneMap(color) / toneMap(whitePoint);\n gl_FragColor = vec4(color, 1.0);\n}\n","sss_blur_vertex.glsl":"\nvarying vec2 vUV;\nvarying vec3 vViewVector;\n\nuniform mat4 unprojectionMatrix;\n\nvoid main()\n{\n gl_Position = vec4(position, 1.0);\n vUV = uv;\n vec4 unproj = unprojectionMatrix * vec4(position.xy, 0.0, 1.0);\n unproj /= unproj.w;\n vViewVector = -unproj.xyz / unproj.z;\n}\n","sss_blur_fragment.glsl":"\nvarying vec3 vViewVector;\nvarying vec2 vUV;\n\nuniform sampler2D tDiffuse;\nuniform sampler2D depthMap;\nuniform sampler2D sssProfileMap;\nuniform vec2 step;\nuniform vec3 color1;\nuniform vec3 color2;\nuniform vec3 color3;\nuniform float cameraNear;\nuniform float cameraRange;\nuniform float sssProfileScale;\nuniform float sssRange;\n\nvoid getContribution(in vec2 uv, inout vec3 prevPos, inout float totalDistance, inout vec3 totalWeights, inout vec3 acc1, inout vec3 acc2, inout vec3 acc3)\n{\n float depth = RGBA8ToFloat(texture2D(depthMap, uv));\n vec3 pos = vViewVector * (cameraNear + depth * cameraRange);\n float stepDist = distance(pos, prevPos);\n prevPos = pos;\n totalDistance += stepDist;\n\n vec3 weights = texture2D(sssProfileMap, vec2(totalDistance * sssProfileScale, 0.0)).yzw;\n\n if (totalDistance > sssRange)\n weights *= 0.0;\n\n totalWeights += weights;\n\n vec3 color = texture2D(tDiffuse, uv).xyz;\n\n acc1 += color * weights.x;\n acc2 += color * weights.y;\n acc3 += color * weights.z;\n}\n\nvoid main()\n{\n vec3 totalWeights = texture2D(sssProfileMap, vec2(0.0)).yzw;\n\n vec3 color = texture2D(tDiffuse, vUV).xyz;\n vec3 c1 = color * totalWeights.x;\n vec3 c2 = color * totalWeights.y;\n vec3 c3 = color * totalWeights.z;\n\n // centerDepth=(real_depth-near)/camera_range\n float centerDepth = RGBA8ToFloat(texture2D(depthMap, vUV));\n\n vec3 centerPos = vViewVector * (cameraNear + centerDepth * cameraRange);\n\n vec2 uvLeft = vUV;\n vec2 uvRight = vUV;\n vec3 posLeft = centerPos;\n vec3 posRight = centerPos;\n float distLeft = 0.0;\n float distRight = 0.0;\n\n for (int i = 0; i < RADIUS; ++i) {\n uvLeft -= step;\n uvRight += step;\n getContribution(uvLeft, posLeft, distLeft, totalWeights, c1, c2, c3);\n getContribution(uvRight, posRight, distRight, totalWeights, c1, c2, c3);\n }\n\n // blend together\n gl_FragColor.xyz = color1 * c1 / totalWeights.x;\n gl_FragColor.xyz += color2 * c2 / totalWeights.y;\n gl_FragColor.xyz += color3 * c3 / totalWeights.z;\n gl_FragColor.w = 1.0;\n}\n","sss_vertex.glsl":"\nvarying vec2 vUV;\nvarying vec3 vViewNormal;\nvarying vec3 vViewPosition;\nvarying vec4 vShadowCoord;\n\nuniform mat4 shadowMapMatrix;\n\nvoid main() {\n vec3 localPos = position;\n vec4 viewPos = modelViewMatrix * vec4(localPos, 1.0);\n vec4 worldPos = modelMatrix * vec4(localPos, 1.0);\n\n gl_Position = projectionMatrix * viewPos;\n vUV = uv;\n\n vViewNormal = normalMatrix * normal;\n vViewPosition = viewPos.xyz;\n vShadowCoord = shadowMapMatrix * worldPos * .5 + .5;\n}\n","sss_fragment.glsl":"\nvarying vec2 vUV;\nvarying vec3 vViewNormal;\nvarying vec3 vViewPosition;\nvarying vec4 vShadowCoord;\n\nuniform sampler2D normalMap;\nuniform sampler2D irradianceMap;\nuniform sampler2D shadowMap;\n\nuniform float probeExposure;\n\nvec3 perturbNormal2Arb(vec3 position, vec3 normal, vec3 normalSample)\n{\n vec3 q0 = dFdx( position.xyz );\n vec3 q1 = dFdy( position.xyz );\n vec2 st0 = dFdx( vUV.st );\n vec2 st1 = dFdy( vUV.st );\n vec3 S = normalize( q0 * st1.t - q1 * st0.t );\n vec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n vec3 N = normalize( normal );\n mat3 tsn = mat3( S, T, N );\n return normalize( tsn * normalSample );\n}\n\nvec3 getNormal()\n{\n vec4 normalSample = texture2D(normalMap, vUV);\n vec3 normal = normalSample.xyz * 2.0 - 1.0;\n return perturbNormal2Arb(vViewPosition, vViewNormal, normal);\n}\n\nvec2 getVSMMoments(vec2 uv)\n{\n vec4 s = texture2D(shadowMap, uv);\n#ifdef VSM_FLOAT\n return s.xy;\n#else\n return vec2(RG8ToFloat(s.xy), RG8ToFloat(s.zw));\n#endif\n}\n\nfloat getShadow(float offset)\n{\n vec4 coord = vShadowCoord;\n coord.z -= offset;\n vec2 moments = getVSMMoments(coord.xy);\n float p = linearStep(coord.z - 0.02, coord.z, moments.x);\n float variance = moments.y - moments.x * moments.x;\n variance = max(variance, MIN_VARIANCE);\n\n float diff = coord.z - moments.x;\n float upperBound = variance / (variance + diff*diff);\n float shadow = linearStep(LIGHT_BLEED_REDUCTION, 1.0, upperBound);\n return clamp(max(shadow, p), 0.0, 1.0);\n}\n\nvoid main() {\n vec3 viewNormal = getNormal();\n vec3 worldNormal = viewNormal * mat3(viewMatrix);\n float shadow = getShadow(0.0);\n vec3 diffuseLight = ggx_getDiffuseLight(viewNormal, vViewPosition, shadow);\n vec4 irradianceSample = sampleLatLong(irradianceMap, worldNormal);\n\n diffuseLight += irradianceSample.xyz * irradianceSample.xyz * probeExposure;\n\n // NOT APPLYING GAMMA!\n gl_FragColor = vec4(diffuseLight, 1.0);\n}\n","tiny_blur_hdre_fragment.glsl":"\nuniform sampler2D tDiffuse;\n\nvarying vec2 vUV;\n\nuniform vec2 sampleStep;\n\nvoid main()\n{\n vec3 col = decodeHDRE(texture2D(tDiffuse, vUV - sampleStep * .5));\n col += decodeHDRE(texture2D(tDiffuse, vUV + sampleStep * vec2(1.5, -.5)));\n col += decodeHDRE(texture2D(tDiffuse, vUV + sampleStep * vec2(-.5, 1.5)));\n col += decodeHDRE(texture2D(tDiffuse, vUV + sampleStep * 1.5));\n\n gl_FragColor = encodeHDRE(col * .25);\n}\n","tonemap_fragment.glsl":"\nuniform sampler2D tDiffuse;\nuniform float exposure;\n\nvarying vec2 vUV;\n\nvoid main()\n{\n vec4 hdre = texture2D(tDiffuse, vUV);\n vec3 color = decodeHDRE(hdre);\n \n // color *= color * exposure;\n // color = max(vec3(0.0), color.xyz - 0.004);\n\n // this has pow 2.2 gamma included, not valid if using fast gamma correction\n\n // Jim Hejl and Richard Burgess-Dawson\n /*float a = 6.2;\n float b = .5;\n float c = 6.2;\n float d = 1.7;\n float e = 0.06;*/\n\n // ACES\n float a = 2.51;\n float b = 0.03;\n float c = 2.43;\n float d = 0.59;\n float e = 0.14;\n\n gl_FragColor = vec4(saturate((color*(a*color+b))/(color*(c*color+d)+e)), 1.0);\n// gl_FragColor = vec4(color, 1.0);\n}\n","shadow_fragment.glsl":"\nvarying vec4 projection;\n\nuniform float depthBias;\n\nvoid main()\n{\n float depth = projection.z * .5 + .5;\n\n gl_FragColor = floatToRGBA8(depth + depthBias);\n}\n","shadow_vertex.glsl":"\nvarying vec4 projection;\nvarying vec2 vUV;\n\n\nvoid main()\n{\n gl_Position = projection = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n vUV = uv;\n}\n","vsm_fragment.glsl":"\nvarying vec4 projection;\n\nvoid main()\n{\n float depth = projection.z * .5 + .5;\n float dx = dFdx(depth);\n float dy = dFdy(depth);\n float moment2 = depth * depth + 0.25*(dx*dx + dy*dy);\n\n#ifdef FLOAT_TEX\n gl_FragColor = vec4(depth, moment2, 0.0, 1.0);\n#else\n gl_FragColor = vec4(floatToRG8(depth), floatToRG8(moment2));\n#endif\n}\n","vsm_hair_fragment.glsl":"\nvarying vec4 projection;\nuniform sampler2D alphaMap;\nvarying vec2 vUV;\nuniform float alpha_test;\n\nvoid main()\n{\n float alpha = texture2D(alphaMap, vUV).g;\n if (alpha < alpha_test) discard;\n\n float depth = projection.z * .5 + .5;\n float dx = dFdx(depth);\n float dy = dFdy(depth);\n float moment2 = depth * depth + 0.25*(dx*dx + dy*dy);\n\n#ifdef FLOAT_TEX\n gl_FragColor = vec4(depth, moment2, 0.0, 1.0);\n#else\n gl_FragColor = vec4(floatToRG8(depth), floatToRG8(moment2));\n#endif\n}\n","vsm_blur_vertex.glsl":"\nvarying vec2 vUV;\nvoid main() {\n vUV = uv;\n gl_Position = vec4(position, 1.0);\n}","vsm_blur_fragment.glsl":"\n#define RADIUS 2\n#define NUM_SAMPLES (RADIUS * 2 + 1)\n\nuniform sampler2D tDiffuse;\nuniform vec2 step;\n\nvarying vec2 vUV;\n\nvec2 getShadowValue(vec2 uv)\n{\n vec4 s = texture2D(tDiffuse, uv);\n#ifdef FLOAT_TEX\n return s.xy;\n#else\n return vec2(RG8ToFloat(s.xy), RG8ToFloat(s.zw));\n#endif\n}\n\nvoid main() {\n vec2 sum = getShadowValue(vUV);\n\n for (int i = 1; i <= RADIUS; ++i) {\n float fi = float(i);\n sum += getShadowValue(vUV - step * fi);\n sum += getShadowValue(vUV + step * fi);\n }\n\n sum /= float(NUM_SAMPLES);\n#ifdef FLOAT_TEX\n gl_FragColor = vec4(sum, 0.0, 1.0);\n#else\n gl_FragColor.xy = floatToRG8(sum.x);\n gl_FragColor.zw = floatToRG8(sum.y);\n#endif\n}\n","gaussian_blur_hdre_fragment.glsl":"\nuniform sampler2D tDiffuse;\n\nvarying vec2 vUV;\n\nuniform vec2 sampleStep;\nuniform float weights[NUM_WEIGHTS];\n\nvoid main()\n{\n vec3 col = decodeHDRE(texture2D(tDiffuse, vUV)) * weights[0];\n\n for (int i = 1; i <= KERNEL_RADIUS; ++i) {\n vec2 offset = float(i) * sampleStep;\n col += (decodeHDRE(texture2D(tDiffuse, vUV + offset)) + decodeHDRE(texture2D(tDiffuse, vUV - offset))) * weights[i];\n }\n\n gl_FragColor = encodeHDRE(col);\n}\n","post_vertex.glsl":"\nvarying vec2 vUV;\n\nvoid main()\n{\n gl_Position = vec4(position, 1.0);\n vUV = uv;\n}\n","post_z_vertex.glsl":"\nvarying vec2 vUV;\nvarying vec3 viewVector;\n\nuniform mat4 unprojectionMatrix;\n\nvoid main()\n{\n gl_Position = vec4(position, 1.0);\n vUV = uv;\n vec4 unproj = unprojectionMatrix * vec4(position.xy, 0.0, 1.0);\n unproj /= unproj.w;\n viewVector = -unproj.xyz / unproj.z;\n}\n","unlit_fragment.glsl":"\n#ifdef diffuse_MAP\nvarying vec2 texCoords;\nuniform sampler2D diffuseMap;\n#endif\n\nuniform vec3 color;\nuniform float opacity;\n\n#ifdef FOG\nvarying vec3 viewPosition;\n\nuniform float fogDensity;\nuniform vec3 fogColor;\n#endif\n\nvoid main() {\n float alpha = opacity;\n#ifdef diffuse_MAP\n vec4 diffuse = texture2D(diffuseMap, texCoords);\n alpha *= diffuse.w;\n diffuse.xyz *= diffuse.xyz;\n diffuse.xyz *= color;\n vec3 col = diffuse.xyz;\n#else\n vec3 col = color;\n#endif\n\n#ifdef FOG\n float fogAmount = clamp(exp2(viewPosition.z * fogDensity), 0.0, 1.0);\n col = mix(fogColor, col, fogAmount);\n#endif\n\n#ifdef HDRE\n gl_FragColor = encodeHDRE(sqrt(col));\n#else\n// col *= alpha;\n gl_FragColor = vec4(sqrt(col), alpha);\n#endif\n}\n","unlit_vertex.glsl":"\n#ifdef diffuse_MAP\nvarying vec2 texCoords;\n#endif\n\n#ifdef FOG\nvarying vec3 viewPosition;\n#endif\n\nvoid main() {\n vec3 localPos = position;\n vec4 viewPos = modelViewMatrix * vec4(localPos, 1.0);\n gl_Position = projectionMatrix * viewPos;\n#ifdef FOG\n viewPosition = viewPos.xyz;\n#endif\n\n#ifdef diffuse_MAP\n texCoords = uv;\n#endif\n}\n"},fx={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tgl_FragColor = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor.a *= opacity;\n\n\n\t\t}"},px=function(){function e(){y(this,e),this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}return _(e,[{key:"setSize",value:function(){}},{key:"render",value:function(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}},{key:"dispose",value:function(){}}]),e}(),gx=new ww(-1,1,1,-1,0,1),mx=new Sy;mx.setAttribute("position",new vy([-1,3,0,-1,-1,0,3,-1,0],3)),mx.setAttribute("uv",new vy([0,2,0,0,2,0],2));var vx=function(){function e(t){y(this,e),this._mesh=new Ny(mx,t)}return _(e,[{key:"dispose",value:function(){this._mesh.geometry.dispose()}},{key:"render",value:function(e){e.render(this._mesh,gx)}},{key:"material",get:function(){return this._mesh.material},set:function(e){this._mesh.material=e}}]),e}(),yx=function(e){x(n,e);var t=U(n);function n(e,r){var i;return y(this,n),(i=t.call(this)).textureID=void 0!==r?r:"tDiffuse",e instanceof jy?(i.uniforms=e.uniforms,i.material=e):e&&(i.uniforms=Wy.clone(e.uniforms),i.material=new jy({defines:Object.assign({},e.defines),uniforms:i.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),i.fsQuad=new vx(i.material),i}return _(n,[{key:"render",value:function(e,t,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}},{key:"dispose",value:function(){this.material.dispose(),this.fsQuad.dispose()}}]),n}(px),wx=function(e){x(n,e);var t=U(n);function n(e,r){var i;return y(this,n),(i=t.call(this)).scene=e,i.camera=r,i.clear=!0,i.needsSwap=!1,i.inverse=!1,i}return _(n,[{key:"render",value:function(e,t,n){var r,i,a=e.getContext(),A=e.state;A.buffers.color.setMask(!1),A.buffers.depth.setMask(!1),A.buffers.color.setLocked(!0),A.buffers.depth.setLocked(!0),this.inverse?(r=0,i=1):(r=1,i=0),A.buffers.stencil.setTest(!0),A.buffers.stencil.setOp(a.REPLACE,a.REPLACE,a.REPLACE),A.buffers.stencil.setFunc(a.ALWAYS,r,4294967295),A.buffers.stencil.setClear(i),A.buffers.stencil.setLocked(!0),e.setRenderTarget(n),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),A.buffers.color.setLocked(!1),A.buffers.depth.setLocked(!1),A.buffers.stencil.setLocked(!1),A.buffers.stencil.setFunc(a.EQUAL,1,4294967295),A.buffers.stencil.setOp(a.KEEP,a.KEEP,a.KEEP),A.buffers.stencil.setLocked(!0)}}]),n}(px),Bx=function(e){x(n,e);var t=U(n);function n(){var e;return y(this,n),(e=t.call(this)).needsSwap=!1,e}return _(n,[{key:"render",value:function(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}]),n}(px),_x=function(){function e(t,n){if(y(this,e),this.renderer=t,void 0===n){var r=t.getSize(new xm);this._pixelRatio=t.getPixelRatio(),this._width=r.width,this._height=r.height,(n=new jm(this._width*this._pixelRatio,this._height*this._pixelRatio)).texture.name="EffectComposer.rt1"}else this._pixelRatio=1,this._width=n.width,this._height=n.height;this.renderTarget1=n,this.renderTarget2=n.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new yx(fx),this.clock=new Nb}return _(e,[{key:"swapBuffers",value:function(){var e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}},{key:"addPass",value:function(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}},{key:"insertPass",value:function(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}},{key:"removePass",value:function(e){var t=this.passes.indexOf(e);-1!==t&&this.passes.splice(t,1)}},{key:"isLastEnabledPass",value:function(e){for(var t=e+1;t<this.passes.length;t++)if(this.passes[t].enabled)return!1;return!0}},{key:"render",value:function(e){void 0===e&&(e=this.clock.getDelta());for(var t=this.renderer.getRenderTarget(),n=!1,r=0,i=this.passes.length;r<i;r++){var a=this.passes[r];if(!1!==a.enabled){if(a.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(r),a.render(this.renderer,this.writeBuffer,this.readBuffer,e,n),a.needsSwap){if(n){var A=this.renderer.getContext(),o=this.renderer.state.buffers.stencil;o.setFunc(A.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),o.setFunc(A.EQUAL,1,4294967295)}this.swapBuffers()}void 0!==wx&&(a instanceof wx?n=!0:a instanceof Bx&&(n=!1))}}this.renderer.setRenderTarget(t)}},{key:"reset",value:function(e){if(void 0===e){var t=this.renderer.getSize(new xm);this._pixelRatio=this.renderer.getPixelRatio(),this._width=t.width,this._height=t.height,(e=this.renderTarget1.clone()).setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=e,this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}},{key:"setSize",value:function(e,t){this._width=e,this._height=t;var n=this._width*this._pixelRatio,r=this._height*this._pixelRatio;this.renderTarget1.setSize(n,r),this.renderTarget2.setSize(n,r);for(var i=0;i<this.passes.length;i++)this.passes[i].setSize(n,r)}},{key:"setPixelRatio",value:function(e){this._pixelRatio=e,this.setSize(this._width,this._height)}},{key:"dispose",value:function(){this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.copyPass.dispose()}}]),e}(),bx=function(e){x(n,e);var t=U(n);function n(e,r,i,a,A){var o;return y(this,n),(o=t.call(this)).scene=e,o.camera=r,o.overrideMaterial=i,o.clearColor=a,o.clearAlpha=void 0!==A?A:0,o.clear=!0,o.clearDepth=!1,o.needsSwap=!1,o._oldClearColor=new Nm,o}return _(n,[{key:"render",value:function(e,t,n){var r,i,a=e.autoClear;e.autoClear=!1,void 0!==this.overrideMaterial&&(i=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor&&(e.getClearColor(this._oldClearColor),r=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:n),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor&&e.setClearColor(this._oldClearColor,r),void 0!==this.overrideMaterial&&(this.scene.overrideMaterial=i),e.autoClear=a}}]),n}(px),xx={uniforms:{tDiffuse:{value:null},powRGB:{value:new Jm(2,2,2)},mulRGB:{value:new Jm(1,1,1)},addRGB:{value:new Jm(0,0,0)}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform vec3 powRGB;\n\t\tuniform vec3 mulRGB;\n\t\tuniform vec3 addRGB;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tgl_FragColor = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor.rgb = mulRGB * pow( ( gl_FragColor.rgb + addRGB ), powRGB );\n\n\t\t}"};var Cx={uniforms:{tDiffuse:{value:null},step:{value:new xm(1/512,0)}},vertexShader:hx.get("vsm_blur_vertex"),fragmentShader:hx.get("vsm_blur_fragment")},Sx={uniforms:{tDiffuse:{value:null},sampleStep:{value:new xm},weights:{value:[]}},vertexShader:hx.get("post_vertex"),fragmentShader:hx.get("tiny_blur_hdre_fragment")},Ex={uniforms:{source:{value:null},blurred1:{value:null},blurred2:{value:null},depth:{value:null},strength:{value:1},focusDepth:{value:.5},focusRange:{value:.1},focusFalloff:{value:.1}},vertexShader:hx.get("post_vertex"),fragmentShader:hx.get("dof_fragment")},Ux={uniforms:{tDiffuse:{value:null},rcpRenderTargetResolution:{value:new xm},whitePoint:{value:1.3}},vertexShader:hx.get("post_vertex"),fragmentShader:hx.get("fxaa_tonemap_fragment")},Mx=(new xm,hx.get("post_vertex"),hx.get("gaussian_blur_hdre_fragment"),{defines:{RADIUS:8},uniforms:{tDiffuse:{value:null},depthMap:{value:null},color1:{value:null},color2:{value:null},color3:{value:null},sssProfileMap:{value:null},sssProfileScale:{value:1},sssRange:{value:1},step:{value:new xm(1/512,0)},unprojectionMatrix:{value:new Ev},cameraNear:{value:0},cameraRange:{value:0}},vertexShader:hx.get("sss_blur_vertex"),fragmentShader:hx.get("sss_blur_fragment")});var Fx=function(){for(var e={},t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var r=t[n].split("=");if("undefined"==typeof e[r[0]])e[r[0]]=decodeURIComponent(r[1]);else if("string"==typeof e[r[0]]){var i=[e[r[0]],decodeURIComponent(r[1])];e[r[0]]=i}else e[r[0]].push(decodeURIComponent(r[1]))}return e}(),Tx=(Fx.debug&&"0"!==Fx.debug&&Fx.debug,!(/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent)||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent))&&!Fx.lowPerformance);function kx(e){Object.keys(e).forEach((function(t){e[t]&&e[t].dispose&&(console.log("dispose",t),e[t].dispose(),e[t]=null)}))}var Qx=function(){function e(t){y(this,e),this._amplitude=1/Math.sqrt(2*t*Math.PI),this._expScale=-1/(2*t)}return _(e,[{key:"getValueAt",value:function(e){return this._amplitude*Math.pow(Math.E,e*e*this._expScale)}}]),e}(),Lx=function(e){var t=e.extensions;return t.get("OES_texture_half_float_linear")?tg:t.get("OES_texture_float_linear")?eg:Xp},Dx=function(){function e(t,n,r){y(this,e),this._width=t,this._height=n,this._sourceFBO=new jm(t,n,r),this._targetFBO=new jm(t,n,r),this._sourceFBO.texture.generateMipmaps=r.generateMipmaps||!1,this._targetFBO.texture.generateMipmaps=r.generateMipmaps||!1}return _(e,[{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"source",get:function(){return this._sourceFBO.texture}},{key:"target",get:function(){return this._targetFBO}},{key:"swap",value:function(){var e=this._sourceFBO;this._sourceFBO=this._targetFBO,this._targetFBO=e}}]),e}(),Ix=function(){function e(t,n){y(this,e),this._renderer=t,this._scene=new V_,this._camera=new ww(-1,1,1,-1,0,1),this._mesh=n||new Ny(new lw(2,2),null),this._scene.add(this._mesh)}return _(e,[{key:"execute",value:function(e,t,n,r){var i=this._renderer.autoClear;this._renderer.autoClear=void 0===n||n,this._mesh.material=e,this._renderer.setRenderTarget(t),this._renderer.render(this._scene,r||this._camera),this._renderer.setRenderTarget(null),this._renderer.autoClear=i}}]),e}(),Rx=function(e){x(n,e);var t=U(n);function n(e){var r;y(this,n);var i="";return e&&(i+="#define FLOAT_TEX\n"),(r=t.call(this,{vertexShader:hx.get("shadow_vertex"),fragmentShader:i+hx.get("vsm_fragment")})).extensions.derivatives=!0,r.side=jf,r}return _(n)}(jy),Hx=function(e){x(n,e);var t=U(n);function n(e){var r;y(this,n);var i="";return e&&(i+="#define FLOAT_TEX\n"),(r=t.call(this,{uniforms:{alphaMap:{value:null},alpha_test:{value:.5}},vertexShader:hx.get("shadow_vertex"),fragmentShader:i+hx.get("vsm_hair_fragment")})).extensions.derivatives=!0,r.side=Xf,r}return _(n)}(jy),Px=function(){function e(){y(this,e),this._listeners=[],this._lookUp={}}return _(e,[{key:"bind",value:function(e,t){this._lookUp[e]=this._listeners.length;var n=t?e.bind(t):e;this._listeners.push(n)}},{key:"unbind",value:function(e){var t=this._lookUp[e];this._listeners.splice(t,1),delete this._lookUp[e]}},{key:"dispatch",value:function(e){for(var t=this._listeners.length,n=0;n<t;++n)this._listeners[n](e)}},{key:"hasListeners",get:function(){return this._listeners.length>0}}]),e}(),Nx=function(e){x(n,e);var t=U(n);function n(e,r,i,a){y(this,n);var A=new Vy(r=r||1e3,r,r);A.scale(-1,1,1);var o=new Ox({envMap:e,exposure:i||0,hdre:a});return t.call(this,A,o)}return _(n,[{key:"texture",get:function(){return this.material.envMap},set:function(e){this.material.envMap=e}}]),n}(Ny),Ox=function(e){x(n,e);var t=U(n);function n(e){var r;y(this,n);var i={};e.envMap instanceof Km&&(i.LAT_LONG="1"),e.hdre&&(i.HDRE="1");var a={envMap:{value:e.envMap},exposure:{value:Math.pow(2,e.exposure||0)}};return(r=t.call(this,{uniforms:a,defines:i,vertexShader:hx.get("sky_vertex"),fragmentShader:hx.get("sky_fragment")}))._envMap=e.envMap,r}return _(n,[{key:"envMap",get:function(){return this._envMap},set:function(e){this._envMap=e,this.uniforms.envMap.value=e}}]),n}(jy),Vx=function(e){x(n,e);var t=U(n);function n(e,r,i){var a;return y(this,n),(a=t.call(this))._container=e,a._coords=new Jm(.5*Math.PI,.4*Math.PI,2),a._localAcceleration=new Jm(0,0,0),a._localVelocity=new Jm(0,0,0),a.lookAtTarget=r||new Jm(0,0,0),a.zoomSpeed=2,a.maxRadius=20,a.minRadius=.1,a.dampen=.9,a.maxAzimuth=void 0,a.minAzimuth=void 0,a.minPolar=.1,a.maxPolar=Math.PI-.1,a.moveAcceleration=.02,a._m=new Ev,a._oldMouseX=0,a._oldMouseY=0,a._moveWithKeys=i,a._moveAcceleration=new Jm,a._moveVelocity=new Jm,a._isDown=!1,a.mouse_constant=.0015,a._initListeners(),a}return _(n,[{key:"radius",get:function(){return this._coords.z},set:function(e){this._coords.z=e}},{key:"azimuth",get:function(){return this._coords.x},set:function(e){this._coords.x=e}},{key:"polar",get:function(){return this._coords.y},set:function(e){this._coords.y=e}},{key:"onAdded",value:function(){this._isDown=!1;var e=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";this._container.addEventListener(e,this._onMouseWheel),document.addEventListener("mousemove",this._onMouseMove),document.addEventListener("touchmove",this._onTouchMove),this._container.addEventListener("mousedown",this._onMouseDown),this._container.addEventListener("touchstart",this._onTouchDown),document.addEventListener("mouseup",this._onUp),document.addEventListener("touchend",this._onUp),this._moveWithKeys&&(document.addEventListener("keyup",this._onKeyUp),document.addEventListener("keydown",this._onKeyDown))}},{key:"onRemoved",value:function(){var e=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";this._container.removeEventListener(e,this._onMouseWheel),this._container.removeEventListener("mousemove",this._onMouseMove),this._container.removeEventListener("touchmove",this._onTouchMove),this._container.removeEventListener("mousedown",this._onMouseDown),this._container.removeEventListener("touchstart",this._onTouchDown),this._container.removeEventListener("mouseup",this._onUp),this._container.removeEventListener("touchend",this._onUp),this._moveWithKeys&&(document.removeEventListener("keyup",this._onKeyUp),document.removeEventListener("keydown",this._onKeyDown))}},{key:"onUpdate",value:function(e){if(this._moveWithKeys){this._moveVelocity.x*=this.dampen,this._moveVelocity.y*=this.dampen,this._moveVelocity.z*=this.dampen,this._moveVelocity.x+=this._moveAcceleration.x,this._moveVelocity.y+=this._moveAcceleration.y,this._moveVelocity.z+=this._moveAcceleration.z;var t=new Jm;t.copy(this._moveVelocity),t.applyQuaternion(this.entity.quaternion.setFromRotationMatrix(this.entity.matrixWorld)),this.lookAtTarget.x+=t.x,this.lookAtTarget.y+=this._moveVelocity.y,this.lookAtTarget.z+=t.z}this._localVelocity.x*=this.dampen,this._localVelocity.y*=this.dampen,this._localVelocity.z*=this.dampen,this._localVelocity.x+=this._localAcceleration.x,this._localVelocity.y+=this._localAcceleration.y,this._localVelocity.z+=this._localAcceleration.z,this._localAcceleration.x=0,this._localAcceleration.y=0,this._localAcceleration.z=0,this._coords.add(this._localVelocity),this._coords.y=bm.clamp(this._coords.y,this.minPolar,this.maxPolar),this._coords.z=bm.clamp(this._coords.z,this.minRadius,this.maxRadius),void 0!==this.maxAzimuth&&void 0!==this.minAzimuth&&(this._coords.x=bm.clamp(this._coords.x,this.minAzimuth,this.maxAzimuth));var n=this.entity,r=this._m,i=this._fromSphericalCoordinates(this._coords.z,this._coords.x,this._coords.y);i.add(this.lookAtTarget),r.lookAt(i,this.lookAtTarget,new Jm(0,1,0)),r.setPosition(i),r.decompose(n.position,n.quaternion,n.scale)}},{key:"_fromSphericalCoordinates",value:function(e,t,n){var r=new Jm;return r.x=e*Math.sin(n)*Math.cos(t),r.y=e*Math.cos(n),r.z=e*Math.sin(n)*Math.sin(t),r}},{key:"setAzimuthImpulse",value:function(e){this._localAcceleration.x=e}},{key:"setPolarImpulse",value:function(e){this._localAcceleration.y=e}},{key:"setZoomImpulse",value:function(e){this._localAcceleration.z=e}},{key:"_updateMove",value:function(e,t){if(void 0!==this._oldMouseX){var n=e-this._oldMouseX,r=t-this._oldMouseY;this.setAzimuthImpulse(this.mouse_constant*n),this.setPolarImpulse(this.mouse_constant*-r)}this._oldMouseX=e,this._oldMouseY=t}},{key:"_initListeners",value:function(){var e=this;this._onMouseWheel=function(t){var n=t.detail?-120*t.detail:t.wheelDelta;t.preventDefault(),e.setZoomImpulse(-n*e.zoomSpeed*1e-4)},this._onMouseDown=function(t){e._oldMouseX=void 0,e._oldMouseY=void 0,e._isDown=!0},this._onMouseMove=function(t){e._isDown&&e._updateMove(t.screenX,t.screenY)},this._onTouchDown=function(t){if(e._oldMouseX=void 0,e._oldMouseY=void 0,2===t.touches.length){var n=t.touches[0],r=t.touches[1],i=n.screenX-r.screenX,a=n.screenY-r.screenY;e._startPitchDistance=Math.sqrt(i*i+a*a),e._startZoom=e.radius}e._isDown=!0},this._onTouchMove=function(t){if(t.preventDefault(),e._isDown){var n=t.touches.length;if(1===n){var r=t.touches[0];e._updateMove(r.screenX,r.screenY)}else if(2===n){var i=t.touches[0],a=t.touches[1],A=i.screenX-a.screenX,o=i.screenY-a.screenY,s=Math.sqrt(A*A+o*o),l=e._startPitchDistance-s;e.radius=e._startZoom+.2*l}}},this._onUp=function(t){e._isDown=!1},this._onKeyUp=function(t){switch(t.keyCode){case 69:case 81:e._moveAcceleration.y=0;break;case 37:case 65:case 39:case 68:e._moveAcceleration.x=0;break;case 38:case 87:case 40:case 83:e._moveAcceleration.z=0}},this._onKeyDown=function(t){switch(t.keyCode){case 81:e._moveAcceleration.y=-e.moveAcceleration;break;case 69:e._moveAcceleration.y=e.moveAcceleration;break;case 37:case 65:e._moveAcceleration.x=-e.moveAcceleration;break;case 38:case 87:e._moveAcceleration.z=-e.moveAcceleration;break;case 39:case 68:e._moveAcceleration.x=e.moveAcceleration;break;case 40:case 83:e._moveAcceleration.z=e.moveAcceleration}}}}]),n}(function(){function e(){y(this,e),this._entity=null}return _(e,[{key:"onAdded",value:function(){}},{key:"onRemoved",value:function(){}},{key:"entity",get:function(){return this._entity}}]),e}()),zx=function(e){e._components=[],e._requiresUpdates=!1,e._onRequireUpdatesChange=new Px,e._update=function(e){var t=this._components;if(t)for(var n=t.length,r=0;r<n;++r){var i=t[r];i.onUpdate&&i.onUpdate(e)}},e._updateRequiresUpdates=function(e){e!==this._requiresUpdates&&(this._requiresUpdates=e,this._onRequireUpdatesChange.dispatch(this))}},Gx={ENGINE:new(function(){function e(){y(this,e),this._updateableEntities=[],this._updateQueue=[],this._destroyQueue=[]}return _(e,[{key:"registerEntity",value:function(e){e._onRequireUpdatesChange.bind(this._onEntityUpdateChange,this),e._requiresUpdates&&this._addUpdatableEntity(e)}},{key:"unregisterEntity",value:function(e){e._onRequireUpdatesChange.unbind(this),e._requiresUpdates&&this._removeUpdatableEntity(e)}},{key:"destroyEntity",value:function(e){e._onRequireUpdatesChange.unbind(this),e._requiresUpdates&&this._removeUpdatableEntity(e),this._destroyQueue.push(e)}},{key:"_onEntityUpdateChange",value:function(e){e._requiresUpdates?this._addUpdatableEntity(e):this._removeUpdatableEntity(e)}},{key:"_addUpdatableEntity",value:function(e){this._updateQueue.push({entity:e,updatable:!0})}},{key:"_removeUpdatableEntity",value:function(e){this._updateQueue.push({entity:e,updatable:!1})}},{key:"_processUpdateQueue",value:function(){var e=this._updateQueue.length;if(0!==e){for(var t=0;t<e;++t){var n=this._updateQueue[t],r=n.entity;if(n.updatable)this._updateableEntities.push(r);else{var i=this._updateableEntities.indexOf(r);this._updateableEntities.splice(i,1)}}this._updateQueue=[]}}},{key:"_processDestroyQueue",value:function(){var e=this._destroyQueue.length;if(0!==e){for(var t=0;t<e;++t){var n=this._destroyQueue[t];delete n._components,delete n._requiresUpdates,delete n._onRequireUpdatesChange,delete n._update,delete n._updateRequiresUpdates}this._destroyQueue=[]}}},{key:"update",value:function(e){this._processUpdateQueue(),this._processDestroyQueue();for(var t=this._updateableEntities,n=t.length,r=0;r<n;++r)t[r]._update(e)}}]),e}()),isEntity:function(e){return!!e._components},convert:function(e){Gx.isEntity(e)||(zx(e),Gx.ENGINE.registerEntity(e))},destroy:function(e){Gx.ENGINE.destroyEntity(e)},addComponents:function(e,t){for(var n=0;n<t.length;++n)Gx.addComponent(e,t[n])},removeComponents:function(e,t){for(var n=0;n<t.length;++n)Gx.removeComponent(e,t[n])},addComponent:function(e,t){if(t._entity)throw new Error("Component already added to an entity!");Gx.convert(e),e._components.push(t),e._updateRequiresUpdates(this._requiresUpdates||!!t.onUpdate),t._entity=e,t.onAdded()},hasComponent:function(e,t){return e._components&&e._components.indexOf(t)>=0},removeComponent:function(e,t){if(!Gx.hasComponent(e,t))throw new Error("Component wasn't added to this entity!");t.onRemoved();for(var n=!1,r=e._components.length,i=0,a=[],A=0;A<r;++A){var o=e._components[A];o!==t&&(a[i++]=o,n=n||!!t.onUpdate)}e._components=0===i?null:a,t._entity=null,e._updateRequiresUpdates(n)}};var Kx=function(e){x(n,e);var t=U(n);function n(){return y(this,n),t.call(this,{uniforms:{cameraNear:{value:0},rcpCameraRange:{value:0}},vertexShader:hx.get("linear_depth_vertex"),fragmentShader:hx.get("linear_depth_fragment")})}return _(n,[{key:"cameraNear",get:function(){return this.uniforms.cameraNear.value},set:function(e){this.uniforms.cameraNear.value=e}},{key:"rcpCameraRange",get:function(){return this.uniforms.rcpCameraRange.value},set:function(e){this.uniforms.rcpCameraRange.value=e}}]),n}(jy),Wx=function(e){x(n,e);var t=U(n);function n(){var e;return y(this,n),(e=t.call(this,{uniforms:{cameraNear:{value:0},rcpCameraRange:{value:0},alphaMap:{value:null},alpha_test:{value:.5},layer:{value:new Number(0)}},vertexShader:hx.get("linear_depth_vertex"),fragmentShader:hx.get("linear_hair_depth_fragment")})).side=Xf,e}return _(n,[{key:"cameraNear",get:function(){return this.uniforms.cameraNear.value},set:function(e){this.uniforms.cameraNear.value=e}},{key:"rcpCameraRange",get:function(){return this.uniforms.rcpCameraRange.value},set:function(e){this.uniforms.rcpCameraRange.value=e}}]),n}(jy),jx=function(){function e(t,n,r,i){y(this,e),this._renderer=r,this._scene=t,this._camera=n,this._scale=i||1,this._depthMaterial=new Kx,this._hair_depthMaterial=new Wx,tC.override_setting.depth.face=this._depthMaterial,tC.override_setting.depth.hair=this._hair_depthMaterial}return _(e,[{key:"texture",get:function(){return this._renderTarget.texture}},{key:"resize",value:function(e,t){e=Math.ceil(e*this._scale),t=Math.ceil(t*this._scale),this._renderTarget&&this._renderTarget.width===e&&this._renderTarget.height===t||(this._renderTarget=new jm(e,t,{minFilter:Kp,magFilter:Kp,generateMipmaps:!1,depthBuffer:!0,stencilBuffer:!1})),this._renderTarget2&&this._renderTarget2.width===e&&this._renderTarget2.height===t||(this._renderTarget2=new jm(e,t,{minFilter:Kp,magFilter:Kp,generateMipmaps:!1,depthBuffer:!0,stencilBuffer:!1})),this.width=e,this.height=t}},{key:"render",value:function(){this._depthMaterial.cameraNear=this._camera.near,this._depthMaterial.rcpCameraRange=1/(this._camera.far-this._camera.near),this._hair_depthMaterial.cameraNear=this._camera.near,this._hair_depthMaterial.rcpCameraRange=1/(this._camera.far-this._camera.near),this._renderer.setClearColor(16777215,1),tC.override("depth"),this._hair_depthMaterial.uniforms.layer.value=0,this._renderer.setRenderTarget(this._renderTarget),nC.render_type===$x.Type.DEPTH_MAP&&this._renderer.setRenderTarget(null),this._renderer.clear();try{this._renderer.render(this._scene,this._camera)}catch(e){console.log(e),window.location.replace("https://hyperhuman.deemos.com/error")}this._renderer.setRenderTarget(null),tC.unoverride(),this._renderer.setClearColor(0,1)}},{key:"dispose",value:function(){kx(this)}}]),e}(),Xx=function(){function e(t,n,r,i){y(this,e),i=void 0===i?1024:i,this.onUpdate=new Px;var a=Lx(n);this._floatTexture=a!==Xp,this._vsmMaterial=new Rx(this._floatTexture),this._hair_vsmMaterial=new Hx(this._floatTexture),tC.override_setting.shadow.face=this._vsmMaterial,tC.override_setting.shadow.hair=this._hair_vsmMaterial,this._rectRenderer=new Ix(n),this._shadowMap=new Dx(i,i,{minFilter:Kp,magFilter:Kp,format:Ag,type:a}),this._light=r,this._renderer=n,this._scene=t,this._lightCamera=new ww(-.3,.3,-.3,.3,-1,1),this._size=i,this._focusObject=t,this.shadowMapMatrix=new Ev,Cx.defines=this._floatTexture?{FLOAT_TEX:1}:void 0,this.blur=new jy(Cx)}return _(e,[{key:"shadowMap",get:function(){return this._shadowMap.source}},{key:"size",get:function(){return this._size}},{key:"floatTexture",get:function(){return this._floatTexture}},{key:"constrain",value:function(e){this._focusObject=e}},{key:"render",value:function(){var e=this._lightCamera;e.position.copy(this._light.position),e.lookAt(new Jm(0,0,0)),e.position.set(0,0,0),e.updateMatrixWorld();var t=new Ev;t.copy(e.matrixWorld).invert();var n=new ev;n.setFromObject(this._focusObject),n.applyMatrix4(t),e.left=n.min.x-.01,e.right=n.max.x+.01,e.top=n.min.y-.01,e.bottom=n.max.y+.01,e.near=-n.max.z-.01,e.far=.01-n.min.z,e.updateProjectionMatrix(),this.shadowMapMatrix.copy(e.matrixWorld).invert(),this.shadowMapMatrix.multiplyMatrices(e.projectionMatrix,this.shadowMapMatrix),this._renderer.setClearColor(16777215),tC.override("shadow"),this._renderer.setRenderTarget(this._shadowMap.target),nC.render_type===$x.Type.SHADOW_MAP&&this._renderer.setRenderTarget(null),this._renderer.render(this._scene,this._lightCamera),this._renderer.setRenderTarget(null),tC.unoverride(),this._shadowMap.swap(),this._renderer.setClearColor(0);var r=this.blur.uniforms;r.step.value.set(1/this._size,0),r.tDiffuse.value=this._shadowMap.source,this._rectRenderer.execute(this.blur,this._shadowMap.target),this._shadowMap.swap(),r.step.value.set(0,1/this._size),r.tDiffuse.value=this._shadowMap.source,nC.render_type===$x.Type.SHADOW_MAP_BLUR?this._rectRenderer.execute(this.blur,null):this._rectRenderer.execute(this.blur,this._shadowMap.target),this._shadowMap.swap(),this.onUpdate.dispatch()}},{key:"dispose",value:function(){kx(this)}}]),e}(),qx=function(){function e(t,n){y(this,e),this._gaussianTexture=new z_(null,t,1,Ag,eg,null,Np,Np,Kp,Kp),this.generateMipmap=!1,this._range=n,this._layers=[],this._width=t}return _(e,[{key:"gaussianLookUp",get:function(){return this._gaussianTexture}},{key:"range",get:function(){return this._range/1e3}},{key:"distanceMapping",get:function(){return 1e3/this._range}},{key:"getBlendColor",value:function(e){return e>=this._layers.length?new Nm:this._layers[e].blend}},{key:"addLayer",value:function(e,t){if(4===this._layers.length)throw new Error("Doesn't support more than 4 layers!");this._layers.push({gauss:new Qx(e),blend:t})}},{key:"generate",value:function(){for(var e=[],t=this._range/this._width,n=this._layers.length,r=0;r<this._width;++r){for(var i=r*t,a=0;a<n;++a){var A=this._layers[a],o=A.gauss.getValueAt(i);A.blend;e.push(o)}for(a=n;a<4;++a)e.push(0)}this._gaussianTexture.image.data=new Float32Array(e),this._gaussianTexture.needsUpdate=!0}}]),e}(),Yx=function(){function e(t,n,r,i,a,A){y(this,e),this._scale=A||.5,this._camera=n,this._renderer=r,this._scene=t,this.depthRenderer=i,this._floatTexType=Lx(r),this._rectRenderer=new Ix(r),this._material=new Jx(a),tC.override_setting.sss.face=this._material,this._renderTarget=new Dx(1,1,{type:this._floatTexType,minFilter:Kp,magFilter:Kp,generateMipmaps:!1,depthBuffer:!0,stencilBuffer:!1}),this.sssBlur=new jy(Mx),this.sssBlur.uniforms.sssProfileMap.value=a.sssProfile.gaussianLookUp,this.sssBlur.uniforms.color1.value=a.sssProfile.getBlendColor(1),this.sssBlur.uniforms.color2.value=a.sssProfile.getBlendColor(2),this.sssBlur.uniforms.color3.value=a.sssProfile.getBlendColor(3),this.sssBlur.uniforms.sssProfileScale.value=a.sssProfile.distanceMapping,this.sssBlur.uniforms.sssRange.value=a.sssProfile.range,this.sssBlur.depthWrite=!1,this.sssBlur.depthTest=!1}return _(e,[{key:"texture",get:function(){return this._renderTarget.source}},{key:"resize",value:function(e,t){var n=Math.ceil(e*this._scale),r=Math.ceil(t*this._scale);this._renderTarget=new Dx(n,r,{type:this._floatTexType,minFilter:Kp,magFilter:Kp,generateMipmaps:!1,depthBuffer:!0,stencilBuffer:!1})}},{key:"render",value:function(){tC.override("sss"),this._renderer.setRenderTarget(this._renderTarget.target),this._renderer.clear(),nC.render_type===$x.Type.SSS&&this._renderer.setRenderTarget(null),this._renderer.render(this._scene,this._camera),this._renderer.setRenderTarget(null),this._renderTarget.swap(),tC.unoverride();var e=this.sssBlur.uniforms;e.depthMap.value=this.depthRenderer.texture,e.cameraNear.value=this._camera.near,e.cameraRange.value=this._camera.far-this._camera.near,e.unprojectionMatrix.value.copy(this._camera.projectionMatrix).invert(),e.tDiffuse.value=this._renderTarget.source,e.step.value.set(1/this._renderTarget.width,0),this._rectRenderer.execute(this.sssBlur,this._renderTarget.target),this._renderTarget.swap(),e.tDiffuse.value=this._renderTarget.source,e.step.value.set(0,1/this._renderTarget.height),nC.render_type===$x.Type.SSS_BLUR?this._rectRenderer.execute(this.sssBlur,null):this._rectRenderer.execute(this.sssBlur,this._renderTarget.target),this._renderTarget.swap()}},{key:"dispose",value:function(){kx(this)}}]),e}(),Jx=function(e){x(n,e);var t=U(n);function n(e){var r;y(this,n);var i={irradianceMap:{value:e.irradianceMap},probeExposure:{value:Math.pow(2,void 0===e.probeExposure?0:e.probeExposure)},normalMap:{value:e.normalMap},shadowMap:{value:e.shadowRenderer.shadowMap},shadowMapMatrix:{value:e.shadowRenderer.shadowMapMatrix}},a=Wy.merge([i,cw.lights]);return(r=t.call(this,{uniforms:a,defines:{MIN_VARIANCE:-1e-4,LIGHT_BLEED_REDUCTION:.5},lights:!0,vertexShader:hx.get("sss_vertex"),fragmentShader:hx.getInclude("include_ggx")+hx.get("sss_fragment")})).uniforms.shadowMap.value=e.shadowRenderer.shadowMap,r.extensions.derivatives=!0,r.uniforms.irradianceMap.value=e.irradianceMap,r.uniforms.normalMap.value=e.normalMap,r._shadowRenderer=e.shadowRenderer,r._shadowRenderer.onUpdate.bind(r._onShadowUpdate,E(r)),r}return _(n,[{key:"_onShadowUpdate",value:function(){this.uniforms.shadowMapMatrix.value=this._shadowRenderer.shadowMapMatrix,this.uniforms.shadowMap.value=this._shadowRenderer.shadowMap}}]),n}(jy),Zx=function(e){x(n,e);var t=U(n);function n(e,r,i,a){var A;return y(this,n),(A=t.call(this))._depthTexture=i,A._focusPosition=new Jm,A._focusFalloff=.5,A._focusRange=.5,A._v=new Jm,A._camera=e,A._scene=r,A._textureType=a,A._strength=1,A.copy=new jy(fx),A.blur=new jy(Sx),A.composite=new jy(Ex),A._postCamera=new ww(-1,1,1,-1,0,1),A._postScene=new V_,A._postQuad=new Ny(new lw(2,2),null),A._postScene.add(A._postQuad),A.focusRange=2,A.focusFalloff=5,A}return _(n,[{key:"depthTexture",get:function(){return this._depthTexture},set:function(e){this._depthTexture=e}},{key:"focusPosition",get:function(){return this._focusPosition},set:function(e){this._focusPosition=e}},{key:"focusFalloff",get:function(){return this._focusFalloff},set:function(e){this._focusFalloff=e,this.composite.uniforms.focusFalloff.value=e/(this._camera.far-this._camera.near)}},{key:"focusRange",get:function(){return this._focusRange},set:function(e){this._focusRange=e,this.composite.uniforms.focusRange.value=e/(this._camera.far-this._camera.near)}},{key:"strength",get:function(){return this._strength},set:function(e){this._strength=e,this.composite.uniforms.strength.value=e,this.enabled=0!==this._strength}},{key:"render",value:function(e,t,n,r,i){this._v.copy(this._focusPosition),this._v.applyMatrix4(this._camera.matrixWorldInverse),this.composite.uniforms.focusDepth.value=(-this._v.z-this._camera.near)/(this._camera.far-this._camera.near);var a=this.smallBlurRadiusTex.width,A=this.smallBlurRadiusTex.height;this._postQuad.material=this.copy,this.copy.uniforms.tDiffuse.value=n.texture,e.setRenderTarget(this.smallBlurRadiusTex2),e.render(this._postScene,this._postCamera),e.setRenderTarget(null),this._postQuad.material=this.blur,this.blur.uniforms.tDiffuse.value=this.smallBlurRadiusTex2.texture,this.blur.uniforms.sampleStep.value.x=1/a,this.blur.uniforms.sampleStep.value.y=1/A,e.setRenderTarget(this.smallBlurRadiusTex),e.render(this._postScene,this._postCamera),e.setRenderTarget(null),this.blur.uniforms.tDiffuse.value=this.smallBlurRadiusTex.texture,this.blur.uniforms.sampleStep.value.x=1.5/a,this.blur.uniforms.sampleStep.value.y=1.5/A,e.setRenderTarget(this.largeBlurRadiusTex),e.render(this._postScene,this._postCamera),e.setRenderTarget(null),this._postQuad.material=this.composite,this.composite.uniforms.depth.value=this._depthTexture,this.composite.uniforms.source.value=n.texture,this.composite.uniforms.blurred1.value=this.smallBlurRadiusTex.texture,this.composite.uniforms.blurred2.value=this.largeBlurRadiusTex.texture,e.setRenderTarget(t),e.render(this._postScene,this._postCamera),e.setRenderTarget(null)}},{key:"setSize",value:function(e,t){if(e=Math.floor(e),t=Math.floor(t),this.resolutionX!==e||this.resolutionY!==t){this.resolutionX=e,this.resolutionY=t;var n={minFilter:Kp,magFilter:Kp,format:Ag,type:this._textureType},r=e>>1,i=t>>1;this.smallBlurRadiusTex=new jm(r,i,n),this.smallBlurRadiusTex2=new jm(r,i,n),r=e>>2,i=t>>2,this.largeBlurRadiusTex=new jm(r,i,n),this.smallBlurRadiusTex.texture.generateMipmaps=!1,this.largeBlurRadiusTex.texture.generateMipmaps=!1}}}]),n}(px),$x=function(){function e(){y(this,e),this.render_type=e.Type.FINAL_COMPOSE,this.skin_material=null,this.enabled=!1,document.addEventListener("keyup",this._onKeyUp.bind(this))}return _(e,[{key:"_onKeyUp",value:function(t){if(this.enabled){switch(t.keyCode){case 48:case 96:this.render_type=e.Type.FINAL_COMPOSE,this.skin_material&&(this.skin_material.uniforms.return_stage.value=0);break;case 49:case 97:this.render_type=e.Type.DEPTH_MAP;break;case 50:case 98:this.render_type=e.Type.SHADOW_MAP;break;case 51:case 99:this.render_type=e.Type.SHADOW_MAP_BLUR;break;case 52:case 100:this.render_type=e.Type.SSS;break;case 53:case 101:this.render_type=e.Type.SSS_BLUR;break;case 54:case 102:this.render_type=e.Type.SKIN_SSS,this.skin_material&&(this.skin_material.uniforms.return_stage.value=1);break;case 55:case 103:this.render_type=e.Type.SKIN_TRANSMISSION,this.skin_material&&(this.skin_material.uniforms.return_stage.value=2);break;case 56:case 104:this.render_type=e.Type.SKIN_SHADOWDIFFUSE,this.skin_material&&(this.skin_material.uniforms.return_stage.value=3);break;default:this.render_type=e.Type.SKIN_FINAL,this.skin_material&&(this.skin_material.uniforms.return_stage.value=0)}console.log(this.render_type)}}}]),e}();$x.Type={FINAL_COMPOSE:"FINAL_COMPOSE",DEPTH_MAP:"DEPTH_MAP",SHADOW_MAP:"SHADOW_MAP",SHADOW_MAP_BLUR:"SHADOW_MAP_BLUR",SSS:"SSS",SSS_BLUR:"SSS_BLUR",SKIN_SSS:"SKIN_SSS",SKIN_TRANSMISSION:"SKIN_TRANSMISSION",SKIN_SHADOWDIFFUSE:"SKIN_SHADOWDIFFUSE",SKIN_FINAL:"SKIN_FINAL"};var eC=function(e){x(n,e);var t=U(n);function n(e){var r;y(this,n);var i={diffuseMap:{value:null},alphaMap:{value:null},alpha_test:{value:.5},normalMap:{value:null},irradianceMap:{value:e.irradianceMap},specularMap:{value:e.specularMap},shadowMapMatrix:{value:null},shadowMap:{value:null},roughnessMap:{value:null},specular_map:{value:null},scatter_map:{value:null},tangent_shift_0:{value:.2},specular_exp_0:{value:100},tangent_shift_1:{value:0},specular_exp_1:{value:50}},a=Wy.merge([i,cw.lights]);return(r=t.call(this,{uniforms:a,defines:{MIN_VARIANCE:-1e-4,LIGHT_BLEED_REDUCTION:.5,USE_TANGENT:!0},lights:!0,vertexShader:hx.get("hair_vertex"),fragmentShader:hx.getInclude("include_beckmann")+hx.get("hair_fragment")})).isHairMaterial=!0,r.type="HairMaterial",r.side=Xf,r.transparent&&(r.uniforms.alpha_test.value=0),r._shadowRenderer=e.shadowRenderer,r._shadowRenderer.onUpdate.bind(r._onShadowUpdate,E(r)),r}return _(n,[{key:"_onShadowUpdate",value:function(){this.uniforms.shadowMapMatrix.value=this._shadowRenderer.shadowMapMatrix,this.uniforms.shadowMap.value=this._shadowRenderer.shadowMap}}]),n}(jy),tC=new(function(){function e(){y(this,e),this.face_mesh=null,this.hair_mesh=null,this.skybox_mesh=null,this.override_setting={depth:{face:null,hair:null},shadow:{face:null,hair:null},sss:{face:null,hair:null}},this.material_face=null,this.material_hair=null,this.skybox_hair=null,this.type=null}return _(e,[{key:"override",value:function(e){if(!(e in this.override_setting))throw"unknown override type ".concat(e);this.material_face=this.face_mesh.material,this.override_setting[e].face&&(this.face_mesh.material=this.override_setting[e].face),this.material_skybox=this.skybox_mesh.material,this.override_setting[e].face&&(this.skybox_mesh.material=this.override_setting[e].face),this.material_hair=this.hair_mesh.material,this.override_setting[e].hair?this.hair_mesh.material=this.override_setting[e].hair:this.hair_mesh.visible=!1,this.type=e}},{key:"unoverride",value:function(){var e=this.type;this.override_setting[e].hair||(this.hair_mesh.visible=!0),this.face_mesh.material=this.material_face,this.skybox_mesh.material=this.material_skybox,this.hair_mesh.material=this.material_hair,this.material_face=null,this.material_skybox=null,this.material_hair=null,this.type=null}}]),e}()),nC=new $x;var rC,iC={roughness_detail:"/assets/juanfu/roughness-detail.jpg",env_irradiance:"/assets/env/lapa_4k_panorama_irradiance.hdr",env_specular:"/assets/env/lapa_4k_panorama_specular.hdr",roughness_ao_thickness:"/assets/juanfu/at.png"},aC=function(){function e(){y(this,e)}return _(e,[{key:"get",value:function(e){return void 0===this[e]&&console.log("[ get undefined ] ".concat(e)),this[e]}},{key:"load_assets",value:function(e,t,n){var r=this;function i(e){}function a(e){console.log(e)}function A(e){r[this.key]=e.children[0].geometry,console.log("[ loaded ] ".concat(this.key)),s(u)}function o(e){"diffuse"!=this.key&&"hair_diffuse"!=this.key||(e.encoding=$g),e.wrapS=Pp,e.wrapT=Pp,e.minFilter=1008,"hdr"==this.postfix&&(e.minFilter=Kp),e.magFilter=Kp,Tx&&(e.anisotropy=16),r[this.key]=e,console.log("[ loaded ] ".concat(this.key)),s(u)}var s=function(r){if(r.length_current++,r.length_current==r.length_target){console.log("[ loaded all ]");var i=Object.keys(e);n&&this.update_assets(n,i),t&&t()}}.bind(this),l=Object.keys(e),u={length_target:l.length,length_current:0};l.forEach((function(t){var n,r,s=e[t],l=s.split(".").pop();switch(t){case"model":case"hair_mesh":n=new cx,r=A;break;case"roughness_detail":case"diffuse":case"normal":case"roughness_ao_thickness":case"roughness":case"hair_diffuse":case"hair_alpha":case"hair_normal":case"hair_roughness":case"hair_specular":case"hair_scatter":n=new kb,r=o;break;case"env_irradiance":case"env_specular":n=new dx,r=o;break;default:throw"".concat(t," does not have corresponding loader")}n.load(s,r.bind({key:t,path:s,postfix:l}),i.bind({key:t,path:s,postfix:l}),a)}))}},{key:"update_assets",value:function(e,t){var n=this;(t=t||["model","diffuse","normal","roughness_ao_thickness","roughness"]).forEach((function(t){var r=n.get(t);if(r)switch(t){case"model":e.content.face_mesh.geometry&&e.content.face_mesh.geometry.dispose(),e.content.face_mesh.geometry=r;break;case"diffuse":e.content.sssMaterialOptions.diffuseMap=r,e.content.skinMaterial.uniforms.diffuseMap.value=r;break;case"normal":e.content.sssMaterialOptions.normalMap=r,e.content.skinMaterial.uniforms.normalMap.value=r,e.content.sssRenderer._material.uniforms.normalMap.value=r;break;case"roughness_ao_thickness":e.content.sssMaterialOptions.roughnessAOThicknessMap=r,e.content.skinMaterial.uniforms.roughnessAOThicknessMap.value=r;break;case"roughness":e.content.sssMaterialOptions.roughnessMap=r,e.content.skinMaterial.uniforms.roughnessMap.value=r;break;case"hair_mesh":e.content.hair_mesh.geometry&&e.content.hair_mesh.geometry.dispose(),r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e-4;t=Math.max(t,Number.EPSILON);for(var n={},r=e.getIndex(),i=e.getAttribute("position"),a=r?r.count:i.count,A=0,o=Object.keys(e.attributes),s={},l={},u=[],c=["getX","getY","getZ","getW"],d=["setX","setY","setZ","setW"],h=0,f=o.length;h<f;h++){var p=o[h],g=e.attributes[p];s[p]=new py(new g.array.constructor(g.count*g.itemSize),g.itemSize,g.normalized);var m=e.morphAttributes[p];m&&(l[p]=new py(new m.array.constructor(m.count*m.itemSize),m.itemSize,m.normalized))}for(var v=Math.log10(1/t),y=Math.pow(10,v),w=0;w<a;w++){for(var B=r?r.getX(w):w,_="",b=0,x=o.length;b<x;b++)for(var C=o[b],S=e.getAttribute(C),E=S.itemSize,U=0;U<E;U++)_+="".concat(~~(S[c[U]](B)*y),",");if(_ in n)u.push(n[_]);else{for(var M=0,F=o.length;M<F;M++)for(var T=o[M],k=e.getAttribute(T),Q=e.morphAttributes[T],L=k.itemSize,D=s[T],I=l[T],R=0;R<L;R++){var H=c[R],P=d[R];if(D[P](A,k[H](B)),Q)for(var N=0,O=Q.length;N<O;N++)I[N][P](A,Q[N][H](B))}n[_]=A,u.push(A),A++}}var V=e.clone();for(var z in e.attributes){var G=s[z];if(V.setAttribute(z,new py(G.array.slice(0,A*G.itemSize),G.itemSize,G.normalized)),z in l)for(var K=0;K<l[z].length;K++){var W=l[z][K];V.morphAttributes[z][K]=new py(W.array.slice(0,A*W.itemSize),W.itemSize,W.normalized)}}return V.setIndex(u),V}(r),r.computeTangents(),e.content.hair_mesh.geometry=r;break;case"hair_diffuse":e.content.hair_material.uniforms.diffuseMap.value=r;break;case"hair_alpha":e.content.hair_material.uniforms.alphaMap.value=r,e.content.depthRenderer._hair_depthMaterial.uniforms.alphaMap.value=r,e.content.shadowRenderer._hair_vsmMaterial.uniforms.alphaMap.value=r;break;case"hair_normal":e.content.hair_material.uniforms.normalMap.value=r;break;case"hair_roughness":e.content.hair_material.uniforms.roughnessMap.value=r;break;case"hair_specular":e.content.hair_material.uniforms.specular_map.value=r;break;case"hair_scatter":e.content.hair_material.uniforms.scatter_map.value=r}}))}}]),e}(),AC=new aC,oC=function(e){x(n,e);var t=U(n);function n(e){var r;y(this,n);var i={MIN_VARIANCE:1e-4,LIGHT_BLEED_REDUCTION:.1};e.shadowRenderer.floatTexture&&(i.VSM_FLOAT=1);var a={sssMap:{value:null},transmittanceColor:{value:new Nm(50,150,250)},sssTopLayerColor:{value:e.sssProfile.getBlendColor(0)},diffuseMap:{value:e.diffuseMap},normalMap:{value:e.normalMap},roughnessAOThicknessMap:{value:e.roughnessAOThicknessMap},roughnessMap:{value:e.roughnessMap},irradianceMap:{value:e.irradianceMap},specularMap:{value:e.specularMap},shadowMap:{value:e.shadowRenderer.shadowMap},shadowMapMatrix:{value:e.shadowRenderer.shadowMapMatrix},probeExposure:{value:Math.pow(2,void 0===e.probeExposure?0:e.probeExposure)},normalSpecularReflectance:{value:.027},thicknessRange:{value:e.thicknessRange||.1},roughnessMapRange:{value:void 0===e.roughnessMapRange?.5:e.roughnessMapRange},roughnessMedian:{value:void 0===e.roughnessMedian?.65:e.roughnessMedian},roughnessDetailMap:{value:e.roughnessDetailMap},roughnessDetailRange:{value:.8},specular_intensity:{value:.7},return_stage:{value:0}},A=Wy.merge([a,cw.lights]);return(r=t.call(this,{uniforms:A,defines:i,lights:!0,vertexShader:hx.get("skin_vertex"),fragmentShader:hx.getInclude("include_beckmann")+hx.get("skin_fragment")})).isSkinMaterial=!0,r.type="SkinMaterial",r.uniforms.diffuseMap.value=e.diffuseMap,r.uniforms.normalMap.value=e.normalMap,r.uniforms.roughnessAOThicknessMap.value=e.roughnessAOThicknessMap,r.uniforms.roughnessMap.value=e.roughnessMap,r.uniforms.roughnessDetailMap.value=e.roughnessDetailMap,r.uniforms.irradianceMap.value=e.irradianceMap,r.uniforms.specularMap.value=e.specularMap,r.uniforms.shadowMap.value=e.shadowRenderer.shadowMap,r.uniforms.return_stage.value=0,nC.skin_material=E(r),r.extensions.derivatives=!0,r._shadowRenderer=e.shadowRenderer,r._shadowRenderer.onUpdate.bind(r._onShadowUpdate,E(r)),r}return _(n,[{key:"_onShadowUpdate",value:function(){this.uniforms.shadowMapMatrix.value=this._shadowRenderer.shadowMapMatrix,this.uniforms.shadowMap.value=this._shadowRenderer.shadowMap}}]),n}(jy),sC=function(){function e(t){var n=this;y(this,e),this.timeScale=1,this._time=null,this.is_running=!1,this.renderer_parameters=t||{},this.renderer_parameters.alpha=this.renderer_parameters.alpha||!1,this.renderer_parameters.antialias=this.renderer_parameters.antialias||!1,this.renderer_parameters.preserveDrawingBuffer=this.renderer_parameters.preserveDrawingBuffer||!1,this.renderer=new N_({antialias:this.renderer_parameters.antialias,alpha:this.renderer_parameters.alpha,preserveDrawingBuffer:this.renderer_parameters.preserveDrawingBuffer});var r=window.devicePixelRatio;this.renderer.setPixelRatio(r),this.container=document.getElementById("webglcontainer"),this.container.appendChild(this.renderer.domElement),this.scene=new V_,this.camera=new qy(46.4,this.container.clientWidth/this.container.clientHeight,1,1e4),this.camera.position.z=100,this.camera.near=.001,this.camera.far=100,this.scene.add(this.camera),this.content=new lC(this);this.resize_handler=function(){this.need_resize=!0},window.addEventListener("resize",this.resize_handler),this._resizeCanvas(),this.need_resize=!1,setInterval((function(){n.resize_handler()}),4e3)}return _(e,[{key:"_resizeCanvas",value:function(){if(this.renderer){var e=this.container.clientWidth,t=this.container.clientHeight;if(0===e||0===t)return;this.renderer.setSize(e,t),this.renderer.domElement.style.width=e+"px",this.renderer.domElement.style.height=t+"px",this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),this.content&&this.content.resize(e,t)}}},{key:"stop",value:function(){this.is_running=!1,this.renderer.domElement.style.display="none"}},{key:"start",value:function(){this.is_running=!0,this.renderer.domElement.style.display="block",this._requestAnimationFrame()}},{key:"_render",value:function(){if(this.is_running){this.need_resize&&(this._resizeCanvas(),this.need_resize=!1);var e=(new Date).getTime(),t=0;null!==this._time&&(t=e-this._time),t*=this.timeScale,this._time=e,this._requestAnimationFrame(),Gx.ENGINE.update(t),this.content&&this.content.update(t),nC.render_type.startsWith("SKIN_")&&this.renderer.render(this.scene,this.camera),nC.render_type===$x.Type.FINAL_COMPOSE&&(this.content&&this.content.effectComposer?this.content.effectComposer.render(t/1e3):this.renderer.render(this.scene,this.camera)),window.stats&&window.stats.update();var n=this.content.face_mesh.position,r=Math.pow(.5,t/100),i=new Jm(n.x*r,n.y*r,n.z*r);this.content.face_mesh.position.set(i.x,i.y,i.z)}}},{key:"_requestAnimationFrame",value:function(){var e=this;requestAnimationFrame((function(){e._render()}))}},{key:"dispose",value:function(){this.container.removeChild(this.renderer.domElement)}},{key:"hide_scene",value:function(){var e=this;e.content.face_mesh.visible=!1,e.content.hair_mesh.visible=!1,e.content.orbit._coords.set((.4*Math.random()+.3)*Math.PI,(.2*Math.random()+.3)*Math.PI,2)}},{key:"show_scene",value:function(){var e=this;e.content.face_mesh.visible=!0,e.content.hair_mesh.visible=!1,e.content.face_mesh.position.set(.5,0,0),e.resize_handler()}},{key:"clean_scene",value:function(){var e=this;e.content.face_mesh.geometry&&e.content.face_mesh.geometry.dispose(),e.content.face_mesh.geometry=new Sy}}]),e}(),lC=function(){function e(t){y(this,e),this.animateLight=!0,this.probeExposure=0,this.time=0,this.shadowsInvalid=!0,this.renderer=t.renderer,this.scene=t.scene,this.camera=t.camera,this.container=t.container,this.render_target=new jm(1,1,{minFilter:Kp,magFilter:Kp,format:Ag,type:Lx(this.renderer),stencilBuffer:!1}),this.effectComposer=new _x(this.renderer,this.render_target),this.effectComposer.addPass(new bx(this.scene,this.camera)),this.dof=new Zx(this.camera,this.scene,null,Lx(this.renderer)),this.dof.focusPosition.set(0,0,0),this.dof.enabled=!1,this.effectComposer.addPass(this.dof),this.fxaa=new yx(Ux),this.fxaa.uniforms.whitePoint.value=1.7,this.fxaa.renderToScreen=!0,this.effectComposer.addPass(this.fxaa),this.effectColor=new yx(xx),this.effectColor.uniforms.powRGB.value.set(1,1,1),this.effectColor.uniforms.mulRGB.value.set(.95,.97,1.02),this.effectComposer.addPass(this.effectColor),this.sssProfile=new qx(256,1.2),this.sssProfile.addLayer(.0064,new Nm(.2405,.4474,.6157)),this.sssProfile.addLayer(.0452,new Nm(.1158,.3661,.3439)),this.sssProfile.addLayer(.2719-.0516,new Nm(.1836,.1864,0)),this.sssProfile.addLayer(2.0062-.2719,new Nm(.46,0,.0402)),this.sssProfile.generate();var n=new Vx(this.container);n.lookAtTarget.z=.03,n.radius=.3,n.minRadius=.05,n.maxRadius=.3,n.zoomSpeed=.05,n.mouse_constant=2e-4,Gx.addComponent(this.camera,n),this.orbit=n;this.mainLight=new Pb(16777215),this.mainLight.position.set(0,0,-1),this.mainLight.intensity=.5,this.scene.add(this.mainLight),this.shadowRenderer=new Xx(this.scene,this.renderer,this.mainLight,2048),this.depthRenderer=new jx(this.scene,this.camera,this.renderer,.5),this.sssMaterialOptions={diffuseMap:null,normalMap:null,roughnessAOThicknessMap:AC.get("roughness_ao_thickness"),roughnessMap:null,roughnessDetailMap:AC.get("roughness_detail"),irradianceMap:AC.get("env_irradiance"),specularMap:AC.get("env_specular"),sssProfile:this.sssProfile,probeExposure:this.probeExposure,shadowRenderer:this.shadowRenderer},this.sssRenderer=new Yx(this.scene,this.camera,this.renderer,this.depthRenderer,this.sssMaterialOptions,.5),this.skybox=new Nx(AC.get("env_specular"),3,this.probeExposure),this.camera.add(this.skybox),this.skinMaterial=new oC(this.sssMaterialOptions),this.face_mesh=new Ny(void 0,this.skinMaterial),this.face_mesh.scale.set(.005,.005,.005),this.scene.add(this.face_mesh),this.hair_material=new eC(this.sssMaterialOptions),this.hair_mesh=new Ny(void 0,this.hair_material),this.hair_mesh.renderOrder=1,this.hair_mesh.scale.set(.005,.005,.005),this.scene.add(this.hair_mesh),this.shadowRenderer.constrain(this.face_mesh),tC.face_mesh=this.face_mesh,tC.skybox_mesh=this.skybox,tC.hair_mesh=this.hair_mesh}return _(e,[{key:"resize",value:function(e,t){this.sssRenderer.resize(e,t);var n=window.devicePixelRatio||1;e*=n,t*=n,this.fxaa&&this.fxaa.uniforms.rcpRenderTargetResolution.value.set(1/e,1/t),this.effectComposer.setSize(e,t),this.depthRenderer.resize(e,t),this.dof.depthTexture=this.depthRenderer.texture}},{key:"update",value:function(e){this.animateLight&&(this.time+=e,this.mainLight.position.set(Math.cos(5e-4*this.time),Math.sin(3e-4*this.time)+1.25,Math.sin(2e-4*this.time)+1.2),this.shadowsInvalid=!0),this.depthRenderer.render(),this.skybox.visible=!1,this.shadowsInvalid&&(this.shadowRenderer.render(),this.shadowsInvalid=!1),this.sssRenderer.render(),this.skinMaterial.uniforms.sssMap.value=this.sssRenderer.texture,this.skybox.visible=!0;var t=.01,n=this.camera.matrix.elements[8],r=this.camera.matrix.elements[9],i=this.camera.matrix.elements[10];this.dof.focusPosition.set(n*t,r*t,i*t);var a=this.camera.position.length();this.dof.focusRange=Math.max(.02+.15*(a-.361),.5),this.dof.focusFalloff=Math.max(2*this.dof.focusRange,.008)}},{key:"dispose",value:function(){Gx.removeComponent(this.camera,this.orbit),Gx.destroy(this.camera),Gx.ENGINE.update(1),kx(this.sssMaterialOptions),kx(this)}}]),e}();function uC(e,t){rC?AC.load_assets(e,t,rC):function(e){AC.load_assets(iC,(function(){(rC=new sC).start(),window.static_project=rC,e&&e()}))}((function(){AC.load_assets(e,t,rC)}))}var cC,dC=n(498),hC=n.n(dC);function fC(e,t){return(cC=cC||h(c().mark((function e(t,n){var r,i,a;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hC()(t,{allowTaint:!0,useCORS:!0,windowWidth:1160,windowHeight:746});case 2:r=e.sent,i=r.toDataURL("image/jpg"),(a=document.createElement("a")).href=i,a.download="".concat(n,".jpg"),document.body.appendChild(a),a.click(),document.body.removeChild(a);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var pC=n.p+"static/media/loading.d4ab9139a5a49802c9cace432b0954f2.svg";function gC(){var e=uu(Zh),t=v(lu(Xh),1)[0],n=su(of),r=su(lf),i=v(lu(uf),2),a=i[0],A=i[1],s=v(lu(df),2)[1],l=v(lu(qh),2),u=l[0],d=l[1],f=v(lu(hf),2),p=f[0],g=f[1],m=v((0,o.useState)(!1),2),y=m[0],w=m[1],B=v(lu($h),2),_=B[0],b=B[1],x=v(lu(pf),1)[0],C=v(lu(nf),2)[1],S=v((0,o.useState)(!1),2)[1],E=v(lu(ff),2)[1],U=v(lu(rf),2),M=U[0],F=U[1],T=su(af),k=v((0,o.useState)({x:160,y:130}),2),Q=k[0],L=k[1],D=v((0,o.useState)(!1),2),I=D[0],R=D[1],H="inset(0px calc(100%-".concat(Q.x,"px) 0px 0px)"),P="inset(0px 0px calc(100% - ".concat(Q.y,"px) ").concat(Q.x,"px)"),N=(0,o.useRef)(null),O=(0,o.useRef)(null);(0,o.useEffect)((function(){return function(){e(!1),d(!1)}}),[]),(0,o.useEffect)((function(){if("ImagineFace"===T&&_&&r){w(!0);var e=setInterval(h(c().mark((function t(){var r;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Kh(n);case 2:"FILE_NOT_FOUND"!==(r=t.sent).data.files[0].face&&"FILE_NOT_FOUND"!==r.data.files[0].render&&"FILE_NOT_FOUND"!==r.data.files[0].render_statue&&(b({}),A([r.data.files[0].face,r.data.files[0].render,r.data.files[0].render_statue]),s(!1),E(!1),g(!1),clearInterval(e));case 4:case"end":return t.stop()}}),t)}))),1e3)}}),[r]),(0,o.useEffect)((function(){t||w(!0)}),[t]),(0,o.useEffect)((function(){var e=function(){window.isDraggingModel=!0},t=function(){window.isDraggingModel=!1},n=N.current;return n&&(n.addEventListener("mousedown",e),n.addEventListener("mouseup",t)),function(){n&&(n.removeEventListener("mousedown",e),n.removeEventListener("mouseup",t))}}),[N]),(0,o.useEffect)((function(){var e=function(){window.isDraggingModel?C(!0):C(!1)};return window.addEventListener("mousedown",e),window.addEventListener("mouseup",e),function(){window.removeEventListener("mousedown",e),window.removeEventListener("mouseup",e)}}),[]),(0,o.useEffect)((function(){var e;if(window.static_project&&window.last_uuidtime===u.task_uuid+u.time)return console.log("same profile"),window.static_project.show_scene(),M?void console.log(M):void document.querySelector("#webglcontainer").replaceWith(window.static_project.content.container);(window.static_project&&(console.log("hide scene"),window.static_project.hide_scene(),F(!0)),u)?(F(!1),console.log("Enter meshProfile"),window.static_project&&document.querySelector("#webglcontainer").replaceWith(window.static_project.content.container),S(!0),function(t){return(e=e||h(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.model;case 2:return e.t0=e.sent,e.next=5,t.diffuse;case 5:return e.t1=e.sent,e.next=8,t.normal;case 8:return e.t2=e.sent,e.next=11,t.spectular;case 11:return e.t3=e.sent,e.abrupt("return",{model:e.t0,diffuse:e.t1,normal:e.t2,roughness:e.t3});case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}({model:Oh({type:"PreviewPack",task_uuid:u.task_uuid,name:"model"}),diffuse:Oh({type:"PreviewPack",task_uuid:u.task_uuid,name:"texture_diffuse"}),normal:Oh({type:"PreviewPack",task_uuid:u.task_uuid,name:"texture_normal"}),spectular:Oh({type:"PreviewPack",task_uuid:u.task_uuid,name:"texture_specular"})}).then((function(e){setTimeout((function(){w(!1),b(!1),nC.enabled=!1,uC(e,(function(){console.log("load_profile done"),window.last_uuidtime=u.task_uuid+u.time,window.static_project&&window.static_project.show_scene()}))}),1e3)}))):console.log("no profile")}),[u]);window.exportModelView=h(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fC(N.current,"model");case 2:case"end":return e.stop()}}),e)}))),window.exportPrompt=h(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fC(O.current,"prompt");case 2:case"end":return e.stop()}}),e)})));var V=(0,o.useRef)(null),z=(0,o.useRef)(null);return(0,Lf.jsx)("div",{className:gf.colDetail,children:(0,Lf.jsxs)("div",{className:gf.colContent,children:["DreamFace"===T&&t&&!x&&(0,Lf.jsx)("div",{onPointerDown:function(){V.current&&V.current.click()},className:gf.modelmove,children:"Explore and Export at Hyperhuman"}),t&&(0,Lf.jsx)("a",{ref:V,href:"https://hyperhuman.deemos.com/chatavatar/".concat(t.task_uuid),target:"_blank"}),"ImagineFace"===T&&n&&!p&&!x&&(0,Lf.jsx)("div",{onPointerDown:function(){z.current&&z.current.click()},className:gf.modelmove,children:"Explore and Export at Hyperhuman"}),n&&(0,Lf.jsx)("a",{ref:z,href:"https://hyperhuman.deemos.com/chatavatar/".concat(n),target:"_blank"}),(0,Lf.jsxs)("div",{className:"".concat(gf.modelView," ").concat(M&&"DreamFace"===T?gf.hideModel:""),id:"webglcontainer",ref:N,children:["ImagineFace"===T&&y&&_&&_.stage&&(0,Lf.jsxs)("div",{style:{display:"flex",justifyContent:"right",paddingRight:"10px"},children:["Generating: ",_.percent,"/100 "]}),"ImagineFace"===T&&N.current&&a&&3===a.length&&(0,Lf.jsxs)("div",{style:{position:"relative",height:"100%",width:"100%",transition:"none"},onMouseDown:function(e){if(0===e.button){R(!0);var t=e.clientX,n=e.clientY,r=Q.x,i=Q.y,a=N.current.clientWidth,A=N.current.clientHeight;document.onmousemove=function(e){var o=e.clientX,s=e.clientY,l=o-t+r,u=s-n+i,c=l,d=u;l<0?c=0:l>a&&(c=a),u<0?d=0:u>A&&(d=A),L({x:c,y:d})},document.onmouseup=function(){R(!1),document.onmousemove=null,document.onmouseup=null},e.preventDefault&&e.preventDefault()}},children:[a.map((function(e,t){return(0,Lf.jsx)("div",{className:gf.imgBox,style:{clipPath:"".concat(0===t?"var(--clip-path-value, ".concat(H,")"):1===t?"var(--clip-path-value, ".concat(P,")"):"inset(".concat(Q.y,"px 0px 0px ").concat(Q.x,"px)"))},children:(0,Lf.jsx)("img",{src:e,alt:""})},"preview".concat(t))})),(0,Lf.jsx)("div",{style:{position:"absolute",top:"".concat(Q.y,"px"),left:"".concat(Q.x,"px"),width:"100%",height:"1px",backgroundColor:"white",transition:"none"}}),(0,Lf.jsx)("div",{style:{position:"absolute",top:"0",width:"1px",height:"100%",backgroundColor:"white",left:"".concat(Q.x,"px"),transition:"none"}}),(0,Lf.jsxs)("div",{style:{top:"".concat(Q.y,"px"),left:"".concat(Q.x,"px"),cursor:I?"":"pointer"},className:gf.FrameBox,children:[(0,Lf.jsx)("span",{}),(0,Lf.jsx)("span",{}),(0,Lf.jsx)("span",{})]})]})]}),"DreamFace"===T&&(0,Lf.jsxs)("div",{style:{position:"absolute",zIndex:-100},className:gf.loadingCon,children:[(0,Lf.jsx)("div",{id:"info"}),(0,Lf.jsx)("div",{id:"preloader",className:"preloader",children:(0,Lf.jsxs)("div",{id:"preloaderBar",className:"vAligned",children:["Loading...",(0,Lf.jsx)("div",{className:"preloaderBorder",children:(0,Lf.jsx)("div",{id:"preloaderProgress",className:"preloaderProgress",style:{width:"85%"}})})]})})]}),(0,Lf.jsx)("div",{className:gf.modelInfoCon,children:y&&_&&_.stage&&(0,Lf.jsxs)("div",{className:gf.progressCon,style:{top:"ImagineFace"===T?"calc(70%)":""},children:[(0,Lf.jsx)("img",{src:pC}),(0,Lf.jsx)("div",{className:gf.progressInfo,children:"DreamFace"===T?_.stage+"...":"Loading..."}),(0,Lf.jsx)("div",{className:gf.progressTrack,children:(0,Lf.jsx)("div",{className:gf.progressThumb,style:{width:"".concat(_.percent,"%")}})})]})})]})})}function mC(){var e,t=su(Xh),n=v(lu(Yh),2),r=n[0],i=n[1],a=uu(qh),A=v(lu(Jh),2),s=A[0],l=A[1],u=v(lu(Zh),1)[0],d=(0,o.useRef)({}),f=(0,o.useRef)(""),p=v(lu(tf),2)[1],g=v(lu(mf),1)[0];(0,o.useEffect)((function(){d.current=Kt({},r)}),[r]),(0,o.useEffect)((function(){f.current=s}),[s]),(0,o.useEffect)((function(){u&&Ih()}),[u]),(0,o.useEffect)((function(){t&&(i(t.chat_history.reduce((function(e,t){return Kt(Kt({},e),{},M({},t.chat_uuid,Kt(Kt({},t),{},{timeStamp:new Date(t.time).getTime()})))}),{})),l(t.prompt),a(Kt(Kt({},t.resources),{},{task_uuid:t.task_uuid})),p("detail"))}),[t]);var m=(0,o.useRef)(null);return window.exportDialog=function(){return(e=e||h(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fC(m.current,"dialog");case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)},(0,Lf.jsx)("div",{className:gf.con,children:(0,Lf.jsx)("div",{className:gf.board,onPointerDown:function(e){return e.stopPropagation()},ref:m,children:g?(0,Lf.jsxs)(Lf.Fragment,{children:[(0,Lf.jsx)(Df,{}),(0,Lf.jsx)(gC,{})]}):(0,Lf.jsx)("p",{children:"Loading..."})})})}var vC={con:"welcome_con__pUnMy",conI:"welcome_conI__6BYdB",mainCon:"welcome_mainCon__WCQLA",title:"welcome_title__7uTSU",titleI:"welcome_titleI__eYbbM",ioCon:"welcome_ioCon__QZxFf",iptCon:"welcome_iptCon__5H9VL",ipt:"welcome_ipt__1S-3k",btnCon:"welcome_btnCon__2Skyt",btn:"welcome_btn__QQOG6",disabled:"welcome_disabled__6cuuh"},yC=n.p+"static/media/backgroundt.96fec85f8e4b2d4e351d.png",wC=n.p+"static/media/backgroundi.7a1e137668251b7822eb.png";function BC(){var e=su(af),t=v(lu(ef),1)[0];return(0,Lf.jsxs)("div",{className:"DreamFace"===e?vC.con:vC.conI,style:{border:"DreamFace"===e?"":"1px solid #e5e7eb"},children:[t?(0,Lf.jsx)(mC,{}):(0,Lf.jsxs)(Lf.Fragment,{children:[(0,Lf.jsx)("img",{alt:"bg img",src:"DreamFace"===e?yC:wC}),(0,Lf.jsx)("div",{className:t?"":vC.mainCon})]}),(0,Lf.jsxs)("div",{className:t?"":vC.mainCon,children:[(0,Lf.jsx)("div",{className:"DreamFace"===e?vC.title:vC.titleI,children:"ChatAvatar"}),(0,Lf.jsxs)("div",{style:{marginTop:"0.75rem",color:"DreamFace"===e?"white":"#121317"},children:["Progressive Generation Of Animatable 3D Faces",(0,Lf.jsx)("br",{}),"DreamFace"===e?"Under Text Guidance":"From Image"]})]}),(0,Lf.jsx)(Hf,{})]})}var _C=function(){su(vf),su(yf);var e=v(lu(mf),2),t=(e[0],e[1]);return xt(),(0,o.useEffect)((function(){h(c().mark((function e(){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lh({email:kh,password:Qh});case 2:(n=e.sent).data&&(n.data.error||(t(n.data),(r=n.data.token)&&(Th=$c.create({headers:{Authorization:"Bearer ".concat(r)}}))));case 4:case"end":return e.stop()}var r}),e)})))()}),[]),(0,Lf.jsxs)("div",{className:"App",children:[(0,Lf.jsx)(BC,{}),(0,Lf.jsx)(mC,{})]})};function bC(){return bC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bC.apply(this,arguments)}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xC(){var e,t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=bC({},t,{errors:CC(t.errors)})),t}function CC(e){if(!e)return null;for(var t={},n=0,r=Object.entries(e);n<r.length;n++){var i=v(r[n],2),a=i[0],A=i[1];if(A&&"RouteErrorResponse"===A.__type)t[a]=new ge(A.status,A.statusText,A.data,!0===A.internal);else if(A&&"Error"===A.__type){if(A.__subType){var o=window[A.__subType];if("function"===typeof o)try{var s=new o(A.message);s.stack="",t[a]=s}catch(u){}}if(null==t[a]){var l=new Error(A.message);l.stack="",t[a]=l}}else t[a]=A}return t}s.startTransition;"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var SC,EC;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(SC||(SC={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(EC||(EC={}));function UC(){return(0,Lf.jsx)("h1",{style:{textAlign:"center"},children:"404"})}function MC(){var e=function(e,t){return Me({basename:null==t?void 0:t.basename,future:bC({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(n={window:null==t?void 0:t.window},void 0===n&&(n={}),G((function(e,t){var n=e.location;return O("",{pathname:n.pathname,search:n.search,hash:n.hash},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:V(t)}),null,n)),hydrationData:(null==t?void 0:t.hydrationData)||xC(),routes:e,mapRouteProperties:Vt}).initialize();var n}([{path:"*",element:(0,Lf.jsx)(_C,{}),errorElement:(0,Lf.jsx)(UC,{})},{path:"*",element:(0,Lf.jsx)(UC,{})}]);return(0,Lf.jsx)(Rt,{router:e})}l.createRoot(document.getElementById("root")).render((0,Lf.jsx)("div",{className:"root",children:(0,Lf.jsx)("div",{className:"container",children:(0,Lf.jsx)(o.StrictMode,{children:(0,Lf.jsx)(Au,{children:(0,Lf.jsx)(MC,{})})})})}))}()}();
+//# sourceMappingURL=main.bfb3b22a.js.map
\ No newline at end of file