From 65b20eedc9cd98a4ee2bb5ea7e25bb0244ce529c Mon Sep 17 00:00:00 2001 From: Desplandis Date: Fri, 22 Dec 2023 10:58:02 +0000 Subject: [PATCH] deploy: iTowns/itowns@5a6c7e3f482e680c150b7f6f245a645e6af7c217 --- itowns/dev/dist/debug.js | 2 +- itowns/dev/dist/itowns.js | 2 +- itowns/dev/examples/effects_stereo.html | 4 ++-- itowns/dev/examples/misc_collada.html | 4 ++-- itowns/dev/examples/view_3d_map_webxr.html | 2 +- itowns/dev/examples/view_multi_25d.html | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/itowns/dev/dist/debug.js b/itowns/dev/dist/debug.js index 657505d4..3fb9b514 100644 --- a/itowns/dev/dist/debug.js +++ b/itowns/dev/dist/debug.js @@ -1,3 +1,3 @@ /*! For license information please see debug.js.LICENSE.txt */ -"use strict";!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("debug",[],e):"object"==typeof exports?exports.debug=e():t.debug=e()}(self,(()=>(self.webpackChunkitowns=self.webpackChunkitowns||[]).push([[711],{70473:(t,e,i)=>{i.r(e),i.d(e,{Debug:()=>Ls,GeometryDebug:()=>Us,PotreeDebug:()=>Fs,create3dTilesDebugUI:()=>Qs,createTileDebugUI:()=>qs});var n=i(99477),s=i(60145),o=i(49469),a=i(44996);function r(t){return t+.5|0}const h=(t,e,i)=>Math.max(Math.min(t,i),e);function c(t){return h(r(2.55*t),0,255)}function l(t){return h(r(255*t),0,255)}function d(t){return h(r(t/2.55)/100,0,1)}function u(t){return h(r(100*t),0,100)}const f={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},p=[..."0123456789ABCDEF"],g=t=>p[15&t],m=t=>p[(240&t)>>4]+p[15&t],b=t=>(240&t)>>4==(15&t);const x=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function y(t,e,i){const n=e*Math.min(i,1-i),s=(e,s=(e+t/30)%12)=>i-n*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function v(t,e,i){const n=(n,s=(n+t/60)%6)=>i-i*e*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function _(t,e,i){const n=y(t,1,.5);let s;for(e+i>1&&(s=1/(e+i),e*=s,i*=s),s=0;s<3;s++)n[s]*=1-e-i,n[s]+=e;return n}function w(t){const e=t.r/255,i=t.g/255,n=t.b/255,s=Math.max(e,i,n),o=Math.min(e,i,n),a=(s+o)/2;let r,h,c;return s!==o&&(c=s-o,h=a>.5?c/(2-s-o):c/(s+o),r=function(t,e,i,n,s){return t===s?(e-i)/n+(et<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,T=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function I(t,e,i){if(t){let n=w(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=k(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function A(t,e){return t?Object.assign(e||{},t):t}function L(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=l(t[3]))):(e=A(t,{r:0,g:0,b:0,a:1})).a=l(e.a),e}function R(t){return"r"===t.charAt(0)?function(t){const e=O.exec(t);let i,n,s,o=255;if(e){if(e[7]!==i){const t=+e[7];o=e[8]?c(t):h(255*t,0,255)}return i=+e[1],n=+e[3],s=+e[5],i=255&(e[2]?c(i):h(i,0,255)),n=255&(e[4]?c(n):h(n,0,255)),s=255&(e[6]?c(s):h(s,0,255)),{r:i,g:n,b:s,a:o}}}(t):function(t){const e=x.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?c(+e[5]):l(+e[5]));const s=S(+e[2]),o=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return M(_,t,e,i)}(s,o,a):"hsv"===e[1]?function(t,e,i){return M(v,t,e,i)}(s,o,a):k(s,o,a),{r:i[0],g:i[1],b:i[2],a:n}}(t)}class z{constructor(t){if(t instanceof z)return t;const e=typeof t;let i;var n,s,o;"object"===e?i=L(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?s={r:255&17*f[n[1]],g:255&17*f[n[2]],b:255&17*f[n[3]],a:5===o?17*f[n[4]]:255}:7!==o&&9!==o||(s={r:f[n[1]]<<4|f[n[2]],g:f[n[3]]<<4|f[n[4]],b:f[n[5]]<<4|f[n[6]],a:9===o?f[n[7]]<<4|f[n[8]]:255})),i=s||function(t){P||(P=function(){const t={},e=Object.keys(D),i=Object.keys(C);let n,s,o,a,r;for(n=0;n>16&255,o>>8&255,255&o]}return t}(),P.transparent=[0,0,0,0]);const e=P[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||R(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=A(this._rgb);return t&&(t.a=d(t.a)),t}set rgb(t){this._rgb=L(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${d(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(t=this._rgb,e=(t=>b(t.r)&&b(t.g)&&b(t.b)&&b(t.a))(t)?g:m,t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0):void 0;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=w(t),i=e[0],n=u(e[1]),s=u(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${s}%, ${d(t.a)})`:`hsl(${i}, ${n}%, ${s}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let s;const o=e===s?.5:e,a=2*o-1,r=i.a-n.a,h=((a*r==-1?a:(a+r)/(1+a*r))+1)/2;s=1-h,i.r=255&h*i.r+s*n.r+.5,i.g=255&h*i.g+s*n.g+.5,i.b=255&h*i.b+s*n.b+.5,i.a=o*i.a+(1-o)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const n=T(d(t.r)),s=T(d(t.g)),o=T(d(t.b));return{r:l(E(n+i*(T(d(e.r))-n))),g:l(E(s+i*(T(d(e.g))-s))),b:l(E(o+i*(T(d(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new z(this.rgb)}alpha(t){return this._rgb.a=l(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=r(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return I(this._rgb,2,t),this}darken(t){return I(this._rgb,2,-t),this}saturate(t){return I(this._rgb,1,t),this}desaturate(t){return I(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=w(t);i[0]=S(i[0]+e),i=k(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}const F=(()=>{let t=0;return()=>t++})();function j(t){return null==t}function V(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function B(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function W(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function N(t,e){return W(t)?t:e}function H(t,e){return void 0===t?e:t}function $(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function U(t,e,i,n){let s,o,a;if(V(t))if(o=t.length,n)for(s=o-1;s>=0;s--)e.call(i,t[s],s);else for(s=0;st,x:t=>t.x,y:t=>t.y};function tt(t,e){const i=J[e]||(J[e]=function(t){const e=function(t){const e=t.split("."),i=[];let n="";for(const t of e)n+=t,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function et(t){return t.charAt(0).toUpperCase()+t.slice(1)}const it=t=>void 0!==t,nt=t=>"function"==typeof t,st=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},ot=Math.PI,at=2*ot,rt=at+ot,ht=Number.POSITIVE_INFINITY,ct=ot/180,lt=ot/2,dt=ot/4,ut=2*ot/3,ft=Math.log10,pt=Math.sign;function gt(t,e,i){return Math.abs(t-e)h&&c=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function Ct(t,e,i){i=i||(i=>t[i]1;)n=o+s>>1,i(n)?o=n:s=n;return{lo:o,hi:s}}const Dt=(t,e,i,n)=>Ct(t,i,n?n=>{const s=t[n][e];return st[n][e]Ct(t,i,(n=>t[n][e]>=i)),Ot=["push","pop","shift","splice","unshift"];function Et(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,s=n.indexOf(e);-1!==s&&n.splice(s,1),n.length>0||(Ot.forEach((e=>{delete t[e]})),delete t._chartjs)}const Tt="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function It(t,e){let i=[],n=!1;return function(...s){i=s,n||(n=!0,Tt.call(window,(()=>{n=!1,t.apply(e,i)})))}}const At=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;const Lt=t=>0===t||1===t,Rt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*at/i),zt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*at/i)+1,Ft={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*lt),easeOutSine:t=>Math.sin(t*lt),easeInOutSine:t=>-.5*(Math.cos(ot*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Lt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Lt(t)?t:Rt(t,.075,.3),easeOutElastic:t=>Lt(t)?t:zt(t,.075,.3),easeInOutElastic(t){const e=.1125;return Lt(t)?t:t<.5?.5*Rt(2*t,e,.45):.5+.5*zt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Ft.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*Ft.easeInBounce(2*t):.5*Ft.easeOutBounce(2*t-1)+.5};function jt(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Vt(t){return jt(t)?t:new z(t)}function Bt(t){return jt(t)?t:new z(t).saturate(.5).darken(.1).hexString()}const Wt=["x","y","borderWidth","radius","tension"],Nt=["color","borderColor","backgroundColor"],Ht=new Map;function $t(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Ht.get(i);return n||(n=new Intl.NumberFormat(t,e),Ht.set(i,n)),n}(e,i).format(t)}const Ut={values:t=>V(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let s,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const a=ft(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),h={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(h,this.options.ticks.format),$t(t,n,h)},logarithmic(t,e,i){if(0===t)return"0";const n=i[e].significand||t/Math.pow(10,Math.floor(ft(t)));return[1,2,3,5,10,15].includes(n)||e>.8*i.length?Ut.numeric.call(this,t,e,i):""}};var Yt={formatters:Ut};const Zt=Object.create(null),qt=Object.create(null);function Xt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Bt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Bt(e.borderColor),this.hoverColor=(t,e)=>Bt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Gt(this,t,e)}get(t){return Xt(this,t)}describe(t,e){return Gt(qt,t,e)}override(t,e){return Gt(Zt,t,e)}route(t,e,i,n){const s=Xt(this,t),o=Xt(this,i),a="_"+e;Object.defineProperties(s,{[a]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=o[n];return B(t)?Object.assign({},e,t):H(t,e)},set(t){this[a]=t}}})}apply(t){t.forEach((t=>t(this)))}}var Qt=new Kt({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:Nt},numbers:{type:"number",properties:Wt}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Yt.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function Jt(t,e,i,n,s){let o=e[s];return o||(o=e[s]=t.measureText(s).width,i.push(s)),o>n&&(n=o),n}function te(t,e,i){const n=t.currentDevicePixelRatio,s=0!==i?Math.max(i/2,.5):0;return Math.round((e-s)*n)/n+s}function ee(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function ie(t,e,i,n){!function(t,e,i,n,s){let o,a,r,h,c,l,d,u;const f=e.pointStyle,p=e.rotation,g=e.radius;let m=(p||0)*ct;if(f&&"object"==typeof f&&(o=f.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(g)||g<=0)){switch(t.beginPath(),f){default:s?t.ellipse(i,n,s/2,g,0,0,at):t.arc(i,n,g,0,at),t.closePath();break;case"triangle":l=s?s/2:g,t.moveTo(i+Math.sin(m)*l,n-Math.cos(m)*g),m+=ut,t.lineTo(i+Math.sin(m)*l,n-Math.cos(m)*g),m+=ut,t.lineTo(i+Math.sin(m)*l,n-Math.cos(m)*g),t.closePath();break;case"rectRounded":c=.516*g,h=g-c,a=Math.cos(m+dt)*h,d=Math.cos(m+dt)*(s?s/2-c:h),r=Math.sin(m+dt)*h,u=Math.sin(m+dt)*(s?s/2-c:h),t.arc(i-d,n-r,c,m-ot,m-lt),t.arc(i+u,n-a,c,m-lt,m),t.arc(i+d,n+r,c,m,m+lt),t.arc(i-u,n+a,c,m+lt,m+ot),t.closePath();break;case"rect":if(!p){h=Math.SQRT1_2*g,l=s?s/2:h,t.rect(i-l,n-h,2*l,2*h);break}m+=dt;case"rectRot":d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-r),t.lineTo(i+u,n-a),t.lineTo(i+d,n+r),t.lineTo(i-u,n+a),t.closePath();break;case"crossRot":m+=dt;case"cross":d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-r),t.lineTo(i+d,n+r),t.moveTo(i+u,n-a),t.lineTo(i-u,n+a);break;case"star":d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-r),t.lineTo(i+d,n+r),t.moveTo(i+u,n-a),t.lineTo(i-u,n+a),m+=dt,d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-r),t.lineTo(i+d,n+r),t.moveTo(i+u,n-a),t.lineTo(i-u,n+a);break;case"line":a=s?s/2:Math.cos(m)*g,r=Math.sin(m)*g,t.moveTo(i-a,n-r),t.lineTo(i+a,n+r);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(m)*(s?s/2:g),n+Math.sin(m)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}(t,e,i,n,null)}function ne(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let h,c;for(t.save(),t.font=s.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),j(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),h=0;h+t||0;function me(t,e){const i={},n=B(e),s=n?Object.keys(e):e,o=B(t)?n?i=>H(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of s)i[t]=ge(o(t));return i}function be(t){return me(t,{top:"y",right:"x",bottom:"y",left:"x"})}function xe(t){const e=be(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ye(t,e){t=t||{},e=e||Qt.font;let i=H(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=H(t.style,e.style);n&&!(""+n).match(fe)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:H(t.family,e.family),lineHeight:pe(H(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:H(t.weight,e.weight),string:""};return s.string=function(t){return!t||j(t.size)||j(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(s),s}function ve(t,e,i,n){let s,o,a,r=!0;for(s=0,o=t.length;st[0])){const o=i||t;void 0===n&&(n=Ae("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:n,_getTarget:s,override:i=>we([i,...t],e,o,n)};return new Proxy(a,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>De(i,n,(()=>function(t,e,i,n){let s;for(const o of e)if(s=Ae(Se(o,t),i),void 0!==s)return Ce(t,s)?Te(i,n,t,s):s}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Le(t).includes(e),ownKeys:t=>Le(t),set(t,e,i){const n=t._storage||(t._storage=s());return t[e]=n[e]=i,delete t._keys,!0}})}function Me(t,e,i,n){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:ke(t,n),setContext:e=>Me(t,e,i,n),override:s=>Me(t.override(s),e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>De(t,e,(()=>function(t,e,i){const{_proxy:n,_context:s,_subProxy:o,_descriptors:a}=t;let r=n[e];return nt(r)&&a.isScriptable(e)&&(r=function(t,e,i,n){const{_proxy:s,_context:o,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let h=e(o,a||n);return r.delete(t),Ce(t,h)&&(h=Te(s._scopes,s,t,h)),h}(e,r,t,i)),V(r)&&r.length&&(r=function(t,e,i,n){const{_proxy:s,_context:o,_subProxy:a,_descriptors:r}=i;if(void 0!==o.index&&n(t))return e[o.index%e.length];if(B(e[0])){const i=e,n=s._scopes.filter((t=>t!==i));e=[];for(const h of i){const i=Te(n,s,t,h);e.push(Me(i,o,a&&a[t],r))}}return e}(e,r,t,a.isIndexable)),Ce(e,r)&&(r=Me(r,s,o&&o[e],a)),r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function ke(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:i,indexable:n,isScriptable:nt(i)?i:()=>i,isIndexable:nt(n)?n:()=>n}}const Se=(t,e)=>t?t+et(e):e,Ce=(t,e)=>B(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function De(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Pe(t,e,i){return nt(t)?t(e,i):t}const Oe=(t,e)=>!0===t?e:"string"==typeof t?tt(e,t):void 0;function Ee(t,e,i,n,s){for(const o of e){const e=Oe(i,o);if(e){t.add(e);const o=Pe(e._fallback,i,s);if(void 0!==o&&o!==i&&o!==n)return o}else if(!1===e&&void 0!==n&&i!==n)return null}return!1}function Te(t,e,i,n){const s=e._rootScopes,o=Pe(e._fallback,i,n),a=[...t,...s],r=new Set;r.add(n);let h=Ie(r,a,i,o||i,n);return null!==h&&(void 0===o||o===i||(h=Ie(r,a,o,h,n),null!==h))&&we(Array.from(r),[""],s,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const s=n[e];return V(s)&&B(i)?i:s||{}}(e,i,n)))}function Ie(t,e,i,n,s){for(;i;)i=Ee(t,e,i,n,s);return i}function Ae(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function Le(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const Re=Number.EPSILON||1e-14,ze=(t,e)=>e"x"===t?"y":"x";function je(t,e,i,n){const s=t.skip?e:t,o=e,a=i.skip?e:i,r=vt(o,s),h=vt(a,o);let c=r/(r+h),l=h/(r+h);c=isNaN(c)?0:c,l=isNaN(l)?0:l;const d=n*c,u=n*l;return{previous:{x:o.x-d*(a.x-s.x),y:o.y-d*(a.y-s.y)},next:{x:o.x+u*(a.x-s.x),y:o.y+u*(a.y-s.y)}}}function Ve(t,e,i){return Math.max(Math.min(t,i),e)}function Be(t,e,i,n,s){let o,a,r,h;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const i=Fe(e),n=t.length,s=Array(n).fill(0),o=Array(n);let a,r,h,c=ze(t,0);for(a=0;at.ownerDocument.defaultView.getComputedStyle(t,null),Ue=["top","right","bottom","left"];function Ye(t,e,i){const n={};i=i?"-"+i:"";for(let s=0;s<4;s++){const o=Ue[s];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const Ze=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function qe(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,s=$e(i),o="border-box"===s.boxSizing,a=Ye(s,"padding"),r=Ye(s,"border","width"),{x:h,y:c,box:l}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:s,offsetY:o}=n;let a,r,h=!1;if(Ze(s,o,t.target))a=s,r=o;else{const t=e.getBoundingClientRect();a=n.clientX-t.left,r=n.clientY-t.top,h=!0}return{x:a,y:r,box:h}}(t,i),d=a.left+(l&&r.left),u=a.top+(l&&r.top);let{width:f,height:p}=e;return o&&(f-=a.width+r.width,p-=a.height+r.height),{x:Math.round((h-d)/f*i.width/n),y:Math.round((c-u)/p*i.height/n)}}const Xe=t=>Math.round(10*t)/10;function Ge(t,e,i){const n=e||1,s=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||a.height!==s||a.width!==o)&&(t.currentDevicePixelRatio=n,a.height=s,a.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Ke=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Qe(t,e){const i=function(t,e){return $e(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Je(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ti(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function ei(t,e,i,n){const s={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=Je(t,s,i),r=Je(s,o,i),h=Je(o,e,i),c=Je(a,r,i),l=Je(r,h,i);return Je(c,l,i)}function ii(t){return"angle"===t?{between:Mt,compare:_t,normalize:wt}:{between:St,compare:(t,e)=>t-e,normalize:t=>t}}function ni({start:t,end:e,count:i,loop:n,style:s}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:s}}function si(t,e,i){if(!i)return[t];const{property:n,start:s,end:o}=i,a=e.length,{compare:r,between:h,normalize:c}=ii(n),{start:l,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:s,end:o}=i,{between:a,normalize:r}=ii(n),h=e.length;let c,l,{start:d,end:u,loop:f}=t;if(f){for(d+=h,u+=h,c=0,l=h;cn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=Tt.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const s=i.items;let o,a=s.length-1,r=!1;for(;a>=0;--a)o=s[a],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),r=!0):(s[a]=s[s.length-1],s.pop());r&&(n.draw(),this._notify(n,i,t,"progress")),s.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=s.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var hi=new ri;const ci="transparent",li={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Vt(t||ci),s=n.valid&&Vt(e||ci);return s&&s.valid?s.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class di{constructor(t,e,i,n){const s=e[i];n=ve([t.to,n,s,t.from]);const o=ve([t.from,s,n]);this._active=!0,this._fn=t.fn||li[t.type||typeof o],this._easing=Ft[t.easing]||Ft.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],s=i-this._start,o=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=ve([t.to,e,n,t.from]),this._from=ve([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,s=this._from,o=this._loop,a=this._to;let r;if(this._active=s!==a&&(o||e1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[n]=this._fn(s,a,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t{const s=t[n];if(!B(s))return;const o={};for(const t of e)o[t]=s[t];(V(s.properties)&&s.properties||[n]).forEach((t=>{t!==n&&i.has(t)||i.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const s=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),s}_createAnimations(t,e){const i=this._properties,n=[],s=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let r;for(r=o.length-1;r>=0;--r){const h=o[r];if("$"===h.charAt(0))continue;if("options"===h){n.push(...this._animateOptions(t,e));continue}const c=e[h];let l=s[h];const d=i.get(h);if(l){if(d&&l.active()){l.update(d,c,a);continue}l.cancel()}d&&d.duration?(s[h]=l=new di(d,t,h,c),n.push(l)):t[h]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(hi.add(this._chart,i),!0):void 0}}function fi(t,e){const i=t&&t.options||{},n=i.reverse,s=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:s,end:n?s:o}}function pi(t,e){const i=[],n=t._getSortedDatasetMetas(e);let s,o;for(s=0,o=n.length;s0||!i&&e<0)return s.index}return null}function yi(t,e){const{chart:i,_cachedMeta:n}=t,s=i._stacks||(i._stacks={}),{iScale:o,vScale:a,index:r}=n,h=o.axis,c=a.axis,l=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,a,n),d=e.length;let u;for(let t=0;ti[t].axis===e)).shift()}function _i(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i],void 0!==e[n]._visualValues&&void 0!==e[n]._visualValues[i]&&delete e[n]._visualValues[i]}}}const wi=t=>"reset"===t||"none"===t,Mi=(t,e)=>e?t:Object.assign({},t);class ki{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=mi(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&_i(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=e.xAxisID=H(i.xAxisID,vi(t,"x")),o=e.yAxisID=H(i.yAxisID,vi(t,"y")),a=e.rAxisID=H(i.rAxisID,vi(t,"r")),r=e.indexAxis,h=e.iAxisID=n(r,s,o,a),c=e.vAxisID=n(r,o,s,a);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(h),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Et(this._data,this),t._stacked&&_i(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(B(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,s,o;for(n=0,s=e.length;n{const e="_onData"+et(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const s=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),s}})})))),this._syncList=[],this._data=e}var n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const s=e._stacked;e._stacked=mi(e.vScale,e),e.stack!==i.stack&&(n=!0,_i(e),e.stack=i.stack),this._resyncElements(t),(n||s!==e._stacked)&&yi(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:s,_stacked:o}=i,a=s.axis;let r,h,c,l=0===t&&e===n.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=V(n[t])?this.parseArrayData(i,n,t,e):B(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const s=()=>null===h[a]||d&&h[a]t&&!e.hidden&&e._stacked&&{keys:pi(i,!0),values:null})(e,i,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:l}=function(t){const{min:e,max:i,minDefined:n,maxDefined:s}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:s?i:Number.POSITIVE_INFINITY}}(a);let d,u;function f(){u=n[d];const e=u[a.axis];return!W(u[t.axis])||c>e||l=0;--d)if(!f()){this.updateRangeFromParsed(h,t,u,r);break}return h}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,s,o;for(n=0,s=e.length;n=0&&tthis.getContext(i,n,e)),l);return f.$shared&&(f.$shared=r,s[o]=Object.freeze(Mi(f,r))),f}_resolveAnimations(t,e,i){const n=this.chart,s=this._cachedDataOpts,o=`animation-${e}`,a=s[o];if(a)return a;let r;if(!1!==n.options.animation){const n=this.chart.config,s=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),s);r=n.createResolver(o,this.getContext(t,i,e))}const h=new ui(n,r&&r.animations);return r&&r._cacheable&&(s[o]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||wi(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,s=this.getSharedOptions(i),o=this.includeOptions(e,s)||s!==n;return this.updateSharedOptions(s,e,i),{sharedOptions:s,includeOptions:o}}updateElement(t,e,i,n){wi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!wi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const s=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,s=e.length,o=Math.min(s,n);o&&this.parse(0,o),s>n?this._insertElements(n,s-n,t):s{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(r(s),a=t;at-e)))}return t._cache.$bar}(e,t.type);let n,s,o,a,r=e._length;const h=()=>{32767!==o&&-32768!==o&&(it(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(n=0,s=i.length;nMath.abs(r)&&(h=r,c=a),e[i.axis]=c,e._custom={barStart:h,barEnd:c,start:s,end:o,min:a,max:r}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Di(t,e,i,n){const s=t.iScale,o=t.vScale,a=s.getLabels(),r=s===o,h=[];let c,l,d,u;for(c=i,l=i+n;ct.x,i="left",n="right"):(e=t.base{t[a](e[i],s)&&(o.push({element:t,datasetIndex:n,index:h}),r=r||t.inRange(e.x,e.y,s))})),n&&!r?[]:o}var ji={evaluateInteractionItems:Li,modes:{index(t,e,i,n){const s=qe(e,t),o=i.axis||"x",a=i.includeInvisible||!1,r=i.intersect?Ri(t,s,o,n,a):zi(t,s,o,!1,n,a),h=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&h.push({element:i,datasetIndex:t.index,index:e})})),h):[]},dataset(t,e,i,n){const s=qe(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;let r=i.intersect?Ri(t,s,o,n,a):zi(t,s,o,!1,n,a);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;tRi(t,qe(e,t),i.axis||"xy",n,i.includeInvisible||!1),nearest(t,e,i,n){const s=qe(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;return zi(t,s,o,i.intersect,n,a)},x:(t,e,i,n)=>Fi(t,qe(e,t),"x",i.intersect,n),y:(t,e,i,n)=>Fi(t,qe(e,t),"y",i.intersect,n)}};const Vi=["left","top","right","bottom"];function Bi(t,e){return t.filter((t=>t.pos===e))}function Wi(t,e){return t.filter((t=>-1===Vi.indexOf(t.pos)&&t.box.axis===e))}function Ni(t,e){return t.sort(((t,i)=>{const n=e?i:t,s=e?t:i;return n.weight===s.weight?n.index-s.index:n.weight-s.weight}))}function Hi(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function $i(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ui(t,e,i,n){const{pos:s,box:o}=i,a=t.maxPadding;if(!B(s)){i.size&&(t[s]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?o.height:o.width),i.size=e.size/e.count,t[s]+=i.size}o.getPadding&&$i(a,o.getPadding());const r=Math.max(0,e.outerWidth-Hi(a,t,"left","right")),h=Math.max(0,e.outerHeight-Hi(a,t,"top","bottom")),c=r!==t.w,l=h!==t.h;return t.w=r,t.h=h,i.horizontal?{same:c,other:l}:{same:l,other:c}}function Yi(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}(t?["left","right"]:["top","bottom"])}function Zi(t,e,i,n){const s=[];let o,a,r,h,c,l;for(o=0,a=t.length,c=0;ot.box.fullSize)),!0),n=Ni(Bi(e,"left"),!0),s=Ni(Bi(e,"right")),o=Ni(Bi(e,"top"),!0),a=Ni(Bi(e,"bottom")),r=Wi(e,"x"),h=Wi(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:s.concat(h).concat(a).concat(r),chartArea:Bi(e,"chartArea"),vertical:n.concat(s).concat(h),horizontal:o.concat(a).concat(r)}}(t.boxes),h=r.vertical,c=r.horizontal;U(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const l=h.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:s,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/l,hBoxMaxHeight:a/2}),u=Object.assign({},s);$i(u,xe(n));const f=Object.assign({maxPadding:u,w:o,h:a,x:s.left,y:s.top},s),p=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:s}=i;if(!t||!Vi.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:s}=e;let o,a,r;for(o=0,a=t.length;o{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class Ki{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Qi extends Ki{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ji="$chartjs",tn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},en=t=>null===t||""===t,nn=!!Ke&&{passive:!0};function sn(t,e,i){t.canvas.removeEventListener(e,i,nn)}function on(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function an(t,e,i){const n=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||on(i.addedNodes,n),e=e&&!on(i.removedNodes,n);e&&i()}));return s.observe(document,{childList:!0,subtree:!0}),s}function rn(t,e,i){const n=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||on(i.removedNodes,n),e=e&&!on(i.addedNodes,n);e&&i()}));return s.observe(document,{childList:!0,subtree:!0}),s}const hn=new Map;let cn=0;function ln(){const t=window.devicePixelRatio;t!==cn&&(cn=t,hn.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function dn(t,e,i){const n=t.canvas,s=n&&Ne(n);if(!s)return;const o=It(((t,e)=>{const n=s.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return a.observe(s),function(t,e){hn.size||window.addEventListener("resize",ln),hn.set(t,e)}(t,o),a}function un(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){hn.delete(t),hn.size||window.removeEventListener("resize",ln)}(t)}function fn(t,e,i){const n=t.canvas,s=It((e=>{null!==t.ctx&&i(function(t,e){const i=tn[t.type]||t.type,{x:n,y:s}=qe(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==s?s:null}}(e,t))}),t);return function(t,e,i){t.addEventListener(e,i,nn)}(n,e,s),s}class pn extends Ki{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),s=t.getAttribute("width");if(t[Ji]={initial:{height:n,width:s,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",en(s)){const e=Qe(t,"width");void 0!==e&&(t.width=e)}if(en(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Qe(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Ji])return!1;const i=e[Ji].initial;["height","width"].forEach((t=>{const n=i[t];j(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e[Ji],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),s={attach:an,detach:rn,resize:dn}[e]||fn;n[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:un,detach:un,resize:un}[e]||sn)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return function(t,e,i,n){const s=$e(t),o=Ye(s,"margin"),a=He(s.maxWidth,t,"clientWidth")||ht,r=He(s.maxHeight,t,"clientHeight")||ht,h=function(t,e,i){let n,s;if(void 0===e||void 0===i){const o=Ne(t);if(o){const t=o.getBoundingClientRect(),a=$e(o),r=Ye(a,"border","width"),h=Ye(a,"padding");e=t.width-h.width-r.width,i=t.height-h.height-r.height,n=He(a.maxWidth,o,"clientWidth"),s=He(a.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||ht,maxHeight:s||ht}}(t,e,i);let{width:c,height:l}=h;if("content-box"===s.boxSizing){const t=Ye(s,"border","width"),e=Ye(s,"padding");c-=e.width+t.width,l-=e.height+t.height}return c=Math.max(0,c-o.width),l=Math.max(0,n?c/n:l-o.height),c=Xe(Math.min(c,a,h.maxWidth)),l=Xe(Math.min(l,r,h.maxHeight)),c&&!l&&(l=Xe(c/2)),(void 0!==e||void 0!==i)&&n&&h.height&&l>h.height&&(l=h.height,c=Xe(Math.floor(l*n))),{width:c,height:l}}(t,e,i,n)}isAttached(t){const e=Ne(t);return!(!e||!e.isConnected)}}class gn{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return bt(this.x)&&bt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}function mn(t,e,i,n,s){const o=H(n,0),a=Math.min(H(s,t.length),t.length);let r,h,c,l=0;for(i=Math.ceil(i),s&&(r=s-n,i=r/Math.floor(r/i)),c=o;c<0;)l++,c=Math.round(o+l*i);for(h=Math.max(o,0);h"top"===e||"left"===e?t[e]+i:t[e]-i,xn=(t,e)=>Math.min(e||t,t);function yn(t,e){const i=[],n=t.length/e,s=t.length;let o=0;for(;oa+r)))return c}function _n(t){return t.drawTicks?t.tickLength:0}function wn(t,e){if(!t.display)return 0;const i=ye(t.font,e),n=xe(t.padding);return(V(t.text)?t.text.length:1)*i.lineHeight+n.height}function Mn(t,e,i){let n=(t=>"start"===t?"left":"end"===t?"right":"center")(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class kn extends gn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=N(t,Number.POSITIVE_INFINITY),e=N(e,Number.NEGATIVE_INFINITY),i=N(i,Number.POSITIVE_INFINITY),n=N(n,Number.NEGATIVE_INFINITY),{min:N(t,i),max:N(e,n),minDefined:W(t),maxDefined:W(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:s,maxDefined:o}=this.getUserBounds();if(s&&o)return{min:i,max:n};const a=this.getMatchingVisibleMetas();for(let r=0,h=a.length;rn?n:i,n=s&&i>n?i:n,{min:N(i,N(n,i)),max:N(n,N(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:s}=t,o=(h=(s-n)/2,"string"==typeof(r=e)&&r.endsWith("%")?parseFloat(r)/100*h:+r),a=(t,e)=>i&&0===t?0:t+e;var r,h;return{min:a(n,-Math.abs(o)),max:a(s,o)}}(this,s,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=as)return function(t,e,i,n){let s,o=0,a=i[0];for(n=Math.ceil(n),s=0;st-e)).pop(),e}(n);for(let t=0,e=o.length-1;ts)return e}return Math.max(s,1)}(o,e,s);if(a>0){let t,i;const n=a>1?Math.round((h-r)/(a-1)):null;for(mn(e,c,l,j(n)?0:r-n,r),t=0,i=a-1;t=s||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),l=c.widest.width,d=c.highest.height,u=kt(this.chart.width-l,0,this.maxWidth);o=t.offset?this.maxWidth/i:u/(i-1),l+6>o&&(o=u/(i-(t.offset?.5:1)),a=this.maxHeight-_n(t.grid)-e.padding-wn(t.title,this.chart.options.font),r=Math.sqrt(l*l+d*d),h=Math.min(Math.asin(kt((c.highest.height+6)/o,-1,1)),Math.asin(kt(a/r,-1,1))-Math.asin(kt(d/r,-1,1)))*(180/ot),h=Math.max(n,Math.min(s,h))),this.labelRotation=h}afterCalculateLabelRotation(){$(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=wn(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=_n(s)+o):(t.height=this.maxHeight,t.width=_n(s)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:s,highest:o}=this._getLabelSizes(),r=2*i.padding,h=xt(this.labelRotation),c=Math.cos(h),l=Math.sin(h);if(a){const e=i.mirror?0:l*s.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:c*s.width+l*o.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,n,l,c)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:s,padding:o},position:a}=this.options,r=0!==this.labelRotation,h="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let l=0,d=0;r?h?(l=n*t.width,d=i*e.height):(l=i*t.height,d=n*e.width):"start"===s?d=e.width:"end"===s?l=t.width:"inner"!==s&&(l=t.width/2,d=e.width/2),this.paddingLeft=Math.max((l-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){$(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let s;if(n>e){for(s=0;s({width:o[t]||0,height:a[t]||0});return{first:M(0),last:M(e-1),widest:M(_),highest:M(w),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return kt(this._alignToPixels?te(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*n?a/i:r/n:r*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:s,position:o,border:a}=n,r=s.offset,h=this.isHorizontal(),c=this.ticks.length+(r?1:0),l=_n(s),d=[],u=a.setContext(this.getContext()),f=u.display?u.width:0,p=f/2,g=function(t){return te(i,t,f)};let m,b,x,y,v,_,w,M,k,S,C,D;if("top"===o)m=g(this.bottom),_=this.bottom-l,M=m-p,S=g(t.top)+p,D=t.bottom;else if("bottom"===o)m=g(this.top),S=t.top,D=g(t.bottom)-p,_=m+p,M=this.top+l;else if("left"===o)m=g(this.right),v=this.right-l,w=m-p,k=g(t.left)+p,C=t.right;else if("right"===o)m=g(this.left),k=t.left,C=g(t.right)-p,v=m+p,w=this.left+l;else if("x"===e){if("center"===o)m=g((t.top+t.bottom)/2+.5);else if(B(o)){const t=Object.keys(o)[0],e=o[t];m=g(this.chart.scales[t].getPixelForValue(e))}S=t.top,D=t.bottom,_=m+p,M=_+l}else if("y"===e){if("center"===o)m=g((t.left+t.right)/2);else if(B(o)){const t=Object.keys(o)[0],e=o[t];m=g(this.chart.scales[t].getPixelForValue(e))}v=m-p,w=v-l,k=t.left,C=t.right}const P=H(n.ticks.maxTicksLimit,c),O=Math.max(1,Math.ceil(c/P));for(b=0;be.value===t));return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const a=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(s=0,o=n.length;s{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let s,o;for(s=0,o=e.length;s{const n=i.split("."),s=n.pop(),o=[t].concat(n).join("."),a=e[i].split("."),r=a.pop(),h=a.join(".");Qt.route(o,s,h,r)}))}(e,t.defaultRoutes),t.descriptors&&Qt.describe(e,t.descriptors)}(t,o,i),this.override&&Qt.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in Qt[n]&&(delete Qt[n][i],this.override&&delete Zt[i])}}class Cn{constructor(){this.controllers=new Sn(ki,"datasets",!0),this.elements=new Sn(gn,"elements"),this.plugins=new Sn(Object,"plugins"),this.scales=new Sn(kn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):U(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=et(t);$(i["before"+n],[],i),e[t](i),$(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function On(t,e){return e||!1!==t?!0===t?{}:t:null}function En(t,{plugin:e,local:i},n,s){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(n,o);return i&&e.defaults&&a.push(e.defaults),t.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Tn(t,e){const i=Qt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function In(t){if("x"===t||"y"===t||"r"===t)return t}function An(t,...e){if(In(t))return t;for(const n of e){const e=n.axis||("top"===(i=n.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&In(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Ln(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function Rn(t){const e=t.options||(t.options={});e.plugins=H(e.plugins,{}),e.scales=function(t,e){const i=Zt[t.type]||{scales:{}},n=e.scales||{},s=Tn(t.type,e),o=Object.create(null);return Object.keys(n).forEach((e=>{const a=n[e];if(!B(a))return console.error(`Invalid scale configuration for scale: ${e}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const r=An(e,a,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return Ln(t,"x",i[0])||Ln(t,"y",i[0])}return{}}(e,t),Qt.scales[a.type]),h=function(t,e){return t===e?"_index_":"_value_"}(r,s),c=i.scales||{};o[e]=K(Object.create(null),[{axis:r},a,c[r],c[h]])})),t.data.datasets.forEach((i=>{const s=i.type||t.type,a=i.indexAxis||Tn(s,e),r=(Zt[s]||{}).scales||{};Object.keys(r).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),s=i[e+"AxisID"]||e;o[s]=o[s]||Object.create(null),K(o[s],[{axis:e},n[s],r[t]])}))})),Object.keys(o).forEach((t=>{const e=o[t];K(e,[Qt.scales[e.type],Qt.scale])})),o}(t,e)}function zn(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Fn=new Map,jn=new Set;function Vn(t,e){let i=Fn.get(t);return i||(i=e(),Fn.set(t,i),jn.add(i)),i}const Bn=(t,e,i)=>{const n=tt(e,i);void 0!==n&&t.add(n)};class Wn{constructor(t){this._config=function(t){return(t=t||{}).data=zn(t.data),Rn(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=zn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Rn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Vn(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Vn(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Vn(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Vn(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:s}=this,o=this._cachedScopes(t,i),a=o.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>Bn(r,t,e)))),e.forEach((t=>Bn(r,n,t))),e.forEach((t=>Bn(r,Zt[s]||{},t))),e.forEach((t=>Bn(r,Qt,t))),e.forEach((t=>Bn(r,qt,t)))}));const h=Array.from(r);return 0===h.length&&h.push(Object.create(null)),jn.has(e)&&o.set(e,h),h}chartOptionScopes(){const{options:t,type:e}=this;return[t,Zt[e]||{},Qt.datasets[e]||{},{type:e},Qt,qt]}resolveNamedOptions(t,e,i,n=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=Nn(this._resolverCache,t,n);let r=o;(function(t,e){const{isScriptable:i,isIndexable:n}=ke(t);for(const s of e){const e=i(s),o=n(s),a=(o||e)&&t[s];if(e&&(nt(a)||Hn(a))||o&&V(a))return!0}return!1})(o,e)&&(s.$shared=!1,r=Me(o,i=nt(i)?i():i,this.createResolver(t,i,a)));for(const t of e)s[t]=r[t];return s}createResolver(t,e,i=[""],n){const{resolver:s}=Nn(this._resolverCache,t,i);return B(e)?Me(s,e,void 0,n):s}}function Nn(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const s=i.join();let o=n.get(s);return o||(o={resolver:we(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(s,o)),o}const Hn=t=>B(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||nt(t[i])),!1),$n=["top","bottom","left","right","chartArea"];function Un(t,e){return"top"===t||"bottom"===t||-1===$n.indexOf(t)&&"x"===e}function Yn(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function Zn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),$(i&&i.onComplete,[t],e)}function qn(t){const e=t.chart,i=e.options.animation;$(i&&i.onProgress,[t],e)}function Xn(t){return We()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Gn={},Kn=t=>{const e=Xn(t);return Object.values(Gn).filter((t=>t.canvas===e)).pop()};function Qn(t,e,i){const n=Object.keys(t);for(const s of n){const n=+s;if(n>=e){const o=t[s];delete t[s],(i>0||n>e)&&(t[n+i]=o)}}}class Jn{static defaults=Qt;static instances=Gn;static overrides=Zt;static registry=Dn;static version="4.3.0";static getChart=Kn;static register(...t){Dn.add(...t),ts()}static unregister(...t){Dn.remove(...t),ts()}constructor(t,e){const i=this.config=new Wn(e),n=Xn(t),s=Kn(n);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!We()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Qi:pn}(n)),this.platform.updateConfig(i);const a=this.platform.acquireContext(n,o.aspectRatio),r=a&&a.canvas,h=r&&r.height,c=r&&r.width;this.id=F(),this.ctx=a,this.canvas=r,this.width=c,this.height=h,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Pn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),this._dataChanges=[],Gn[this.id]=this,a&&r?(hi.listen(this,"complete",Zn),hi.listen(this,"progress",qn),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:s}=this;return j(t)?e&&s?s:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Dn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ge(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ee(this.canvas,this.ctx),this}stop(){return hi.stop(this),this}resize(t,e){hi.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,s),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Ge(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),$(i.onResize,[this,o],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){U(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let s=[];e&&(s=s.concat(Object.keys(e).map((t=>{const i=e[t],n=An(t,i),s="r"===n,o="x"===n;return{options:i,dposition:s?"chartArea":o?"bottom":"left",dtype:s?"radialLinear":o?"category":"linear"}})))),U(s,(e=>{const s=e.options,o=s.id,a=An(o,s),r=H(s.type,e.dtype);void 0!==s.position&&Un(s.position,a)===Un(e.dposition)||(s.position=e.dposition),n[o]=!0;let h=null;o in i&&i[o].type===r?h=i[o]:(h=new(Dn.getScale(r))({id:o,type:r,ctx:this.ctx,chart:this}),i[h.id]=h),h.init(s,t)})),U(n,((t,e)=>{t||delete i[e]})),U(i,(t=>{Gi.configure(this,t,t.options),Gi.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Yn("z","_idx"));const{_active:a,_lastEvent:r}=this;r?this._eventHandler(r,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){U(this.scales,(t=>{Gi.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);st(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:s}of e)Qn(t,n,"_removeElements"===i?-s:s)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),n=i(0);for(let t=1;tt.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Gi.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],U(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,s=function(t){const{xScale:e,yScale:i}=t;if(e&&i)return{left:e.left,right:e.right,top:i.top,bottom:i.bottom}}(t)||this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&se(e,{left:!1===i.left?0:s.left-i.left,right:!1===i.right?this.width:s.right+i.right,top:!1===i.top?0:s.top-i.top,bottom:!1===i.bottom?this.height:s.bottom+i.bottom}),t.controller.draw(),n&&oe(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return ne(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const s=ji.modes[e];return"function"==typeof s?s(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=_e(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,n);it(e)?(s.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(s,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),hi.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};U(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},s=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{n("attach",a),this.attached=!0,this.resize(),i("resize",s),i("detach",o)};o=()=>{this.attached=!1,n("resize",s),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){U(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},U(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let s,o,a,r;for("dataset"===e&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+n+"DatasetHoverStyle"]()),a=0,r=t.length;a{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!Y(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const n=this.options.hover,s=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=s(e,t),a=i?t:s(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const s=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(s||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:s}=this,o=e,a=this._getActiveElements(t,n,i,o),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),h=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,$(s.onHover,[t,a,this],this),r&&$(s.onClick,[t,a,this],this));const c=!Y(a,n);return(c||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=h,c}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,n)}}function ts(){return U(Jn.instances,(t=>t._plugins.invalidate()))}function es(t,e,i=e){t.lineCap=H(i.borderCapStyle,e.borderCapStyle),t.setLineDash(H(i.borderDash,e.borderDash)),t.lineDashOffset=H(i.borderDashOffset,e.borderDashOffset),t.lineJoin=H(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=H(i.borderWidth,e.borderWidth),t.strokeStyle=H(i.borderColor,e.borderColor)}function is(t,e,i){t.lineTo(i.x,i.y)}function ns(t,e,i={}){const n=t.length,{start:s=0,end:o=n-1}=i,{start:a,end:r}=e,h=Math.max(s,a),c=Math.min(o,r),l=sr&&o>r;return{count:n,start:h,loop:e.loop,ilen:c(a+(c?r-t:t))%o,y=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(h&&(d=s[x(0)],t.moveTo(d.x,d.y)),l=0;l<=r;++l){if(d=s[x(l)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(ip&&(p=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),u=n,b=0,f=p=i),g=i}y()}function as(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?ss:os}const rs="function"==typeof Path2D;function hs(t,e,i,n){const s=t.options,{[i]:o}=t.getProps([i],n);return Math.abs(e-o)=0&&tn=e?n:t,a=t=>s=i?s:t;if(t){const t=pt(n),e=pt(s);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(n===s){let e=0===s?1:Math.abs(.05*s);a(s+e),t||o(n-e)}this.min=n,this.max=s}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=function(t,e){const i=[],{bounds:n,step:s,min:o,max:a,precision:r,count:h,maxTicks:c,maxDigits:l,includeBounds:d}=t,u=s||1,f=c-1,{min:p,max:g}=e,m=!j(o),b=!j(a),x=!j(h),y=(g-p)/(l+1);let v,_,w,M,k=mt((g-p)/f/u)*u;if(k<1e-14&&!m&&!b)return[{value:p},{value:g}];M=Math.ceil(g/k)-Math.floor(p/k),M>f&&(k=mt(M*k/f/u)*u),j(r)||(v=Math.pow(10,r),k=Math.ceil(k*v)/v),"ticks"===n?(_=Math.floor(p/k)*k,w=Math.ceil(g/k)*k):(_=p,w=g),m&&b&&s&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((a-o)/s,k/1e3)?(M=Math.round(Math.min((a-o)/k,c)),k=(a-o)/M,_=o,w=a):x?(_=m?o:_,w=b?a:w,M=h-1,k=(w-_)/M):(M=(w-_)/k,M=gt(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const S=Math.max(yt(k),yt(_));v=Math.pow(10,j(r)?S:r),_=Math.round(_*v)/v,w=Math.round(w*v)/v;let C=0;for(m&&(d&&_!==o?(i.push({value:o}),_a)break;i.push({value:t})}return b&&d&&w!==a?i.length&>(i[i.length-1].value,a,ms(a,y,t))?i[i.length-1].value=a:i.push({value:a}):b&&w!==a||i.push({value:w}),i}({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&function(t,e,i){let n,s,o;for(n=0,s=t.length;n0&&a[i]==c?a.push(""):(a.push(c),i=a.length-1),a.length>60&&(a.shift(),i--);var l=e.info.memory;s.data.push({x:h,y:l.textures}),o.data.push({x:h,y:l.geometries}),s.data.length>60&&(s.data.shift(),o.data.shift()),t&&r.update()},this.resize=function(){r.resize()}}Jn.register(class extends ki{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:s}=e,o=this.chart._animationsDisabled;let{start:a,count:r}=function(t,e,i){const n=e.length;let s=0,o=n;if(t._sorted){const{iScale:a,_parsed:r}=t,h=a.axis,{min:c,max:l,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(s=kt(Math.min(Dt(r,a.axis,c).lo,i?n:Dt(e,h,a.getPixelForValue(c)).lo),0,n-1)),o=u?kt(Math.max(Dt(r,a.axis,l,!0).hi+1,i?0:Dt(e,h,a.getPixelForValue(l),!0).hi+1),s,n)-s:n-s}return{start:s,count:o}}(e,n,o);this._drawStart=a,this._drawCount=r,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,s={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=s,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,s),o}(e)&&(a=0,r=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!s._decimated,i.points=n;const h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:h},t),this.updateElements(n,a,r,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:o,vScale:a,_stacked:r,_dataset:h}=this._cachedMeta,{sharedOptions:c,includeOptions:l}=this._getSharedOptions(e,n),d=o.axis,u=a.axis,{spanGaps:f,segment:p}=this.options,g=bt(f)?f:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||s||"none"===n,b=e+i,x=t.length;let y=e>0&&this.getParsed(e-1);for(let i=0;i=b){x.skip=!0;continue}const v=this.getParsed(i),_=j(v[u]),w=x[d]=o.getPixelForValue(v[d],i),M=x[u]=s||_?a.getBasePixel():a.getPixelForValue(r?this.applyStack(a,v,r):v[u],i);x.skip=isNaN(w)||isNaN(M)||_,x.stop=i>0&&Math.abs(v[d]-y[d])>g,p&&(x.parsed=v,x.raw=h.data[i]),l&&(x.options=c||this.resolveDataElementOptions(i,f.active?"active":n)),m||this.updateElement(f,i,x,n),y=v}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},class extends gn{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Be(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,s=i.length;if(!s)return[];const o=!!t._loop,{start:a,end:r}=function(t,e,i,n){let s=0,o=e-1;if(i&&!n)for(;ss&&t[o%e].skip;)o--;return o%=e,{start:s,end:o}}(i,s,o,n);return function(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const s=t._chart.getContext(),o=oi(t.options),{_datasetIndex:a,options:{spanGaps:r}}=t,h=i.length,c=[];let l=o,d=e[0].start,u=d;function f(t,e,n,s){const o=r?-1:1;if(t!==e){for(t+=h;i[t%h].skip;)t-=o;for(;i[e%h].skip;)e+=o;t%h!=e%h&&(c.push({start:t%h,end:e%h,loop:n,style:s}),l=s,d=e%h)}}for(const t of e){d=r?d:t.start;let e,o=i[d%h];for(u=d+1;u<=t.end;u++){const r=i[u%h];e=oi(n.setContext(_e(s,{type:"segment",p0:o,p1:r,p0DataIndex:(u-1)%h,p1DataIndex:u%h,datasetIndex:a}))),ai(e,l)&&f(d,u-1,t.loop,l),o=r,l=e}dnull===t?null:kt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,i,n){const s=t.indexOf(e);return-1===s?((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n):s!==t.lastIndexOf(e)?i:s}(i,t,H(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let s=this.getLabels();s=0===t&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){return gs.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},class extends gn{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:s,outer:o}=ds(this),a=(r=o.radius).topLeft||r.topRight||r.bottomLeft||r.bottomRight?de:fs;var r;t.save(),o.w===s.w&&o.h===s.h||(t.beginPath(),a(t,ps(o,e,s)),t.clip(),a(t,ps(s,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,ps(s,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return us(this,t,e,i)}inXRange(t,e){return us(this,t,null,e)}inYRange(t,e){return us(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+n)/2:e,y:s?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}},class extends ki{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,n){return Di(t,e,i,n)}parseArrayData(t,e,i,n){return Di(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:s,vScale:o}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,h="x"===s.axis?a:r,c="x"===o.axis?a:r,l=[];let d,u,f,p;for(d=i,u=i+n;dt.controller.options.grouped)),s=i.options.stacked,o=[],a=t=>{const i=t.controller.getParsed(e),n=i&&i[t.vScale.axis];if(j(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!a(i))&&((!1===s||-1===o.indexOf(i.stack)||void 0===s&&void 0===i.stack)&&o.push(i.stack),i.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),s=void 0!==e?n.indexOf(e):-1;return-1===s?n.length-1:s}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let s,o;for(s=0,o=e.data.length;s=i?1:-1)}(d,e,a)*o,u===a&&(m-=d/2);const t=e.getPixelForDecimal(0),s=e.getPixelForDecimal(1),h=Math.min(t,s),f=Math.max(t,s);m=Math.max(Math.min(m,f),h),l=m+d,i&&!c&&(r._stacks[e.axis]._visualValues[n]=e.getValueForPixel(l)-e.getValueForPixel(m))}if(m===e.getPixelForValue(a)){const t=pt(d)*e.getLineWidthForValue(a)/2;m+=t,d-=t}return{size:d,base:m,head:l,center:l+d/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,s=n.skipNull,o=H(n.maxBarThickness,1/0);let a,r;if(e.grouped){const i=s?this._getStackCount(t):e.stackCount,h="flex"===n.barThickness?function(t,e,i,n){const s=e.pixels,o=s[t];let a=t>0?s[t-1]:null,r=t0&&void 0!==arguments[0]&&arguments[0];this.obb.box3D.isEmpty()||(this.quaternion.copy(this.obb.quaternion),this.obb.box3D.getCenter(this.position).applyQuaternion(this.quaternion).add(this.obb.position),this.obb.box3D.getSize(this.scale),this.scale.multiplyScalar(.5),this.updateMatrix(),n.Object3D.prototype.updateMatrixWorld.call(this,t))}}]),o}(n.Box3Helper);const Es=Os;function Ts(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Is(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Is(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}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 o,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw o}}}}function Is(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);it.length)&&(e=t.length);for(var i=0,n=new Array(e);i=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}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 o,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw o}}}}(e.group.children);try{var s=function(){var n=t.value;n.visible=i.some((function(t){return i=t,s=n.owner.name,e.dbgDisplaySticky&&i===s||e.dbgDisplayParents&&i.startsWith(s)||e.dbgDisplayChildren&&s.startsWith(i);var i,s})),n.boxHelper&&(n.boxHelper.visible=n.visible),n.visible&&(e.displayedCount+=n.geometry.attributes.position.count)};for(n.s();!(t=n.n()).done;)s()}catch(t){n.e(t)}finally{n.f()}}}))}};var js=i(36194),Vs=i(20193),Bs=i(1857);function Ws(t,e){var i=0,n=Date.now(),s={label:"Update 1st level",data:[{x:0,y:0}],borderColor:vs,borderWidth:1.5,pointRadius:1},o={label:"Update duration (ms)",data:[{x:0,y:0}],borderColor:_s,borderWidth:1.5,pointRadius:1},a=["0s"],r=new Jn(t,{type:"line",data:{labels:a,datasets:[s,o]},options:{animation:{duration:10},scales:ys}});this.update=function(t,h){var c=Math.floor((Date.now()-n)/1e3),l="".concat(c,"s");i>0&&a[i]==l?a.push(""):(a.push(l),i=a.length-1),a.length>60&&(a.shift(),i--),s.data.push({x:0,y:e._latestUpdateStartingLevel}),o.data.push({x:0,y:h}),s.data.length>60&&(s.data.shift(),o.data.shift()),t&&r.update()},this.resize=function(){r.resize()}}function Ns(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0&&i.layer===e&&(n[i.level]?n[i.level][0]+=1:n[i.level]=[1,0],i.material.visible&&(n[i.level][1]+=1)),i.children)){var s,o=function(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Ns(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ns(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}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 o,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw o}}}}(i.children);try{for(o.s();!(s=o.n()).done;)t(s.value,n)}catch(t){o.e(t)}finally{o.f()}}}(e.object3d,a),i.length=0,n.length=0,a)({}).hasOwnProperty.call(a,r)&&(i[r]="".concat(r),n[r]=a[r][0],s[r]=a[r][1]);t&&o.update()},this.resize=function(){o.resize()}}function $s(t,e,i){t.defineLayerProperty(e,i,(function(){(t.parent?t.parent.object3d:t.object3d).traverse((function(i){i.layer==t&&i.material?i.material[e]=t[e]:i.content&&i.content.layer==t&&i.content.traverse((function(i){i.material&&(i.material[e]=t[e])}))}))}))}const Us={addWireFrameCheckbox:function(t,e,i){t.add(i,"wireframe").name("Wireframe").onChange((function(){return e.notifyChange(i)}))},addMaterialSize:function(t,e,i,n,s){$s(i,"size",1),t.add(i,"size",n,s).name("Size").onChange((function(){return e.notifyChange(i)}))},addMaterialLineWidth:function(t,e,i,n,s){$s(i,"linewidth",1),t.add(i,"linewidth",n,s).name("Line Width").onChange((function(){return e.notifyChange(i)}))},createGeometryDebugUI:function(t,e,i){var n=t.addFolder("Layer ".concat(i.id));return n.add(i,"visible").name("Visible").onChange((function(){return e.notifyChange(i)})),n.add(i,"opacity",0,1).name("Opacity").onChange((function(){return e.notifyChange(i)})),n}};var Ys;function Zs(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];Ys&&(Ys.material.overlayAlpha=0,Ys.material.showOutline=t.tileLayer.showOutline,t.notifyChange(Ys));var n=t.tileLayer.pickObjectsAt(t,e);return(Ys=n.length?n[0].object:void 0)&&(i&&console.info(Ys),Ys.material.overlayAlpha=.5,Ys.material.showOutline=!0,t.notifyChange(Ys)),Ys}function qs(t,e,i,s){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(e.isDebugMode||a){s=s||new Ls(e,t),i=i||e.tileLayer;var r=Us.createGeometryDebugUI(t,e,i),h="".concat(i.id,"-nb-objects"),c=s.createChartContainer(h),l="".concat(i.id,"-nb-visible"),d=s.createChartContainer(l);s.charts.push(new Ws(c.getContext("2d"),i)),s.charts.push(new Hs(d.getContext("2d"),i)),i.showOutline=!1,i.wireframe=!1;var u={objectChart:!0,visibilityChart:!0,sseHelper:!1};r.add(i,"showOutline").name("Show tiles").onChange((function(t){i.showOutline=t,function(e,i,n,s){i.traverse((function(e){e.material&&e.layer===n&&(e.material.showOutline=t)})),e.notifyChange()}(e,i.object3d,i)})),r.add(i,"wireframe").name("Wireframe").onChange((function(){e.notifyChange(i)})),r.add(u,"objectChart").name("Object chart").onChange((function(t){document.getElementById(h).parentNode.style.display=t?"block":"none",s.updateChartDivSize(),s.charts.forEach((function(t){return t.update()}))})),r.add(u,"visibilityChart").name("Visibility chart").onChange((function(t){document.getElementById(l).parentNode.style.display=t?"block":"none",s.updateChartDivSize(),s.charts.forEach((function(t){return t.update()}))}));var f="".concat(i.id,"_obb_debug"),p="".concat(i.id,"_sb_debug"),g=new n.SphereGeometry(1,16,16),m=function(t){(0,Cs.Z)(o,t);var e,i,s=(e=o,i=function(){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(t){return!1}}(),function(){var t,n=(0,Ps.Z)(e);if(i){var s=(0,Ps.Z)(this).constructor;t=Reflect.construct(n,arguments,s)}else t=n.apply(this,arguments);return(0,Ds.Z)(this,t)});function o(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,ks.Z)(this,o),i.update=C,(e=s.call(this,t,i.object3d||new n.Group,i)).isDebugLayer=!0,e}return(0,Ss.Z)(o,[{key:"preUpdate",value:function(t,e){e.has(this.parent)&&this.object3d.clear()}}]),o}(Vs.Z),b=new m(f,{visible:!1,cacheLifeTime:1/0,source:!1});e.addLayer(b).then((function(t){r.add(t,"visible").name("Bounding boxes").onChange((function(){e.notifyChange(t)}))}));var x=new m(p,{visible:!1,cacheLifeTime:1/0,source:!1});e.addLayer(x).then((function(t){r.add(t,"visible").name("Bounding Spheres").onChange((function(){e.notifyChange(t)}))}));var y=document.getElementById("viewerDiv"),v=document.createElement("span");v.className="circleBase",y.appendChild(v);var _,w=new n.Vector3,M=function(){js.ZP.update(),e.notifyChange()},k=function(){js.ZP.removeAll(),e._frameRequesters[o.Ao.BEFORE_RENDER].includes(M)&&e.removeFrameRequester(o.Ao.BEFORE_RENDER,M)};r.add(u,"sseHelper").name("Sse helper").onChange((function(t){t?window.addEventListener("mousemove",D,!1):(v.style.display="none",k(),window.removeEventListener("mousemove",D))}));var S=null;window.addEventListener("mousedown",(function(t){83==S&&Zs(e,t)})),window.addEventListener("keydown",(function(t){S=t.which})),window.addEventListener("keyup",(function(){S=null}))}function C(t,e,i){if(i.parent&&e.visible){var s=i.link[e.id];if(i.visible&&i.material&&i.material.visible){if(!s){if((s=new n.Group).layer=e,i.matrixWorld.decompose(s.position,s.quaternion,s.scale),e.id==f){var o=new Es(i.obb);o.layer=e,s.add(o)}else if(e.id==p){var a=new n.Color(Math.random(),Math.random(),Math.random()),r=new n.MeshBasicMaterial({color:a.getHex(),wireframe:!0}),h=new n.Mesh(g,r);h.position.copy(i.boundingSphere.center),h.scale.multiplyScalar(i.boundingSphere.radius),h.scale.set(1,1,1).multiplyScalar(i.boundingSphere.radius),h.layer=e,s.add(h)}i.link[e.id]=s}e.object3d.add(s),s.updateMatrixWorld(!0)}else s&&e.object3d.remove(s)}else Bs.Z.removeChildrenAndCleanupRecursively(e,i)}function D(t){var i=Zs(e,t,!1);if(i){v.style.display="table-cell",w.copy(i.boundingSphere.center).applyMatrix4(i.matrixWorld);var n=w.project(e.camera3D),s=e.normalizedToViewCoords(n),a=i.screenSize;if(_!=i){var r=Number(v.style.width.replace("px",""));_=i,k(),new js.ZP.Tween({size:r}).to({size:a},500).easing(js.ZP.Easing.Sinusoidal.In).easing(js.ZP.Easing.Exponential.Out).onUpdate((function(t){v.style["line-height"]="".concat(t.size,"px"),v.style.width="".concat(t.size,"px"),v.style.height="".concat(t.size,"px"),v.innerHTML="".concat(Math.floor(t.size)," px"),v.style.left="".concat(s.x-.5*t.size,"px"),v.style.top="".concat(s.y-.5*t.size,"px")})).onComplete(k).start(),e.addFrameRequester(o.Ao.BEFORE_RENDER,M)}}else v.style.display="none"}}var Xs=i(36873),Gs=i(24147),Ks=new n.Mesh;function Qs(t,e,i){var s=Us.createGeometryDebugUI(t,e,i);Us.addWireFrameCheckbox(s,e,i);var o="".concat(i.id,"_bounding_volume_debug"),a=new Vs.Z(o,new n.Object3D,{update:function(t,e,s){var o=s.userData.metadata,a=s.userData.boundingVolumeHelper;if(a)a.visible=!(!e.visible||!s.visible);else if(e.visible&&s.visible&&o.boundingVolume){if(o.boundingVolume.initialVolumeType===Gs.D.box){var r,h;if(Ks.geometry.boundingBox=o.boundingVolume.volume,(a=new n.BoxHelper(Ks)).material.linewidth=2,null!==(r=o.content)&&void 0!==r&&r.uri&&null!==(h=o.content)&&void 0!==h&&h.uri.endsWith("b3dm")){var c=i.tileset.asset.gltfUpAxis;void 0===c||"Y"===c?a.rotation.x=.5*-Math.PI:"X"===c&&(a.rotation.z=.5*-Math.PI),a.updateMatrix()}}else{if(o.boundingVolume.initialVolumeType!==Gs.D.sphere&&o.boundingVolume.initialVolumeType!==Gs.D.region)return void console.warn("[3D Tiles Debug]: Unknown bounding volume: ".concat(o.boundingVolume));var l=new n.SphereGeometry(o.boundingVolume.volume.radius,32,32),d=new n.MeshBasicMaterial({wireframe:!0,color:16777215*Math.random()});a=new n.Mesh(l,d)}s.userData.boundingVolumeHelper=a,s.parent.add(a),a.updateMatrixWorld(!0)}},visible:!1,cacheLifeTime:1/0,source:!1});Xs.Z.prototype.addLayer.call(e,a,i).then((function(t){s.add(t,"visible").name("Bounding boxes").onChange((function(){e.notifyChange(e.camera3D)}))})),s.add(i,"sseThreshold",0,100).name("sseThreshold").onChange((function(){e.notifyChange(e.camera3D)})),s.add({frozen:i.frozen},"frozen").onChange((function(t){i.frozen=t,e.notifyChange(i)})),s.add(i,"pntsShape",Rs.Uz).name("Points Shape").onChange((function(){e.notifyChange(e.camera.camera3D)})),s.add(i,"pntsSizeMode",Rs.E7).name("Pnts size mode").onChange((function(){e.notifyChange(e.camera.camera3D)})),s.add(i,"pntsMinAttenuatedSize",0,15).name("Min attenuated size").onChange((function(){e.notifyChange(e.camera.camera3D)})),s.add(i,"pntsMaxAttenuatedSize",0,15).name("Max attenuated size").onChange((function(){e.notifyChange(e.camera.camera3D)}))}}},t=>(70473,t(t.s=70473))]))); +"use strict";!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("debug",[],e):"object"==typeof exports?exports.debug=e():t.debug=e()}(self,(()=>(self.webpackChunkitowns=self.webpackChunkitowns||[]).push([[711],{70473:(t,e,i)=>{i.r(e),i.d(e,{Debug:()=>Rs,GeometryDebug:()=>Ys,PotreeDebug:()=>js,create3dTilesDebugUI:()=>Js,createTileDebugUI:()=>Xs});var n=i(99477),s=i(60145),o=i(49469),a=i(44996);function r(t){return t+.5|0}const h=(t,e,i)=>Math.max(Math.min(t,i),e);function c(t){return h(r(2.55*t),0,255)}function l(t){return h(r(255*t),0,255)}function d(t){return h(r(t/2.55)/100,0,1)}function u(t){return h(r(100*t),0,100)}const f={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},p=[..."0123456789ABCDEF"],g=t=>p[15&t],m=t=>p[(240&t)>>4]+p[15&t],b=t=>(240&t)>>4==(15&t);const x=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function y(t,e,i){const n=e*Math.min(i,1-i),s=(e,s=(e+t/30)%12)=>i-n*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function v(t,e,i){const n=(n,s=(n+t/60)%6)=>i-i*e*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function _(t,e,i){const n=y(t,1,.5);let s;for(e+i>1&&(s=1/(e+i),e*=s,i*=s),s=0;s<3;s++)n[s]*=1-e-i,n[s]+=e;return n}function w(t){const e=t.r/255,i=t.g/255,n=t.b/255,s=Math.max(e,i,n),o=Math.min(e,i,n),a=(s+o)/2;let r,h,c;return s!==o&&(c=s-o,h=a>.5?c/(2-s-o):c/(s+o),r=function(t,e,i,n,s){return t===s?(e-i)/n+(et<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,T=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function I(t,e,i){if(t){let n=w(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=k(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function A(t,e){return t?Object.assign(e||{},t):t}function L(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=l(t[3]))):(e=A(t,{r:0,g:0,b:0,a:1})).a=l(e.a),e}function R(t){return"r"===t.charAt(0)?function(t){const e=O.exec(t);let i,n,s,o=255;if(e){if(e[7]!==i){const t=+e[7];o=e[8]?c(t):h(255*t,0,255)}return i=+e[1],n=+e[3],s=+e[5],i=255&(e[2]?c(i):h(i,0,255)),n=255&(e[4]?c(n):h(n,0,255)),s=255&(e[6]?c(s):h(s,0,255)),{r:i,g:n,b:s,a:o}}}(t):function(t){const e=x.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?c(+e[5]):l(+e[5]));const s=S(+e[2]),o=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return M(_,t,e,i)}(s,o,a):"hsv"===e[1]?function(t,e,i){return M(v,t,e,i)}(s,o,a):k(s,o,a),{r:i[0],g:i[1],b:i[2],a:n}}(t)}class z{constructor(t){if(t instanceof z)return t;const e=typeof t;let i;var n,s,o;"object"===e?i=L(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?s={r:255&17*f[n[1]],g:255&17*f[n[2]],b:255&17*f[n[3]],a:5===o?17*f[n[4]]:255}:7!==o&&9!==o||(s={r:f[n[1]]<<4|f[n[2]],g:f[n[3]]<<4|f[n[4]],b:f[n[5]]<<4|f[n[6]],a:9===o?f[n[7]]<<4|f[n[8]]:255})),i=s||function(t){P||(P=function(){const t={},e=Object.keys(D),i=Object.keys(C);let n,s,o,a,r;for(n=0;n>16&255,o>>8&255,255&o]}return t}(),P.transparent=[0,0,0,0]);const e=P[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||R(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=A(this._rgb);return t&&(t.a=d(t.a)),t}set rgb(t){this._rgb=L(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${d(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(t=this._rgb,e=(t=>b(t.r)&&b(t.g)&&b(t.b)&&b(t.a))(t)?g:m,t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0):void 0;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=w(t),i=e[0],n=u(e[1]),s=u(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${s}%, ${d(t.a)})`:`hsl(${i}, ${n}%, ${s}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let s;const o=e===s?.5:e,a=2*o-1,r=i.a-n.a,h=((a*r==-1?a:(a+r)/(1+a*r))+1)/2;s=1-h,i.r=255&h*i.r+s*n.r+.5,i.g=255&h*i.g+s*n.g+.5,i.b=255&h*i.b+s*n.b+.5,i.a=o*i.a+(1-o)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const n=T(d(t.r)),s=T(d(t.g)),o=T(d(t.b));return{r:l(E(n+i*(T(d(e.r))-n))),g:l(E(s+i*(T(d(e.g))-s))),b:l(E(o+i*(T(d(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new z(this.rgb)}alpha(t){return this._rgb.a=l(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=r(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return I(this._rgb,2,t),this}darken(t){return I(this._rgb,2,-t),this}saturate(t){return I(this._rgb,1,t),this}desaturate(t){return I(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=w(t);i[0]=S(i[0]+e),i=k(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}const F=(()=>{let t=0;return()=>t++})();function j(t){return null==t}function V(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function B(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function W(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function N(t,e){return W(t)?t:e}function H(t,e){return void 0===t?e:t}function $(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function U(t,e,i,n){let s,o,a;if(V(t))if(o=t.length,n)for(s=o-1;s>=0;s--)e.call(i,t[s],s);else for(s=0;st,x:t=>t.x,y:t=>t.y};function tt(t,e){const i=J[e]||(J[e]=function(t){const e=function(t){const e=t.split("."),i=[];let n="";for(const t of e)n+=t,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function et(t){return t.charAt(0).toUpperCase()+t.slice(1)}const it=t=>void 0!==t,nt=t=>"function"==typeof t,st=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},ot=Math.PI,at=2*ot,rt=at+ot,ht=Number.POSITIVE_INFINITY,ct=ot/180,lt=ot/2,dt=ot/4,ut=2*ot/3,ft=Math.log10,pt=Math.sign;function gt(t,e,i){return Math.abs(t-e)h&&c=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function Ct(t,e,i){i=i||(i=>t[i]1;)n=o+s>>1,i(n)?o=n:s=n;return{lo:o,hi:s}}const Dt=(t,e,i,n)=>Ct(t,i,n?n=>{const s=t[n][e];return st[n][e]Ct(t,i,(n=>t[n][e]>=i)),Ot=["push","pop","shift","splice","unshift"];function Et(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,s=n.indexOf(e);-1!==s&&n.splice(s,1),n.length>0||(Ot.forEach((e=>{delete t[e]})),delete t._chartjs)}const Tt="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function It(t,e){let i=[],n=!1;return function(...s){i=s,n||(n=!0,Tt.call(window,(()=>{n=!1,t.apply(e,i)})))}}const At=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;const Lt=t=>0===t||1===t,Rt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*at/i),zt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*at/i)+1,Ft={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*lt),easeOutSine:t=>Math.sin(t*lt),easeInOutSine:t=>-.5*(Math.cos(ot*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Lt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Lt(t)?t:Rt(t,.075,.3),easeOutElastic:t=>Lt(t)?t:zt(t,.075,.3),easeInOutElastic(t){const e=.1125;return Lt(t)?t:t<.5?.5*Rt(2*t,e,.45):.5+.5*zt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Ft.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*Ft.easeInBounce(2*t):.5*Ft.easeOutBounce(2*t-1)+.5};function jt(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Vt(t){return jt(t)?t:new z(t)}function Bt(t){return jt(t)?t:new z(t).saturate(.5).darken(.1).hexString()}const Wt=["x","y","borderWidth","radius","tension"],Nt=["color","borderColor","backgroundColor"],Ht=new Map;function $t(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Ht.get(i);return n||(n=new Intl.NumberFormat(t,e),Ht.set(i,n)),n}(e,i).format(t)}const Ut={values:t=>V(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let s,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const a=ft(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),h={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(h,this.options.ticks.format),$t(t,n,h)},logarithmic(t,e,i){if(0===t)return"0";const n=i[e].significand||t/Math.pow(10,Math.floor(ft(t)));return[1,2,3,5,10,15].includes(n)||e>.8*i.length?Ut.numeric.call(this,t,e,i):""}};var Yt={formatters:Ut};const Zt=Object.create(null),qt=Object.create(null);function Xt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Bt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Bt(e.borderColor),this.hoverColor=(t,e)=>Bt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Gt(this,t,e)}get(t){return Xt(this,t)}describe(t,e){return Gt(qt,t,e)}override(t,e){return Gt(Zt,t,e)}route(t,e,i,n){const s=Xt(this,t),o=Xt(this,i),a="_"+e;Object.defineProperties(s,{[a]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=o[n];return B(t)?Object.assign({},e,t):H(t,e)},set(t){this[a]=t}}})}apply(t){t.forEach((t=>t(this)))}}var Qt=new Kt({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:Nt},numbers:{type:"number",properties:Wt}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Yt.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function Jt(t,e,i,n,s){let o=e[s];return o||(o=e[s]=t.measureText(s).width,i.push(s)),o>n&&(n=o),n}function te(t,e,i){const n=t.currentDevicePixelRatio,s=0!==i?Math.max(i/2,.5):0;return Math.round((e-s)*n)/n+s}function ee(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function ie(t,e,i,n){!function(t,e,i,n,s){let o,a,r,h,c,l,d,u;const f=e.pointStyle,p=e.rotation,g=e.radius;let m=(p||0)*ct;if(f&&"object"==typeof f&&(o=f.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(g)||g<=0)){switch(t.beginPath(),f){default:s?t.ellipse(i,n,s/2,g,0,0,at):t.arc(i,n,g,0,at),t.closePath();break;case"triangle":l=s?s/2:g,t.moveTo(i+Math.sin(m)*l,n-Math.cos(m)*g),m+=ut,t.lineTo(i+Math.sin(m)*l,n-Math.cos(m)*g),m+=ut,t.lineTo(i+Math.sin(m)*l,n-Math.cos(m)*g),t.closePath();break;case"rectRounded":c=.516*g,h=g-c,a=Math.cos(m+dt)*h,d=Math.cos(m+dt)*(s?s/2-c:h),r=Math.sin(m+dt)*h,u=Math.sin(m+dt)*(s?s/2-c:h),t.arc(i-d,n-r,c,m-ot,m-lt),t.arc(i+u,n-a,c,m-lt,m),t.arc(i+d,n+r,c,m,m+lt),t.arc(i-u,n+a,c,m+lt,m+ot),t.closePath();break;case"rect":if(!p){h=Math.SQRT1_2*g,l=s?s/2:h,t.rect(i-l,n-h,2*l,2*h);break}m+=dt;case"rectRot":d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-r),t.lineTo(i+u,n-a),t.lineTo(i+d,n+r),t.lineTo(i-u,n+a),t.closePath();break;case"crossRot":m+=dt;case"cross":d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-r),t.lineTo(i+d,n+r),t.moveTo(i+u,n-a),t.lineTo(i-u,n+a);break;case"star":d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-r),t.lineTo(i+d,n+r),t.moveTo(i+u,n-a),t.lineTo(i-u,n+a),m+=dt,d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-r),t.lineTo(i+d,n+r),t.moveTo(i+u,n-a),t.lineTo(i-u,n+a);break;case"line":a=s?s/2:Math.cos(m)*g,r=Math.sin(m)*g,t.moveTo(i-a,n-r),t.lineTo(i+a,n+r);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(m)*(s?s/2:g),n+Math.sin(m)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}(t,e,i,n,null)}function ne(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let h,c;for(t.save(),t.font=s.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),j(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),h=0;h+t||0;function me(t,e){const i={},n=B(e),s=n?Object.keys(e):e,o=B(t)?n?i=>H(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of s)i[t]=ge(o(t));return i}function be(t){return me(t,{top:"y",right:"x",bottom:"y",left:"x"})}function xe(t){const e=be(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ye(t,e){t=t||{},e=e||Qt.font;let i=H(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=H(t.style,e.style);n&&!(""+n).match(fe)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:H(t.family,e.family),lineHeight:pe(H(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:H(t.weight,e.weight),string:""};return s.string=function(t){return!t||j(t.size)||j(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(s),s}function ve(t,e,i,n){let s,o,a,r=!0;for(s=0,o=t.length;st[0])){const o=i||t;void 0===n&&(n=Ae("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:n,_getTarget:s,override:i=>we([i,...t],e,o,n)};return new Proxy(a,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>De(i,n,(()=>function(t,e,i,n){let s;for(const o of e)if(s=Ae(Se(o,t),i),void 0!==s)return Ce(t,s)?Te(i,n,t,s):s}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Le(t).includes(e),ownKeys:t=>Le(t),set(t,e,i){const n=t._storage||(t._storage=s());return t[e]=n[e]=i,delete t._keys,!0}})}function Me(t,e,i,n){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:ke(t,n),setContext:e=>Me(t,e,i,n),override:s=>Me(t.override(s),e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>De(t,e,(()=>function(t,e,i){const{_proxy:n,_context:s,_subProxy:o,_descriptors:a}=t;let r=n[e];return nt(r)&&a.isScriptable(e)&&(r=function(t,e,i,n){const{_proxy:s,_context:o,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let h=e(o,a||n);return r.delete(t),Ce(t,h)&&(h=Te(s._scopes,s,t,h)),h}(e,r,t,i)),V(r)&&r.length&&(r=function(t,e,i,n){const{_proxy:s,_context:o,_subProxy:a,_descriptors:r}=i;if(void 0!==o.index&&n(t))return e[o.index%e.length];if(B(e[0])){const i=e,n=s._scopes.filter((t=>t!==i));e=[];for(const h of i){const i=Te(n,s,t,h);e.push(Me(i,o,a&&a[t],r))}}return e}(e,r,t,a.isIndexable)),Ce(e,r)&&(r=Me(r,s,o&&o[e],a)),r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function ke(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:i,indexable:n,isScriptable:nt(i)?i:()=>i,isIndexable:nt(n)?n:()=>n}}const Se=(t,e)=>t?t+et(e):e,Ce=(t,e)=>B(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function De(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Pe(t,e,i){return nt(t)?t(e,i):t}const Oe=(t,e)=>!0===t?e:"string"==typeof t?tt(e,t):void 0;function Ee(t,e,i,n,s){for(const o of e){const e=Oe(i,o);if(e){t.add(e);const o=Pe(e._fallback,i,s);if(void 0!==o&&o!==i&&o!==n)return o}else if(!1===e&&void 0!==n&&i!==n)return null}return!1}function Te(t,e,i,n){const s=e._rootScopes,o=Pe(e._fallback,i,n),a=[...t,...s],r=new Set;r.add(n);let h=Ie(r,a,i,o||i,n);return null!==h&&(void 0===o||o===i||(h=Ie(r,a,o,h,n),null!==h))&&we(Array.from(r),[""],s,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const s=n[e];return V(s)&&B(i)?i:s||{}}(e,i,n)))}function Ie(t,e,i,n,s){for(;i;)i=Ee(t,e,i,n,s);return i}function Ae(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function Le(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const Re=Number.EPSILON||1e-14,ze=(t,e)=>e"x"===t?"y":"x";function je(t,e,i,n){const s=t.skip?e:t,o=e,a=i.skip?e:i,r=vt(o,s),h=vt(a,o);let c=r/(r+h),l=h/(r+h);c=isNaN(c)?0:c,l=isNaN(l)?0:l;const d=n*c,u=n*l;return{previous:{x:o.x-d*(a.x-s.x),y:o.y-d*(a.y-s.y)},next:{x:o.x+u*(a.x-s.x),y:o.y+u*(a.y-s.y)}}}function Ve(t,e,i){return Math.max(Math.min(t,i),e)}function Be(t,e,i,n,s){let o,a,r,h;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const i=Fe(e),n=t.length,s=Array(n).fill(0),o=Array(n);let a,r,h,c=ze(t,0);for(a=0;at.ownerDocument.defaultView.getComputedStyle(t,null),Ue=["top","right","bottom","left"];function Ye(t,e,i){const n={};i=i?"-"+i:"";for(let s=0;s<4;s++){const o=Ue[s];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const Ze=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function qe(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,s=$e(i),o="border-box"===s.boxSizing,a=Ye(s,"padding"),r=Ye(s,"border","width"),{x:h,y:c,box:l}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:s,offsetY:o}=n;let a,r,h=!1;if(Ze(s,o,t.target))a=s,r=o;else{const t=e.getBoundingClientRect();a=n.clientX-t.left,r=n.clientY-t.top,h=!0}return{x:a,y:r,box:h}}(t,i),d=a.left+(l&&r.left),u=a.top+(l&&r.top);let{width:f,height:p}=e;return o&&(f-=a.width+r.width,p-=a.height+r.height),{x:Math.round((h-d)/f*i.width/n),y:Math.round((c-u)/p*i.height/n)}}const Xe=t=>Math.round(10*t)/10;function Ge(t,e,i){const n=e||1,s=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||a.height!==s||a.width!==o)&&(t.currentDevicePixelRatio=n,a.height=s,a.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Ke=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};We()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function Qe(t,e){const i=function(t,e){return $e(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Je(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ti(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function ei(t,e,i,n){const s={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=Je(t,s,i),r=Je(s,o,i),h=Je(o,e,i),c=Je(a,r,i),l=Je(r,h,i);return Je(c,l,i)}function ii(t){return"angle"===t?{between:Mt,compare:_t,normalize:wt}:{between:St,compare:(t,e)=>t-e,normalize:t=>t}}function ni({start:t,end:e,count:i,loop:n,style:s}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:s}}function si(t,e,i){if(!i)return[t];const{property:n,start:s,end:o}=i,a=e.length,{compare:r,between:h,normalize:c}=ii(n),{start:l,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:s,end:o}=i,{between:a,normalize:r}=ii(n),h=e.length;let c,l,{start:d,end:u,loop:f}=t;if(f){for(d+=h,u+=h,c=0,l=h;cn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=Tt.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const s=i.items;let o,a=s.length-1,r=!1;for(;a>=0;--a)o=s[a],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),r=!0):(s[a]=s[s.length-1],s.pop());r&&(n.draw(),this._notify(n,i,t,"progress")),s.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=s.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var hi=new ri;const ci="transparent",li={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Vt(t||ci),s=n.valid&&Vt(e||ci);return s&&s.valid?s.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class di{constructor(t,e,i,n){const s=e[i];n=ve([t.to,n,s,t.from]);const o=ve([t.from,s,n]);this._active=!0,this._fn=t.fn||li[t.type||typeof o],this._easing=Ft[t.easing]||Ft.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],s=i-this._start,o=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=ve([t.to,e,n,t.from]),this._from=ve([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,s=this._from,o=this._loop,a=this._to;let r;if(this._active=s!==a&&(o||e1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[n]=this._fn(s,a,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t{const s=t[n];if(!B(s))return;const o={};for(const t of e)o[t]=s[t];(V(s.properties)&&s.properties||[n]).forEach((t=>{t!==n&&i.has(t)||i.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const s=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),s}_createAnimations(t,e){const i=this._properties,n=[],s=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let r;for(r=o.length-1;r>=0;--r){const h=o[r];if("$"===h.charAt(0))continue;if("options"===h){n.push(...this._animateOptions(t,e));continue}const c=e[h];let l=s[h];const d=i.get(h);if(l){if(d&&l.active()){l.update(d,c,a);continue}l.cancel()}d&&d.duration?(s[h]=l=new di(d,t,h,c),n.push(l)):t[h]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(hi.add(this._chart,i),!0):void 0}}function fi(t,e){const i=t&&t.options||{},n=i.reverse,s=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:s,end:n?s:o}}function pi(t,e){const i=[],n=t._getSortedDatasetMetas(e);let s,o;for(s=0,o=n.length;s0||!i&&e<0)return s.index}return null}function yi(t,e){const{chart:i,_cachedMeta:n}=t,s=i._stacks||(i._stacks={}),{iScale:o,vScale:a,index:r}=n,h=o.axis,c=a.axis,l=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,a,n),d=e.length;let u;for(let t=0;ti[t].axis===e)).shift()}function _i(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i],void 0!==e[n]._visualValues&&void 0!==e[n]._visualValues[i]&&delete e[n]._visualValues[i]}}}const wi=t=>"reset"===t||"none"===t,Mi=(t,e)=>e?t:Object.assign({},t);class ki{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=mi(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&_i(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=e.xAxisID=H(i.xAxisID,vi(t,"x")),o=e.yAxisID=H(i.yAxisID,vi(t,"y")),a=e.rAxisID=H(i.rAxisID,vi(t,"r")),r=e.indexAxis,h=e.iAxisID=n(r,s,o,a),c=e.vAxisID=n(r,o,s,a);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(h),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Et(this._data,this),t._stacked&&_i(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(B(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,s,o;for(n=0,s=e.length;n{const e="_onData"+et(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const s=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),s}})})))),this._syncList=[],this._data=e}var n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const s=e._stacked;e._stacked=mi(e.vScale,e),e.stack!==i.stack&&(n=!0,_i(e),e.stack=i.stack),this._resyncElements(t),(n||s!==e._stacked)&&yi(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:s,_stacked:o}=i,a=s.axis;let r,h,c,l=0===t&&e===n.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=V(n[t])?this.parseArrayData(i,n,t,e):B(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const s=()=>null===h[a]||d&&h[a]t&&!e.hidden&&e._stacked&&{keys:pi(i,!0),values:null})(e,i,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:l}=function(t){const{min:e,max:i,minDefined:n,maxDefined:s}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:s?i:Number.POSITIVE_INFINITY}}(a);let d,u;function f(){u=n[d];const e=u[a.axis];return!W(u[t.axis])||c>e||l=0;--d)if(!f()){this.updateRangeFromParsed(h,t,u,r);break}return h}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,s,o;for(n=0,s=e.length;n=0&&tthis.getContext(i,n,e)),l);return f.$shared&&(f.$shared=r,s[o]=Object.freeze(Mi(f,r))),f}_resolveAnimations(t,e,i){const n=this.chart,s=this._cachedDataOpts,o=`animation-${e}`,a=s[o];if(a)return a;let r;if(!1!==n.options.animation){const n=this.chart.config,s=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),s);r=n.createResolver(o,this.getContext(t,i,e))}const h=new ui(n,r&&r.animations);return r&&r._cacheable&&(s[o]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||wi(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,s=this.getSharedOptions(i),o=this.includeOptions(e,s)||s!==n;return this.updateSharedOptions(s,e,i),{sharedOptions:s,includeOptions:o}}updateElement(t,e,i,n){wi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!wi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const s=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,s=e.length,o=Math.min(s,n);o&&this.parse(0,o),s>n?this._insertElements(n,s-n,t):s{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(r(s),a=t;at-e)))}return t._cache.$bar}(e,t.type);let n,s,o,a,r=e._length;const h=()=>{32767!==o&&-32768!==o&&(it(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(n=0,s=i.length;nMath.abs(r)&&(h=r,c=a),e[i.axis]=c,e._custom={barStart:h,barEnd:c,start:s,end:o,min:a,max:r}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Di(t,e,i,n){const s=t.iScale,o=t.vScale,a=s.getLabels(),r=s===o,h=[];let c,l,d,u;for(c=i,l=i+n;ct.x,i="left",n="right"):(e=t.base{t[a](e[i],s)&&(o.push({element:t,datasetIndex:n,index:h}),r=r||t.inRange(e.x,e.y,s))})),n&&!r?[]:o}var ji={evaluateInteractionItems:Li,modes:{index(t,e,i,n){const s=qe(e,t),o=i.axis||"x",a=i.includeInvisible||!1,r=i.intersect?Ri(t,s,o,n,a):zi(t,s,o,!1,n,a),h=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&h.push({element:i,datasetIndex:t.index,index:e})})),h):[]},dataset(t,e,i,n){const s=qe(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;let r=i.intersect?Ri(t,s,o,n,a):zi(t,s,o,!1,n,a);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;tRi(t,qe(e,t),i.axis||"xy",n,i.includeInvisible||!1),nearest(t,e,i,n){const s=qe(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;return zi(t,s,o,i.intersect,n,a)},x:(t,e,i,n)=>Fi(t,qe(e,t),"x",i.intersect,n),y:(t,e,i,n)=>Fi(t,qe(e,t),"y",i.intersect,n)}};const Vi=["left","top","right","bottom"];function Bi(t,e){return t.filter((t=>t.pos===e))}function Wi(t,e){return t.filter((t=>-1===Vi.indexOf(t.pos)&&t.box.axis===e))}function Ni(t,e){return t.sort(((t,i)=>{const n=e?i:t,s=e?t:i;return n.weight===s.weight?n.index-s.index:n.weight-s.weight}))}function Hi(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function $i(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ui(t,e,i,n){const{pos:s,box:o}=i,a=t.maxPadding;if(!B(s)){i.size&&(t[s]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?o.height:o.width),i.size=e.size/e.count,t[s]+=i.size}o.getPadding&&$i(a,o.getPadding());const r=Math.max(0,e.outerWidth-Hi(a,t,"left","right")),h=Math.max(0,e.outerHeight-Hi(a,t,"top","bottom")),c=r!==t.w,l=h!==t.h;return t.w=r,t.h=h,i.horizontal?{same:c,other:l}:{same:l,other:c}}function Yi(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}(t?["left","right"]:["top","bottom"])}function Zi(t,e,i,n){const s=[];let o,a,r,h,c,l;for(o=0,a=t.length,c=0;ot.box.fullSize)),!0),n=Ni(Bi(e,"left"),!0),s=Ni(Bi(e,"right")),o=Ni(Bi(e,"top"),!0),a=Ni(Bi(e,"bottom")),r=Wi(e,"x"),h=Wi(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:s.concat(h).concat(a).concat(r),chartArea:Bi(e,"chartArea"),vertical:n.concat(s).concat(h),horizontal:o.concat(a).concat(r)}}(t.boxes),h=r.vertical,c=r.horizontal;U(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const l=h.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:s,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/l,hBoxMaxHeight:a/2}),u=Object.assign({},s);$i(u,xe(n));const f=Object.assign({maxPadding:u,w:o,h:a,x:s.left,y:s.top},s),p=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:s}=i;if(!t||!Vi.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:s}=e;let o,a,r;for(o=0,a=t.length;o{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class Ki{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Qi extends Ki{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ji="$chartjs",tn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},en=t=>null===t||""===t,nn=!!Ke&&{passive:!0};function sn(t,e,i){t.canvas.removeEventListener(e,i,nn)}function on(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function an(t,e,i){const n=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||on(i.addedNodes,n),e=e&&!on(i.removedNodes,n);e&&i()}));return s.observe(document,{childList:!0,subtree:!0}),s}function rn(t,e,i){const n=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||on(i.removedNodes,n),e=e&&!on(i.addedNodes,n);e&&i()}));return s.observe(document,{childList:!0,subtree:!0}),s}const hn=new Map;let cn=0;function ln(){const t=window.devicePixelRatio;t!==cn&&(cn=t,hn.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function dn(t,e,i){const n=t.canvas,s=n&&Ne(n);if(!s)return;const o=It(((t,e)=>{const n=s.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return a.observe(s),function(t,e){hn.size||window.addEventListener("resize",ln),hn.set(t,e)}(t,o),a}function un(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){hn.delete(t),hn.size||window.removeEventListener("resize",ln)}(t)}function fn(t,e,i){const n=t.canvas,s=It((e=>{null!==t.ctx&&i(function(t,e){const i=tn[t.type]||t.type,{x:n,y:s}=qe(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==s?s:null}}(e,t))}),t);return function(t,e,i){t.addEventListener(e,i,nn)}(n,e,s),s}class pn extends Ki{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),s=t.getAttribute("width");if(t[Ji]={initial:{height:n,width:s,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",en(s)){const e=Qe(t,"width");void 0!==e&&(t.width=e)}if(en(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Qe(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Ji])return!1;const i=e[Ji].initial;["height","width"].forEach((t=>{const n=i[t];j(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e[Ji],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),s={attach:an,detach:rn,resize:dn}[e]||fn;n[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:un,detach:un,resize:un}[e]||sn)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return function(t,e,i,n){const s=$e(t),o=Ye(s,"margin"),a=He(s.maxWidth,t,"clientWidth")||ht,r=He(s.maxHeight,t,"clientHeight")||ht,h=function(t,e,i){let n,s;if(void 0===e||void 0===i){const o=Ne(t);if(o){const t=o.getBoundingClientRect(),a=$e(o),r=Ye(a,"border","width"),h=Ye(a,"padding");e=t.width-h.width-r.width,i=t.height-h.height-r.height,n=He(a.maxWidth,o,"clientWidth"),s=He(a.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||ht,maxHeight:s||ht}}(t,e,i);let{width:c,height:l}=h;if("content-box"===s.boxSizing){const t=Ye(s,"border","width"),e=Ye(s,"padding");c-=e.width+t.width,l-=e.height+t.height}return c=Math.max(0,c-o.width),l=Math.max(0,n?c/n:l-o.height),c=Xe(Math.min(c,a,h.maxWidth)),l=Xe(Math.min(l,r,h.maxHeight)),c&&!l&&(l=Xe(c/2)),(void 0!==e||void 0!==i)&&n&&h.height&&l>h.height&&(l=h.height,c=Xe(Math.floor(l*n))),{width:c,height:l}}(t,e,i,n)}isAttached(t){const e=Ne(t);return!(!e||!e.isConnected)}}class gn{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return bt(this.x)&&bt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}function mn(t,e,i,n,s){const o=H(n,0),a=Math.min(H(s,t.length),t.length);let r,h,c,l=0;for(i=Math.ceil(i),s&&(r=s-n,i=r/Math.floor(r/i)),c=o;c<0;)l++,c=Math.round(o+l*i);for(h=Math.max(o,0);h"top"===e||"left"===e?t[e]+i:t[e]-i,xn=(t,e)=>Math.min(e||t,t);function yn(t,e){const i=[],n=t.length/e,s=t.length;let o=0;for(;oa+r)))return c}function _n(t){return t.drawTicks?t.tickLength:0}function wn(t,e){if(!t.display)return 0;const i=ye(t.font,e),n=xe(t.padding);return(V(t.text)?t.text.length:1)*i.lineHeight+n.height}function Mn(t,e,i){let n=(t=>"start"===t?"left":"end"===t?"right":"center")(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class kn extends gn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=N(t,Number.POSITIVE_INFINITY),e=N(e,Number.NEGATIVE_INFINITY),i=N(i,Number.POSITIVE_INFINITY),n=N(n,Number.NEGATIVE_INFINITY),{min:N(t,i),max:N(e,n),minDefined:W(t),maxDefined:W(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:s,maxDefined:o}=this.getUserBounds();if(s&&o)return{min:i,max:n};const a=this.getMatchingVisibleMetas();for(let r=0,h=a.length;rn?n:i,n=s&&i>n?i:n,{min:N(i,N(n,i)),max:N(n,N(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:s}=t,o=(h=(s-n)/2,"string"==typeof(r=e)&&r.endsWith("%")?parseFloat(r)/100*h:+r),a=(t,e)=>i&&0===t?0:t+e;var r,h;return{min:a(n,-Math.abs(o)),max:a(s,o)}}(this,s,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=as)return function(t,e,i,n){let s,o=0,a=i[0];for(n=Math.ceil(n),s=0;st-e)).pop(),e}(n);for(let t=0,e=o.length-1;ts)return e}return Math.max(s,1)}(o,e,s);if(a>0){let t,i;const n=a>1?Math.round((h-r)/(a-1)):null;for(mn(e,c,l,j(n)?0:r-n,r),t=0,i=a-1;t=s||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),l=c.widest.width,d=c.highest.height,u=kt(this.chart.width-l,0,this.maxWidth);o=t.offset?this.maxWidth/i:u/(i-1),l+6>o&&(o=u/(i-(t.offset?.5:1)),a=this.maxHeight-_n(t.grid)-e.padding-wn(t.title,this.chart.options.font),r=Math.sqrt(l*l+d*d),h=Math.min(Math.asin(kt((c.highest.height+6)/o,-1,1)),Math.asin(kt(a/r,-1,1))-Math.asin(kt(d/r,-1,1)))*(180/ot),h=Math.max(n,Math.min(s,h))),this.labelRotation=h}afterCalculateLabelRotation(){$(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=wn(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=_n(s)+o):(t.height=this.maxHeight,t.width=_n(s)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:s,highest:o}=this._getLabelSizes(),r=2*i.padding,h=xt(this.labelRotation),c=Math.cos(h),l=Math.sin(h);if(a){const e=i.mirror?0:l*s.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:c*s.width+l*o.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,n,l,c)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:s,padding:o},position:a}=this.options,r=0!==this.labelRotation,h="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let l=0,d=0;r?h?(l=n*t.width,d=i*e.height):(l=i*t.height,d=n*e.width):"start"===s?d=e.width:"end"===s?l=t.width:"inner"!==s&&(l=t.width/2,d=e.width/2),this.paddingLeft=Math.max((l-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){$(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let s;if(n>e){for(s=0;s({width:o[t]||0,height:a[t]||0});return{first:M(0),last:M(e-1),widest:M(_),highest:M(w),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return kt(this._alignToPixels?te(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*n?a/i:r/n:r*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:s,position:o,border:a}=n,r=s.offset,h=this.isHorizontal(),c=this.ticks.length+(r?1:0),l=_n(s),d=[],u=a.setContext(this.getContext()),f=u.display?u.width:0,p=f/2,g=function(t){return te(i,t,f)};let m,b,x,y,v,_,w,M,k,S,C,D;if("top"===o)m=g(this.bottom),_=this.bottom-l,M=m-p,S=g(t.top)+p,D=t.bottom;else if("bottom"===o)m=g(this.top),S=t.top,D=g(t.bottom)-p,_=m+p,M=this.top+l;else if("left"===o)m=g(this.right),v=this.right-l,w=m-p,k=g(t.left)+p,C=t.right;else if("right"===o)m=g(this.left),k=t.left,C=g(t.right)-p,v=m+p,w=this.left+l;else if("x"===e){if("center"===o)m=g((t.top+t.bottom)/2+.5);else if(B(o)){const t=Object.keys(o)[0],e=o[t];m=g(this.chart.scales[t].getPixelForValue(e))}S=t.top,D=t.bottom,_=m+p,M=_+l}else if("y"===e){if("center"===o)m=g((t.left+t.right)/2);else if(B(o)){const t=Object.keys(o)[0],e=o[t];m=g(this.chart.scales[t].getPixelForValue(e))}v=m-p,w=v-l,k=t.left,C=t.right}const P=H(n.ticks.maxTicksLimit,c),O=Math.max(1,Math.ceil(c/P));for(b=0;b0&&(o-=n/2)}d={left:o,top:s,width:n+e.width,height:i+e.height,color:t.backdropColor}}g.push({label:y,font:k,textOffset:D,options:{rotation:p,color:i,strokeColor:r,strokeWidth:c,textAlign:u,textBaseline:P,translation:[v,_],backdrop:d}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-xt(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:s}}=this.options,o=t+s,a=this._getLabelSizes().widest.width;let r,h;return"left"===e?n?(h=this.right+s,"near"===i?r="left":"center"===i?(r="center",h+=a/2):(r="right",h+=a)):(h=this.right-o,"near"===i?r="right":"center"===i?(r="center",h-=a/2):(r="left",h=this.left)):"right"===e?n?(h=this.left+s,"near"===i?r="right":"center"===i?(r="center",h-=a/2):(r="left",h-=a)):(h=this.left+o,"near"===i?r="left":"center"===i?(r="center",h+=a/2):(r="right",h=this.right)):r="right",{textAlign:r,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:s,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,s,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const a=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(s=0,o=n.length;s{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let s,o;for(s=0,o=e.length;s{const n=i.split("."),s=n.pop(),o=[t].concat(n).join("."),a=e[i].split("."),r=a.pop(),h=a.join(".");Qt.route(o,s,h,r)}))}(e,t.defaultRoutes),t.descriptors&&Qt.describe(e,t.descriptors)}(t,o,i),this.override&&Qt.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in Qt[n]&&(delete Qt[n][i],this.override&&delete Zt[i])}}class Cn{constructor(){this.controllers=new Sn(ki,"datasets",!0),this.elements=new Sn(gn,"elements"),this.plugins=new Sn(Object,"plugins"),this.scales=new Sn(kn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):U(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=et(t);$(i["before"+n],[],i),e[t](i),$(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function On(t,e){return e||!1!==t?!0===t?{}:t:null}function En(t,{plugin:e,local:i},n,s){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(n,o);return i&&e.defaults&&a.push(e.defaults),t.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Tn(t,e){const i=Qt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function In(t){if("x"===t||"y"===t||"r"===t)return t}function An(t,...e){if(In(t))return t;for(const n of e){const e=n.axis||("top"===(i=n.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&In(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Ln(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function Rn(t){const e=t.options||(t.options={});e.plugins=H(e.plugins,{}),e.scales=function(t,e){const i=Zt[t.type]||{scales:{}},n=e.scales||{},s=Tn(t.type,e),o=Object.create(null);return Object.keys(n).forEach((e=>{const a=n[e];if(!B(a))return console.error(`Invalid scale configuration for scale: ${e}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const r=An(e,a,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return Ln(t,"x",i[0])||Ln(t,"y",i[0])}return{}}(e,t),Qt.scales[a.type]),h=function(t,e){return t===e?"_index_":"_value_"}(r,s),c=i.scales||{};o[e]=K(Object.create(null),[{axis:r},a,c[r],c[h]])})),t.data.datasets.forEach((i=>{const s=i.type||t.type,a=i.indexAxis||Tn(s,e),r=(Zt[s]||{}).scales||{};Object.keys(r).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),s=i[e+"AxisID"]||e;o[s]=o[s]||Object.create(null),K(o[s],[{axis:e},n[s],r[t]])}))})),Object.keys(o).forEach((t=>{const e=o[t];K(e,[Qt.scales[e.type],Qt.scale])})),o}(t,e)}function zn(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Fn=new Map,jn=new Set;function Vn(t,e){let i=Fn.get(t);return i||(i=e(),Fn.set(t,i),jn.add(i)),i}const Bn=(t,e,i)=>{const n=tt(e,i);void 0!==n&&t.add(n)};class Wn{constructor(t){this._config=function(t){return(t=t||{}).data=zn(t.data),Rn(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=zn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Rn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Vn(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Vn(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Vn(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Vn(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:s}=this,o=this._cachedScopes(t,i),a=o.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>Bn(r,t,e)))),e.forEach((t=>Bn(r,n,t))),e.forEach((t=>Bn(r,Zt[s]||{},t))),e.forEach((t=>Bn(r,Qt,t))),e.forEach((t=>Bn(r,qt,t)))}));const h=Array.from(r);return 0===h.length&&h.push(Object.create(null)),jn.has(e)&&o.set(e,h),h}chartOptionScopes(){const{options:t,type:e}=this;return[t,Zt[e]||{},Qt.datasets[e]||{},{type:e},Qt,qt]}resolveNamedOptions(t,e,i,n=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=Nn(this._resolverCache,t,n);let r=o;(function(t,e){const{isScriptable:i,isIndexable:n}=ke(t);for(const s of e){const e=i(s),o=n(s),a=(o||e)&&t[s];if(e&&(nt(a)||Hn(a))||o&&V(a))return!0}return!1})(o,e)&&(s.$shared=!1,r=Me(o,i=nt(i)?i():i,this.createResolver(t,i,a)));for(const t of e)s[t]=r[t];return s}createResolver(t,e,i=[""],n){const{resolver:s}=Nn(this._resolverCache,t,i);return B(e)?Me(s,e,void 0,n):s}}function Nn(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const s=i.join();let o=n.get(s);return o||(o={resolver:we(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(s,o)),o}const Hn=t=>B(t)&&Object.getOwnPropertyNames(t).some((e=>nt(t[e]))),$n=["top","bottom","left","right","chartArea"];function Un(t,e){return"top"===t||"bottom"===t||-1===$n.indexOf(t)&&"x"===e}function Yn(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function Zn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),$(i&&i.onComplete,[t],e)}function qn(t){const e=t.chart,i=e.options.animation;$(i&&i.onProgress,[t],e)}function Xn(t){return We()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Gn={},Kn=t=>{const e=Xn(t);return Object.values(Gn).filter((t=>t.canvas===e)).pop()};function Qn(t,e,i){const n=Object.keys(t);for(const s of n){const n=+s;if(n>=e){const o=t[s];delete t[s],(i>0||n>e)&&(t[n+i]=o)}}}function Jn(t,e,i){return t.options.clip?t[i]:e[i]}class ts{static defaults=Qt;static instances=Gn;static overrides=Zt;static registry=Dn;static version="4.4.1";static getChart=Kn;static register(...t){Dn.add(...t),es()}static unregister(...t){Dn.remove(...t),es()}constructor(t,e){const i=this.config=new Wn(e),n=Xn(t),s=Kn(n);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!We()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Qi:pn}(n)),this.platform.updateConfig(i);const a=this.platform.acquireContext(n,o.aspectRatio),r=a&&a.canvas,h=r&&r.height,c=r&&r.width;this.id=F(),this.ctx=a,this.canvas=r,this.width=c,this.height=h,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Pn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),this._dataChanges=[],Gn[this.id]=this,a&&r?(hi.listen(this,"complete",Zn),hi.listen(this,"progress",qn),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:s}=this;return j(t)?e&&s?s:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Dn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ge(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ee(this.canvas,this.ctx),this}stop(){return hi.stop(this),this}resize(t,e){hi.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,s),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Ge(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),$(i.onResize,[this,o],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){U(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let s=[];e&&(s=s.concat(Object.keys(e).map((t=>{const i=e[t],n=An(t,i),s="r"===n,o="x"===n;return{options:i,dposition:s?"chartArea":o?"bottom":"left",dtype:s?"radialLinear":o?"category":"linear"}})))),U(s,(e=>{const s=e.options,o=s.id,a=An(o,s),r=H(s.type,e.dtype);void 0!==s.position&&Un(s.position,a)===Un(e.dposition)||(s.position=e.dposition),n[o]=!0;let h=null;o in i&&i[o].type===r?h=i[o]:(h=new(Dn.getScale(r))({id:o,type:r,ctx:this.ctx,chart:this}),i[h.id]=h),h.init(s,t)})),U(n,((t,e)=>{t||delete i[e]})),U(i,(t=>{Gi.configure(this,t,t.options),Gi.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Yn("z","_idx"));const{_active:a,_lastEvent:r}=this;r?this._eventHandler(r,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){U(this.scales,(t=>{Gi.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);st(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:s}of e)Qn(t,n,"_removeElements"===i?-s:s)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),n=i(0);for(let t=1;tt.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Gi.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],U(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,s=function(t,e){const{xScale:i,yScale:n}=t;return i&&n?{left:Jn(i,e,"left"),right:Jn(i,e,"right"),top:Jn(n,e,"top"),bottom:Jn(n,e,"bottom")}:e}(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&se(e,{left:!1===i.left?0:s.left-i.left,right:!1===i.right?this.width:s.right+i.right,top:!1===i.top?0:s.top-i.top,bottom:!1===i.bottom?this.height:s.bottom+i.bottom}),t.controller.draw(),n&&oe(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return ne(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const s=ji.modes[e];return"function"==typeof s?s(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=_e(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,n);it(e)?(s.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(s,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),hi.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};U(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},s=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{n("attach",a),this.attached=!0,this.resize(),i("resize",s),i("detach",o)};o=()=>{this.attached=!1,n("resize",s),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){U(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},U(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let s,o,a,r;for("dataset"===e&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+n+"DatasetHoverStyle"]()),a=0,r=t.length;a{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!Y(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const n=this.options.hover,s=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=s(e,t),a=i?t:s(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const s=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(s||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:s}=this,o=e,a=this._getActiveElements(t,n,i,o),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),h=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,$(s.onHover,[t,a,this],this),r&&$(s.onClick,[t,a,this],this));const c=!Y(a,n);return(c||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=h,c}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,n)}}function es(){return U(ts.instances,(t=>t._plugins.invalidate()))}function is(t,e,i=e){t.lineCap=H(i.borderCapStyle,e.borderCapStyle),t.setLineDash(H(i.borderDash,e.borderDash)),t.lineDashOffset=H(i.borderDashOffset,e.borderDashOffset),t.lineJoin=H(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=H(i.borderWidth,e.borderWidth),t.strokeStyle=H(i.borderColor,e.borderColor)}function ns(t,e,i){t.lineTo(i.x,i.y)}function ss(t,e,i={}){const n=t.length,{start:s=0,end:o=n-1}=i,{start:a,end:r}=e,h=Math.max(s,a),c=Math.min(o,r),l=sr&&o>r;return{count:n,start:h,loop:e.loop,ilen:c(a+(c?r-t:t))%o,y=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(h&&(d=s[x(0)],t.moveTo(d.x,d.y)),l=0;l<=r;++l){if(d=s[x(l)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(ip&&(p=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),u=n,b=0,f=p=i),g=i}y()}function rs(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?os:as}const hs="function"==typeof Path2D;function cs(t,e,i,n){const s=t.options,{[i]:o}=t.getProps([i],n);return Math.abs(e-o)=0&&tn=e?n:t,a=t=>s=i?s:t;if(t){const t=pt(n),e=pt(s);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(n===s){let e=0===s?1:Math.abs(.05*s);a(s+e),t||o(n-e)}this.min=n,this.max=s}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=function(t,e){const i=[],{bounds:n,step:s,min:o,max:a,precision:r,count:h,maxTicks:c,maxDigits:l,includeBounds:d}=t,u=s||1,f=c-1,{min:p,max:g}=e,m=!j(o),b=!j(a),x=!j(h),y=(g-p)/(l+1);let v,_,w,M,k=mt((g-p)/f/u)*u;if(k<1e-14&&!m&&!b)return[{value:p},{value:g}];M=Math.ceil(g/k)-Math.floor(p/k),M>f&&(k=mt(M*k/f/u)*u),j(r)||(v=Math.pow(10,r),k=Math.ceil(k*v)/v),"ticks"===n?(_=Math.floor(p/k)*k,w=Math.ceil(g/k)*k):(_=p,w=g),m&&b&&s&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((a-o)/s,k/1e3)?(M=Math.round(Math.min((a-o)/k,c)),k=(a-o)/M,_=o,w=a):x?(_=m?o:_,w=b?a:w,M=h-1,k=(w-_)/M):(M=(w-_)/k,M=gt(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const S=Math.max(yt(k),yt(_));v=Math.pow(10,j(r)?S:r),_=Math.round(_*v)/v,w=Math.round(w*v)/v;let C=0;for(m&&(d&&_!==o?(i.push({value:o}),_a)break;i.push({value:t})}return b&&d&&w!==a?i.length&>(i[i.length-1].value,a,bs(a,y,t))?i[i.length-1].value=a:i.push({value:a}):b&&w!==a||i.push({value:w}),i}({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&function(t,e,i){let n,s,o;for(n=0,s=t.length;n0&&a[i]==c?a.push(""):(a.push(c),i=a.length-1),a.length>60&&(a.shift(),i--);var l=e.info.memory;s.data.push({x:h,y:l.textures}),o.data.push({x:h,y:l.geometries}),s.data.length>60&&(s.data.shift(),o.data.shift()),t&&r.update()},this.resize=function(){r.resize()}}ts.register(class extends ki{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:s}=e,o=this.chart._animationsDisabled;let{start:a,count:r}=function(t,e,i){const n=e.length;let s=0,o=n;if(t._sorted){const{iScale:a,_parsed:r}=t,h=a.axis,{min:c,max:l,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(s=kt(Math.min(Dt(r,h,c).lo,i?n:Dt(e,h,a.getPixelForValue(c)).lo),0,n-1)),o=u?kt(Math.max(Dt(r,a.axis,l,!0).hi+1,i?0:Dt(e,h,a.getPixelForValue(l),!0).hi+1),s,n)-s:n-s}return{start:s,count:o}}(e,n,o);this._drawStart=a,this._drawCount=r,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,s={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=s,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,s),o}(e)&&(a=0,r=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!s._decimated,i.points=n;const h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:h},t),this.updateElements(n,a,r,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:o,vScale:a,_stacked:r,_dataset:h}=this._cachedMeta,{sharedOptions:c,includeOptions:l}=this._getSharedOptions(e,n),d=o.axis,u=a.axis,{spanGaps:f,segment:p}=this.options,g=bt(f)?f:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||s||"none"===n,b=e+i,x=t.length;let y=e>0&&this.getParsed(e-1);for(let i=0;i=b){x.skip=!0;continue}const v=this.getParsed(i),_=j(v[u]),w=x[d]=o.getPixelForValue(v[d],i),M=x[u]=s||_?a.getBasePixel():a.getPixelForValue(r?this.applyStack(a,v,r):v[u],i);x.skip=isNaN(w)||isNaN(M)||_,x.stop=i>0&&Math.abs(v[d]-y[d])>g,p&&(x.parsed=v,x.raw=h.data[i]),l&&(x.options=c||this.resolveDataElementOptions(i,f.active?"active":n)),m||this.updateElement(f,i,x,n),y=v}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},class extends gn{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Be(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,s=i.length;if(!s)return[];const o=!!t._loop,{start:a,end:r}=function(t,e,i,n){let s=0,o=e-1;if(i&&!n)for(;ss&&t[o%e].skip;)o--;return o%=e,{start:s,end:o}}(i,s,o,n);return function(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const s=t._chart.getContext(),o=oi(t.options),{_datasetIndex:a,options:{spanGaps:r}}=t,h=i.length,c=[];let l=o,d=e[0].start,u=d;function f(t,e,n,s){const o=r?-1:1;if(t!==e){for(t+=h;i[t%h].skip;)t-=o;for(;i[e%h].skip;)e+=o;t%h!=e%h&&(c.push({start:t%h,end:e%h,loop:n,style:s}),l=s,d=e%h)}}for(const t of e){d=r?d:t.start;let e,o=i[d%h];for(u=d+1;u<=t.end;u++){const r=i[u%h];e=oi(n.setContext(_e(s,{type:"segment",p0:o,p1:r,p0DataIndex:(u-1)%h,p1DataIndex:u%h,datasetIndex:a}))),ai(e,l)&&f(d,u-1,t.loop,l),o=r,l=e}dnull===t?null:kt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,i,n){const s=t.indexOf(e);return-1===s?((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n):s!==t.lastIndexOf(e)?i:s}(i,t,H(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let s=this.getLabels();s=0===t&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){return ms.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},class extends gn{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:s,outer:o}=us(this),a=(r=o.radius).topLeft||r.topRight||r.bottomLeft||r.bottomRight?de:ps;var r;t.save(),o.w===s.w&&o.h===s.h||(t.beginPath(),a(t,gs(o,e,s)),t.clip(),a(t,gs(s,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,gs(s,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return fs(this,t,e,i)}inXRange(t,e){return fs(this,t,null,e)}inYRange(t,e){return fs(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+n)/2:e,y:s?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}},class extends ki{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,n){return Di(t,e,i,n)}parseArrayData(t,e,i,n){return Di(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:s,vScale:o}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,h="x"===s.axis?a:r,c="x"===o.axis?a:r,l=[];let d,u,f,p;for(d=i,u=i+n;dt.controller.options.grouped)),s=i.options.stacked,o=[],a=t=>{const i=t.controller.getParsed(e),n=i&&i[t.vScale.axis];if(j(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!a(i))&&((!1===s||-1===o.indexOf(i.stack)||void 0===s&&void 0===i.stack)&&o.push(i.stack),i.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),s=void 0!==e?n.indexOf(e):-1;return-1===s?n.length-1:s}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let s,o;for(s=0,o=e.data.length;s=i?1:-1)}(d,e,a)*o,u===a&&(m-=d/2);const t=e.getPixelForDecimal(0),s=e.getPixelForDecimal(1),h=Math.min(t,s),f=Math.max(t,s);m=Math.max(Math.min(m,f),h),l=m+d,i&&!c&&(r._stacks[e.axis]._visualValues[n]=e.getValueForPixel(l)-e.getValueForPixel(m))}if(m===e.getPixelForValue(a)){const t=pt(d)*e.getLineWidthForValue(a)/2;m+=t,d-=t}return{size:d,base:m,head:l,center:l+d/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,s=n.skipNull,o=H(n.maxBarThickness,1/0);let a,r;if(e.grouped){const i=s?this._getStackCount(t):e.stackCount,h="flex"===n.barThickness?function(t,e,i,n){const s=e.pixels,o=s[t];let a=t>0?s[t-1]:null,r=t0&&void 0!==arguments[0]&&arguments[0];this.obb.box3D.isEmpty()||(this.quaternion.copy(this.obb.quaternion),this.obb.box3D.getCenter(this.position).applyQuaternion(this.quaternion).add(this.obb.position),this.obb.box3D.getSize(this.scale),this.scale.multiplyScalar(.5),this.updateMatrix(),n.Object3D.prototype.updateMatrixWorld.call(this,t))}}]),o}(n.Box3Helper);const Ts=Es;function Is(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return As(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?As(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}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 o,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw o}}}}function As(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);it.length)&&(e=t.length);for(var i=0,n=new Array(e);i=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}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 o,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw o}}}}(e.group.children);try{var s=function(){var n=t.value;n.visible=i.some((function(t){return i=t,s=n.owner.name,e.dbgDisplaySticky&&i===s||e.dbgDisplayParents&&i.startsWith(s)||e.dbgDisplayChildren&&s.startsWith(i);var i,s})),n.boxHelper&&(n.boxHelper.visible=n.visible),n.visible&&(e.displayedCount+=n.geometry.attributes.position.count)};for(n.s();!(t=n.n()).done;)s()}catch(t){n.e(t)}finally{n.f()}}}))}};var Vs=i(36194),Bs=i(20193),Ws=i(1857);function Ns(t,e){var i=0,n=Date.now(),s={label:"Update 1st level",data:[{x:0,y:0}],borderColor:_s,borderWidth:1.5,pointRadius:1},o={label:"Update duration (ms)",data:[{x:0,y:0}],borderColor:ws,borderWidth:1.5,pointRadius:1},a=["0s"],r=new ts(t,{type:"line",data:{labels:a,datasets:[s,o]},options:{animation:{duration:10},scales:vs}});this.update=function(t,h){var c=Math.floor((Date.now()-n)/1e3),l="".concat(c,"s");i>0&&a[i]==l?a.push(""):(a.push(l),i=a.length-1),a.length>60&&(a.shift(),i--),s.data.push({x:0,y:e._latestUpdateStartingLevel}),o.data.push({x:0,y:h}),s.data.length>60&&(s.data.shift(),o.data.shift()),t&&r.update()},this.resize=function(){r.resize()}}function Hs(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0&&i.layer===e&&(n[i.level]?n[i.level][0]+=1:n[i.level]=[1,0],i.material.visible&&(n[i.level][1]+=1)),i.children)){var s,o=function(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Hs(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Hs(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}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 o,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw o}}}}(i.children);try{for(o.s();!(s=o.n()).done;)t(s.value,n)}catch(t){o.e(t)}finally{o.f()}}}(e.object3d,a),i.length=0,n.length=0,a)({}).hasOwnProperty.call(a,r)&&(i[r]="".concat(r),n[r]=a[r][0],s[r]=a[r][1]);t&&o.update()},this.resize=function(){o.resize()}}function Us(t,e,i){t.defineLayerProperty(e,i,(function(){(t.parent?t.parent.object3d:t.object3d).traverse((function(i){i.layer==t&&i.material?i.material[e]=t[e]:i.content&&i.content.layer==t&&i.content.traverse((function(i){i.material&&(i.material[e]=t[e])}))}))}))}const Ys={addWireFrameCheckbox:function(t,e,i){t.add(i,"wireframe").name("Wireframe").onChange((function(){return e.notifyChange(i)}))},addMaterialSize:function(t,e,i,n,s){Us(i,"size",1),t.add(i,"size",n,s).name("Size").onChange((function(){return e.notifyChange(i)}))},addMaterialLineWidth:function(t,e,i,n,s){Us(i,"linewidth",1),t.add(i,"linewidth",n,s).name("Line Width").onChange((function(){return e.notifyChange(i)}))},createGeometryDebugUI:function(t,e,i){var n=t.addFolder("Layer ".concat(i.id));return n.add(i,"visible").name("Visible").onChange((function(){return e.notifyChange(i)})),n.add(i,"opacity",0,1).name("Opacity").onChange((function(){return e.notifyChange(i)})),n}};var Zs;function qs(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];Zs&&(Zs.material.overlayAlpha=0,Zs.material.showOutline=t.tileLayer.showOutline,t.notifyChange(Zs));var n=t.tileLayer.pickObjectsAt(t,e);return(Zs=n.length?n[0].object:void 0)&&(i&&console.info(Zs),Zs.material.overlayAlpha=.5,Zs.material.showOutline=!0,t.notifyChange(Zs)),Zs}function Xs(t,e,i,s){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(e.isDebugMode||a){s=s||new Rs(e,t),i=i||e.tileLayer;var r=Ys.createGeometryDebugUI(t,e,i),h="".concat(i.id,"-nb-objects"),c=s.createChartContainer(h),l="".concat(i.id,"-nb-visible"),d=s.createChartContainer(l);s.charts.push(new Ns(c.getContext("2d"),i)),s.charts.push(new $s(d.getContext("2d"),i)),i.showOutline=!1,i.wireframe=!1;var u={objectChart:!0,visibilityChart:!0,sseHelper:!1};r.add(i,"showOutline").name("Show tiles").onChange((function(t){i.showOutline=t,function(e,i,n,s){i.traverse((function(e){e.material&&e.layer===n&&(e.material.showOutline=t)})),e.notifyChange()}(e,i.object3d,i)})),r.add(i,"wireframe").name("Wireframe").onChange((function(){e.notifyChange(i)})),r.add(u,"objectChart").name("Object chart").onChange((function(t){document.getElementById(h).parentNode.style.display=t?"block":"none",s.updateChartDivSize(),s.charts.forEach((function(t){return t.update()}))})),r.add(u,"visibilityChart").name("Visibility chart").onChange((function(t){document.getElementById(l).parentNode.style.display=t?"block":"none",s.updateChartDivSize(),s.charts.forEach((function(t){return t.update()}))}));var f="".concat(i.id,"_obb_debug"),p="".concat(i.id,"_sb_debug"),g=new n.SphereGeometry(1,16,16),m=function(t){(0,Ds.Z)(o,t);var e,i,s=(e=o,i=function(){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(t){return!1}}(),function(){var t,n=(0,Os.Z)(e);if(i){var s=(0,Os.Z)(this).constructor;t=Reflect.construct(n,arguments,s)}else t=n.apply(this,arguments);return(0,Ps.Z)(this,t)});function o(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,Ss.Z)(this,o),i.update=C,(e=s.call(this,t,i.object3d||new n.Group,i)).isDebugLayer=!0,e}return(0,Cs.Z)(o,[{key:"preUpdate",value:function(t,e){e.has(this.parent)&&this.object3d.clear()}}]),o}(Bs.Z),b=new m(f,{visible:!1,cacheLifeTime:1/0,source:!1});e.addLayer(b).then((function(t){r.add(t,"visible").name("Bounding boxes").onChange((function(){e.notifyChange(t)}))}));var x=new m(p,{visible:!1,cacheLifeTime:1/0,source:!1});e.addLayer(x).then((function(t){r.add(t,"visible").name("Bounding Spheres").onChange((function(){e.notifyChange(t)}))}));var y=document.getElementById("viewerDiv"),v=document.createElement("span");v.className="circleBase",y.appendChild(v);var _,w=new n.Vector3,M=function(){Vs.ZP.update(),e.notifyChange()},k=function(){Vs.ZP.removeAll(),e._frameRequesters[o.Ao.BEFORE_RENDER].includes(M)&&e.removeFrameRequester(o.Ao.BEFORE_RENDER,M)};r.add(u,"sseHelper").name("Sse helper").onChange((function(t){t?window.addEventListener("mousemove",D,!1):(v.style.display="none",k(),window.removeEventListener("mousemove",D))}));var S=null;window.addEventListener("mousedown",(function(t){83==S&&qs(e,t)})),window.addEventListener("keydown",(function(t){S=t.which})),window.addEventListener("keyup",(function(){S=null}))}function C(t,e,i){if(i.parent&&e.visible){var s=i.link[e.id];if(i.visible&&i.material&&i.material.visible){if(!s){if((s=new n.Group).layer=e,i.matrixWorld.decompose(s.position,s.quaternion,s.scale),e.id==f){var o=new Ts(i.obb);o.layer=e,s.add(o)}else if(e.id==p){var a=new n.Color(Math.random(),Math.random(),Math.random()),r=new n.MeshBasicMaterial({color:a.getHex(),wireframe:!0}),h=new n.Mesh(g,r);h.position.copy(i.boundingSphere.center),h.scale.multiplyScalar(i.boundingSphere.radius),h.scale.set(1,1,1).multiplyScalar(i.boundingSphere.radius),h.layer=e,s.add(h)}i.link[e.id]=s}e.object3d.add(s),s.updateMatrixWorld(!0)}else s&&e.object3d.remove(s)}else Ws.Z.removeChildrenAndCleanupRecursively(e,i)}function D(t){var i=qs(e,t,!1);if(i){v.style.display="table-cell",w.copy(i.boundingSphere.center).applyMatrix4(i.matrixWorld);var n=w.project(e.camera3D),s=e.normalizedToViewCoords(n),a=i.screenSize;if(_!=i){var r=Number(v.style.width.replace("px",""));_=i,k(),new Vs.ZP.Tween({size:r}).to({size:a},500).easing(Vs.ZP.Easing.Sinusoidal.In).easing(Vs.ZP.Easing.Exponential.Out).onUpdate((function(t){v.style["line-height"]="".concat(t.size,"px"),v.style.width="".concat(t.size,"px"),v.style.height="".concat(t.size,"px"),v.innerHTML="".concat(Math.floor(t.size)," px"),v.style.left="".concat(s.x-.5*t.size,"px"),v.style.top="".concat(s.y-.5*t.size,"px")})).onComplete(k).start(),e.addFrameRequester(o.Ao.BEFORE_RENDER,M)}}else v.style.display="none"}}var Gs=i(36873),Ks=i(24147),Qs=new n.Mesh;function Js(t,e,i){var s=Ys.createGeometryDebugUI(t,e,i);Ys.addWireFrameCheckbox(s,e,i);var o="".concat(i.id,"_bounding_volume_debug"),a=new Bs.Z(o,new n.Object3D,{update:function(t,e,s){var o=s.userData.metadata,a=s.userData.boundingVolumeHelper;if(a)a.visible=!(!e.visible||!s.visible);else if(e.visible&&s.visible&&o.boundingVolume){if(o.boundingVolume.initialVolumeType===Ks.D.box){var r,h;if(Qs.geometry.boundingBox=o.boundingVolume.volume,(a=new n.BoxHelper(Qs)).material.linewidth=2,null!==(r=o.content)&&void 0!==r&&r.uri&&null!==(h=o.content)&&void 0!==h&&h.uri.endsWith("b3dm")){var c=i.tileset.asset.gltfUpAxis;void 0===c||"Y"===c?a.rotation.x=.5*-Math.PI:"X"===c&&(a.rotation.z=.5*-Math.PI),a.updateMatrix()}}else{if(o.boundingVolume.initialVolumeType!==Ks.D.sphere&&o.boundingVolume.initialVolumeType!==Ks.D.region)return void console.warn("[3D Tiles Debug]: Unknown bounding volume: ".concat(o.boundingVolume));var l=new n.SphereGeometry(o.boundingVolume.volume.radius,32,32),d=new n.MeshBasicMaterial({wireframe:!0,color:16777215*Math.random()});a=new n.Mesh(l,d)}s.userData.boundingVolumeHelper=a,s.parent.add(a),a.updateMatrixWorld(!0)}},visible:!1,cacheLifeTime:1/0,source:!1});Gs.Z.prototype.addLayer.call(e,a,i).then((function(t){s.add(t,"visible").name("Bounding boxes").onChange((function(){e.notifyChange(e.camera3D)}))})),s.add(i,"sseThreshold",0,100).name("sseThreshold").onChange((function(){e.notifyChange(e.camera3D)})),s.add({frozen:i.frozen},"frozen").onChange((function(t){i.frozen=t,e.notifyChange(i)})),s.add(i,"pntsShape",zs.Uz).name("Points Shape").onChange((function(){e.notifyChange(e.camera.camera3D)})),s.add(i,"pntsSizeMode",zs.E7).name("Pnts size mode").onChange((function(){e.notifyChange(e.camera.camera3D)})),s.add(i,"pntsMinAttenuatedSize",0,15).name("Min attenuated size").onChange((function(){e.notifyChange(e.camera.camera3D)})),s.add(i,"pntsMaxAttenuatedSize",0,15).name("Max attenuated size").onChange((function(){e.notifyChange(e.camera.camera3D)}))}}},t=>(70473,t(t.s=70473))]))); //# sourceMappingURL=debug.js.map \ No newline at end of file diff --git a/itowns/dev/dist/itowns.js b/itowns/dev/dist/itowns.js index f64bbf44..01e04297 100644 --- a/itowns/dev/dist/itowns.js +++ b/itowns/dev/dist/itowns.js @@ -1,3 +1,3 @@ /*! For license information please see itowns.js.LICENSE.txt */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("itowns",[],e):"object"==typeof exports?exports.itowns=e():t.itowns=e()}(self,(()=>(()=>{var t,e={21524:(t,e,r)=>{"use strict";function n(){var e,n=void 0!==n?n:{},i={};for(e in n)n.hasOwnProperty(e)&&(i[e]=n[e]);var a,o,s,l,c=[];a="object"==typeof window,o="function"==typeof importScripts,l="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,s=!a&&!l&&!o;var u,h,f,d,p,m="";l?(m=o?r(61915).dirname(m)+"/":"//",u=function(t,e){var n=re(t);return n?e?n:n.toString():(d||(d=r(78075)),p||(p=r(61915)),t=p.normalize(t),d.readFileSync(t,e?null:"utf8"))},f=function(t){var e=u(t,!0);return e.buffer||(e=new Uint8Array(e)),b(e.buffer),e},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),c=process.argv.slice(2),t.exports=n,process.on("uncaughtException",(function(t){if(!(t instanceof ge))throw t})),process.on("unhandledRejection",X),n.inspect=function(){return"[Emscripten Module object]"}):s?("undefined"!=typeof read&&(u=function(t){var e=re(t);return e?te(e):read(t)}),f=function(t){var e;return(e=re(t))?e:"function"==typeof readbuffer?new Uint8Array(readbuffer(t)):(b("object"==typeof(e=read(t,"binary"))),e)},"undefined"!=typeof scriptArgs?c=scriptArgs:void 0!==arguments&&(c=arguments),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(a||o)&&(o?m=self.location.href:document.currentScript&&(m=document.currentScript.src),m=0!==m.indexOf("blob:")?m.substr(0,m.lastIndexOf("/")+1):"",u=function(t){try{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText}catch(e){var r=re(t);if(r)return te(r);throw e}},o&&(f=function(t){try{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}catch(e){var r=re(t);if(r)return r;throw e}}),h=function(t,e,r){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){if(200==n.status||0==n.status&&n.response)e(n.response);else{var i=re(t);i?e(i.buffer):r()}},n.onerror=r,n.send(null)});var A=n.print||console.log.bind(console),g=n.printErr||console.warn.bind(console);for(e in i)i.hasOwnProperty(e)&&(n[e]=i[e]);i=null,n.arguments&&(c=n.arguments),n.thisProgram&&n.thisProgram,n.quit&&n.quit,new Array(0);var v=0;n.wasmBinary&&n.wasmBinary,n.noExitRuntime&&n.noExitRuntime;var y=!1;function b(t,e){t||X("Assertion failed: "+e)}var x="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;var w,_,E,M,S,C,T,I,R,B="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function k(t,e){for(var r=t,n=r>>1,i=n+e/2;!(n>=i)&&S[n];)++n;if((r=n<<1)-t>32&&B)return B.decode(E.subarray(t,r));for(var a=0,o="";;){var s=M[t+2*a>>1];if(0==s||a==e/2)return o;++a,o+=String.fromCharCode(s)}}function L(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,i=(r-=2)<2*t.length?r/2:t.length,a=0;a>1]=o,e+=2}return M[e>>1]=0,e-n}function P(t){return 2*t.length}function D(t,e){for(var r=0,n="";!(r>=e/4);){var i=C[t+4*r>>2];if(0==i)break;if(++r,i>=65536){var a=i-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(i)}return n}function U(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,i=n+r-4,a=0;a=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&t.charCodeAt(++a)),C[e>>2]=o,(e+=4)+4>i)break}return C[e>>2]=0,e-n}function O(t){for(var e=0,r=0;r=55296&&n<=57343&&++r,e+=4}return e}var F,N=n.INITIAL_MEMORY||167772160;function z(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var r=e.func;"number"==typeof r?void 0===e.arg?n.dynCall_v(r):n.dynCall_vi(r,e.arg):r(void 0===e.arg?null:e.arg)}else e(n)}}N=(w=n.buffer?n.buffer:new ArrayBuffer(N)).byteLength,w=F=w,n.HEAP8=_=new Int8Array(F),n.HEAP16=M=new Int16Array(F),n.HEAP32=C=new Int32Array(F),n.HEAPU8=E=new Uint8Array(F),n.HEAPU16=S=new Uint16Array(F),n.HEAPU32=T=new Uint32Array(F),n.HEAPF32=I=new Float32Array(F),n.HEAPF64=R=new Float64Array(F),C[5544]=5265264;var G=[],Z=[],V=[],Q=[];Math.abs,Math.ceil,Math.floor,Math.min;var j=0,W=null,H=null;function X(t){throw n.onAbort&&n.onAbort(t),A(t+=""),g(t),y=!0,"abort("+t+"). Build with -s ASSERTIONS=1 for more info."}n.preloadedImages={},n.preloadedAudios={};var q=null,Y="data:application/octet-stream;base64,";function J(t){return e=t,r=Y,String.prototype.startsWith?e.startsWith(r):0===e.indexOf(r);var e,r}Z.push({func:function(){he()}}),q="data:application/octet-stream;base64,AAAAAAAAAAAPDg0MCwoJCA4AAQMGCgoJDQECBAcLCwoMAwQFCAwMCwsGBwgJDQ0MCgoLDA0ODg0JCgsMDQ4PDggJCgsMDQ4PAAECAwQFBgcBAAECAwQFBgIBAAECAwQFAwIBAAECAwQEAwIBAAECAwUEAwIBAAECBgUEAwIBAAEHBgUEAwIBAMgPAAAoDQAAEBAAACAQAADIDwAAUA0AABAQAAAgEAAAEQAKABEREQAAAAAFAAAAAAAACQAAAAALAAAAAAAAAAARAA8KERERAwoHAAEACQsLAAAJBgsAAAsABhEAAAAREREAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAAAEQAKChEREQAKAAACAAkLAAAACQALAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAADAAAAAAJDAAAAAAADAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAANAAAABA0AAAAACQ4AAAAAAA4AAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAADwAAAAAPAAAAAAkQAAAAAAAQAAAQAAASAAAAEhISAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAASEhIAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAAKAAAAAAoAAAAACQsAAAAAAAsAAAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAMAAAAAAkMAAAAAAAMAAAMAAAwMTIzNDU2Nzg5QUJDREVGGRJEOwI/LEcUPTMwChsGRktFNw9JDo4XA0AdPGkrNh9KLRwBICUpIQgMFRYiLhA4Pgs0MRhkdHV2L0EJfzkRI0MyQomKiwUEJignDSoeNYwHGkiTE5SVAAAAAAAAAAAASWxsZWdhbCBieXRlIHNlcXVlbmNlAERvbWFpbiBlcnJvcgBSZXN1bHQgbm90IHJlcHJlc2VudGFibGUATm90IGEgdHR5AFBlcm1pc3Npb24gZGVuaWVkAE9wZXJhdGlvbiBub3QgcGVybWl0dGVkAE5vIHN1Y2ggZmlsZSBvciBkaXJlY3RvcnkATm8gc3VjaCBwcm9jZXNzAEZpbGUgZXhpc3RzAFZhbHVlIHRvbyBsYXJnZSBmb3IgZGF0YSB0eXBlAE5vIHNwYWNlIGxlZnQgb24gZGV2aWNlAE91dCBvZiBtZW1vcnkAUmVzb3VyY2UgYnVzeQBJbnRlcnJ1cHRlZCBzeXN0ZW0gY2FsbABSZXNvdXJjZSB0ZW1wb3JhcmlseSB1bmF2YWlsYWJsZQBJbnZhbGlkIHNlZWsAQ3Jvc3MtZGV2aWNlIGxpbmsAUmVhZC1vbmx5IGZpbGUgc3lzdGVtAERpcmVjdG9yeSBub3QgZW1wdHkAQ29ubmVjdGlvbiByZXNldCBieSBwZWVyAE9wZXJhdGlvbiB0aW1lZCBvdXQAQ29ubmVjdGlvbiByZWZ1c2VkAEhvc3QgaXMgZG93bgBIb3N0IGlzIHVucmVhY2hhYmxlAEFkZHJlc3MgaW4gdXNlAEJyb2tlbiBwaXBlAEkvTyBlcnJvcgBObyBzdWNoIGRldmljZSBvciBhZGRyZXNzAEJsb2NrIGRldmljZSByZXF1aXJlZABObyBzdWNoIGRldmljZQBOb3QgYSBkaXJlY3RvcnkASXMgYSBkaXJlY3RvcnkAVGV4dCBmaWxlIGJ1c3kARXhlYyBmb3JtYXQgZXJyb3IASW52YWxpZCBhcmd1bWVudABBcmd1bWVudCBsaXN0IHRvbyBsb25nAFN5bWJvbGljIGxpbmsgbG9vcABGaWxlbmFtZSB0b28gbG9uZwBUb28gbWFueSBvcGVuIGZpbGVzIGluIHN5c3RlbQBObyBmaWxlIGRlc2NyaXB0b3JzIGF2YWlsYWJsZQBCYWQgZmlsZSBkZXNjcmlwdG9yAE5vIGNoaWxkIHByb2Nlc3MAQmFkIGFkZHJlc3MARmlsZSB0b28gbGFyZ2UAVG9vIG1hbnkgbGlua3MATm8gbG9ja3MgYXZhaWxhYmxlAFJlc291cmNlIGRlYWRsb2NrIHdvdWxkIG9jY3VyAFN0YXRlIG5vdCByZWNvdmVyYWJsZQBQcmV2aW91cyBvd25lciBkaWVkAE9wZXJhdGlvbiBjYW5jZWxlZABGdW5jdGlvbiBub3QgaW1wbGVtZW50ZWQATm8gbWVzc2FnZSBvZiBkZXNpcmVkIHR5cGUASWRlbnRpZmllciByZW1vdmVkAERldmljZSBub3QgYSBzdHJlYW0ATm8gZGF0YSBhdmFpbGFibGUARGV2aWNlIHRpbWVvdXQAT3V0IG9mIHN0cmVhbXMgcmVzb3VyY2VzAExpbmsgaGFzIGJlZW4gc2V2ZXJlZABQcm90b2NvbCBlcnJvcgBCYWQgbWVzc2FnZQBGaWxlIGRlc2NyaXB0b3IgaW4gYmFkIHN0YXRlAE5vdCBhIHNvY2tldABEZXN0aW5hdGlvbiBhZGRyZXNzIHJlcXVpcmVkAE1lc3NhZ2UgdG9vIGxhcmdlAFByb3RvY29sIHdyb25nIHR5cGUgZm9yIHNvY2tldABQcm90b2NvbCBub3QgYXZhaWxhYmxlAFByb3RvY29sIG5vdCBzdXBwb3J0ZWQAU29ja2V0IHR5cGUgbm90IHN1cHBvcnRlZABOb3Qgc3VwcG9ydGVkAFByb3RvY29sIGZhbWlseSBub3Qgc3VwcG9ydGVkAEFkZHJlc3MgZmFtaWx5IG5vdCBzdXBwb3J0ZWQgYnkgcHJvdG9jb2wAQWRkcmVzcyBub3QgYXZhaWxhYmxlAE5ldHdvcmsgaXMgZG93bgBOZXR3b3JrIHVucmVhY2hhYmxlAENvbm5lY3Rpb24gcmVzZXQgYnkgbmV0d29yawBDb25uZWN0aW9uIGFib3J0ZWQATm8gYnVmZmVyIHNwYWNlIGF2YWlsYWJsZQBTb2NrZXQgaXMgY29ubmVjdGVkAFNvY2tldCBub3QgY29ubmVjdGVkAENhbm5vdCBzZW5kIGFmdGVyIHNvY2tldCBzaHV0ZG93bgBPcGVyYXRpb24gYWxyZWFkeSBpbiBwcm9ncmVzcwBPcGVyYXRpb24gaW4gcHJvZ3Jlc3MAU3RhbGUgZmlsZSBoYW5kbGUAUmVtb3RlIEkvTyBlcnJvcgBRdW90YSBleGNlZWRlZABObyBtZWRpdW0gZm91bmQAV3JvbmcgbWVkaXVtIHR5cGUATm8gZXJyb3IgaW5mb3JtYXRpb24AAAAAAADgFgAAmRgAAGAQAAAAAAAA4BYAAEIZAABgEAAAAAAAAOAWAAAqGgAASA8AAAAAAAC4FgAANBsAAOAWAACfGgAAMAoAAAAAAADgFgAAaRsAAEgPAAAAAAAA4BYAAIobAABIDwAAAAAAALgWAAAPHAAA4BYAAHwcAABIDwAAAAAAAOAWAACVHAAASA8AAAAAAADgFgAAHh0AAEgPAAAAAAAA4BYAAHcdAABIDwAAAAAAAOAWAACQHQAASA8AAAAAAADgFgAAQh4AAEgPAAAAAAAA4BYAAIceAABgEAAAAAAAAOAWAACkHwAASA8AAAAAAAC4FgAAZyAAAOAWAADkHwAA8AoAAAAAAADgFgAAjyAAAGAQAAAAAAAAuBYAAMMiAADgFgAAAiIAABgLAAAAAAAA4BYAAOEiAABgEAAAAAAAAOAWAADQJAAAGAsAAAAAAADgFgAAkSUAAGAQAAAAAAAA4BYAAIAnAAAYCwAAAAAAAOAWAAA9KAAAYBAAAAAAAADgFgAAJCoAABgLAAAAAAAA4BYAAOkqAABgEAAAAAAAAOAWAADgLAAA8AoAAAAAAADgFgAAui0AAGAQAAAAAAAA4BYAANsvAADwCgAAAAAAAOAWAADTMAAAYBAAAAAAAADgFgAAMDMAAPAKAAAAAAAA4BYAACQ0AABgEAAAAAAAAOAWAAB5NgAA8AoAAAAAAADgFgAAizcAAGAQAAAAAAAA4BYAABw6AABgEAAAAAAAAOAWAACdOgAAYBAAAAAAAADgFgAAXjsAAPAKAAAAAAAA4BYAALU7AABgEAAAAAAAAOAWAADMPAAAGAsAAAAAAADgFgAATz0AAGAQAAAAAAAA4BYAAL4+AAAYCwAAAAAAAOAWAABBPwAAYBAAAAAAAADgFgAAsEAAABgLAAAAAAAA4BYAADNBAABgEAAAAAAAAOAWAACiQgAAGAsAAAAAAADgFgAAJUMAAGAQAAAAAAAA4BYAAJREAAAYCwAAAAAAAOAWAAAXRQAAYBAAAAAAAADgFgAAhkYAABgLAAAAAAAA4BYAAAlHAABgEAAAAAAAALgWAAB4SAAAiBcAAIBIAAAAAAAAIA0AAIgXAACJSAAAAQAAACANAAC4FgAAqkgAAIgXAAC6SAAAAAAAAEgNAACIFwAAy0gAAAEAAABIDQAAuBYAABhMAAC4FgAAN0wAALgWAABWTAAAuBYAAHVMAAC4FgAAlEwAALgWAACzTAAAuBYAANJMAAC4FgAA8UwAALgWAAAQTQAAuBYAAC9NAAC4FgAATk0AALgWAABtTQAAuBYAAIxNAACkFwAAn00AAAAAAAABAAAA8A0AAAAAAAC4FgAA4U0AAKQXAAAHTgAAAAAAAAEAAADwDQAAAAAAAKQXAABJTgAAAAAAAAEAAADwDQAAAAAAAKQXAACITgAAAAAAAAEAAADwDQAAAAAAAKQXAADHTgAAAAAAAAEAAADwDQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALgWAADNTwAA4BYAAC1QAAAADwAAAAAAAOAWAADaTwAAEA8AAAAAAAC4FgAA+08AAOAWAAAIUAAA8A4AAAAAAADgFgAAhlAAAOgOAAAAAAAA4BYAAJNQAADoDgAAAAAAAOAWAACjUAAA6A4AAAAAAADgFgAAtVAAADgPAAAAAAAA4BYAAMZQAAA4DwAAAAAAAOAWAADXUAAAAA8AAAAAAADgFgAA+VAAAHgPAAAAAAAA4BYAAB1RAAAADwAAAAAAAOAWAABCUQAAeA8AAAAAAADgFgAAjlEAAAAPAAAAAAAAbBcAALZRAABsFwAAuFEAAGwXAAC7UQAAbBcAAL1RAABsFwAAv1EAAGwXAADBUQAAbBcAAMNRAABsFwAAxVEAAGwXAADHUQAAbBcAAMlRAABsFwAAy1EAAGwXAADNUQAAbBcAAM9RAABsFwAA0VEAAOAWAADTUQAA8A4AAAAAAADgFgAARlIAAOgOAAAAAAAAuBYAAGJSAACkFwAAe1IAAAAAAAABAAAAWBAAAAAAAADgFgAA9FIAAIgQAAAAAAAA4BYAABdTAACYEAAAAAAAALgWAAAuUwAA4BYAAHBTAACIEAAAAAAAAOAWAACSUwAASA8AAAAAAAAAAAAAAAoAAAEAAAACAAAAAwAAAAEAAAAEAAAAAAAAABAKAAABAAAABQAAAAYAAAACAAAABwAAAAAAAAAgCgAACAAAAAkAAAABAAAAAAAAADgKAAAKAAAACwAAAAIAAAABAAAADAAAAA0AAAACAAAAAwAAAAMAAAAAAAAASAoAAAgAAAAOAAAAAQAAAAAAAABYCgAACAAAAA8AAAABAAAAAAAAAIAKAAAIAAAAEAAAAAEAAAAAAAAAcAoAAAgAAAARAAAAAQAAAAAAAACQCgAACAAAABIAAAABAAAAAAAAAKAKAAAIAAAAEwAAAAEAAAAAAAAAsAoAAAgAAAAUAAAAAQAAAAAAAADACgAACAAAABUAAAABAAAAAAAAANAKAAABAAAAFgAAABcAAAAEAAAAGAAAAAAAAADgCgAACAAAABkAAAABAAAAAAAAAPgKAAAFAAAAGgAAABsAAAAAAAAA8AoAAAEAAAAcAAAAHQAAAAAAAAAICwAAAQAAAB4AAAAfAAAABgAAACAAAAAAAAAAIAsAACEAAAAiAAAABwAAAAgAAAAAAAAAGAsAACMAAAAkAAAABwAAAAkAAAAAAAAAMAsAAAEAAAAlAAAAJgAAAAoAAAAnAAAAAAAAAEALAAAoAAAAKQAAAAcAAAALAAAAAAAAAFALAAABAAAAKgAAACsAAAAMAAAALAAAAAAAAABgCwAALQAAAC4AAAAHAAAADQAAAAAAAABwCwAAAQAAAC8AAAAwAAAADgAAADEAAAAAAAAAgAsAADIAAAAzAAAABwAAAA8AAAAAAAAAkAsAAAEAAAA0AAAANQAAABAAAAA2AAAAAAAAAKALAAARAAAANwAAADgAAAAAAAAAsAsAAAEAAAA5AAAAOgAAABIAAAA7AAAAAAAAAMALAAATAAAAPAAAAD0AAAAAAAAA0AsAAAEAAAA+AAAAPwAAABQAAABAAAAAAAAAAOALAAAVAAAAQQAAAEIAAAAAAAAA8AsAAAEAAABDAAAARAAAABYAAABFAAAAAAAAAAAMAAAXAAAARgAAAEcAAAAAAAAAEAwAAAEAAABIAAAASQAAABgAAABKAAAAAAAAACAMAAABAAAASwAAAEwAAAAZAAAATQAAAAAAAAAwDAAAAQAAAE4AAABPAAAAGgAAAFAAAAAAAAAAQAwAABsAAABRAAAAUgAAAAAAAABQDAAAAQAAAFMAAABUAAAAHAAAAFUAAAAAAAAAYAwAAFYAAABXAAAABwAAAB0AAAAAAAAAcAwAAAEAAABYAAAAWQAAAB4AAABaAAAAAAAAAIAMAABbAAAAXAAAAAcAAAAfAAAAAAAAAJAMAAABAAAAXQAAAF4AAAAgAAAAXwAAAAAAAACgDAAAYAAAAGEAAAAHAAAAIQAAAAAAAACwDAAAAQAAAGIAAABjAAAAIgAAAGQAAAAAAAAAwAwAAGUAAABmAAAABwAAACMAAAAAAAAA0AwAAAEAAABnAAAAaAAAACQAAABpAAAAAAAAAOAMAABqAAAAawAAAAcAAAAlAAAAAAAAAPAMAAABAAAAbAAAAG0AAAAmAAAAbgAAAAAAAAAADQAAbwAAAHAAAAAHAAAAJwAAAAAAAAAQDQAAAQAAAHEAAAByAAAAKAAAAHMAAAAoDQAAyA8AACgNAAAIEAAAEBAAACgNAABQDQAAyA8AAFANAAAgEAAAyA8AAFANAAAIEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwDgAAdAAAAHUAAAB2AAAAdwAAAAIAAAABAAAAAQAAAAEAAAAAAAAAGA8AAHQAAAB4AAAAdgAAAHcAAAACAAAAAgAAAAIAAAACAAAAAAAAACgPAAB5AAAAegAAAAQAAAAAAAAAOA8AAHsAAAB8AAAABQAAAAAAAABIDwAACAAAAH0AAAABAAAAAAAAAFgPAAB7AAAAfgAAAAUAAAAAAAAAaA8AAHsAAAB/AAAABQAAAAAAAAC4DwAAdAAAAIAAAAB2AAAAdwAAAAMAAAAAAAAAiA8AAHQAAACBAAAAdgAAAHcAAAAEAAAAAAAAADgQAAB0AAAAggAAAHYAAAB3AAAAAgAAAAMAAAADAAAAAwAAAAAAAABIEAAAgwAAAIQAAAAGAAAAAAAAAHgQAACFAAAAhgAAAAcAAAABAAAABQAAAAYAAAACAAAAAAAAAKAQAACFAAAAhwAAAAgAAAADAAAABQAAAAYAAAAEAAAA4BcAAAQYAAAAAAAAsBAAAIgAAACJAAAAAQAAAExBU1ppcABvcGVuAGdldFBvaW50AGdldENvdW50AER5bmFtaWNMQVNaaXAAYWRkRmllbGRGbG9hdGluZwBhZGRGaWVsZFNpZ25lZABhZGRGaWVsZFVuc2lnbmVkAE5TdDNfXzIyMF9fc2hhcmVkX3B0cl9wb2ludGVySVBONmxhc3ppcDdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRU5TXzE0ZGVmYXVsdF9kZWxldGVJUzNfRUVOU185YWxsb2NhdG9ySVMzX0VFRUUATlN0M19fMjE0ZGVmYXVsdF9kZWxldGVJTjZsYXN6aXA3c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRQBOU3QzX18yMjBfX3NoYXJlZF9wdHJfcG9pbnRlcklQTjZsYXN6aXAyaW82cmVhZGVyMTBiYXNpY19maWxlSU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRU5TXzE0ZGVmYXVsdF9kZWxldGVJUzdfRUVOU185YWxsb2NhdG9ySVM3X0VFRUUATlN0M19fMjE0ZGVmYXVsdF9kZWxldGVJTjZsYXN6aXAyaW82cmVhZGVyMTBiYXNpY19maWxlSU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFAExBU0YATjZsYXN6aXAxM2ludmFsaWRfbWFnaWNFAGFsbG9jYXRvcjxUPjo6YWxsb2NhdGUoc2l6ZV90IG4pICduJyBleGNlZWRzIG1heGltdW0gc3VwcG9ydGVkIHNpemUARmlsZSBtYWdpYyBpcyBub3QgdmFsaWQATlN0M19fMjEwX19mdW5jdGlvbjZfX2Z1bmNJWk42bGFzemlwMmlvNnJlYWRlcjEwYmFzaWNfZmlsZUlOUzJfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRTExX3ZhbGlkYXRvcnNFdkVVbFJOUzNfNmhlYWRlckVFX05TXzlhbGxvY2F0b3JJU0JfRUVGdlNBX0VFRQBOU3QzX18yMTBfX2Z1bmN0aW9uNl9fYmFzZUlGdlJONmxhc3ppcDJpbzZoZWFkZXJFRUVFAE42bGFzemlwMjFvbGRfc3R5bGVfY29tcHJlc3Npb25FAE42bGFzemlwMTRub3RfY29tcHJlc3NlZEUAVGhlIGZpbGUgc2VlbXMgdG8gaGF2ZSBvbGQgc3R5bGUgY29tcHJlc3Npb24gd2hpY2ggaXMgbm90IHN1cHBvcnRlZABUaGUgZmlsZSBkb2Vzbid0IHNlZW0gdG8gYmUgY29tcHJlc3NlZABaTjZsYXN6aXAyaW82cmVhZGVyMTBiYXNpY19maWxlSU5TXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUUxMV92YWxpZGF0b3JzRXZFVWxSTlMwXzZoZWFkZXJFRV8AbGFzemlwIGVuY29kZWQATjZsYXN6aXAxM25vX2xhc3ppcF92bHJFAE42bGFzemlwMjVsYXN6aXBfZm9ybWF0X3Vuc3VwcG9ydGVkRQBPbmx5IExBU3ppcCBQT0lOVFdJU0UgQ0hVTktFRCBkZWNvbXByZXNzb3IgaXMgc3VwcG9ydGVkAE5vIExBU3ppcCBWTFIgd2FzIGZvdW5kIGluIHRoZSBWTFJzIHNlY3Rpb24ATjZsYXN6aXAyMmNodW5rX3RhYmxlX3JlYWRfZXJyb3JFAENodW5rIHRhYmxlIG9mZnNldCA9PSAtMSBpcyBub3Qgc3VwcG9ydGVkIGF0IHRoaXMgdGltZQBONmxhc3ppcDEzbm90X3N1cHBvcnRlZEUATjZsYXN6aXAyNnVua25vd25fY2h1bmtfdGFibGVfZm9ybWF0RQBjaHVua19zaXplID09IHVpbnQubWF4IGlzIG5vdCBzdXBwb3J0ZWQgYXQgdGhpcyB0aW1lLgBUaGVyZSB3YXMgYSBwcm9ibGVtIHJlYWRpbmcgdGhlIGNodW5rIHRhYmxlAFRoZSBjaHVuayB0YWJsZSB2ZXJzaW9uIG51bWJlciBpcyB1bmtub3duAE42bGFzemlwMTFlbmRfb2ZfZmlsZUUAUmVhY2hlZCBFbmQgb2YgZmlsZQBJbnZhbGlkIG51bWJlciBvZiBzeW1ib2xzAE5TdDNfXzIyMF9fc2hhcmVkX3B0cl9wb2ludGVySVBONmxhc3ppcDhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOU18xNGRlZmF1bHRfZGVsZXRlSVM5X0VFTlNfOWFsbG9jYXRvcklTOV9FRUVFAE5TdDNfXzIxNGRlZmF1bHRfZGVsZXRlSU42bGFzemlwOGRlY29kZXJzMTBhcml0aG1ldGljSU5TMV8yaW8xOF9faWZzdHJlYW1fd3JhcHBlcklOUzFfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRUVFRUVFAE42bGFzemlwMTl1bmtub3duX3NjaGVtYV90eXBlRQBUaGUgTEFaIHNjaGVtYSBpcyBub3QgcmVjb2duaXplZABONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2ZpZWxkX2RlY29tcHJlc3NvcklOU184ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlNfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlNfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyMGR5bmFtaWNfZGVjb21wcmVzc29yRQBOU3QzX18yMjBfX3NoYXJlZF9wdHJfcG9pbnRlcklQTjZsYXN6aXA3Zm9ybWF0czI2ZHluYW1pY19maWVsZF9kZWNvbXByZXNzb3JJTlMxXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVFRU5TXzE0ZGVmYXVsdF9kZWxldGVJU0NfRUVOU185YWxsb2NhdG9ySVNDX0VFRUUATlN0M19fMjE0ZGVmYXVsdF9kZWxldGVJTjZsYXN6aXA3Zm9ybWF0czI2ZHluYW1pY19maWVsZF9kZWNvbXByZXNzb3JJTlMxXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOU18yaW8xOF9faWZzdHJlYW1fd3JhcHBlcklOU183c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMwXzVmaWVsZElOUzBfM2xhczdwb2ludDEwRU5TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNDX0VFRUVFRQBONmxhc3ppcDdmb3JtYXRzMTBiYXNlX2ZpZWxkRQBOU3QzX18yMjBfX3NoYXJlZF9wdHJfcG9pbnRlcklQTjZsYXN6aXA3Zm9ybWF0czI2ZHluYW1pY19kZWNvbXByZXNzb3JfZmllbGRJTlMxXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzJfNWZpZWxkSU5TMl8zbGFzN3BvaW50MTBFTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0VfRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTSV9FRU5TXzlhbGxvY2F0b3JJU0lfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSU5TMV8yaW8xOF9faWZzdHJlYW1fd3JhcHBlcklOUzFfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRUVFRU5TMl81ZmllbGRJTlMyXzNsYXM3cG9pbnQxMEVOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTRV9FRUVFRUVFRQBONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOU184ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlNfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlNfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRUVFRU5TMF81ZmllbGRJTlMwXzNsYXM3Z3BzdGltZUVOUzBfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTQ19FRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzVmaWVsZElOUzJfM2xhczdncHN0aW1lRU5TMl8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNFX0VFRUVFRU5TXzE0ZGVmYXVsdF9kZWxldGVJU0lfRUVOU185YWxsb2NhdG9ySVNJX0VFRUUATlN0M19fMjE0ZGVmYXVsdF9kZWxldGVJTjZsYXN6aXA3Zm9ybWF0czI2ZHluYW1pY19kZWNvbXByZXNzb3JfZmllbGRJTlMxXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzJfNWZpZWxkSU5TMl8zbGFzN2dwc3RpbWVFTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0VfRUVFRUVFRUUATjZsYXN6aXA3Zm9ybWF0czI2ZHluYW1pY19kZWNvbXByZXNzb3JfZmllbGRJTlNfOGRlY29kZXJzMTBhcml0aG1ldGljSU5TXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzBfNWZpZWxkSU5TMF8zbGFzM3JnYkVOUzBfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTQ19FRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzVmaWVsZElOUzJfM2xhczNyZ2JFTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0VfRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTSV9FRU5TXzlhbGxvY2F0b3JJU0lfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSU5TMV8yaW8xOF9faWZzdHJlYW1fd3JhcHBlcklOUzFfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRUVFRU5TMl81ZmllbGRJTlMyXzNsYXMzcmdiRU5TMl8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNFX0VFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOU18yaW8xOF9faWZzdHJlYW1fd3JhcHBlcklOU183c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMwXzVmaWVsZElOUzBfM2xhczEwZXh0cmFieXRlc0VOUzBfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTQ19FRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzVmaWVsZElOUzJfM2xhczEwZXh0cmFieXRlc0VOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTRV9FRUVFRUVOU18xNGRlZmF1bHRfZGVsZXRlSVNJX0VFTlNfOWFsbG9jYXRvcklTSV9FRUVFAE5TdDNfXzIxNGRlZmF1bHRfZGVsZXRlSU42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzVmaWVsZElOUzJfM2xhczEwZXh0cmFieXRlc0VOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTRV9FRUVFRUVFRQBONmxhc3ppcDdmb3JtYXRzMjFkeW5hbWljX2RlY29tcHJlc3NvcjFJTlNfOGRlY29kZXJzMTBhcml0aG1ldGljSU5TXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzBfMTlyZWNvcmRfZGVjb21wcmVzc29ySUpOUzBfNWZpZWxkSU5TMF8zbGFzN3BvaW50MTBFTlMwXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0RfRUVFRUVFRUVFAE5TdDNfXzIyMF9fc2hhcmVkX3B0cl9wb2ludGVySVBONmxhc3ppcDdmb3JtYXRzMjFkeW5hbWljX2RlY29tcHJlc3NvcjFJTlMxXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzJfMTlyZWNvcmRfZGVjb21wcmVzc29ySUpOUzJfNWZpZWxkSU5TMl8zbGFzN3BvaW50MTBFTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0ZfRUVFRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTS19FRU5TXzlhbGxvY2F0b3JJU0tfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjFkeW5hbWljX2RlY29tcHJlc3NvcjFJTlMxXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzJfMTlyZWNvcmRfZGVjb21wcmVzc29ySUpOUzJfNWZpZWxkSU5TMl8zbGFzN3BvaW50MTBFTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0ZfRUVFRUVFRUVFRUUATjZsYXN6aXA3Zm9ybWF0czIxZHluYW1pY19kZWNvbXByZXNzb3IxSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOU18yaW8xOF9faWZzdHJlYW1fd3JhcHBlcklOU183c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMwXzE5cmVjb3JkX2RlY29tcHJlc3NvcklKTlMwXzVmaWVsZElOUzBfM2xhczdwb2ludDEwRU5TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNEX0VFRUVOU0JfSU5TQ183Z3BzdGltZUVOU0VfSVNIX0VFRUVFRUVFRQBOU3QzX18yMjBfX3NoYXJlZF9wdHJfcG9pbnRlcklQTjZsYXN6aXA3Zm9ybWF0czIxZHluYW1pY19kZWNvbXByZXNzb3IxSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzE5cmVjb3JkX2RlY29tcHJlc3NvcklKTlMyXzVmaWVsZElOUzJfM2xhczdwb2ludDEwRU5TMl8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNGX0VFRUVOU0RfSU5TRV83Z3BzdGltZUVOU0dfSVNKX0VFRUVFRUVFRU5TXzE0ZGVmYXVsdF9kZWxldGVJU05fRUVOU185YWxsb2NhdG9ySVNOX0VFRUUATlN0M19fMjE0ZGVmYXVsdF9kZWxldGVJTjZsYXN6aXA3Zm9ybWF0czIxZHluYW1pY19kZWNvbXByZXNzb3IxSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzE5cmVjb3JkX2RlY29tcHJlc3NvcklKTlMyXzVmaWVsZElOUzJfM2xhczdwb2ludDEwRU5TMl8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNGX0VFRUVOU0RfSU5TRV83Z3BzdGltZUVOU0dfSVNKX0VFRUVFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyMWR5bmFtaWNfZGVjb21wcmVzc29yMUlOU184ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlNfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlNfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRUVFRU5TMF8xOXJlY29yZF9kZWNvbXByZXNzb3JJSk5TMF81ZmllbGRJTlMwXzNsYXM3cG9pbnQxMEVOUzBfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTRF9FRUVFTlNCX0lOU0NfM3JnYkVOU0VfSVNIX0VFRUVFRUVFRQBOU3QzX18yMjBfX3NoYXJlZF9wdHJfcG9pbnRlcklQTjZsYXN6aXA3Zm9ybWF0czIxZHluYW1pY19kZWNvbXByZXNzb3IxSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzE5cmVjb3JkX2RlY29tcHJlc3NvcklKTlMyXzVmaWVsZElOUzJfM2xhczdwb2ludDEwRU5TMl8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNGX0VFRUVOU0RfSU5TRV8zcmdiRU5TR19JU0pfRUVFRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTTl9FRU5TXzlhbGxvY2F0b3JJU05fRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjFkeW5hbWljX2RlY29tcHJlc3NvcjFJTlMxXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzJfMTlyZWNvcmRfZGVjb21wcmVzc29ySUpOUzJfNWZpZWxkSU5TMl8zbGFzN3BvaW50MTBFTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0ZfRUVFRU5TRF9JTlNFXzNyZ2JFTlNHX0lTSl9FRUVFRUVFRUVFRQBONmxhc3ppcDdmb3JtYXRzMjFkeW5hbWljX2RlY29tcHJlc3NvcjFJTlNfOGRlY29kZXJzMTBhcml0aG1ldGljSU5TXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzBfMTlyZWNvcmRfZGVjb21wcmVzc29ySUpOUzBfNWZpZWxkSU5TMF8zbGFzN3BvaW50MTBFTlMwXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0RfRUVFRU5TQl9JTlNDXzdncHN0aW1lRU5TRV9JU0hfRUVFRU5TQl9JTlNDXzNyZ2JFTlNFX0lTS19FRUVFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyMWR5bmFtaWNfZGVjb21wcmVzc29yMUlOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSU5TMV8yaW8xOF9faWZzdHJlYW1fd3JhcHBlcklOUzFfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRUVFRU5TMl8xOXJlY29yZF9kZWNvbXByZXNzb3JJSk5TMl81ZmllbGRJTlMyXzNsYXM3cG9pbnQxMEVOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTRl9FRUVFTlNEX0lOU0VfN2dwc3RpbWVFTlNHX0lTSl9FRUVFTlNEX0lOU0VfM3JnYkVOU0dfSVNNX0VFRUVFRUVFRU5TXzE0ZGVmYXVsdF9kZWxldGVJU1FfRUVOU185YWxsb2NhdG9ySVNRX0VFRUUATlN0M19fMjE0ZGVmYXVsdF9kZWxldGVJTjZsYXN6aXA3Zm9ybWF0czIxZHluYW1pY19kZWNvbXByZXNzb3IxSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzE5cmVjb3JkX2RlY29tcHJlc3NvcklKTlMyXzVmaWVsZElOUzJfM2xhczdwb2ludDEwRU5TMl8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNGX0VFRUVOU0RfSU5TRV83Z3BzdGltZUVOU0dfSVNKX0VFRUVOU0RfSU5TRV8zcmdiRU5TR19JU01fRUVFRUVFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUDEwYnVmX3N0cmVhbU5TXzE0ZGVmYXVsdF9kZWxldGVJUzFfRUVOU185YWxsb2NhdG9ySVMxX0VFRUUATlN0M19fMjE0ZGVmYXVsdF9kZWxldGVJMTBidWZfc3RyZWFtRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTNV9FRU5TXzlhbGxvY2F0b3JJUzVfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZmllbGRfZGVjb21wcmVzc29ySU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRUVFAE5TdDNfXzIyMF9fc2hhcmVkX3B0cl9wb2ludGVySVBONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2ZpZWxkX2RlY29tcHJlc3NvcklOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFRUVOU18xNGRlZmF1bHRfZGVsZXRlSVM4X0VFTlNfOWFsbG9jYXRvcklTOF9FRUVFAE5TdDNfXzIxNGRlZmF1bHRfZGVsZXRlSU42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZmllbGRfZGVjb21wcmVzc29ySU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJMTBidWZfc3RyZWFtRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRU5TMF81ZmllbGRJaU5TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSWlFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJMTBidWZfc3RyZWFtRUVOUzJfNWZpZWxkSWlOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElpRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTQ19FRU5TXzlhbGxvY2F0b3JJU0NfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFTlMyXzVmaWVsZElpTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJaUVFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRU5TMF81ZmllbGRJak5TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSWpFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJMTBidWZfc3RyZWFtRUVOUzJfNWZpZWxkSWpOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElqRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTQ19FRU5TXzlhbGxvY2F0b3JJU0NfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFTlMyXzVmaWVsZElqTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJakVFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRU5TMF81ZmllbGRJYU5TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSWFFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJMTBidWZfc3RyZWFtRUVOUzJfNWZpZWxkSWFOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElhRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTQ19FRU5TXzlhbGxvY2F0b3JJU0NfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFTlMyXzVmaWVsZElhTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJYUVFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRU5TMF81ZmllbGRJc05TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSXNFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJMTBidWZfc3RyZWFtRUVOUzJfNWZpZWxkSXNOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElzRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTQ19FRU5TXzlhbGxvY2F0b3JJU0NfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFTlMyXzVmaWVsZElzTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJc0VFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRU5TMF81ZmllbGRJaE5TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSWhFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJMTBidWZfc3RyZWFtRUVOUzJfNWZpZWxkSWhOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZEloRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTQ19FRU5TXzlhbGxvY2F0b3JJU0NfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFTlMyXzVmaWVsZEloTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJaEVFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRU5TMF81ZmllbGRJdE5TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSXRFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJMTBidWZfc3RyZWFtRUVOUzJfNWZpZWxkSXROUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZEl0RUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTQ19FRU5TXzlhbGxvY2F0b3JJU0NfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFTlMyXzVmaWVsZEl0TlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJdEVFRUVFRUVFADZMQVNaaXAAUDZMQVNaaXAAUEs2TEFTWmlwAGlpAHYAdmkAdmlpaWkAdmlpaQBpaWkAMTNEeW5hbWljTEFTWmlwAFAxM0R5bmFtaWNMQVNaaXAAUEsxM0R5bmFtaWNMQVNaaXAAdm9pZABib29sAGNoYXIAc2lnbmVkIGNoYXIAdW5zaWduZWQgY2hhcgBzaG9ydAB1bnNpZ25lZCBzaG9ydABpbnQAdW5zaWduZWQgaW50AGxvbmcAdW5zaWduZWQgbG9uZwBmbG9hdABkb3VibGUAc3RkOjpzdHJpbmcAc3RkOjpiYXNpY19zdHJpbmc8dW5zaWduZWQgY2hhcj4Ac3RkOjp3c3RyaW5nAHN0ZDo6dTE2c3RyaW5nAHN0ZDo6dTMyc3RyaW5nAGVtc2NyaXB0ZW46OnZhbABlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxjaGFyPgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxzaWduZWQgY2hhcj4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8dW5zaWduZWQgY2hhcj4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8c2hvcnQ+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PHVuc2lnbmVkIHNob3J0PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxpbnQ+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PHVuc2lnbmVkIGludD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8bG9uZz4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8dW5zaWduZWQgbG9uZz4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8aW50OF90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1aW50OF90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxpbnQxNl90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1aW50MTZfdD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8aW50MzJfdD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8dWludDMyX3Q+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PGZsb2F0PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxkb3VibGU+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PGxvbmcgZG91YmxlPgBOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0llRUUATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJZEVFAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SWZFRQBOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0ltRUUATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJbEVFAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SWpFRQBOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0lpRUUATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJdEVFAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SXNFRQBOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0loRUUATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJYUVFAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SWNFRQBOMTBlbXNjcmlwdGVuM3ZhbEUATlN0M19fMjEyYmFzaWNfc3RyaW5nSURpTlNfMTFjaGFyX3RyYWl0c0lEaUVFTlNfOWFsbG9jYXRvcklEaUVFRUUATlN0M19fMjIxX19iYXNpY19zdHJpbmdfY29tbW9uSUxiMUVFRQBOU3QzX18yMTJiYXNpY19zdHJpbmdJRHNOU18xMWNoYXJfdHJhaXRzSURzRUVOU185YWxsb2NhdG9ySURzRUVFRQBOU3QzX18yMTJiYXNpY19zdHJpbmdJd05TXzExY2hhcl90cmFpdHNJd0VFTlNfOWFsbG9jYXRvckl3RUVFRQBOU3QzX18yMTJiYXNpY19zdHJpbmdJaE5TXzExY2hhcl90cmFpdHNJaEVFTlNfOWFsbG9jYXRvckloRUVFRQBOU3QzX18yMTJiYXNpY19zdHJpbmdJY05TXzExY2hhcl90cmFpdHNJY0VFTlNfOWFsbG9jYXRvckljRUVFRQAtKyAgIDBYMHgAKG51bGwpAC0wWCswWCAwWC0weCsweCAweABpbmYASU5GAG5hbgBOQU4ALgB0ZXJtaW5hdGluZyB3aXRoICVzIGV4Y2VwdGlvbiBvZiB0eXBlICVzOiAlcwB0ZXJtaW5hdGluZyB3aXRoICVzIGV4Y2VwdGlvbiBvZiB0eXBlICVzAHRlcm1pbmF0aW5nIHdpdGggJXMgZm9yZWlnbiBleGNlcHRpb24AdGVybWluYXRpbmcAdW5jYXVnaHQAU3Q5ZXhjZXB0aW9uAE4xMF9fY3h4YWJpdjExNl9fc2hpbV90eXBlX2luZm9FAFN0OXR5cGVfaW5mbwBOMTBfX2N4eGFiaXYxMjBfX3NpX2NsYXNzX3R5cGVfaW5mb0UATjEwX19jeHhhYml2MTE3X19jbGFzc190eXBlX2luZm9FAHRlcm1pbmF0ZV9oYW5kbGVyIHVuZXhwZWN0ZWRseSByZXR1cm5lZABzdGQ6OmJhZF9hbGxvYwBTdDliYWRfYWxsb2MAU3QxMWxvZ2ljX2Vycm9yAFN0MTNydW50aW1lX2Vycm9yAFN0MTJsZW5ndGhfZXJyb3IAU3QxMm91dF9vZl9yYW5nZQBOMTBfX2N4eGFiaXYxMTdfX3BiYXNlX3R5cGVfaW5mb0UATjEwX19jeHhhYml2MTE5X19wb2ludGVyX3R5cGVfaW5mb0UATjEwX19jeHhhYml2MTIwX19mdW5jdGlvbl90eXBlX2luZm9FAE4xMF9fY3h4YWJpdjEyOV9fcG9pbnRlcl90b19tZW1iZXJfdHlwZV9pbmZvRQBQdXJlIHZpcnR1YWwgZnVuY3Rpb24gY2FsbGVkIQBOMTBfX2N4eGFiaXYxMjNfX2Z1bmRhbWVudGFsX3R5cGVfaW5mb0UAdgBEbgBiAGMAaABhAHMAdABpAGoAbABtAGYAZABOMTBfX2N4eGFiaXYxMjFfX3ZtaV9jbGFzc190eXBlX2luZm9FAF9fY3hhX2d1YXJkX2FjcXVpcmUgZGV0ZWN0ZWQgcmVjdXJzaXZlIGluaXRpYWxpemF0aW9uAHN0ZDo6YmFkX2Z1bmN0aW9uX2NhbGwATlN0M19fMjE3YmFkX2Z1bmN0aW9uX2NhbGxFAE5TdDNfXzIxNF9fc2hhcmVkX2NvdW50RQBOU3QzX18yMTlfX3NoYXJlZF93ZWFrX2NvdW50RQBtdXRleCBsb2NrIGZhaWxlZABiYXNpY19zdHJpbmcAdW5zcGVjaWZpZWQgZ2VuZXJpY19jYXRlZ29yeSBlcnJvcgBVbmtub3duIGVycm9yICVkAGdlbmVyaWMATlN0M19fMjI0X19nZW5lcmljX2Vycm9yX2NhdGVnb3J5RQBOU3QzX18yMTJfX2RvX21lc3NhZ2VFAE5TdDNfXzIxNGVycm9yX2NhdGVnb3J5RQB1bnNwZWNpZmllZCBzeXN0ZW1fY2F0ZWdvcnkgZXJyb3IAc3lzdGVtAE5TdDNfXzIyM19fc3lzdGVtX2Vycm9yX2NhdGVnb3J5RQBOU3QzX18yMTJzeXN0ZW1fZXJyb3JFADogAHZlY3Rvcg==";var K={},$=[];function tt(t){t&&K[t].refcount++}function et(t){if(!t||K[t])return t;for(var e in K)for(var r=+e,n=K[r].adjusted,i=n.length,a=0;a=lt&&e<=ct?"_"+t:t}function ht(t,e){return t=ut(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function ft(t,e){var r=ht(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var dt=void 0;function pt(t){throw new dt(t)}var mt=void 0;function At(t){throw new mt(t)}function gt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&At("Mismatched type converter count");for(var i=0;i>2])}function Ut(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=Ut(t,e,r.baseClass);return null===n?null:r.downcast(n)}var Ot={};function Ft(t,e){return e.ptrType&&e.ptr||At("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&At("Both smartPtrType and smartPtr must be specified"),e.count={value:1},_t(Object.create(t,{$$:{value:e}}))}function Nt(t,e,r,n,i,a,o,s,l,c,u){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=a,this.sharingPolicy=o,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=c,this.rawDestructor=u,i||void 0!==e.baseClass?this.toWireType=Lt:n?(this.toWireType=kt,this.destructorFunction=null):(this.toWireType=Pt,this.destructorFunction=null)}function zt(t,e){t=it(t);var r=function(r){for(var n=[],i=1;i>2)+n]);return r}function jt(t){for(;t.length;){var e=t.pop();t.pop()(e)}}var Wt=[],Ht=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Xt(t){t>4&&0==--Ht[t].refcount&&(Ht[t]=void 0,Wt.push(t))}function qt(t){switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=Wt.length?Wt.pop():Ht.length;return Ht[e]={refcount:1,value:t},e}}function Yt(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function Jt(t,e){switch(e){case 2:return function(t){return this.fromWireType(I[t>>2])};case 3:return function(t){return this.fromWireType(R[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function Kt(t,e,r){switch(e){case 0:return r?function(t){return _[t]}:function(t){return E[t]};case 1:return r?function(t){return M[t>>1]}:function(t){return S[t>>1]};case 2:return r?function(t){return C[t>>2]}:function(t){return T[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}!function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);nt=t}(),dt=n.BindingError=ft(Error,"BindingError"),mt=n.InternalError=ft(Error,"InternalError"),Ct.prototype.isAliasOf=function(t){if(!(this instanceof Ct))return!1;if(!(t instanceof Ct))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,i=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return e===n&&r===i},Ct.prototype.clone=function(){if(this.$$.ptr||yt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=_t(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},Ct.prototype.delete=function(){this.$$.ptr||yt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&pt("Object already scheduled for deletion"),xt(this),wt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},Ct.prototype.isDeleted=function(){return!this.$$.ptr},Ct.prototype.deleteLater=function(){return this.$$.ptr||yt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&pt("Object already scheduled for deletion"),Mt.push(this),1===Mt.length&&Et&&Et(St),this.$$.deleteScheduled=!0,this},Nt.prototype.getPointee=function(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},Nt.prototype.destructor=function(t){this.rawDestructor&&this.rawDestructor(t)},Nt.prototype.argPackAdvance=8,Nt.prototype.readValueFromPointer=Dt,Nt.prototype.deleteObject=function(t){null!==t&&t.delete()},Nt.prototype.fromWireType=function(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=function(t,e){return e=function(t,e){for(void 0===e&&pt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Ot[e]}(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function i(){return this.isSmartPointer?Ft(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ft(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var a,o=this.registeredClass.getActualType(e),s=Tt[o];if(!s)return i.call(this);a=this.isConst?s.constPointerType:s.pointerType;var l=Ut(e,this.registeredClass,a.registeredClass);return null===l?i.call(this):this.isSmartPointer?Ft(a.registeredClass.instancePrototype,{ptrType:a,ptr:l,smartPtrType:this,smartPtr:t}):Ft(a.registeredClass.instancePrototype,{ptrType:a,ptr:l})},n.getInheritedInstanceCount=function(){return Object.keys(Ot).length},n.getLiveInheritedInstances=function(){var t=[];for(var e in Ot)Ot.hasOwnProperty(e)&&t.push(Ot[e]);return t},n.flushPendingDeletes=St,n.setDelayFunction=function(t){Et=t,Mt.length&&Et&&Et(St)},Gt=n.UnboundTypeError=ft(Error,"UnboundTypeError"),n.count_emval_handles=function(){for(var t=0,e=5;e255&&($t&&b(!1,"Character code "+n+" ("+String.fromCharCode(n)+") at offset "+r+" not in 0x00-0xFF."),n&=255),e.push(String.fromCharCode(n))}return e.join("")}var ee="function"==typeof atob?atob:function(t){var e,r,n,i,a,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l="",c=0;t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{e=s.indexOf(t.charAt(c++))<<2|(i=s.indexOf(t.charAt(c++)))>>4,r=(15&i)<<4|(a=s.indexOf(t.charAt(c++)))>>2,n=(3&a)<<6|(o=s.indexOf(t.charAt(c++))),l+=String.fromCharCode(e),64!==a&&(l+=String.fromCharCode(r)),64!==o&&(l+=String.fromCharCode(n))}while(c>a])},destructorFunction:null})},l:function(t,e,r,i,a,o,s,l,c,u,h,f,d){h=it(h),o=zt(a,o),l&&(l=zt(s,l)),u&&(u=zt(c,u)),d=zt(f,d);var p=ut(h);!function(t,e,r){n.hasOwnProperty(t)?(pt("Cannot register public name '"+t+"' twice"),It(n,t,t),n.hasOwnProperty(r)&&pt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),n[t].overloadTable[void 0]=e):n[t]=e}(p,(function(){Vt("Cannot construct "+h+" due to unbound types",[i])})),gt([t,e,r],i?[i]:[],(function(e){var r,a;e=e[0],a=i?(r=e.registeredClass).instancePrototype:Ct.prototype;var s=ht(p,(function(){if(Object.getPrototypeOf(this)!==c)throw new dt("Use 'new' to construct "+h);if(void 0===f.constructor_body)throw new dt(h+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new dt("Tried to invoke ctor of "+h+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),c=Object.create(a,{constructor:{value:s}});s.prototype=c;var f=new Rt(h,s,c,d,r,o,l,u),m=new Nt(h,f,!0,!1,!1),A=new Nt(h+"*",f,!1,!1,!1),g=new Nt(h+" const*",f,!1,!0,!1);return Tt[t]={pointerType:A,constPointerType:g},function(t,e,r){n.hasOwnProperty(t)||At("Replacing nonexistant public symbol"),n[t].overloadTable,n[t]=e,n[t].argCount=r}(p,s),[m,A,g]}))},m:function(t,e,r,n,i,a){b(e>0);var o=Qt(e,r);i=zt(n,i);var s=[a],l=[];gt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new dt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=function(){Vt("Cannot construct "+t.name+" due to unbound types",o)},gt([],o,(function(n){return t.registeredClass.constructor_body[e-1]=function(){arguments.length!==e-1&&pt(r+" called with "+arguments.length+" arguments, expected "+(e-1)),l.length=0,s.length=e;for(var t=1;t0?", ":"")+h),f+=(c?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",s)f+="runDestructors(destructors);\n";else for(l=o?1:2;l>>s}}var l=-1!=e.indexOf("unsigned");vt(t,{name:e,fromWireType:o,toWireType:function(t,r){if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError('Cannot convert "'+Yt(r)+'" to '+this.name);if(ri)throw new TypeError('Passing a number "'+Yt(r)+'" from JS side to C/C++ side to an argument of type "'+e+'", which is outside the valid range ['+n+", "+i+"]!");return l?r>>>0:0|r},argPackAdvance:8,readValueFromPointer:Kt(e,a,0!==n),destructorFunction:null})},r:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function i(t){var e=T,r=e[t>>=2],i=e[t+1];return new n(w,i,r)}vt(t,{name:r=it(r),fromWireType:i,argPackAdvance:8,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},s:function(t,e){var r="std::string"===(e=it(e));vt(t,{name:e,fromWireType:function(t){var e,n,i,a=T[t>>2];if(r)for(var o=t+4,s=0;s<=a;++s){var l=t+4+s;if(0==E[l]||s==a){var c=(i=l-o,(n=o)?function(t,e,r){for(var n=e+r,i=e;t[i]&&!(i>=n);)++i;if(i-e>16&&t.subarray&&x)return x.decode(t.subarray(e,i));for(var a="";e>10,56320|1023&c)}}else a+=String.fromCharCode((31&o)<<6|s)}else a+=String.fromCharCode(o)}return a}(E,n,i):"");void 0===e?e=c:(e+=String.fromCharCode(0),e+=c),o=l+1}}else{var u=new Array(a);for(s=0;s=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&t.charCodeAt(++r)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}(e)}:function(){return e.length};var a=n(),o=ue(4+a+1);if(T[o>>2]=a,r&&i)(function(t,e,r,n){if(!(n>0))return 0;for(var i=r,a=r+n-1,o=0;o=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++o)),s<=127){if(r>=a)break;e[r++]=s}else if(s<=2047){if(r+1>=a)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=a)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=a)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}e[r]=0})(e,E,o+4,a+1);else if(i)for(var s=0;s255&&(ce(o),pt("String has UTF-16 code units that do not fit in 8 bits")),E[o+4+s]=l}else for(s=0;s>2],o=a(),l=t+4,c=0;c<=i;++c){var u=t+4+c*e;if(0==o[u>>s]||c==i){var h=n(l,u-l);void 0===r?r=h:(r+=String.fromCharCode(0),r+=h),l=u+e}}return ce(t),r},toWireType:function(t,n){"string"!=typeof n&&pt("Cannot pass non-string to C++ string type "+r);var a=o(n),l=ue(4+a+e);return T[l>>2]=a>>s,i(n,l+4,a+e),null!==t&&t.push(ce,l),l},argPackAdvance:8,readValueFromPointer:Dt,destructorFunction:function(t){ce(t)}})},u:function(t,e){vt(t,{isVoid:!0,name:e=it(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},v:Xt,w:qt,x:function(){X()},y:Yt,z:function(){return E.length}},oe=function(t,e,r){"use asm";var n=new t.Int8Array(r),i=new t.Int16Array(r),a=new t.Int32Array(r),o=new t.Uint8Array(r),s=new t.Uint16Array(r),l=new t.Float32Array(r),c=new t.Float64Array(r),u=e.D|0,h=0,f=0,d=0,p=0,m=0,A=0,g=0,v=0.0,y=t.Math.imul,b=t.Math.clz32,x=e.a,w=e.b,_=e.c,E=e.d,M=e.e,S=e.f,C=e.g,T=e.h,I=e.i,R=e.j,B=e.k,k=e.l,L=e.m,P=e.n,D=e.o,U=e.p,O=e.q,F=e.r,N=e.s,z=e.t,G=e.u,Z=e.v,V=e.w,Q=e.x,j=e.y,W=e.z,H=e.A,X=e.B,q=e.C,Y=22384,J=5265264,K=0.0;function $(){Yh();Jh()}function tt(){et(0);return}function et(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0,f=0;t=Y;Y=Y+16|0;e=t+8|0;r=t;du();f=mu()|0;o=Au()|0;i=vu()|0;s=yu()|0;l=bu()|0;c=xu()|0;u=Cu()|0;h=Tu()|0;n=Tu()|0;k(i|0,s|0,l|0,c|0,u|0,9,h|0,f|0,n|0,o|0,6204,Iu()|0,138);Bu(1);a[r>>2]=5;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];Fu(6211,e);a[r>>2]=3;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];Xu(6216,e);a[r>>2]=10;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];rh(6225,e);uh();o=fh()|0;n=dh()|0;f=mh()|0;h=Ah()|0;u=gh()|0;c=xu()|0;l=Cu()|0;s=Tu()|0;i=Tu()|0;k(f|0,h|0,u|0,c|0,l|0,11,s|0,o|0,i|0,n|0,6234,Iu()|0,139);Eh(2);a[r>>2]=6;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];Bh(6211,e);a[r>>2]=4;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];Fh(6248,e);a[r>>2]=5;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];Fh(6265,e);a[r>>2]=6;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];Fh(6280,e);a[r>>2]=7;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];Qh(6216,e);Y=t;return}function rt(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0,l=0;n=Y;Y=Y+32|0;s=n+16|0;i=n+8|0;l=n;o=qm(20)|0;ut(o,e,r);a[l>>2]=0;a[s>>2]=a[l>>2];ft(i,o,s);e=a[i>>2]|0;a[i>>2]=a[t>>2];a[t>>2]=e;e=i+4|0;r=t+4|0;o=a[e>>2]|0;a[e>>2]=a[r>>2];a[r>>2]=o;dt(i);r=qm(352)|0;ht(r,a[t>>2]|0);o=t+8|0;a[l>>2]=0;a[s>>2]=a[l>>2];wt(i,r,s);r=a[i>>2]|0;a[i>>2]=a[o>>2];a[o>>2]=r;o=i+4|0;r=t+12|0;e=a[o>>2]|0;a[o>>2]=a[r>>2];a[r>>2]=e;_t(i);Y=n;return}function nt(t,e){t=t|0;e=e|0;Xr(a[t+8>>2]|0,e);return}function it(t){t=t|0;t=(Ps(a[t+8>>2]|0)|0)+107|0;return o[t>>0]|o[t+1>>0]<<8|o[t+2>>0]<<16|o[t+3>>0]<<24|0}function at(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0,l=0;n=Y;Y=Y+32|0;o=n+16|0;i=n+8|0;s=n;l=qm(12)|0;Ds(l,e,r);a[s>>2]=0;a[o>>2]=a[s>>2];Ns(i,l,o);l=a[i>>2]|0;a[i>>2]=a[t>>2];a[t>>2]=l;l=i+4|0;r=t+4|0;e=a[l>>2]|0;a[l>>2]=a[r>>2];a[r>>2]=e;zs(i);r=t+8|0;e=qm(12)|0;Us(e,a[t>>2]|0);a[s>>2]=0;a[o>>2]=a[s>>2];Ws(i,e,o);e=a[i>>2]|0;a[i>>2]=a[r>>2];a[r>>2]=e;e=i+4|0;s=t+12|0;l=a[e>>2]|0;a[e>>2]=a[s>>2];a[s>>2]=l;Hs(i);Os(i,a[r>>2]|0);r=t+16|0;s=a[i>>2]|0;l=i+4|0;e=a[l>>2]|0;a[i>>2]=0;a[l>>2]=0;a[o>>2]=a[r>>2];a[r>>2]=s;r=t+20|0;a[o+4>>2]=a[r>>2];a[r>>2]=e;Fs(o);Fs(i);Y=n;return}function ot(t,e){t=t|0;e=e|0;var r=0;t=t+16|0;r=a[t>>2]|0;t:do{if(r|0)switch(e|0){case 4:{fl(r);break t}case 8:{dl(r);dl(a[t>>2]|0);break t}default:break t}}while(0);return}function st(t,e){t=t|0;e=e|0;var r=0;r=t+16|0;t=a[r>>2]|0;t:do{if(t|0){switch(e|0){case 1:{$l(t);break t}case 2:{tc(t);break t}case 8:{fl(t);t=a[r>>2]|0;break}case 4:break;default:break t}fl(t)}}while(0);return}function lt(t,e){t=t|0;e=e|0;var r=0;r=t+16|0;t=a[r>>2]|0;t:do{if(t|0){switch(e|0){case 1:{Dc(t);break t}case 2:{Uc(t);break t}case 8:{dl(t);t=a[r>>2]|0;break}case 4:break;default:break t}dl(t)}}while(0);return}function ct(t,e){t=t|0;e=e|0;t=a[t+16>>2]|0;if(t|0)Gg[a[a[t>>2]>>2]&63](t,e)|0;return}function ut(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;a[t+4>>2]=r;a[t+8>>2]=0;n[t+12>>0]=0;n[t+13>>0]=0;a[t+16>>2]=0;return}function ht(t,e){t=t|0;e=e|0;a[t>>2]=e;Ft(t+4|0,e);Nt(t+247|0);a[t+288>>2]=0;a[t+292>>2]=0;a[t+296>>2]=0;zt(t+300|0);e=t+312|0;a[e>>2]=0;a[e+4>>2]=0;a[e+8>>2]=0;a[e+12>>2]=0;Gt(t+328|0);Zt(t);return}function ft(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4296;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;pt(t,n);Y=r;return}function dt(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){Qg[a[(a[t>>2]|0)+8>>2]&255](t);sA(t)}return}function pt(t,e){t=t|0;e=e|0;return}function mt(t){t=t|0;M(t|0)|0;rm()}function At(t){t=t|0;oA(t);tm(t);return}function gt(t){t=t|0;t=a[t+12>>2]|0;if(t|0)tm(t);return}function vt(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==6407?t+12|0:0)|0}function yt(t){t=t|0;bt(t,16);return}function bt(t,e){t=t|0;e=e|0;xt(t);return}function xt(t){t=t|0;tm(t);return}function wt(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4324;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Et(t,n);Y=r;return}function _t(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){Qg[a[(a[t>>2]|0)+8>>2]&255](t);sA(t)}return}function Et(t,e){t=t|0;e=e|0;return}function Mt(t){t=t|0;oA(t);tm(t);return}function St(t){t=t|0;t=a[t+12>>2]|0;if(t|0){It(t);tm(t)}return}function Ct(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==6605?t+12|0:0)|0}function Tt(t){t=t|0;bt(t,16);return}function It(t){t=t|0;Rt(t+320|0);Bt(t+312|0);kt(t+300|0);Ut(t+288|0);Lt(t+247|0);Pt(t+4|0);return}function Rt(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){Qg[a[(a[t>>2]|0)+8>>2]&255](t);sA(t)}return}function Bt(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){Qg[a[(a[t>>2]|0)+8>>2]&255](t);sA(t)}return}function kt(t){t=t|0;Dt(t);return}function Lt(t){t=t|0;t=t+34|0;t=o[t>>0]|o[t+1>>0]<<8|o[t+2>>0]<<16|o[t+3>>0]<<24;if(t|0)Jm(t);return}function Pt(t){t=t|0;Ot(a[t+12>>2]|0);return}function Dt(t){t=t|0;var e=0,r=0;e=a[t>>2]|0;r=e;if(e|0){a[t+4>>2]=r;bt(e,(a[t+8>>2]|0)-r|0)}return}function Ut(t){t=t|0;var e=0,r=0;e=a[t>>2]|0;r=e;if(e|0){a[t+4>>2]=r;bt(e,(a[t+8>>2]|0)-r|0)}return}function Ot(t){t=t|0;qA(a[t+-4>>2]|0);return}function Ft(t,e){t=t|0;e=e|0;a[t>>2]=e;a[t+4>>2]=0;a[t+8>>2]=0;a[t+12>>2]=Vt(1048576)|0;return}function Nt(t){t=t|0;var e=0;e=t+32|0;n[e>>0]=0;n[e+1>>0]=0;t=t+34|0;n[t>>0]=0;n[t+1>>0]=0;n[t+2>>0]=0;n[t+3>>0]=0;return}function zt(t){t=t|0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;return}function Gt(t){t=t|0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;a[t+12>>2]=0;t=t+16|0;a[t>>2]=-1;a[t+4>>2]=-1;return}function Zt(t){t=t|0;var e=0,r=0,i=0,o=0,s=0,l=0;l=Y;Y=Y+64|0;o=l+32|0;r=l+56|0;e=l+16|0;s=l;Qt(a[t>>2]|0,r,4);ne(o,r,r+4|0);r=re(6693)|0;i=n[o+11>>0]|0;if((r|0)==((i<<24>>24<0?a[o+4>>2]|0:i&255)|0)){i=(EA(o,0,-1,6693,r)|0)==0;yA(o);if(i){r=a[t>>2]|0;a[e>>2]=0;a[e+4>>2]=0;a[e+8>>2]=0;a[e+12>>2]=0;a[o>>2]=a[e>>2];a[o+4>>2]=a[e+4>>2];a[o+8>>2]=a[e+8>>2];a[o+12>>2]=a[e+12>>2];Wt(r,o);r=t+20|0;Qt(a[t>>2]|0,r,227);Ht(t,r);i=Xt()|0;e=a[i>>2]|0;i=a[i+4>>2]|0;if((e|0)!=(i|0))do{qt(o,e);Yt(o,r);Jt(o);e=e+24|0}while((e|0)!=(i|0));Kt(t);$t(t);te(a[t>>2]|0);i=a[t>>2]|0;e=(a[t+116>>2]|0)+8|0;r=s;a[r>>2]=0;a[r+4>>2]=0;r=s+8|0;a[r>>2]=e;a[r+4>>2]=0;a[o>>2]=a[s>>2];a[o+4>>2]=a[s+4>>2];a[o+8>>2]=a[s+8>>2];a[o+12>>2]=a[s+12>>2];Wt(i,o);ee(t+4|0);Y=l;return}}else yA(o);l=E(8)|0;jt(l);S(l|0,2592,8)}function Vt(t){t=t|0;var e=0;e=XA(t+68|0)|0;t=e+68&-64;a[t+-4>>2]=e;return t|0}function Qt(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,l=0,c=0,u=0;l=t+13|0;if(!(n[l>>0]|0)){s=t+4|0;i=a[s>>2]|0;c=t+8|0;o=a[c>>2]|0;u=i-o|0;r=(u|0)<(r|0)?u:r;if(r){fg(e|0,(a[t>>2]|0)+o|0,r|0)|0;o=a[c>>2]|0;i=a[s>>2]|0}u=o+r|0;a[c>>2]=u;a[t+16>>2]=r;if((u|0)>=(i|0))n[l>>0]=1}else n[t+12>>0]=1;return}function jt(t){t=t|0;pA(t,6791);a[t>>2]=4352;return}function Wt(t,e){t=t|0;e=e|0;var r=0,i=0,o=0;o=e+8|0;e=a[o>>2]|0;o=a[o+4>>2]|0;r=a[t+4>>2]|0;i=((r|0)<0)<<31>>31;if((o|0)<(i|0)|(o|0)==(i|0)&e>>>0>>0)a[t+8>>2]=e;else n[t+12>>0]=1;return}function Ht(t,e){t=t|0;e=e|0;var r=0.0,i=0.0,a=0,o=0.0,s=0,l=0.0,h=0,f=0.0,d=0,p=0.0;d=e+179|0;n[u>>0]=n[d>>0];n[u+1>>0]=n[d+1>>0];n[u+2>>0]=n[d+2>>0];n[u+3>>0]=n[d+3>>0];n[u+4>>0]=n[d+4>>0];n[u+5>>0]=n[d+5>>0];n[u+6>>0]=n[d+6>>0];n[u+7>>0]=n[d+7>>0];f=+c[u>>3];s=e+187|0;n[u>>0]=n[s>>0];n[u+1>>0]=n[s+1>>0];n[u+2>>0]=n[s+2>>0];n[u+3>>0]=n[s+3>>0];n[u+4>>0]=n[s+4>>0];n[u+5>>0]=n[s+5>>0];n[u+6>>0]=n[s+6>>0];n[u+7>>0]=n[s+7>>0];p=+c[u>>3];t=e+195|0;n[u>>0]=n[t>>0];n[u+1>>0]=n[t+1>>0];n[u+2>>0]=n[t+2>>0];n[u+3>>0]=n[t+3>>0];n[u+4>>0]=n[t+4>>0];n[u+5>>0]=n[t+5>>0];n[u+6>>0]=n[t+6>>0];n[u+7>>0]=n[t+7>>0];o=+c[u>>3];h=e+203|0;n[u>>0]=n[h>>0];n[u+1>>0]=n[h+1>>0];n[u+2>>0]=n[h+2>>0];n[u+3>>0]=n[h+3>>0];n[u+4>>0]=n[h+4>>0];n[u+5>>0]=n[h+5>>0];n[u+6>>0]=n[h+6>>0];n[u+7>>0]=n[h+7>>0];l=+c[u>>3];a=e+211|0;n[u>>0]=n[a>>0];n[u+1>>0]=n[a+1>>0];n[u+2>>0]=n[a+2>>0];n[u+3>>0]=n[a+3>>0];n[u+4>>0]=n[a+4>>0];n[u+5>>0]=n[a+5>>0];n[u+6>>0]=n[a+6>>0];n[u+7>>0]=n[a+7>>0];r=+c[u>>3];e=e+219|0;n[u>>0]=n[e>>0];n[u+1>>0]=n[e+1>>0];n[u+2>>0]=n[e+2>>0];n[u+3>>0]=n[e+3>>0];n[u+4>>0]=n[e+4>>0];n[u+5>>0]=n[e+5>>0];n[u+6>>0]=n[e+6>>0];n[u+7>>0]=n[e+7>>0];i=+c[u>>3];c[u>>3]=p;n[d>>0]=n[u>>0];n[d+1>>0]=n[u+1>>0];n[d+2>>0]=n[u+2>>0];n[d+3>>0]=n[u+3>>0];n[d+4>>0]=n[u+4>>0];n[d+5>>0]=n[u+5>>0];n[d+6>>0]=n[u+6>>0];n[d+7>>0]=n[u+7>>0];c[u>>3]=f;n[h>>0]=n[u>>0];n[h+1>>0]=n[u+1>>0];n[h+2>>0]=n[u+2>>0];n[h+3>>0]=n[u+3>>0];n[h+4>>0]=n[u+4>>0];n[h+5>>0]=n[u+5>>0];n[h+6>>0]=n[u+6>>0];n[h+7>>0]=n[u+7>>0];c[u>>3]=l;n[s>>0]=n[u>>0];n[s+1>>0]=n[u+1>>0];n[s+2>>0]=n[u+2>>0];n[s+3>>0]=n[u+3>>0];n[s+4>>0]=n[u+4>>0];n[s+5>>0]=n[u+5>>0];n[s+6>>0]=n[u+6>>0];n[s+7>>0]=n[u+7>>0];c[u>>3]=o;n[a>>0]=n[u>>0];n[a+1>>0]=n[u+1>>0];n[a+2>>0]=n[u+2>>0];n[a+3>>0]=n[u+3>>0];n[a+4>>0]=n[u+4>>0];n[a+5>>0]=n[u+5>>0];n[a+6>>0]=n[u+6>>0];n[a+7>>0]=n[u+7>>0];c[u>>3]=i;n[t>>0]=n[u>>0];n[t+1>>0]=n[u+1>>0];n[t+2>>0]=n[u+2>>0];n[t+3>>0]=n[u+3>>0];n[t+4>>0]=n[u+4>>0];n[t+5>>0]=n[u+5>>0];n[t+6>>0]=n[u+6>>0];n[t+7>>0]=n[u+7>>0];c[u>>3]=r;n[e>>0]=n[u>>0];n[e+1>>0]=n[u+1>>0];n[e+2>>0]=n[u+2>>0];n[e+3>>0]=n[u+3>>0];n[e+4>>0]=n[u+4>>0];n[e+5>>0]=n[u+5>>0];n[e+6>>0]=n[u+6>>0];n[e+7>>0]=n[u+7>>0];return}function Xt(){var t=0,e=0,r=0,i=0,o=0,s=0,l=0,c=0;o=Y;Y=Y+48|0;r=o+24|0;i=o;t=o+44|0;if((n[21440]|0)==0?Um(21440)|0:0){a[5374]=0;a[5375]=0;a[5376]=0;Qm(21440)}if((n[21448]|0)==0?Um(21448)|0:0)Qm(21448);if((a[5374]|0)==(a[5375]|0)){lA(21508);if((a[5374]|0)==(a[5375]|0)){n[r>>0]=n[t>>0]|0;oe(i,r);t=a[5375]|0;do{if(t>>>0>=(a[5376]|0)>>>0){t=((t-(a[5374]|0)|0)/24|0)+1|0;e=pe(21496)|0;if(e>>>0>>0)HA(21496);else{s=a[5374]|0;c=((a[5376]|0)-s|0)/24|0;l=c<<1;he(r,c>>>0>>1>>>0?l>>>0>>0?t:l:e,((a[5375]|0)-s|0)/24|0,21504);e=r+8|0;ce(a[e>>2]|0,i);a[e>>2]=(a[e>>2]|0)+24;fe(21496,r);de(r);break}}else{se(r,21496,1);c=r+4|0;ce(a[c>>2]|0,i);a[c>>2]=(a[c>>2]|0)+24;le(r)}}while(0);Jt(i)}cA(21508)}Y=o;return 21496}function qt(t,e){t=t|0;e=e|0;var r=0,n=0;r=e+16|0;n=a[r>>2]|0;do{if(n){if((e|0)==(n|0)){n=ue(t)|0;a[t+16>>2]=n;r=a[r>>2]|0;jg[a[(a[r>>2]|0)+12>>2]&15](r,n);break}else{a[t+16>>2]=Ng[a[(a[n>>2]|0)+8>>2]&15](n)|0;break}}else a[t+16>>2]=0}while(0);return}function Yt(t,e){t=t|0;e=e|0;t=a[t+16>>2]|0;if(!t){e=E(4)|0;a[e>>2]=0;Re(e);S(e|0,4168,131)}else{jg[a[(a[t>>2]|0)+24>>2]&15](t,e);return}}function Jt(t){t=t|0;var e=0;e=a[t+16>>2]|0;if((t|0)!=(e|0)){if(e|0)Qg[a[(a[e>>2]|0)+20>>2]&255](e)}else Qg[a[(a[e>>2]|0)+16>>2]&255](e);return}function Kt(t){t=t|0;var e=0,r=0,i=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0,A=0;A=Y;Y=Y+96|0;l=A+16|0;p=A;h=A+72|0;c=a[t>>2]|0;f=s[t+114>>1]|0;d=p;a[d>>2]=0;a[d+4>>2]=0;d=p+8|0;a[d>>2]=f;a[d+4>>2]=0;a[l>>2]=a[p>>2];a[l+4>>2]=a[p+4>>2];a[l+8>>2]=a[p+8>>2];a[l+12>>2]=a[p+12>>2];Wt(c,l);c=t+120|0;t:do{if(a[c>>2]|0){u=l+2|0;f=l+16|0;d=l+20|0;p=l+18|0;r=0;while(1){if(!(Be(a[t>>2]|0)|0))break t;if(ke(a[t>>2]|0)|0)break t;Qt(a[t>>2]|0,l,54);e=7277;i=u;while(1){if((n[i>>0]|0)!=(n[e>>0]|0))break;i=i+1|0;if((i|0)==(f|0)){m=8;break}else e=e+1|0}if((m|0)==8?(m=0,(o[p>>0]|o[p+1>>0]<<8)<<16>>16==22204):0)break;Pe(a[t>>2]|0,(o[d>>0]|o[d+1>>0]<<8)&65535,0,1);r=r+1|0;if(r>>>0>=(a[c>>2]|0)>>>0)break t}p=(o[d>>0]|o[d+1>>0]<<8)&65535;m=Ym(p)|0;Qt(a[t>>2]|0,m,p);Le(t,m);tm(m);m=t+125|0;Ue(h,t+247|0,(o[m>>0]|o[m+1>>0]<<8)&65535);Oe(t+300|0,h)|0;kt(h);Y=A;return}}while(0);A=E(8)|0;De(A);S(A|0,2672,8)}function $t(t){t=t|0;var e=0,r=0,n=0,i=0,s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0;d=Y;Y=Y+176|0;i=d+40|0;s=d+24|0;e=d+16|0;n=d;u=d+152|0;h=d+136|0;f=d+56|0;c=a[t>>2]|0;l=t+116|0;p=a[l>>2]|0;r=s;a[r>>2]=0;a[r+4>>2]=0;r=s+8|0;a[r>>2]=p;a[r+4>>2]=0;a[i>>2]=a[s>>2];a[i+4>>2]=a[s+4>>2];a[i+8>>2]=a[s+8>>2];a[i+12>>2]=a[s+12>>2];Wt(c,i);c=e;a[c>>2]=0;a[c+4>>2]=0;Qt(a[t>>2]|0,e,8);if(!(Be(a[t>>2]|0)|0)){p=E(8)|0;Ke(p);S(p|0,2704,8)}r=e;e=a[r>>2]|0;r=a[r+4>>2]|0;if((e|0)==-1&(r|0)==-1){p=E(8)|0;$e(p,7488);S(p|0,2720,8)}p=a[t>>2]|0;c=n;a[c>>2]=0;a[c+4>>2]=0;c=n+8|0;a[c>>2]=e;a[c+4>>2]=r;a[i>>2]=a[n>>2];a[i+4>>2]=a[n+4>>2];a[i+8>>2]=a[n+8>>2];a[i+12>>2]=a[n+12>>2];Wt(p,i);if(!(Be(a[t>>2]|0)|0)){p=E(8)|0;Ke(p);S(p|0,2704,8)}Qt(a[t>>2]|0,i,8);if(!(Be(a[t>>2]|0)|0)){p=E(8)|0;Ke(p);S(p|0,2704,8)}if(a[i>>2]|0){p=E(8)|0;tr(p);S(p|0,2736,8)}s=t+288|0;c=t+292|0;a[c>>2]=a[s>>2];p=t+259|0;if((o[p>>0]|o[p+1>>0]<<8|o[p+2>>0]<<16|o[p+3>>0]<<24|0)==-1){p=E(8)|0;$e(p,7606);S(p|0,2720,8)}n=i+4|0;er(s,(a[n>>2]|0)+1|0);p=a[s>>2]|0;a[p>>2]=(a[l>>2]|0)+8;a[p+4>>2]=0;if((a[n>>2]|0)>>>0>1){Ft(u,a[t>>2]|0);rr(h,u);nr(f,32,2,8,0);ir(h);ar(f);if(!(a[n>>2]|0)){s=a[s>>2]|0;r=s}else{r=1;do{if(r>>>0>1)e=a[(a[s>>2]|0)+(r+-1<<3)>>2]|0;else e=0;l=or(f,h,e,1)|0;e=a[s>>2]|0;p=e+(r<<3)|0;a[p>>2]=l;a[p+4>>2]=((l|0)<0)<<31>>31;r=r+1|0}while(r>>>0<=(a[n>>2]|0)>>>0);r=e;s=e}e=a[c>>2]|0;if(e-r>>3>>>0>1){i=e-s>>3;n=s;e=1;r=a[n>>2]|0;n=a[n+4>>2]|0;do{p=s+(e<<3)|0;c=p;r=rg(a[c>>2]|0,a[c+4>>2]|0,r|0,n|0)|0;n=_()|0;a[p>>2]=r;a[p+4>>2]=n;e=e+1|0}while(e>>>0>>0)}sr(f);lr(h);Pt(u)}Y=d;return}function te(t){t=t|0;n[t+12>>0]=0;n[t+13>>0]=0;return}function ee(t){t=t|0;a[t+8>>2]=0;a[t+4>>2]=0;return}function re(t){t=t|0;return Yd(t)|0}function ne(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,l=0,c=0,u=0;l=Y;Y=Y+16|0;o=e;s=l;i=r-o|0;if(i>>>0>4294967279)mA(t);if(i>>>0<11)n[t+11>>0]=i;else{u=i+16&-16;c=qm(u)|0;a[t>>2]=c;a[t+8>>2]=u|-2147483648;a[t+4>>2]=i;t=c}if((e|0)!=(r|0)){o=r-o|0;i=t;while(1){ie(i,e);e=e+1|0;if((e|0)==(r|0))break;else i=i+1|0}t=t+o|0}n[s>>0]=0;ie(t,s);Y=l;return}function ie(t,e){t=t|0;e=e|0;n[t>>0]=n[e>>0]|0;return}function ae(t){t=t|0;mm(t);tm(t);return}function oe(t,e){t=t|0;e=e|0;a[t>>2]=4372;a[t+16>>2]=t;return}function se(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;e=a[e+4>>2]|0;a[t+4>>2]=e;a[t+8>>2]=e+(r*24|0);return}function le(t){t=t|0;a[(a[t>>2]|0)+4>>2]=a[t+4>>2];return}function ce(t,e){t=t|0;e=e|0;var r=0,n=0;r=e+16|0;n=a[r>>2]|0;do{if(n){if((e|0)==(n|0)){n=ue(t)|0;a[t+16>>2]=n;r=a[r>>2]|0;jg[a[(a[r>>2]|0)+12>>2]&15](r,n);break}else{a[t+16>>2]=n;a[r>>2]=0;break}}else a[t+16>>2]=0}while(0);return}function ue(t){t=t|0;return t|0}function he(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0;i=t+12|0;a[i>>2]=0;a[t+16>>2]=n;do{if(e){if(e>>>0>178956970){i=E(8)|0;fA(i,6723);a[i>>2]=5956;S(i|0,3928,123)}else{n=qm(e*24|0)|0;break}}else n=0}while(0);a[t>>2]=n;r=n+(r*24|0)|0;a[t+8>>2]=r;a[t+4>>2]=r;a[i>>2]=n+(e*24|0);return}function fe(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,l=0,c=0;l=a[t>>2]|0;c=t+4|0;r=a[c>>2]|0;s=e+4|0;if((r|0)==(l|0)){i=s;o=t;n=a[s>>2]|0;r=l}else{n=a[s>>2]|0;do{r=r+-24|0;ce(n+-24|0,r);n=(a[s>>2]|0)+-24|0;a[s>>2]=n}while((r|0)!=(l|0));i=s;o=t;r=a[t>>2]|0}a[o>>2]=n;a[i>>2]=r;l=e+8|0;s=a[c>>2]|0;a[c>>2]=a[l>>2];a[l>>2]=s;l=t+8|0;c=e+12|0;t=a[l>>2]|0;a[l>>2]=a[c>>2];a[c>>2]=t;a[e>>2]=a[i>>2];return}function de(t){t=t|0;var e=0,r=0,n=0,i=0;r=a[t+4>>2]|0;n=t+8|0;e=a[n>>2]|0;if((e|0)!=(r|0))do{i=e+-24|0;a[n>>2]=i;Jt(i);e=a[n>>2]|0}while((e|0)!=(r|0));e=a[t>>2]|0;if(e|0)bt(e,(a[t+12>>2]|0)-e|0);return}function pe(t){t=t|0;return 178956970}function me(t){t=t|0;tm(t);return}function Ae(t){t=t|0;t=qm(8)|0;a[t>>2]=4372;return t|0}function ge(t,e){t=t|0;e=e|0;a[e>>2]=4372;return}function ve(t){t=t|0;return}function ye(t){t=t|0;bt(t,8);return}function be(t,e){t=t|0;e=e|0;Ee(t+4|0,e);return}function xe(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==7183?t+4|0:0)|0}function we(t){t=t|0;return 2664}function _e(t){t=t|0;return}function Ee(t,e){t=t|0;e=e|0;Me(t,e);return}function Me(t,e){t=t|0;e=e|0;var r=0,i=0;t=e+104|0;e=o[t>>0]|0;r=e>>>7;i=e>>>6&1;if((r|0)==1&(i|0)!=0){i=E(8)|0;Se(i);S(i|0,2632,8)}if((r|0)==(i|0)){i=E(8)|0;Ce(i);S(i|0,2648,8)}else{n[t>>0]=e&63;return}}function Se(t){t=t|0;pA(t,7076);a[t>>2]=4416;return}function Ce(t){t=t|0;pA(t,7144);a[t>>2]=4436;return}function Te(t){t=t|0;mm(t);tm(t);return}function Ie(t){t=t|0;mm(t);tm(t);return}function Re(t){t=t|0;a[t>>2]=6092;return}function Be(t){t=t|0;var e=0;e=t+12|0;t=(n[e>>0]|0)==0;n[e>>0]=0;return t|0}function ke(t){t=t|0;return(n[t+13>>0]|0)!=0|0}function Le(t,e){t=t|0;e=e|0;t=t+247|0;Fe(t,e);if((o[t>>0]|o[t+1>>0]<<8)<<16>>16==2)return;else{e=E(8)|0;Ne(e);S(e|0,2688,8)}}function Pe(t,e,r,i){t=t|0;e=e|0;r=r|0;i=i|0;var o=0,s=0;switch(i|0){case 0:break;case 2:{i=a[t+4>>2]|0;e=rg(rg(e|0,r|0,-1,-1)|0,_()|0,i|0,((i|0)<0)<<31>>31|0)|0;r=_()|0;break}case 1:{i=a[t+8>>2]|0;e=rg(i|0,((i|0)<0)<<31>>31|0,e|0,r|0)|0;r=_()|0;break}default:{r=0;e=0}}o=a[t+4>>2]|0;s=((o|0)<0)<<31>>31;i=t+12|0;if((r|0)<0|((r|0)>(s|0)|(r|0)==(s|0)&e>>>0>=o>>>0))n[i>>0]=1;else{n[i>>0]=0;a[t+8>>2]=e}return}function De(t){t=t|0;pA(t,7410);a[t>>2]=4476;return}function Ue(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,a=0,s=0,l=0,c=0,u=0;s=Y;Y=Y+16|0;a=s;zt(t);i=e+32|0;if((o[i>>0]|o[i+1>>0]<<8)<<16>>16){n=e+34|0;e=0;do{c=o[n>>0]|o[n+1>>0]<<8|o[n+2>>0]<<16|o[n+3>>0]<<24;u=c+(e*6|0)|0;l=c+(e*6|0)+2|0;c=c+(e*6|0)+4|0;Ve(a,(o[u>>0]|o[u+1>>0]<<8)&65535,(o[l>>0]|o[l+1>>0]<<8)&65535,(o[c>>0]|o[c+1>>0]<<8)&65535);Ze(t,a);r=r-((o[l>>0]|o[l+1>>0]<<8)&65535)|0;e=e+1|0}while(e>>>0<((o[i>>0]|o[i+1>>0]<<8)&65535)>>>0)}if((r|0)<0){u=E(8)|0;Ne(u);S(u|0,2688,8)}if(r|0){Ve(a,0,r,2);Ze(t,a)}Y=s;return}function Oe(t,e){t=t|0;e=e|0;var r=0,i=0;r=Y;Y=Y+16|0;i=r+1|0;n[i>>0]=n[r>>0]|0;Ye(t,e,i);Y=r;return t|0}function Fe(t,e){t=t|0;e=e|0;var r=0,i=0,a=0,s=0,l=0,c=0,u=0;i=e+2|0;s=o[e>>0]|o[e+1>>0]<<8;n[t>>0]=s;n[t+1>>0]=s>>8;s=t+2|0;i=o[i>>0]|o[i+1>>0]<<8;n[s>>0]=i;n[s+1>>0]=i>>8;n[t+4>>0]=n[e+4>>0]|0;s=e+6|0;n[t+5>>0]=n[e+5>>0]|0;i=e+8|0;r=t+6|0;s=o[s>>0]|o[s+1>>0]<<8;n[r>>0]=s;n[r+1>>0]=s>>8;r=e+12|0;s=t+8|0;i=o[i>>0]|o[i+1>>0]<<8|o[i+2>>0]<<16|o[i+3>>0]<<24;n[s>>0]=i;n[s+1>>0]=i>>8;n[s+2>>0]=i>>16;n[s+3>>0]=i>>24;s=t+12|0;r=o[r>>0]|o[r+1>>0]<<8|o[r+2>>0]<<16|o[r+3>>0]<<24;n[s>>0]=r;n[s+1>>0]=r>>8;n[s+2>>0]=r>>16;n[s+3>>0]=r>>24;s=e+16|0;r=s;r=o[r>>0]|o[r+1>>0]<<8|o[r+2>>0]<<16|o[r+3>>0]<<24;s=s+4|0;s=o[s>>0]|o[s+1>>0]<<8|o[s+2>>0]<<16|o[s+3>>0]<<24;i=t+16|0;l=i;n[l>>0]=r;n[l+1>>0]=r>>8;n[l+2>>0]=r>>16;n[l+3>>0]=r>>24;i=i+4|0;n[i>>0]=s;n[i+1>>0]=s>>8;n[i+2>>0]=s>>16;n[i+3>>0]=s>>24;i=e+32|0;s=e+24|0;l=s;l=o[l>>0]|o[l+1>>0]<<8|o[l+2>>0]<<16|o[l+3>>0]<<24;s=s+4|0;s=o[s>>0]|o[s+1>>0]<<8|o[s+2>>0]<<16|o[s+3>>0]<<24;r=t+24|0;a=r;n[a>>0]=l;n[a+1>>0]=l>>8;n[a+2>>0]=l>>16;n[a+3>>0]=l>>24;r=r+4|0;n[r>>0]=s;n[r+1>>0]=s>>8;n[r+2>>0]=s>>16;n[r+3>>0]=s>>24;r=e+34|0;s=t+32|0;i=o[i>>0]|o[i+1>>0]<<8;n[s>>0]=i;n[s+1>>0]=i>>8;a=t+34|0;t=o[a>>0]|o[a+1>>0]<<8|o[a+2>>0]<<16|o[a+3>>0]<<24;if(!t)t=i;else{Jm(t);t=o[s>>0]|o[s+1>>0]<<8}i=Ym((t&65535)*6|0)|0;n[a>>0]=i;n[a+1>>0]=i>>8;n[a+2>>0]=i>>16;n[a+3>>0]=i>>24;if(t<<16>>16?(t=e+36|0,l=o[r>>0]|o[r+1>>0]<<8,n[i>>0]=l,n[i+1>>0]=l>>8,e=e+38|0,l=i+2|0,t=o[t>>0]|o[t+1>>0]<<8,n[l>>0]=t,n[l+1>>0]=t>>8,l=i+4|0,e=o[e>>0]|o[e+1>>0]<<8,n[l>>0]=e,n[l+1>>0]=e>>8,((o[s>>0]|o[s+1>>0]<<8)&65535)>1):0){t=1;do{e=r;r=r+6|0;l=o[a>>0]|o[a+1>>0]<<8|o[a+2>>0]<<16|o[a+3>>0]<<24;c=e+8|0;i=l+(t*6|0)|0;u=o[r>>0]|o[r+1>>0]<<8;n[i>>0]=u;n[i+1>>0]=u>>8;e=e+10|0;i=l+(t*6|0)+2|0;c=o[c>>0]|o[c+1>>0]<<8;n[i>>0]=c;n[i+1>>0]=c>>8;l=l+(t*6|0)+4|0;e=o[e>>0]|o[e+1>>0]<<8;n[l>>0]=e;n[l+1>>0]=e>>8;t=t+1|0}while(t>>>0<((o[s>>0]|o[s+1>>0]<<8)&65535)>>>0)}return}function Ne(t){t=t|0;pA(t,7354);a[t>>2]=4456;return}function ze(t){t=t|0;mm(t);tm(t);return}function Ge(t){t=t|0;mm(t);tm(t);return}function Ze(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0;l=Y;Y=Y+32|0;i=l;o=t+4|0;r=a[o>>2]|0;s=t+8|0;do{if((r|0)==(a[s>>2]|0)){r=((r-(a[t>>2]|0)|0)/12|0)+1|0;n=qe(t)|0;if(n>>>0>>0)HA(t);else{c=a[t>>2]|0;u=((a[s>>2]|0)-c|0)/12|0;s=u<<1;We(i,u>>>0>>1>>>0?s>>>0>>0?r:s:n,((a[o>>2]|0)-c|0)/12|0,t+8|0);s=i+8|0;o=a[s>>2]|0;a[o>>2]=a[e>>2];a[o+4>>2]=a[e+4>>2];a[o+8>>2]=a[e+8>>2];a[s>>2]=(a[s>>2]|0)+12;He(t,i);Xe(i);break}}else{Qe(i,t,1);u=i+4|0;c=a[u>>2]|0;a[c>>2]=a[e>>2];a[c+4>>2]=a[e+4>>2];a[c+8>>2]=a[e+8>>2];a[u>>2]=(a[u>>2]|0)+12;je(i)}}while(0);Y=l;return}function Ve(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;a[t>>2]=e;a[t+4>>2]=r;a[t+8>>2]=n;return}function Qe(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;e=a[e+4>>2]|0;a[t+4>>2]=e;a[t+8>>2]=e+(r*12|0);return}function je(t){t=t|0;a[(a[t>>2]|0)+4>>2]=a[t+4>>2];return}function We(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0;i=t+12|0;a[i>>2]=0;a[t+16>>2]=n;do{if(e){if(e>>>0>357913941){i=E(8)|0;fA(i,6723);a[i>>2]=5956;S(i|0,3928,123)}else{n=qm(e*12|0)|0;break}}else n=0}while(0);a[t>>2]=n;r=n+(r*12|0)|0;a[t+8>>2]=r;a[t+4>>2]=r;a[i>>2]=n+(e*12|0);return}function He(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;n=a[t>>2]|0;s=t+4|0;o=e+4|0;i=(a[s>>2]|0)-n|0;r=(a[o>>2]|0)+(((i|0)/-12|0)*12|0)|0;a[o>>2]=r;if((i|0)>0){hg(r|0,n|0,i|0)|0;n=o;r=a[o>>2]|0}else n=o;o=a[t>>2]|0;a[t>>2]=r;a[n>>2]=o;o=e+8|0;i=a[s>>2]|0;a[s>>2]=a[o>>2];a[o>>2]=i;o=t+8|0;s=e+12|0;t=a[o>>2]|0;a[o>>2]=a[s>>2];a[s>>2]=t;a[e>>2]=a[n>>2];return}function Xe(t){t=t|0;var e=0,r=0,n=0;e=a[t+4>>2]|0;r=t+8|0;n=a[r>>2]|0;if((n|0)!=(e|0))a[r>>2]=n+(~(((n+-12-e|0)>>>0)/12|0)*12|0);e=a[t>>2]|0;if(e|0)bt(e,(a[t+12>>2]|0)-e|0);return}function qe(t){t=t|0;return 357913941}function Ye(t,e,r){t=t|0;e=e|0;r=r|0;var n=0;Je(t);a[t>>2]=a[e>>2];r=e+4|0;a[t+4>>2]=a[r>>2];n=e+8|0;a[t+8>>2]=a[n>>2];a[n>>2]=0;a[r>>2]=0;a[e>>2]=0;return}function Je(t){t=t|0;var e=0,r=0,n=0,i=0;e=a[t>>2]|0;r=e;if(e|0){n=t+4|0;a[n>>2]=r;i=t+8|0;bt(e,(a[i>>2]|0)-r|0);a[i>>2]=0;a[n>>2]=0;a[t>>2]=0}return}function Ke(t){t=t|0;pA(t,7660);a[t>>2]=4496;return}function $e(t,e){t=t|0;e=e|0;pA(t,e);a[t>>2]=4516;return}function tr(t){t=t|0;pA(t,7704);a[t>>2]=4536;return}function er(t,e){t=t|0;e=e|0;var r=0,n=0,i=0;r=t+4|0;i=a[t>>2]|0;n=(a[r>>2]|0)-i>>3;if(n>>>0>=e>>>0){if(n>>>0>e>>>0)a[r>>2]=i+(e<<3)}else fr(t,e-n|0);return}function rr(t,e){t=t|0;e=e|0;a[t>>2]=e;a[t+4>>2]=0;a[t+8>>2]=-1;return}function nr(t,e,r,n,i){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;var o=0;a[t+4>>2]=e;a[t+8>>2]=r;a[t+12>>2]=n;a[t+16>>2]=i;a[t+36>>2]=0;a[t+40>>2]=0;a[t+44>>2]=0;_r(t+48|0);a[t+68>>2]=0;a[t+72>>2]=0;a[t+76>>2]=0;do{if(!i){r=t+20|0;if((e+-1|0)>>>0<31){a[r>>2]=e;i=1<>2]=i;r=i>>>1;a[t+28>>2]=0-r;r=i+-1-r|0;break}else{a[r>>2]=32;a[t+24>>2]=0;a[t+28>>2]=-2147483648;r=2147483647;break}}else{n=t+20|0;a[n>>2]=0;a[t+24>>2]=i;r=i;o=0;while(1){r=r>>>1;e=o+1|0;if(!r)break;else o=e}a[n>>2]=(1<>>1;a[t+28>>2]=0-r;r=i+-1-r|0}}while(0);a[t+32>>2]=r;a[t>>2]=0;return}function ir(t){t=t|0;var e=0;e=((Sr(a[t>>2]|0)|0)&255)<<24;e=((Sr(a[t>>2]|0)|0)&255)<<16|e;e=e|((Sr(a[t>>2]|0)|0)&255)<<8;a[t+4>>2]=e|(Sr(a[t>>2]|0)|0)&255;return}function ar(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0,A=0,g=0,v=0,y=0;A=Y;Y=Y+64|0;p=A+44|0;m=A;u=t+36|0;h=t+40|0;t:do{if((a[u>>2]|0)==(a[h>>2]|0)){f=t+8|0;e:do{if(!(a[f>>2]|0))d=t+20|0;else{i=t+20|0;o=t+44|0;s=p+4|0;l=t+44|0;c=p+8|0;n=0;while(1){Br(m,(a[i>>2]|0)+1|0,0,0);e=a[h>>2]|0;if(e>>>0<(a[o>>2]|0)>>>0){kr(p,u,1);Pr(a[s>>2]|0,m);a[s>>2]=(a[s>>2]|0)+44;Lr(p)}else{e=((e-(a[u>>2]|0)|0)/44|0)+1|0;r=Fr(u)|0;if(r>>>0>>0)break;g=a[u>>2]|0;y=((a[o>>2]|0)-g|0)/44|0;v=y<<1;Dr(p,y>>>0>>1>>>0?v>>>0>>0?e:v:r,((a[h>>2]|0)-g|0)/44|0,l);Pr(a[c>>2]|0,m);a[c>>2]=(a[c>>2]|0)+44;Ur(u,p);Or(p)}Mr(m);n=n+1|0;if(n>>>0>=(a[f>>2]|0)>>>0){d=i;break e}}HA(u)}}while(0);if(a[d>>2]|0){s=t+12|0;l=t+68|0;c=t+72|0;u=t+76|0;h=p+4|0;i=t+76|0;o=p+8|0;n=1;while(1){e=a[s>>2]|0;Br(m,1<<(n>>>0>e>>>0?e:n),0,0);e=a[c>>2]|0;if(e>>>0<(a[u>>2]|0)>>>0){kr(p,l,1);Pr(a[h>>2]|0,m);a[h>>2]=(a[h>>2]|0)+44;Lr(p)}else{e=((e-(a[l>>2]|0)|0)/44|0)+1|0;r=Fr(l)|0;if(r>>>0>>0)break;y=a[l>>2]|0;g=((a[u>>2]|0)-y|0)/44|0;v=g<<1;Dr(p,g>>>0>>1>>>0?v>>>0>>0?e:v:r,((a[c>>2]|0)-y|0)/44|0,i);Pr(a[o>>2]|0,m);a[o>>2]=(a[o>>2]|0)+44;Ur(l,p);Or(p)}Mr(m);n=n+1|0;if(n>>>0>(a[d>>2]|0)>>>0)break t}HA(l)}}}while(0);Y=A;return}function or(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;r=(Gr(t,e,(a[t+36>>2]|0)+(n*44|0)|0)|0)+r|0;e=a[t+24>>2]|0;if((r|0)<0)return r+e|0;else return r-(r>>>0>>0?0:e)|0;return 0}function sr(t){t=t|0;Er(t+68|0);Er(t+36|0);return}function lr(t){t=t|0;return}function cr(t){t=t|0;mm(t);tm(t);return}function ur(t){t=t|0;mm(t);tm(t);return}function hr(t){t=t|0;mm(t);tm(t);return}function fr(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0;l=Y;Y=Y+32|0;i=l;o=t+8|0;s=t+4|0;r=a[s>>2]|0;do{if((a[o>>2]|0)-r>>3>>>0>>0){r=(r-(a[t>>2]|0)>>3)+e|0;n=br(t)|0;if(n>>>0>>0)HA(t);else{c=a[t>>2]|0;u=(a[o>>2]|0)-c|0;o=u>>2;pr(i,u>>3>>>0>>1>>>0?o>>>0>>0?r:o:n,(a[s>>2]|0)-c>>3,t+8|0);mr(i,e);Ar(t,i);gr(i);break}}else dr(t,e)}while(0);Y=l;return}function dr(t,e){t=t|0;e=e|0;var r=0,n=0,i=0;i=Y;Y=Y+16|0;n=i;vr(n,t,e);t=n+4|0;e=a[t>>2]|0;r=a[n+8>>2]|0;if((e|0)!=(r|0)){r=r+-8-e|0;dg(e|0,0,r+8&-8|0)|0;a[t>>2]=e+((r>>>3)+1<<3)}yr(n);Y=i;return}function pr(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0;i=t+12|0;a[i>>2]=0;a[t+16>>2]=n;do{if(e){if(e>>>0>536870911){i=E(8)|0;fA(i,6723);a[i>>2]=5956;S(i|0,3928,123)}else{n=qm(e<<3)|0;break}}else n=0}while(0);a[t>>2]=n;r=n+(r<<3)|0;a[t+8>>2]=r;a[t+4>>2]=r;a[i>>2]=n+(e<<3);return}function mr(t,e){t=t|0;e=e|0;var r=0,n=0;n=Y;Y=Y+16|0;r=n;xr(r,t+8|0,e);t=a[r>>2]|0;e=a[r+4>>2]|0;if((t|0)!=(e|0)){e=e+-8-t|0;dg(t|0,0,e+8&-8|0)|0;a[r>>2]=t+((e>>>3)+1<<3)}wr(r);Y=n;return}function Ar(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;n=a[t>>2]|0;s=t+4|0;o=e+4|0;i=(a[s>>2]|0)-n|0;r=(a[o>>2]|0)+(0-(i>>3)<<3)|0;a[o>>2]=r;if((i|0)>0){hg(r|0,n|0,i|0)|0;n=o;r=a[o>>2]|0}else n=o;o=a[t>>2]|0;a[t>>2]=r;a[n>>2]=o;o=e+8|0;i=a[s>>2]|0;a[s>>2]=a[o>>2];a[o>>2]=i;o=t+8|0;s=e+12|0;t=a[o>>2]|0;a[o>>2]=a[s>>2];a[s>>2]=t;a[e>>2]=a[n>>2];return}function gr(t){t=t|0;var e=0,r=0,n=0;e=a[t+4>>2]|0;r=t+8|0;n=a[r>>2]|0;if((n|0)!=(e|0))a[r>>2]=n+(~((n+-8-e|0)>>>3)<<3);e=a[t>>2]|0;if(e|0)bt(e,(a[t+12>>2]|0)-e|0);return}function vr(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;e=a[e+4>>2]|0;a[t+4>>2]=e;a[t+8>>2]=e+(r<<3);return}function yr(t){t=t|0;a[(a[t>>2]|0)+4>>2]=a[t+4>>2];return}function br(t){t=t|0;return 536870911}function xr(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=a[e>>2];a[t+4>>2]=(a[e>>2]|0)+(r<<3);a[t+8>>2]=e;return}function wr(t){t=t|0;a[a[t+8>>2]>>2]=a[t>>2];return}function _r(t){t=t|0;a[t+12>>2]=1;a[t+16>>2]=2;a[t+8>>2]=4096;a[t+4>>2]=4;a[t>>2]=4;return}function Er(t){t=t|0;var e=0,r=0,n=0;r=a[t>>2]|0;if(r|0){n=t+4|0;e=a[n>>2]|0;if((e|0)==(r|0))e=r;else{do{e=e+-44|0;Mr(e)}while((e|0)!=(r|0));e=a[t>>2]|0}a[n>>2]=r;bt(e,(a[t+8>>2]|0)-e|0)}return}function Mr(t){t=t|0;var e=0;e=a[t+8>>2]|0;if(e|0)Ot(e);e=a[t+12>>2]|0;if(e|0)Ot(e);e=a[t+16>>2]|0;if(e|0)Ot(e);return}function Sr(t){t=t|0;var e=0,r=0;r=t+4|0;e=a[r>>2]|0;if((e|0)>=(a[t+8>>2]|0)){Cr(t);e=a[r>>2]|0}t=a[t+12>>2]|0;a[r>>2]=e+1;return n[t+e>>0]|0}function Cr(t){t=t|0;var e=0;a[t+4>>2]=0;Qt(a[t>>2]|0,a[t+12>>2]|0,1048576);e=Tr(a[t>>2]|0)|0;a[t+8>>2]=e;if(!e){e=E(8)|0;Ir(e);S(e|0,2752,8)}else return}function Tr(t){t=t|0;return a[t+16>>2]|0}function Ir(t){t=t|0;pA(t,7769);a[t>>2]=4556;return}function Rr(t){t=t|0;mm(t);tm(t);return}function Br(t,e,r,i){t=t|0;e=e|0;r=r|0;i=i|0;var o=0,s=0,l=0;a[t>>2]=e;n[t+4>>0]=r&1;s=t+8|0;a[s>>2]=0;l=t+12|0;a[l>>2]=0;o=t+16|0;a[o>>2]=0;if((e+-2|0)>>>0>2046){t=E(8)|0;pA(t,7789);S(t|0,3912,8)}a[t+32>>2]=e+-1;if(e>>>0>16&(r^1)){r=3;while(1)if(1<>>0>>0)r=r+1|0;else break;e=1<>2]=e;a[t+40>>2]=15-r;a[o>>2]=Vt((e<<2)+8|0)|0;e=a[t>>2]|0}else{a[o>>2]=0;a[t+40>>2]=0;a[t+36>>2]=0}a[s>>2]=Vt(e<<2)|0;o=Vt(a[t>>2]<<2)|0;a[l>>2]=o;a[t+20>>2]=0;e=a[t>>2]|0;r=t+24|0;a[r>>2]=e;e=(e|0)!=0;if(!i){if(e){e=0;do{a[o+(e<<2)>>2]=1;e=e+1|0}while(e>>>0<(a[t>>2]|0)>>>0)}}else if(e){e=0;do{a[o+(e<<2)>>2]=a[i+(e<<2)>>2];e=e+1|0}while(e>>>0<(a[t>>2]|0)>>>0)}zr(t);i=((a[t>>2]|0)+6|0)>>>1;a[r>>2]=i;a[t+28>>2]=i;return}function kr(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;e=a[e+4>>2]|0;a[t+4>>2]=e;a[t+8>>2]=e+(r*44|0);return}function Lr(t){t=t|0;a[(a[t>>2]|0)+4>>2]=a[t+4>>2];return}function Pr(t,e){t=t|0;e=e|0;var r=0;a[t>>2]=a[e>>2];n[t+4>>0]=n[e+4>>0]|0;r=e+8|0;a[t+8>>2]=a[r>>2];a[t+12>>2]=a[e+12>>2];a[t+16>>2]=a[e+16>>2];a[t+20>>2]=a[e+20>>2];a[t+24>>2]=a[e+24>>2];a[t+28>>2]=a[e+28>>2];a[t+32>>2]=a[e+32>>2];a[t+36>>2]=a[e+36>>2];a[t+40>>2]=a[e+40>>2];a[r>>2]=0;a[r+4>>2]=0;a[r+8>>2]=0;return}function Dr(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0;i=t+12|0;a[i>>2]=0;a[t+16>>2]=n;do{if(e){if(e>>>0>97612893){i=E(8)|0;fA(i,6723);a[i>>2]=5956;S(i|0,3928,123)}else{n=qm(e*44|0)|0;break}}else n=0}while(0);a[t>>2]=n;r=n+(r*44|0)|0;a[t+8>>2]=r;a[t+4>>2]=r;a[i>>2]=n+(e*44|0);return}function Ur(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,l=0,c=0;l=a[t>>2]|0;c=t+4|0;r=a[c>>2]|0;s=e+4|0;if((r|0)==(l|0)){i=s;o=t;n=a[s>>2]|0;r=l}else{n=a[s>>2]|0;do{r=r+-44|0;Nr(n+-44|0,r);n=(a[s>>2]|0)+-44|0;a[s>>2]=n}while((r|0)!=(l|0));i=s;o=t;r=a[t>>2]|0}a[o>>2]=n;a[i>>2]=r;l=e+8|0;s=a[c>>2]|0;a[c>>2]=a[l>>2];a[l>>2]=s;l=t+8|0;c=e+12|0;t=a[l>>2]|0;a[l>>2]=a[c>>2];a[c>>2]=t;a[e>>2]=a[i>>2];return}function Or(t){t=t|0;var e=0,r=0,n=0,i=0;r=a[t+4>>2]|0;n=t+8|0;e=a[n>>2]|0;if((e|0)!=(r|0))do{i=e+-44|0;a[n>>2]=i;Mr(i);e=a[n>>2]|0}while((e|0)!=(r|0));e=a[t>>2]|0;if(e|0)bt(e,(a[t+12>>2]|0)-e|0);return}function Fr(t){t=t|0;return 97612893}function Nr(t,e){t=t|0;e=e|0;var r=0,i=0,o=0,s=0;r=a[e>>2]|0;a[t>>2]=r;n[t+4>>0]=n[e+4>>0]|0;a[t+20>>2]=a[e+20>>2];a[t+24>>2]=a[e+24>>2];a[t+28>>2]=a[e+28>>2];a[t+32>>2]=a[e+32>>2];s=t+36|0;a[s>>2]=a[e+36>>2];a[t+40>>2]=a[e+40>>2];r=r<<2;i=Vt(r)|0;a[t+8>>2]=i;o=a[t>>2]|0;if(o|0)fg(i|0,a[e+8>>2]|0,o<<2|0)|0;r=Vt(r)|0;a[t+12>>2]=r;i=a[t>>2]|0;if(i|0)fg(r|0,a[e+12>>2]|0,i<<2|0)|0;r=a[s>>2]|0;if(r){i=Vt((r<<2)+8|0)|0;a[t+16>>2]=i;r=(a[s>>2]<<2)+8|0;if(r|0)fg(i|0,a[e+16>>2]|0,r|0)|0}else a[t+16>>2]=0;return}function zr(t){t=t|0;var e=0,r=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0,A=0;A=t+24|0;o=t+20|0;e=(a[o>>2]|0)+(a[A>>2]|0)|0;a[o>>2]=e;if(e>>>0>32768){a[o>>2]=0;if(!(a[t>>2]|0))e=0;else{i=a[t+12>>2]|0;r=0;do{d=i+(r<<2)|0;e=((a[d>>2]|0)+1|0)>>>1;a[d>>2]=e;e=(a[o>>2]|0)+e|0;a[o>>2]=e;r=r+1|0}while(r>>>0<(a[t>>2]|0)>>>0)}}d=2147483648/(e>>>0)|0;do{if((n[t+4>>0]|0)==0?(p=t+36|0,(a[p>>2]|0)!=0):0){if(a[t>>2]|0){c=a[t+8>>2]|0;u=a[t+12>>2]|0;h=t+40|0;f=t+16|0;e=0;s=0;l=0;do{r=(y(s,d)|0)>>>16;a[c+(l<<2)>>2]=r;s=(a[u+(l<<2)>>2]|0)+s|0;r=r>>>(a[h>>2]|0);if(e>>>0>>0){i=l+-1|0;o=a[f>>2]|0;do{e=e+1|0;a[o+(e<<2)>>2]=i}while((e|0)!=(r|0));e=r}l=l+1|0}while(l>>>0<(a[t>>2]|0)>>>0);r=a[f>>2]|0;a[r>>2]=0;if(e>>>0>(a[p>>2]|0)>>>0){e=t;break}}else{r=a[t+16>>2]|0;a[r>>2]=0;e=0}do{e=e+1|0;a[r+(e<<2)>>2]=(a[t>>2]|0)+-1}while(e>>>0<=(a[p>>2]|0)>>>0);e=t}else m=7}while(0);if((m|0)==7)if(!(a[t>>2]|0))e=t;else{i=a[t+8>>2]|0;o=a[t+12>>2]|0;e=0;r=0;do{a[i+(e<<2)>>2]=(y(r,d)|0)>>>16;r=(a[o+(e<<2)>>2]|0)+r|0;e=e+1|0}while(e>>>0<(a[t>>2]|0)>>>0);e=t}m=((a[A>>2]|0)*5|0)>>>2;p=(a[e>>2]<<3)+48|0;m=m>>>0>p>>>0?p:m;a[A>>2]=m;a[t+28>>2]=m;return}function Gr(t,e,r){t=t|0;e=e|0;r=r|0;var n=0;r=Zr(e,r)|0;a[t>>2]=r;do{if(r){if(r>>>0>=32){r=a[t+28>>2]|0;break}n=a[t+12>>2]|0;if(r>>>0>n>>>0){n=r-n|0;r=Zr(e,(a[t+68>>2]|0)+((r+-1|0)*44|0)|0)|0;n=r<>2]|0)+((r+-1|0)*44|0)|0)|0;r=a[t>>2]|0;if((n|0)<(1<>2]|0;i=a[e+16>>2]|0;if(i){n=t+4|0;r=a[n>>2]|0;h=f>>>15;a[d>>2]=h;c=(r>>>0)/(h>>>0)|0;l=c>>>(a[e+40>>2]|0);o=a[i+(l<<2)>>2]|0;l=(a[i+(l+1<<2)>>2]|0)+1|0;s=o+1|0;u=a[e+8>>2]|0;if(l>>>0>s>>>0){i=o;o=l;do{s=(o+i|0)>>>1;l=(a[u+(s<<2)>>2]|0)>>>0>c>>>0;i=l?i:s;o=l?s:o;s=i+1|0}while(o>>>0>s>>>0);o=i}i=y(a[u+(o<<2)>>2]|0,h)|0;if((o|0)==(a[e+32>>2]|0))s=f;else s=y(a[u+(s<<2)>>2]|0,h)|0}else{u=f>>>15;a[d>>2]=u;l=a[e>>2]|0;h=a[e+8>>2]|0;n=t+4|0;r=a[n>>2]|0;c=l>>>1;i=0;s=f;o=0;do{p=y(a[h+(c<<2)>>2]|0,u)|0;f=p>>>0>r>>>0;s=f?p:s;i=f?i:p;o=f?o:c;l=f?c:l;c=(o+l|0)>>>1}while((c|0)!=(o|0))}a[n>>2]=r-i;p=s-i|0;a[d>>2]=p;if(p>>>0<16777216)jr(t);d=(a[e+12>>2]|0)+(o<<2)|0;a[d>>2]=(a[d>>2]|0)+1;d=e+28|0;p=(a[d>>2]|0)+-1|0;a[d>>2]=p;if(!p)zr(e);return o|0}function Vr(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;if(e>>>0>19){r=(Wr(t)|0)&65535;return(Vr(t,e+-16|0)|0)<<16|r|0}n=t+4|0;i=a[n>>2]|0;o=t+8|0;r=(a[o>>2]|0)>>>e;a[o>>2]=r;e=(i>>>0)/(r>>>0)|0;a[n>>2]=i-(y(e,r)|0);if(r>>>0<16777216)jr(t);return e|0}function Qr(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,l=0;n=t+8|0;i=a[n>>2]|0;r=y(i>>>13,a[e+8>>2]|0)|0;o=t+4|0;s=a[o>>2]|0;l=s>>>0>=r>>>0;if(l){a[o>>2]=s-r;r=i-r|0;a[n>>2]=r}else{a[n>>2]=r;s=e+12|0;a[s>>2]=(a[s>>2]|0)+1}if(r>>>0<16777216)jr(t);s=e+4|0;t=(a[s>>2]|0)+-1|0;a[s>>2]=t;if(!t)Hr(e);return l&1|0}function jr(t){t=t|0;var e=0,r=0,n=0,i=0;e=t+4|0;r=t+8|0;n=a[e>>2]|0;do{n=n<<8|(Sr(a[t>>2]|0)|0)&255;a[e>>2]=n;i=a[r>>2]<<8;a[r>>2]=i}while(i>>>0<16777216);return}function Wr(t){t=t|0;var e=0,r=0,n=0,i=0;r=t+4|0;i=a[r>>2]|0;e=t+8|0;n=(a[e>>2]|0)>>>16;a[e>>2]=n;e=(i>>>0)/(n>>>0)|0;a[r>>2]=i-(y(e,n)|0);jr(t);return e&65535|0}function Hr(t){t=t|0;var e=0,r=0,n=0,i=0,o=0;i=a[t>>2]|0;r=t+16|0;e=(a[r>>2]|0)+i|0;a[r>>2]=e;if(e>>>0>8192){n=(e+1|0)>>>1;a[r>>2]=n;o=t+12|0;e=((a[o>>2]|0)+1|0)>>>1;a[o>>2]=e;if((e|0)==(n|0)){e=n+1|0;a[r>>2]=e;r=e;e=n}else r=n}else{r=e;e=a[t+12>>2]|0}a[t+8>>2]=(y(e,2147483648/(r>>>0)|0)|0)>>>18;o=i*5|0;o=o>>>0>259?64:o>>>2;a[t>>2]=o;a[t+4>>2]=o;return}function Xr(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0;f=Y;Y=Y+32|0;s=f+16|0;l=f+8|0;c=f;u=t+336|0;n=u;i=t+259|0;if(!((a[n+4>>2]|0)==0?(a[n>>2]|0)==(o[i>>0]|o[i+1>>0]<<8|o[i+2>>0]<<16|o[i+3>>0]<<24|0):0)){n=t+320|0;r=a[n>>2]|0;i=r;if(!((r|0)!=0?(a[t+312>>2]|0)!=0:0)){r=i;h=5}}else{n=t+320|0;r=a[t+320>>2]|0;h=5}if((h|0)==5){h=t+320|0;a[s>>2]=r;a[h>>2]=0;r=t+324|0;a[s+4>>2]=a[r>>2];a[r>>2]=0;Rt(s);i=t+312|0;a[s>>2]=a[i>>2];a[i>>2]=0;d=t+316|0;a[s+4>>2]=a[d>>2];a[d>>2]=0;Bt(s);p=qm(12)|0;rr(p,t+4|0);a[c>>2]=0;a[s>>2]=a[c>>2];Yr(l,p,s);p=a[l>>2]|0;a[l>>2]=a[i>>2];a[i>>2]=p;p=l+4|0;c=a[p>>2]|0;a[p>>2]=a[d>>2];a[d>>2]=c;Bt(l);qr(l,a[i>>2]|0,t+300|0);i=a[l>>2]|0;d=l+4|0;c=a[d>>2]|0;a[l>>2]=0;a[d>>2]=0;a[s>>2]=a[h>>2];a[h>>2]=i;a[s+4>>2]=a[r>>2];a[r>>2]=c;Rt(s);Rt(l);r=t+328|0;c=r;c=rg(a[c>>2]|0,a[c+4>>2]|0,1,0)|0;h=_()|0;a[r>>2]=c;a[r+4>>2]=h;r=u;a[r>>2]=0;a[r+4>>2]=0;r=a[n>>2]|0}Gg[a[a[r>>2]>>2]&63](r,e)|0;h=u;h=rg(a[h>>2]|0,a[h+4>>2]|0,1,0)|0;d=_()|0;p=u;a[p>>2]=h;a[p+4>>2]=d;Y=f;return}function qr(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0;s=Y;Y=Y+64|0;n=s+56|0;i=s;o=rn(r)|0;if((o|0)==-1){s=E(8)|0;nn(s);S(s|0,2784,8)}r=an(r)|0;t:do{if(!r)switch(o|0){case 0:{o=qm(4788)|0;mn(o);pn(t,e,o);break t}case 1:{o=qm(5116)|0;gn(o);An(t,e,o);break t}case 2:{o=qm(5104)|0;yn(o);vn(t,e,o);break t}case 3:{o=qm(5432)|0;xn(o);bn(t,e,o);break t}default:{a[t>>2]=0;a[t+4>>2]=0;break t}}else{on(n,e);sn(a[n>>2]|0);if((o|2|0)==3)ln(a[n>>2]|0);if((o|1|0)==3)cn(a[n>>2]|0);o=a[n>>2]|0;hn(i,r);un(o,i);fn(i);a[t>>2]=a[n>>2];o=n+4|0;a[t+4>>2]=a[o>>2];a[n>>2]=0;a[o>>2]=0;dn(n)}}while(0);Y=s;return}function Yr(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4576;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Jr(t,n);Y=r;return}function Jr(t,e){t=t|0;e=e|0;return}function Kr(t){t=t|0;oA(t);tm(t);return}function $r(t){t=t|0;t=a[t+12>>2]|0;if(t|0){lr(t);tm(t)}return}function tn(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==7983?t+12|0:0)|0}function en(t){t=t|0;bt(t,16);return}function rn(t){t=t|0;var e=0,r=0;e=(a[t+4>>2]|0)-(a[t>>2]|0)|0;t:do{if(((e|0)!=0?(r=((e|0)/12|0)+(((an(t)|0)!=0)<<31>>31)|0,(r|0)!=0):0)?(e=a[t>>2]|0,!(wn(e,_n()|0)|0)):0){switch(r|0){case 1:{t=0;break t}case 2:{if(En((a[t>>2]|0)+12|0,Mn()|0)|0){t=1;break t}if(En((a[t>>2]|0)+12|0,Sn()|0)|0){t=2;break t}break}case 3:{if(En((a[t>>2]|0)+12|0,Mn()|0)|0?(r=(a[t>>2]|0)+24|0,En(r,Sn()|0)|0):0){t=3;break t}break}default:{}}t=-1}else t=-1}while(0);return t|0}function nn(t){t=t|0;pA(t,8131);a[t>>2]=4604;return}function an(t){t=t|0;var e=0,r=0;e=a[t+4>>2]|0;if(((e|0)!=(a[t>>2]|0)?(r=e,(a[r+-12>>2]|0)==0):0)?(a[r+-4>>2]|0)==2:0)t=a[r+-8>>2]|0;else t=0;return t|0}function on(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;r=Y;Y=Y+16|0;n=r+4|0;o=r;i=qm(24)|0;Tn(i,e);a[o>>2]=0;a[n>>2]=a[o>>2];In(t,i,n);Y=r;return}function sn(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0;c=Y;Y=Y+32|0;n=c+12|0;i=c;e=c+8|0;s=qm(4792)|0;Vn(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];Qn(i,s,n);s=t+12|0;e=a[s>>2]|0;l=t+16|0;do{if(e>>>0>=(a[l>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)HA(o);else{u=a[o>>2]|0;h=(a[l>>2]|0)-u|0;l=h>>2;Hn(n,h>>3>>>0>>1>>>0?l>>>0>>0?e:l:r,(a[s>>2]|0)-u>>3,t+16|0);l=n+8|0;s=a[l>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[l>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];l=i+4|0;a[u+4>>2]=a[l>>2];a[i>>2]=0;a[l>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=c;return}function ln(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0;c=Y;Y=Y+32|0;n=c+12|0;i=c;e=c+8|0;s=qm(336)|0;Wi(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];Hi(i,s,n);s=t+12|0;e=a[s>>2]|0;l=t+16|0;do{if(e>>>0>=(a[l>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)HA(o);else{u=a[o>>2]|0;h=(a[l>>2]|0)-u|0;l=h>>2;Hn(n,h>>3>>>0>>1>>>0?l>>>0>>0?e:l:r,(a[s>>2]|0)-u>>3,t+16|0);l=n+8|0;s=a[l>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[l>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];l=i+4|0;a[u+4>>2]=a[l>>2];a[i>>2]=0;a[l>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=c;return}function cn(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0;c=Y;Y=Y+32|0;n=c+12|0;i=c;e=c+8|0;s=qm(324)|0;ga(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];va(i,s,n);s=t+12|0;e=a[s>>2]|0;l=t+16|0;do{if(e>>>0>=(a[l>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)HA(o);else{u=a[o>>2]|0;h=(a[l>>2]|0)-u|0;l=h>>2;Hn(n,h>>3>>>0>>1>>>0?l>>>0>>0?e:l:r,(a[s>>2]|0)-u>>3,t+16|0);l=n+8|0;s=a[l>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[l>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];l=i+4|0;a[u+4>>2]=a[l>>2];a[i>>2]=0;a[l>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=c;return}function un(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0;c=Y;Y=Y+32|0;s=c+12|0;l=c;n=c+8|0;o=qm(64)|0;La(o,a[t+4>>2]|0,e);i=t+8|0;a[n>>2]=0;a[s>>2]=a[n>>2];Pa(l,o,s);o=t+12|0;e=a[o>>2]|0;n=t+16|0;do{if(e>>>0>=(a[n>>2]|0)>>>0){e=(e-(a[i>>2]|0)>>3)+1|0;r=Yn(i)|0;if(r>>>0>>0)HA(i);else{u=a[i>>2]|0;h=(a[n>>2]|0)-u|0;n=h>>2;Hn(s,h>>3>>>0>>1>>>0?n>>>0>>0?e:n:r,(a[o>>2]|0)-u>>3,t+16|0);t=s+8|0;o=a[t>>2]|0;a[o>>2]=a[l>>2];n=l+4|0;a[o+4>>2]=a[n>>2];a[l>>2]=0;a[n>>2]=0;a[t>>2]=o+8;Xn(i,s);qn(s);break}}else{jn(s,i,1);h=s+4|0;u=a[h>>2]|0;a[u>>2]=a[l>>2];t=l+4|0;a[u+4>>2]=a[t>>2];a[l>>2]=0;a[t>>2]=0;a[h>>2]=u+8;Wn(s)}}while(0);Un(l);Y=c;return}function hn(t,e){t=t|0;e=e|0;var r=0,i=0;r=Y;Y=Y+48|0;i=r;a[t>>2]=e;n[t+4>>0]=0;Co(t+8|0,e);Co(t+20|0,e);Br(i,256,0,0);To(t+32|0,e,i);Mr(i);Y=r;return}function fn(t){t=t|0;Bo(t+32|0);Va(t+20|0);Va(t+8|0);return}function dn(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){Qg[a[(a[t>>2]|0)+8>>2]&255](t);sA(t)}return}function pn(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0;n=Y;Y=Y+16|0;i=n+4|0;s=n;o=qm(12)|0;ko(o,e,r);a[s>>2]=0;a[i>>2]=a[s>>2];Lo(t,o,i);Y=n;return}function mn(t){t=t|0;Kn(t);jo(t+4784|0);return}function An(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0;n=Y;Y=Y+16|0;i=n+4|0;s=n;o=qm(12)|0;Wo(o,e,r);a[s>>2]=0;a[i>>2]=a[s>>2];Ho(t,o,i);Y=n;return}function gn(t){t=t|0;Kn(t);as(t+4784|0);return}function vn(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0;n=Y;Y=Y+16|0;i=n+4|0;s=n;o=qm(12)|0;os(o,e,r);a[s>>2]=0;a[i>>2]=a[s>>2];ss(t,o,i);Y=n;return}function yn(t){t=t|0;Kn(t);ys(t+4784|0);return}function bn(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0;n=Y;Y=Y+16|0;i=n+4|0;s=n;o=qm(12)|0;bs(o,e,r);a[s>>2]=0;a[i>>2]=a[s>>2];xs(t,o,i);Y=n;return}function xn(t){t=t|0;Kn(t);Ls(t+4784|0);return}function wn(t,e){t=t|0;e=e|0;return(En(t,e)|0)^1|0}function _n(){if((n[21456]|0)==0?Um(21456)|0:0){Ve(21536,6,20,2);Qm(21456)}return 21536}function En(t,e){t=t|0;e=e|0;if((a[t>>2]|0)==(a[e>>2]|0)?(a[t+8>>2]|0)==(a[e+8>>2]|0):0)t=(a[t+4>>2]|0)==(a[e+4>>2]|0);else t=0;return t|0}function Mn(){if((n[21464]|0)==0?Um(21464)|0:0){Ve(21548,7,8,2);Qm(21464)}return 21548}function Sn(){if((n[21472]|0)==0?Um(21472)|0:0){Ve(21560,8,6,2);Qm(21472)}return 21560}function Cn(t){t=t|0;mm(t);tm(t);return}function Tn(t,e){t=t|0;e=e|0;Rn(t);a[t>>2]=4624;a[t+4>>2]=e;a[t+8>>2]=0;a[t+12>>2]=0;a[t+16>>2]=0;n[t+20>>0]=1;return}function In(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4664;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Fn(t,n);Y=r;return}function Rn(t){t=t|0;a[t>>2]=4644;return}function Bn(t,e){t=t|0;e=e|0;var r=0,i=0,o=0,s=0,l=0,c=0,u=0;u=Y;Y=Y+16|0;s=u;r=a[t+8>>2]|0;l=a[t+12>>2]|0;if((r|0)!=(l|0)){c=s+4|0;do{i=a[r>>2]|0;a[s>>2]=i;o=a[r+4>>2]|0;a[c>>2]=o;if(o|0){o=o+4|0;a[o>>2]=(a[o>>2]|0)+1}e=Gg[a[(a[i>>2]|0)+12>>2]&63](i,e)|0;Un(s);r=r+8|0}while((r|0)!=(l|0))}r=t+20|0;if(n[r>>0]|0){n[r>>0]=0;ir(a[t+4>>2]|0)}Y=u;return e|0}function kn(t){t=t|0;a[t>>2]=4624;On(t+8|0);Pn(t);return}function Ln(t){t=t|0;kn(t);tm(t);return}function Pn(t){t=t|0;return}function Dn(t){t=t|0;q()}function Un(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){Qg[a[(a[t>>2]|0)+8>>2]&255](t);sA(t)}return}function On(t){t=t|0;var e=0,r=0,n=0;r=a[t>>2]|0;if(r|0){n=t+4|0;e=a[n>>2]|0;if((e|0)==(r|0))e=r;else{do{e=e+-8|0;Un(e)}while((e|0)!=(r|0));e=a[t>>2]|0}a[n>>2]=r;bt(e,(a[t+8>>2]|0)-e|0)}return}function Fn(t,e){t=t|0;e=e|0;return}function Nn(t){t=t|0;oA(t);tm(t);return}function zn(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+8>>2]&255](t);return}function Gn(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==8546?t+12|0:0)|0}function Zn(t){t=t|0;bt(t,16);return}function Vn(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=4692;a[t+4>>2]=e;Kn(t+8|0);return}function Qn(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4740;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function jn(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;e=a[e+4>>2]|0;a[t+4>>2]=e;a[t+8>>2]=e+(r<<3);return}function Wn(t){t=t|0;a[(a[t>>2]|0)+4>>2]=a[t+4>>2];return}function Hn(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0;i=t+12|0;a[i>>2]=0;a[t+16>>2]=n;do{if(e){if(e>>>0>536870911){i=E(8)|0;fA(i,6723);a[i>>2]=5956;S(i|0,3928,123)}else{n=qm(e<<3)|0;break}}else n=0}while(0);a[t>>2]=n;r=n+(r<<3)|0;a[t+8>>2]=r;a[t+4>>2]=r;a[i>>2]=n+(e<<3);return}function Xn(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,l=0,c=0;l=a[t>>2]|0;c=t+4|0;r=a[c>>2]|0;s=e+4|0;if((r|0)==(l|0)){i=s;o=t;n=a[s>>2]|0;r=l}else{n=a[s>>2]|0;do{o=r;r=r+-8|0;a[n+-8>>2]=a[r>>2];o=o+-4|0;a[n+-4>>2]=a[o>>2];a[r>>2]=0;a[o>>2]=0;n=(a[s>>2]|0)+-8|0;a[s>>2]=n}while((r|0)!=(l|0));i=s;o=t;r=a[t>>2]|0}a[o>>2]=n;a[i>>2]=r;l=e+8|0;s=a[c>>2]|0;a[c>>2]=a[l>>2];a[l>>2]=s;l=t+8|0;c=e+12|0;t=a[l>>2]|0;a[l>>2]=a[c>>2];a[c>>2]=t;a[e>>2]=a[i>>2];return}function qn(t){t=t|0;var e=0,r=0,n=0,i=0;r=a[t+4>>2]|0;n=t+8|0;e=a[n>>2]|0;if((e|0)!=(r|0))do{i=e+-8|0;a[n>>2]=i;Un(i);e=a[n>>2]|0}while((e|0)!=(r|0));e=a[t>>2]|0;if(e|0)bt(e,(a[t+12>>2]|0)-e|0);return}function Yn(t){t=t|0;return 536870911}function Jn(t){t=t|0;a[t>>2]=4716;return}function Kn(t){t=t|0;oi(t);si(t+3980|0);li(t+4380|0);n[t+4780>>0]=0;n[t+4781>>0]=0;return}function $n(t){t=t|0;a[t>>2]=4692;gi(t+8|0);ni(t);return}function ti(t){t=t|0;$n(t);tm(t);return}function ei(t,e){t=t|0;e=e|0;return e|0}function ri(t,e){t=t|0;e=e|0;return yi(t+8|0,a[t+4>>2]|0,e)|0}function ni(t){t=t|0;return}function ii(t){t=t|0;ni(t);tm(t);return}function ai(t,e){t=t|0;e=e|0;return e|0}function oi(t){t=t|0;var e=0,r=0;hi(t);fi(t+52|0);fi(t+436|0);Br(t+852|0,64,0,0);n[t+3976>>0]=0;e=t+20|0;r=e+32|0;do{i[e>>1]=0;e=e+2|0}while((e|0)<(r|0));e=qm(44)|0;Br(e,256,0,0);a[t+896>>2]=e;e=qm(44)|0;Br(e,256,0,0);a[t+900>>2]=e;e=t+820|0;a[e>>2]=0;a[e+4>>2]=0;a[e+8>>2]=0;a[e+12>>2]=0;a[e+16>>2]=0;a[e+20>>2]=0;a[e+24>>2]=0;a[e+28>>2]=0;e=0;do{r=qm(44)|0;Br(r,256,0,0);a[t+904+(e<<2)>>2]=r;r=qm(44)|0;Br(r,256,0,0);a[t+1928+(e<<2)>>2]=r;r=qm(44)|0;Br(r,256,0,0);a[t+2952+(e<<2)>>2]=r;e=e+1|0}while(e>>>0<256);return}function si(t){t=t|0;mi(t,16,4,8,0);mi(t+80|0,16,1,8,0);mi(t+160|0,32,2,8,0);mi(t+240|0,32,22,8,0);mi(t+320|0,32,20,8,0);return}function li(t){t=t|0;nr(t,16,4,8,0);nr(t+80|0,16,1,8,0);nr(t+160|0,32,2,8,0);nr(t+240|0,32,22,8,0);nr(t+320|0,32,20,8,0);return}function ci(t){t=t|0;Ai(t+320|0);Ai(t+240|0);Ai(t+160|0);Ai(t+80|0);Ai(t);return}function ui(t){t=t|0;var e=0,r=0;e=a[t+896>>2]|0;if(e|0){Mr(e);tm(e)}e=a[t+900>>2]|0;if(e|0){Mr(e);tm(e)}r=0;do{e=a[t+904+(r<<2)>>2]|0;if(e|0){Mr(e);tm(e)}e=a[t+1928+(r<<2)>>2]|0;if(e|0){Mr(e);tm(e)}e=a[t+2952+(r<<2)>>2]|0;if(e|0){Mr(e);tm(e)}r=r+1|0}while((r|0)!=256);Mr(t+852|0);return}function hi(t){t=t|0;var e=0;n[t>>0]=0;n[t+1>>0]=0;n[t+2>>0]=0;n[t+3>>0]=0;e=t+4|0;n[e>>0]=0;n[e+1>>0]=0;n[e+2>>0]=0;n[e+3>>0]=0;t=t+12|0;e=t;n[e>>0]=0;n[e+1>>0]=0;n[e+2>>0]=0;n[e+3>>0]=0;t=t+4|0;n[t>>0]=0;n[t+1>>0]=0;n[t+2>>0]=0;n[t+3>>0]=0;return}function fi(t){t=t|0;var e=0;e=t+384|0;do{di(t);t=t+24|0}while((t|0)!=(e|0));return}function di(t){t=t|0;pi(t);return}function pi(t){t=t|0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;a[t+12>>2]=0;a[t+16>>2]=0;n[t+20>>0]=1;return}function mi(t,e,r,n,i){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;var o=0;a[t+4>>2]=e;a[t+8>>2]=r;a[t+12>>2]=n;a[t+16>>2]=i;a[t+36>>2]=0;a[t+40>>2]=0;a[t+44>>2]=0;_r(t+48|0);a[t+68>>2]=0;a[t+72>>2]=0;a[t+76>>2]=0;do{if(!i){r=t+20|0;if((e+-1|0)>>>0<31){a[r>>2]=e;i=1<>2]=i;r=i>>>1;a[t+28>>2]=0-r;r=i+-1-r|0;break}else{a[r>>2]=32;a[t+24>>2]=0;a[t+28>>2]=-2147483648;r=2147483647;break}}else{n=t+20|0;a[n>>2]=0;a[t+24>>2]=i;r=i;o=0;while(1){r=r>>>1;e=o+1|0;if(!r)break;else o=e}a[n>>2]=(1<>>1;a[t+28>>2]=0-r;r=i+-1-r|0}}while(0);a[t+32>>2]=r;a[t>>2]=0;return}function Ai(t){t=t|0;var e=0,r=0,n=0,i=0,o=0;o=t+36|0;r=a[o>>2]|0;n=t+40|0;e=a[n>>2]|0;if((e|0)!=(r|0))do{e=e+-44|0;Mr(e)}while((e|0)!=(r|0));a[n>>2]=r;n=t+68|0;i=a[n>>2]|0;r=t+72|0;e=a[r>>2]|0;if((e|0)!=(i|0))do{e=e+-44|0;Mr(e)}while((e|0)!=(i|0));a[r>>2]=i;Er(n);Er(o);return}function gi(t){t=t|0;vi(t+4380|0);ci(t+3980|0);ui(t);return}function vi(t){t=t|0;sr(t+320|0);sr(t+240|0);sr(t+160|0);sr(t+80|0);sr(t);return}function yi(t,e,r){t=t|0;e=e|0;r=r|0;var l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0,A=0;m=Y;Y=Y+32|0;p=m;l=t+4781|0;if(!(n[l>>0]|0)){bi(t+4380|0);n[l>>0]=1}l=t+3976|0;if(!(n[l>>0]|0)){n[l>>0]=1;wi(xi(e)|0,r,20);_i(p,r);u=t;l=p;c=u+20|0;do{n[u>>0]=n[l>>0]|0;u=u+1|0;l=l+1|0}while((u|0)<(c|0));i[t+12>>1]=0}else{f=Zr(e,t+852|0)|0;if(f){if(f&32|0)Mi((Zr(e,a[t+904+(((Ei(t)|0)&255)<<2)>>2]|0)|0)&255,t);d=t+14|0;u=n[d>>0]|0;l=u&7;u=(u&255)>>>3&7;c=o[16+(u<<3)+l>>0]|0;l=o[80+(u<<3)+l>>0]|0;if(!(f&16))h=i[t+20+(c<<1)>>1]|0;else{A=t+20+(c<<1)|0;h=(or(t+4380|0,e,s[A>>1]|0,c>>>0<3?c:3)|0)&65535;i[A>>1]=h}i[t+12>>1]=h;if(f&8|0){A=t+15|0;n[A>>0]=Zr(e,a[t+1928+(o[A>>0]<<2)>>2]|0)|0}if(f&4|0){d=Zr(e,a[t+896+(((o[d>>0]|0)>>>6&1)<<2)>>2]|0)|0;A=t+16|0;n[A>>0]=Si(d+(n[A>>0]|0)|0)|0}if(f&2|0){A=t+17|0;n[A>>0]=Zr(e,a[t+2952+(o[A>>0]<<2)>>2]|0)|0}if(f&1){A=t+18|0;i[A>>1]=or(t+4460|0,e,s[A>>1]|0,0)|0}}else{A=n[t+14>>0]|0;l=A&7;A=(A&255)>>>3&7;u=A;c=o[16+(A<<3)+l>>0]|0;l=o[80+(A<<3)+l>>0]|0}h=t+52+(c*24|0)|0;f=t+4540|0;d=(u|0)==1&1;u=or(f,e,Ci(h)|0,d)|0;a[p>>2]=u;a[t>>2]=(a[t>>2]|0)+u;Ti(h,p);h=t+436+(c*24|0)|0;u=Ci(h)|0;c=Ii(f)|0;A=t+4620|0;c=or(A,e,u,(c>>>0<20?c&-2:20)|d)|0;a[p>>2]=c;u=t+4|0;a[u>>2]=(a[u>>2]|0)+c;Ti(h,p);p=Ii(f)|0;p=(Ii(A)|0)+p|0;A=t+820+(l<<2)|0;p=or(t+4700|0,e,a[A>>2]|0,(p>>>0<36?p>>>1&2147483646:18)|d)|0;a[t+8>>2]=p;a[A>>2]=p;Ri(t,r)}Y=m;return r+20|0}function bi(t){t=t|0;ar(t);ar(t+80|0);ar(t+160|0);ar(t+240|0);ar(t+320|0);return}function xi(t){t=t|0;return a[t>>2]|0}function wi(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,l=0,c=0,u=0;u=t+4|0;i=a[u>>2]|0;c=(a[t+8>>2]|0)-i|0;c=c>>>0>r>>>0?r:c;l=t+12|0;o=(a[l>>2]|0)+i|0;s=o+c|0;if(c){i=o;o=e;while(1){n[o>>0]=n[i>>0]|0;i=i+1|0;if((i|0)==(s|0))break;else o=o+1|0}i=a[u>>2]|0}a[u>>2]=i+c;r=r-c|0;if(r|0){Cr(t);o=(a[l>>2]|0)+(a[u>>2]|0)|0;s=o+r|0;i=e+c|0;while(1){n[i>>0]=n[o>>0]|0;o=o+1|0;if((o|0)==(s|0))break;else i=i+1|0}a[u>>2]=(a[u>>2]|0)+r}return}function _i(t,e){t=t|0;e=e|0;hi(t);a[t>>2]=Bi(e)|0;a[t+4>>2]=Bi(e+4|0)|0;a[t+8>>2]=Bi(e+8|0)|0;i[t+12>>1]=ki(e+12|0)|0;Mi(Li(e+14|0)|0,t);n[t+15>>0]=Li(e+15|0)|0;n[t+16>>0]=Pi(e+16|0)|0;n[t+17>>0]=Pi(e+17|0)|0;i[t+18>>1]=ki(e+18|0)|0;return}function Ei(t){t=t|0;return n[t+14>>0]|0}function Mi(t,e){t=t|0;e=e|0;n[e+14>>0]=t;return}function Si(t){t=t|0;return t&255|0}function Ci(t){t=t|0;return a[t+8>>2]|0}function Ti(t,e){t=t|0;e=e|0;var r=0,i=0,o=0,s=0,l=0,c=0,u=0;u=t+20|0;do{if(!(n[u>>0]|0)){c=t+8|0;r=a[c>>2]|0;i=a[e>>2]|0;o=t+4|0;s=a[o>>2]|0;if((r|0)>=(i|0)){if((s|0)<(i|0)){a[t>>2]=s;a[o>>2]=a[e>>2]}else a[t>>2]=i;n[u>>0]=1;break}a[t>>2]=s;a[o>>2]=r;o=t+16|0;s=a[o>>2]|0;l=a[e>>2]|0;r=t+12|0;i=a[r>>2]|0;if((s|0)<(l|0)){a[c>>2]=i;a[r>>2]=s;a[o>>2]=a[e>>2];break}if((i|0)<(l|0)){a[c>>2]=i;a[r>>2]=a[e>>2];break}else{a[c>>2]=l;break}}else{o=a[e>>2]|0;l=t+8|0;r=a[l>>2]|0;s=t+12|0;i=a[s>>2]|0;if((o|0)>=(r|0)){r=t+16|0;if((o|0)<(i|0)){a[r>>2]=i;a[s>>2]=a[e>>2]}else a[r>>2]=o;n[u>>0]=0;break}a[t+16>>2]=i;a[s>>2]=r;r=a[e>>2]|0;i=a[t>>2]|0;o=t+4|0;s=a[o>>2]|0;if((r|0)<(i|0)){a[l>>2]=s;a[o>>2]=i;a[t>>2]=a[e>>2];break}if((r|0)<(s|0)){a[l>>2]=s;a[o>>2]=a[e>>2];break}else{a[l>>2]=r;break}}}while(0);return}function Ii(t){t=t|0;return a[t>>2]|0}function Ri(t,e){t=t|0;e=e|0;var r=0;Ui(o[t>>0]|o[t+1>>0]<<8|o[t+2>>0]<<16|o[t+3>>0]<<24,e);r=t+4|0;Ui(o[r>>0]|o[r+1>>0]<<8|o[r+2>>0]<<16|o[r+3>>0]<<24,e+4|0);r=t+8|0;Ui(o[r>>0]|o[r+1>>0]<<8|o[r+2>>0]<<16|o[r+3>>0]<<24,e+8|0);r=t+12|0;Oi(o[r>>0]|o[r+1>>0]<<8,e+12|0);Fi(Ei(t)|0,e+14|0);Fi(n[t+15>>0]|0,e+15|0);Ni(n[t+16>>0]|0,e+16|0);Ni(n[t+17>>0]|0,e+17|0);t=t+18|0;Oi(o[t>>0]|o[t+1>>0]<<8,e+18|0);return}function Bi(t){t=t|0;return Di(t)|0}function ki(t){t=t|0;return(n[t+1>>0]<<8|o[t>>0])&65535|0}function Li(t){t=t|0;return n[t>>0]|0}function Pi(t){t=t|0;return n[t>>0]|0}function Di(t){t=t|0;return(o[t+1>>0]|0)<<8|(o[t>>0]|0)|(o[t+2>>0]|0)<<16|(o[t+3>>0]|0)<<24|0}function Ui(t,e){t=t|0;e=e|0;zi(t,e);return}function Oi(t,e){t=t|0;e=e|0;n[e+1>>0]=(t&65535)>>>8;n[e>>0]=t;return}function Fi(t,e){t=t|0;e=e|0;n[e>>0]=t;return}function Ni(t,e){t=t|0;e=e|0;n[e>>0]=t;return}function zi(t,e){t=t|0;e=e|0;n[e+3>>0]=t>>>24;n[e+2>>0]=t>>>16;n[e+1>>0]=t>>>8;n[e>>0]=t;return}function Gi(t,e){t=t|0;e=e|0;return}function Zi(t){t=t|0;oA(t);tm(t);return}function Vi(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+4>>2]&255](t);return}function Qi(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==9202?t+12|0:0)|0}function ji(t){t=t|0;bt(t,16);return}function Wi(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=4768;a[t+4>>2]=e;Xi(t+8|0);return}function Hi(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4792;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function Xi(t){t=t|0;Ki(t);$i(t+164|0);ta(t+244|0);n[t+324>>0]=0;n[t+325>>0]=0;return}function qi(t){t=t|0;a[t>>2]=4768;aa(t+8|0);ni(t);return}function Yi(t){t=t|0;qi(t);tm(t);return}function Ji(t,e){t=t|0;e=e|0;return sa(t+8|0,a[t+4>>2]|0,e)|0}function Ki(t){t=t|0;var e=0,r=0,i=0,o=0,s=0,l=0,c=0;s=Y;Y=Y+16|0;i=s;n[t>>0]=0;Br(t+4|0,516,0,0);Br(t+48|0,6,0,0);a[t+92>>2]=0;a[t+96>>2]=0;r=t+100|0;na(r);ia(i);o=a[i>>2]|0;i=a[i+4>>2]|0;e=4;while(1){l=r;c=l;n[c>>0]=o;n[c+1>>0]=o>>8;n[c+2>>0]=o>>16;n[c+3>>0]=o>>24;l=l+4|0;n[l>>0]=i;n[l+1>>0]=i>>8;n[l+2>>0]=i>>16;n[l+3>>0]=i>>24;e=e+-1|0;if(!e)break;else r=r+8|0}c=t+132|0;a[c>>2]=0;a[c+4>>2]=0;a[c+8>>2]=0;a[c+12>>2]=0;a[c+16>>2]=0;a[c+20>>2]=0;a[c+24>>2]=0;a[c+28>>2]=0;Y=s;return}function $i(t){t=t|0;mi(t,32,9,8,0);return}function ta(t){t=t|0;nr(t,32,9,8,0);return}function ea(t){t=t|0;Ai(t);return}function ra(t){t=t|0;Mr(t+48|0);Mr(t+4|0);return}function na(t){t=t|0;var e=0;e=t+32|0;do{ia(t);t=t+8|0}while((t|0)!=(e|0));return}function ia(t){t=t|0;var e=0;e=t;n[e>>0]=0;n[e+1>>0]=0;n[e+2>>0]=0;n[e+3>>0]=0;t=t+4|0;n[t>>0]=0;n[t+1>>0]=0;n[t+2>>0]=0;n[t+3>>0]=0;return}function aa(t){t=t|0;oa(t+244|0);ea(t+164|0);ra(t);return}function oa(t){t=t|0;sr(t);return}function sa(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,s=0,l=0,c=0,u=0;i=t+325|0;if(!(n[i>>0]|0)){la(t+244|0);n[i>>0]=1}if(!(n[t>>0]|0)){n[t>>0]=1;wi(xi(e)|0,r,8);l=ca(r)|0;c=_()|0;t=t+100|0;e=t;n[e>>0]=l;n[e+1>>0]=l>>8;n[e+2>>0]=l>>16;n[e+3>>0]=l>>24;t=t+4|0;n[t>>0]=c;n[t+1>>0]=c>>8;n[t+2>>0]=c>>16;n[t+3>>0]=c>>24}else{c=t+92|0;t:do{if(!(a[t+132+(a[c>>2]<<2)>>2]|0)){i=Zr(e,t+48|0)|0;switch(i|0){case 1:{e=or(t+244|0,e,0,0)|0;a[t+132+(a[c>>2]<<2)>>2]=e;e=a[c>>2]|0;u=a[t+132+(e<<2)>>2]|0;l=t+100+(e<<3)|0;s=l;i=s;s=s+4|0;u=rg(o[i>>0]|o[i+1>>0]<<8|o[i+2>>0]<<16|o[i+3>>0]<<24|0,o[s>>0]|o[s+1>>0]<<8|o[s+2>>0]<<16|o[s+3>>0]<<24|0,u|0,((u|0)<0)<<31>>31|0)|0;s=_()|0;i=l;n[i>>0]=u;n[i+1>>0]=u>>8;n[i+2>>0]=u>>16;n[i+3>>0]=u>>24;l=l+4|0;n[l>>0]=s;n[l+1>>0]=s>>8;n[l+2>>0]=s>>16;n[l+3>>0]=s>>24;a[t+148+(e<<2)>>2]=0;break t}case 2:{u=t+96|0;a[u>>2]=(a[u>>2]|0)+1&3;l=t+100+(a[c>>2]<<3)+4|0;l=or(t+244|0,e,o[l>>0]|o[l+1>>0]<<8|o[l+2>>0]<<16|o[l+3>>0]<<24,8)|0;i=t+100+(a[u>>2]<<3)|0;s=i;n[s>>0]=0;n[s+1>>0]=0;n[s+2>>0]=0;n[s+3>>0]=0;i=i+4|0;n[i>>0]=l;n[i+1>>0]=l>>8;n[i+2>>0]=l>>16;n[i+3>>0]=l>>24;i=ua(e)|0;u=a[u>>2]|0;e=t+100+(u<<3)|0;l=e;s=l;l=l+4|0;l=o[l>>0]|o[l+1>>0]<<8|o[l+2>>0]<<16|o[l+3>>0]<<24;i=o[s>>0]|o[s+1>>0]<<8|o[s+2>>0]<<16|o[s+3>>0]<<24|i;s=e;n[s>>0]=i;n[s+1>>0]=i>>8;n[s+2>>0]=i>>16;n[s+3>>0]=i>>24;e=e+4|0;n[e>>0]=l;n[e+1>>0]=l>>8;n[e+2>>0]=l>>16;n[e+3>>0]=l>>24;a[c>>2]=u;a[t+132+(u<<2)>>2]=0;a[t+148+(a[c>>2]<<2)>>2]=0;break t}default:{if((i|0)<=2)break t;a[c>>2]=i+2+(a[c>>2]|0)&3;sa(t,e,r)|0;break t}}}else{l=Zr(e,t+4|0)|0;if((l|0)==1){i=or(t+244|0,e,a[t+132+(a[c>>2]<<2)>>2]|0,1)|0;u=a[c>>2]|0;e=t+100+(u<<3)|0;l=e;s=l;l=l+4|0;i=rg(o[s>>0]|o[s+1>>0]<<8|o[s+2>>0]<<16|o[s+3>>0]<<24|0,o[l>>0]|o[l+1>>0]<<8|o[l+2>>0]<<16|o[l+3>>0]<<24|0,i|0,((i|0)<0)<<31>>31|0)|0;l=_()|0;s=e;n[s>>0]=i;n[s+1>>0]=i>>8;n[s+2>>0]=i>>16;n[s+3>>0]=i>>24;e=e+4|0;n[e>>0]=l;n[e+1>>0]=l>>8;n[e+2>>0]=l>>16;n[e+3>>0]=l>>24;a[t+148+(u<<2)>>2]=0;break}if((l|0)>=511){if((l|0)==512){u=t+96|0;a[u>>2]=(a[u>>2]|0)+1&3;l=t+100+(a[c>>2]<<3)+4|0;l=or(t+244|0,e,o[l>>0]|o[l+1>>0]<<8|o[l+2>>0]<<16|o[l+3>>0]<<24,8)|0;i=t+100+(a[u>>2]<<3)|0;s=i;n[s>>0]=0;n[s+1>>0]=0;n[s+2>>0]=0;n[s+3>>0]=0;i=i+4|0;n[i>>0]=l;n[i+1>>0]=l>>8;n[i+2>>0]=l>>16;n[i+3>>0]=l>>24;i=ua(e)|0;u=a[u>>2]|0;e=t+100+(u<<3)|0;l=e;s=l;l=l+4|0;l=o[l>>0]|o[l+1>>0]<<8|o[l+2>>0]<<16|o[l+3>>0]<<24;i=o[s>>0]|o[s+1>>0]<<8|o[s+2>>0]<<16|o[s+3>>0]<<24|i;s=e;n[s>>0]=i;n[s+1>>0]=i>>8;n[s+2>>0]=i>>16;n[s+3>>0]=i>>24;e=e+4|0;n[e>>0]=l;n[e+1>>0]=l>>8;n[e+2>>0]=l>>16;n[e+3>>0]=l>>24;a[c>>2]=u;a[t+132+(u<<2)>>2]=0;a[t+148+(a[c>>2]<<2)>>2]=0;break}if((l|0)<=511)break;a[c>>2]=(a[c>>2]|0)+l&3;sa(t,e,r)|0;break}do{if(!l){i=or(t+244|0,e,0,7)|0;s=t+148+(a[c>>2]<<2)|0;a[s>>2]=(a[s>>2]|0)+1;s=a[c>>2]|0;if((a[t+148+(s<<2)>>2]|0)>3){a[t+132+(s<<2)>>2]=i;a[t+148+(a[c>>2]<<2)>>2]=0}}else{if((l|0)<500){i=t+244|0;s=y(a[t+132+(a[c>>2]<<2)>>2]|0,l)|0;if((l|0)<10){i=or(i,e,s,2)|0;break}else{i=or(i,e,s,3)|0;break}}if((l|0)==500){i=or(t+244|0,e,(a[t+132+(a[c>>2]<<2)>>2]|0)*500|0,4)|0;s=t+148+(a[c>>2]<<2)|0;a[s>>2]=(a[s>>2]|0)+1;s=a[c>>2]|0;if((a[t+148+(s<<2)>>2]|0)<=3)break;a[t+132+(s<<2)>>2]=i;a[t+148+(a[c>>2]<<2)>>2]=0;break}i=500-l|0;s=t+244|0;l=a[t+132+(a[c>>2]<<2)>>2]|0;if((i|0)>-10){i=or(s,e,y(l,i)|0,5)|0;break}i=or(s,e,y(l,-10)|0,6)|0;s=t+148+(a[c>>2]<<2)|0;a[s>>2]=(a[s>>2]|0)+1;s=a[c>>2]|0;if((a[t+148+(s<<2)>>2]|0)>3){a[t+132+(s<<2)>>2]=i;a[t+148+(a[c>>2]<<2)>>2]=0}}}while(0);u=t+100+(a[c>>2]<<3)|0;s=u;e=s;s=s+4|0;s=rg(o[e>>0]|o[e+1>>0]<<8|o[e+2>>0]<<16|o[e+3>>0]<<24|0,o[s>>0]|o[s+1>>0]<<8|o[s+2>>0]<<16|o[s+3>>0]<<24|0,i|0,((i|0)<0)<<31>>31|0)|0;e=_()|0;l=u;n[l>>0]=s;n[l+1>>0]=s>>8;n[l+2>>0]=s>>16;n[l+3>>0]=s>>24;u=u+4|0;n[u>>0]=e;n[u+1>>0]=e>>8;n[u+2>>0]=e>>16;n[u+3>>0]=e>>24}}while(0);ha(t+100+(a[c>>2]<<3)|0,r)}return r+8|0}function la(t){t=t|0;ar(t);return}function ca(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;n=Di(t)|0;fa(r,n,Di(t+4|0)|0);t=a[r>>2]|0;w(a[r+4>>2]|0);Y=e;return t|0}function ua(t){t=t|0;var e=0;e=(Wr(t)|0)&65535;return((Wr(t)|0)&65535)<<16|e|0}function ha(t,e){t=t|0;e=e|0;var r=0;r=t;zi(o[r>>0]|o[r+1>>0]<<8|o[r+2>>0]<<16|o[r+3>>0]<<24,e);t=t+4|0;zi(o[t>>0]|o[t+1>>0]<<8|o[t+2>>0]<<16|o[t+3>>0]<<24,e+4|0);return}function fa(t,e,r){t=t|0;e=e|0;r=r|0;var i=0;i=t;n[i>>0]=e;n[i+1>>0]=e>>8;n[i+2>>0]=e>>16;n[i+3>>0]=e>>24;e=t+4|0;n[e>>0]=r;n[e+1>>0]=r>>8;n[e+2>>0]=r>>16;n[e+3>>0]=r>>24;return}function da(t){t=t|0;oA(t);tm(t);return}function pa(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+4>>2]&255](t);return}function ma(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==9890?t+12|0:0)|0}function Aa(t){t=t|0;bt(t,16);return}function ga(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=4820;a[t+4>>2]=e;ya(t+8|0);return}function va(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4844;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function ya(t){t=t|0;n[t>>0]=0;_a(t+1|0);Br(t+8|0,128,0,0);Br(t+52|0,256,0,0);Br(t+96|0,256,0,0);Br(t+140|0,256,0,0);Br(t+184|0,256,0,0);Br(t+228|0,256,0,0);Br(t+272|0,256,0,0);return}function ba(t){t=t|0;a[t>>2]=4820;Ea(t+8|0);ni(t);return}function xa(t){t=t|0;ba(t);tm(t);return}function wa(t,e){t=t|0;e=e|0;return Ma(t+8|0,a[t+4>>2]|0,e)|0}function _a(t){t=t|0;var e=0;n[t>>0]=0;n[t+1>>0]=0;e=t+2|0;n[e>>0]=0;n[e+1>>0]=0;t=t+4|0;n[t>>0]=0;n[t+1>>0]=0;return}function Ea(t){t=t|0;Mr(t+272|0);Mr(t+228|0);Mr(t+184|0);Mr(t+140|0);Mr(t+96|0);Mr(t+52|0);Mr(t+8|0);return}function Ma(t,e,r){t=t|0;e=e|0;r=r|0;var a=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0;p=Y;Y=Y+16|0;f=p;if(!(n[t>>0]|0)){n[t>>0]=1;wi(xi(e)|0,r,6);Sa(f,r);d=t+1|0;n[d>>0]=n[f>>0]|0;n[d+1>>0]=n[f+1>>0]|0;n[d+2>>0]=n[f+2>>0]|0;n[d+3>>0]=n[f+3>>0]|0;n[d+4>>0]=n[f+4>>0]|0;n[d+5>>0]=n[f+5>>0]|0}else{d=Zr(e,t+8|0)|0;_a(f);if(!(d&1)){a=t+1|0;a=(o[a>>0]|o[a+1>>0]<<8)&255}else{h=(Zr(e,t+52|0)|0)&255;a=t+1|0;a=(Si(h+((o[a>>0]|o[a+1>>0]<<8)&255)|0)|0)&255}i[f>>1]=a;if(!(d&2)){h=t+1|0;a=a|(o[h>>0]|o[h+1>>0]<<8)&-256}else{a=(Zr(e,t+96|0)|0)&255;h=t+1|0;a=((Si((((o[h>>0]|o[h+1>>0]<<8)&65535)>>>8)+a|0)|0)&255)<<8;a=(a|s[f>>1])&65535}i[f>>1]=a;do{if(d&64){u=t+1|0;l=(a&255)-((o[u>>0]|o[u+1>>0]<<8)&255)|0;if(!(d&4)){a=t+3|0;a=(o[a>>0]|o[a+1>>0]<<8)&255}else{a=(Zr(e,t+140|0)|0)&255;h=t+3|0;h=l+((o[h>>0]|o[h+1>>0]<<8)&255)|0;a=(Si(((h|0)<1?0:(h|0)>254?255:h&255)+a|0)|0)&255}h=f+2|0;i[h>>1]=a;if(!(d&16)){a=t+5|0;a=(o[a>>0]|o[a+1>>0]<<8)&255}else{a=Zr(e,t+228|0)|0;m=t+3|0;c=t+5|0;c=((l+(i[h>>1]&255)-((o[m>>0]|o[m+1>>0]<<8)&255)|0)/2|0)+((o[c>>0]|o[c+1>>0]<<8)&255)|0;a=(Si(((c|0)<1?0:(c|0)>254?255:c&255)+(a&255)|0)|0)&255}c=f+4|0;i[c>>1]=a;a=((s[f>>1]|0)>>>8)-(((o[u>>0]|o[u+1>>0]<<8)&65535)>>>8)|0;if(!(d&8)){l=t+3|0;l=i[h>>1]|(o[l>>0]|o[l+1>>0]<<8)&-256}else{l=(Zr(e,t+184|0)|0)&255;m=t+3|0;m=(((o[m>>0]|o[m+1>>0]<<8)&65535)>>>8)+a|0;l=((Si(((m|0)<1?0:(m|0)>254?255:m&255)+l|0)|0)&255)<<8;l=(l|s[h>>1])&65535}i[h>>1]=l;if(!(d&32)){m=t+5|0;i[c>>1]=i[c>>1]|(o[m>>0]|o[m+1>>0]<<8)&-256;break}else{m=Zr(e,t+272|0)|0;e=t+3|0;d=t+5|0;d=((((s[h>>1]|0)>>>8)+a-(((o[e>>0]|o[e+1>>0]<<8)&65535)>>>8)|0)/2|0)+(((o[d>>0]|o[d+1>>0]<<8)&65535)>>>8)|0;m=((Si(((d|0)<1?0:(d|0)>254?255:d&255)+(m&255)|0)|0)&255)<<8;i[c>>1]=m|s[c>>1];break}}else{i[f+2>>1]=a;i[f+4>>1]=a}}while(0);m=t+1|0;n[m>>0]=n[f>>0]|0;n[m+1>>0]=n[f+1>>0]|0;n[m+2>>0]=n[f+2>>0]|0;n[m+3>>0]=n[f+3>>0]|0;n[m+4>>0]=n[f+4>>0]|0;n[m+5>>0]=n[f+5>>0]|0;Ca(m,r)}Y=p;return r+6|0}function Sa(t,e){t=t|0;e=e|0;var r=0,n=0;n=ki(e)|0;r=ki(e+2|0)|0;Ta(t,n,r,ki(e+4|0)|0);return}function Ca(t,e){t=t|0;e=e|0;var r=0;Oi(o[t>>0]|o[t+1>>0]<<8,e);r=t+2|0;Oi(o[r>>0]|o[r+1>>0]<<8,e+2|0);t=t+4|0;Oi(o[t>>0]|o[t+1>>0]<<8,e+4|0);return}function Ta(t,e,r,i){t=t|0;e=e|0;r=r|0;i=i|0;n[t>>0]=e;n[t+1>>0]=e>>8;e=t+2|0;n[e>>0]=r;n[e+1>>0]=r>>8;r=t+4|0;n[r>>0]=i;n[r+1>>0]=i>>8;return}function Ia(t){t=t|0;oA(t);tm(t);return}function Ra(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+4>>2]&255](t);return}function Ba(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==10570?t+12|0:0)|0}function ka(t){t=t|0;bt(t,16);return}function La(t,e,r){t=t|0;e=e|0;r=r|0;Jn(t);a[t>>2]=4872;a[t+4>>2]=e;Da(t+8|0,r);return}function Pa(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4896;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function Da(t,e){t=t|0;e=e|0;a[t>>2]=a[e>>2];n[t+4>>0]=n[e+4>>0]|0;Na(t+8|0,e+8|0);Na(t+20|0,e+20|0);za(t+32|0,e+32|0);return}function Ua(t){t=t|0;a[t>>2]=4872;fn(t+8|0);ni(t);return}function Oa(t){t=t|0;Ua(t);tm(t);return}function Fa(t,e){t=t|0;e=e|0;return xo(t+8|0,a[t+4>>2]|0,e)|0}function Na(t,e){t=t|0;e=e|0;var r=0,n=0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;r=e+4|0;n=(a[r>>2]|0)-(a[e>>2]|0)|0;if(n|0){Ga(t,n);Za(t,a[e>>2]|0,a[r>>2]|0,n)}return}function za(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;r=Y;Y=Y+32|0;n=r+24|0;i=r+16|0;s=r+8|0;o=r;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;a[t+12>>2]=0;a[t+16>>2]=0;a[t+20>>2]=0;go(s,e);vo(o,e);a[i>>2]=a[s>>2];a[i+4>>2]=a[s+4>>2];a[n>>2]=a[o>>2];a[n+4>>2]=a[o+4>>2];Ha(t,i,n,0);Y=r;return}function Ga(t,e){t=t|0;e=e|0;var r=0;if((Qa(t)|0)>>>0>>0)HA(t);else{r=qm(e)|0;a[t+4>>2]=r;a[t>>2]=r;a[t+8>>2]=r+e;return}}function Za(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,o=0;o=Y;Y=Y+16|0;i=o;ja(i,t,n);n=i+4|0;t=r-e|0;if((t|0)>0){hg(a[n>>2]|0,e|0,t|0)|0;a[n>>2]=(a[n>>2]|0)+t}Wa(i);Y=o;return}function Va(t){t=t|0;var e=0,r=0;e=a[t>>2]|0;r=e;if(e|0){a[t+4>>2]=r;bt(e,(a[t+8>>2]|0)-r|0)}return}function Qa(t){t=t|0;return 2147483647}function ja(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;e=a[e+4>>2]|0;a[t+4>>2]=e;a[t+8>>2]=e+r;return}function Wa(t){t=t|0;a[(a[t>>2]|0)+4>>2]=a[t+4>>2];return}function Ha(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,o=0,s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0,A=0;A=Y;Y=Y+96|0;m=A+80|0;f=A+64|0;c=A+48|0;u=A+40|0;h=A+8|0;l=A;d=A+32|0;p=A+16|0;s=e;o=a[s>>2]|0;s=a[s+4>>2]|0;i=r;r=a[i>>2]|0;i=a[i+4>>2]|0;n=o;if((i|0)==(s|0))s=0;else s=((i-(a[r>>2]|0)|0)/44|0)+((r-o>>2)*93|0)+((s-(a[o>>2]|0)|0)/-44|0)|0;r=(a[t+8>>2]|0)-(a[t+4>>2]|0)|0;r=((r|0)==0?0:((r>>2)*93|0)+-1|0)-((a[t+20>>2]|0)+(a[t+16>>2]|0))|0;if(s>>>0>r>>>0)qa(t,s-r|0);Ya(u,t);Ya(l,t);i=l;r=a[i>>2]|0;i=a[i+4>>2]|0;o=h;a[o>>2]=r;a[o+4>>2]=i;o=r;if(s|0){r=((i-(a[r>>2]|0)|0)/44|0)+s|0;if((r|0)>0){l=(r>>>0)/93|0;s=o+(l<<2)|0;a[h>>2]=s;r=(a[s>>2]|0)+((r-(l*93|0)|0)*44|0)|0}else{r=92-r|0;l=o+(((r|0)/-93|0)<<2)|0;a[h>>2]=l;r=(a[l>>2]|0)+((92-((r|0)%93|0)|0)*44|0)|0}a[h+4>>2]=r}a[f>>2]=a[u>>2];a[f+4>>2]=a[u+4>>2];a[m>>2]=a[h>>2];a[m+4>>2]=a[h+4>>2];Ja(c,f,m);Ka(m,c);$a(f,c);if(to(m,f)|0){o=p+4|0;s=e+4|0;do{eo(d,m);ro(p,t,d);r=a[p>>2]|0;if((r|0)!=(a[o>>2]|0)){i=a[s>>2]|0;do{Nr(r,i);r=(a[p>>2]|0)+44|0;a[p>>2]=r;i=i+44|0;a[s>>2]=i;if((i-(a[n>>2]|0)|0)==4092){n=n+4|0;a[e>>2]=n;i=a[n>>2]|0;a[s>>2]=i}}while((r|0)!=(a[o>>2]|0))}no(p);io(m)|0}while(to(m,f)|0)}Y=A;return}function Xa(t){t=t|0;var e=0,r=0,n=0;e=a[t+4>>2]|0;r=t+8|0;n=a[r>>2]|0;if((n|0)!=(e|0))a[r>>2]=n+(~((n+-4-e|0)>>>2)<<2);e=a[t>>2]|0;if(e|0)bt(e,(a[t+12>>2]|0)-e|0);return}function qa(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0,A=0,g=0,v=0,b=0,x=0,w=0,_=0,E=0,M=0,S=0,C=0,T=0;C=Y;Y=Y+64|0;x=C+52|0;b=C+48|0;w=C+28|0;_=C+24|0;E=C+20|0;m=C;M=t+8|0;r=a[M>>2]|0;S=t+4|0;c=a[S>>2]|0;g=((r|0)==(c|0)&1)+e|0;s=(g>>>0)/93|0;s=s+((g-(s*93|0)|0)!=0&1)|0;g=t+16|0;n=a[g>>2]|0;l=(n>>>0)/93|0;A=s>>>0>>0?s:l;e=s-A|0;o=r;t:do{if(!e){a[g>>2]=(y(A,-93)|0)+n;if(A|0){l=t+12|0;u=t+12|0;h=w+4|0;f=w+8|0;d=w+12|0;e=A;n=c;while(1){s=a[n>>2]|0;o=n+4|0;a[S>>2]=o;v=a[l>>2]|0;n=v;do{if((r|0)==(v|0)){v=a[t>>2]|0;r=v;if(o>>>0<=v>>>0){r=n-r|0;r=(r|0)==0?1:r>>1;so(w,r,r>>>2,u);a[_>>2]=a[S>>2];a[E>>2]=a[M>>2];a[b>>2]=a[_>>2];a[x>>2]=a[E>>2];ho(w,b,x);r=a[t>>2]|0;a[t>>2]=a[w>>2];a[w>>2]=r;r=a[S>>2]|0;a[S>>2]=a[h>>2];a[h>>2]=r;r=a[M>>2]|0;a[M>>2]=a[f>>2];a[f>>2]=r;r=a[l>>2]|0;a[l>>2]=a[d>>2];a[d>>2]=r;uo(w);r=a[M>>2]|0;break}v=o;r=((v-r>>2)+1|0)/-2|0;i=o+(r<<2)|0;n=n-v|0;if(!n)r=i;else{fg(i|0,o|0,n|0)|0;r=(a[S>>2]|0)+(r<<2)|0}v=i+(n>>2<<2)|0;a[M>>2]=v;a[S>>2]=r;r=v}}while(0);a[r>>2]=s;r=(a[M>>2]|0)+4|0;a[M>>2]=r;e=e+-1|0;if(!e)break t;n=a[S>>2]|0}}}else{v=t+12|0;n=a[v>>2]|0;i=n-(a[t>>2]|0)|0;r=o-c>>2;if(e>>>0>((i>>2)-r|0)>>>0){p=i>>1;d=r+e|0;so(m,p>>>0>>0?d:p,r-A|0,t+12|0);do{a[x>>2]=qm(4092)|0;lo(m,x);e=e+-1|0}while((e|0)!=0);if(!A)r=a[S>>2]|0;else{l=m+8|0;c=m+12|0;u=m+4|0;h=m+16|0;f=w+4|0;d=w+8|0;p=w+12|0;s=A;e=a[l>>2]|0;r=a[S>>2]|0;do{o=a[c>>2]|0;n=o;do{if((e|0)==(o|0)){i=a[u>>2]|0;o=a[m>>2]|0;e=o;if(i>>>0<=o>>>0){e=n-e|0;e=(e|0)==0?1:e>>1;so(w,e,e>>>2,a[h>>2]|0);a[_>>2]=a[u>>2];a[E>>2]=a[l>>2];a[b>>2]=a[_>>2];a[x>>2]=a[E>>2];ho(w,b,x);e=a[m>>2]|0;a[m>>2]=a[w>>2];a[w>>2]=e;e=a[u>>2]|0;a[u>>2]=a[f>>2];a[f>>2]=e;e=a[l>>2]|0;a[l>>2]=a[d>>2];a[d>>2]=e;e=a[c>>2]|0;a[c>>2]=a[p>>2];a[p>>2]=e;uo(w);e=a[l>>2]|0;break}T=i;e=((T-e>>2)+1|0)/-2|0;o=i+(e<<2)|0;n=n-T|0;if(!n)e=o;else{fg(o|0,i|0,n|0)|0;e=(a[u>>2]|0)+(e<<2)|0}T=o+(n>>2<<2)|0;a[l>>2]=T;a[u>>2]=e;e=T}}while(0);a[e>>2]=a[r>>2];e=(a[l>>2]|0)+4|0;a[l>>2]=e;r=(a[S>>2]|0)+4|0;a[S>>2]=r;s=s+-1|0}while((s|0)!=0)}e=a[M>>2]|0;if((e|0)!=(r|0)){do{e=e+-4|0;co(m,e);r=a[S>>2]|0}while((e|0)!=(r|0));e=a[M>>2]|0}T=a[t>>2]|0;a[t>>2]=a[m>>2];a[m>>2]=T;T=m+4|0;a[S>>2]=a[T>>2];a[T>>2]=r;T=m+8|0;a[M>>2]=a[T>>2];a[T>>2]=e;T=m+12|0;S=a[v>>2]|0;a[v>>2]=a[T>>2];a[T>>2]=S;a[g>>2]=(a[g>>2]|0)+(y(A,-93)|0);uo(m);break}else{e:do{if((n|0)==(o|0))u=18;else{while(1){a[x>>2]=qm(4092)|0;ao(t,x);e=e+-1|0;if(!e)break;if((a[v>>2]|0)==(a[M>>2]|0)){u=18;break e}}r=A;e=a[g>>2]|0}}while(0);if((u|0)==18){n=~(s>>>0>l>>>0?l:s);r=e;do{a[x>>2]=qm(4092)|0;oo(t,x);r=r+-1|0;i=(((a[M>>2]|0)-(a[S>>2]|0)|0)==4?92:93)+(a[g>>2]|0)|0;a[g>>2]=i}while((r|0)!=0);r=e+-1-n|0;e=i}a[g>>2]=e+(y(r,-93)|0);if(!r)break;l=t+12|0;c=w+4|0;u=w+8|0;h=w+12|0;e=a[M>>2]|0;do{o=a[S>>2]|0;s=a[o>>2]|0;o=o+4|0;a[S>>2]=o;T=a[v>>2]|0;n=T;do{if((e|0)==(T|0)){T=a[t>>2]|0;e=T;if(o>>>0<=T>>>0){e=n-e|0;e=(e|0)==0?1:e>>1;so(w,e,e>>>2,l);a[_>>2]=a[S>>2];a[E>>2]=a[M>>2];a[b>>2]=a[_>>2];a[x>>2]=a[E>>2];ho(w,b,x);e=a[t>>2]|0;a[t>>2]=a[w>>2];a[w>>2]=e;e=a[S>>2]|0;a[S>>2]=a[c>>2];a[c>>2]=e;e=a[M>>2]|0;a[M>>2]=a[u>>2];a[u>>2]=e;e=a[v>>2]|0;a[v>>2]=a[h>>2];a[h>>2]=e;uo(w);e=a[M>>2]|0;break}T=o;e=((T-e>>2)+1|0)/-2|0;i=o+(e<<2)|0;n=n-T|0;if(!n)e=i;else{fg(i|0,o|0,n|0)|0;e=(a[S>>2]|0)+(e<<2)|0}T=i+(n>>2<<2)|0;a[M>>2]=T;a[S>>2]=e;e=T}}while(0);a[e>>2]=s;e=(a[M>>2]|0)+4|0;a[M>>2]=e;r=r+-1|0}while((r|0)!=0)}}}while(0);Y=C;return}function Ya(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;r=(a[e+16>>2]|0)+(a[e+20>>2]|0)|0;o=a[e+4>>2]|0;n=(r>>>0)/93|0;i=o+(n<<2)|0;if((a[e+8>>2]|0)==(o|0))e=0;else e=(a[i>>2]|0)+((r-(n*93|0)|0)*44|0)|0;a[t>>2]=i;a[t+4>>2]=e;return}function Ja(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;i=e;e=a[i+4>>2]|0;n=t;a[n>>2]=a[i>>2];a[n+4>>2]=e;n=r;e=a[n+4>>2]|0;r=t+8|0;a[r>>2]=a[n>>2];a[r+4>>2]=e;return}function Ka(t,e){t=t|0;e=e|0;a[t>>2]=a[e>>2];a[t+4>>2]=a[e+4>>2];a[t+8>>2]=a[e+8>>2];a[t+12>>2]=a[e+12>>2];return}function $a(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,l=0,c=0;r=Y;Y=Y+32|0;n=r+24|0;i=r+16|0;s=r+8|0;o=r;l=e+8|0;c=a[l>>2]|0;l=a[l+4>>2]|0;e=s;a[e>>2]=c;a[e+4>>2]=l;e=o;a[e>>2]=c;a[e+4>>2]=l;a[i>>2]=a[s>>2];a[i+4>>2]=a[s+4>>2];a[n>>2]=a[o>>2];a[n+4>>2]=a[o+4>>2];Ja(t,i,n);Y=r;return}function to(t,e){t=t|0;e=e|0;return(mo(t,e)|0)^1|0}function eo(t,e){t=t|0;e=e|0;var r=0,n=0;r=a[e>>2]|0;n=a[e+4>>2]|0;if((r|0)==(a[e+8>>2]|0))Ao(t,n,a[e+12>>2]|0);else Ao(t,n,(a[r>>2]|0)+4092|0);return}function ro(t,e,r){t=t|0;e=e|0;r=r|0;var n=0;n=a[r>>2]|0;a[t>>2]=n;a[t+4>>2]=a[r+4>>2];a[t+8>>2]=n;a[t+12>>2]=e;return}function no(t){t=t|0;var e=0;e=(a[t+12>>2]|0)+20|0;a[e>>2]=(a[e>>2]|0)+(((a[t>>2]|0)-(a[t+8>>2]|0)|0)/44|0);return}function io(t){t=t|0;var e=0,r=0,n=0;e=a[t>>2]|0;r=t+8|0;if((e|0)==(a[r>>2]|0)){n=r;e=a[n+4>>2]|0;r=t;a[r>>2]=a[n>>2];a[r+4>>2]=e}else{n=e+4|0;a[t>>2]=n;a[t+4>>2]=a[n>>2]}return t|0}function ao(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0,A=0;m=Y;Y=Y+48|0;i=m+32|0;n=m+28|0;l=m+8|0;c=m+4|0;u=m;p=t+8|0;r=a[p>>2]|0;h=t+12|0;d=a[h>>2]|0;o=d;do{if((r|0)==(d|0)){d=t+4|0;f=a[d>>2]|0;A=a[t>>2]|0;s=A;if(f>>>0<=A>>>0){r=o-s|0;r=(r|0)==0?1:r>>1;so(l,r,r>>>2,t+12|0);a[c>>2]=a[d>>2];a[u>>2]=a[p>>2];a[n>>2]=a[c>>2];a[i>>2]=a[u>>2];ho(l,n,i);r=a[t>>2]|0;a[t>>2]=a[l>>2];a[l>>2]=r;r=l+4|0;A=a[d>>2]|0;a[d>>2]=a[r>>2];a[r>>2]=A;r=l+8|0;A=a[p>>2]|0;a[p>>2]=a[r>>2];a[r>>2]=A;r=l+12|0;A=a[h>>2]|0;a[h>>2]=a[r>>2];a[r>>2]=A;uo(l);r=a[p>>2]|0;break}i=f;n=((i-s>>2)+1|0)/-2|0;t=f+(n<<2)|0;i=r-i|0;if(!i)r=t;else{fg(t|0,f|0,i|0)|0;r=(a[d>>2]|0)+(n<<2)|0}A=t+(i>>2<<2)|0;a[p>>2]=A;a[d>>2]=r;r=A}}while(0);a[r>>2]=a[e>>2];a[p>>2]=(a[p>>2]|0)+4;Y=m;return}function oo(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0,A=0;m=Y;Y=Y+48|0;n=m+32|0;r=m+28|0;s=m+8|0;l=m+4|0;c=m;p=t+4|0;f=a[p>>2]|0;d=a[t>>2]|0;u=d;do{if((f|0)==(d|0)){d=t+8|0;h=a[d>>2]|0;o=t+12|0;A=a[o>>2]|0;i=A;if(h>>>0>=A>>>0){A=i-u|0;A=(A|0)==0?1:A>>1;so(s,A,(A+3|0)>>>2,t+12|0);a[l>>2]=a[p>>2];a[c>>2]=a[d>>2];a[r>>2]=a[l>>2];a[n>>2]=a[c>>2];ho(s,r,n);r=a[t>>2]|0;a[t>>2]=a[s>>2];a[s>>2]=r;r=s+4|0;A=a[p>>2]|0;a[p>>2]=a[r>>2];a[r>>2]=A;r=s+8|0;A=a[d>>2]|0;a[d>>2]=a[r>>2];a[r>>2]=A;r=s+12|0;A=a[o>>2]|0;a[o>>2]=a[r>>2];a[r>>2]=A;uo(s);r=a[p>>2]|0;break}n=h;t=((i-n>>2)+1|0)/2|0;i=h+(t<<2)|0;n=n-f|0;r=i+(0-(n>>2)<<2)|0;if(!n){r=i;n=i}else{fg(r|0,f|0,n|0)|0;n=(a[d>>2]|0)+(t<<2)|0}a[p>>2]=r;a[d>>2]=n}else r=f}while(0);a[r+-4>>2]=a[e>>2];a[p>>2]=(a[p>>2]|0)+-4;Y=m;return}function so(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0;i=t+12|0;a[i>>2]=0;a[t+16>>2]=n;do{if(e){if(e>>>0>1073741823){i=E(8)|0;fA(i,6723);a[i>>2]=5956;S(i|0,3928,123)}else{n=qm(e<<2)|0;break}}else n=0}while(0);a[t>>2]=n;r=n+(r<<2)|0;a[t+8>>2]=r;a[t+4>>2]=r;a[i>>2]=n+(e<<2);return}function lo(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0,A=0;m=Y;Y=Y+48|0;i=m+32|0;n=m+28|0;l=m+8|0;c=m+4|0;u=m;p=t+8|0;r=a[p>>2]|0;h=t+12|0;d=a[h>>2]|0;o=d;do{if((r|0)==(d|0)){d=t+4|0;f=a[d>>2]|0;A=a[t>>2]|0;s=A;if(f>>>0<=A>>>0){r=o-s|0;r=(r|0)==0?1:r>>1;so(l,r,r>>>2,a[t+16>>2]|0);a[c>>2]=a[d>>2];a[u>>2]=a[p>>2];a[n>>2]=a[c>>2];a[i>>2]=a[u>>2];ho(l,n,i);r=a[t>>2]|0;a[t>>2]=a[l>>2];a[l>>2]=r;r=l+4|0;A=a[d>>2]|0;a[d>>2]=a[r>>2];a[r>>2]=A;r=l+8|0;A=a[p>>2]|0;a[p>>2]=a[r>>2];a[r>>2]=A;r=l+12|0;A=a[h>>2]|0;a[h>>2]=a[r>>2];a[r>>2]=A;uo(l);r=a[p>>2]|0;break}i=f;n=((i-s>>2)+1|0)/-2|0;t=f+(n<<2)|0;i=r-i|0;if(!i)r=t;else{fg(t|0,f|0,i|0)|0;r=(a[d>>2]|0)+(n<<2)|0}A=t+(i>>2<<2)|0;a[p>>2]=A;a[d>>2]=r;r=A}}while(0);a[r>>2]=a[e>>2];a[p>>2]=(a[p>>2]|0)+4;Y=m;return}function co(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0,A=0;m=Y;Y=Y+48|0;n=m+32|0;r=m+28|0;s=m+8|0;l=m+4|0;c=m;p=t+4|0;f=a[p>>2]|0;d=a[t>>2]|0;u=d;do{if((f|0)==(d|0)){d=t+8|0;h=a[d>>2]|0;o=t+12|0;A=a[o>>2]|0;i=A;if(h>>>0>=A>>>0){A=i-u|0;A=(A|0)==0?1:A>>1;so(s,A,(A+3|0)>>>2,a[t+16>>2]|0);a[l>>2]=a[p>>2];a[c>>2]=a[d>>2];a[r>>2]=a[l>>2];a[n>>2]=a[c>>2];ho(s,r,n);r=a[t>>2]|0;a[t>>2]=a[s>>2];a[s>>2]=r;r=s+4|0;A=a[p>>2]|0;a[p>>2]=a[r>>2];a[r>>2]=A;r=s+8|0;A=a[d>>2]|0;a[d>>2]=a[r>>2];a[r>>2]=A;r=s+12|0;A=a[o>>2]|0;a[o>>2]=a[r>>2];a[r>>2]=A;uo(s);r=a[p>>2]|0;break}n=h;t=((i-n>>2)+1|0)/2|0;i=h+(t<<2)|0;n=n-f|0;r=i+(0-(n>>2)<<2)|0;if(!n){r=i;n=i}else{fg(r|0,f|0,n|0)|0;n=(a[d>>2]|0)+(t<<2)|0}a[p>>2]=r;a[d>>2]=n}else r=f}while(0);a[r+-4>>2]=a[e>>2];a[p>>2]=(a[p>>2]|0)+-4;Y=m;return}function uo(t){t=t|0;var e=0,r=0,n=0;e=a[t+4>>2]|0;r=t+8|0;n=a[r>>2]|0;if((n|0)!=(e|0))a[r>>2]=n+(~((n+-4-e|0)>>>2)<<2);e=a[t>>2]|0;if(e|0)bt(e,(a[t+12>>2]|0)-e|0);return}function ho(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0;s=Y;Y=Y+16|0;o=s;i=a[e>>2]|0;fo(o,t+8|0,(a[r>>2]|0)-i>>2);t=a[o>>2]|0;n=o+4|0;if((t|0)!=(a[n>>2]|0)){r=i;do{a[t>>2]=a[r>>2];t=(a[o>>2]|0)+4|0;a[o>>2]=t;r=r+4|0}while((t|0)!=(a[n>>2]|0));a[e>>2]=r}po(o);Y=s;return}function fo(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=a[e>>2];a[t+4>>2]=(a[e>>2]|0)+(r<<2);a[t+8>>2]=e;return}function po(t){t=t|0;a[a[t+8>>2]>>2]=a[t>>2];return}function mo(t,e){t=t|0;e=e|0;return(a[t+4>>2]|0)==(a[e+4>>2]|0)|0}function Ao(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;a[t+4>>2]=r;return}function go(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;o=a[e+4>>2]|0;r=a[e+16>>2]|0;n=(r>>>0)/93|0;i=o+(n<<2)|0;if((a[e+8>>2]|0)==(o|0))e=0;else e=(a[i>>2]|0)+((r-(n*93|0)|0)*44|0)|0;a[t>>2]=i;a[t+4>>2]=e;return}function vo(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;r=(a[e+16>>2]|0)+(a[e+20>>2]|0)|0;o=a[e+4>>2]|0;n=(r>>>0)/93|0;i=o+(n<<2)|0;if((a[e+8>>2]|0)==(o|0))e=0;else e=(a[i>>2]|0)+((r-(n*93|0)|0)*44|0)|0;a[t>>2]=i;a[t+4>>2]=e;return}function yo(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,l=0;l=Y;Y=Y+16|0;n=l+8|0;o=l;bo(n,t);Ya(o,t);i=n+4|0;e=a[i>>2]|0;o=o+4|0;if((e|0)!=(a[o>>2]|0))do{Mr(e);e=(a[i>>2]|0)+44|0;a[i>>2]=e;r=a[n>>2]|0;if((e-(a[r>>2]|0)|0)==4092){e=r+4|0;a[n>>2]=e;e=a[e>>2]|0;a[i>>2]=e}}while((e|0)!=(a[o>>2]|0));a[t+20>>2]=0;i=t+8|0;n=t+4|0;r=a[n>>2]|0;e=(a[i>>2]|0)-r>>2;if(e>>>0>2)do{bt(a[r>>2]|0,4092);r=(a[n>>2]|0)+4|0;a[n>>2]=r;e=(a[i>>2]|0)-r>>2}while(e>>>0>2);switch(e|0){case 1:{e=46;s=11;break}case 2:{e=93;s=11;break}default:{}}if((s|0)==11)a[t+16>>2]=e;Y=l;return}function bo(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;o=a[e+4>>2]|0;r=a[e+16>>2]|0;n=(r>>>0)/93|0;i=o+(n<<2)|0;if((a[e+8>>2]|0)==(o|0))e=0;else e=(a[i>>2]|0)+((r-(n*93|0)|0)*44|0)|0;a[t>>2]=i;a[t+4>>2]=e;return}function xo(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,s=0,l=0,c=0,u=0,h=0,f=0;f=Y;Y=Y+16|0;h=f;c=t+4|0;if(!(n[c>>0]|0)){h=xi(e)|0;wi(h,r,a[t>>2]|0);h=a[t>>2]|0;l=r+h|0;if(!h)i=0;else{i=r;s=a[t+8>>2]|0;while(1){n[s>>0]=n[i>>0]|0;i=i+1|0;if((i|0)==(l|0))break;else s=s+1|0}i=a[t>>2]|0}n[c>>0]=1;r=r+i|0}else{s=a[t+20>>2]|0;i=a[t+8>>2]|0;bo(h,t+32|0);t=t+12|0;if((i|0)!=(a[t>>2]|0)){u=h+4|0;c=i;l=s;i=a[u>>2]|0;while(1){s=o[c>>0]|0;s=wo((Zr(e,i)|0)+s|0)|0;n[l>>0]=s;n[r>>0]=s;n[c>>0]=s;c=c+1|0;r=r+1|0;s=a[h>>2]|0;i=(a[u>>2]|0)+44|0;a[u>>2]=i;if((i-(a[s>>2]|0)|0)==4092){i=s+4|0;a[h>>2]=i;i=a[i>>2]|0;a[u>>2]=i}if((c|0)==(a[t>>2]|0))break;else l=l+1|0}}}Y=f;return r|0}function wo(t){t=t|0;return t&255|0}function _o(t){t=t|0;oA(t);tm(t);return}function Eo(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+4>>2]&255](t);return}function Mo(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==11262?t+12|0:0)|0}function So(t){t=t|0;bt(t,16);return}function Co(t,e){t=t|0;e=e|0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;if(e|0){Ga(t,e);Io(t,e)}return}function To(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;a[t+12>>2]=0;a[t+16>>2]=0;a[t+20>>2]=0;if(e|0)Ro(t,e,r);return}function Io(t,e){t=t|0;e=e|0;var r=0,i=0,o=0;o=Y;Y=Y+16|0;i=o;ja(i,t,e);e=i+4|0;t=a[e>>2]|0;r=i+8|0;if((t|0)!=(a[r>>2]|0))do{n[t>>0]=0;t=(a[e>>2]|0)+1|0;a[e>>2]=t}while((t|0)!=(a[r>>2]|0));Wa(i);Y=o;return}function Ro(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0;p=Y;Y=Y+96|0;d=p+80|0;u=p+64|0;s=p+48|0;l=p+40|0;c=p+8|0;i=p;h=p+32|0;f=p+16|0;n=(a[t+8>>2]|0)-(a[t+4>>2]|0)|0;n=((n|0)==0?0:((n>>2)*93|0)+-1|0)-((a[t+20>>2]|0)+(a[t+16>>2]|0))|0;if(n>>>0>>0)qa(t,e-n|0);Ya(l,t);Ya(i,t);n=a[i>>2]|0;i=a[i+4>>2]|0;o=c;a[o>>2]=n;a[o+4>>2]=i;o=n;if(e|0){n=((i-(a[n>>2]|0)|0)/44|0)+e|0;if((n|0)>0){e=(n>>>0)/93|0;o=o+(e<<2)|0;a[c>>2]=o;n=(a[o>>2]|0)+((n-(e*93|0)|0)*44|0)|0}else{n=92-n|0;e=o+(((n|0)/-93|0)<<2)|0;a[c>>2]=e;n=(a[e>>2]|0)+((92-((n|0)%93|0)|0)*44|0)|0}a[c+4>>2]=n}a[u>>2]=a[l>>2];a[u+4>>2]=a[l+4>>2];a[d>>2]=a[c>>2];a[d+4>>2]=a[c+4>>2];Ja(s,u,d);Ka(d,s);$a(u,s);if(to(d,u)|0){i=f+4|0;do{eo(h,d);ro(f,t,h);n=a[f>>2]|0;if((n|0)!=(a[i>>2]|0))do{Nr(n,r);n=(a[f>>2]|0)+44|0;a[f>>2]=n}while((n|0)!=(a[i>>2]|0));no(f);io(d)|0}while(to(d,u)|0)}Y=p;return}function Bo(t){t=t|0;var e=0,r=0;yo(t);e=a[t+4>>2]|0;r=a[t+8>>2]|0;if((e|0)!=(r|0))do{bt(a[e>>2]|0,4092);e=e+4|0}while((e|0)!=(r|0));Xa(t);return}function ko(t,e,r){t=t|0;e=e|0;r=r|0;Rn(t);a[t>>2]=4924;a[t+4>>2]=e;a[t+8>>2]=r;return}function Lo(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4944;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;zo(t,n);Y=r;return}function Po(t,e){t=t|0;e=e|0;return Oo(a[t+8>>2]|0,a[t+4>>2]|0,e)|0}function Do(t){t=t|0;var e=0,r=0;a[t>>2]=4924;r=t+8|0;e=a[r>>2]|0;a[r>>2]=0;if(e|0){No(e);tm(e)}Pn(t);return}function Uo(t){t=t|0;Do(t);tm(t);return}function Oo(t,e,r){t=t|0;e=e|0;r=r|0;return Fo(t+4784|0,e,yi(t,e,r)|0)|0}function Fo(t,e,r){t=t|0;e=e|0;r=r|0;if(n[t>>0]|0){ir(e);n[t>>0]=0}return r|0}function No(t){t=t|0;gi(t);return}function zo(t,e){t=t|0;e=e|0;return}function Go(t){t=t|0;oA(t);tm(t);return}function Zo(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+8>>2]&255](t);return}function Vo(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==12004?t+12|0:0)|0}function Qo(t){t=t|0;bt(t,16);return}function jo(t){t=t|0;n[t>>0]=1;return}function Wo(t,e,r){t=t|0;e=e|0;r=r|0;Rn(t);a[t>>2]=4972;a[t+4>>2]=e;a[t+8>>2]=r;return}function Ho(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4992;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;zo(t,n);Y=r;return}function Xo(t,e){t=t|0;e=e|0;return Jo(a[t+8>>2]|0,a[t+4>>2]|0,e)|0}function qo(t){t=t|0;var e=0,r=0;a[t>>2]=4972;r=t+8|0;e=a[r>>2]|0;a[r>>2]=0;if(e|0){$o(e);tm(e)}Pn(t);return}function Yo(t){t=t|0;qo(t);tm(t);return}function Jo(t,e,r){t=t|0;e=e|0;r=r|0;return Ko(t+4784|0,e,yi(t,e,r)|0)|0}function Ko(t,e,r){t=t|0;e=e|0;r=r|0;return Fo(t+328|0,e,sa(t,e,r)|0)|0}function $o(t){t=t|0;ts(t+4784|0);gi(t);return}function ts(t){t=t|0;aa(t);return}function es(t){t=t|0;oA(t);tm(t);return}function rs(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+8>>2]&255](t);return}function ns(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==12827?t+12|0:0)|0}function is(t){t=t|0;bt(t,16);return}function as(t){t=t|0;Xi(t);jo(t+328|0);return}function os(t,e,r){t=t|0;e=e|0;r=r|0;Rn(t);a[t>>2]=5020;a[t+4>>2]=e;a[t+8>>2]=r;return}function ss(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5040;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;zo(t,n);Y=r;return}function ls(t,e){t=t|0;e=e|0;return hs(a[t+8>>2]|0,a[t+4>>2]|0,e)|0}function cs(t){t=t|0;var e=0,r=0;a[t>>2]=5020;r=t+8|0;e=a[r>>2]|0;a[r>>2]=0;if(e|0){ds(e);tm(e)}Pn(t);return}function us(t){t=t|0;cs(t);tm(t);return}function hs(t,e,r){t=t|0;e=e|0;r=r|0;return fs(t+4784|0,e,yi(t,e,r)|0)|0}function fs(t,e,r){t=t|0;e=e|0;r=r|0;return Fo(t+316|0,e,Ma(t,e,r)|0)|0}function ds(t){t=t|0;ps(t+4784|0);gi(t);return}function ps(t){t=t|0;Ea(t);return}function ms(t){t=t|0;oA(t);tm(t);return}function As(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+8>>2]&255](t);return}function gs(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==13672?t+12|0:0)|0}function vs(t){t=t|0;bt(t,16);return}function ys(t){t=t|0;ya(t);jo(t+316|0);return}function bs(t,e,r){t=t|0;e=e|0;r=r|0;Rn(t);a[t>>2]=5068;a[t+4>>2]=e;a[t+8>>2]=r;return}function xs(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5088;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;zo(t,n);Y=r;return}function ws(t,e){t=t|0;e=e|0;return Ms(a[t+8>>2]|0,a[t+4>>2]|0,e)|0}function _s(t){t=t|0;var e=0,r=0;a[t>>2]=5068;r=t+8|0;e=a[r>>2]|0;a[r>>2]=0;if(e|0){Cs(e);tm(e)}Pn(t);return}function Es(t){t=t|0;_s(t);tm(t);return}function Ms(t,e,r){t=t|0;e=e|0;r=r|0;return Ss(t+4784|0,e,yi(t,e,r)|0)|0}function Ss(t,e,r){t=t|0;e=e|0;r=r|0;return fs(t+328|0,e,sa(t,e,r)|0)|0}function Cs(t){t=t|0;Ts(t+4784|0);gi(t);return}function Ts(t){t=t|0;ps(t+328|0);aa(t);return}function Is(t){t=t|0;oA(t);tm(t);return}function Rs(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+8>>2]&255](t);return}function Bs(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==14573?t+12|0:0)|0}function ks(t){t=t|0;bt(t,16);return}function Ls(t){t=t|0;Xi(t);ys(t+328|0);return}function Ps(t){t=t|0;return t+20|0}function Ds(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;a[t+4>>2]=r;a[t+8>>2]=0;return}function Us(t,e){t=t|0;e=e|0;a[t>>2]=e;a[t+4>>2]=0;a[t+8>>2]=-1;return}function Os(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;r=Y;Y=Y+16|0;n=r+4|0;o=r;i=qm(24)|0;tl(i,e);a[o>>2]=0;a[n>>2]=a[o>>2];el(t,i,n);Y=r;return}function Fs(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){Qg[a[(a[t>>2]|0)+8>>2]&255](t);sA(t)}return}function Ns(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5116;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gs(t,n);Y=r;return}function zs(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){Qg[a[(a[t>>2]|0)+8>>2]&255](t);sA(t)}return}function Gs(t,e){t=t|0;e=e|0;return}function Zs(t){t=t|0;oA(t);tm(t);return}function Vs(t){t=t|0;t=a[t+12>>2]|0;if(t|0)tm(t);return}function Qs(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==14966?t+12|0:0)|0}function js(t){t=t|0;bt(t,16);return}function Ws(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5144;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Xs(t,n);Y=r;return}function Hs(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){Qg[a[(a[t>>2]|0)+8>>2]&255](t);sA(t)}return}function Xs(t,e){t=t|0;e=e|0;return}function qs(t){t=t|0;oA(t);tm(t);return}function Ys(t){t=t|0;t=a[t+12>>2]|0;if(t|0){$s(t);tm(t)}return}function Js(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==15127?t+12|0:0)|0}function Ks(t){t=t|0;bt(t,16);return}function $s(t){t=t|0;return}function tl(t,e){t=t|0;e=e|0;Rn(t);a[t>>2]=5172;a[t+4>>2]=e;a[t+8>>2]=0;a[t+12>>2]=0;a[t+16>>2]=0;n[t+20>>0]=1;return}function el(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5192;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;sl(t,n);Y=r;return}function rl(t,e){t=t|0;e=e|0;var r=0,i=0,o=0,s=0,l=0,c=0,u=0;u=Y;Y=Y+16|0;s=u;r=a[t+8>>2]|0;l=a[t+12>>2]|0;if((r|0)!=(l|0)){c=s+4|0;do{i=a[r>>2]|0;a[s>>2]=i;o=a[r+4>>2]|0;a[c>>2]=o;if(o|0){o=o+4|0;a[o>>2]=(a[o>>2]|0)+1}e=Gg[a[(a[i>>2]|0)+12>>2]&63](i,e)|0;Un(s);r=r+8|0}while((r|0)!=(l|0))}r=t+20|0;if(n[r>>0]|0){n[r>>0]=0;al(a[t+4>>2]|0)}Y=u;return e|0}function nl(t){t=t|0;a[t>>2]=5172;On(t+8|0);Pn(t);return}function il(t){t=t|0;nl(t);tm(t);return}function al(t){t=t|0;var e=0;e=((ol(a[t>>2]|0)|0)&255)<<24;e=((ol(a[t>>2]|0)|0)&255)<<16|e;e=e|((ol(a[t>>2]|0)|0)&255)<<8;a[t+4>>2]=e|(ol(a[t>>2]|0)|0)&255;return}function ol(t){t=t|0;var e=0,r=0;e=a[t>>2]|0;r=t+8|0;t=a[r>>2]|0;a[r>>2]=t+1;return n[e+t>>0]|0}function sl(t,e){t=t|0;e=e|0;return}function ll(t){t=t|0;oA(t);tm(t);return}function cl(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+8>>2]&255](t);return}function ul(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==15450?t+12|0:0)|0}function hl(t){t=t|0;bt(t,16);return}function fl(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0;c=Y;Y=Y+32|0;n=c+12|0;i=c;e=c+8|0;s=qm(180)|0;pl(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];ml(i,s,n);s=t+12|0;e=a[s>>2]|0;l=t+16|0;do{if(e>>>0>=(a[l>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)HA(o);else{u=a[o>>2]|0;h=(a[l>>2]|0)-u|0;l=h>>2;Hn(n,h>>3>>>0>>1>>>0?l>>>0>>0?e:l:r,(a[s>>2]|0)-u>>3,t+16|0);l=n+8|0;s=a[l>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[l>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];l=i+4|0;a[u+4>>2]=a[l>>2];a[i>>2]=0;a[l>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=c;return}function dl(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0;c=Y;Y=Y+32|0;n=c+12|0;i=c;e=c+8|0;s=qm(180)|0;Fl(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];Nl(i,s,n);s=t+12|0;e=a[s>>2]|0;l=t+16|0;do{if(e>>>0>=(a[l>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)HA(o);else{u=a[o>>2]|0;h=(a[l>>2]|0)-u|0;l=h>>2;Hn(n,h>>3>>>0>>1>>>0?l>>>0>>0?e:l:r,(a[s>>2]|0)-u>>3,t+16|0);l=n+8|0;s=a[l>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[l>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];l=i+4|0;a[u+4>>2]=a[l>>2];a[i>>2]=0;a[l>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=c;return}function pl(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=5220;a[t+4>>2]=e;Al(t+8|0);return}function ml(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5244;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function Al(t){t=t|0;mi(t,32,1,8,0);nr(t+80|0,32,1,8,0);n[t+160>>0]=0;n[t+161>>0]=0;bl(t+164|0);return}function gl(t){t=t|0;a[t>>2]=5220;xl(t+8|0);ni(t);return}function vl(t){t=t|0;gl(t);tm(t);return}function yl(t,e){t=t|0;e=e|0;return wl(t+8|0,a[t+4>>2]|0,e)|0}function bl(t){t=t|0;n[t+4>>0]=0;return}function xl(t){t=t|0;sr(t+80|0);Ai(t);return}function wl(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0;s=Y;Y=Y+16|0;i=s;if(!(n[t+161>>0]|0))ar(t+80|0);o=t+164|0;if(_l(o)|0){e=El(t+80|0,e,a[o>>2]|0,0)|0;a[i>>2]=e;Ui(e,r)}else{Sl(Ml(e)|0,r,4);a[i>>2]=Bi(r)|0}Cl(o,i);Y=s;return r+4|0}function _l(t){t=t|0;return(n[t+4>>0]|0)!=0|0}function El(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;r=(Tl(t,e,(a[t+36>>2]|0)+(n*44|0)|0)|0)+r|0;e=a[t+24>>2]|0;if((r|0)<0)return r+e|0;else return r-(r>>>0>>0?0:e)|0;return 0}function Ml(t){t=t|0;return a[t>>2]|0}function Sl(t,e,r){t=t|0;e=e|0;r=r|0;var i=0;if((r|0)>0){i=0;do{n[e+i>>0]=ol(t)|0;i=i+1|0}while((i|0)!=(r|0))}return}function Cl(t,e){t=t|0;e=e|0;var r=0;r=t+4|0;if(!(n[r>>0]|0))n[r>>0]=1;a[t>>2]=a[e>>2];return}function Tl(t,e,r){t=t|0;e=e|0;r=r|0;var n=0;r=Il(e,r)|0;a[t>>2]=r;do{if(r){if(r>>>0>=32){r=a[t+28>>2]|0;break}n=a[t+12>>2]|0;if(r>>>0>n>>>0){n=r-n|0;r=Il(e,(a[t+68>>2]|0)+((r+-1|0)*44|0)|0)|0;n=r<>2]|0)+((r+-1|0)*44|0)|0)|0;r=a[t>>2]|0;if((n|0)<(1<>2]|0;i=a[e+16>>2]|0;if(i){n=t+4|0;r=a[n>>2]|0;h=f>>>15;a[d>>2]=h;c=(r>>>0)/(h>>>0)|0;l=c>>>(a[e+40>>2]|0);o=a[i+(l<<2)>>2]|0;l=(a[i+(l+1<<2)>>2]|0)+1|0;s=o+1|0;u=a[e+8>>2]|0;if(l>>>0>s>>>0){i=o;o=l;do{s=(o+i|0)>>>1;l=(a[u+(s<<2)>>2]|0)>>>0>c>>>0;i=l?i:s;o=l?s:o;s=i+1|0}while(o>>>0>s>>>0);o=i}i=y(a[u+(o<<2)>>2]|0,h)|0;if((o|0)==(a[e+32>>2]|0))s=f;else s=y(a[u+(s<<2)>>2]|0,h)|0}else{u=f>>>15;a[d>>2]=u;l=a[e>>2]|0;h=a[e+8>>2]|0;n=t+4|0;r=a[n>>2]|0;c=l>>>1;i=0;s=f;o=0;do{p=y(a[h+(c<<2)>>2]|0,u)|0;f=p>>>0>r>>>0;s=f?p:s;i=f?i:p;o=f?o:c;l=f?c:l;c=(o+l|0)>>>1}while((c|0)!=(o|0))}a[n>>2]=r-i;p=s-i|0;a[d>>2]=p;if(p>>>0<16777216)kl(t);d=(a[e+12>>2]|0)+(o<<2)|0;a[d>>2]=(a[d>>2]|0)+1;d=e+28|0;p=(a[d>>2]|0)+-1|0;a[d>>2]=p;if(!p)zr(e);return o|0}function Rl(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;if(e>>>0>19){r=(Ll(t)|0)&65535;return(Rl(t,e+-16|0)|0)<<16|r|0}n=t+4|0;i=a[n>>2]|0;o=t+8|0;r=(a[o>>2]|0)>>>e;a[o>>2]=r;e=(i>>>0)/(r>>>0)|0;a[n>>2]=i-(y(e,r)|0);if(r>>>0<16777216)kl(t);return e|0}function Bl(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,l=0;n=t+8|0;i=a[n>>2]|0;r=y(i>>>13,a[e+8>>2]|0)|0;o=t+4|0;s=a[o>>2]|0;l=s>>>0>=r>>>0;if(l){a[o>>2]=s-r;r=i-r|0;a[n>>2]=r}else{a[n>>2]=r;s=e+12|0;a[s>>2]=(a[s>>2]|0)+1}if(r>>>0<16777216)kl(t);s=e+4|0;t=(a[s>>2]|0)+-1|0;a[s>>2]=t;if(!t)Hr(e);return l&1|0}function kl(t){t=t|0;var e=0,r=0,n=0,i=0;e=t+4|0;r=t+8|0;n=a[e>>2]|0;do{n=n<<8|(ol(a[t>>2]|0)|0)&255;a[e>>2]=n;i=a[r>>2]<<8;a[r>>2]=i}while(i>>>0<16777216);return}function Ll(t){t=t|0;var e=0,r=0,n=0,i=0;r=t+4|0;i=a[r>>2]|0;e=t+8|0;n=(a[e>>2]|0)>>>16;a[e>>2]=n;e=(i>>>0)/(n>>>0)|0;a[r>>2]=i-(y(e,n)|0);kl(t);return e&65535|0}function Pl(t){t=t|0;oA(t);tm(t);return}function Dl(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+4>>2]&255](t);return}function Ul(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==15904?t+12|0:0)|0}function Ol(t){t=t|0;bt(t,16);return}function Fl(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=5272;a[t+4>>2]=e;zl(t+8|0);return}function Nl(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5296;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function zl(t){t=t|0;mi(t,32,1,8,0);nr(t+80|0,32,1,8,0);n[t+160>>0]=0;n[t+161>>0]=0;Ql(t+164|0);return}function Gl(t){t=t|0;a[t>>2]=5272;jl(t+8|0);ni(t);return}function Zl(t){t=t|0;Gl(t);tm(t);return}function Vl(t,e){t=t|0;e=e|0;return Wl(t+8|0,a[t+4>>2]|0,e)|0}function Ql(t){t=t|0;n[t+4>>0]=0;return}function jl(t){t=t|0;sr(t+80|0);Ai(t);return}function Wl(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0;s=Y;Y=Y+16|0;i=s;if(!(n[t+161>>0]|0))ar(t+80|0);o=t+164|0;if(Hl(o)|0){e=El(t+80|0,e,a[o>>2]|0,0)|0;a[i>>2]=e;zi(e,r)}else{Sl(Ml(e)|0,r,4);a[i>>2]=Di(r)|0}Xl(o,i);Y=s;return r+4|0}function Hl(t){t=t|0;return(n[t+4>>0]|0)!=0|0}function Xl(t,e){t=t|0;e=e|0;var r=0;r=t+4|0;if(!(n[r>>0]|0))n[r>>0]=1;a[t>>2]=a[e>>2];return}function ql(t){t=t|0;oA(t);tm(t);return}function Yl(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+4>>2]&255](t);return}function Jl(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==16402?t+12|0:0)|0}function Kl(t){t=t|0;bt(t,16);return}function $l(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0;c=Y;Y=Y+32|0;n=c+12|0;i=c;e=c+8|0;s=qm(172)|0;ec(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];rc(i,s,n);s=t+12|0;e=a[s>>2]|0;l=t+16|0;do{if(e>>>0>=(a[l>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)HA(o);else{u=a[o>>2]|0;h=(a[l>>2]|0)-u|0;l=h>>2;Hn(n,h>>3>>>0>>1>>>0?l>>>0>>0?e:l:r,(a[s>>2]|0)-u>>3,t+16|0);l=n+8|0;s=a[l>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[l>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];l=i+4|0;a[u+4>>2]=a[l>>2];a[i>>2]=0;a[l>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=c;return}function tc(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0;c=Y;Y=Y+32|0;n=c+12|0;i=c;e=c+8|0;s=qm(176)|0;vc(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];yc(i,s,n);s=t+12|0;e=a[s>>2]|0;l=t+16|0;do{if(e>>>0>=(a[l>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)HA(o);else{u=a[o>>2]|0;h=(a[l>>2]|0)-u|0;l=h>>2;Hn(n,h>>3>>>0>>1>>>0?l>>>0>>0?e:l:r,(a[s>>2]|0)-u>>3,t+16|0);l=n+8|0;s=a[l>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[l>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];l=i+4|0;a[u+4>>2]=a[l>>2];a[i>>2]=0;a[l>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=c;return}function ec(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=5324;a[t+4>>2]=e;nc(t+8|0);return}function rc(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5348;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function nc(t){t=t|0;mi(t,8,1,8,0);nr(t+80|0,8,1,8,0);n[t+160>>0]=0;n[t+161>>0]=0;sc(t+162|0);return}function ic(t){t=t|0;a[t>>2]=5324;lc(t+8|0);ni(t);return}function ac(t){t=t|0;ic(t);tm(t);return}function oc(t,e){t=t|0;e=e|0;return cc(t+8|0,a[t+4>>2]|0,e)|0}function sc(t){t=t|0;n[t+1>>0]=0;return}function lc(t){t=t|0;sr(t+80|0);Ai(t);return}function cc(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,a=0,o=0;o=Y;Y=Y+16|0;i=o;if(!(n[t+161>>0]|0))ar(t+80|0);a=t+162|0;if(uc(a)|0){e=(El(t+80|0,e,n[a>>0]|0,0)|0)&255;n[i>>0]=e;hc(e,r)}else{Sl(Ml(e)|0,r,1);n[i>>0]=fc(r)|0}dc(a,i);Y=o;return r+1|0}function uc(t){t=t|0;return(n[t+1>>0]|0)!=0|0}function hc(t,e){t=t|0;e=e|0;n[e>>0]=t;return}function fc(t){t=t|0;return n[t>>0]|0}function dc(t,e){t=t|0;e=e|0;var r=0;r=t+1|0;if(!(n[r>>0]|0))n[r>>0]=1;n[t>>0]=n[e>>0]|0;return}function pc(t){t=t|0;oA(t);tm(t);return}function mc(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+4>>2]&255](t);return}function Ac(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==16900?t+12|0:0)|0}function gc(t){t=t|0;bt(t,16);return}function vc(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=5376;a[t+4>>2]=e;bc(t+8|0);return}function yc(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5400;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function bc(t){t=t|0;mi(t,16,1,8,0);nr(t+80|0,16,1,8,0);n[t+160>>0]=0;n[t+161>>0]=0;Ec(t+162|0);return}function xc(t){t=t|0;a[t>>2]=5376;Mc(t+8|0);ni(t);return}function wc(t){t=t|0;xc(t);tm(t);return}function _c(t,e){t=t|0;e=e|0;return Sc(t+8|0,a[t+4>>2]|0,e)|0}function Ec(t){t=t|0;n[t+2>>0]=0;return}function Mc(t){t=t|0;sr(t+80|0);Ai(t);return}function Sc(t,e,r){t=t|0;e=e|0;r=r|0;var a=0,o=0,s=0;s=Y;Y=Y+16|0;a=s;if(!(n[t+161>>0]|0))ar(t+80|0);o=t+162|0;if(Cc(o)|0){e=(El(t+80|0,e,i[o>>1]|0,0)|0)&65535;i[a>>1]=e;Tc(e,r)}else{Sl(Ml(e)|0,r,2);i[a>>1]=Ic(r)|0}Rc(o,a);Y=s;return r+2|0}function Cc(t){t=t|0;return(n[t+2>>0]|0)!=0|0}function Tc(t,e){t=t|0;e=e|0;Oi(t,e);return}function Ic(t){t=t|0;return ki(t)|0}function Rc(t,e){t=t|0;e=e|0;var r=0;r=t+2|0;if(!(n[r>>0]|0))n[r>>0]=1;i[t>>1]=i[e>>1]|0;return}function Bc(t){t=t|0;oA(t);tm(t);return}function kc(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+4>>2]&255](t);return}function Lc(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==17398?t+12|0:0)|0}function Pc(t){t=t|0;bt(t,16);return}function Dc(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0;c=Y;Y=Y+32|0;n=c+12|0;i=c;e=c+8|0;s=qm(172)|0;Oc(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];Fc(i,s,n);s=t+12|0;e=a[s>>2]|0;l=t+16|0;do{if(e>>>0>=(a[l>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)HA(o);else{u=a[o>>2]|0;h=(a[l>>2]|0)-u|0;l=h>>2;Hn(n,h>>3>>>0>>1>>>0?l>>>0>>0?e:l:r,(a[s>>2]|0)-u>>3,t+16|0);l=n+8|0;s=a[l>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[l>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];l=i+4|0;a[u+4>>2]=a[l>>2];a[i>>2]=0;a[l>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=c;return}function Uc(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0;c=Y;Y=Y+32|0;n=c+12|0;i=c;e=c+8|0;s=qm(176)|0;Kc(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];$c(i,s,n);s=t+12|0;e=a[s>>2]|0;l=t+16|0;do{if(e>>>0>=(a[l>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)HA(o);else{u=a[o>>2]|0;h=(a[l>>2]|0)-u|0;l=h>>2;Hn(n,h>>3>>>0>>1>>>0?l>>>0>>0?e:l:r,(a[s>>2]|0)-u>>3,t+16|0);l=n+8|0;s=a[l>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[l>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];l=i+4|0;a[u+4>>2]=a[l>>2];a[i>>2]=0;a[l>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=c;return}function Oc(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=5428;a[t+4>>2]=e;Nc(t+8|0);return}function Fc(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5452;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function Nc(t){t=t|0;mi(t,8,1,8,0);nr(t+80|0,8,1,8,0);n[t+160>>0]=0;n[t+161>>0]=0;Vc(t+162|0);return}function zc(t){t=t|0;a[t>>2]=5428;Qc(t+8|0);ni(t);return}function Gc(t){t=t|0;zc(t);tm(t);return}function Zc(t,e){t=t|0;e=e|0;return jc(t+8|0,a[t+4>>2]|0,e)|0}function Vc(t){t=t|0;n[t+1>>0]=0;return}function Qc(t){t=t|0;sr(t+80|0);Ai(t);return}function jc(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,a=0,s=0;s=Y;Y=Y+16|0;i=s;if(!(n[t+161>>0]|0))ar(t+80|0);a=t+162|0;if(Wc(a)|0){e=(El(t+80|0,e,o[a>>0]|0,0)|0)&255;n[i>>0]=e;Fi(e,r)}else{Sl(Ml(e)|0,r,1);n[i>>0]=Li(r)|0}Hc(a,i);Y=s;return r+1|0}function Wc(t){t=t|0;return(n[t+1>>0]|0)!=0|0}function Hc(t,e){t=t|0;e=e|0;var r=0;r=t+1|0;if(!(n[r>>0]|0))n[r>>0]=1;n[t>>0]=n[e>>0]|0;return}function Xc(t){t=t|0;oA(t);tm(t);return}function qc(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+4>>2]&255](t);return}function Yc(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==17896?t+12|0:0)|0}function Jc(t){t=t|0;bt(t,16);return}function Kc(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=5480;a[t+4>>2]=e;tu(t+8|0);return}function $c(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5504;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function tu(t){t=t|0;mi(t,16,1,8,0);nr(t+80|0,16,1,8,0);n[t+160>>0]=0;n[t+161>>0]=0;iu(t+162|0);return}function eu(t){t=t|0;a[t>>2]=5480;au(t+8|0);ni(t);return}function ru(t){t=t|0;eu(t);tm(t);return}function nu(t,e){t=t|0;e=e|0;return ou(t+8|0,a[t+4>>2]|0,e)|0}function iu(t){t=t|0;n[t+2>>0]=0;return}function au(t){t=t|0;sr(t+80|0);Ai(t);return}function ou(t,e,r){t=t|0;e=e|0;r=r|0;var a=0,o=0,l=0;l=Y;Y=Y+16|0;a=l;if(!(n[t+161>>0]|0))ar(t+80|0);o=t+162|0;if(su(o)|0){e=(El(t+80|0,e,s[o>>1]|0,0)|0)&65535;i[a>>1]=e;Oi(e,r)}else{Sl(Ml(e)|0,r,2);i[a>>1]=ki(r)|0}lu(o,a);Y=l;return r+2|0}function su(t){t=t|0;return(n[t+2>>0]|0)!=0|0}function lu(t,e){t=t|0;e=e|0;var r=0;r=t+2|0;if(!(n[r>>0]|0))n[r>>0]=1;i[t>>1]=i[e>>1]|0;return}function cu(t){t=t|0;oA(t);tm(t);return}function uu(t){t=t|0;t=a[t+12>>2]|0;if(t|0)Qg[a[(a[t>>2]|0)+4>>2]&255](t);return}function hu(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==18394?t+12|0:0)|0}function fu(t){t=t|0;bt(t,16);return}function du(){return}function pu(t){t=t|0;return wu(t)|0}function mu(){return 0}function Au(){return 0}function gu(t){t=t|0;if(t|0){_u(t);tm(t)}return}function vu(){return Eu()|0}function yu(){return Mu()|0}function bu(){return Su()|0}function xu(){return 0}function wu(t){t=t|0;return 3360}function _u(t){t=t|0;var e=0,r=0,n=0,i=0;e=Y;Y=Y+16|0;n=e;a[n>>2]=a[t>>2];a[t>>2]=0;r=t+4|0;a[n+4>>2]=a[r>>2];a[r>>2]=0;dt(n);r=t+8|0;a[n>>2]=a[r>>2];a[r>>2]=0;i=t+12|0;a[n+4>>2]=a[i>>2];a[i>>2]=0;_t(n);_t(r);dt(t);Y=e;return}function Eu(){return 3360}function Mu(){return 3368}function Su(){return 3384}function Cu(){return 18579}function Tu(){return 18582}function Iu(){return 18584}function Ru(){var t=0;t=qm(16)|0;Ou(t);return t|0}function Bu(t){t=t|0;var e=0,r=0,n=0,i=0;e=Y;Y=Y+16|0;r=e;i=vu()|0;n=Lu(r)|0;r=Pu(r)|0;L(i|0,n|0,r|0,Cu()|0,12,t|0);Y=e;return}function ku(t){t=t|0;return Du(Fg[t&3]()|0)|0}function Lu(t){t=t|0;return 1}function Pu(t){t=t|0;return Uu()|0}function Du(t){t=t|0;return t|0}function Uu(){return 5524}function Ou(t){t=t|0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;a[t+12>>2]=0;return}function Fu(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;r=Y;Y=Y+16|0;n=r;i=r+8|0;s=a[e+4>>2]|0;a[n>>2]=a[e>>2];a[n+4>>2]=s;s=vu()|0;o=zu(i)|0;i=Gu(i)|0;e=Hu()|0;P(s|0,t|0,o|0,i|0,e|0,4,Zu(n)|0,0);Y=r;return}function Nu(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,o=0;o=Vu(e)|0;e=a[t>>2]|0;i=a[t+4>>2]|0;t=o+(i>>1)|0;if(i&1)e=a[(a[t>>2]|0)+e>>2]|0;i=Qu(r)|0;o=ju(n)|0;Wg[e&15](t,i,o);return}function zu(t){t=t|0;return 4}function Gu(t){t=t|0;return Wu()|0}function Zu(t){t=t|0;var e=0,r=0;e=qm(8)|0;r=a[t+4>>2]|0;a[e>>2]=a[t>>2];a[e+4>>2]=r;return e|0}function Vu(t){t=t|0;return t|0}function Qu(t){t=t|0;return t|0}function ju(t){t=t|0;return t|0}function Wu(){return 144}function Hu(){return 18587}function Xu(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;r=Y;Y=Y+16|0;n=r;i=r+8|0;s=a[e+4>>2]|0;a[n>>2]=a[e>>2];a[n+4>>2]=s;s=vu()|0;o=Yu(i)|0;i=Ju(i)|0;e=eh()|0;P(s|0,t|0,o|0,i|0,e|0,7,Ku(n)|0,0);Y=r;return}function qu(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;i=Vu(e)|0;e=a[t>>2]|0;n=a[t+4>>2]|0;t=i+(n>>1)|0;if(n&1)e=a[(a[t>>2]|0)+e>>2]|0;i=$u(r)|0;jg[e&15](t,i);return}function Yu(t){t=t|0;return 3}function Ju(t){t=t|0;return th()|0}function Ku(t){t=t|0;var e=0,r=0;e=qm(8)|0;r=a[t+4>>2]|0;a[e>>2]=a[t>>2];a[e+4>>2]=r;return e|0}function $u(t){t=t|0;return t|0}function th(){return 5528}function eh(){return 18593}function rh(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;r=Y;Y=Y+16|0;n=r;i=r+8|0;s=a[e+4>>2]|0;a[n>>2]=a[e>>2];a[n+4>>2]=s;s=vu()|0;o=ih(i)|0;i=ah(i)|0;e=ch()|0;P(s|0,t|0,o|0,i|0,e|0,41,oh(n)|0,0);Y=r;return}function nh(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;n=Y;Y=Y+16|0;r=n;o=Vu(e)|0;e=a[t>>2]|0;i=a[t+4>>2]|0;t=o+(i>>1)|0;if(i&1)e=a[(a[t>>2]|0)+e>>2]|0;a[r>>2]=Ng[e&15](t)|0;o=sh(r)|0;Y=n;return o|0}function ih(t){t=t|0;return 2}function ah(t){t=t|0;return lh()|0}function oh(t){t=t|0;var e=0,r=0;e=qm(8)|0;r=a[t+4>>2]|0;a[e>>2]=a[t>>2];a[e+4>>2]=r;return e|0}function sh(t){t=t|0;return a[t>>2]|0}function lh(){return 5540}function ch(){return 18598}function uh(){return}function hh(t){t=t|0;return vh(t)|0}function fh(){return 0}function dh(){return 0}function ph(t){t=t|0;if(t|0){yh(t);tm(t)}return}function mh(){return bh()|0}function Ah(){return xh()|0}function gh(){return wh()|0}function vh(t){t=t|0;return 3400}function yh(t){t=t|0;var e=0,r=0,n=0,i=0;e=Y;Y=Y+16|0;n=e;a[n>>2]=a[t>>2];a[t>>2]=0;r=t+4|0;a[n+4>>2]=a[r>>2];a[r>>2]=0;zs(n);r=t+16|0;a[n>>2]=a[r>>2];a[r>>2]=0;i=t+20|0;a[n+4>>2]=a[i>>2];a[i>>2]=0;Fs(n);a[n>>2]=a[r>>2];a[r>>2]=0;a[n+4>>2]=a[i>>2];a[i>>2]=0;Fs(n);Fs(r);Hs(t+8|0);zs(t);Y=e;return}function bh(){return 3400}function xh(){return 3408}function wh(){return 3424}function _h(){var t=0;t=qm(24)|0;Rh(t);return t|0}function Eh(t){t=t|0;var e=0,r=0,n=0,i=0;e=Y;Y=Y+16|0;r=e;i=mh()|0;n=Sh(r)|0;r=Ch(r)|0;L(i|0,n|0,r|0,Cu()|0,13,t|0);Y=e;return}function Mh(t){t=t|0;return Th(Fg[t&3]()|0)|0}function Sh(t){t=t|0;return 1}function Ch(t){t=t|0;return Ih()|0}function Th(t){t=t|0;return t|0}function Ih(){return 5548}function Rh(t){t=t|0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;a[t+12>>2]=0;a[t+16>>2]=0;a[t+20>>2]=0;return}function Bh(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;r=Y;Y=Y+16|0;n=r;i=r+8|0;s=a[e+4>>2]|0;a[n>>2]=a[e>>2];a[n+4>>2]=s;s=mh()|0;o=Lh(i)|0;i=Ph(i)|0;e=Hu()|0;P(s|0,t|0,o|0,i|0,e|0,5,Dh(n)|0,0);Y=r;return}function kh(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,o=0;o=Uh(e)|0;e=a[t>>2]|0;i=a[t+4>>2]|0;t=o+(i>>1)|0;if(i&1)e=a[(a[t>>2]|0)+e>>2]|0;i=Qu(r)|0;o=ju(n)|0;Wg[e&15](t,i,o);return}function Lh(t){t=t|0;return 4}function Ph(t){t=t|0;return Oh()|0}function Dh(t){t=t|0;var e=0,r=0;e=qm(8)|0;r=a[t+4>>2]|0;a[e>>2]=a[t>>2];a[e+4>>2]=r;return e|0}function Uh(t){t=t|0;return t|0}function Oh(){return 160}function Fh(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;r=Y;Y=Y+16|0;n=r;i=r+8|0;s=a[e+4>>2]|0;a[n>>2]=a[e>>2];a[n+4>>2]=s;s=mh()|0;o=zh(i)|0;i=Gh(i)|0;e=eh()|0;P(s|0,t|0,o|0,i|0,e|0,8,Zh(n)|0,0);Y=r;return}function Nh(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;i=Uh(e)|0;e=a[t>>2]|0;n=a[t+4>>2]|0;t=i+(n>>1)|0;if(n&1)e=a[(a[t>>2]|0)+e>>2]|0;i=ju(r)|0;jg[e&15](t,i);return}function zh(t){t=t|0;return 3}function Gh(t){t=t|0;return Vh()|0}function Zh(t){t=t|0;var e=0,r=0;e=qm(8)|0;r=a[t+4>>2]|0;a[e>>2]=a[t>>2];a[e+4>>2]=r;return e|0}function Vh(){return 5552}function Qh(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;r=Y;Y=Y+16|0;n=r;i=r+8|0;s=a[e+4>>2]|0;a[n>>2]=a[e>>2];a[n+4>>2]=s;s=mh()|0;o=Wh(i)|0;i=Hh(i)|0;e=eh()|0;P(s|0,t|0,o|0,i|0,e|0,9,Xh(n)|0,0);Y=r;return}function jh(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;i=Uh(e)|0;e=a[t>>2]|0;n=a[t+4>>2]|0;t=i+(n>>1)|0;if(n&1)e=a[(a[t>>2]|0)+e>>2]|0;i=$u(r)|0;jg[e&15](t,i);return}function Wh(t){t=t|0;return 3}function Hh(t){t=t|0;return qh()|0}function Xh(t){t=t|0;var e=0,r=0;e=qm(8)|0;r=a[t+4>>2]|0;a[e>>2]=a[t>>2];a[e+4>>2]=r;return e|0}function qh(){return 5564}function Yh(){tt();return}function Jh(){Kh();return}function Kh(){$h(22144);return}function $h(t){t=t|0;var e=0;e=Y;Y=Y+16|0;a[e>>2]=t;tf();Y=e;return}function tf(){G(ef()|0,18653);B(rf()|0,18658,1,1,0);nf(18663);af(18668);of(18680);sf(18694);lf(18700);cf(18715);uf(18719);hf(18732);ff(18737);df(18751);pf(18757);N(mf()|0,18764);N(Af()|0,18776);z(gf()|0,4,18809);z(vf()|0,2,18822);z(yf()|0,4,18837);D(bf()|0,18852);xf(18868);wf(18898);_f(18935);Ef(18974);Mf(19005);Sf(19045);Cf(19074);Tf(19112);If(19142);wf(19181);_f(19213);Ef(19246);Mf(19279);Sf(19313);Cf(19346);Rf(19380);Bf(19411);kf(19443);return}function ef(){return Qd()|0}function rf(){return Vd()|0}function nf(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Gd()|0;O(t|0,a[r>>2]|0,1,-128<<24>>24|0,127<<24>>24|0);Y=e;return}function af(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Nd()|0;O(t|0,a[r>>2]|0,1,-128<<24>>24|0,127<<24>>24|0);Y=e;return}function of(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Od()|0;O(t|0,a[r>>2]|0,1,0,255);Y=e;return}function sf(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Dd()|0;O(t|0,a[r>>2]|0,2,-32768<<16>>16|0,32767<<16>>16|0);Y=e;return}function lf(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Ld()|0;O(t|0,a[r>>2]|0,2,0,65535);Y=e;return}function cf(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Bd()|0;O(t|0,a[r>>2]|0,4,-2147483648,2147483647);Y=e;return}function uf(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Id()|0;O(t|0,a[r>>2]|0,4,0,-1);Y=e;return}function hf(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Cd()|0;O(t|0,a[r>>2]|0,4,-2147483648,2147483647);Y=e;return}function ff(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Md()|0;O(t|0,a[r>>2]|0,4,0,-1);Y=e;return}function df(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=_d()|0;U(t|0,a[r>>2]|0,4);Y=e;return}function pf(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=xd()|0;U(t|0,a[r>>2]|0,8);Y=e;return}function mf(){return bd()|0}function Af(){return yd()|0}function gf(){return vd()|0}function vf(){return gd()|0}function yf(){return Ad()|0}function bf(){return md()|0}function xf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=fd()|0;t=dd()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function wf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=cd()|0;t=ud()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function _f(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=od()|0;t=sd()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Ef(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=nd()|0;t=id()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Mf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=td()|0;t=ed()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Sf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=Jf()|0;t=Kf()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Cf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=Xf()|0;t=qf()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Tf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=jf()|0;t=Wf()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function If(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=Zf()|0;t=Vf()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Rf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=Nf()|0;t=zf()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Bf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=Uf()|0;t=Of()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function kf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=Lf()|0;t=Pf()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Lf(){return Df()|0}function Pf(){return 7}function Df(){return 3440}function Uf(){return Ff()|0}function Of(){return 7}function Ff(){return 3448}function Nf(){return Gf()|0}function zf(){return 6}function Gf(){return 3456}function Zf(){return Qf()|0}function Vf(){return 5}function Qf(){return 3464}function jf(){return Hf()|0}function Wf(){return 4}function Hf(){return 3472}function Xf(){return Yf()|0}function qf(){return 5}function Yf(){return 3480}function Jf(){return $f()|0}function Kf(){return 4}function $f(){return 3488}function td(){return rd()|0}function ed(){return 3}function rd(){return 3496}function nd(){return ad()|0}function id(){return 2}function ad(){return 3504}function od(){return ld()|0}function sd(){return 1}function ld(){return 3512}function cd(){return hd()|0}function ud(){return 0}function hd(){return 3520}function fd(){return pd()|0}function dd(){return 0}function pd(){return 3528}function md(){return 3536}function Ad(){return 3544}function gd(){return 3576}function vd(){return 3600}function yd(){return 3624}function bd(){return 3648}function xd(){return wd()|0}function wd(){return 4144}function _d(){return Ed()|0}function Ed(){return 4136}function Md(){return Sd()|0}function Sd(){return 4128}function Cd(){return Td()|0}function Td(){return 4120}function Id(){return Rd()|0}function Rd(){return 4112}function Bd(){return kd()|0}function kd(){return 4104}function Ld(){return Pd()|0}function Pd(){return 4096}function Dd(){return Ud()|0}function Ud(){return 4088}function Od(){return Fd()|0}function Fd(){return 4072}function Nd(){return zd()|0}function zd(){return 4080}function Gd(){return Zd()|0}function Zd(){return 4064}function Vd(){return 4056}function Qd(){return 4040}function jd(t){t=t|0;var e=0,r=0,n=0,i=0;e=Y;Y=Y+16|0;r=e+8|0;n=e+4|0;i=e;a[i>>2]=t;a[n>>2]=a[i>>2];a[r>>2]=a[(a[n>>2]|0)+4>>2];t=Sp(a[r>>2]|0)|0;Y=e;return t|0}function Wd(){return 21636}function Hd(t){t=t|0;return(t+-48|0)>>>0<10|0}function Xd(){return 5576}function qd(t,e){t=t|0;e=e|0;var r=0,i=0;r=n[t>>0]|0;i=n[e>>0]|0;if(r<<24>>24==0?1:r<<24>>24!=i<<24>>24)t=i;else{do{t=t+1|0;e=e+1|0;r=n[t>>0]|0;i=n[e>>0]|0}while(!(r<<24>>24==0?1:r<<24>>24!=i<<24>>24));t=i}return(r&255)-(t&255)|0}function Yd(t){t=t|0;var e=0,r=0,i=0;i=t;t:do{if(!(i&3))r=5;else{e=i;while(1){if(!(n[t>>0]|0)){t=e;break t}t=t+1|0;e=t;if(!(e&3)){r=5;break}}}}while(0);if((r|0)==5){while(1){e=a[t>>2]|0;if(!((e&-2139062144^-2139062144)&e+-16843009))t=t+4|0;else break}if((e&255)<<24>>24)do{t=t+1|0}while((n[t>>0]|0)!=0)}return t-i|0}function Jd(t){t=t|0;return}function Kd(t){t=t|0;return 1}function $d(t){t=t|0;var e=0,r=0;e=t+74|0;r=n[e>>0]|0;n[e>>0]=r+255|r;e=a[t>>2]|0;if(!(e&8)){a[t+8>>2]=0;a[t+4>>2]=0;r=a[t+44>>2]|0;a[t+28>>2]=r;a[t+20>>2]=r;a[t+16>>2]=r+(a[t+48>>2]|0);t=0}else{a[t>>2]=e|32;t=-1}return t|0}function tp(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,l=0,c=0;i=r+16|0;o=a[i>>2]|0;if(!o){if(!($d(r)|0)){o=a[i>>2]|0;s=5}else i=0}else s=5;t:do{if((s|0)==5){c=r+20|0;l=a[c>>2]|0;i=l;if((o-l|0)>>>0>>0){i=Zg[a[r+36>>2]&7](r,t,e)|0;break}e:do{if((n[r+75>>0]|0)<0|(e|0)==0){s=0;o=t}else{l=e;while(1){o=l+-1|0;if((n[t+o>>0]|0)==10)break;if(!o){s=0;o=t;break e}else l=o}i=Zg[a[r+36>>2]&7](r,t,l)|0;if(i>>>0>>0)break t;s=l;o=t+l|0;e=e-l|0;i=a[c>>2]|0}}while(0);hg(i|0,o|0,e|0)|0;a[c>>2]=(a[c>>2]|0)+e;i=s+e|0}}while(0);return i|0}function ep(t,e){t=t|0;e=e|0;if(!e)e=0;else e=rp(a[e>>2]|0,a[e+4>>2]|0,t)|0;return((e|0)==0?t:e)|0}function rp(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0;p=(a[t>>2]|0)+1794895138|0;s=np(a[t+8>>2]|0,p)|0;i=np(a[t+12>>2]|0,p)|0;o=np(a[t+16>>2]|0,p)|0;t:do{if((s>>>0>>2>>>0?(d=e-(s<<2)|0,i>>>0>>0&o>>>0>>0):0)?((o|i)&3|0)==0:0){d=i>>>2;f=o>>>2;h=0;while(1){c=s>>>1;u=h+c|0;l=u<<1;o=l+d|0;i=np(a[t+(o<<2)>>2]|0,p)|0;o=np(a[t+(o+1<<2)>>2]|0,p)|0;if(!(o>>>0>>0&i>>>0<(e-o|0)>>>0)){i=0;break t}if(n[t+(o+i)>>0]|0){i=0;break t}i=qd(r,t+o|0)|0;if(!i)break;i=(i|0)<0;if((s|0)==1){i=0;break t}h=i?h:u;s=i?c:s-c|0}i=l+f|0;o=np(a[t+(i<<2)>>2]|0,p)|0;i=np(a[t+(i+1<<2)>>2]|0,p)|0;if(i>>>0>>0&o>>>0<(e-i|0)>>>0)i=(n[t+(i+o)>>0]|0)==0?t+i|0:0;else i=0}else i=0}while(0);return i|0}function np(t,e){t=t|0;e=e|0;var r=0;r=ug(t|0)|0;return((e|0)==0?t:r)|0}function ip(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0;s=e&255;i=(r|0)!=0;t:do{if(i&(t&3|0)!=0){o=e&255;while(1){if((n[t>>0]|0)==o<<24>>24){o=6;break t}t=t+1|0;r=r+-1|0;i=(r|0)!=0;if(!(i&(t&3|0)!=0)){o=5;break}}}else o=5}while(0);if((o|0)==5)if(i)o=6;else t=0;t:do{if((o|0)==6){if((n[t>>0]|0)!=(e&255)<<24>>24){i=y(s,16843009)|0;e:do{if(r>>>0>3)do{s=a[t>>2]^i;if((s&-2139062144^-2139062144)&s+-16843009|0)break e;t=t+4|0;r=r+-4|0}while(r>>>0>3)}while(0)}if(!r)t=0;else{i=e&255;while(1){if((n[t>>0]|0)==i<<24>>24)break t;r=r+-1|0;if(!r){t=0;break}else t=t+1|0}}}}while(0);return t|0}function ap(t,e,r){t=t|0;e=e|0;r=r|0;return lp(t,e,r,1,8)|0}function op(t,e,r,i,s,l){t=t|0;e=+e;r=r|0;i=i|0;s=s|0;l=l|0;var c=0,u=0,h=0,f=0,d=0,p=0,m=0,A=0.0,g=0,v=0,b=0,x=0,w=0,E=0,M=0,S=0,C=0,T=0,I=0,R=0,B=0,k=0,L=0;L=Y;Y=Y+560|0;h=L+32|0;x=L+536|0;k=L;B=k;f=L+540|0;a[x>>2]=0;R=f+12|0;bp(e)|0;c=_()|0;if((c|0)<0){e=-e;bp(e)|0;I=1;T=20247;c=_()|0}else{I=(s&2049|0)!=0&1;T=(s&2048|0)==0?(s&1|0)==0?20248:20253:20250}do{if(0==0&(c&2146435072|0)==2146435072){k=(l&32|0)!=0;c=I+3|0;Ap(t,32,r,c,s&-65537);up(t,T,I);up(t,e!=e|0.0!=0.0?k?20274:20278:k?20266:20270,3);Ap(t,32,r,c,s^8192)}else{A=+xp(e,x)*2.0;c=A!=0.0;if(c)a[x>>2]=(a[x>>2]|0)+-1;b=l|32;if((b|0)==97){p=l&32;g=(p|0)==0?T:T+9|0;m=I|2;c=12-i|0;do{if(!(i>>>0>11|(c|0)==0)){e=8.0;do{c=c+-1|0;e=e*16.0}while((c|0)!=0);if((n[g>>0]|0)==45){e=-(e+(-A-e));break}else{e=A+e-e;break}}else e=A}while(0);u=a[x>>2]|0;c=(u|0)<0?0-u|0:u;c=mp(c,((c|0)<0)<<31>>31,R)|0;if((c|0)==(R|0)){c=f+11|0;n[c>>0]=48}n[c+-1>>0]=(u>>31&2)+43;d=c+-2|0;n[d>>0]=l+15;u=(i|0)<1;h=(s&8|0)==0;f=k;do{I=~~e;c=f+1|0;n[f>>0]=p|o[640+I>>0];e=(e-+(I|0))*16.0;if((c-B|0)==1?!(h&(u&e==0.0)):0){n[c>>0]=46;f=f+2|0}else f=c}while(e!=0.0);if((i|0)!=0?(-2-B+f|0)<(i|0):0){u=R;h=d;c=i+2+u-h|0}else{u=R;h=d;c=u-B-h+f|0}R=c+m|0;Ap(t,32,r,R,s);up(t,g,m);Ap(t,48,r,R,s^65536);B=f-B|0;up(t,k,B);k=u-h|0;Ap(t,48,c-(B+k)|0,0,0);up(t,d,k);Ap(t,32,r,R,s^8192);c=R;break}u=(i|0)<0?6:i;if(c){c=(a[x>>2]|0)+-28|0;a[x>>2]=c;e=A*268435456.0}else{e=A;c=a[x>>2]|0}C=(c|0)<0?h:h+288|0;h=C;do{M=~~e>>>0;a[h>>2]=M;h=h+4|0;e=(e-+(M>>>0))*1.0e9}while(e!=0.0);M=C;if((c|0)>0){p=C;while(1){d=(c|0)<29?c:29;c=h+-4|0;if(c>>>0>=p>>>0){f=0;do{v=lg(a[c>>2]|0,0,d|0)|0;v=rg(v|0,_()|0,f|0,0)|0;w=_()|0;f=og(v|0,w|0,1e9,0)|0;E=eg(f|0,_()|0,1e9,0)|0;E=ng(v|0,w|0,E|0,_()|0)|0;_()|0;a[c>>2]=E;c=c+-4|0}while(c>>>0>=p>>>0);if(f){E=p+-4|0;a[E>>2]=f;f=E}else f=p}else f=p;t:do{if(h>>>0>f>>>0){c=h;while(1){h=c+-4|0;if(a[h>>2]|0){h=c;break t}if(h>>>0>f>>>0)c=h;else break}}}while(0);c=(a[x>>2]|0)-d|0;a[x>>2]=c;if((c|0)>0)p=f;else break}}else f=C;if((c|0)<0){i=((u+25|0)/9|0)+1|0;v=(b|0)==102;do{g=0-c|0;g=(g|0)<9?g:9;if(f>>>0>>0){d=(1<>>g;m=0;c=f;do{E=a[c>>2]|0;a[c>>2]=(E>>>g)+m;m=y(E&d,p)|0;c=c+4|0}while(c>>>0>>0);f=(a[f>>2]|0)==0?f+4|0:f;if(m){a[h>>2]=m;h=h+4|0}}else f=(a[f>>2]|0)==0?f+4|0:f;c=v?C:f;h=(h-c>>2|0)>(i|0)?c+(i<<2)|0:h;c=(a[x>>2]|0)+g|0;a[x>>2]=c}while((c|0)<0);v=f}else v=f;if(v>>>0>>0){c=(M-v>>2)*9|0;d=a[v>>2]|0;if(d>>>0>=10){f=10;do{f=f*10|0;c=c+1|0}while(d>>>0>=f>>>0)}}else c=0;w=(b|0)==103;E=(u|0)!=0;f=u-((b|0)==102?0:c)+((E&w)<<31>>31)|0;if((f|0)<(((h-M>>2)*9|0)+-9|0)){x=f+9216|0;f=(x|0)/9|0;i=C+4+(f+-1024<<2)|0;f=x-(f*9|0)|0;if((f|0)<8){d=10;while(1){d=d*10|0;if((f|0)<7)f=f+1|0;else break}}else d=10;m=a[i>>2]|0;f=(m>>>0)/(d>>>0)|0;g=m-(y(f,d)|0)|0;p=(i+4|0)==(h|0);if(!(p&(g|0)==0)){A=(f&1|0)==0?9007199254740992.0:9007199254740994.0;x=d>>>1;e=g>>>0>>0?0.5:p&(g|0)==(x|0)?1.0:1.5;if(I){x=(n[T>>0]|0)==45;e=x?-e:e;A=x?-A:A}f=m-g|0;a[i>>2]=f;if(A+e!=A){x=f+d|0;a[i>>2]=x;if(x>>>0>999999999){d=i;c=v;while(1){f=d+-4|0;a[d>>2]=0;if(f>>>0>>0){c=c+-4|0;a[c>>2]=0}x=(a[f>>2]|0)+1|0;a[f>>2]=x;if(x>>>0>999999999)d=f;else{d=c;break}}}else{f=i;d=v}c=(M-d>>2)*9|0;m=a[d>>2]|0;if(m>>>0>=10){p=10;do{p=p*10|0;c=c+1|0}while(m>>>0>=p>>>0)}}else{f=i;d=v}}else{f=i;d=v}x=f+4|0;h=h>>>0>x>>>0?x:h}else d=v;i=0-c|0;t:do{if(h>>>0>d>>>0)while(1){f=h+-4|0;if(a[f>>2]|0){x=h;b=1;break t}if(f>>>0>d>>>0)h=f;else{x=f;b=0;break}}else{x=h;b=0}}while(0);do{if(w){u=u+((E^1)&1)|0;if((u|0)>(c|0)&(c|0)>-5){p=l+-1|0;u=u+-1-c|0}else{p=l+-2|0;u=u+-1|0}if(!(s&8)){if(b?(S=a[x+-4>>2]|0,(S|0)!=0):0){if(!((S>>>0)%10|0)){f=0;h=10;do{h=h*10|0;f=f+1|0}while(!((S>>>0)%(h>>>0)|0|0))}else f=0}else f=9;h=((x-M>>2)*9|0)+-9|0;if((p|32|0)==102){l=h-f|0;l=(l|0)>0?l:0;u=(u|0)<(l|0)?u:l;break}else{l=h+c-f|0;l=(l|0)>0?l:0;u=(u|0)<(l|0)?u:l;break}}}else p=l}while(0);v=(u|0)!=0;m=v?1:s>>>3&1;g=(p|32|0)==102;if(g){w=0;c=(c|0)>0?c:0}else{h=(c|0)<0?i:c;h=mp(h,((h|0)<0)<<31>>31,R)|0;f=R;if((f-h|0)<2)do{h=h+-1|0;n[h>>0]=48}while((f-h|0)<2);n[h+-1>>0]=(c>>31&2)+43;c=h+-2|0;n[c>>0]=p;w=c;c=f-c|0}c=I+1+u+m+c|0;Ap(t,32,r,c,s);up(t,T,I);Ap(t,48,r,c,s^65536);if(g){m=d>>>0>C>>>0?C:d;g=k+9|0;d=g;p=k+8|0;f=m;do{h=mp(a[f>>2]|0,0,g)|0;if((f|0)==(m|0)){if((h|0)==(g|0)){n[p>>0]=48;h=p}}else if(h>>>0>k>>>0){dg(k|0,48,h-B|0)|0;do{h=h+-1|0}while(h>>>0>k>>>0)}up(t,h,d-h|0);f=f+4|0}while(f>>>0<=C>>>0);if(!((s&8|0)==0&(v^1)))up(t,20282,1);if(f>>>0>>0&(u|0)>0)while(1){h=mp(a[f>>2]|0,0,g)|0;if(h>>>0>k>>>0){dg(k|0,48,h-B|0)|0;do{h=h+-1|0}while(h>>>0>k>>>0)}up(t,h,(u|0)<9?u:9);f=f+4|0;h=u+-9|0;if(!(f>>>0>>0&(u|0)>9)){u=h;break}else u=h}Ap(t,48,u+9|0,9,0)}else{x=b?x:d+4|0;if(d>>>0>>0&(u|0)>-1){i=k+9|0;v=(s&8|0)==0;b=i;m=0-B|0;g=k+8|0;p=d;do{h=mp(a[p>>2]|0,0,i)|0;if((h|0)==(i|0)){n[g>>0]=48;h=g}do{if((p|0)==(d|0)){f=h+1|0;up(t,h,1);if(v&(u|0)<1){h=f;break}up(t,20282,1);h=f}else{if(h>>>0<=k>>>0)break;dg(k|0,48,h+m|0)|0;do{h=h+-1|0}while(h>>>0>k>>>0)}}while(0);B=b-h|0;up(t,h,(u|0)>(B|0)?B:u);u=u-B|0;p=p+4|0}while(p>>>0>>0&(u|0)>-1)}Ap(t,48,u+18|0,18,0);up(t,w,R-w|0)}Ap(t,32,r,c,s^8192)}}while(0);Y=L;return((c|0)<(r|0)?r:c)|0}function sp(t,e){t=t|0;e=e|0;var r=0.0,n=0;n=(a[e>>2]|0)+(8-1)&~(8-1);r=+c[n>>3];a[e>>2]=n+8;c[t>>3]=r;return}function lp(t,e,r,i,o){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;var s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0,A=0,g=0,v=0,y=0;y=Y;Y=Y+224|0;m=y+208|0;A=y+160|0;g=y+80|0;v=y;s=A;l=s+40|0;do{a[s>>2]=0;s=s+4|0}while((s|0)<(l|0));a[m>>2]=a[r>>2];if((cp(0,e,m,g,A,i,o)|0)<0)r=-1;else{if((a[t+76>>2]|0)>-1)p=Kd(t)|0;else p=0;r=a[t>>2]|0;d=r&32;if((n[t+74>>0]|0)<1)a[t>>2]=r&-33;s=t+48|0;if(!(a[s>>2]|0)){l=t+44|0;c=a[l>>2]|0;a[l>>2]=v;u=t+28|0;a[u>>2]=v;h=t+20|0;a[h>>2]=v;a[s>>2]=80;f=t+16|0;a[f>>2]=v+80;r=cp(t,e,m,g,A,i,o)|0;if(c){Zg[a[t+36>>2]&7](t,0,0)|0;r=(a[h>>2]|0)==0?-1:r;a[l>>2]=c;a[s>>2]=0;a[f>>2]=0;a[u>>2]=0;a[h>>2]=0}}else r=cp(t,e,m,g,A,i,o)|0;s=a[t>>2]|0;a[t>>2]=s|d;if(p|0)Jd(t);r=(s&32|0)==0?r:-1}Y=y;return r|0}function cp(t,e,r,o,s,l,u){t=t|0;e=e|0;r=r|0;o=o|0;s=s|0;l=l|0;u=u|0;var h=0,f=0,d=0,p=0,m=0,A=0,g=0,v=0,y=0,b=0,x=0,w=0,E=0,M=0,S=0,C=0,T=0,I=0,R=0,B=0,k=0,L=0,P=0,D=0,U=0;D=Y;Y=Y+64|0;k=D+56|0;P=D+40|0;C=D;I=D+48|0;R=D+60|0;a[k>>2]=e;E=(t|0)!=0;M=C+40|0;S=M;C=C+39|0;T=I+4|0;h=0;e=0;d=0;t:while(1){do{do{if((e|0)>-1)if((h|0)>(2147483647-e|0)){a[(Wd()|0)>>2]=61;e=-1;break}else{e=h+e|0;break}}while(0);g=a[k>>2]|0;h=n[g>>0]|0;if(!(h<<24>>24)){w=92;break t}f=g;e:while(1){switch(h<<24>>24){case 37:{w=10;break e}case 0:{h=f;break e}default:{}}x=f+1|0;a[k>>2]=x;h=n[x>>0]|0;f=x}e:do{if((w|0)==10){w=0;h=f;do{if((n[f+1>>0]|0)!=37)break e;h=h+1|0;f=f+2|0;a[k>>2]=f}while((n[f>>0]|0)==37)}}while(0);h=h-g|0;if(E)up(t,g,h)}while((h|0)!=0);x=(Hd(n[(a[k>>2]|0)+1>>0]|0)|0)==0;f=a[k>>2]|0;if(!x?(n[f+2>>0]|0)==36:0){y=(n[f+1>>0]|0)+-48|0;m=1;h=3}else{y=-1;m=d;h=1}h=f+h|0;a[k>>2]=h;f=n[h>>0]|0;d=(f<<24>>24)+-32|0;if(d>>>0>31|(1<>2]=h;f=n[h>>0]|0;d=(f<<24>>24)+-32|0}while(!(d>>>0>31|(1<>24==42){if((Hd(n[h+1>>0]|0)|0)!=0?(L=a[k>>2]|0,(n[L+2>>0]|0)==36):0){h=L+1|0;a[s+((n[h>>0]|0)+-48<<2)>>2]=10;h=a[o+((n[h>>0]|0)+-48<<3)>>2]|0;d=1;f=L+3|0}else{if(m|0){e=-1;break}if(E){x=(a[r>>2]|0)+(4-1)&~(4-1);h=a[x>>2]|0;a[r>>2]=x+4}else h=0;d=0;f=(a[k>>2]|0)+1|0}a[k>>2]=f;x=(h|0)<0;b=x?0-h|0:h;p=x?p|8192:p;x=d}else{h=hp(k)|0;if((h|0)<0){e=-1;break}b=h;x=m;f=a[k>>2]|0}do{if((n[f>>0]|0)==46){h=f+1|0;if((n[h>>0]|0)!=42){a[k>>2]=h;h=hp(k)|0;f=a[k>>2]|0;break}if(Hd(n[f+2>>0]|0)|0?(B=a[k>>2]|0,(n[B+3>>0]|0)==36):0){h=B+2|0;a[s+((n[h>>0]|0)+-48<<2)>>2]=10;h=a[o+((n[h>>0]|0)+-48<<3)>>2]|0;f=B+4|0;a[k>>2]=f;break}if(x|0){e=-1;break t}if(E){v=(a[r>>2]|0)+(4-1)&~(4-1);h=a[v>>2]|0;a[r>>2]=v+4}else h=0;f=(a[k>>2]|0)+2|0;a[k>>2]=f}else h=-1}while(0);v=0;while(1){if(((n[f>>0]|0)+-65|0)>>>0>57){e=-1;break t}d=f;f=f+1|0;a[k>>2]=f;d=n[(n[d>>0]|0)+-65+(176+(v*58|0))>>0]|0;m=d&255;if((m+-1|0)>>>0>=8)break;else v=m}if(!(d<<24>>24)){e=-1;break}A=(y|0)>-1;do{if(d<<24>>24==19){if(A){e=-1;break t}else w=54}else{if(A){a[s+(y<<2)>>2]=m;A=o+(y<<3)|0;y=a[A+4>>2]|0;w=P;a[w>>2]=a[A>>2];a[w+4>>2]=y;w=54;break}if(!E){e=0;break t}fp(P,m,r,u);f=a[k>>2]|0;w=55}}while(0);if((w|0)==54){w=0;if(E)w=55;else h=0}e:do{if((w|0)==55){w=0;f=n[f+-1>>0]|0;f=(v|0)!=0&(f&15|0)==3?f&-33:f;d=p&-65537;y=(p&8192|0)==0?p:d;r:do{switch(f|0){case 110:switch((v&255)<<24>>24){case 0:{a[a[P>>2]>>2]=e;h=0;break e}case 1:{a[a[P>>2]>>2]=e;h=0;break e}case 2:{h=a[P>>2]|0;a[h>>2]=e;a[h+4>>2]=((e|0)<0)<<31>>31;h=0;break e}case 3:{i[a[P>>2]>>1]=e;h=0;break e}case 4:{n[a[P>>2]>>0]=e;h=0;break e}case 6:{a[a[P>>2]>>2]=e;h=0;break e}case 7:{h=a[P>>2]|0;a[h>>2]=e;a[h+4>>2]=((e|0)<0)<<31>>31;h=0;break e}default:{h=0;break e}}case 112:{f=120;h=h>>>0>8?h:8;d=y|8;w=67;break}case 88:case 120:{d=y;w=67;break}case 111:{A=P;A=pp(a[A>>2]|0,a[A+4>>2]|0,M)|0;d=S-A|0;p=0;m=20230;h=(y&8|0)==0|(h|0)>(d|0)?h:d+1|0;d=y;w=73;break}case 105:case 100:{d=P;f=a[d>>2]|0;d=a[d+4>>2]|0;if((d|0)<0){f=ng(0,0,f|0,d|0)|0;d=_()|0;p=P;a[p>>2]=f;a[p+4>>2]=d;p=1;m=20230;w=72;break r}else{p=(y&2049|0)!=0&1;m=(y&2048|0)==0?(y&1|0)==0?20230:20232:20231;w=72;break r}}case 117:{d=P;p=0;m=20230;f=a[d>>2]|0;d=a[d+4>>2]|0;w=72;break}case 99:{n[C>>0]=a[P>>2];g=C;p=0;m=20230;A=1;f=d;h=S;break}case 115:{v=a[P>>2]|0;v=(v|0)==0?20240:v;y=ip(v,0,h)|0;U=(y|0)==0;g=v;p=0;m=20230;A=U?h:y-v|0;f=d;h=U?v+h|0:y;break}case 67:{a[I>>2]=a[P>>2];a[T>>2]=0;a[P>>2]=I;m=-1;w=79;break}case 83:{if(!h){Ap(t,32,b,0,y);h=0;w=89}else{m=h;w=79}break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{h=zg[l&1](t,+c[P>>3],b,h,y,f)|0;break e}default:{p=0;m=20230;A=h;f=y;h=S}}}while(0);r:do{if((w|0)==67){A=P;A=dp(a[A>>2]|0,a[A+4>>2]|0,M,f&32)|0;m=P;m=(d&8|0)==0|(a[m>>2]|0)==0&(a[m+4>>2]|0)==0;p=m?0:2;m=m?20230:20230+(f>>>4)|0;w=73}else if((w|0)==72){A=mp(f,d,M)|0;d=y;w=73}else if((w|0)==79){w=0;p=a[P>>2]|0;h=0;while(1){f=a[p>>2]|0;if(!f)break;f=gp(R,f)|0;d=(f|0)<0;if(d|f>>>0>(m-h|0)>>>0){w=83;break}h=f+h|0;if(m>>>0>h>>>0)p=p+4|0;else break}if((w|0)==83){w=0;if(d){e=-1;break t}}Ap(t,32,b,h,y);if(!h){h=0;w=89}else{d=a[P>>2]|0;p=0;while(1){f=a[d>>2]|0;if(!f){w=89;break r}f=gp(R,f)|0;p=f+p|0;if((p|0)>(h|0)){w=89;break r}up(t,R,f);if(p>>>0>=h>>>0){w=89;break}else d=d+4|0}}}}while(0);if((w|0)==73){w=0;f=P;f=(a[f>>2]|0)!=0|(a[f+4>>2]|0)!=0;U=(h|0)!=0|f;f=S-A+((f^1)&1)|0;g=U?A:M;A=U?(h|0)>(f|0)?h:f:0;f=(h|0)>-1?d&-65537:d;h=S}else if((w|0)==89){w=0;Ap(t,32,b,h,y^8192);h=(b|0)>(h|0)?b:h;break}y=h-g|0;v=(A|0)<(y|0)?y:A;U=v+p|0;h=(b|0)<(U|0)?U:b;Ap(t,32,h,U,f);up(t,m,p);Ap(t,48,h,U,f^65536);Ap(t,48,v,y,0);up(t,g,y);Ap(t,32,h,U,f^8192)}}while(0);d=x}t:do{if((w|0)==92)if(!t)if(!d)e=0;else{e=1;while(1){h=a[s+(e<<2)>>2]|0;if(!h)break;fp(o+(e<<3)|0,h,r,u);e=e+1|0;if(e>>>0>=10){e=1;break t}}while(1){if(a[s+(e<<2)>>2]|0){e=-1;break t}e=e+1|0;if(e>>>0>=10){e=1;break}}}}while(0);Y=D;return e|0}function up(t,e,r){t=t|0;e=e|0;r=r|0;if(!(a[t>>2]&32))tp(e,r,t)|0;return}function hp(t){t=t|0;var e=0,r=0;if(!(Hd(n[a[t>>2]>>0]|0)|0))e=0;else{e=0;do{r=a[t>>2]|0;e=(e*10|0)+-48+(n[r>>0]|0)|0;r=r+1|0;a[t>>2]=r}while((Hd(n[r>>0]|0)|0)!=0)}return e|0}function fp(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,o=0.0;t:do{if(e>>>0<=20)do{switch(e|0){case 9:{e=(a[r>>2]|0)+(4-1)&~(4-1);n=a[e>>2]|0;a[r>>2]=e+4;a[t>>2]=n;break t}case 10:{n=(a[r>>2]|0)+(4-1)&~(4-1);e=a[n>>2]|0;a[r>>2]=n+4;n=t;a[n>>2]=e;a[n+4>>2]=((e|0)<0)<<31>>31;break t}case 11:{n=(a[r>>2]|0)+(4-1)&~(4-1);e=a[n>>2]|0;a[r>>2]=n+4;n=t;a[n>>2]=e;a[n+4>>2]=0;break t}case 12:{n=(a[r>>2]|0)+(8-1)&~(8-1);e=n;i=a[e>>2]|0;e=a[e+4>>2]|0;a[r>>2]=n+8;n=t;a[n>>2]=i;a[n+4>>2]=e;break t}case 13:{i=(a[r>>2]|0)+(4-1)&~(4-1);n=a[i>>2]|0;a[r>>2]=i+4;n=(n&65535)<<16>>16;i=t;a[i>>2]=n;a[i+4>>2]=((n|0)<0)<<31>>31;break t}case 14:{i=(a[r>>2]|0)+(4-1)&~(4-1);n=a[i>>2]|0;a[r>>2]=i+4;i=t;a[i>>2]=n&65535;a[i+4>>2]=0;break t}case 15:{i=(a[r>>2]|0)+(4-1)&~(4-1);n=a[i>>2]|0;a[r>>2]=i+4;n=(n&255)<<24>>24;i=t;a[i>>2]=n;a[i+4>>2]=((n|0)<0)<<31>>31;break t}case 16:{i=(a[r>>2]|0)+(4-1)&~(4-1);n=a[i>>2]|0;a[r>>2]=i+4;i=t;a[i>>2]=n&255;a[i+4>>2]=0;break t}case 17:{i=(a[r>>2]|0)+(8-1)&~(8-1);o=+c[i>>3];a[r>>2]=i+8;c[t>>3]=o;break t}case 18:{jg[n&15](t,r);break t}default:break t}}while(0)}while(0);return}function dp(t,e,r,i){t=t|0;e=e|0;r=r|0;i=i|0;if(!((t|0)==0&(e|0)==0))do{r=r+-1|0;n[r>>0]=o[640+(t&15)>>0]|0|i;t=sg(t|0,e|0,4)|0;e=_()|0}while(!((t|0)==0&(e|0)==0));return r|0}function pp(t,e,r){t=t|0;e=e|0;r=r|0;if(!((t|0)==0&(e|0)==0))do{r=r+-1|0;n[r>>0]=t&7|48;t=sg(t|0,e|0,3)|0;e=_()|0}while(!((t|0)==0&(e|0)==0));return r|0}function mp(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,a=0,o=0;if(e>>>0>0|(e|0)==0&t>>>0>4294967295){do{i=t;t=og(t|0,e|0,10,0)|0;a=e;e=_()|0;o=eg(t|0,e|0,10,0)|0;o=ng(i|0,a|0,o|0,_()|0)|0;_()|0;r=r+-1|0;n[r>>0]=o&255|48}while(a>>>0>9|(a|0)==9&i>>>0>4294967295);e=t}else e=t;if(e)do{o=e;e=(e>>>0)/10|0;r=r+-1|0;n[r>>0]=o-(e*10|0)|48}while(o>>>0>=10);return r|0}function Ap(t,e,r,n,i){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;var a=0,o=0;o=Y;Y=Y+256|0;a=o;if((r|0)>(n|0)&(i&73728|0)==0){i=r-n|0;dg(a|0,e<<24>>24|0,(i>>>0<256?i:256)|0)|0;if(i>>>0>255){e=r-n|0;do{up(t,a,256);i=i+-256|0}while(i>>>0>255);i=e&255}up(t,a,i)}Y=o;return}function gp(t,e){t=t|0;e=e|0;if(!t)t=0;else t=vp(t,e,0)|0;return t|0}function vp(t,e,r){t=t|0;e=e|0;r=r|0;do{if(t){if(e>>>0<128){n[t>>0]=e;t=1;break}if(!(a[a[(yp()|0)+176>>2]>>2]|0))if((e&-128|0)==57216){n[t>>0]=e;t=1;break}else{a[(Wd()|0)>>2]=25;t=-1;break}if(e>>>0<2048){n[t>>0]=e>>>6|192;n[t+1>>0]=e&63|128;t=2;break}if(e>>>0<55296|(e&-8192|0)==57344){n[t>>0]=e>>>12|224;n[t+1>>0]=e>>>6&63|128;n[t+2>>0]=e&63|128;t=3;break}if((e+-65536|0)>>>0<1048576){n[t>>0]=e>>>18|240;n[t+1>>0]=e>>>12&63|128;n[t+2>>0]=e>>>6&63|128;n[t+3>>0]=e&63|128;t=4;break}else{a[(Wd()|0)>>2]=25;t=-1;break}}else t=1}while(0);return t|0}function yp(){return Xd()|0}function bp(t){t=+t;var e=0;c[u>>3]=t;e=a[u>>2]|0;w(a[u+4>>2]|0);return e|0}function xp(t,e){t=+t;e=e|0;var r=0,n=0,i=0;c[u>>3]=t;r=a[u>>2]|0;n=a[u+4>>2]|0;i=sg(r|0,n|0,52)|0;_()|0;switch(i&2047){case 0:{if(t!=0.0){t=+xp(t*18446744073709551616.0,e);r=(a[e>>2]|0)+-64|0}else r=0;a[e>>2]=r;break}case 2047:break;default:{a[e>>2]=(i&2047)+-1022;a[u>>2]=r;a[u+4>>2]=n&-2146435073|1071644672;t=+c[u>>3]}}return+t}function wp(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,a=0;t:do{if(!r)t=0;else{while(1){i=n[t>>0]|0;a=n[e>>0]|0;if(i<<24>>24!=a<<24>>24)break;r=r+-1|0;if(!r){t=0;break t}else{t=t+1|0;e=e+1|0}}t=(i&255)-(a&255)|0}}while(0);return t|0}function _p(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,o=0;i=Y;Y=Y+16|0;o=i;a[o>>2]=n;n=Ep(t,e,r,o)|0;Y=i;return n|0}function Ep(t,e,r,i){t=t|0;e=e|0;r=r|0;i=i|0;var o=0,s=0,l=0,c=0;c=Y;Y=Y+160|0;o=c+144|0;l=c;hg(l|0,3672,144)|0;if((e+-1|0)>>>0>2147483646){if(!e){t=o;e=1;s=4}else{a[(Wd()|0)>>2]=61;e=-1}}else s=4;if((s|0)==4){s=-2-t|0;s=e>>>0>s>>>0?s:e;a[l+48>>2]=s;o=l+20|0;a[o>>2]=t;a[l+44>>2]=t;e=t+s|0;t=l+16|0;a[t>>2]=e;a[l+28>>2]=e;e=ap(l,r,i)|0;if(s){l=a[o>>2]|0;n[l+(((l|0)==(a[t>>2]|0))<<31>>31)>>0]=0}}Y=c;return e|0}function Mp(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;n=t+20|0;i=a[n>>2]|0;t=(a[t+16>>2]|0)-i|0;t=t>>>0>r>>>0?r:t;hg(i|0,e|0,t|0)|0;a[n>>2]=(a[n>>2]|0)+t;return r|0}function Sp(t){t=t|0;var e=0,r=0;e=(Yd(t)|0)+1|0;r=XA(e)|0;if(!r)t=0;else t=hg(r|0,t|0,e|0)|0;return t|0}function Cp(t,e){t=t|0;e=e|0;var r=0,i=0;r=0;while(1){if((o[656+r>>0]|0)==(t|0)){i=4;break}r=r+1|0;if((r|0)==87){t=87;i=5;break}}if((i|0)==4)if(!r)r=752;else{t=r;i=5}if((i|0)==5){r=752;do{do{i=r;r=r+1|0}while((n[i>>0]|0)!=0);t=t+-1|0}while((t|0)!=0)}return Tp(r,a[e+20>>2]|0)|0}function Tp(t,e){t=t|0;e=e|0;return ep(t,e)|0}function Ip(t){t=t|0;return Cp(t,a[(Rp()|0)+176>>2]|0)|0}function Rp(){return Xd()|0}function Bp(t,e,r){t=t|0;e=e|0;r=r|0;var i=0;i=Ip(t)|0;t=Yd(i)|0;if(t>>>0>=r>>>0){t=r+-1|0;if(!r)t=68;else{hg(e|0,i|0,t|0)|0;n[e+t>>0]=0;t=68}}else{hg(e|0,i|0,t+1|0)|0;t=0}return t|0}function kp(){var t=0,e=0,r=0,n=0,i=0,o=0,s=0;n=Y;Y=Y+48|0;o=n+32|0;e=n+24|0;s=n+16|0;i=n;n=n+36|0;t=Lp()|0;if(t|0?(r=a[t>>2]|0,r|0):0){t=r+48|0;if(!(Pp(t)|0)){a[e>>2]=20420;Up(20370,e)}e=Dp(t)|0;if((e|0)==1126902529&(_()|0)==1129074247)t=a[r+44>>2]|0;else t=r+80|0;a[n>>2]=t;r=a[r>>2]|0;t=a[r+4>>2]|0;if(Zg[a[(a[954]|0)+16>>2]&7](3816,r,n)|0){s=a[n>>2]|0;s=Ng[a[(a[s>>2]|0)+8>>2]&15](s)|0;a[i>>2]=20420;a[i+4>>2]=t;a[i+8>>2]=s;Up(20284,i)}else{a[s>>2]=20420;a[s+4>>2]=t;Up(20329,s)}}Up(20408,o)}function Lp(){return 21640}function Pp(t){t=t|0;t=Dp(t)|0;return(t&-256|0)==1126902528&(_()|0)==1129074247|0}function Dp(t){t=t|0;var e=0;e=t;t=a[e>>2]|0;w(a[e+4>>2]|0);return t|0}function Up(t,e){t=t|0;e=e|0;q()}function Op(t){t=t|0;return}function Fp(t){t=t|0;Op(t);tm(t);return}function Np(t){t=t|0;return}function zp(t){t=t|0;return}function Gp(t,e,r){t=t|0;e=e|0;r=r|0;var o=0,s=0,l=0,c=0,u=0,h=0;h=Y;Y=Y+64|0;c=h;if(!(jp(t,e,0)|0)){if((e|0)!=0?(u=qp(e,3840,3824,0)|0,(u|0)!=0):0){a[c>>2]=u;a[c+4>>2]=0;a[c+8>>2]=t;a[c+12>>2]=-1;t=c+16|0;e=c+24|0;o=c+48|0;s=t;l=s+36|0;do{a[s>>2]=0;s=s+4|0}while((s|0)<(l|0));i[t+36>>1]=0;n[t+38>>0]=0;a[o>>2]=1;Hg[a[(a[u>>2]|0)+28>>2]&7](u,c,a[r>>2]|0,1);if((a[e>>2]|0)==1){a[r>>2]=a[t>>2];t=1}else t=0}else t=0}else t=1;Y=h;return t|0}function Zp(t,e,r,n,i,o){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;o=o|0;if(jp(t,a[e+8>>2]|0,o)|0)Xp(0,e,r,n,i);return}function Vp(t,e,r,i,o){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;var s=0;do{if(!(jp(t,a[e+8>>2]|0,o)|0)){if(jp(t,a[e>>2]|0,o)|0){if((a[e+16>>2]|0)!=(r|0)?(s=e+20|0,(a[s>>2]|0)!=(r|0)):0){a[e+32>>2]=i;a[s>>2]=r;o=e+40|0;a[o>>2]=(a[o>>2]|0)+1;if((a[e+36>>2]|0)==1?(a[e+24>>2]|0)==2:0)n[e+54>>0]=1;a[e+44>>2]=4;break}if((i|0)==1)a[e+32>>2]=1}}else Hp(0,e,r,i)}while(0);return}function Qp(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;if(jp(t,a[e+8>>2]|0,0)|0)Wp(0,e,r,n);return}function jp(t,e,r){t=t|0;e=e|0;r=r|0;if(r){if((t|0)==(e|0))t=1;else t=(qd(a[t+4>>2]|0,a[e+4>>2]|0)|0)==0}else t=(a[t+4>>2]|0)==(a[e+4>>2]|0);return t|0}function Wp(t,e,r,i){t=t|0;e=e|0;r=r|0;i=i|0;var o=0;t=e+16|0;o=a[t>>2]|0;do{if(o){if((o|0)!=(r|0)){i=e+36|0;a[i>>2]=(a[i>>2]|0)+1;a[e+24>>2]=2;n[e+54>>0]=1;break}t=e+24|0;if((a[t>>2]|0)==2)a[t>>2]=i}else{a[t>>2]=r;a[e+24>>2]=i;a[e+36>>2]=1}}while(0);return}function Hp(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0;if((a[e+4>>2]|0)==(r|0)?(i=e+28|0,(a[i>>2]|0)!=1):0)a[i>>2]=n;return}function Xp(t,e,r,i,o){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;n[e+53>>0]=1;do{if((a[e+4>>2]|0)==(i|0)){n[e+52>>0]=1;t=e+16|0;i=a[t>>2]|0;if(!i){a[t>>2]=r;a[e+24>>2]=o;a[e+36>>2]=1;if(!((o|0)==1?(a[e+48>>2]|0)==1:0))break;n[e+54>>0]=1;break}if((i|0)!=(r|0)){o=e+36|0;a[o>>2]=(a[o>>2]|0)+1;n[e+54>>0]=1;break}i=e+24|0;t=a[i>>2]|0;if((t|0)==2){a[i>>2]=o;t=o}if((t|0)==1?(a[e+48>>2]|0)==1:0)n[e+54>>0]=1}}while(0);return}function qp(t,e,r,o){t=t|0;e=e|0;r=r|0;o=o|0;var s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0;m=Y;Y=Y+64|0;d=m;f=a[t>>2]|0;p=t+(a[f+-8>>2]|0)|0;f=a[f+-4>>2]|0;a[d>>2]=r;a[d+4>>2]=t;a[d+8>>2]=e;a[d+12>>2]=o;t=d+16|0;e=d+20|0;o=d+24|0;s=d+28|0;l=d+32|0;c=d+40|0;u=t;h=u+36|0;do{a[u>>2]=0;u=u+4|0}while((u|0)<(h|0));i[t+36>>1]=0;n[t+38>>0]=0;t:do{if(jp(f,r,0)|0){a[d+48>>2]=1;qg[a[(a[f>>2]|0)+20>>2]&3](f,d,p,p,1,0);t=(a[o>>2]|0)==1?p:0}else{Xg[a[(a[f>>2]|0)+24>>2]&3](f,d,p,1,0);switch(a[d+36>>2]|0){case 0:{t=(a[c>>2]|0)==1&(a[s>>2]|0)==1&(a[l>>2]|0)==1?a[e>>2]|0:0;break t}case 1:break;default:{t=0;break t}}if((a[o>>2]|0)!=1?!((a[c>>2]|0)==0&(a[s>>2]|0)==1&(a[l>>2]|0)==1):0){t=0;break}t=a[t>>2]|0}}while(0);Y=m;return t|0}function Yp(t){t=t|0;Op(t);tm(t);return}function Jp(t,e,r,n,i,o){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;o=o|0;if(jp(t,a[e+8>>2]|0,o)|0)Xp(0,e,r,n,i);else{t=a[t+8>>2]|0;qg[a[(a[t>>2]|0)+20>>2]&3](t,e,r,n,i,o)}return}function Kp(t,e,r,i,o){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;var s=0,l=0,c=0;t:do{if(!(jp(t,a[e+8>>2]|0,o)|0)){if(!(jp(t,a[e>>2]|0,o)|0)){l=a[t+8>>2]|0;Xg[a[(a[l>>2]|0)+24>>2]&3](l,e,r,i,o);break}if((a[e+16>>2]|0)!=(r|0)?(l=e+20|0,(a[l>>2]|0)!=(r|0)):0){a[e+32>>2]=i;i=e+44|0;do{if((a[i>>2]|0)!=4){s=e+52|0;n[s>>0]=0;c=e+53|0;n[c>>0]=0;t=a[t+8>>2]|0;qg[a[(a[t>>2]|0)+20>>2]&3](t,e,r,r,1,o);if(n[c>>0]|0){c=(n[s>>0]|0)==0;a[i>>2]=3;if(c)break;else break t}else{a[i>>2]=4;break}}}while(0);a[l>>2]=r;c=e+40|0;a[c>>2]=(a[c>>2]|0)+1;if((a[e+36>>2]|0)!=1)break;if((a[e+24>>2]|0)!=2)break;n[e+54>>0]=1;break}if((i|0)==1)a[e+32>>2]=1}else Hp(0,e,r,i)}while(0);return}function $p(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;if(jp(t,a[e+8>>2]|0,0)|0)Wp(0,e,r,n);else{t=a[t+8>>2]|0;Hg[a[(a[t>>2]|0)+28>>2]&7](t,e,r,n)}return}function tm(t){t=t|0;qA(t);return}function em(t){t=t|0;return}function rm(){var t=0,e=0;t=Lp()|0;if((t|0?(e=a[t>>2]|0,e|0):0)?Pp(e+48|0)|0:0)nm(a[e+12>>2]|0);nm(im()|0)}function nm(t){t=t|0;var e=0;e=Y;Y=Y+16|0;Vg[t&3]();Up(20559,e)}function im(){return 2}function am(t){t=t|0;return}function om(t){t=t|0;tm(t);return}function sm(t){t=t|0;return 20599}function lm(t){t=t|0;a[t>>2]=5916;fm(t+4|0);return}function cm(t){t=t|0;lm(t);tm(t);return}function um(t){t=t|0;return hm(t+4|0)|0}function hm(t){t=t|0;return a[t>>2]|0}function fm(t){t=t|0;var e=0,r=0;if(dm(t)|0?(e=pm(a[t>>2]|0)|0,r=e+8|0,t=a[r>>2]|0,a[r>>2]=t+-1,(t|0)<1):0)tm(e);return}function dm(t){t=t|0;return 1}function pm(t){t=t|0;return t+-12|0}function mm(t){t=t|0;a[t>>2]=5936;fm(t+4|0);return}function Am(t){t=t|0;mm(t);tm(t);return}function gm(t){t=t|0;return hm(t+4|0)|0}function vm(t){t=t|0;lm(t);tm(t);return}function ym(t){t=t|0;lm(t);tm(t);return}function bm(){var t=0;t=Y;Y=Y+16|0;Up(20848,t)}function xm(t){t=t|0;Op(t);tm(t);return}function wm(t,e,r){t=t|0;e=e|0;r=r|0;return jp(t,e,0)|0}function _m(t){t=t|0;Op(t);tm(t);return}function Em(t,e,r){t=t|0;e=e|0;r=r|0;var o=0,s=0,l=0,c=0,u=0,h=0,f=0,d=0;d=Y;Y=Y+64|0;h=d;do{if(!(jp(e,4048,0)|0)){if(Mm(t,e,0)|0){e=a[r>>2]|0;if(!e){e=1;break}a[r>>2]=a[e>>2];e=1;break}if((e|0)!=0?(o=qp(e,3840,3976,0)|0,(o|0)!=0):0){e=a[r>>2]|0;if(e|0)a[r>>2]=a[e>>2];e=a[o+8>>2]|0;l=t+8|0;s=a[l>>2]|0;if((e&7&(s^7)|0)==0?((e&96^96)&s|0)==0:0){s=t+12|0;t=a[s>>2]|0;o=o+12|0;e=a[o>>2]|0;if(!(jp(t,e,0)|0)){if(jp(t,4040,0)|0){if(!e){e=1;break}e=(qp(e,3840,3992,0)|0)==0;break}if(t){e=qp(t,3840,3976,0)|0;if(e|0){if(!(a[l>>2]&1)){e=0;break}e=Sm(e,a[o>>2]|0)|0;break}e=a[s>>2]|0;if(e){e=qp(e,3840,4008,0)|0;if(e|0){if(!(a[l>>2]&1)){e=0;break}e=Cm(e,a[o>>2]|0)|0;break}e=a[s>>2]|0;if((((e|0)!=0?(c=qp(e,3840,3824,0)|0,(c|0)!=0):0)?(u=a[o>>2]|0,(u|0)!=0):0)?(f=qp(u,3840,3824,0)|0,(f|0)!=0):0){a[h>>2]=f;a[h+4>>2]=0;a[h+8>>2]=c;a[h+12>>2]=-1;e=h+16|0;t=h+24|0;o=h+48|0;s=e;l=s+36|0;do{a[s>>2]=0;s=s+4|0}while((s|0)<(l|0));i[e+36>>1]=0;n[e+38>>0]=0;a[o>>2]=1;Hg[a[(a[f>>2]|0)+28>>2]&7](f,h,a[r>>2]|0,1);do{if((a[t>>2]|0)==1){if(!(a[r>>2]|0)){e=1;break}a[r>>2]=a[e>>2];e=1}else e=0}while(0)}else e=0}else e=0}else e=0}else e=1}else e=0}else e=0}else{a[r>>2]=0;e=1}}while(0);Y=d;return e|0}function Mm(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;if(!(a[t+8>>2]&24)){if((e|0)!=0?(n=qp(e,3840,3960,0)|0,(n|0)!=0):0){r=(a[n+8>>2]&24|0)!=0;i=5}else r=0}else{r=1;i=5}if((i|0)==5)r=jp(t,e,r)|0;return r|0}function Sm(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;while(1){if(!e){e=0;break}r=qp(e,3840,3976,0)|0;if(!r){e=0;break}i=a[t+8>>2]|0;if(a[r+8>>2]&~i|0){e=0;break}n=t+12|0;e=a[n>>2]|0;r=r+12|0;if(jp(e,a[r>>2]|0,0)|0){e=1;break}if((i&1|0)==0|(e|0)==0){e=0;break}t=qp(e,3840,3976,0)|0;if(!t){s=9;break}e=a[r>>2]|0}if((s|0)==9){e=a[n>>2]|0;if((e|0)!=0?(o=qp(e,3840,4008,0)|0,(o|0)!=0):0)e=Cm(o,a[r>>2]|0)|0;else e=0}return e|0}function Cm(t,e){t=t|0;e=e|0;var r=0;if((((e|0)!=0?(r=qp(e,3840,4008,0)|0,(r|0)!=0):0)?(a[r+8>>2]&~a[t+8>>2]|0)==0:0)?jp(a[t+12>>2]|0,a[r+12>>2]|0,0)|0:0)t=jp(a[t+16>>2]|0,a[r+16>>2]|0,0)|0;else t=0;return t|0}function Tm(t){t=t|0;Op(t);tm(t);return}function Im(t,e,r,i,o,s){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;s=s|0;var l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0,A=0,g=0;if(jp(t,a[e+8>>2]|0,s)|0)Xp(0,e,r,i,o);else{g=e+52|0;c=n[g>>0]|0;A=e+53|0;l=n[A>>0]|0;m=a[t+12>>2]|0;f=t+16+(m<<3)|0;n[g>>0]=0;n[A>>0]=0;Lm(t+16|0,e,r,i,o,s);u=n[g>>0]|0;c=u|c;h=n[A>>0]|0;l=h|l;t:do{if((m|0)>1){d=e+24|0;p=t+8|0;m=e+54|0;t=t+24|0;do{l=l&1;c=c&1;if(n[m>>0]|0)break t;if(!(u<<24>>24)){if(h<<24>>24?(a[p>>2]&1|0)==0:0)break t}else{if((a[d>>2]|0)==1)break t;if(!(a[p>>2]&2))break t}n[g>>0]=0;n[A>>0]=0;Lm(t,e,r,i,o,s);u=n[g>>0]|0;c=u|c;h=n[A>>0]|0;l=h|l;t=t+8|0}while(t>>>0>>0)}}while(0);n[g>>0]=c<<24>>24!=0&1;n[A>>0]=l<<24>>24!=0&1}return}function Rm(t,e,r,i,o){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;var s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0;t:do{if(!(jp(t,a[e+8>>2]|0,o)|0)){if(!(jp(t,a[e>>2]|0,o)|0)){m=a[t+12>>2]|0;u=t+16+(m<<3)|0;Pm(t+16|0,e,r,i,o);s=t+24|0;if((m|0)<=1)break;t=a[t+8>>2]|0;if((t&2|0)==0?(c=e+36|0,(a[c>>2]|0)!=1):0){if(!(t&1)){t=e+54|0;while(1){if(n[t>>0]|0)break t;if((a[c>>2]|0)==1)break t;Pm(s,e,r,i,o);s=s+8|0;if(s>>>0>=u>>>0)break t}}t=e+24|0;l=e+54|0;while(1){if(n[l>>0]|0)break t;if((a[c>>2]|0)==1?(a[t>>2]|0)==1:0)break t;Pm(s,e,r,i,o);s=s+8|0;if(s>>>0>=u>>>0)break t}}t=e+54|0;while(1){if(n[t>>0]|0)break t;Pm(s,e,r,i,o);s=s+8|0;if(s>>>0>=u>>>0)break t}}if((a[e+16>>2]|0)!=(r|0)?(m=e+20|0,(a[m>>2]|0)!=(r|0)):0){a[e+32>>2]=i;p=e+44|0;if((a[p>>2]|0)!=4){c=t+16+(a[t+12>>2]<<3)|0;u=e+52|0;i=e+53|0;h=e+54|0;f=t+8|0;d=e+24|0;s=0;l=t+16|0;t=0;e:while(1){if(l>>>0>=c>>>0){l=18;break}n[u>>0]=0;n[i>>0]=0;Lm(l,e,r,r,1,o);if(n[h>>0]|0){l=18;break}do{if(n[i>>0]|0){if(!(n[u>>0]|0))if(!(a[f>>2]&1)){l=19;break e}else{t=1;break}if((a[d>>2]|0)==1){s=1;l=19;break e}if(!(a[f>>2]&2)){s=1;l=19;break e}else{s=1;t=1}}}while(0);l=l+8|0}if((l|0)==18)if(t)l=19;else t=4;if((l|0)==19)t=3;a[p>>2]=t;if(s&1)break}a[m>>2]=r;r=e+40|0;a[r>>2]=(a[r>>2]|0)+1;if((a[e+36>>2]|0)!=1)break;if((a[e+24>>2]|0)!=2)break;n[e+54>>0]=1;break}if((i|0)==1)a[e+32>>2]=1}else Hp(0,e,r,i)}while(0);return}function Bm(t,e,r,i){t=t|0;e=e|0;r=r|0;i=i|0;var o=0,s=0;t:do{if(!(jp(t,a[e+8>>2]|0,0)|0)){s=a[t+12>>2]|0;o=t+16+(s<<3)|0;km(t+16|0,e,r,i);if((s|0)>1){s=e+54|0;t=t+24|0;do{km(t,e,r,i);if(n[s>>0]|0)break t;t=t+8|0}while(t>>>0>>0)}}else Wp(0,e,r,i)}while(0);return}function km(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,o=0;o=a[t+4>>2]|0;if(r){i=o>>8;if(o&1)i=a[(a[r>>2]|0)+i>>2]|0}else i=0;t=a[t>>2]|0;Hg[a[(a[t>>2]|0)+28>>2]&7](t,e,r+i|0,(o&2|0)==0?2:n);return}function Lm(t,e,r,n,i,o){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;o=o|0;var s=0,l=0;l=a[t+4>>2]|0;s=l>>8;if(l&1)s=a[(a[n>>2]|0)+s>>2]|0;t=a[t>>2]|0;qg[a[(a[t>>2]|0)+20>>2]&3](t,e,r,n+s|0,(l&2|0)==0?2:i,o);return}function Pm(t,e,r,n,i){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;var o=0,s=0;s=a[t+4>>2]|0;o=s>>8;if(s&1)o=a[(a[r>>2]|0)+o>>2]|0;t=a[t>>2]|0;Xg[a[(a[t>>2]|0)+24>>2]&3](t,e,r+o|0,(s&2|0)==0?2:n,i);return}function Dm(t){t=t|0;a[t>>2]=5896;return}function Um(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;Om(r,t);t=Fm(r)|0;Y=e;return t|0}function Om(t,e){t=t|0;e=e|0;Vm(t,e);return}function Fm(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;Nm(r,a[t+4>>2]|0);if(!((zm(r)|0)<<24>>24))t=Zm(Gm(t)|0)|0;else t=0;Y=e;return t|0}function Nm(t,e){t=t|0;e=e|0;a[t>>2]=e;return}function zm(t){t=t|0;return n[a[t>>2]>>0]|0}function Gm(t){t=t|0;return t|0}function Zm(t){t=t|0;var e=0,r=0,i=0,o=0;o=Y;Y=Y+16|0;i=o;t=a[t+8>>2]|0;e=n[t>>0]|0;do{if(e<<24>>24!=1){if(!(e&2)){n[t>>0]=2;r=1;break}else Up(20985,i)}else r=0}while(0);Y=o;return r|0}function Vm(t,e){t=t|0;e=e|0;a[t>>2]=e;a[t+4>>2]=e;a[t+8>>2]=e+1;a[t+12>>2]=0;return}function Qm(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;Om(r,t);jm(r);Y=e;return}function jm(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;Nm(r,a[t+4>>2]|0);Wm(r);Hm(Gm(t)|0);Y=e;return}function Wm(t){t=t|0;n[a[t>>2]>>0]=1;return}function Hm(t){t=t|0;n[a[t+8>>2]>>0]=1;return}function Xm(){return 0}function qm(t){t=t|0;var e=0,r=0;r=(t|0)==0?1:t;while(1){e=XA(r)|0;if(e|0){t=6;break}t=Xm()|0;if(!t){t=5;break}Vg[t&3]()}if((t|0)==5){r=E(4)|0;Dm(r);S(r|0,3880,121)}else if((t|0)==6)return e|0;return 0}function Ym(t){t=t|0;return qm(t)|0}function Jm(t){t=t|0;tm(t);return}function Km(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;i=Y;Y=Y+16|0;n=i;a[n>>2]=a[r>>2];t=Zg[a[(a[t>>2]|0)+16>>2]&7](t,e,n)|0;if(t)a[r>>2]=a[n>>2];Y=i;return t&1|0}function $m(t){t=t|0;if(!t)t=0;else t=(qp(t,3840,3976,0)|0)!=0&1;return t|0}function tA(t){t=t|0;return 0}function eA(){return(rA()|0)>0|0}function rA(){return C()|0}function nA(t){t=t|0;return}function iA(t){t=t|0;nA(t);tm(t);return}function aA(t){t=t|0;return 21039}function oA(t){t=t|0;return}function sA(t){t=t|0;var e=0,r=0;e=t+8|0;if(!((a[e>>2]|0)!=0?(r=a[e>>2]|0,a[e>>2]=r+-1,(r|0)!=0):0))Qg[a[(a[t>>2]|0)+16>>2]&255](t);return}function lA(t){t=t|0;t=tA(t)|0;if(!t)return;else WA(t,21145)}function cA(t){t=t|0;return}function uA(t,e){t=t|0;e=e|0;var r=0,n=0;n=Yd(e)|0;r=qm(n+13|0)|0;a[r>>2]=n;a[r+4>>2]=n;a[r+8>>2]=0;r=hA(r)|0;hg(r|0,e|0,n+1|0)|0;a[t>>2]=r;return}function hA(t){t=t|0;return t+12|0}function fA(t,e){t=t|0;e=e|0;a[t>>2]=5916;uA(t+4|0,e);return}function dA(t,e){t=t|0;e=e|0;a[t>>2]=5936;uA(t+4|0,(n[e+11>>0]|0)<0?a[e>>2]|0:e);return}function pA(t,e){t=t|0;e=e|0;a[t>>2]=5936;uA(t+4|0,e);return}function mA(t){t=t|0;t=E(8)|0;fA(t,21163);a[t>>2]=5956;S(t|0,3928,123)}function AA(t){t=t|0;t=E(8)|0;fA(t,21163);a[t>>2]=5976;S(t|0,3944,123)}function gA(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,l=0;o=Y;Y=Y+16|0;i=o;if(r>>>0>4294967279)mA(t);if(r>>>0<11)n[t+11>>0]=r;else{l=r+16&-16;s=qm(l)|0;a[t>>2]=s;a[t+8>>2]=l|-2147483648;a[t+4>>2]=r;t=s}vA(t,e,r)|0;n[i>>0]=0;ie(t+r|0,i);Y=o;return}function vA(t,e,r){t=t|0;e=e|0;r=r|0;if(r|0)hg(t|0,e|0,r|0)|0;return t|0}function yA(t){t=t|0;if((n[t+11>>0]|0)<0)bt(a[t>>2]|0,a[t+8>>2]&2147483647);return}function bA(t,e,r,i,o,s,l,c){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;s=s|0;l=l|0;c=c|0;var u=0,h=0,f=0,d=0,p=0;p=Y;Y=Y+16|0;d=p;if((-18-e|0)>>>0>>0)mA(t);if((n[t+11>>0]|0)<0)f=a[t>>2]|0;else f=t;if(e>>>0<2147483623){u=r+e|0;h=e<<1;u=u>>>0>>0?h:u;u=u>>>0<11?11:u+16&-16}else u=-17;h=qm(u)|0;if(o|0)vA(h,f,o)|0;if(l|0)vA(h+o|0,c,l)|0;i=i-s|0;r=i-o|0;if(r|0)vA(h+o+l|0,f+o+s|0,r)|0;r=e+1|0;if((r|0)!=11)bt(f,r);a[t>>2]=h;a[t+8>>2]=u|-2147483648;l=i+l|0;a[t+4>>2]=l;n[d>>0]=0;ie(h+l|0,d);Y=p;return}function xA(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,l=0,c=0,u=0;u=Y;Y=Y+16|0;l=u;c=t+11|0;i=n[c>>0]|0;s=i<<24>>24<0;if(s){o=(a[t+8>>2]&2147483647)+-1|0;i=a[t+4>>2]|0}else{o=10;i=i&255}if((o-i|0)>>>0>=r>>>0){if(r|0){if(s)o=a[t>>2]|0;else o=t;vA(o+i|0,e,r)|0;i=i+r|0;if((n[c>>0]|0)<0)a[t+4>>2]=i;else n[c>>0]=i;n[l>>0]=0;ie(o+i|0,l)}}else bA(t,o,i+r-o|0,i,i,0,r,e);Y=u;return t|0}function wA(t,e){t=t|0;e=e|0;return xA(t,e,re(e)|0)|0}function _A(t,e,r){t=t|0;e=e|0;r=r|0;if(!r)t=0;else t=wp(t,e,r)|0;return t|0}function EA(t,e,r,i,o){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;var s=0,l=0;s=n[t+11>>0]|0;l=s<<24>>24<0;if(l)s=a[t+4>>2]|0;else s=s&255;if((o|0)==-1|s>>>0>>0)AA(t);s=s-e|0;r=s>>>0>>0?s:r;if(l)t=a[t>>2]|0;s=r>>>0>o>>>0;t=_A(t+e|0,i,s?o:r)|0;if(!t)return(r>>>0>>0?-1:s&1)|0;else return t|0;return 0}function MA(t){t=t|0;return}function SA(t){t=t|0;tm(t);return}function CA(t){t=t|0;return 21228}function TA(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=r;a[t+4>>2]=e;return}function IA(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;i=Y;Y=Y+16|0;n=i;Wg[a[(a[t>>2]|0)+12>>2]&15](n,t,e);if((a[n+4>>2]|0)==(a[r+4>>2]|0))t=(a[n>>2]|0)==(a[r>>2]|0);else t=0;Y=i;return t|0}function RA(t,e,r){t=t|0;e=e|0;r=r|0;return((a[e>>2]|0)==(r|0)?(a[e+4>>2]|0)==(t|0):0)|0}function BA(t,e,r){t=t|0;e=e|0;r=r|0;if((r|0)>256)gA(t,21176,re(21176)|0);else kA(t,0,r);return}function kA(t,e,r){t=t|0;e=e|0;r=r|0;LA(t,r);return}function LA(t,e){t=t|0;e=e|0;var r=0,i=0,o=0,s=0,l=0;l=Y;Y=Y+1040|0;o=l+1024|0;r=l;s=a[(Wd()|0)>>2]|0;i=PA(Bp(e,r,1024)|0,r)|0;if(!(n[i>>0]|0)){a[o>>2]=e;_p(r,1024,21211,o)|0}else r=i;a[(Wd()|0)>>2]=s;gA(t,r,re(r)|0);Y=l;return}function PA(t,e){t=t|0;e=e|0;var r=0,n=0;switch(t|0){case 0:{r=e;break}case-1:{t=a[(Wd()|0)>>2]|0;n=3;break}default:n=3}if((n|0)==3)if((t|0)==28)r=22145;else Q();return r|0}function DA(t){t=t|0;tm(t);return}function UA(t){t=t|0;return 21353}function OA(t,e,r){t=t|0;e=e|0;r=r|0;if((r|0)>256){NA()|0;e=6180}else{zA()|0;e=6176}a[t>>2]=r;a[t+4>>2]=e;return}function FA(t,e,r){t=t|0;e=e|0;r=r|0;if((r|0)>256)gA(t,21319,re(21319)|0);else kA(t,0,r);return}function NA(){if((n[21488]|0)==0?Um(21488)|0:0)Qm(21488);return 6180}function zA(){if((n[21480]|0)==0?Um(21480)|0:0)Qm(21480);return 6176}function GA(t){t=t|0;mm(t);return}function ZA(t){t=t|0;GA(t);tm(t);return}function VA(t,e){t=t|0;e=e|0;var r=0;r=a[e+4>>2]|0;Wg[a[(a[r>>2]|0)+24>>2]&15](t,r,a[e>>2]|0);return}function QA(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0;s=Y;Y=Y+16|0;o=s;if(a[e>>2]|0){i=n[r+11>>0]|0;if(i<<24>>24<0)i=a[r+4>>2]|0;else i=i&255;if(i|0)wA(r,21417)|0;VA(o,e);e=n[o+11>>0]|0;i=e<<24>>24<0;xA(r,i?a[o>>2]|0:o,i?a[o+4>>2]|0:e&255)|0;yA(o)}a[t>>2]=a[r>>2];a[t+4>>2]=a[r+4>>2];a[t+8>>2]=a[r+8>>2];i=0;while(1){if((i|0)==3)break;a[r+(i<<2)>>2]=0;i=i+1|0}Y=s;return}function jA(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0;n=Y;Y=Y+32|0;o=n+12|0;i=n;gA(i,r,re(r)|0);QA(o,e,i);dA(t,o);yA(o);yA(i);a[t>>2]=6192;i=e;e=a[i+4>>2]|0;r=t+8|0;a[r>>2]=a[i>>2];a[r+4>>2]=e;Y=n;return}function WA(t,e){t=t|0;e=e|0;var r=0,n=0,i=0;i=Y;Y=Y+16|0;n=i+8|0;r=E(16)|0;NA()|0;a[i>>2]=t;a[i+4>>2]=6180;a[n>>2]=a[i>>2];a[n+4>>2]=a[i+4>>2];jA(r,n,e);S(r|0,4272,136)}function HA(t){t=t|0;t=E(8)|0;fA(t,21420);a[t>>2]=5956;S(t|0,3928,123)}function XA(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0,A=0,g=0,v=0,y=0,b=0,x=0,w=0;w=Y;Y=Y+16|0;d=w;do{if(t>>>0<245){u=t>>>0<11?16:t+11&-8;t=u>>>3;f=a[5412]|0;r=f>>>t;if(r&3|0){e=(r&1^1)+t|0;t=21688+(e<<1<<2)|0;r=t+8|0;n=a[r>>2]|0;i=n+8|0;o=a[i>>2]|0;if((o|0)==(t|0))a[5412]=f&~(1<>2]=t;a[r>>2]=o}x=e<<3;a[n+4>>2]=x|3;x=n+x+4|0;a[x>>2]=a[x>>2]|1;x=i;Y=w;return x|0}h=a[5414]|0;if(u>>>0>h>>>0){if(r|0){e=2<>>12&16;e=e>>>l;r=e>>>5&8;e=e>>>r;o=e>>>2&4;e=e>>>o;t=e>>>1&2;e=e>>>t;n=e>>>1&1;n=(r|l|o|t|n)+(e>>>n)|0;e=21688+(n<<1<<2)|0;t=e+8|0;o=a[t>>2]|0;l=o+8|0;r=a[l>>2]|0;if((r|0)==(e|0)){t=f&~(1<>2]=e;a[t>>2]=r;t=f}x=n<<3;s=x-u|0;a[o+4>>2]=u|3;i=o+u|0;a[i+4>>2]=s|1;a[o+x>>2]=s;if(h|0){n=a[5417]|0;e=h>>>3;r=21688+(e<<1<<2)|0;e=1<>2]|0}a[t>>2]=n;a[e+12>>2]=n;a[n+8>>2]=e;a[n+12>>2]=r}a[5414]=s;a[5417]=i;x=l;Y=w;return x|0}o=a[5413]|0;if(o){r=(o&0-o)+-1|0;i=r>>>12&16;r=r>>>i;n=r>>>5&8;r=r>>>n;s=r>>>2&4;r=r>>>s;l=r>>>1&2;r=r>>>l;c=r>>>1&1;c=a[21952+((n|i|s|l|c)+(r>>>c)<<2)>>2]|0;r=c;l=c;c=(a[c+4>>2]&-8)-u|0;while(1){t=a[r+16>>2]|0;if(!t){t=a[r+20>>2]|0;if(!t)break}s=(a[t+4>>2]&-8)-u|0;i=s>>>0>>0;r=t;l=i?t:l;c=i?s:c}s=l+u|0;if(s>>>0>l>>>0){i=a[l+24>>2]|0;e=a[l+12>>2]|0;do{if((e|0)==(l|0)){t=l+20|0;e=a[t>>2]|0;if(!e){t=l+16|0;e=a[t>>2]|0;if(!e){r=0;break}}while(1){n=e+20|0;r=a[n>>2]|0;if(!r){n=e+16|0;r=a[n>>2]|0;if(!r)break;else{e=r;t=n}}else{e=r;t=n}}a[t>>2]=0;r=e}else{r=a[l+8>>2]|0;a[r+12>>2]=e;a[e+8>>2]=r;r=e}}while(0);do{if(i|0){e=a[l+28>>2]|0;t=21952+(e<<2)|0;if((l|0)==(a[t>>2]|0)){a[t>>2]=r;if(!r){a[5413]=o&~(1<>2]|0)==(l|0)?x:i+20|0)>>2]=r;if(!r)break}a[r+24>>2]=i;e=a[l+16>>2]|0;if(e|0){a[r+16>>2]=e;a[e+24>>2]=r}e=a[l+20>>2]|0;if(e|0){a[r+20>>2]=e;a[e+24>>2]=r}}}while(0);if(c>>>0<16){x=c+u|0;a[l+4>>2]=x|3;x=l+x+4|0;a[x>>2]=a[x>>2]|1}else{a[l+4>>2]=u|3;a[s+4>>2]=c|1;a[s+c>>2]=c;if(h|0){n=a[5417]|0;e=h>>>3;r=21688+(e<<1<<2)|0;e=1<>2]|0}a[t>>2]=n;a[e+12>>2]=n;a[n+8>>2]=e;a[n+12>>2]=r}a[5414]=c;a[5417]=s}x=l+8|0;Y=w;return x|0}else f=u}else f=u}else f=u}else if(t>>>0<=4294967231){t=t+11|0;u=t&-8;n=a[5413]|0;if(n){i=0-u|0;t=t>>>8;if(t){if(u>>>0>16777215)c=31;else{f=(t+1048320|0)>>>16&8;A=t<>>16&4;A=A<>>16&2;c=14-(l|f|c)+(A<>>15)|0;c=u>>>(c+7|0)&1|c<<1}}else c=0;r=a[21952+(c<<2)>>2]|0;t:do{if(!r){r=0;t=0;A=61}else{t=0;l=u<<((c|0)==31?0:25-(c>>>1)|0);o=0;while(1){s=(a[r+4>>2]&-8)-u|0;if(s>>>0>>0)if(!s){t=r;i=0;A=65;break t}else{t=r;i=s}A=a[r+20>>2]|0;r=a[r+16+(l>>>31<<2)>>2]|0;o=(A|0)==0|(A|0)==(r|0)?o:A;if(!r){r=o;A=61;break}else l=l<<1}}}while(0);if((A|0)==61){if((r|0)==0&(t|0)==0){t=2<>>12&16;f=f>>>s;o=f>>>5&8;f=f>>>o;l=f>>>2&4;f=f>>>l;c=f>>>1&2;f=f>>>c;r=f>>>1&1;t=0;r=a[21952+((o|s|l|c|r)+(f>>>r)<<2)>>2]|0}if(!r){l=t;s=i}else A=65}if((A|0)==65){o=r;while(1){f=(a[o+4>>2]&-8)-u|0;r=f>>>0>>0;i=r?f:i;t=r?o:t;r=a[o+16>>2]|0;if(!r)r=a[o+20>>2]|0;if(!r){l=t;s=i;break}else o=r}}if(((l|0)!=0?s>>>0<((a[5414]|0)-u|0)>>>0:0)?(h=l+u|0,h>>>0>l>>>0):0){o=a[l+24>>2]|0;e=a[l+12>>2]|0;do{if((e|0)==(l|0)){t=l+20|0;e=a[t>>2]|0;if(!e){t=l+16|0;e=a[t>>2]|0;if(!e){e=0;break}}while(1){i=e+20|0;r=a[i>>2]|0;if(!r){i=e+16|0;r=a[i>>2]|0;if(!r)break;else{e=r;t=i}}else{e=r;t=i}}a[t>>2]=0}else{x=a[l+8>>2]|0;a[x+12>>2]=e;a[e+8>>2]=x}}while(0);do{if(o){t=a[l+28>>2]|0;r=21952+(t<<2)|0;if((l|0)==(a[r>>2]|0)){a[r>>2]=e;if(!e){n=n&~(1<>2]|0)==(l|0)?x:o+20|0)>>2]=e;if(!e)break}a[e+24>>2]=o;t=a[l+16>>2]|0;if(t|0){a[e+16>>2]=t;a[t+24>>2]=e}t=a[l+20>>2]|0;if(t){a[e+20>>2]=t;a[t+24>>2]=e}}}while(0);t:do{if(s>>>0<16){x=s+u|0;a[l+4>>2]=x|3;x=l+x+4|0;a[x>>2]=a[x>>2]|1}else{a[l+4>>2]=u|3;a[h+4>>2]=s|1;a[h+s>>2]=s;e=s>>>3;if(s>>>0<256){r=21688+(e<<1<<2)|0;t=a[5412]|0;e=1<>2]|0}a[t>>2]=h;a[e+12>>2]=h;a[h+8>>2]=e;a[h+12>>2]=r;break}e=s>>>8;if(e){if(s>>>0>16777215)r=31;else{b=(e+1048320|0)>>>16&8;x=e<>>16&4;x=x<>>16&2;r=14-(y|b|r)+(x<>>15)|0;r=s>>>(r+7|0)&1|r<<1}}else r=0;e=21952+(r<<2)|0;a[h+28>>2]=r;t=h+16|0;a[t+4>>2]=0;a[t>>2]=0;t=1<>2]=h;a[h+24>>2]=e;a[h+12>>2]=h;a[h+8>>2]=h;break}e=a[e>>2]|0;e:do{if((a[e+4>>2]&-8|0)!=(s|0)){n=s<<((r|0)==31?0:25-(r>>>1)|0);while(1){r=e+16+(n>>>31<<2)|0;t=a[r>>2]|0;if(!t)break;if((a[t+4>>2]&-8|0)==(s|0)){e=t;break e}else{n=n<<1;e=t}}a[r>>2]=h;a[h+24>>2]=e;a[h+12>>2]=h;a[h+8>>2]=h;break t}}while(0);b=e+8|0;x=a[b>>2]|0;a[x+12>>2]=h;a[b>>2]=h;a[h+8>>2]=x;a[h+12>>2]=e;a[h+24>>2]=0}}while(0);x=l+8|0;Y=w;return x|0}else f=u}else f=u}else f=-1}while(0);r=a[5414]|0;if(r>>>0>=f>>>0){e=r-f|0;t=a[5417]|0;if(e>>>0>15){x=t+f|0;a[5417]=x;a[5414]=e;a[x+4>>2]=e|1;a[t+r>>2]=e;a[t+4>>2]=f|3}else{a[5414]=0;a[5417]=0;a[t+4>>2]=r|3;x=t+r+4|0;a[x>>2]=a[x>>2]|1}x=t+8|0;Y=w;return x|0}s=a[5415]|0;if(s>>>0>f>>>0){y=s-f|0;a[5415]=y;x=a[5418]|0;b=x+f|0;a[5418]=b;a[b+4>>2]=y|1;a[x+4>>2]=f|3;x=x+8|0;Y=w;return x|0}if(!(a[5530]|0)){a[5532]=4096;a[5531]=4096;a[5533]=-1;a[5534]=-1;a[5535]=0;a[5523]=0;a[5530]=d&-16^1431655768;t=4096}else t=a[5532]|0;l=f+48|0;c=f+47|0;o=t+c|0;i=0-t|0;u=o&i;if(u>>>0<=f>>>0){x=0;Y=w;return x|0}t=a[5522]|0;if(t|0?(h=a[5520]|0,d=h+u|0,d>>>0<=h>>>0|d>>>0>t>>>0):0){x=0;Y=w;return x|0}t:do{if(!(a[5523]&4)){r=a[5418]|0;e:do{if(r){n=22096;while(1){d=a[n>>2]|0;if(d>>>0<=r>>>0?(d+(a[n+4>>2]|0)|0)>>>0>r>>>0:0)break;t=a[n+8>>2]|0;if(!t){A=128;break e}else n=t}e=o-s&i;if(e>>>0<2147483647){t=YA(e)|0;if((t|0)==((a[n>>2]|0)+(a[n+4>>2]|0)|0)){if((t|0)!=(-1|0)){s=e;o=t;A=145;break t}}else{n=t;A=136}}else e=0}else A=128}while(0);do{if((A|0)==128){r=YA(0)|0;if((r|0)!=(-1|0)?(e=r,p=a[5531]|0,m=p+-1|0,e=((m&e|0)==0?0:(m+e&0-p)-e|0)+u|0,p=a[5520]|0,m=e+p|0,e>>>0>f>>>0&e>>>0<2147483647):0){d=a[5522]|0;if(d|0?m>>>0<=p>>>0|m>>>0>d>>>0:0){e=0;break}t=YA(e)|0;if((t|0)==(r|0)){s=e;o=r;A=145;break t}else{n=t;A=136}}else e=0}}while(0);do{if((A|0)==136){r=0-e|0;if(!(l>>>0>e>>>0&(e>>>0<2147483647&(n|0)!=(-1|0))))if((n|0)==(-1|0)){e=0;break}else{s=e;o=n;A=145;break t}t=a[5532]|0;t=c-e+t&0-t;if(t>>>0>=2147483647){s=e;o=n;A=145;break t}if((YA(t)|0)==(-1|0)){YA(r)|0;e=0;break}else{s=t+e|0;o=n;A=145;break t}}}while(0);a[5523]=a[5523]|4;A=143}else{e=0;A=143}}while(0);if(((A|0)==143?u>>>0<2147483647:0)?(y=YA(u)|0,m=YA(0)|0,g=m-y|0,v=g>>>0>(f+40|0)>>>0,!((y|0)==(-1|0)|v^1|y>>>0>>0&((y|0)!=(-1|0)&(m|0)!=(-1|0))^1)):0){s=v?g:e;o=y;A=145}if((A|0)==145){e=(a[5520]|0)+s|0;a[5520]=e;if(e>>>0>(a[5521]|0)>>>0)a[5521]=e;c=a[5418]|0;t:do{if(c){e=22096;while(1){t=a[e>>2]|0;r=a[e+4>>2]|0;if((o|0)==(t+r|0)){A=154;break}n=a[e+8>>2]|0;if(!n)break;else e=n}if(((A|0)==154?(b=e+4|0,(a[e+12>>2]&8|0)==0):0)?o>>>0>c>>>0&t>>>0<=c>>>0:0){a[b>>2]=r+s;x=(a[5415]|0)+s|0;y=c+8|0;y=(y&7|0)==0?0:0-y&7;b=c+y|0;y=x-y|0;a[5418]=b;a[5415]=y;a[b+4>>2]=y|1;a[c+x+4>>2]=40;a[5419]=a[5534];break}if(o>>>0<(a[5416]|0)>>>0)a[5416]=o;r=o+s|0;e=22096;while(1){if((a[e>>2]|0)==(r|0)){A=162;break}t=a[e+8>>2]|0;if(!t)break;else e=t}if((A|0)==162?(a[e+12>>2]&8|0)==0:0){a[e>>2]=o;h=e+4|0;a[h>>2]=(a[h>>2]|0)+s;h=o+8|0;h=o+((h&7|0)==0?0:0-h&7)|0;e=r+8|0;e=r+((e&7|0)==0?0:0-e&7)|0;u=h+f|0;l=e-h-f|0;a[h+4>>2]=f|3;e:do{if((c|0)==(e|0)){x=(a[5415]|0)+l|0;a[5415]=x;a[5418]=u;a[u+4>>2]=x|1}else{if((a[5417]|0)==(e|0)){x=(a[5414]|0)+l|0;a[5414]=x;a[5417]=u;a[u+4>>2]=x|1;a[u+x>>2]=x;break}t=a[e+4>>2]|0;if((t&3|0)==1){s=t&-8;n=t>>>3;r:do{if(t>>>0<256){t=a[e+8>>2]|0;r=a[e+12>>2]|0;if((r|0)==(t|0)){a[5412]=a[5412]&~(1<>2]=r;a[r+8>>2]=t;break}}else{o=a[e+24>>2]|0;t=a[e+12>>2]|0;do{if((t|0)==(e|0)){r=e+16|0;n=r+4|0;t=a[n>>2]|0;if(!t){t=a[r>>2]|0;if(!t){t=0;break}}else r=n;while(1){i=t+20|0;n=a[i>>2]|0;if(!n){i=t+16|0;n=a[i>>2]|0;if(!n)break;else{t=n;r=i}}else{t=n;r=i}}a[r>>2]=0}else{x=a[e+8>>2]|0;a[x+12>>2]=t;a[t+8>>2]=x}}while(0);if(!o)break;r=a[e+28>>2]|0;n=21952+(r<<2)|0;do{if((a[n>>2]|0)!=(e|0)){x=o+16|0;a[((a[x>>2]|0)==(e|0)?x:o+20|0)>>2]=t;if(!t)break r}else{a[n>>2]=t;if(t|0)break;a[5413]=a[5413]&~(1<>2]=o;r=e+16|0;n=a[r>>2]|0;if(n|0){a[t+16>>2]=n;a[n+24>>2]=t}r=a[r+4>>2]|0;if(!r)break;a[t+20>>2]=r;a[r+24>>2]=t}}while(0);e=e+s|0;i=s+l|0}else i=l;e=e+4|0;a[e>>2]=a[e>>2]&-2;a[u+4>>2]=i|1;a[u+i>>2]=i;e=i>>>3;if(i>>>0<256){r=21688+(e<<1<<2)|0;t=a[5412]|0;e=1<>2]|0}a[t>>2]=u;a[e+12>>2]=u;a[u+8>>2]=e;a[u+12>>2]=r;break}e=i>>>8;do{if(!e)n=0;else{if(i>>>0>16777215){n=31;break}b=(e+1048320|0)>>>16&8;x=e<>>16&4;x=x<>>16&2;n=14-(y|b|n)+(x<>>15)|0;n=i>>>(n+7|0)&1|n<<1}}while(0);e=21952+(n<<2)|0;a[u+28>>2]=n;t=u+16|0;a[t+4>>2]=0;a[t>>2]=0;t=a[5413]|0;r=1<>2]=u;a[u+24>>2]=e;a[u+12>>2]=u;a[u+8>>2]=u;break}e=a[e>>2]|0;r:do{if((a[e+4>>2]&-8|0)!=(i|0)){n=i<<((n|0)==31?0:25-(n>>>1)|0);while(1){r=e+16+(n>>>31<<2)|0;t=a[r>>2]|0;if(!t)break;if((a[t+4>>2]&-8|0)==(i|0)){e=t;break r}else{n=n<<1;e=t}}a[r>>2]=u;a[u+24>>2]=e;a[u+12>>2]=u;a[u+8>>2]=u;break e}}while(0);b=e+8|0;x=a[b>>2]|0;a[x+12>>2]=u;a[b>>2]=u;a[u+8>>2]=x;a[u+12>>2]=e;a[u+24>>2]=0}}while(0);x=h+8|0;Y=w;return x|0}e=22096;while(1){t=a[e>>2]|0;if(t>>>0<=c>>>0?(x=t+(a[e+4>>2]|0)|0,x>>>0>c>>>0):0)break;e=a[e+8>>2]|0}i=x+-47|0;t=i+8|0;t=i+((t&7|0)==0?0:0-t&7)|0;i=c+16|0;t=t>>>0>>0?c:t;e=t+8|0;r=s+-40|0;y=o+8|0;y=(y&7|0)==0?0:0-y&7;b=o+y|0;y=r-y|0;a[5418]=b;a[5415]=y;a[b+4>>2]=y|1;a[o+r+4>>2]=40;a[5419]=a[5534];r=t+4|0;a[r>>2]=27;a[e>>2]=a[5524];a[e+4>>2]=a[5525];a[e+8>>2]=a[5526];a[e+12>>2]=a[5527];a[5524]=o;a[5525]=s;a[5527]=0;a[5526]=e;e=t+24|0;do{b=e;e=e+4|0;a[e>>2]=7}while((b+8|0)>>>0>>0);if((t|0)!=(c|0)){o=t-c|0;a[r>>2]=a[r>>2]&-2;a[c+4>>2]=o|1;a[t>>2]=o;e=o>>>3;if(o>>>0<256){r=21688+(e<<1<<2)|0;t=a[5412]|0;e=1<>2]|0}a[t>>2]=c;a[e+12>>2]=c;a[c+8>>2]=e;a[c+12>>2]=r;break}e=o>>>8;if(e){if(o>>>0>16777215)n=31;else{b=(e+1048320|0)>>>16&8;x=e<>>16&4;x=x<>>16&2;n=14-(y|b|n)+(x<>>15)|0;n=o>>>(n+7|0)&1|n<<1}}else n=0;r=21952+(n<<2)|0;a[c+28>>2]=n;a[c+20>>2]=0;a[i>>2]=0;e=a[5413]|0;t=1<>2]=c;a[c+24>>2]=r;a[c+12>>2]=c;a[c+8>>2]=c;break}e=a[r>>2]|0;e:do{if((a[e+4>>2]&-8|0)!=(o|0)){n=o<<((n|0)==31?0:25-(n>>>1)|0);while(1){r=e+16+(n>>>31<<2)|0;t=a[r>>2]|0;if(!t)break;if((a[t+4>>2]&-8|0)==(o|0)){e=t;break e}else{n=n<<1;e=t}}a[r>>2]=c;a[c+24>>2]=e;a[c+12>>2]=c;a[c+8>>2]=c;break t}}while(0);b=e+8|0;x=a[b>>2]|0;a[x+12>>2]=c;a[b>>2]=c;a[c+8>>2]=x;a[c+12>>2]=e;a[c+24>>2]=0}}else{x=a[5416]|0;if((x|0)==0|o>>>0>>0)a[5416]=o;a[5524]=o;a[5525]=s;a[5527]=0;a[5421]=a[5530];a[5420]=-1;a[5425]=21688;a[5424]=21688;a[5427]=21696;a[5426]=21696;a[5429]=21704;a[5428]=21704;a[5431]=21712;a[5430]=21712;a[5433]=21720;a[5432]=21720;a[5435]=21728;a[5434]=21728;a[5437]=21736;a[5436]=21736;a[5439]=21744;a[5438]=21744;a[5441]=21752;a[5440]=21752;a[5443]=21760;a[5442]=21760;a[5445]=21768;a[5444]=21768;a[5447]=21776;a[5446]=21776;a[5449]=21784;a[5448]=21784;a[5451]=21792;a[5450]=21792;a[5453]=21800;a[5452]=21800;a[5455]=21808;a[5454]=21808;a[5457]=21816;a[5456]=21816;a[5459]=21824;a[5458]=21824;a[5461]=21832;a[5460]=21832;a[5463]=21840;a[5462]=21840;a[5465]=21848;a[5464]=21848;a[5467]=21856;a[5466]=21856;a[5469]=21864;a[5468]=21864;a[5471]=21872;a[5470]=21872;a[5473]=21880;a[5472]=21880;a[5475]=21888;a[5474]=21888;a[5477]=21896;a[5476]=21896;a[5479]=21904;a[5478]=21904;a[5481]=21912;a[5480]=21912;a[5483]=21920;a[5482]=21920;a[5485]=21928;a[5484]=21928;a[5487]=21936;a[5486]=21936;x=s+-40|0;y=o+8|0;y=(y&7|0)==0?0:0-y&7;b=o+y|0;y=x-y|0;a[5418]=b;a[5415]=y;a[b+4>>2]=y|1;a[o+x+4>>2]=40;a[5419]=a[5534]}}while(0);e=a[5415]|0;if(e>>>0>f>>>0){y=e-f|0;a[5415]=y;x=a[5418]|0;b=x+f|0;a[5418]=b;a[b+4>>2]=y|1;a[x+4>>2]=f|3;x=x+8|0;Y=w;return x|0}}a[(Wd()|0)>>2]=48;x=0;Y=w;return x|0}function qA(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,l=0,c=0;if(!t)return;r=t+-8|0;i=a[5416]|0;t=a[t+-4>>2]|0;e=t&-8;c=r+e|0;do{if(!(t&1)){n=a[r>>2]|0;if(!(t&3))return;s=r+(0-n)|0;o=n+e|0;if(s>>>0>>0)return;if((a[5417]|0)==(s|0)){t=c+4|0;e=a[t>>2]|0;if((e&3|0)!=3){l=s;e=o;break}a[5414]=o;a[t>>2]=e&-2;a[s+4>>2]=o|1;a[s+o>>2]=o;return}r=n>>>3;if(n>>>0<256){t=a[s+8>>2]|0;e=a[s+12>>2]|0;if((e|0)==(t|0)){a[5412]=a[5412]&~(1<>2]=e;a[e+8>>2]=t;l=s;e=o;break}}i=a[s+24>>2]|0;t=a[s+12>>2]|0;do{if((t|0)==(s|0)){e=s+16|0;r=e+4|0;t=a[r>>2]|0;if(!t){t=a[e>>2]|0;if(!t){t=0;break}}else e=r;while(1){n=t+20|0;r=a[n>>2]|0;if(!r){n=t+16|0;r=a[n>>2]|0;if(!r)break;else{t=r;e=n}}else{t=r;e=n}}a[e>>2]=0}else{l=a[s+8>>2]|0;a[l+12>>2]=t;a[t+8>>2]=l}}while(0);if(i){e=a[s+28>>2]|0;r=21952+(e<<2)|0;if((a[r>>2]|0)==(s|0)){a[r>>2]=t;if(!t){a[5413]=a[5413]&~(1<>2]|0)==(s|0)?l:i+20|0)>>2]=t;if(!t){l=s;e=o;break}}a[t+24>>2]=i;e=s+16|0;r=a[e>>2]|0;if(r|0){a[t+16>>2]=r;a[r+24>>2]=t}e=a[e+4>>2]|0;if(e){a[t+20>>2]=e;a[e+24>>2]=t;l=s;e=o}else{l=s;e=o}}else{l=s;e=o}}else{l=r;s=r}}while(0);if(s>>>0>=c>>>0)return;t=c+4|0;n=a[t>>2]|0;if(!(n&1))return;if(!(n&2)){if((a[5418]|0)==(c|0)){c=(a[5415]|0)+e|0;a[5415]=c;a[5418]=l;a[l+4>>2]=c|1;if((l|0)!=(a[5417]|0))return;a[5417]=0;a[5414]=0;return}if((a[5417]|0)==(c|0)){c=(a[5414]|0)+e|0;a[5414]=c;a[5417]=s;a[l+4>>2]=c|1;a[s+c>>2]=c;return}i=(n&-8)+e|0;r=n>>>3;do{if(n>>>0<256){e=a[c+8>>2]|0;t=a[c+12>>2]|0;if((t|0)==(e|0)){a[5412]=a[5412]&~(1<>2]=t;a[t+8>>2]=e;break}}else{o=a[c+24>>2]|0;t=a[c+12>>2]|0;do{if((t|0)==(c|0)){e=c+16|0;r=e+4|0;t=a[r>>2]|0;if(!t){t=a[e>>2]|0;if(!t){r=0;break}}else e=r;while(1){n=t+20|0;r=a[n>>2]|0;if(!r){n=t+16|0;r=a[n>>2]|0;if(!r)break;else{t=r;e=n}}else{t=r;e=n}}a[e>>2]=0;r=t}else{r=a[c+8>>2]|0;a[r+12>>2]=t;a[t+8>>2]=r;r=t}}while(0);if(o|0){t=a[c+28>>2]|0;e=21952+(t<<2)|0;if((a[e>>2]|0)==(c|0)){a[e>>2]=r;if(!r){a[5413]=a[5413]&~(1<>2]|0)==(c|0)?n:o+20|0)>>2]=r;if(!r)break}a[r+24>>2]=o;t=c+16|0;e=a[t>>2]|0;if(e|0){a[r+16>>2]=e;a[e+24>>2]=r}t=a[t+4>>2]|0;if(t|0){a[r+20>>2]=t;a[t+24>>2]=r}}}}while(0);a[l+4>>2]=i|1;a[s+i>>2]=i;if((l|0)==(a[5417]|0)){a[5414]=i;return}}else{a[t>>2]=n&-2;a[l+4>>2]=e|1;a[s+e>>2]=e;i=e}t=i>>>3;if(i>>>0<256){r=21688+(t<<1<<2)|0;e=a[5412]|0;t=1<>2]|0}a[e>>2]=l;a[t+12>>2]=l;a[l+8>>2]=t;a[l+12>>2]=r;return}t=i>>>8;if(t){if(i>>>0>16777215)n=31;else{s=(t+1048320|0)>>>16&8;c=t<>>16&4;c=c<>>16&2;n=14-(o|s|n)+(c<>>15)|0;n=i>>>(n+7|0)&1|n<<1}}else n=0;t=21952+(n<<2)|0;a[l+28>>2]=n;a[l+20>>2]=0;a[l+16>>2]=0;e=a[5413]|0;r=1<>2]=l;a[l+24>>2]=t;a[l+12>>2]=l;a[l+8>>2]=l}else{t=a[t>>2]|0;e:do{if((a[t+4>>2]&-8|0)!=(i|0)){n=i<<((n|0)==31?0:25-(n>>>1)|0);while(1){r=t+16+(n>>>31<<2)|0;e=a[r>>2]|0;if(!e)break;if((a[e+4>>2]&-8|0)==(i|0)){t=e;break e}else{n=n<<1;t=e}}a[r>>2]=l;a[l+24>>2]=t;a[l+12>>2]=l;a[l+8>>2]=l;break t}}while(0);s=t+8|0;c=a[s>>2]|0;a[c+12>>2]=l;a[s>>2]=l;a[l+8>>2]=c;a[l+12>>2]=t;a[l+24>>2]=0}}while(0);c=(a[5420]|0)+-1|0;a[5420]=c;if(c|0)return;t=22104;while(1){t=a[t>>2]|0;if(!t)break;else t=t+8|0}a[5420]=-1;return}function YA(t){t=t|0;var e=0,r=0,n=0;n=t+3&-4;t=cg()|0;e=a[t>>2]|0;r=e+n|0;do{if((n|0)<1|r>>>0>e>>>0){if(r>>>0>(W()|0)>>>0?(X(r|0)|0)==0:0)break;a[t>>2]=r;n=e;return n|0}}while(0);a[(Wd()|0)>>2]=48;n=-1;return n|0}function JA(t){t=t|0;var e=0;e=Y;Y=Y+t|0;Y=Y+15&-16;return e|0}function KA(t){t=t|0;Y=t}function $A(){return Y|0}function tg(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,a=0;a=t&65535;i=e&65535;r=y(i,a)|0;n=t>>>16;t=(r>>>16)+(y(i,n)|0)|0;i=e>>>16;e=y(i,a)|0;return(w((t>>>16)+(y(i,n)|0)+(((t&65535)+e|0)>>>16)|0),t+e<<16|r&65535|0)|0}function eg(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,a=0;i=t;a=r;r=tg(i,a)|0;t=_()|0;return(w((y(e,a)|0)+(y(n,i)|0)+t|t&0|0),r|0|0)|0}function rg(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;r=t+r>>>0;return(w(e+n+(r>>>0>>0|0)>>>0|0),r|0)|0}function ng(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;n=e-n-(r>>>0>t>>>0|0)>>>0;return(w(n|0),t-r>>>0|0)|0}function ig(t){t=t|0;return(t?31-(b(t^t-1)|0)|0:32)|0}function ag(t,e,r,n,i){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;var o=0,s=0,l=0,c=0,u=0,h=0,f=0,d=0,p=0,m=0;h=t;c=e;u=c;s=r;d=n;l=d;if(!u){o=(i|0)!=0;if(!l){if(o){a[i>>2]=(h>>>0)%(s>>>0);a[i+4>>2]=0}d=0;i=(h>>>0)/(s>>>0)>>>0;return(w(d|0),i)|0}else{if(!o){d=0;i=0;return(w(d|0),i)|0}a[i>>2]=t|0;a[i+4>>2]=e&0;d=0;i=0;return(w(d|0),i)|0}}o=(l|0)==0;do{if(s){if(!o){o=(b(l|0)|0)-(b(u|0)|0)|0;if(o>>>0<=31){f=o+1|0;l=31-o|0;e=o-31>>31;s=f;t=h>>>(f>>>0)&e|u<>>(f>>>0)&e;o=0;l=h<>2]=t|0;a[i+4>>2]=c|e&0;d=0;i=0;return(w(d|0),i)|0}o=s-1|0;if(o&s|0){l=(b(s|0)|0)+33-(b(u|0)|0)|0;m=64-l|0;f=32-l|0;c=f>>31;p=l-32|0;e=p>>31;s=l;t=f-1>>31&u>>>(p>>>0)|(u<>>(l>>>0))&e;e=e&u>>>(l>>>0);o=h<>>(p>>>0))&c|h<>31;break}if(i|0){a[i>>2]=o&h;a[i+4>>2]=0}if((s|0)==1){p=c|e&0;m=t|0|0;return(w(p|0),m)|0}else{m=ig(s|0)|0;p=u>>>(m>>>0)|0;m=u<<32-m|h>>>(m>>>0)|0;return(w(p|0),m)|0}}else{if(o){if(i|0){a[i>>2]=(u>>>0)%(s>>>0);a[i+4>>2]=0}p=0;m=(u>>>0)/(s>>>0)>>>0;return(w(p|0),m)|0}if(!h){if(i|0){a[i>>2]=0;a[i+4>>2]=(u>>>0)%(l>>>0)}p=0;m=(u>>>0)/(l>>>0)>>>0;return(w(p|0),m)|0}o=l-1|0;if(!(o&l)){if(i|0){a[i>>2]=t|0;a[i+4>>2]=o&u|e&0}p=0;m=u>>>((ig(l|0)|0)>>>0);return(w(p|0),m)|0}o=(b(l|0)|0)-(b(u|0)|0)|0;if(o>>>0<=30){e=o+1|0;l=31-o|0;s=e;t=u<>>(e>>>0);e=u>>>(e>>>0);o=0;l=h<>2]=t|0;a[i+4>>2]=c|e&0;p=0;m=0;return(w(p|0),m)|0}}while(0);if(!s){u=l;c=0;l=0}else{f=r|0|0;h=d|n&0;u=rg(f|0,h|0,-1,-1)|0;r=_()|0;c=l;l=0;do{n=c;c=o>>>31|c<<1;o=l|o<<1;n=t<<1|n>>>31|0;d=t>>>31|e<<1|0;ng(u|0,r|0,n|0,d|0)|0;m=_()|0;p=m>>31|((m|0)<0?-1:0)<<1;l=p&1;t=ng(n|0,d|0,p&f|0,(((m|0)<0?-1:0)>>31|((m|0)<0?-1:0)<<1)&h|0)|0;e=_()|0;s=s-1|0}while((s|0)!=0);u=c;c=0}s=0;if(i|0){a[i>>2]=t;a[i+4>>2]=e}p=(o|0)>>>31|(u|s)<<1|(s<<1|o>>>31)&0|c;m=(o<<1|0>>>31)&-2|l;return(w(p|0),m)|0}function og(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;return ag(t,e,r,n,0)|0}function sg(t,e,r){t=t|0;e=e|0;r=r|0;if((r|0)<32){w(e>>>r|0);return t>>>r|(e&(1<>>r-32|0}function lg(t,e,r){t=t|0;e=e|0;r=r|0;if((r|0)<32){w(e<>>32-r|0);return t<>8&255)<<16|(t>>16&255)<<8|t>>>24|0}function hg(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0;if((r|0)>=512){H(t|0,e|0,r|0)|0;return t|0}s=t|0;o=t+r|0;if((t&3)==(e&3)){while(t&3){if(!r)return s|0;n[t>>0]=n[e>>0]|0;t=t+1|0;e=e+1|0;r=r-1|0}r=o&-4|0;i=r-64|0;while((t|0)<=(i|0)){a[t>>2]=a[e>>2];a[t+4>>2]=a[e+4>>2];a[t+8>>2]=a[e+8>>2];a[t+12>>2]=a[e+12>>2];a[t+16>>2]=a[e+16>>2];a[t+20>>2]=a[e+20>>2];a[t+24>>2]=a[e+24>>2];a[t+28>>2]=a[e+28>>2];a[t+32>>2]=a[e+32>>2];a[t+36>>2]=a[e+36>>2];a[t+40>>2]=a[e+40>>2];a[t+44>>2]=a[e+44>>2];a[t+48>>2]=a[e+48>>2];a[t+52>>2]=a[e+52>>2];a[t+56>>2]=a[e+56>>2];a[t+60>>2]=a[e+60>>2];t=t+64|0;e=e+64|0}while((t|0)<(r|0)){a[t>>2]=a[e>>2];t=t+4|0;e=e+4|0}}else{r=o-4|0;while((t|0)<(r|0)){n[t>>0]=n[e>>0]|0;n[t+1>>0]=n[e+1>>0]|0;n[t+2>>0]=n[e+2>>0]|0;n[t+3>>0]=n[e+3>>0]|0;t=t+4|0;e=e+4|0}}while((t|0)<(o|0)){n[t>>0]=n[e>>0]|0;t=t+1|0;e=e+1|0}return s|0}function fg(t,e,r){t=t|0;e=e|0;r=r|0;var i=0;if((e|0)<(t|0)&(t|0)<(e+r|0)){i=t;e=e+r|0;t=t+r|0;while((r|0)>0){t=t-1|0;e=e-1|0;r=r-1|0;n[t>>0]=n[e>>0]|0}t=i}else hg(t,e,r)|0;return t|0}function dg(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,l=0;s=t+r|0;e=e&255;if((r|0)>=67){while(t&3){n[t>>0]=e;t=t+1|0}i=s&-4|0;l=e|e<<8|e<<16|e<<24;o=i-64|0;while((t|0)<=(o|0)){a[t>>2]=l;a[t+4>>2]=l;a[t+8>>2]=l;a[t+12>>2]=l;a[t+16>>2]=l;a[t+20>>2]=l;a[t+24>>2]=l;a[t+28>>2]=l;a[t+32>>2]=l;a[t+36>>2]=l;a[t+40>>2]=l;a[t+44>>2]=l;a[t+48>>2]=l;a[t+52>>2]=l;a[t+56>>2]=l;a[t+60>>2]=l;t=t+64|0}while((t|0)<(i|0)){a[t>>2]=l;t=t+4|0}}while((t|0)<(s|0)){n[t>>0]=e;t=t+1|0}return s-r|0}function pg(t){t=t|0;return Fg[t&3]()|0}function mg(t,e){t=t|0;e=e|0;return Ng[t&15](e|0)|0}function Ag(t,e,r,n,i,a,o){t=t|0;e=e|0;r=+r;n=n|0;i=i|0;a=a|0;o=o|0;return zg[t&1](e|0,+r,n|0,i|0,a|0,o|0)|0}function gg(t,e,r){t=t|0;e=e|0;r=r|0;return Gg[t&63](e|0,r|0)|0}function vg(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;return Zg[t&7](e|0,r|0,n|0)|0}function yg(t){t=t|0;Vg[t&3]()}function bg(t,e){t=t|0;e=e|0;Qg[t&255](e|0)}function xg(t,e,r){t=t|0;e=e|0;r=r|0;jg[t&15](e|0,r|0)}function wg(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;Wg[t&15](e|0,r|0,n|0)}function _g(t,e,r,n,i){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;Hg[t&7](e|0,r|0,n|0,i|0)}function Eg(t,e,r,n,i,a){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;a=a|0;Xg[t&3](e|0,r|0,n|0,i|0,a|0)}function Mg(t,e,r,n,i,a,o){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;a=a|0;o=o|0;qg[t&3](e|0,r|0,n|0,i|0,a|0,o|0)}function Sg(){x(0);return 0}function Cg(t){t=t|0;x(1);return 0}function Tg(t,e,r,n,i,a){t=t|0;e=+e;r=r|0;n=n|0;i=i|0;a=a|0;x(2);return 0}function Ig(t,e){t=t|0;e=e|0;x(3);return 0}function Rg(t,e,r){t=t|0;e=e|0;r=r|0;x(4);return 0}function Bg(){x(5)}function kg(t){t=t|0;x(6)}function Lg(t,e){t=t|0;e=e|0;x(7)}function Pg(t,e,r){t=t|0;e=e|0;r=r|0;x(8)}function Dg(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;x(9)}function Ug(t,e,r,n,i){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;x(10)}function Og(t,e,r,n,i,a){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;a=a|0;x(11)}var Fg=[Sg,Ru,_h,Sg];var Ng=[Cg,gm,Ae,we,sm,um,aA,CA,UA,pu,it,hh,ku,Mh,Cg,Cg];var zg=[Tg,op];var Gg=[Ig,vt,Ct,xe,tn,Bn,Gn,ei,ri,ai,Qi,Ji,ma,wa,Ba,Fa,Mo,Po,Vo,Xo,ns,ls,gs,ws,Bs,Qs,Js,rl,ul,yl,Ul,Vl,Jl,oc,Ac,_c,Lc,Zc,Yc,nu,hu,nh,Ig,Ig,Ig,Ig,Ig,Ig,Ig,Ig,Ig,Ig,Ig,Ig,Ig,Ig,Ig,Ig,Ig,Ig,Ig,Ig,Ig,Ig];var Zg=[Rg,Mp,Gp,wm,Em,IA,RA,Rg];var Vg=[Bg,bm,kp,Bg];var Qg=[kg,oA,At,gt,yt,Mt,St,Tt,mm,ae,_e,me,ve,ye,Te,Ie,ze,Ge,cr,ur,hr,Rr,Kr,$r,en,Cn,kn,Ln,Pn,Dn,Nn,zn,Zn,$n,ti,ni,ii,Zi,Vi,ji,qi,Yi,da,pa,Aa,ba,xa,Ia,Ra,ka,Ua,Oa,_o,Eo,So,Do,Uo,Go,Zo,Qo,qo,Yo,es,rs,is,cs,us,ms,As,vs,_s,Es,Is,Rs,ks,Zs,Vs,js,qs,Ys,Ks,nl,il,ll,cl,hl,gl,vl,Pl,Dl,Ol,Gl,Zl,ql,Yl,Kl,ic,ac,pc,mc,gc,xc,wc,Bc,kc,Pc,zc,Gc,Xc,qc,Jc,eu,ru,cu,uu,fu,Op,Fp,Np,zp,Yp,am,om,lm,cm,Am,vm,ym,xm,_m,Tm,nA,iA,MA,SA,DA,GA,ZA,gu,ph,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg,kg];var jg=[Lg,ge,be,nt,ot,st,lt,ct,sp,Lg,Lg,Lg,Lg,Lg,Lg,Lg];var Wg=[Pg,TA,BA,OA,FA,rt,at,qu,Nh,jh,Pg,Pg,Pg,Pg,Pg,Pg];var Hg=[Dg,Qp,$p,Bm,Nu,kh,Dg,Dg];var Xg=[Ug,Vp,Kp,Rm];var qg=[Og,Zp,Jp,Im];return{__ZSt18uncaught_exceptionv:eA,___cxa_can_catch:Km,___cxa_is_pointer_type:$m,___embind_register_native_and_builtin_types:tf,___errno_location:Wd,___getTypeName:jd,___muldi3:eg,___udivdi3:og,_bitshift64Lshr:sg,_bitshift64Shl:lg,_emscripten_get_sbrk_ptr:cg,_free:qA,_i64Add:rg,_i64Subtract:ng,_llvm_bswap_i32:ug,_malloc:XA,_memcpy:hg,_memmove:fg,_memset:dg,dynCall_i:pg,dynCall_ii:mg,dynCall_iidiiii:Ag,dynCall_iii:gg,dynCall_iiii:vg,dynCall_v:yg,dynCall_vi:bg,dynCall_vii:xg,dynCall_viii:wg,dynCall_viiii:_g,dynCall_viiiii:Eg,dynCall_viiiiii:Mg,globalCtors:$,stackAlloc:JA,stackRestore:KA,stackSave:$A}}({Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Float32Array,Float64Array},ae,w),se=n.__ZSt18uncaught_exceptionv=oe.__ZSt18uncaught_exceptionv,le=(n.___cxa_can_catch=oe.___cxa_can_catch,n.___cxa_is_pointer_type=oe.___cxa_is_pointer_type,n.___embind_register_native_and_builtin_types=oe.___embind_register_native_and_builtin_types,n.___errno_location=oe.___errno_location,n.___getTypeName=oe.___getTypeName),ce=(n.___muldi3=oe.___muldi3,n.___udivdi3=oe.___udivdi3,n._bitshift64Lshr=oe._bitshift64Lshr,n._bitshift64Shl=oe._bitshift64Shl,n._emscripten_get_sbrk_ptr=oe._emscripten_get_sbrk_ptr,n._free=oe._free),ue=(n._i64Add=oe._i64Add,n._i64Subtract=oe._i64Subtract,n._llvm_bswap_i32=oe._llvm_bswap_i32,n._malloc=oe._malloc),he=(n._memcpy=oe._memcpy,n._memmove=oe._memmove,n._memset=oe._memset,n.globalCtors=oe.globalCtors);if(n.stackAlloc=oe.stackAlloc,n.stackRestore=oe.stackRestore,n.stackSave=oe.stackSave,n.dynCall_i=oe.dynCall_i,n.dynCall_ii=oe.dynCall_ii,n.dynCall_iidiiii=oe.dynCall_iidiiii,n.dynCall_iii=oe.dynCall_iii,n.dynCall_iiii=oe.dynCall_iiii,n.dynCall_v=oe.dynCall_v,n.dynCall_vi=oe.dynCall_vi,n.dynCall_vii=oe.dynCall_vii,n.dynCall_viii=oe.dynCall_viii,n.dynCall_viiii=oe.dynCall_viiii,n.dynCall_viiiii=oe.dynCall_viiiii,n.dynCall_viiiiii=oe.dynCall_viiiiii,n.asm=oe,q)if(J(q)||(ne=q,q=n.locateFile?n.locateFile(ne,m):m+ne),l||s){var fe=f(q);E.set(fe,8)}else{j++,n.monitorRunDependencies&&n.monitorRunDependencies(j);var de=function(t){t.byteLength&&(t=new Uint8Array(t)),E.set(t,8),n.memoryInitializerRequest&&delete n.memoryInitializerRequest.response,function(t){if(j--,n.monitorRunDependencies&&n.monitorRunDependencies(j),0==j&&(null!==W&&(clearInterval(W),W=null),H)){var e=H;H=null,e()}}()},pe=function(){h(q,de,(function(){throw new Error("could not load memory initializer "+q)}))},me=re(q);if(me)de(me.buffer);else if(n.memoryInitializerRequest){var Ae=function(){var t=n.memoryInitializerRequest,e=t.response;if(200!==t.status&&0!==t.status){var r=re(n.memoryInitializerRequestURL);if(!r)return console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+t.status+", retrying "+q),void pe();e=r.buffer}de(e)};n.memoryInitializerRequest.response?setTimeout(Ae,0):n.memoryInitializerRequest.addEventListener("load",Ae)}else pe()}function ge(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function ve(t){function e(){ie||(ie=!0,n.calledRun=!0,y||(z(Z),z(V),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)t=n.postRun.shift(),Q.unshift(t);var t;z(Q)}()))}t=t||c,j>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)t=n.preRun.shift(),G.unshift(t);var t;z(G)}(),j>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(H=function t(){ie||ve(),ie||(H=t)},n.run=ve,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return ve(),n}r.d(e,{Z:()=>n}),t=r.hmd(t)},75550:t=>{"use strict";function e(t,e){this.x=t,this.y=e}t.exports=e,e.prototype={clone:function(){return new e(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),a=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},e.convert=function(t){return t instanceof e?t:Array.isArray(t)?new e(t[0],t[1]):t}},38929:(t,e,r)=>{t.exports.VectorTile=r(22779),r(66024),r(59701)},22779:(t,e,r)=>{"use strict";var n=r(59701);function i(t,e,r){if(3===t){var i=new n(r,r.readVarint()+r.pos);i.length&&(e[i.name]=i)}}t.exports=function(t,e){this.layers=t.readFields(i,{},e)}},66024:(t,e,r)=>{"use strict";var n=r(75550);function i(t,e,r,n,i){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=i,t.readFields(a,this,e)}function a(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){for(var r=t.readVarint()+t.pos;t.pos>3}if(a--,1===i||2===i)o+=t.readSVarint(),s+=t.readSVarint(),1===i&&(e&&l.push(e),e=[]),e.push(new n(o,s));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&l.push(e),l},i.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;t.pos>3}if(n--,1===r||2===r)(i+=t.readSVarint())s&&(s=i),(a+=t.readSVarint())c&&(c=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,c]},i.prototype.toGeoJSON=function(t,e,r){var n,a,s=this.extent*Math.pow(2,r),l=this.extent*t,c=this.extent*e,u=this.loadGeometry(),h=i.types[this.type];function f(t){for(var e=0;e{"use strict";var n=r(66024);function i(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(a,this,e),this.length=this._features.length}function a(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){for(var e=null,r=t.readVarint()+t.pos;t.pos>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(r))}t.exports=i,i.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new n(this._pbf,e,this.extent,this._keys,this._values)}},36194:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>v});var n,i={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-i.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*i.Bounce.In(2*t):.5*i.Bounce.Out(2*t-1)+.5}}},a="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},o=function(){function t(){this._tweens={},this._tweensAddedDuringUpdate={}}return t.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map((function(e){return t._tweens[e]}))},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},t.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},t.prototype.update=function(t,e){void 0===t&&(t=a()),void 0===e&&(e=!1);var r=Object.keys(this._tweens);if(0===r.length)return!1;for(;r.length>0;){this._tweensAddedDuringUpdate={};for(var n=0;n1?a(t[r],t[r-1],r-n):a(t[i],t[i+1>r?r:i+1],n-i)},Bezier:function(t,e){for(var r=0,n=t.length-1,i=Math.pow,a=s.Utils.Bernstein,o=0;o<=n;o++)r+=i(1-e,n-o)*i(e,o)*t[o]*a(n,o);return r},CatmullRom:function(t,e){var r=t.length-1,n=r*e,i=Math.floor(n),a=s.Utils.CatmullRom;return t[0]===t[r]?(e<0&&(i=Math.floor(n=r*(1+e))),a(t[(i-1+r)%r],t[i],t[(i+1)%r],t[(i+2)%r],n-i)):e<0?t[0]-(a(t[0],t[0],t[1],t[1],-n)-t[0]):e>1?t[r]-(a(t[r],t[r],t[r-1],t[r-1],n-r)-t[r]):a(t[i?i-1:0],t[i],t[r1;r--)e*=r;return n[t]=e,e}),CatmullRom:function(t,e,r,n,i){var a=.5*(r-t),o=.5*(n-e),s=i*i;return(2*e-2*r+a+o)*(i*s)+(-3*e+3*r-2*a-o)*s+a*i+e}}},l=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),c=new o,u=function(){function t(t,e){void 0===e&&(e=c),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=i.Linear.None,this._interpolationFunction=s.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=l.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.to=function(t,e){return this._valuesEnd=Object.create(t),void 0!==e&&(this._duration=e),this},t.prototype.duration=function(t){return this._duration=t,this},t.prototype.start=function(t){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var e in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==t?"string"==typeof t?a()+parseFloat(t):t:a(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},t.prototype._setupProperties=function(t,e,r,n){for(var i in r){var a=t[i],o=Array.isArray(a),s=o?"array":typeof a,l=!o&&Array.isArray(r[i]);if("undefined"!==s&&"function"!==s){if(l){var c=r[i];if(0===c.length)continue;c=c.map(this._handleRelativeValue.bind(this,a)),r[i]=[a].concat(c)}if("object"!==s&&!o||!a||l)void 0===e[i]&&(e[i]=a),o||(e[i]*=1),n[i]=l?r[i].slice().reverse():e[i]||0;else{for(var u in e[i]=o?[]:{},a)e[i][u]=a[u];n[i]=o?[]:{},this._setupProperties(a,e[i],r[i],n[i])}}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},t.prototype.pause=function(t){return void 0===t&&(t=a()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this)),this},t.prototype.resume=function(t){return void 0===t&&(t=a()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},t.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;ti)return!1;e&&this.start(t)}if(this._goToEnd=!1,t1?1:n;var o=this._easingFunction(n);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,n),1===n){if(this._repeat>0){for(r in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[r]||(this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(this._valuesEnd[r])),this._yoyo&&this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var s=0,l=this._chainedTweens.length;s{"use strict";r.d(e,{Q:()=>rt,Z:()=>pt});var n=r(15671),i=r(43144),a=r(97326),o=r(79340),s=r(82963),l=r(61120),c=r(99477);var u=1e3/60,h=function(t){t.id&&(clearInterval(t.id),t.id=void 0),t.waitTimer&&(clearInterval(t.waitTimer),t.waitTimer=void 0),t.keyframe=0},f=function(t){h(t),t.isEnded()&&t.dispatchEvent({type:"animation-ended"}),t.dispatchEvent({type:"animation-stopped"}),t.duration=0};const d=function(t){(0,o.Z)(c,t);var e,r,a=(e=c,r=function(){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(t){return!1}}(),function(){var t,n=(0,l.Z)(e);if(r){var i=(0,l.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,s.Z)(this,t)});function c(){var t;return(0,n.Z)(this,c),(t=a.call(this)).id=null,t.keyframe=0,t.duration=0,t.state=0,t.waitTimer=null,t.callback=function(){},t}return(0,i.Z)(c,[{key:"isPlaying",value:function(){return 1===this.state}},{key:"isStopped",value:function(){return 0===this.state}},{key:"isEnded",value:function(){return 2===this.state}},{key:"setCallback",value:function(t){this.callback=t}},{key:"play",value:function(t){this.duration=t,this.dispatchEvent({type:"animation-started"}),this.state=1,h(this),this.id=setInterval(this.frame.bind(this),u)}},{key:"playLater",value:function(t,e){var r=Math.floor(u*e);window.clearInterval(this.waitTimer);var n=this;this.waitTimer=window.setTimeout((function(){n.play(t)}),r)}},{key:"stop",value:function(){this.state=0,f(this)}},{key:"frame",value:function(){this.keyframe1&&void 0!==arguments[1]?arguments[1]:{};(0,n.Z)(this,h),(e=u.call(this))._view=t,e._domElement=t.domElement;var i=!0;Object.defineProperty((0,a.Z)(e),"enabled",{get:function(){return i},set:function(t){t||(e.onKeyUp(),e.onPointerUp()),i=t}});var o=!0;Object.defineProperty((0,a.Z)(e),"enableKeys",{get:function(){return o},set:function(t){t||e.onKeyUp(),o=t}}),e.NONE={};var s=e.NONE;return Object.defineProperty((0,a.Z)(e),"currentState",{get:function(){return s},set:function(t){if(s!==t){var r=s;s=t,e.dispatchEvent({type:"state-changed",viewCoords:v,previous:r})}}}),e._clickTimeStamp=0,e._lastMousePressed={viewCoords:new c.Vector2},e._currentMousePressed=void 0,e._currentKeyPressed=void 0,e._onPointerDown=e.onPointerDown.bind((0,a.Z)(e)),e._onPointerMove=e.onPointerMove.bind((0,a.Z)(e)),e._onPointerUp=e.onPointerUp.bind((0,a.Z)(e)),e._onMouseWheel=e.onMouseWheel.bind((0,a.Z)(e)),e._onKeyDown=e.onKeyDown.bind((0,a.Z)(e)),e._onKeyUp=e.onKeyUp.bind((0,a.Z)(e)),e._onBlur=e.onBlur.bind((0,a.Z)(e)),e._onContextMenu=e.onContextMenu.bind((0,a.Z)(e)),e._domElement.addEventListener("pointerdown",e._onPointerDown,!1),e._domElement.addEventListener("wheel",e._onMouseWheel,!1),e._domElement.addEventListener("keydown",e._onKeyDown,!1),e._domElement.addEventListener("keyup",e._onKeyUp,!1),e._domElement.addEventListener("blur",e._onBlur),e._domElement.addEventListener("contextmenu",e._onContextMenu,!1),e.setFromOptions(r),e}return(0,i.Z)(h,[{key:"inputToState",value:function(t,e){for(var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=0,i=Object.keys(g);nt.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:{};return(0,n.Z)(this,h),(o=u.call(this)).player=new d,o.view=t,o.camera=t.camera3D,o.states=new b(o.view),Object.defineProperty((0,a.Z)(o),"enabled",{get:function(){return o.states.enabled},set:function(t){console.warn("GlobeControls.enabled property is deprecated. Use StateControl.enabled instead - which you can access with GlobeControls.states.enabled."),o.states.enabled=t}}),s.zoomSpeed&&(console.warn("Controls zoomSpeed parameter is deprecated. Use zoomFactor instead."),s.zoomFactor=s.zoomFactor||s.zoomSpeed),o.zoomFactor=s.zoomFactor||1.25,o.minDistance=s.minDistance||250,o.maxDistance=s.maxDistance||8*m.c.x,o.minZoom=s.minZoom||0,o.maxZoom=s.maxZoom||1/0,o.rotateSpeed=s.rotateSpeed||.25,o.keyPanSpeed=s.keyPanSpeed||7,o.minPolarAngle=c.MathUtils.degToRad(null!==(r=s.minPolarAngle)&&void 0!==r?r:.5),o.maxPolarAngle=c.MathUtils.degToRad(null!==(i=s.minPolarAngle)&&void 0!==i?i:86),o.minAzimuthAngle=s.minAzimuthAngle?c.MathUtils.degToRad(s.minAzimuthAngle):-1/0,o.maxAzimuthAngle=s.maxAzimuthAngle?c.MathUtils.degToRad(s.maxAzimuthAngle):1/0,o.handleCollision=void 0===s.handleCollision||s.handleCollision,o.minDistanceCollision=60,Object.defineProperty((0,a.Z)(o),"enableKeys",{get:function(){return o.states.enableKeys},set:function(t){console.warn("GlobeControls.enableKeys property is deprecated. Use StateControl.enableKeys instead - which you can access with GlobeControls.states.enableKeys."),o.states.enableKeys=t}}),o.enableDamping=!1!==s.enableDamping,o.dampingMoveFactor=null!=s.dampingMoveFactor?s.dampingMoveFactor:.25,o.startEvent={type:"start"},o.endEvent={type:"end"},o.updateHelper=function(){},o._onEndingMove=null,o._onTravel=o.travel.bind((0,a.Z)(o)),o._onTouchStart=o.onTouchStart.bind((0,a.Z)(o)),o._onTouchEnd=o.onTouchEnd.bind((0,a.Z)(o)),o._onTouchMove=o.onTouchMove.bind((0,a.Z)(o)),o._onStateChange=o.onStateChange.bind((0,a.Z)(o)),o._onRotation=o.handleRotation.bind((0,a.Z)(o)),o._onDrag=o.handleDrag.bind((0,a.Z)(o)),o._onDolly=o.handleDolly.bind((0,a.Z)(o)),o._onPan=o.handlePan.bind((0,a.Z)(o)),o._onPanoramic=o.handlePanoramic.bind((0,a.Z)(o)),o._onZoom=o.handleZoom.bind((0,a.Z)(o)),o.states.addEventListener("state-changed",o._onStateChange,!1),o.states.addEventListener(o.states.ORBIT._event,o._onRotation,!1),o.states.addEventListener(o.states.MOVE_GLOBE._event,o._onDrag,!1),o.states.addEventListener(o.states.DOLLY._event,o._onDolly,!1),o.states.addEventListener(o.states.PAN._event,o._onPan,!1),o.states.addEventListener(o.states.PANORAMIC._event,o._onPanoramic,!1),o.states.addEventListener("zoom",o._onZoom,!1),o.view.domElement.addEventListener("touchstart",o._onTouchStart,!1),o.view.domElement.addEventListener("touchend",o._onTouchEnd,!1),o.view.domElement.addEventListener("touchmove",o._onTouchMove,!1),o.states.addEventListener(o.states.TRAVEL_IN._event,o._onTravel,!1),o.states.addEventListener(o.states.TRAVEL_OUT._event,o._onTravel,!1),t.scene.add(z),e.isExtent?e.center().as("EPSG:4978",Z):(e.coord.as("EPSG:4978",Z),e.tilt=e.tilt||89.5,e.heading=e.heading||0),Q(Z,z),o.lookAtCoordinate(e,!1),G.crs=o.view.referenceCrs,o}return(0,i.Z)(h,[{key:"dollyInScale",get:function(){return this.zoomFactor}},{key:"dollyOutScale",get:function(){return 1/this.zoomFactor}},{key:"isPaused",get:function(){return this.states.currentState===this.states.NONE&&!this.player.isPlaying()}},{key:"onEndingMove",value:function(t){this._onEndingMove&&(this.player.removeEventListener("animation-stopped",this._onEndingMove),this._onEndingMove=null),this.handlingEvent(t)}},{key:"rotateLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;R.theta-=t}},{key:"rotateUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;R.phi-=t}},{key:"panLeft",value:function(t){var e=this.camera.matrix.elements;D.fromArray(e),D.multiplyScalar(-t),q.add(D)}},{key:"panUp",value:function(t){var e=this.camera.matrix.elements;D.fromArray(e,4),D.multiplyScalar(t),q.add(D)}},{key:"mouseToPan",value:function(t,e){var r=this.view.mainLoop.gfxEngine;if(this.camera.isPerspectiveCamera){var n=this.camera.position.distanceTo(this.getCameraTargetPosition());n*=2*Math.tan(c.MathUtils.degToRad(.5*this.camera.fov)),this.panLeft(t*n/r.width*this.camera.aspect),this.panUp(e*n/r.height)}else this.camera.isOrthographicCamera&&(this.panLeft(t*(this.camera.right-this.camera.left)/r.width),this.panUp(e*(this.camera.top-this.camera.bottom)/r.height))}},{key:"dolly",value:function(t){0!==t&&(_=t>0?this.dollyInScale:this.dollyOutScale,this.camera.isPerspectiveCamera?B/=_:this.camera.isOrthographicCamera&&(this.camera.zoom=c.MathUtils.clamp(this.camera.zoom*_,this.minZoom,this.maxZoom),this.camera.updateProjectionMatrix(),this.view.notifyChange(this.camera)))}},{key:"getMinDistanceCameraBoundingSphereObbsUp",value:function(t){if(t.level>10&&1==t.children.length&&t.geometry){var e=t.obb;ft.center.copy(this.camera.position),ft.radius=this.minDistanceCollision,e.isSphereAboveXYBox(ft)&&(ot=Math.min(ft.center.z-e.box3D.max.z,ot))}}},{key:"update",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.states.currentState;if(ot=1/0,this.handleCollision&&this.view.tileLayer){var r,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return w(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(this.view.tileLayer.level0Nodes);try{for(n.s();!(r=n.n()).done;)r.value.traverse(this.getMinDistanceCameraBoundingSphereObbsUp.bind(this))}catch(t){n.e(t)}finally{n.f()}}switch(e){case this.states.MOVE_GLOBE:if(ot<0)z.translateY(-ot),this.camera.position.setLength(this.camera.position.length()-ot);else if(otl&&R.phi>0){var u=s-l,h=1-(u-(ot-l))/u;R.phi*=h*h}else if(ot-l&&R.phi>-.01){var f=-Math.asin(.25*(l-ot)/I.radius);f=c.MathUtils.clamp(f,-.01,0);var d=1-(l-ot)/(2*l);R.phi=c.MathUtils.lerp(R.phi,f,d),ot-=Math.sin(R.phi)*I.radius}I.theta+=R.theta,I.phi+=R.phi,I.theta=Math.max(this.minAzimuthAngle,Math.min(this.maxAzimuthAngle,I.theta)),I.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,I.phi)),I.radius=this.camera.position.length()*B,I.makeSafe(),I.radius=Math.max(this.minDistance,Math.min(this.maxDistance,I.radius)),this.camera.position.setFromSpherical(I),ot<0&&(this.camera.position.y-=ot,I.setFromVector3(this.camera.position),R.phi=0),z.localToWorld(this.camera.position)}this.camera.up.copy(z.position).normalize(),this.camera.lookAt(z.position),this.enableDamping?(R.theta*=.75,R.phi*=.75,N.slerp(X,.2*this.dampingMoveFactor)):(R.theta=0,R.phi=0,N.set(0,0,0,1)),B=1,q.set(0,0,0),(Y.distanceToSquared(this.camera.position)>E||8*(1-J.dot(this.camera.quaternion))>E)&&(this.view.notifyChange(this.camera),Y.copy(this.camera.position),J.copy(this.camera.quaternion)),this.enableDamping&&e===this.states.ORBIT&&this.player.isStopped()&&(R.theta>E||R.phi>E)&&(this.player.setCallback((function(){t.update(t.states.ORBIT)})),this.player.playLater(60,2)),this.view.dispatchEvent({type:x.b.CAMERA_MOVED,coord:G.setFromVector3(z.position),range:I.radius,heading:-c.MathUtils.radToDeg(I.theta),tilt:90-c.MathUtils.radToDeg(I.phi)})}},{key:"onStateChange",value:function(t){this.states.currentState!==this.states.NONE?(A.ZP.stop(this.view,this.camera),this.onEndingMove(),this.player.stop(),this.updateTarget(),j=A.ZP.getTransformCameraLookingAtTarget(this.view,this.camera,ht),S.copy(t.viewCoords),this.view.getPickingPositionFromDepth(t.viewCoords,$)&&(K.radius=$.length(),st.copy($).normalize(),this.updateHelper($,et.picking)),U.copy(t.viewCoords),k.copy(t.viewCoords)):this.handleEndMovement(t)}},{key:"handleRotation",value:function(t){this.player.stop(),this.handlePanoramic(t)}},{key:"handleDrag",value:function(t){var e=this.view.viewToNormalizedCoords(t.viewCoords);this.camera.updateMatrixWorld(),ct.setFromCamera(e,this.camera),ct.ray.intersectSphere(K,tt)?(lt.copy(tt).normalize(),N.setFromUnitVectors(lt,st),W=Date.now(),this.update()):this.states.onPointerUp()}},{key:"handleDolly",value:function(t){O.copy(t.viewCoords),F.subVectors(O,U),this.dolly(-F.y),U.copy(O),this.update()}},{key:"handlePan",value:function(t){t.viewCoords?(L.copy(t.viewCoords),P.subVectors(L,k),k.copy(L)):t.direction&&P.copy(M[t.direction]).multiplyScalar(this.keyPanSpeed),this.mouseToPan(P.x,P.y),this.update(this.states.PAN)}},{key:"handlePanoramic",value:function(t){C.copy(t.viewCoords),T.subVectors(C,S);var e=this.view.mainLoop.gfxEngine;R.theta-=2*Math.PI*T.x/e.width*this.rotateSpeed,R.phi-=2*Math.PI*T.y/e.height*this.rotateSpeed,S.copy(C),this.update()}},{key:"handleEndMovement",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.dispatchEvent(this.endEvent),this.player.stop(),this.enableDamping?e.previous===this.states.ORBIT&&(R.theta>E||R.phi>E)?(this.player.setCallback((function(){t.update(t.states.ORBIT)})),this.player.play(60),this._onEndingMove=function(){return t.onEndingMove()},this.player.addEventListener("animation-stopped",this._onEndingMove)):e.previous===this.states.MOVE_GLOBE&&Date.now()-W<50?(this.player.setCallback((function(){t.update(t.states.MOVE_GLOBE)})),this.player.play(120),this._onEndingMove=function(){return t.onEndingMove()},this.player.addEventListener("animation-stopped",this._onEndingMove)):this.onEndingMove():this.onEndingMove()}},{key:"updateTarget",value:function(){if(this.view.getPickingPositionFromDepth(null,ht)){var t=isNaN(ht.x)?100:this.camera.position.distanceTo(ht);ut.set(0,0,-t),this.camera.localToWorld(ut),Q(ut,z),z.matrixWorldInverse.copy(z.matrixWorld).invert(),ut.copy(this.camera.position),ut.applyMatrix4(z.matrixWorldInverse),I.setFromVector3(ut)}}},{key:"handlingEvent",value:function(t){t=t||A.ZP.getTransformCameraLookingAtTarget(this.view,this.camera);var e=A.ZP.getDiffParams(j,t);if(e&&(e.range&&this.dispatchEvent({type:rt.RANGE_CHANGED,previous:e.range.previous,new:e.range.new}),e.coord&&this.dispatchEvent({type:rt.CAMERA_TARGET_CHANGED,previous:e.coord.previous,new:e.coord.new}),e.tilt||e.heading)){var r={type:rt.ORIENTATION_CHANGED};e.tilt&&(r.previous={tilt:e.tilt.previous},r.new={tilt:e.tilt.new}),e.heading&&(r.previous=r.previous||{},r.new=r.new||{},r.new.heading=e.heading.new,r.previous.heading=e.heading.previous),this.dispatchEvent(r)}}},{key:"travel",value:function(t){this.player.stop();var e=this.view.getPickingPositionFromDepth(t.viewCoords),r=this.getRange(e);if(e&&r>this.minDistance)return this.lookAtCoordinate({coord:new p.Z("EPSG:4978",e),range:r*("out"===t.direction?1/.6:.6),time:1500})}},{key:"handleZoom",value:function(t){this.player.stop(),A.ZP.stop(this.view,this.camera),this.updateTarget();var e=-t.delta;this.dolly(e);var r=this.getRange(ht);this.update();var n=this.getRange(ht);Math.abs(n-r)/r>.001&&this.dispatchEvent({type:rt.RANGE_CHANGED,previous:r,new:n}),this.dispatchEvent(this.startEvent),this.dispatchEvent(this.endEvent)}},{key:"onTouchStart",value:function(t){if(this.player.stop(),!1!==this.states.enabled&&(this.state=this.states.touchToState(t.touches.length),this.updateTarget(),this.state!==this.states.NONE)){switch(this.state){case this.states.MOVE_GLOBE:var e=this.view.eventToViewCoords(t);this.view.getPickingPositionFromDepth(e,$)?(K.radius=$.length(),st.copy($).normalize(),this.updateHelper($,et.picking)):this.state=this.states.NONE;break;case this.states.ORBIT:case this.states.DOLLY:var r=t.touches[0].pageX,n=t.touches[0].pageY,i=r-t.touches[1].pageX,a=n-t.touches[1].pageY,o=Math.sqrt(i*i+a*a);U.set(0,o),S.set(r,n);break;case this.states.PAN:k.set(t.touches[0].pageX,t.touches[0].pageY)}this.dispatchEvent(this.startEvent)}}},{key:"onTouchMove",value:function(t){if(this.player.isPlaying()&&this.player.stop(),!1!==this.states.enabled){switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case this.states.MOVE_GLOBE.finger:var e=this.view.eventToViewCoords(t),r=this.view.viewToNormalizedCoords(e);this.camera.updateMatrixWorld(),ct.setFromCamera(r,this.camera),ct.ray.intersectSphere(K,tt)?(lt.copy(tt).normalize(),N.setFromUnitVectors(lt,st),W=Date.now()):this.onTouchEnd();break;case this.states.ORBIT.finger:case this.states.DOLLY.finger:var n=this.view.mainLoop.gfxEngine;C.set(t.touches[0].pageX,t.touches[0].pageY),T.subVectors(C,S),this.rotateLeft(2*Math.PI*T.x/n.width*this.rotateSpeed),this.rotateUp(2*Math.PI*T.y/n.height*this.rotateSpeed),S.copy(C);var i=t.touches[0].pageX-t.touches[1].pageX,a=t.touches[0].pageY-t.touches[1].pageY,o=Math.sqrt(i*i+a*a);O.set(0,o),F.subVectors(O,U),this.dolly(F.y),U.copy(O);break;case this.states.PAN.finger:L.set(t.touches[0].pageX,t.touches[0].pageY),P.subVectors(L,k),this.mouseToPan(P.x,P.y),k.copy(L);break;default:this.state=this.states.NONE}this.state!==this.states.NONE&&this.update(this.state)}}},{key:"onTouchEnd",value:function(){this.handleEndMovement({previous:this.state}),this.state=this.states.NONE}},{key:"dispose",value:function(){this.view.domElement.removeEventListener("touchstart",this._onTouchStart,!1),this.view.domElement.removeEventListener("touchend",this._onTouchEnd,!1),this.view.domElement.removeEventListener("touchmove",this._onTouchMove,!1),this.states.dispose(),this.states.removeEventListener("state-changed",this._onStateChange,!1),this.states.removeEventListener(this.states.ORBIT._event,this._onRotation,!1),this.states.removeEventListener(this.states.MOVE_GLOBE._event,this._onDrag,!1),this.states.removeEventListener(this.states.DOLLY._event,this._onDolly,!1),this.states.removeEventListener(this.states.PAN._event,this._onPan,!1),this.states.removeEventListener(this.states.PANORAMIC._event,this._onPanoramic,!1),this.states.removeEventListener("zoom",this._onZoom,!1),this.states.removeEventListener(this.states.TRAVEL_IN._event,this._onTravel,!1),this.states.removeEventListener(this.states.TRAVEL_OUT._event,this._onTravel,!1),this.dispatchEvent({type:"dispose"})}},{key:"setTilt",value:function(t,e){return this.lookAtCoordinate({tilt:t},e)}},{key:"setHeading",value:function(t,e){return this.lookAtCoordinate({heading:t},e)}},{key:"setRange",value:function(t,e){return this.lookAtCoordinate({range:t},e)}},{key:"getCameraTargetPosition",value:function(){return z.position}},{key:"getRange",value:function(t){return A.ZP.getTransformCameraLookingAtTarget(this.view,this.camera,t).range}},{key:"getTilt",value:function(t){return A.ZP.getTransformCameraLookingAtTarget(this.view,this.camera,t).tilt}},{key:"getHeading",value:function(t){return A.ZP.getTransformCameraLookingAtTarget(this.view,this.camera,t).heading}},{key:"pan",value:function(t){return this.mouseToPan(t.x,t.y),this.update(this.states.PAN),Promise.resolve()}},{key:"getCameraOrientation",value:function(){return this.view.getPickingPositionFromDepth(null,ht),[this.getTilt(ht),this.getHeading(ht)]}},{key:"getCameraCoordinate",value:function(){return new p.Z("EPSG:4978",this.camera.position).as("EPSG:4326")}},{key:"getLookAtCoordinate",value:function(){return A.ZP.getTransformCameraLookingAtTarget(this.view,this.camera).coord}},{key:"setAnimationEnabled",value:function(t){H=t}},{key:"isAnimationEnabled",value:function(){return H}},{key:"getZoom",value:function(){return this.view.tileLayer.computeTileZoomFromDistanceCamera(this.getRange(),this.view.camera)}},{key:"setZoom",value:function(t,e){return this.lookAtCoordinate({zoom:t},e)}},{key:"getScale",value:function(t){return console.warn("Deprecated, use View#getScale instead."),this.view.getScale(t)}},{key:"pixelsToMeters",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.28;return console.warn("Deprecated use View#getPixelsToMeters instead."),t*e/this.getScale(e)/1e3}},{key:"pixelsToDegrees",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.28;console.warn("Deprecated, use View#getPixelsToMeters and GlobeControls#getMetersToDegrees instead.");var r=this.pixelsToMeters(t,e);return c.MathUtils.radToDeg(2*Math.asin(r/(2*m.c.x)))}},{key:"metersToPixels",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.28;return console.warn("Deprecated, use View#getMetersToPixels instead."),t*this.getScale(e)/(e/1e3)}},{key:"setScale",value:function(t,e,r){return this.lookAtCoordinate({scale:t,pitch:e},r)}},{key:"lookAtCoordinate",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.isAnimationEnabled();if(this.player.stop(),!e.isExtent&&(e.zoom?e.range=this.view.tileLayer.computeDistanceCameraFromTileZoom(e.zoom,this.view.camera):e.scale&&(e.range=this.view.getScaleFromDistance(e.pitch,e.scale),(e.rangethis.maxDistance)&&(console.warn("This scale ".concat(e.scale," can not be reached")),e.range=c.MathUtils.clamp(e.range,this.minDistance,this.maxDistance))),void 0!==e.tilt)){var n=90-c.MathUtils.radToDeg(this.maxPolarAngle),i=90-c.MathUtils.radToDeg(this.minPolarAngle);(e.tilti)&&(e.tilt=c.MathUtils.clamp(e.tilt,n,i),console.warn("Tilt was clamped to ",e.tilt," the interval is between ".concat(n," and ").concat(i," degree")))}return j=A.ZP.getTransformCameraLookingAtTarget(this.view,this.camera),r?(e.callback=function(t){return z.position.copy(t.targetWorldPosition)},this.dispatchEvent({type:"animation-started"}),A.ZP.animateCameraToLookAtTarget(this.view,this.camera,e).then((function(e){return t.dispatchEvent({type:"animation-ended"}),t.handlingEvent(e),e}))):A.ZP.transformCameraToLookAtTarget(this.view,this.camera,e).then((function(e){return z.position.copy(e.targetWorldPosition),t.handlingEvent(e),e}))}},{key:"pickGeoPosition",value:function(t){var e=this.view.getPickingPositionFromDepth(t);if(e)return new p.Z("EPSG:4978",e).as("EPSG:4326")}}]),h}(c.EventDispatcher);const pt=dt},44450:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>H,uZ:()=>W});var n=r(15671),i=r(43144),a=r(97326),o=r(79340),s=r(82963),l=r(61120),c=r(99477),u=r(49469);var h,f=c.MOUSE.LEFT,d=c.MOUSE.MIDDLE,p=c.MOUSE.RIGHT,m=new c.Vector3,A=new c.Quaternion,g=0,v=new c.Vector3,y=-1,b={default:"auto",drag:"move",pan:"cell",travel:"wait",rotate:"move",ortho_zoom:"wait"},x=new c.Vector3,w=new c.Vector2,_=new c.Vector2,E=new c.Vector2(0,0),M=new c.Vector3,S=new c.Vector3,C=new c.Vector3,T=new c.Vector3(0,0,0),I=0,R=new c.Vector3,B=new c.Quaternion,k=new c.Vector2,L=new c.Vector3,P=new c.Vector3,D=new c.Quaternion,U=new c.Quaternion,O=0,F=0,N=!1,z=!1,G=0,Z=0,V=new c.Raycaster,Q=new c.Plane(new c.Vector3(0,0,-1)),j={enabled:!0,enableRotation:!0,rotateSpeed:2,minPanSpeed:.05,maxPanSpeed:15,zoomTravelTime:.2,zoomFactor:2,maxResolution:0,minResolution:1/0,maxAltitude:5e7,groundLevel:200,autoTravelTimeMin:1.5,autoTravelTimeMax:4,autoTravelTimeDist:5e4,smartTravelHeightMin:75,smartTravelHeightMax:500,instantTravel:!1,minZenithAngle:0,maxZenithAngle:82.5,handleCollision:!0,minDistanceCollision:30,enableSmartTravel:!0,enablePan:!0},W={MOVED:"moved"};const H=function(t){(0,o.Z)(X,t);var e,r,H=(e=X,r=function(){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(t){return!1}}(),function(){var t,n=(0,l.Z)(e);if(r){var i=(0,l.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,s.Z)(this,t)});function X(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.Z)(this,X),(e=H.call(this)).view=t,e.camera=t.camera3D,e.enabled="boolean"==typeof r.enabled?r.enabled:j.enabled,e.camera.isOrthographicCamera?(g=e.camera.zoom,e.enableRotation=!1,e.enablePan=!1,e.maxAltitude=1/0,e.zoomTravelTime="number"==typeof r.zoomTravelTime?r.zoomTravelTime:j.zoomTravelTime):(e.enableRotation=void 0===r.enableRotation?j.enableRotation:r.enableRotation,e.rotateSpeed=r.rotateSpeed||j.rotateSpeed,e.enablePan=void 0===r.enablePan?j.enablePan:r.enablePan,e.minPanSpeed=r.minPanSpeed||j.minPanSpeed,e.maxPanSpeed=r.maxPanSpeed||j.maxPanSpeed,e.maxAltitude=r.maxAltitude||j.maxAltitude,e.zoomTravelTime=r.zoomTravelTime||j.zoomTravelTime),r.zoomInFactor&&(console.warn("Controls zoomInFactor parameter is deprecated. Use zoomFactor instead."),r.zoomFactor=r.zoomFactor||r.zoomInFactor),r.zoomOutFactor&&(console.warn("Controls zoomOutFactor parameter is deprecated. Use zoomFactor instead."),r.zoomFactor=r.zoomFactor||r.zoomInFactor||1/r.zoomOutFactor),0===r.zoomFactor&&(console.warn("Controls zoomFactor parameter can not be equal to 0. Its value will be set to default."),r.zoomFactor=j.zoomFactor),e.zoomInFactor=r.zoomFactor||j.zoomFactor,e.zoomOutFactor=1/(r.zoomFactor||j.zoomFactor),e.maxResolution=r.maxResolution||j.maxResolution,e.minResolution=r.minResolution||j.minResolution,e.groundLevel=r.groundLevel||j.groundLevel,e.autoTravelTimeMin=r.autoTravelTimeMin||j.autoTravelTimeMin,e.autoTravelTimeMax=r.autoTravelTimeMax||j.autoTravelTimeMax,e.autoTravelTimeDist=r.autoTravelTimeDist||j.autoTravelTimeDist,r.smartZoomHeightMin&&(console.warn("Controls smartZoomHeightMin parameter is deprecated. Use smartTravelHeightMin instead."),r.smartTravelHeightMin=r.smartTravelHeightMin||r.smartZoomHeightMin),r.smartZoomHeightMax&&(console.warn("Controls smartZoomHeightMax parameter is deprecated. Use smartTravelHeightMax instead."),r.smartTravelHeightMax=r.smartTravelHeightMax||r.smartZoomHeightMax),e.smartTravelHeightMin=r.smartTravelHeightMin||j.smartTravelHeightMin,e.smartTravelHeightMax=r.smartTravelHeightMax||j.smartTravelHeightMax,e.instantTravel=r.instantTravel||j.instantTravel,e.minZenithAngle=(r.minZenithAngle||j.minZenithAngle)*Math.PI/180,e.maxZenithAngle=(r.maxZenithAngle||j.maxZenithAngle)*Math.PI/180,r.focusOnMouseOver&&console.warn("Planar controls 'focusOnMouseOver' optional parameter has been removed."),r.focusOnMouseClick&&console.warn("Planar controls 'focusOnMouseClick' optional parameter has been removed."),e.handleCollision=void 0===r.handleCollision?j.handleCollision:r.handleCollision,e.minDistanceCollision=j.minDistanceCollision,e.enableSmartTravel=void 0===r.enableSmartTravel?j.enableSmartTravel:r.enableSmartTravel,m.copy(e.camera.position),A.copy(e.camera.quaternion),e.state=y,e.cursor=b,e.view.controls&&(console.warn("Deprecated use of PlanarControls. See examples to correct PlanarControls implementation."),e.view.controls.dispose()),e.view.controls=(0,a.Z)(e),e._handlerOnKeyDown=e.onKeyDown.bind((0,a.Z)(e)),e._handlerOnMouseDown=e.onMouseDown.bind((0,a.Z)(e)),e._handlerOnMouseUp=e.onMouseUp.bind((0,a.Z)(e)),e._handlerOnMouseMove=e.onMouseMove.bind((0,a.Z)(e)),e._handlerOnMouseWheel=e.onMouseWheel.bind((0,a.Z)(e)),e._handlerContextMenu=e.onContextMenu.bind((0,a.Z)(e)),e._handlerUpdate=e.update.bind((0,a.Z)(e)),e.view.addFrameRequester(u.Ao.AFTER_CAMERA_UPDATE,e._handlerUpdate),e.addInputListeners(),e}return(0,i.Z)(X,[{key:"dispose",value:function(){this.removeInputListeners(),this.view.removeFrameRequester(u.Ao.AFTER_CAMERA_UPDATE,this._handlerUpdate)}},{key:"update",value:function(t,e){e&&(t=16);var r=this.state!==y;switch(this.state){case 3:this.handleTravel(t),this.view.notifyChange(this.camera);break;case 4:this.handleZoomOrtho(t),this.view.notifyChange(this.camera);break;case 0:this.handleDragMovement(),this.view.notifyChange(this.camera);break;case 2:this.handleRotation(),this.view.notifyChange(this.camera);break;case 1:this.handlePanMovement(),this.view.notifyChange(this.camera)}this.handleCollision&&this.view.camera.adjustAltitudeToAvoidCollisionWithLayer(this.view,this.view.tileLayer,this.minDistanceCollision),r&&this.view.dispatchEvent({type:W.MOVED}),E.set(0,0)}},{key:"initiateDrag",value:function(){this.state=0,M.copy(this.getWorldPointAtScreenXY(w)),C.set(0,0,0)}},{key:"handleDragMovement",value:function(){this.getWorldPointFromMathPlaneAtScreenXY(w,M.z,S),C.subVectors(M,S),this.camera.position.add(C),C.set(0,0,0)}},{key:"initiatePan",value:function(){this.state=1}},{key:"handlePanMovement",value:function(){R.set(-E.x,E.y,0),this.camera.localToWorld(R),this.camera.position.copy(R)}},{key:"initiateRotation",value:function(){this.state=2,T.copy(this.getWorldPointAtScreenXY(new c.Vector2(.5*this.view.mainLoop.gfxEngine.width,.5*this.view.mainLoop.gfxEngine.height)));var t=this.camera.position.distanceTo(T);I=Math.acos((this.camera.position.z-T.z)/t)}},{key:"handleRotation",value:function(){var t=-this.rotateSpeed*E.x/this.view.mainLoop.gfxEngine.width,e=-this.rotateSpeed*E.y/this.view.mainLoop.gfxEngine.height,r=this.camera.position.clone().sub(T);0===t&&0===e||(I+e>=this.minZenithAngle&&I+e<=this.maxZenithAngle&&0!==e&&(I+=e,R.set(0,0,1),B.setFromUnitVectors(this.camera.up,R),r.applyQuaternion(B),R.setFromMatrixColumn(this.camera.matrix,0),B.setFromAxisAngle(R,e),r.applyQuaternion(B),R.set(0,0,1),B.setFromUnitVectors(this.camera.up,R).invert(),r.applyQuaternion(B)),0!==t&&(R.set(0,0,1),B.setFromAxisAngle(R,t),r.applyQuaternion(B))),this.camera.position.copy(r),this.camera.lookAt(x),this.camera.position.add(T),this.camera.updateMatrixWorld()}},{key:"initiateZoom",value:function(t){var e=-t.deltaY;v.copy(this.getWorldPointAtScreenXY(w));var r=new c.Vector3;if(e>0||e<0&&this.maxAltitude>this.camera.position.z){var n=e>0?this.zoomInFactor:this.zoomOutFactor,i=this.view.getPixelsToMeters()/n;if(this.maxResolution>i||i>this.minResolution)return;this.camera.isOrthographicCamera?(this.state=4,this.view.notifyChange(this.camera),G=this.camera.zoom,Z=G*n,v.z=this.camera.position.z,O=0,F=this.zoomTravelTime,this.updateMouseCursorType()):(r.lerpVectors(this.camera.position,v,1-1/n),this.initiateTravel(r,this.zoomTravelTime,null,!1))}}},{key:"handleZoomOrtho",value:function(t){O=Math.min(O+t/1e3/F,1);var e=G+O*(Z-G);this.camera.zoom!==e&&(this.camera.zoom=e,this.camera.updateProjectionMatrix(),this.view.viewToNormalizedCoords(w,R),R.z=0,R.unproject(this.camera),this.camera.position.x+=v.x-R.x,this.camera.position.y+=v.y-R.y,this.camera.updateMatrixWorld(!0)),this.testAnimationEnd()}},{key:"initiateSmartTravel",value:function(){var t=this.getWorldPointAtScreenXY(w),e=new c.Vector3;e.copy(t).sub(this.camera.position),e.z=0,e.normalize();var r=this.camera.position.distanceTo(t),n=c.MathUtils.lerp(this.smartTravelHeightMin,this.smartTravelHeightMax,Math.min(r/5e3,1)),i=new c.Vector3;i.copy(t),this.enableRotation&&i.add(e.multiplyScalar(2*-n)),i.z=t.z+n,this.camera.isOrthographicCamera&&(G=this.camera.zoom,Z=G*(1+Math.min(r/5e3,1)),i.z=this.camera.position.z),this.initiateTravel(i,"auto",t,!0)}},{key:"initiateTravel",value:function(t,e,r,n){if(this.state=3,this.view.notifyChange(this.camera),O=0,this.updateMouseCursorType(),N=this.enableRotation&&r&&(r.isQuaternion||r.isVector3),z=n,P.copy(this.camera.position),D.copy(this.camera.quaternion),N&&(r.isQuaternion?U.copy(r):r.isVector3&&(t===r?(this.camera.lookAt(r),U.copy(this.camera.quaternion),this.camera.quaternion.copy(D)):(this.camera.position.copy(t),this.camera.lookAt(r),U.copy(this.camera.quaternion),this.camera.quaternion.copy(D),this.camera.position.copy(P)))),L.copy(t),this.instantTravel)F=0;else if("auto"===e){var i=Math.min(1,t.distanceTo(this.camera.position)/this.autoTravelTimeDist);if(F=c.MathUtils.lerp(this.autoTravelTimeMin,this.autoTravelTimeMax,i),N){var a=.5-.5*U.normalize().dot(this.camera.quaternion.normalize());F*=1+2*a,F=Math.min(F,this.autoTravelTimeMax)}}else F=e}},{key:"handleTravel",value:function(t){O=Math.min(O+t/1e3/F,1);var e=z?this.smooth(O):O;this.camera.position.lerpVectors(P,L,e);var r=G+e*(Z-G);this.camera.isOrthographicCamera&&this.camera.zoom!==r&&(this.camera.zoom=r,this.camera.updateProjectionMatrix()),!0===N&&this.camera.quaternion.slerpQuaternions(D,U,e),this.testAnimationEnd()}},{key:"testAnimationEnd",value:function(){1===O&&(this.state=y,this.updateMouseCursorType())}},{key:"goToTopView",value:function(){var t=new c.Vector3,e=new c.Quaternion;t.copy(this.getWorldPointAtScreenXY(new c.Vector2(.5*this.view.mainLoop.gfxEngine.width,.5*this.view.mainLoop.gfxEngine.height))),t.z+=Math.min(this.maxAltitude,this.camera.position.distanceTo(t)),e.setFromAxisAngle(new c.Vector3(1,0,0),0),this.initiateTravel(t,"auto",e,!0)}},{key:"goToStartView",value:function(){this.camera.isOrthographicCamera&&(G=this.camera.zoom,Z=g),this.initiateTravel(m,"auto",A,!0)}},{key:"getWorldPointFromMathPlaneAtScreenXY",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new c.Vector3;return k.copy(this.view.viewToNormalizedCoords(t)),V.setFromCamera(k,this.camera),Q.constant=e,V.ray.intersectPlane(Q,r),r}},{key:"getWorldPointAtScreenXY",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.Vector3;return this.view.getPickingPositionFromDepth(t,e)||this.getWorldPointFromMathPlaneAtScreenXY(t,this.groundLevel,e),e}},{key:"addInputListeners",value:function(){this.view.domElement.addEventListener("keydown",this._handlerOnKeyDown,!1),this.view.domElement.addEventListener("mousedown",this._handlerOnMouseDown,!1),this.view.domElement.addEventListener("mouseup",this._handlerOnMouseUp,!1),this.view.domElement.addEventListener("mouseleave",this._handlerOnMouseUp,!1),this.view.domElement.addEventListener("mousemove",this._handlerOnMouseMove,!1),this.view.domElement.addEventListener("wheel",this._handlerOnMouseWheel,!1),this.view.domElement.addEventListener("contextmenu",this._handlerContextMenu,!1)}},{key:"removeInputListeners",value:function(){this.view.domElement.removeEventListener("keydown",this._handlerOnKeyDown,!0),this.view.domElement.removeEventListener("mousedown",this._handlerOnMouseDown,!1),this.view.domElement.removeEventListener("mouseup",this._handlerOnMouseUp,!1),this.view.domElement.removeEventListener("mouseleave",this._handlerOnMouseUp,!1),this.view.domElement.removeEventListener("mousemove",this._handlerOnMouseMove,!1),this.view.domElement.removeEventListener("wheel",this._handlerOnMouseWheel,!1),this.view.domElement.removeEventListener("contextmenu",this._handlerContextMenu,!1)}},{key:"updateMouseCursorType",value:function(){switch(this.state){case y:this.view.domElement.style.cursor=this.cursor.default;break;case 0:this.view.domElement.style.cursor=this.cursor.drag;break;case 1:this.view.domElement.style.cursor=this.cursor.pan;break;case 3:this.view.domElement.style.cursor=this.cursor.travel;break;case 4:this.view.domElement.style.cursor=this.cursor.ortho_zoom;break;case 2:this.view.domElement.style.cursor=this.cursor.rotate}}},{key:"updateMousePositionAndDelta",value:function(t){this.view.eventToViewCoords(t,w),E.copy(w).sub(_),_.copy(w)}},{key:"setCursor",value:function(t,e){this.cursor[t]=e,this.updateMouseCursorType()}},{key:"onMouseDown",value:function(t){if(this.enabled&&(t.preventDefault(),this.view.domElement.focus(),y===this.state)){if(h=t.button,this.updateMousePositionAndDelta(t),f===t.button)if(t.ctrlKey){if(!this.enableRotation)return;this.initiateRotation()}else this.initiateDrag();else if(d===t.button){if(!this.enableSmartTravel)return;this.initiateSmartTravel()}else if(p===t.button){if(!this.enablePan)return;this.initiatePan()}this.updateMouseCursorType()}}},{key:"onMouseUp",value:function(t){t.preventDefault(),3!==this.state&&4!==this.state&&h===t.button&&(this.state=y),this.updateMouseCursorType()}},{key:"onMouseMove",value:function(t){this.enabled&&(t.preventDefault(),this.updateMousePositionAndDelta(t),y!==this.state&&this.view.notifyChange())}},{key:"onKeyDown",value:function(t){if(y===this.state&&this.enabled)switch(t.keyCode){case 84:this.camera.isOrthographicCamera||this.goToTopView();break;case 89:this.goToStartView();break;case 32:this.enableSmartTravel&&this.initiateSmartTravel(t)}}},{key:"onMouseWheel",value:function(t){this.enabled&&(t.preventDefault(),t.stopPropagation(),y===this.state&&this.initiateZoom(t))}},{key:"onContextMenu",value:function(t){t.preventDefault()}},{key:"smooth",value:function(t){return Math.pow(Math.pow(t,2)*(3-2*t),1.2)}}]),X}(c.EventDispatcher)},68932:(t,e,r)=>{"use strict";r.d(e,{Z:()=>p});var n=r(71002),i=r(15671),a=r(43144),o=r(30633),s=r(99477),l={BYTE:1,UNSIGNED_BYTE:1,SHORT:2,UNSIGNED_SHORT:2,INT:4,UNSIGNED_INT:4,FLOAT:4,DOUBLE:8},c={BYTE:Int8Array,UNSIGNED_BYTE:Uint8Array,SHORT:Int16Array,UNSIGNED_SHORT:Uint16Array,INT:Int32Array,UNSIGNED_INT:Uint32Array,FLOAT:Float32Array,DOUBLE:Float64Array},u={SCALAR:1,VEC2:2,VEC3:3,VEC4:4},h={VEC2:s.Vector2,VEC3:s.Vector3,VEC4:s.Vector4};const f=function(t,e,r,n,i){if(!t)throw new Error("Buffer is mandatory to parse binary property.");if(null==e)throw new Error("batchLength is mandatory to parse binary property.");if(null==r)throw new Error("byteOffset is mandatory to parse binary property.");if(!l[n])throw new Error("Uknown component type: ".concat(n,". Cannot access binary property."));if(!u[i])throw new Error("Uknown type: ".concat(i,". Cannot access binary property."));var a=u[i],o=new c[n](t,r,e*a);if("SCALAR"===i)return Array.from(o);for(var s=[],f=0;f<=o.length-a;f+=a){var d=new h[i];d.fromArray(o,f),s.push(d)}return s};var d=r(24147);const p=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ArrayBuffer,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,l=arguments.length>4?arguments[4]:void 0;(0,i.Z)(this,t),4!==arguments.length||"object"!==(0,n.Z)(s)||Array.isArray(s)||null===s||console.warn("You most likely used a deprecated constructor of C3DTBatchTable."),r+a!==e.byteLength&&console.error("3DTiles batch table json length and binary length are not consistent with total buffer length. The batch table may be wrong."),this.type=d.h.batchtable,this.batchLength=s;var c=e.slice(0,r),u=o.Z.decode(new Uint8Array(c)),h=""===u?null:JSON.parse(u);if(a>0){var p=e.slice(r,r+a);for(var m in h)if(Object.prototype.hasOwnProperty.call(h,m)){var A=h[m];Array.isArray(A)||(void 0!==(null==A?void 0:A.byteOffset)&&void 0!==(null==A?void 0:A.componentType)&&void 0!==(null==A?void 0:A.type)?h[m]=f(p,this.batchLength,A.byteOffset,A.componentType,A.type):console.error("Invalid 3D Tiles batch table property that is neither a JSON array nor a valid accessor to a binary body"))}}h&&h.extensions&&(this.extensions=l.parseExtensions(h.extensions,this.type),delete h.extensions),this.content=h}return(0,a.Z)(t,[{key:"getInfoById",value:function(t){if(t<0&&t{"use strict";r.d(e,{Z:()=>v});var n=r(15671),i=r(43144),a=r(99477),o=r(16828),s=r(60145),l=r(24147),c=new o.Z,u=new a.Vector3,h=new a.Vector3,f=new s.Z("EPSG:4326"),d=new a.Vector3,p=new s.Z("EPSG:4326"),m=new a.Vector3,A=new a.Vector3,g=new a.Vector3;const v=function(){function t(e,r,i){if((0,n.Z)(this,t),this.type=l.h.boundingVolume,e.region)this.initialVolumeType=l.D.region,this.volume=function(t,e){var r=t[2],n=t[0],i=t[1],o=t[3],s=t[4],l=t[5],u=a.MathUtils.radToDeg(r),h=a.MathUtils.radToDeg(n),g=a.MathUtils.radToDeg(i),v=a.MathUtils.radToDeg(o);p.setFromValues(h,v,s),c.cartographicToCartesian(p,m),f.setFromValues(u,g,l),c.cartographicToCartesian(f,d);var y=new a.Vector3;y.lerpVectors(m,d,.5);var b=A.subVectors(m,d).length()/2,x=new a.Sphere(y,b);return x.applyMatrix4(e),x}(e.region,r);else if(e.box)this.initialVolumeType=l.D.box,this.volume=function(t){h.set(t[0],t[1],t[2]),u.set(t[3],t[7],t[11]).multiplyScalar(2);var e=new a.Box3;return e.setFromCenterAndSize(h,u),e}(e.box);else{if(!e.sphere)throw new Error("Unknown bounding volume type: ".concat(e,". 3D Tiles nodes must have a bounding volume of type\n region, box or sphere."));this.initialVolumeType=l.D.sphere,this.volume=(o=e.sphere,(s=new a.Vector3).set(o[0],o[1],o[2]),new a.Sphere(s,o[3]))}var o,s;e.extensions&&(this.extensions=i.parseExtensions(e.extensions,this.type))}return(0,i.Z)(t,[{key:"boundingVolumeCulling",value:function(t,e){if(this.initialVolumeType===l.D.box)return!t.isBox3Visible(this.volume,e);if(this.initialVolumeType===l.D.sphere||this.initialVolumeType===l.D.region)return!t.isSphereVisible(this.volume,e);throw new Error("Unknown bounding volume type.")}},{key:"viewerRequestVolumeCulling",value:function(t,e){return this.initialVolumeType===l.D.region?(console.warn("Region viewerRequestVolume not yet supported"),!0):this.initialVolumeType===l.D.box?(console.warn("Bounding box viewerRequestVolume not yet supported"),!0):this.initialVolumeType===l.D.sphere&&(g.copy(this.volume.center),g.applyMatrix4(e),!(t.camera3D.position.distanceTo(g)<=this.volume.radius))}}]),t}()},83500:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var n=r(15671),i=r(43144);const a=function(){function t(){(0,n.Z)(this,t)}return(0,i.Z)(t,[{key:"registerExtension",value:function(t,e){this[t]=e}},{key:"getExtension",value:function(t,e){if(this[t]&&this[t][e])return this[t][e];console.error("".concat("No extension manager registered for extension "," ").concat(t," and for class ").concat(e))}},{key:"isExtensionRegistered",value:function(t){return this[t]}},{key:"parseExtensions",value:function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=new(this.getExtension(n,e))(t[n]));return r}}]),t}()},97498:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var n=r(15671),i=r(43144),a=r(86033),o=r(13092),s=r(99477);var l=new WeakMap;const c=function(){function t(e,r,i,a,s,c){var u,h,f;(0,n.Z)(this,t),f={writable:!0,value:void 0},function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(u=this,h=l),h.set(u,f),c||console.error("BREAKING CHANGE: C3DTFeature constructor changed from (tileId, batchId, groups, info, userData) to (tileId, batchId, groups, info, userData, object3d)"),this.object3d=c,this.batchId=r,this.groups=i,this.userData=s,(0,o.Z)(this,l,a),this.tileId=e}return(0,i.Z)(t,[{key:"computeWorldBox3",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new s.Box3;return e.max.x=-1/0,e.max.y=-1/0,e.max.z=-1/0,e.min.x=1/0,e.min.y=1/0,e.min.z=1/0,this.groups.forEach((function(r){for(var n=3*r.start,i=3*(r.start+r.count),a=n;a{"use strict";r.d(e,{D:()=>i,h:()=>n});var n={tileset:"tileset",batchtable:"batchtable",boundingVolume:"boundingVolume"},i={region:"region",box:"box",sphere:"sphere"}},45571:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var n=r(15671),i=r(43144),a=r(99477),o=r(25655),s=r(24147);function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(t.children);try{for(s.s();!(i=s.n()).done;){var u=i.value;this.parseTiles(u,e,t,n)}}catch(t){s.e(t)}finally{s.f()}}}},{key:"extendTileset",value:function(t,e,r,n){this.parseTiles(t.root,r,this.tiles[e],n),this.tiles[e].children=[t.root],this.tiles[e].isTileset=!0}}]),t}()},86896:(t,e,r)=>{"use strict";r.d(e,{Dx:()=>s,S_:()=>i,_F:()=>a,ie:()=>o});var n=r(27240),i=function(t){return t.fx&&(console.warn("ColorLayer fx is deprecated, use ColorLayer.effect_type and ColorLayer.effect_parameter instead."),t.fx>2?(t.effect_parameter=t.fx,t.effect_type=n.pO.removeLightColor):t.fx>0&&(t.effect_parameter=t.fx,t.effect_type=n.pO.removeWhiteColor)),t},a=function(t){if(t.crsOut||t.crsIn){console.warn("Parsing options with crsIn and crsOut are deprecated, use { in, out } structure.");var e={in:{},out:{}};return e.in.crs=t.crsIn,e.in.isInverted=t.isInverted,e.in.styles=t.styles,e.in.layers=t.layers,e.in.filter=t.filter,e.out.crs=t.crsOut,e.out.mergeFeatures=t.mergeFeatures,t.withAltitude&&t.withNormal?(console.warn("Parsing options withAltitude and withNormal is deprecated, use out.structure: 2d or 3d."),e.out.structure="3d"):e.out.structure="2d",e.out.filteringExtent=t.filteringExtent,e.out.style=t.style,void 0!==t.crsOut.overrideAltitudeInToZero&&console.error("Parsing options out.overrideAltitudeInToZero is removed, use Style.xxx.base_altitude instead"),e.out.filter=t.filter,e}return t.out&&(void 0===t.out.withAltitude&&void 0===t.out.withNormal||(console.warn("Parsing options out.withAltitude and out.withNormal is deprecated, use out.structure: 2d or 3d."),t.out.withAltitude&&t.out.withNormal?t.out.structure="3d":t.out.structure="2d"),void 0!==t.out.overrideAltitudeInToZero&&console.error("Parsing options out.overrideAltitudeInToZero is removed, use Style.xxx.base_altitude instead")),t},o=function(t){t.color&&console.error("Color convert option is removed, use Style.xxx.color"),t.extrude&&console.error("extrude convert option is removed, use Style.fill.extrusion_height instead"),t.altitude&&console.error("altitude convert option is removed, use Style.xxx.base_altitude instead")},s=function(t){!1===t.isWebGL2&&console.warn("WebGL1 support (isWebGL2=false) is deprecated and will be removed in iTowns 2.43. This follows its deprecation by three.js. If you are impacted by this change, please discuss in the following issue: https://github.com/iTowns/itowns/issues/2152.")}},94596:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>T,iL:()=>E,t1:()=>U,tg:()=>w});var n=r(97326),i=r(88301),a=r(79340),o=r(82963),s=r(61120),l=r(86033),c=r(13092),u=r(43144),h=r(15671),f=r(99477),d=r(99128),p=r(60145),m=r(82150),A=r(48891);function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r-1?this.indices[r].offset+this.indices[r].count:e.vertices.length/this.size;this.indices.push({offset:i,count:t,extent:n}),(0,c.Z)(this,_,n),function(t,e){t.vertices.length+=e*t.size,t.normals&&(t.normals.length=t.vertices.length)}(e,t)}},{key:"closeSubGeometry",value:function(t,e){var r=this.indices.length-1,n=r>-1?this.indices[r].offset+this.indices[r].count:e.vertices.length/this.size-t;this.indices.push({offset:n,count:t,extent:(0,l.Z)(this,_)}),this.extent&&(this.extent.union((0,l.Z)(this,_)),(0,c.Z)(this,_,y(this.extent.crs)))}},{key:"getLastSubGeometry",value:function(){var t=this.indices.length-1;return this.indices[t]}},{key:"pushCoordinates",value:function(t,e){if(t.isCoordinates)return console.warn("Deprecated: change in arguments order, use pushCoordinates(feature, coordIn) instead"),void this.pushCoordinates(e,t);e.as(t.crs,x),t.transformToLocalSystem(x),b(t,x),(0,l.Z)(this,_)&&(0,l.Z)(this,_).expandByCoordinates(t.useCrsOut?x:e)}},{key:"pushCoordinatesValues",value:function(t,e,r){if((arguments.length<=3?0:arguments.length-3)>0)return console.warn("Deprecated: change in arguments, use pushCoordinatesValues(feature, {x: long, y: lat, normal}, coordProj) instead"),void this.pushCoordinatesValues(t,{x:e,y:r,normal:arguments.length<=3?void 0:arguments[3]},arguments.length<=4?void 0:arguments[4]);b(t,e),(0,l.Z)(this,_)&&(0,l.Z)(this,_).expandByValuesCoordinates(e.x,e.y)}},{key:"updateExtent",value:function(){if(this.extent){var t=this.indices[this.indices.length-1];t&&this.extent.union(t.extent)}}}]),t}();function M(t,e){this.vertices[this._pos++]=t,this.vertices[this._pos++]=e}function S(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.vertices[this._pos++]=t,this.vertices[this._pos++]=e,this.vertices[this._pos++]=r}var C=function(){function t(e,r){if((0,h.Z)(this,t),!Object.keys(w).find((function(t){return w[t]===e})))throw new Error("Unsupported Feature type: ".concat(e));this.type=e,this.geometries=[],this.vertices=[],this.crs=r.crs,this.size=r.size,this.normals="EPSG:4978"==r.crs?[]:void 0,this.hasRawElevationData=!1,this.transformToLocalSystem=r.transformToLocalSystem.bind(r),r.extent&&(this.extent=y(r.extent.crs),this.useCrsOut=this.extent.crs==this.crs),this._pos=0,this._pushValues=(3===this.size?S:M).bind(this),this.style=A.ZP.setFromProperties}return(0,u.Z)(t,[{key:"bindNewGeometry",value:function(){var t=new E(this);return this.geometries.push(t),t}},{key:"updateExtent",value:function(t){this.extent&&this.extent.union(t.extent)}},{key:"geometryCount",get:function(){return this.geometries.length}}]),t}();const T=C;var I=function(){},R=function(t,e){return t.geodesicNormal.applyNormalMatrix(e.normalMatrixInverse),t.applyMatrix4(e.matrixWorldInverse)},B=function(t,e){return t.applyMatrix4(e.matrixWorldInverse)},k=new f.Vector3(0,0,1),L=new f.Quaternion,P=new WeakMap,D=new WeakMap,U=function(t){(0,a.Z)(A,t);var e,r,d=(e=A,r=function(){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(t){return!1}}(),function(){var t,n=(0,s.Z)(e);if(r){var i=(0,s.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,o.Z)(this,t)});function A(t){var e,r;return(0,h.Z)(this,A),r=d.call(this),v((0,n.Z)(r),P,{writable:!0,value:B}),v((0,n.Z)(r),D,{writable:!0,value:I}),r.isFeatureCollection=!0,r.crs=m.Z.formatToEPSG(t.accurate||null===(e=t.source)||void 0===e||!e.crs?t.crs:t.source.crs),r.features=[],r.mergeFeatures=void 0===t.mergeFeatures||t.mergeFeatures,r.size="3d"==t.structure?3:2,r.filterExtent=t.filterExtent,r.style=t.style,r.isInverted=!1,r.matrixWorldInverse=new f.Matrix4,r.center=new p.Z("EPSG:4326",0,0),2==r.size?(r.extent=!1===t.buildExtent?void 0:y(t.forcedExtentCrs||r.crs),(0,c.Z)((0,n.Z)(r),D,(function(t){t.as(r.crs,r.center),r.position.copy(t),r.updateMatrixWorld(),(0,c.Z)((0,n.Z)(r),D,I)}))):(r.extent=t.buildExtent?y(t.forcedExtentCrs||r.crs):void 0,(0,c.Z)((0,n.Z)(r),D,(function(t){t.as("EPSG:4326",r.center),"EPSG:4978"==r.crs&&(r.quaternion.setFromUnitVectors(k,t.geodesicNormal),L.setFromAxisAngle(k,f.MathUtils.degToRad(90+r.center.longitude)),r.quaternion.multiply(L)),r.position.copy(t),r.updateMatrixWorld(),r.normalMatrix.getNormalMatrix(r.matrix),r.normalMatrixInverse=(new f.Matrix3).copy(r.normalMatrix).invert(),(0,c.Z)((0,n.Z)(r),D,I)})),(0,c.Z)((0,n.Z)(r),P,R)),r}return(0,u.Z)(A,[{key:"transformToLocalSystem",value:function(t){return(0,l.Z)(this,D).call(this,t),(0,l.Z)(this,P).call(this,t,this)}},{key:"updateExtent",value:function(t){if(this.extent){var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return g(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(t?[t]:this.features.map((function(t){return t.extent})));try{for(r.s();!(e=r.n()).done;){var n=e.value;this.extent.union(n)}}catch(t){r.e(t)}finally{r.f()}}}},{key:"updateMatrixWorld",value:function(t){(0,i.Z)((0,s.Z)(A.prototype),"updateMatrixWorld",this).call(this,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}},{key:"removeEmptyFeature",value:function(){this.features=this.features.filter((function(t){return t.geometries.length}))}},{key:"pushFeature",value:function(t){this.features.push(t),this.updateExtent(t.extent)}},{key:"requestFeature",value:function(t,e){var r=this.features.find(e);if(r&&this.mergeFeatures)return r;var n=new C(t,this);return this.features.push(n),n}},{key:"requestFeatureByType",value:function(t){return this.requestFeature(t,(function(e){return e.type===t}))}},{key:"requestFeatureById",value:function(t,e){return this.requestFeature(e,(function(e){return e.id===t}))}},{key:"newFeatureByReference",value:function(t){var e=new C(t.type,this);return e.extent=t.extent,e.geometries=t.geometries,e.normals=t.normals,e.size=t.size,e.vertices=t.vertices,e._pos=t._pos,this.features.push(e),e}}]),A}(f.Object3D)},60145:(t,e,r)=>{"use strict";r.d(e,{Z:()=>A});var n=r(15671),i=r(43144),a=r(99477),o=r(24472),s=r(82150),l=r(16828);o.default.defs("EPSG:4978","+proj=geocent +datum=WGS84 +units=m +no_defs");var c,u,h=new l.Z,f={},d=new a.Vector3,p=new a.Vector3,m=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;(0,n.Z)(this,t),this.isCoordinates=!0,s.Z.isValid(e),this.crs=e,this.x=0,this.y=0,this.z=0,this._normal=new a.Vector3,r.length>0?this.setFromArray(r):r.isVector3||r.isCoordinates?this.setFromVector3(r):this.setFromValues(r,i,o),this._normalNeedsUpdate=!0}return(0,i.Z)(t,[{key:"setCrs",value:function(t){s.Z.isValid(t),this.crs=t}},{key:"setFromValues",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.x=null==t?0:t,this.y=null==e?0:e,this.z=null==r?0:r,this._normalNeedsUpdate=!0,this}},{key:"setFromArray",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.setFromValues(t[e],t[e+1],t[e+2])}},{key:"setFromVector3",value:function(t){return this.setFromValues(t.x,t.y,t.z)}},{key:"clone",value:function(){return new t(this.crs,this)}},{key:"copy",value:function(t){return this.crs=t.crs,this.setFromVector3(t)}},{key:"longitude",get:function(){return this.x}},{key:"latitude",get:function(){return this.y}},{key:"altitude",get:function(){return this.z},set:function(t){this.z=t}},{key:"geodesicNormal",get:function(){return this._normalNeedsUpdate&&(this._normalNeedsUpdate=!1,s.Z.is4326(this.crs)?h.geodeticSurfaceNormalCartographic(this,this._normal):"EPSG:4978"==this.crs?h.geodeticSurfaceNormal(this,this._normal):this._normal.set(0,0,1)),this._normal}},{key:"toVector3",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:new a.Vector3).copy(this)}},{key:"toArray",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return a.Vector3.prototype.toArray.call(this,t,e)}},{key:"planarDistanceTo",value:function(t){return this.toVector3(d).setZ(0),t.toVector3(p).setZ(0),d.distanceTo(p)}},{key:"geodeticDistanceTo",value:function(t){return this.as("EPSG:4326",c),t.as("EPSG:4326",u),h.geodesicDistance(c,u)}},{key:"spatialEuclideanDistanceTo",value:function(t){return this.as("EPSG:4978",c).toVector3(d),t.as("EPSG:4978",u).toVector3(p),d.distanceTo(p)}},{key:"applyMatrix4",value:function(t){return a.Vector3.prototype.applyMatrix4.call(this,t)}},{key:"as",value:function(e){var r,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new t(e);return this.crs==e?i.copy(this):(s.Z.is4326(this.crs)&&"EPSG:3857"==e&&(this.y=a.MathUtils.clamp(this.y,-89.999999,89.999999)),i.setFromArray((r=this.crs,n=e,f[r]||(f[r]={}),f[r][n]||(f[r][n]=(0,o.default)(r,n)),f[r][n]).forward([this.x,this.y,this.z]))),i.crs=e,i}}]),t}();c=new m("EPSG:4326",0,0,0),u=new m("EPSG:4326",0,0,0);const A=m},82150:(t,e,r)=>{"use strict";r.d(e,{Z:()=>d});var n=r(24472);function i(t){return"string"==typeof t||t instanceof String}function a(t){if(!i(t))throw new Error("Crs parameter value must be a string: '".concat(t,"'"))}function o(t){return i(t)&&t.startsWith("TMS")}function s(t){return i(t)&&t.startsWith("EPSG")}function l(t){return a(t),s(t)?t:"EPSG:".concat(t.match(/\d+/)[0])}n.default.defs("EPSG:4978","+proj=geocent +datum=WGS84 +units=m +no_defs");var c={DEGREE:1,METER:2};function u(t){return"EPSG:4326"===t}function h(t){switch(a(t),t){case"EPSG:4326":return c.DEGREE;case"EPSG:4978":return c.METER;default:var e=n.default.defs(l(t));if(!e)return;return"degrees"===(r=e.units)?c.DEGREE:"m"===r?c.METER:void 0}var r}function f(t){a(t);var e=h(t);if(void 0===e)throw new Error("No unit found for crs: '".concat(t,"'"));return e}const d={UNIT:c,isValid:function(t){f(t)},isGeographic:function(t){return f(t)==c.DEGREE},isMetricUnit:function(t){return h(t)==c.METER},toUnit:h,is4326:u,isGeocentric:function(t){a(t);var e=n.default.defs(t);return!!e&&"geocent"==e.projName},reasonnableEpsilon:function(t){return u(t)?.01:.001},formatToEPSG:l,formatToTms:function(t){return a(t),o(t)?t:"TMS:".concat(t.match(/\d+/)[0])},isTms:o,isEpsg:s,tms_3857:"TMS:3857",tms_4326:"TMS:4326",defs:function(t,e){return n.default.defs(t,e)}}},99128:(t,e,r)=>{"use strict";r.d(e,{Mh:()=>C,ZP:()=>L,dS:()=>T});var n,i,a=r(15671),o=r(43144),s=r(99477),l=r(60145),c=r(82150),u=new s.Vector2,h=new s.Vector2,f=new s.Vector2,d=new s.Box3,p=new s.Vector2,m=new s.Vector2,A=new s.Vector2(2,2),g={row:0,col:0,invDiff:0},v=new l.Z("EPSG:4326",0,0,0),y=new l.Z("EPSG:4326",0,0,0),b=new l.Z("EPSG:4326",0,0,0),x=new s.Vector3,w=new s.Vector3;function _(t,e){var r=t.zoom-e,n=Math.pow(2,r);return g.invDiff=1/n,g.row=(t.row-t.row%n)*g.invDiff,g.col=(t.col-t.col%n)*g.invDiff,g}for(var E=new Array(8),M=E.length-1;M>=0;M--)E[M]=new l.Z("EPSG:4326",0,0,0,0);var S=new l.Z("EPSG:4326",0,0),C=new Map,T=new Map;function I(t){var e=c.Z.formatToEPSG(t),r=C.get(e),n=r.planarDimensions(h),i=c.Z.formatToTms(t);return{epsg:e,globalExtent:r,globalDimension:n,sTs:T.get(i)||T.get("default"),isInverted:!i.includes(":NI")}}function R(t,e){var r=T.get(c.Z.formatToTms(t))||T.get("default"),n=Math.pow(2,e);return f.set(n,n).multiply(r),f}var B=function(){function t(e,r,n,i,o){if((0,a.Z)(this,t),c.Z.isGeocentric(e))throw new Error("".concat(e," is a geocentric projection, it doesn't make sense with a geographical extent"));this.isExtent=!0,this.crs=e,this.zoom=0,c.Z.isTms(this.crs)?(this.row=0,this.col=0):(this.west=0,this.east=0,this.south=0,this.north=0),this.set(r,n,i,o)}return(0,o.Z)(t,[{key:"clone",value:function(){return c.Z.isTms(this.crs)?new t(this.crs,this.zoom,this.row,this.col):new t(this.crs,this.west,this.east,this.south,this.north)}},{key:"tiledCovering",value:function(e){if("EPSG:4326"==this.crs&&e==c.Z.tms_3857){var r=[],a=n.copy(this).as(c.Z.formatToEPSG(e),i),o=I(c.Z.formatToEPSG(e)),s=o.globalExtent,l=o.globalDimension,u=o.sTs;a.clampByExtent(s),a.planarDimensions(m);var h=this.zoom+1||Math.floor(Math.log2(Math.round(l.x/(m.x*u.x)))),f=R(e,h),d=a.center(S);p.x=d.x-s.west,p.y=s.north-a.north,p.divide(l).multiply(f).floor();for(var A=Math.ceil((s.north-a.south)/l.x*f.y)-1;A>=p.y;A--)r.push(new t(e,h,A,p.x));return r}var g=new t(e,0,0,0),v=I(this.crs),y=v.globalExtent,b=v.globalDimension,x=v.sTs,w=v.isInverted,_=this.center(S);this.planarDimensions(m);var E=Math.floor(Math.log2(Math.round(b.x/(m.x*x.x)))),M=R(e,E);return p.x=_.x-y.west,p.y=w?y.north-_.y:_.y-y.south,p.divide(b).multiply(M).floor(),g.set(E,p.y,p.x),[g]}},{key:"as",value:function(e,r){if(c.Z.isValid(e),r=r||new t("EPSG:4326",[0,0,0,0]),c.Z.isTms(this.crs)){var n=I(this.crs),i=n.epsg,a=n.globalExtent,o=n.globalDimension,s=R(this.crs,this.zoom);return m.set(1,1).divide(s).multiply(o),r.west=a.west+(o.x-m.x*(s.x-this.col)),r.east=r.west+m.x,r.south=a.south+m.y*(s.y-this.row-1),r.north=r.south+m.y,r.crs=i,r.zoom=this.zoom,e==i?r:r.as(e,r)}if(c.Z.isEpsg(e)){if(this.crs!=e){var l=this.center(S);E[0].setFromValues(this.west,this.north),E[1].setFromValues(l.x,this.north),E[2].setFromValues(this.east,this.north),E[3].setFromValues(this.east,l.y),E[4].setFromValues(this.east,this.south),E[5].setFromValues(l.x,this.south),E[6].setFromValues(this.west,this.south),E[7].setFromValues(this.west,l.y),r.set(1/0,-1/0,1/0,-1/0);for(var u=0;u0&&void 0!==arguments[0]?arguments[0]:new l.Z(this.crs);if(c.Z.isTms(this.crs))throw new Error("Invalid operation for WMTS bbox");return this.planarDimensions(u),t.crs=this.crs,t.setFromValues(this.west+.5*u.x,this.south+.5*u.y),t}},{key:"dimensions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new s.Vector2;return console.warn("Extent.dimensions is deprecated, use planarDimensions, geodeticDimensions or spatialEuclideanDimensions"),t.x=Math.abs(this.east-this.west),t.y=Math.abs(this.north-this.south),t}},{key:"planarDimensions",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:new s.Vector2).set(Math.abs(this.east-this.west),Math.abs(this.north-this.south))}},{key:"geodeticDimensions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new s.Vector2;return v.crs=this.crs,y.crs=this.crs,b.crs=this.crs,v.setFromValues(this.west,this.north,0),y.setFromValues(this.west,this.south,0),b.setFromValues(this.east,this.north,0),t.set(v.geodeticDistanceTo(b),v.geodeticDistanceTo(y))}},{key:"spatialEuclideanDimensions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new s.Vector2;return v.crs=this.crs,y.crs=this.crs,b.crs=this.crs,v.setFromValues(this.west,this.north,0),y.setFromValues(this.west,this.south,0),b.setFromValues(this.east,this.north,0),t.set(v.spatialEuclideanDistanceTo(b),v.spatialEuclideanDistanceTo(y))}},{key:"isPointInside",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.crs==t.crs?S.copy(t):t.as(this.crs,S),S.x<=this.east+e&&S.x>=this.west-e&&S.y<=this.north+e&&S.y>=this.south-e}},{key:"isInside",value:function(t,e){return c.Z.isTms(this.crs)?this.zoom==t.zoom?this.row==t.row&&this.col==t.col:!(this.zoom1&&void 0!==arguments[1]?arguments[1]:new s.Vector4;if(this.crs!=t.crs)throw new Error("unsupported mix");if(c.Z.isTms(this.crs))return _(this,t.zoom),e.set(this.col*g.invDiff-g.col,this.row*g.invDiff-g.row,g.invDiff,g.invDiff);t.planarDimensions(u),this.planarDimensions(h);var r=(this.west-t.west)/u.x,n=(t.north-this.north)/u.y,i=h.x/u.x,a=h.y/u.y;return e.set(r,n,i,a)}},{key:"tiledExtentParent",value:function(e){return e&&ethis.east&&(this.east=r);var n=t.south;nthis.north&&(this.north=i)}}},{key:"expandByCoordinates",value:function(t){var e=t.crs==this.crs?t:t.as(this.crs,S);this.expandByValuesCoordinates(e.x,e.y)}},{key:"expandByValuesCoordinates",value:function(t,e){tthis.east&&(this.east=t),ethis.north&&(this.north=e)}},{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return c.Z.isTms(this.crs)?"".concat(this.zoom).concat(t).concat(this.row).concat(t).concat(this.col):"".concat(this.east).concat(t).concat(this.north).concat(t).concat(this.west).concat(t).concat(this.south)}},{key:"subdivision",value:function(){return this.subdivisionByScheme()}},{key:"subdivisionByScheme",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A,r=[],n=this.planarDimensions(u).divide(e),i=e.x-1;i>=0;i--)for(var a=e.y-1;a>=0;a--){var o=this.west+i*n.x,s=this.south+a*n.y;r.push(new t(this.crs,o,o+n.x,s,s+n.y))}return r}},{key:"applyMatrix4",value:function(t){if(!c.Z.isTms(this.crs)){if(x.set(this.west,this.south,0).applyMatrix4(t),w.set(this.east,this.north,0).applyMatrix4(t),this.west=x.x,this.east=w.x,this.south=x.y,this.north=w.y,this.west>this.east){var e=this.west;this.west=this.east,this.east=e}if(this.south>this.north){var r=this.south;this.south=this.north,this.north=r}return this}}},{key:"clampSouthNorth",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.south,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.north;return this.south=Math.max(this.south,t),this.north=Math.min(this.north,e),this}},{key:"clampWestEast",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.west,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.east;return this.west=Math.max(this.west,t),this.east=Math.min(this.east,e),this}},{key:"clampByExtent",value:function(t){return this.clampSouthNorth(t.south,t.north),this.clampWestEast(t.west,t.east)}}],[{key:"intersectsExtent",value:function(t,e){var r=e.crs==t.crs?e:e.as(t.crs,n);return!(t.west>=r.east||t.east<=r.west||t.south>=r.north||t.north<=r.south)}},{key:"fromBox3",value:function(e,r){return c.Z.isGeocentric(e)&&(e="EPSG:4326",r=d.copy(r),y.crs=e,y.setFromVector3(r.min).as(e,y).toVector3(r.min),b.crs=e,b.setFromVector3(r.max).as(e,b).toVector3(r.max)),new t(e,{west:r.min.x,east:r.max.x,south:r.min.y,north:r.max.y})}}]),t}();n=new B("EPSG:4326",[0,0,0,0]),i=new B("EPSG:4326",[0,0,0,0]),C.set("EPSG:4326",new B("EPSG:4326",-180,180,-90,90));var k=C.get("EPSG:4326").as("EPSG:3857");k.clampSouthNorth(k.west,k.east),C.set("EPSG:3857",k),T.set("default",new s.Vector2(1,1)),T.set(c.Z.tms_3857,T.get("default")),T.set(c.Z.tms_4326,new s.Vector2(2,1));const L=B},67503:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var n=r(15671),i=r(43144),a=r(99477),o=r(60145),s=r(82150),l=new o.Z("EPSG:4326"),c=new a.Vector2;const u=function(){function t(e,r,i){(0,n.Z)(this,t),s.Z.isGeographic(e.crs),this.extent=e,this.step=new a.Vector2(r.x,r.y||r.x),this.dimensions=this.extent.planarDimensions(),this.dataSize=(new a.Vector2).addVectors(this.step,this.dimensions).divide(this.step).round(),this.getData=i}return(0,i.Z)(t,[{key:"getHeightAtCoordinates",value:function(t){return t.as(this.extent.crs,l),c.set((this.dataSize.x-1)*(l.x-this.extent.west)/this.dimensions.x,(this.dataSize.y-1)*(l.y-this.extent.south)/this.dimensions.y),c.x<0||c.x>=this.dataSize.x-1||c.y<0||c.y>=this.dataSize.y-1?0:function(t,e){var r=Math.floor(t.x),n=Math.floor(t.y),i=t.x-r,a=t.y-n;return(1-i)*((1-a)*e(n,r)+a*e(n+1,r))+i*((1-a)*e(n,r+1)+a*e(n+1,r+1))}(c,this.getData)}}]),t}()},57918:(t,e,r)=>{"use strict";r.d(e,{Z:()=>p});var n=r(15671),i=r(43144),a=r(97326),o=r(79340),s=r(82963),l=r(61120),c=r(99477),u=r(79295);var h,f,d=new(r(60145).Z)("EPSG:4326");f=void 0!==document.documentElement.style.transform?"transform":void 0!==document.documentElement.style.webkitTransform?"webkitTransform":void 0!==document.documentElement.style.mozTransform?"mozTransform":void 0!==document.documentElement.style.oTransform?"oTransform":"transform";const p=function(t){(0,o.Z)(p,t);var e,r,c=(e=p,r=function(){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(t){return!1}}(),function(){var t,n=(0,l.Z)(e);if(r){var i=(0,l.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,s.Z)(this,t)});function p(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if((0,n.Z)(this,p),null==r)throw new Error("coordinates are mandatory to add a Label");arguments.length>3&&console.warn("Deprecated argument sprites in Label constructor. Sprites must be configured in style argument.");var o=(t=c.call(this)).visible;return Object.defineProperty((0,a.Z)(t),"visible",{set:function(t){t!=o&&(o=t,this.content.style.display=t?"block":"none")},get:function(){return o}}),t.isLabel=!0,t.coordinates=r,t.projectedPosition={x:0,y:0},t.boundaries={left:0,right:0,top:0,bottom:0},"string"==typeof e?(t.content=document.createElement("div"),t.content.textContent=i.text.field):t.content=e.cloneNode(!0),t.content.classList.add("itowns-label"),t.content.style.userSelect="none",t.content.style.position="absolute",i.isStyle?(t.anchor=i.getTextAnchorPosition(),t.styleOffset=i.text.offset,"string"==typeof e&&(i.text.haloWidth>0&&t.content.classList.add("itowns-stroke-single"),i.applyToHTML(t.content).then((function(e){e&&(t.icon=e)})))):(t.anchor=[0,0],t.styleOffset=[0,0]),t.iconOffset={left:0,right:0,top:0,bottom:0},t.zoom={min:i.zoom&&null!=i.zoom.min?i.zoom.min:2,max:i.zoom&&null!=i.zoom.max?i.zoom.max:24},t.order=i.order||0,t.padding=2,t}return(0,i.Z)(p,[{key:"updateProjectedPosition",value:function(t,e){var r=Math.round(t),n=Math.round(e);r==this.projectedPosition.x&&n==this.projectedPosition.y||(this.projectedPosition.x=r,this.projectedPosition.y=n,this.boundaries.left=t+this.offset.left-this.padding,this.boundaries.right=t+this.offset.right+this.padding,this.boundaries.top=e+this.offset.top-this.padding,this.boundaries.bottom=e+this.offset.bottom+this.padding,0===this.iconOffset.left&&0===this.iconOffset.right&&0===this.iconOffset.top&&0===this.iconOffset.bottom||(this.boundaries.left=Math.min(this.boundaries.left,t+this.iconOffset.left),this.boundaries.right=Math.max(this.boundaries.right,t+this.iconOffset.right),this.boundaries.top=Math.min(this.boundaries.top,e+this.iconOffset.top),this.boundaries.bottom=Math.max(this.boundaries.bottom,e+this.iconOffset.bottom)))}},{key:"updateCSSPosition",value:function(){this.content.style[f]="translate(".concat(this.projectedPosition.x+this.offset.left,"px, ").concat(this.projectedPosition.y+this.offset.top,"px)"),this.icon&&(this.icon.style[f]="translate(".concat(-this.offset.left,"px, ").concat(-this.offset.top,"px)"))}},{key:"initDimensions",value:function(){if(!this.offset){h=this.content.getBoundingClientRect();var t=Math.round(h.width),e=Math.round(h.height);this.offset={left:t*this.anchor[0]+this.styleOffset[0],top:e*this.anchor[1]+this.styleOffset[1]},this.offset.right=this.offset.left+t,this.offset.bottom=this.offset.top+e,this.icon&&(h=this.icon.getBoundingClientRect(),this.iconOffset={left:Math.floor(h.x),top:Math.floor(h.y),right:Math.ceil(h.x+h.width),bottom:Math.ceil(h.y+h.height)})}}},{key:"update3dPosition",value:function(t){this.coordinates.as(t,d).toVector3(this.position),this.updateMatrixWorld()}},{key:"updateElevationFromLayer",value:function(t,e){if(0!=t.attachedLayers.filter((function(t){return t.isElevationLayer})).length){var r=Math.max(0,u.Z.getElevationValueAt(t,this.coordinates,u.Z.FAST_READ_Z,e));isNaN(r)&&(r=Math.max(0,u.Z.getElevationValueAt(t,this.coordinates,u.Z.FAST_READ_Z))),isNaN(r)||r==this.coordinates.z||(this.coordinates.z=r)}}},{key:"updateHorizonCullingPoint",value:function(){this.horizonCullingPoint&&this.getWorldPosition(this.horizonCullingPoint)}}]),p}(c.Object3D)},49469:(t,e,r)=>{"use strict";r.d(e,{Ao:()=>y,HR:()=>v,ZP:()=>I});var n=r(15671),i=r(43144),a=r(97326),o=r(79340),s=r(82963),l=r(61120),c=r(13092),u=r(86033),h=r(99477);function f(t,e){p(t,e),e.add(t)}function d(t,e,r){p(t,e),e.set(t,r)}function p(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(t,e,r){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return r}function A(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return g(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0){var l,c=A(o.attachedLayers);try{for(c.s();!(l=c.n()).done;){var h=l.value;h.ready&&h.preUpdate&&h.preUpdate(n,s)}}catch(t){c.e(t)}finally{c.f()}var f=o.preUpdate(n,s);b(n,o,f),o.postUpdate(n,o,e)}o.cache.flush(),t.execFrameRequesters(y.AFTER_LAYER_UPDATE,r,(0,u.Z)(this,_),o)}}}catch(t){a.e(t)}finally{a.f()}}function T(t,e){t.execFrameRequesters(y.BEFORE_RENDER,e,(0,u.Z)(this,_)),t.render?t.render():this.gfxEngine.renderView(t),t.execFrameRequesters(y.AFTER_RENDER,e,(0,u.Z)(this,_))}const I=function(t){(0,o.Z)(p,t);var e,r,h=(e=p,r=function(){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(t){return!1}}(),function(){var t,n=(0,l.Z)(e);if(r){var i=(0,l.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,s.Z)(this,t)});function p(t,e){var r;return(0,n.Z)(this,p),r=h.call(this),f((0,a.Z)(r),S),f((0,a.Z)(r),M),d((0,a.Z)(r),w,{writable:!0,value:!1}),d((0,a.Z)(r),_,{writable:!0,value:!0}),d((0,a.Z)(r),E,{writable:!0,value:0}),r.renderingState=v,r.scheduler=t,r.gfxEngine=e,r}return(0,i.Z)(p,[{key:"scheduleViewUpdate",value:function(t,e){var r=this;(0,c.Z)(this,w,(0,u.Z)(this,w)|e),1!==this.renderingState&&(this.renderingState=1,this.gfxEngine.renderer.xr.isPresenting||requestAnimationFrame((function(e){r.step(t,e)})))}},{key:"step",value:function(t,e){var r=e-(0,u.Z)(this,E);t._executeFrameRequestersRemovals(),t.execFrameRequesters(y.UPDATE_START,r,(0,u.Z)(this,_));var n=(0,u.Z)(this,w);(0,c.Z)(this,E,e),(0,c.Z)(this,w,!1),this.renderingState=v;var i=new Set(t._changeSources);t._changeSources.clear();var a=this.gfxEngine.getWindowSize();t.execFrameRequesters(y.BEFORE_CAMERA_UPDATE,r,(0,u.Z)(this,_)),t.camera.update(a.x,a.y),t.execFrameRequesters(y.AFTER_CAMERA_UPDATE,r,(0,u.Z)(this,_));var o=t.camera3D.matrixAutoUpdate;t.camera3D.matrixAutoUpdate=!1,m(this,M,C).call(this,t,i,r),0==this.scheduler.commandsWaitingExecutionCount()&&this.dispatchEvent({type:"command-queue-empty"}),n&&m(this,S,T).call(this,t,r),(0,c.Z)(this,_,this.renderingState===v),t.camera3D.matrixAutoUpdate=o,t.execFrameRequesters(y.UPDATE_END,r,(0,u.Z)(this,_))}}]),p}(h.EventDispatcher)},16828:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u,c:()=>l});var n=r(15671),i=r(43144),a=r(99477),o=r(24472),s=r(60145),l=new a.Vector3(o.default.WGS84.a,o.default.WGS84.a,o.default.WGS84.b),c=new a.Vector3;const u=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;(0,n.Z)(this,t),this.size=new a.Vector3,this._radiiSquared=new a.Vector3,this._invRadiiSquared=new a.Vector3,this.eccentricity=0,this.setSize(e)}return(0,i.Z)(t,[{key:"geodeticSurfaceNormal",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new a.Vector3;return t.toVector3(e).multiply(this._invRadiiSquared).normalize()}},{key:"geodeticSurfaceNormalCartographic",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new a.Vector3,r=a.MathUtils.degToRad(t.longitude),n=a.MathUtils.degToRad(t.latitude),i=Math.cos(n);return e.set(i*Math.cos(r),i*Math.sin(r),Math.sin(n))}},{key:"setSize",value:function(t){this.size.set(t.x,t.y,t.z),this._radiiSquared.multiplyVectors(t,t),this._invRadiiSquared.x=0==t.x?0:1/this._radiiSquared.x,this._invRadiiSquared.y=0==t.y?0:1/this._radiiSquared.y,this._invRadiiSquared.z=0==t.z?0:1/this._radiiSquared.z,this.eccentricity=Math.sqrt(this._radiiSquared.x-this._radiiSquared.z)/this.size.x}},{key:"cartographicToCartesian",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new a.Vector3;c.copy(t.geodesicNormal),e.multiplyVectors(this._radiiSquared,c);var r=Math.sqrt(c.dot(e));return e.divideScalar(r),c.multiplyScalar(t.altitude),e.add(c)}},{key:"cartesianToCartographic",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new s.Z("EPSG:4326",0,0,0),r=Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z),n=this.size.x,i=this.size.z,o=Math.abs((n*n-i*i)/(n*n)),l=1-Math.sqrt(1-o),c=Math.sqrt(t.x*t.x+t.y*t.y),u=Math.atan2(t.y,t.x),h=Math.atan(t.z/c*(1-l+o*n/r)),f=Math.sin(h),d=Math.cos(h),p=Math.atan((t.z*(1-l)+o*n*f*f*f)/((1-l)*(c-o*n*d*d*d))),m=c*Math.cos(p)+t.z*Math.sin(p)-n*Math.sqrt(1-o*Math.sin(p)*Math.sin(p));return e.setFromValues(a.MathUtils.radToDeg(u),a.MathUtils.radToDeg(p),m)}},{key:"cartographicToCartesianArray",value:function(t){for(var e=[],r=0;r{"use strict";r.d(e,{Z:()=>v});var n=r(99477),i=r(32475),a=r(27240),o=r(60145);function s(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);ri||l<=r||!1!==e(a,s)))return}r=i}}function h(t){return t.layer?t.layer:t.parent?h(t.parent):void 0}var f=new n.Raycaster,d=new n.Vector2,p=new n.Vector3,m=new o.Z("EPSG:4978"),A=new n.Vector3,g=new o.Z("EPSG:4978");const v={pickTilesAt:function(t,e,r,o){var l,h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],f=function(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=t.mainLoop.gfxEngine.getWindowSize();r=r||new n.Vector2(Math.floor(s.x/2),Math.floor(s.y/2));var l=e.level0Nodes.map((function(t){return i.Z.push(t,i.Z.MODES.ID)})),h=t.mainLoop.gfxEngine.renderViewToBuffer({camera:t.camera,scene:e.object3d},{x:r.x-o,y:r.y-o,width:1+2*o,height:1+2*o});l.forEach((function(t){return t()}));var f=[];return u(o,(function(t,e){var r=4*(2*e*o+t),n=h.slice(r,r+4||void 0);c.fromArray(n).divideScalar(255);var i=(0,a.On)(c,Math.pow(256,3)),s=Math.round(i);f.includes(s)||f.push(s)})),f}(t,o,e,r),d=function(t){f.includes(t.id)&&t.isTileMesh&&h.push({object:t,layer:o})},p=s(o.level0Nodes);try{for(p.s();!(l=p.n()).done;)l.value.traverse(d)}catch(t){p.e(t)}finally{p.f()}return h},pickPointsAt:function(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(n.root){n.object3d.traverse((function(t){t.isPoints&&t.baseId&&t.material.enablePicking(!0)}));var a=t.mainLoop.gfxEngine.renderViewToBuffer({camera:t.camera,scene:n.object3d},{x:e.x-r,y:e.y-r,width:1+2*r,height:1+2*r}),o=[];return u(r,(function(t,e){for(var n=4*(2*e*r+t),i=a.slice(n,n+4),s={objId:i[0]<<8|i[1],index:i[2]<<8|i[3]},l=0;l4&&void 0!==arguments[4]?arguments[4]:[];if(t.viewToNormalizedCoords(e,d),r<0){f.setFromCamera(d,t.camera3D);var o,l=s(f.intersectObject(i,!0));try{for(l.s();!(o=l.n()).done;){var c=o.value;c.layer=h(c.object),a.push(c)}}catch(t){l.e(t)}finally{l.f()}return a}var p={x:e.x-r,y:e.y-r,width:1+2*r,height:1+2*r},m=t.mainLoop.gfxEngine.renderViewToBuffer({scene:i,camera:t.camera},p),A=new n.Color;t.mainLoop.gfxEngine.renderer.getClearColor(A);var g=Math.round(255*A.r),v=Math.round(255*A.g),y=Math.round(255*A.b),b=d.clone();return u(r,(function(e,n){var o=4*((n+r)*(2*r+1)+(e+r)),l=m[o],c=m[o+1],u=m[o+2];if(!(Math.abs(g-l)<=1&&Math.abs(v-c)<=1&&Math.abs(y-u)<=1)){b.setX(d.x+e/t.camera.width).setY(d.y+n/t.camera.height),f.setFromCamera(b,t.camera3D);var p,A=s(f.intersectObject(i,!0));try{for(A.s();!(p=A.n()).done;){var x=p.value;x.layer=h(x.object),a.push(x)}}catch(t){A.e(t)}finally{A.f()}return 0==a.length}})),a}}},56564:(t,e,r)=>{"use strict";r.d(e,{Z:()=>A});var n=r(15671),i=r(43144),a=r(99477),o=r(60145),s=r(99128),l=Math.PI/4,c=1/(2*Math.PI),u=new a.Vector3(0,0,1),h=new a.Vector3(0,1,0),f=new a.Quaternion,d=new a.Quaternion,p=new a.Quaternion;function m(t){return 1-(.5-Math.log(Math.tan(l+.5*a.MathUtils.degToRad(t)))*c)}const A=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.Z)(this,t),this.tmp={coords:[new o.Z("EPSG:4326",0,0),new o.Z("EPSG:4326",0,0)],position:new a.Vector3,dimension:new a.Vector2},this.crs=e.crs,this.uvCount=e.uvCount,this.computeUvs=[function(){},function(t){var e=m(t.projected.latitude)*t.nbRow;return(isFinite(e)?e:0)-t.deltaUV1}]}return(0,i.Z)(t,[{key:"prepare",value:function(t){t.nbRow=Math.pow(2,t.level+1);var e=m(t.extent.south);isFinite(e)||(e=0);var r=e%(1/t.nbRow);t.deltaUV1=(e-r)*t.nbRow,t.quatNormalToZ=p.setFromAxisAngle(h,-(.5*Math.PI-a.MathUtils.degToRad(t.extent.center().latitude))),t.projected={longitude:0,latitude:0},t.extent.planarDimensions(this.tmp.dimension)}},{key:"center",value:function(t){return t.center(this.tmp.coords[0]).as(this.crs,this.tmp.coords[1]).toVector3()}},{key:"vertexPosition",value:function(t){return this.tmp.coords[0].setFromValues(t.projected.longitude,t.projected.latitude),this.tmp.coords[0].as(this.crs,this.tmp.coords[1]).toVector3(this.tmp.position),this.tmp.position}},{key:"vertexNormal",value:function(){return this.tmp.coords[1].geodesicNormal}},{key:"uProjecte",value:function(t,e){e.projected.longitude=e.extent.west+t*this.tmp.dimension.x}},{key:"vProjecte",value:function(t,e){e.projected.latitude=e.extent.south+t*this.tmp.dimension.y}},{key:"computeSharableExtent",value:function(t){var e=Math.abs(t.west-t.east)/2,r=new s.ZP(t.crs,-e,e,t.south,t.north),n=a.MathUtils.degToRad(t.west-r.west),i=a.MathUtils.degToRad(90-t.center(this.tmp.coords[0]).latitude);return f.setFromAxisAngle(u,n),d.setFromAxisAngle(h,i),f.multiply(d),{sharableExtent:r,quaternion:f.clone(),position:this.center(t)}}}]),t}()},10268:(t,e,r)=>{"use strict";r.d(e,{Z:()=>b});var n=r(15671),i=r(43144),a=r(88301),o=r(79340),s=r(82963),l=r(61120),c=r(99477),u=r(62968),h=r(16828),f=r(99128),d=r(56564),p=r(75963),m=r(82150);var A=new c.Matrix4,g=new c.Vector3,v=0,y=new c.Vector3;const b=function(t){(0,o.Z)(b,t);var e,r,u=(e=b,r=function(){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(t){return!1}}(),function(){var t,n=(0,l.Z)(e);if(r){var i=(0,l.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,s.Z)(this,t)});function b(t,e){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,n.Z)(this,b);var a=f.dS.get(m.Z.tms_4326),o=f.Mh.get("EPSG:4326").subdivisionByScheme(a);i.tileMatrixSets=[m.Z.tms_4326,m.Z.tms_3857];var s=i.tileMatrixSets.length,l=new d.Z({crs:"EPSG:4978",uvCount:s});(r=u.call(this,t,e||new c.Group,o,l,i)).isGlobeLayer=!0,r.options.defaultPickingRadius=5,r.minSubdivisionLevel=null==r.minSubdivisionLevel?2:r.minSubdivisionLevel,r.maxSubdivisionLevel=null==r.maxSubdivisionLevel?19:r.maxSubdivisionLevel,r.maxDeltaElevationLevel=r.maxDeltaElevationLevel||4,r.extent=r.schemeTile[0].clone();for(var p=1;p0:v{"use strict";r.d(e,{b:()=>D,Z:()=>U});var n=r(15671),i=r(43144),a=r(97326),o=r(88301),s=r(79340),l=r(82963),c=r(61120),u=r(99477),h=r(36873),f=r(11925),d=r(60145),p=r(10268),m=r(20193),A=r(16828),g={getSunPosition:function(){var t=Math,e=t.PI,r=t.sin,n=t.cos,i=t.tan,a=t.asin,o=t.atan2,s=e/180,l=23.4397*s;function c(t,e,a){return o(r(t),n(t)*r(e)-i(a)*n(e))}function u(t,e,i){return a(r(e)*r(i)+n(e)*n(i)*n(t))}return function(t,h,f){var d,p=s*h,m=function(t){return function(t){return t.valueOf()/864e5-.5+2440588}(t)-2451545}(t),A=function(t){return s*(357.5291+.98560028*t)}(m),g=function(t){return s*(1.9148*r(t)+.02*r(2*t)+3e-4*r(3*t))}(A),v=function(t,r){return t+r+102.9372*s+e}(A,g),y=(d=v,a(r(0)*n(l)+n(0)*r(l)*r(d))),b=function(t,e){return o(r(t)*n(l)-i(0)*r(l),n(t))}(v),x=function(t,e){return s*(280.16+360.9856235*t)-e}(m,s*-f),w=x-b;return{EclipticLongitude:v,declinaison:y,ascension:b,H:w,SiderealTime:x,altitude:u(w,p,y),azimuth:c(w,p,y)+e/2}}},getSunPositionInScene:function(t,e,r){var n=864e5,i=g.getSunPosition()(t,e,r).ascension+t%n/n*-360+180;return new d.Z("EPSG:4326",i,e,5e7).as("EPSG:4978").toVector3()}};const v=g;var y={uniforms:{luminance:{type:"f",value:1},turbidity:{type:"f",value:2},reileigh:{type:"f",value:1},mieCoefficient:{type:"f",value:.005},mieDirectionalG:{type:"f",value:.8},v3LightPosition:{type:"v3",value:new u.Vector3},up:{type:"v3",value:new u.Vector3(0,1,0)}},vertexShader:["varying vec3 vWorldPosition;","void main() {","vec4 worldPosition = modelMatrix * vec4( cameraPosition + position, 1.0 );","vWorldPosition = worldPosition.xyz;","gl_Position = projectionMatrix * modelViewMatrix * vec4( cameraPosition + position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D skySampler;","uniform vec3 v3LightPosition;","uniform vec3 up;","varying vec3 vWorldPosition;","// uniform sampler2D sDiffuse;","// const float turbidity = 10.0; //","// const float reileigh = 2.; //","// const float luminance = 1.0; //","// const float mieCoefficient = 0.005;","// const float mieDirectionalG = 0.8;","uniform float luminance;","uniform float turbidity;","uniform float reileigh;","uniform float mieCoefficient;","uniform float mieDirectionalG;","// constants for atmospheric scattering","const float e = 2.71828182845904523536028747135266249775724709369995957;","const float pi = 3.141592653589793238462643383279502884197169;","const float n = 1.0003; // refractive index of air","const float N = 2.545E25; // number of molecules per unit volume for air at","// 288.15K and 1013mb (sea level -45 celsius)","const float pn = 0.035; // depolatization factor for standard air","// wavelength of used primaries, according to preetham","const vec3 lambda = vec3(680E-9, 550E-9, 450E-9);","// mie stuff","// K coefficient for the primaries","const vec3 K = vec3(0.686, 0.678, 0.666);","const float v = 4.0;","// optical length at zenith for molecules","const float rayleighZenithLength = 8.4E3;","const float mieZenithLength = 1.25E3;","const float EE = 1000.0;","const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;","// 66 arc seconds -> degrees, and the cosine of that","// earth shadow hack","const float cutoffAngle = pi/1.95;","const float steepness = 1.5;","vec3 totalRayleigh(vec3 lambda)","{","return (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn));","}","// A simplied version of the total Reayleigh scattering to works on browsers that use ANGLE","vec3 simplifiedRayleigh()","{","return 0.0005 / vec3(94, 40, 18);","}","float rayleighPhase(float cosTheta)","{ ","return (3.0 / (16.0*pi)) * (1.0 + pow(cosTheta, 2.0));","// return (1.0 / (3.0*pi)) * (1.0 + pow(cosTheta, 2.0));","// return (3.0 / 4.0) * (1.0 + pow(cosTheta, 2.0));","}","vec3 totalMie(vec3 lambda, vec3 K, float T)","{","float c = (0.2 * T ) * 10E-18;","return 0.434 * c * pi * pow((2.0 * pi) / lambda, vec3(v - 2.0)) * K;","}","float hgPhase(float cosTheta, float g)","{","return (1.0 / (4.0*pi)) * ((1.0 - pow(g, 2.0)) / pow(1.0 - 2.0*g*cosTheta + pow(g, 2.0), 1.5));","}","float sunIntensity(float zenithAngleCos)","{","return EE * max(0.0, 1.0 - exp(-((cutoffAngle - acos(zenithAngleCos))/steepness)));","}","// float logLuminance(vec3 c)","// {","// return log(c.r * 0.2126 + c.g * 0.7152 + c.b * 0.0722);","// }","// Filmic ToneMapping http://filmicgames.com/archives/75","float A = 0.15;","float B = 0.50;","float C = 0.10;","float D = 0.20;","float E = 0.02;","float F = 0.30;","float W = 1000.0;","vec3 Uncharted2Tonemap(vec3 x)","{","return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;","}","void main() ","{","vec3 up2 = normalize(cameraPosition.xyz);","float sunfade = 1.0-clamp(1.0-exp((v3LightPosition.y/450000.0)),0.0,1.0);","float reileighCoefficient = reileigh - (1.0* (1.0-sunfade));","vec3 sunDirection = normalize(v3LightPosition);","float sunE = sunIntensity(dot(sunDirection, up2));","// extinction (absorbtion + out scattering) ","// rayleigh coefficients","vec3 betaR = simplifiedRayleigh() * reileighCoefficient;","// mie coefficients","vec3 betaM = totalMie(lambda, K, turbidity) * mieCoefficient;","// optical length","// cutoff angle at 90 to avoid singularity in next formula.","float zenithAngle = acos(max(0.0, dot(up2, normalize(vWorldPosition - cameraPosition))));","float sR = rayleighZenithLength / (cos(zenithAngle) + 0.15 * pow(93.885 - ((zenithAngle * 180.0) / pi), -1.253));","float sM = mieZenithLength / (cos(zenithAngle) + 0.15 * pow(93.885 - ((zenithAngle * 180.0) / pi), -1.253));","// combined extinction factor","vec3 Fex = exp(-(betaR * sR + betaM * sM));","// in scattering","float cosTheta = dot(normalize(vWorldPosition - cameraPosition), sunDirection);","float rPhase = rayleighPhase(cosTheta*0.5+0.5);","vec3 betaRTheta = betaR * rPhase;","float mPhase = hgPhase(cosTheta, mieDirectionalG);","vec3 betaMTheta = betaM * mPhase;","vec3 Lin = pow(sunE * ((betaRTheta + betaMTheta) / (betaR + betaM)) * (1.0 - Fex),vec3(1.5));","Lin *= mix(vec3(1.0),pow(sunE * ((betaRTheta + betaMTheta) / (betaR + betaM)) * Fex,vec3(1.0/2.0)),clamp(pow(1.0-dot(up2, sunDirection),5.0),0.0,1.0));","//nightsky","vec3 direction = normalize(vWorldPosition - cameraPosition);","float theta = acos(direction.y); // elevation --\x3e y-axis, [-pi/2, pi/2]","float phi = atan(direction.z, direction.x); // azimuth --\x3e x-axis [-pi/2, pi/2]","vec2 uv = vec2(phi, theta) / vec2(2.0*pi, pi) + vec2(0.5, 0.0);","// vec3 L0 = texture2D(skySampler, uv).rgb+0.1 * Fex;","vec3 L0 = vec3(0.1) * Fex;","// composition + solar disc","//if (cosTheta > sunAngularDiameterCos)","float sundisk = smoothstep(sunAngularDiameterCos,sunAngularDiameterCos+0.00002,cosTheta);","// if (normalize(vWorldPosition - cameraPosition).y>0.0)","L0 += (sunE * 19000.0 * Fex)*sundisk;","vec3 whiteScale = 1.0/Uncharted2Tonemap(vec3(W));","vec3 texColor = (Lin+L0); ","texColor *= 0.04 ;","texColor += vec3(0.0,0.001,0.0025)*0.3;","float g_fMaxLuminance = 1.0;","float fLumScaled = 0.1 / luminance; ","float fLumCompressed = (fLumScaled * (1.0 + (fLumScaled / (g_fMaxLuminance * g_fMaxLuminance)))) / (1.0 + fLumScaled); ","float ExposureBias = fLumCompressed;","vec3 curr = Uncharted2Tonemap((log2(2.0/pow(luminance,4.0)))*texColor);","vec3 color = curr*whiteScale;","vec3 retColor = pow(color,vec3(1.0/(1.2+(1.2*sunfade))));","gl_FragColor.rgb = retColor;","gl_FragColor.a = 1. - ( (length(cameraPosition) - 6400000.) / 1000.);","}"].join("\n")};const b=function(t){(0,s.Z)(o,t);var e,r,a=(e=o,r=function(){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(t){return!1}}(),function(){var t,n=(0,c.Z)(e);if(r){var i=(0,c.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,l.Z)(this,t)});function o(){(0,n.Z)(this,o);var t=u.UniformsUtils.clone(y.uniforms),e=new u.ShaderMaterial({fragmentShader:y.fragmentShader,vertexShader:y.vertexShader,uniforms:t,side:u.BackSide,transparent:!0,depthWrite:!1}),r=new u.SphereGeometry(4e4,32,15);return a.call(this,r,e)}return(0,i.Z)(o)}(u.Mesh);var x="#include \n\nuniform int atmoIN;\nvarying float intensity;\n\nvec4 glowColor = vec4(0.45, 0.74, 1. ,1.0);\n\nvoid main() {\n #include \n gl_FragColor = glowColor * intensity;\n}\n\n",w="#include \n#include \n\nuniform int atmoIN;\nvarying float intensity;\n\nvoid main()\n{\n vec3 normalES = normalize( normalMatrix * normal );\n vec3 normalCAMES = normalize( normalMatrix * cameraPosition );\n\n if(atmoIN == 0) {\n intensity = pow(0.666 - dot(normalES, normalCAMES), 4. );\n } else {\n intensity = pow( 1. - dot(normalES, normalCAMES), 0.8 );\n }\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n #include \n}\n\n\n",_=new u.Vector3(1,0,0),E=new u.Vector3,M=new d.Z("EPSG:4326"),S=new d.Z("EPSG:4326"),C=new u.Color(9688568),T=new u.Color,I=new u.Color(197896),R=6e5,B=160*A.c.x;const k=function(t){(0,s.Z)(o,t);var e,r,a=(e=o,r=function(){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(t){return!1}}(),function(){var t,n=(0,c.Z)(e);if(r){var i=(0,c.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,l.Z)(this,t)});function o(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"atmosphere",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.Z)(this,o),r.source=!1,(t=a.call(this,e,new u.Object3D,r)).isAtmosphere=!0;var i=new u.ShaderMaterial({uniforms:{atmoIN:{type:"i",value:0},screenSize:{type:"v2",value:new u.Vector2(window.innerWidth,window.innerHeight)}},vertexShader:w,fragmentShader:x,side:u.BackSide,blending:u.AdditiveBlending,transparent:!0,wireframe:!1}),s=new u.SphereGeometry(1,64,64),l=new u.Mesh(s,i);l.scale.copy(A.c).multiplyScalar(1.14),t.basicAtmosphere=new u.Object3D,t.realisticAtmosphere=new u.Object3D,t.realisticAtmosphere.visible=!1,t.object3d.add(t.basicAtmosphere),t.object3d.add(t.realisticAtmosphere),t.basicAtmosphere.add(l);var c=new u.ShaderMaterial({uniforms:{atmoIN:{type:"i",value:1},screenSize:{type:"v2",value:new u.Vector2(window.innerWidth,window.innerHeight)}},vertexShader:w,fragmentShader:x,side:u.FrontSide,blending:u.AdditiveBlending,transparent:!0,depthWrite:!1}),h=new u.Mesh(s,c);return h.scale.copy(A.c).multiplyScalar(1.002),t.basicAtmosphere.add(h),t.realisticLightingPosition={x:-.5,y:0,z:1},t.fog={enable:!0,distance:B},t.realisticAtmosphereInitParams=r.Kr?r:{Kr:.0025,Km:.0015,ESun:20,g:-.95,innerRadius:64e5,outerRadius:67e5,wavelength:[.65,.57,.475],scaleDepth:.25},t.object3d.updateMatrixWorld(),t}return(0,i.Z)(o,[{key:"update",value:function(t,e,r){r.material.fogDistance=this.fog.distance,r.material.lightingEnabled=this.realisticAtmosphere.visible,r.material.lightPosition=this.realisticLightingPosition}},{key:"preUpdate",value:function(t){var e=t.view.camera3D.position;if(this.fog.enable){E.setFromMatrixPosition(t.view.tileLayer.object3d.matrixWorld);var r=E.distanceTo(e);this.fog.distance=B*Math.pow(.25*(r-.99*A.c.x)/A.c.x,1.5)}else this.fog.distance=1e11;var n=t.view.mainLoop.gfxEngine.renderer;M.crs=t.view.referenceCrs,M.setFromVector3(e).as("EPSG:4326",S);var i=S.altitude;i1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,n.Z)(this,m),u.Object3D.DEFAULT_UP.set(0,0,1),(e=h.call(this,"EPSG:4978",t,i)).isGlobeView=!0,e.camera3D.near=Math.max(15,2352e-9*A.c.x),e.camera3D.far=10*A.c.x;var o=new p.Z("globe",i.object3d,i);e.mainLoop.gfxEngine.label2dRenderer.infoTileLayer=o.info;var s=new u.DirectionalLight;return s.position.set(-.5,0,1),s.updateMatrixWorld(!0),e.scene.add(s),e.addLayer(o),e.tileLayer=o,r.isExtent||(r.coord=r.coord||new d.Z("EPSG:4326",0,0),r.tilt=r.tilt||89.5,r.heading=r.heading||0,r.range=r.range||2*A.c.x),i.noControls?L.ZP.transformCameraToLookAtTarget((0,a.Z)(e),e.camera3D,r):(e.controls=new f.Z((0,a.Z)(e),r,i.controls),e.controls.handleCollision=void 0===i.handleCollision||i.handleCollision),e.addLayer(new k("atmosphere",i.atmosphere)),e.camera.resize(t.clientWidth,t.clientHeight),e}return(0,i.Z)(m,[{key:"addLayer",value:function(t){if(!t||!t.isLayer)return Promise.reject(new Error("Add Layer type object"));if(t.isColorLayer){if(!this.tileLayer.tileMatrixSets.includes(P.Z.formatToTms(t.source.crs)))return t._reject("Only ".concat(this.tileLayer.tileMatrixSets," tileMatrixSet are currently supported for color layers"))}else if(t.isElevationLayer&&P.Z.formatToTms(t.source.crs)!==this.tileLayer.tileMatrixSets[0])return t._reject("Only ".concat(this.tileLayer.tileMatrixSets[0]," tileMatrixSet is currently supported for elevation layers"));return(0,o.Z)((0,c.Z)(m.prototype),"addLayer",this).call(this,t,this.tileLayer)}},{key:"getPixelsToDegrees",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1?arguments[1]:void 0;return this.getMetersToDegrees(this.getPixelsToMeters(t,e))}},{key:"getPixelsToDegreesFromDistance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.getMetersToDegrees(this.getPixelsToMetersFromDistance(t,e))}},{key:"getMetersToDegrees",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return u.MathUtils.radToDeg(2*Math.asin(t/(2*A.c.x)))}}]),m}(h.Z)},64561:(t,e,r)=>{"use strict";r.d(e,{Z:()=>A});var n=r(43144),i=r(15671),a=r(79340),o=r(82963),s=r(61120),l=r(99477),c=r(62968),u=r(99128),h=r(82150),f=r(60145),d=new l.Quaternion,p=new l.Vector3;const m=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,i.Z)(this,t),e.projection&&(console.warn("PlanarTileBuilder projection parameter is deprecated, use crs instead."),e.crs=e.crs||e.projection),!e.crs)throw new Error("options.crs is mandatory for PlanarTileBuilder");this.crs=e.crs,this.tmp={coords:new f.Z("EPSG:4326",0,0),position:new l.Vector3,normal:new l.Vector3(0,0,1)},this.uvCount=e.uvCount||1}return(0,n.Z)(t,[{key:"prepare",value:function(t){t.nbRow=Math.pow(2,t.zoom+1),t.projected=new l.Vector3}},{key:"center",value:function(t){return t.center(this.tmp.coords),p.set(this.tmp.coords.x,this.tmp.coords.y,0),p}},{key:"vertexPosition",value:function(t){return this.tmp.position.set(t.projected.x,t.projected.y,0),this.tmp.position}},{key:"vertexNormal",value:function(){return this.tmp.normal}},{key:"uProjecte",value:function(t,e){e.projected.x=e.extent.west+t*(e.extent.east-e.extent.west)}},{key:"vProjecte",value:function(t,e){e.projected.y=e.extent.south+t*(e.extent.north-e.extent.south)}},{key:"computeSharableExtent",value:function(t){return{sharableExtent:new u.ZP(t.crs,0,Math.abs(t.west-t.east),0,Math.abs(t.north-t.south)),quaternion:d,position:this.center(t).clone()}}}]),t}();const A=function(t){(0,a.Z)(f,t);var e,r,c=(e=f,r=function(){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(t){return!1}}(),function(){var t,n=(0,s.Z)(e);if(r){var i=(0,s.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,o.Z)(this,t)});function f(t,e,r){var n,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};(0,i.Z)(this,f);var o=h.Z.formatToTms(e.crs);return u.Mh.get(e.crs)||u.Mh.set(e.crs,e),a.tileMatrixSets=[o],(n=c.call(this,t,r||new l.Group,[e],new m({crs:e.crs}),a)).isPlanarLayer=!0,n.extent=e,n.minSubdivisionLevel=null==n.minSubdivisionLevel?0:n.minSubdivisionLevel,n.maxSubdivisionLevel=null==n.maxSubdivisionLevel?5:n.maxSubdivisionLevel,n.maxDeltaElevationLevel=n.maxDeltaElevationLevel||4,n}return(0,n.Z)(f)}(c.Z)},48682:(t,e,r)=>{"use strict";r.d(e,{Z:()=>m});var n=r(15671),i=r(43144),a=r(97326),o=r(88301),s=r(79340),l=r(82963),c=r(61120),u=r(99477),h=r(36873),f=r(4596),d=r(44450),p=r(64561);const m=function(t){(0,s.Z)(m,t);var e,r,h=(e=m,r=function(){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(t){return!1}}(),function(){var t,n=(0,c.Z)(e);if(r){var i=(0,c.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,l.Z)(this,t)});function m(t,e){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,n.Z)(this,m),u.Object3D.DEFAULT_UP.set(0,0,1),(r=h.call(this,e.crs,t,i)).isPlanarView=!0;var o=e.planarDimensions(),s=Math.max(o.x,o.y);r.camera3D.near=.1,r.camera3D.far=r.camera3D.isOrthographicCamera?2e3:2*s,r.camera3D.updateProjectionMatrix();var l=new p.Z("planar",e,i.object3d,i);r.mainLoop.gfxEngine.label2dRenderer.infoTileLayer=l.info,r.addLayer(l);var c=i.placement||{};return c.isExtent||(c.coord=c.coord||e.center(),c.tilt=c.tilt||90,c.heading=c.heading||0,c.range=c.range||s),f.ZP.transformCameraToLookAtTarget((0,a.Z)(r),r.camera3D,c),i.noControls||(r.controls=new d.ZP((0,a.Z)(r),i.controls)),r.tileLayer=l,r}return(0,i.Z)(m,[{key:"addLayer",value:function(t){return(0,o.Z)((0,c.Z)(m.prototype),"addLayer",this).call(this,t,this.tileLayer)}}]),m}(h.Z)},9417:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(99477);function i(t){var e={index:null,position:null,normal:null,uvs:[]},r=[],i=t.builder,a=t.segment||8,o=(a+1)*(a+1)+(t.disableSkirt?0:4*a);if(o>Math.pow(2,32))throw new Error("Tile segments count is too big");var s=a*a*2+(t.disableSkirt?0:4*a*2);e.position=new Float32Array(3*o),e.normal=new Float32Array(3*o);var l=t.builder.uvCount;l>1&&(e.uvs[1]=new Float32Array(o)),r[0]=function(){},t.buildIndexAndUv_0&&(o1){var o=i.computeUvs[1](t);r[1]=function(t){e.uvs[1][t]=o}}for(var s=0;s<=c;s++){var m=s/c,g=3*h;i.uProjecte(m,t);var v=i.vertexPosition(t,t.projected),y=i.vertexNormal(t);v.sub(t.center),t.quatNormalToZ&&(v.applyQuaternion(t.quatNormalToZ),y.applyQuaternion(t.quatNormalToZ)),v.toArray(e.position,g),y.toArray(e.normal,g);for(var b=0,x=r;b1&&(e.uvs[1][h]=e.uvs[1][R]);var L=(I+1)%d.length;v=C(v,R,h,0===L?M:h+1,d[L]),h++}}return e}},1537:(t,e,r)=>{"use strict";r.d(e,{D:()=>o,Z:()=>s});var n,i=r(15671),a=r(43144),o={INFINITE:1/0,TEXTURE:9e5,GEOMETRY:9e5};const s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.INFINITE;(0,i.Z)(this,t),this.lifeTime=e,this.lastTimeFlush=Date.now(),this.data=new Map}return(0,a.Z)(t,[{key:"getByArray",value:function(t){return this.get(t[0],t[1],t[2])}},{key:"setByArray",value:function(t,e){return this.set(t,e[0],e[1],e[2])}},{key:"get",value:function(t,e,r){var i=this.data.get(t);if(null!=i){if(null!=i.lastTimeUsed)n=i;else{var a=i.get(e);if(null==a)return;if(null!=a.lastTimeUsed)n=a;else{var o=a.get(r);if(null==o)return;n=o}}return n.value?(n.lastTimeUsed=Date.now(),n.value):void 0}}},{key:"set",value:function(t,e,r,i){if(n={value:t,lastTimeUsed:Date.now()},null==r)return this.data.set(e,n),t;this.data.get(e)||this.data.set(e,new Map);var a=this.data.get(e);return null==i?(a.set(r,n),t):(a.get(r)||a.set(r,new Map),a.get(r).set(i,n),t)}},{key:"delete",value:function(t,e,r){var n=this.data.get(t);if(void 0!==n)if(null!=n.lastTimeUsed)this.data.get(t),this.data.delete(t);else{var i=n.get(e);if(void 0===i)return;if(null!=i.lastTimeUsed)n.get(e),n.delete(e),0==n.size&&this.data.delete(t);else{if(void 0===i.get(r))return;i.get(r),i.delete(r),0==i.size&&(n.delete(e),0==n.size&&this.data.delete(t))}}}},{key:"clear",value:function(){this.data.clear()}},{key:"flush",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this.lifeTime==o.INFINITE||this.lifeTime>e-this.lastTimeFlush||!this.data.size||(this.lastTimeFlush=1/0,this.data.forEach((function(r,n){t.lifeTime{"use strict";r.d(e,{uP:()=>z,ZP:()=>j,Lu:()=>S});var n=r(4942),i=r(15671),a=r(43144),o=r(86033),s=r(13092),l=r(15861),c=r(64687),u=r.n(c),h=r(94596),f=r(1537),d=r(33347),p=r(92294),m=r(99477);function A(t){var e,r,n,i=t.r||t[0]/255,a=t.g||t[1]/255,o=t.b||t[2]/255;return r=(.2126*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.7152*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)+.0722*(o=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92))/1,n=(.0193*i+.1192*a+.9505*o)/1.08883,e=(e=(.4124*i+.3576*a+.1805*o)/.95047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(e-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]}function g(t,e){var r=A(t),n=A(e),i=r[0]-n[0],a=r[1]-n[1],o=r[2]-n[2],s=Math.sqrt(r[1]*r[1]+r[2]*r[2]),l=s-Math.sqrt(n[1]*n[1]+n[2]*n[2]),c=a*a+o*o-l*l,u=i/1,h=l/(1+.045*s),f=(c=c<0?0:Math.sqrt(c))/(1+.015*s),d=u*u+h*h+f*f;return d<0?0:Math.sqrt(d)}var v=r(60145);function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function b(t){for(var e=1;e=0;r--){var n=t.stops[r];if(e.zoom>=n[0])return n[1]}return t.stops[0][1]}return("string"==typeof t||t instanceof String)&&(t=t.replace(/\{(.+?)\}/g,(function(t,r){return e.properties[r]||""})).trim()),t instanceof Function?t(e.properties,e):t}}function C(t){if(!t)return{};if(t.stops||t.expression)return{color:t};if("string"==typeof t){var e=t.match(/(?:((hsl|rgb)a? *\(([\d.%]+(?:deg|g?rad|turn)?)[ ,]*([\d.%]+)[ ,]*([\d.%]+)[ ,/]*([\d.%]*)\))|(#((?:[\d\w]{3}){1,2})([\d\w]{1,2})?))/i);if(!e)return{color:t,opacity:1};if(e[7]){var r=1;return e[9]&&(r=.00392156862745098*parseInt(1==e[9].length?"".concat(e[9]).concat(e[9]):e[9],16)),{color:"#".concat(e[8]),opacity:r}}if(e[0])return{color:"".concat(e[2],"(").concat(e[3],",").concat(e[4],",").concat(e[5],")"),opacity:Number(e[6])||1}}}function T(t,e){if(null!=t)return p.th.isExpression(t)?p.th.createExpression(t,e).value:t}function I(){return R.apply(this,arguments)}function R(){return(R=(0,l.Z)(u().mark((function t(e){var r;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=w.get(e,"null"))||(r=d.Z.texture(e,{crossOrigin:"anonymous"}),w.set(r,e,"null")),t.next=4,r;case 4:return t.abrupt("return",t.sent.image);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function B(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{width:t.naturalWidth,height:t.naturalHeight};E.width=e.width,E.height=e.height;var r=E.getContext("2d",{willReadFrequently:!0});return r.drawImage(t,e.x||0,e.y||0,e.width,e.height,0,0,e.width,e.height),r.getImageData(0,0,e.width,e.height)}function k(t,e,r){if(!e)return t;var n=w.get(r,e);if(!n){for(var i=t.data,a=new m.Color(e),o=new m.Color("white"),s=0,l=i.length;s0&&void 0!==arguments[0]?arguments[0]:{};(0,i.Z)(this,t),this.isStyle=!0,this.context=new z,this.order=e.order||0,e.zoom=e.zoom||{},e.fill=e.fill||{},e.stroke=e.stroke||{},e.point=e.point||{},e.text=e.text||{},e.icon=e.icon||{},this.zoom={},P(this,"zoom","min",e.zoom.min),P(this,"zoom","max",e.zoom.max),this.fill={},P(this,"fill","color",e.fill.color),P(this,"fill","opacity",e.fill.opacity,1),P(this,"fill","pattern",e.fill.pattern),P(this,"fill","base_altitude",e.fill.base_altitude,M),e.fill.extrusion_height&&P(this,"fill","extrusion_height",e.fill.extrusion_height),this.stroke={},P(this,"stroke","color",e.stroke.color),P(this,"stroke","opacity",e.stroke.opacity,1),P(this,"stroke","width",e.stroke.width,1),P(this,"stroke","dasharray",e.stroke.dasharray,[]),P(this,"stroke","base_altitude",e.stroke.base_altitude,M),this.point={},P(this,"point","color",e.point.color),P(this,"point","line",e.point.line),P(this,"point","opacity",e.point.opacity,1),P(this,"point","radius",e.point.radius,2),P(this,"point","width",e.point.width,0),P(this,"point","base_altitude",e.point.base_altitude,M),e.point.model&&P(this,"point","model",e.point.model),this.text={},P(this,"text","field",e.text.field),P(this,"text","zOrder",e.text.zOrder,"auto"),P(this,"text","color",e.text.color,"#000000"),P(this,"text","anchor",e.text.anchor,"center"),P(this,"text","offset",e.text.offset,[0,0]),P(this,"text","padding",e.text.padding,2),P(this,"text","size",e.text.size,16),P(this,"text","placement",e.text.placement,"point"),P(this,"text","rotation",e.text.rotation,"auto"),P(this,"text","wrap",e.text.wrap,10),P(this,"text","spacing",e.text.spacing,0),P(this,"text","transform",e.text.transform,"none"),P(this,"text","justify",e.text.justify,"center"),P(this,"text","opacity",e.text.opacity,1),P(this,"text","font",e.text.font,["Open Sans Regular","Arial Unicode MS Regular","sans-serif"]),P(this,"text","haloColor",e.text.haloColor,"#000000"),P(this,"text","haloWidth",e.text.haloWidth,0),P(this,"text","haloBlur",e.text.haloBlur,0),this.icon={},P(this,"icon","source",e.icon.source),e.icon.key&&(console.warn("'icon.key' is deprecated: use 'icon.id' instead"),e.icon.id=e.icon.key),P(this,"icon","id",e.icon.id),P(this,"icon","cropValues",e.icon.cropValues),P(this,"icon","anchor",e.icon.anchor,"center"),P(this,"icon","size",e.icon.size,1),P(this,"icon","color",e.icon.color),P(this,"icon","opacity",e.icon.opacity,1)}var e,r;return(0,a.Z)(t,[{key:"copy",value:function(t){return Object.assign(this.fill,t.fill),Object.assign(this.stroke,t.stroke),Object.assign(this.point,t.point),Object.assign(this.text,t.text),Object.assign(this.icon,t.icon),this}},{key:"clone",value:function(){return(new t).copy(this)}},{key:"setContext",value:function(t){this.context=t}},{key:"applyToCanvasPolygon",value:function(t,e,r,n){var i=this.context;this.stroke&&this._applyStrokeToPolygon(t,r,e,i),n&&this.fill&&this._applyFillToPolygon(t,r,e,i)}},{key:"_applyStrokeToPolygon",value:function(t,e,r){t.strokeStyle!==this.stroke.color&&(t.strokeStyle=this.stroke.color);var n=(this.stroke.width||2)*e;t.lineWidth!==n&&(t.lineWidth=n);var i=null==this.stroke.opacity?1:this.stroke.opacity;i!==t.globalAlpha&&"number"==typeof i&&(t.globalAlpha=i),t.lineCap!==this.stroke.lineCap&&(t.lineCap=this.stroke.lineCap),t.setLineDash(this.stroke.dasharray.map((function(t){return t*e*2}))),t.stroke(r)}},{key:"_applyFillToPolygon",value:(r=(0,l.Z)(u().mark((function t(e,r,n){var i,a;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.fill.pattern){t.next=12;break}if(i=this.fill.pattern,a=this.fill.pattern.cropValues,!this.fill.pattern.source){t.next=7;break}return t.next=6,I(this.fill.pattern.source);case 6:i=t.sent;case 7:B(i,a),e.fillStyle=e.createPattern(E,"repeat"),e.fillStyle.setTransform?e.fillStyle.setTransform(_.scale(r)):console.warn("Raster pattern isn't completely supported on Ie and edge",e.fillStyle),t.next=13;break;case 12:e.fillStyle!==this.fill.color&&(e.fillStyle=this.fill.color);case 13:this.fill.opacity!==e.globalAlpha&&(e.globalAlpha=this.fill.opacity),e.fill(n);case 15:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"applyToHTML",value:(e=(0,l.Z)(u().mark((function t(e){var r,n,i,a,o,s,l,c,h=this,f=arguments;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(f.length>1&&console.warn("Deprecated argument sprites. Sprites must be configured in style."),e.style.padding="".concat(this.text.padding,"px"),e.style.maxWidth="".concat(this.text.wrap,"em"),e.style.color=this.text.color,this.text.size>0&&(e.style.fontSize="".concat(this.text.size,"px")),e.style.fontFamily=this.text.font.join(","),e.style.textTransform=this.text.transform,e.style.letterSpacing="".concat(this.text.spacing,"em"),e.style.textAlign=this.text.justify,e.style["white-space"]="pre-line",this.text.haloWidth>0&&(e.style.setProperty("--text_stroke_display","block"),e.style.setProperty("--text_stroke_width","".concat(this.text.haloWidth,"px")),e.style.setProperty("--text_stroke_color",this.text.haloColor),e.setAttribute("data-before",e.textContent)),this.icon.source){t.next=13;break}return t.abrupt("return");case 13:if(r=document.createElement("img"),n=new Promise((function(t,n){var i={size:h.icon.size,color:h.icon.color,opacity:h.icon.opacity,anchor:h.icon.anchor};r.onload=function(){return t(G(r,e,i))},r.onerror=function(t){return n(t)}})),this.icon.cropValues||this.icon.color){t.next=19;break}r.src=this.icon.source,t.next=29;break;case 19:return i=this.icon.cropValues,a=this.icon.color,o=this.icon.id||this.icon.source,t.next=24,I(this.icon.source);case 24:s=t.sent,l=B(s,i),c=k(l,a,o),E.getContext("2d").putImageData(c,0,0),r.src=E.toDataURL("image/png");case 29:return t.abrupt("return",n);case 30:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getTextAnchorPosition",value:function(){return"string"==typeof this.text.anchor?Object.keys(L).includes(this.text.anchor)?L[this.text.anchor]:(console.error("".concat(this.text.anchor," is not a valid input for Style.text.anchor parameter.")),L.center):this.text.anchor}}],[{key:"setFromProperties",value:function(t,e){var r=e.type,n={};if(r===h.tg.POINT){var i=b(b(b(b({},void 0!==t.fill&&{color:t.fill}),void 0!==t["fill-opacity"]&&{opacity:t["fill-opacity"]}),void 0!==t.stroke&&{line:t.stroke}),void 0!==t.radius&&{radius:t.radius});Object.keys(i).length&&(n.point=i);var a=b(b(b({},void 0!==t["label-color"]&&{color:t["label-color"]}),void 0!==t["label-opacity"]&&{opacity:t["label-opacity"]}),void 0!==t["label-size"]&&{size:t["label-size"]});Object.keys(i).length&&(n.text=a);var o=b(b(b(b({},void 0!==t.icon&&{source:t.icon}),void 0!==t["icon-scale"]&&{size:t["icon-scale"]}),void 0!==t["icon-opacity"]&&{opacity:t["icon-opacity"]}),void 0!==t["icon-color"]&&{color:t["icon-color"]});Object.keys(o).length&&(n.icon=o)}else{var s=b(b(b({},void 0!==t.stroke&&{color:t.stroke}),void 0!==t["stroke-width"]&&{width:t["stroke-width"]}),void 0!==t["stroke-opacity"]&&{opacity:t["stroke-opacity"]});if(Object.keys(s).length&&(n.stroke=s),r!==h.tg.LINE){var l=b(b({},void 0!==t.fill&&{color:t.fill}),void 0!==t["fill-opacity"]&&{opacity:t["fill-opacity"]});Object.keys(l).length&&(n.fill=l)}}return n}},{key:"setFromVectorTileLayer",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i={fill:{},stroke:{},point:{},text:{},icon:{}};if(t.layout=t.layout||{},t.paint=t.paint||{},i.order=r,"fill"===t.type){var a=C(T(t.paint["fill-color"]||t.paint["fill-pattern"],{type:"color"})),o=a.color,s=a.opacity;if(i.fill.color=o,i.fill.opacity=T(t.paint["fill-opacity"])||s,t.paint["fill-pattern"])try{i.fill.pattern={id:t.paint["fill-pattern"],source:e.source,cropValues:e[t.paint["fill-pattern"]]}}catch(e){throw e.message="VTlayer '".concat(t.id,"': argument sprites must not be null when using layer.paint['fill-pattern']"),e}if(t.paint["fill-outline-color"]){var l=C(T(t.paint["fill-outline-color"],{type:"color"})),c=l.color,u=l.opacity;i.stroke.color=c,i.stroke.opacity=u,i.stroke.width=1,i.stroke.dasharray=[]}}else if("line"===t.type){var h=C(T(t.paint["line-color"],{type:"color"})),f=h.color,d=h.opacity;i.stroke.dasharray=T(t.paint["line-dasharray"]),i.stroke.color=f,i.stroke.lineCap=t.layout["line-cap"],i.stroke.width=T(t.paint["line-width"]),i.stroke.opacity=T(t.paint["line-opacity"])||d}else if("circle"===t.type||n){var p=C(T(t.paint["circle-color"],{type:"color"})),m=p.color,A=p.opacity;i.point.color=m,i.point.opacity=A,i.point.radius=T(t.paint["circle-radius"])}else if("symbol"===t.type){i.text.zOrder=T(t.layout["symbol-z-order"]),"auto"==i.text.zOrder?i.text.zOrder=T(t.layout["symbol-sort-key"])||"Y":"viewport-y"==i.text.zOrder?i.text.zOrder="Y":"source"==i.text.zOrder&&(i.text.zOrder=0),i.text.anchor=T(t.layout["text-anchor"]),i.text.offset=T(t.layout["text-offset"]),i.text.padding=T(t.layout["text-padding"]),i.text.size=T(t.layout["text-size"]),i.text.placement=T(t.layout["symbol-placement"]),i.text.rotation=T(t.layout["text-rotation-alignment"]),i.text.field=T(t.layout["text-field"]),i.text.wrap=T(t.layout["text-max-width"]),i.text.spacing=T(t.layout["text-letter-spacing"]),i.text.transform=T(t.layout["text-transform"]),i.text.justify=T(t.layout["text-justify"]);var g=C(T(t.paint["text-color"],{type:"color"})),v=g.color,y=g.opacity;i.text.color=v,i.text.opacity=T(t.paint["text-opacity"])||void 0!==y&&y,i.text.font=T(t.layout["text-font"]);var b=T(t.paint["text-halo-color"],{type:"color"});b&&(i.text.haloColor=b.color||b,i.text.haloWidth=T(t.paint["text-halo-width"]),i.text.haloBlur=T(t.paint["text-halo-blur"]));var x=T(t.layout["icon-image"]);if(x)try{i.icon.id=x,i.icon.source=e.source,i.icon.cropValues=e[x],i.icon.size=T(t.layout["icon-size"])||1;var w=C(T(t.paint["icon-color"],{type:"color"})),_=w.color,E=w.opacity;i.icon.color=_,i.icon.opacity=T(t.paint["icon-opacity"])||void 0!==E&&E}catch(e){throw e.message="VTlayer '".concat(t.id,"': argument sprites must not be null when using layer.layout['icon-image']"),e}}return i.zoom={min:t.minzoom||0,max:t.maxzoom||24},i}}]),t}(),V={itowns_stroke_single_before:".itowns-stroke-single:before {\n display: var(--text_stroke_display);\n content: attr(data-before);\n opacity: 1;\n position: absolute;\n -webkit-text-stroke-width: var(--text_stroke_width);\n -webkit-text-stroke-color: var(--text_stroke_color);\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: -1;\n white-space: inherit;\n overflow-wrap: inherit;\n letter-spacing: inherit;\n text-align: inherit;\n padding: inherit;\n font-family: inherit;\n text-transform: inherit;\n max-width: inherit;\n font-size: inherit;\n}\n"},Q="undefined"!=typeof document?document.createElement("style"):{};Q.type="text/css",Object.keys(V).forEach((function(t){Q.innerHTML+="".concat(V[t],"\n\n")})),"undefined"!=typeof document&&document.getElementsByTagName("head")[0].appendChild(Q);const j=Z},47052:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var n=!1,i=8,a=4096;function o(t,e,r){var n=t.getContext(),i=n.createShader(e);return n.shaderSource(i,r),n.compileShader(i),i}function s(){return navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes("firefox")}const l={isLogDepthBufferSupported:function(){return n},isFirefox:s,isInternetExplorer:function(){return!!document.documentMode},getMaxTextureUnitsCount:function(){return i},getMaxTextureSize:function(){return a},updateCapabilities:function(t){var e=t.getContext();i=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),a=e.getParameter(e.MAX_TEXTURE_SIZE);var r=e.createProgram(),l=o(t,e.VERTEX_SHADER,"void main() {\n gl_Position = vec4( 0.0, 0.0, 0.0, 1.0 );\n}"),c="#define SAMPLE ".concat(i,"\n");c+="uniform sampler2D uni[SAMPLE];\nvoid main() {\n gl_FragColor += texture2D(uni[SAMPLE-1], vec2(0));\n}";var u=o(t,e.FRAGMENT_SHADER,c);if(e.attachShader(r,l),e.attachShader(r,u),e.linkProgram(r),!1===e.getProgramParameter(r,e.LINK_STATUS)){if(!(i>16))throw new Error("The GPU capabilities could not be determined accurately.\n Impossible to link a shader with the Maximum texture units ".concat(i));var h=e.getProgramInfoLog(r);console.warn("".concat(h,": using a maximum of 16 texture units instead of the reported value (").concat(i,")")),s()&&console.warn("It can come from a Mesa/Firefox bug;\n the shader compiles to an error when using more than 16 sampler uniforms,\n see https://bugzilla.mozilla.org/show_bug.cgi?id=777028"),i=16}e.deleteProgram(r),e.deleteShader(l),e.deleteShader(u),n=t.capabilities.logarithmicDepthBuffer}}},3590:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var n=r(43144),i=r(15671),a=r(79340),o=r(82963),s=r(61120),l=r(99477),c=r(9417);const u=function(t){(0,a.Z)(h,t);var e,r,u=(e=h,r=function(){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(t){return!1}}(),function(){var t,n=(0,s.Z)(e);if(r){var i=(0,s.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,o.Z)(this,t)});function h(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){t.buildIndexAndUv_0=!0,t.center=t.builder.center(t.extent).clone();var e=(0,c.Z)(t);e.index=new l.BufferAttribute(e.index,1),e.uvs[0]=new l.BufferAttribute(e.uvs[0],2),e.position=new l.BufferAttribute(e.position,3),e.normal=new l.BufferAttribute(e.normal,3);for(var r=1;r{"use strict";r.d(e,{b:()=>ut,Z:()=>wt});var n=r(42982),i=r(15671),a=r(43144),o=r(97326),s=r(79340),l=r(82963),c=r(61120),u=r(86033),h=r(13092),f=r(99477),d=r(800),p=r(15861),m=r(64687),A=r.n(m);function g(){return(g=(0,p.Z)(A().mark((function t(e){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=3;break}return t.next=3,e.end();case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var v=r(49469),y=r(47052),b=r(12276),x=r(27240);const w=function(){function t(){(0,i.Z)(this,t)}return(0,a.Z)(t,null,[{key:"isWebGLAvailable",value:function(){try{var t=document.createElement("canvas");return!(!window.WebGLRenderingContext||!t.getContext("webgl")&&!t.getContext("experimental-webgl"))}catch(t){return!1}}},{key:"isWebGL2Available",value:function(){try{var t=document.createElement("canvas");return!(!window.WebGL2RenderingContext||!t.getContext("webgl2"))}catch(t){return!1}}},{key:"getWebGLErrorMessage",value:function(){return this.getErrorMessage(1)}},{key:"getWebGL2ErrorMessage",value:function(){return this.getErrorMessage(2)}},{key:"getErrorMessage",value:function(t){var e={1:window.WebGLRenderingContext,2:window.WebGL2RenderingContext},r='Your $0 does not seem to support $1',n=document.createElement("div");return n.id="webglmessage",n.style.fontFamily="monospace",n.style.fontSize="13px",n.style.fontWeight="normal",n.style.textAlign="center",n.style.background="#fff",n.style.color="#000",n.style.padding="1.5em",n.style.width="400px",n.style.margin="5em auto 0",r=(r=e[t]?r.replace("$0","graphics card"):r.replace("$0","browser")).replace("$1",{1:"WebGL",2:"WebGL 2"}[t]),n.innerHTML=r,n}}]),t}();var _=r(6755),E=r(86896),M=new f.Vector4;const S=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.Z)(this,t),(0,E.Dx)(r);var n,a,o=!y.Z.isInternetExplorer();void 0===r.antialias&&(r.antialias=!0),void 0===r.alpha&&(r.alpha=!0),void 0===r.logarithmicDepthBuffer&&(r.logarithmicDepthBuffer=this.gLDebug||o),void 0===r.isWebGL2&&(r.isWebGL2=!0),a=e.domElement?(n=e).domElement instanceof HTMLDivElement?n.domElement:n.domElement.parentElement:e,this.width=a.clientWidth,this.height=a.clientHeight,this.positionBuffer=null,this._nextThreejsLayer=1,this.fullSizeRenderTarget=new f.WebGLRenderTarget(this.width,this.height),this.fullSizeRenderTarget.texture.minFilter=f.LinearFilter,this.fullSizeRenderTarget.texture.magFilter=f.NearestFilter,this.fullSizeRenderTarget.depthBuffer=!0,this.fullSizeRenderTarget.depthTexture=new f.DepthTexture,this.fullSizeRenderTarget.depthTexture.type=f.UnsignedShortType,this.renderView=function(t){this.renderer.clear(),this.renderer.render(t.scene,t.camera3D),t.tileLayer&&this.label2dRenderer.render(t.tileLayer.object3d,t.camera3D)}.bind(this),this.onWindowResize=function(t,e){this.width=t,this.height=e,this.fullSizeRenderTarget.setSize(this.width,this.height),this.renderer.setSize(this.width,this.height),this.label2dRenderer.setSize(this.width,this.height)}.bind(this);try{this.label2dRenderer=new _.Z,this.label2dRenderer.setSize(this.width,this.height),a.appendChild(this.label2dRenderer.domElement),this.renderer=n||new(r.isWebGL2?f.WebGLRenderer:f.WebGL1Renderer)({canvas:document.createElement("canvas"),antialias:r.antialias,alpha:r.alpha,logarithmicDepthBuffer:r.logarithmicDepthBuffer}),this.renderer.domElement.style.position="relative",this.renderer.domElement.style.zIndex=0,this.renderer.domElement.style.top=0}catch(t){var s=r.isWebGL2?"2":"1";console.error("Failed to create WebGLRenderer webGL ".concat(s,".")),this.renderer=null}if(!this.renderer)throw w.isWebGLAvailable()?w.isWebGL2Available()||a.appendChild(w.getErrorMessage(2)):a.appendChild(w.getErrorMessage(1)),new Error("WebGL unsupported");!n&&r.logarithmicDepthBuffer&&(this.renderer.capabilities.isWebGL2||this.renderer.extensions.get("EXT_frag_depth")||(this.renderer.dispose(),this.renderer=new(r.isWebGL2?f.WebGLRenderer:f.WebGL1Renderer)({canvas:document.createElement("canvas"),antialias:r.antialias,alpha:r.alpha,logarithmicDepthBuffer:!1}))),-1===this.renderer.domElement.tabIndex&&(this.renderer.domElement.tabIndex=-1),y.Z.updateCapabilities(this.renderer),this.renderer.setClearColor(197896),this.renderer.autoClear=!1,this.renderer.sortObjects=!0,this.renderer.debug.checkShaderErrors=!1,n||(this.renderer.setPixelRatio(a.devicePixelRatio),this.renderer.setSize(a.clientWidth,a.clientHeight),a.appendChild(this.renderer.domElement))}return(0,a.Z)(t,[{key:"getWindowSize",value:function(){return new f.Vector2(this.width,this.height)}},{key:"getRenderer",value:function(){return this.renderer}},{key:"renderViewToBuffer",value:function(t,e){return e||(e={x:0,y:0,width:this.width,height:this.height}),e.buffer=e.buffer||new Uint8Array(4*e.width*e.height),this.renderViewToRenderTarget(t,this.fullSizeRenderTarget,e),this.renderer.readRenderTargetPixels(this.fullSizeRenderTarget,e.x,this.height-(e.y+e.height),e.width,e.height,e.buffer),e.buffer}},{key:"renderViewToRenderTarget",value:function(t,e,r){e||(e=this.fullSizeRenderTarget);var n=this.renderer.getRenderTarget();return r&&(this.fullSizeRenderTarget.scissor.set(r.x,e.height-(r.y+r.height),r.width,r.height),this.fullSizeRenderTarget.scissorTest=!0),this.renderer.setRenderTarget(e),this.renderer.clear(!0,!0,!1),this.renderer.render(t.scene,t.camera.camera3D),this.renderer.setRenderTarget(n),this.fullSizeRenderTarget.scissorTest=!1,e}},{key:"bufferToImage",value:function(t,e,r){var n=document.createElement("canvas"),i=n.getContext("2d",{willReadFrequently:!0});n.width=e,n.height=r;var a=i.getImageData(0,0,e,r);a.data.set(t),i.putImageData(a,0,0);var o=new Image;return o.src=n.toDataURL(),o}},{key:"depthBufferRGBAValueToOrthoZ",value:function(t,e){if(M.fromArray(t).divideScalar(255),y.Z.isLogDepthBufferSupported()&&"PerspectiveCamera"==e.type){var r=(0,x.On)(M),n=2/(Math.log(e.far+1)/Math.LN2);return Math.pow(2,2*r/n)}var i=(0,x.On)(M);return 2*i-1}}]),t}();var C=r(32475),T=r(82150),I=r(60145),R=r(39683),B=r(95307),k=r.n(B);const L={executeCommand:function(t){var e=t.layer,r=t.extentsSource,n=t.extentsDestination||r;return Promise.all(r.map((function(t,r){return e.getData(t,n[r])})))}},P=function(){function t(e){(0,i.Z)(this,t),this.command=e,this.isCancelledCommandException=!0}return(0,a.Z)(t,[{key:"toString",value:function(){return"Cancelled command ".concat(this.command.requester.id,"/").concat(this.command.layer.id)}}]),t}();function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(i);try{for(o.s();!(a=o.n()).done;){var s=a.value;e.push(r.convert(n,s))}}catch(t){o.e(t)}finally{o.f()}return Promise.all(e)}};var O=r(82853),F=r(30633),N=r(68932);const z=function(t,e){if(!t)throw new Error("No array buffer provided.");var r=new DataView(t),n=0,i={},a={},o={};if(i.magic=F.Z.decode(new Uint8Array(t,n,4)),n+=4,i.magic){i.version=r.getUint32(n,!0),n+=Uint32Array.BYTES_PER_ELEMENT,i.byteLength=r.getUint32(n,!0),n+=Uint32Array.BYTES_PER_ELEMENT,i.FTJSONLength=r.getUint32(n,!0),n+=Uint32Array.BYTES_PER_ELEMENT,i.FTBinaryLength=r.getUint32(n,!0),n+=Uint32Array.BYTES_PER_ELEMENT,i.BTJSONLength=r.getUint32(n,!0),n+=Uint32Array.BYTES_PER_ELEMENT,i.BTBinaryLength=r.getUint32(n,!0),n+=Uint32Array.BYTES_PER_ELEMENT;var s={};if(i.FTJSONLength>0){var l=n,c=t.slice(l,i.FTJSONLength+l),u=F.Z.decode(new Uint8Array(c));s=JSON.parse(u)}if(i.FTBinaryLength>0&&(o=function(t,e,r){var n,i=new f.BufferGeometry,a=F.Z.decode(new Uint8Array(t,e,r)),o=JSON.parse(a);if(o.POINTS_LENGTH&&(n=o.POINTS_LENGTH),o.POSITION){var s=o.POSITION.byteOffset+a.length+e,l=new Float32Array(t,s,3*n);i.setAttribute("position",new f.BufferAttribute(l,3))}if(o.RGB){var c=o.RGB.byteOffset+a.length+e,u=new Uint8Array(t,c,3*n);i.setAttribute("color",new f.BufferAttribute(u,3,!0))}if(o.POSITION_QUANTIZED)throw new Error("For pnts loader, POSITION_QUANTIZED: not yet managed");if(o.RGBA)throw new Error("For pnts loader, RGBA: not yet managed");if(o.RGB565)throw new Error("For pnts loader, RGB565: not yet managed");if(o.NORMAL)throw new Error("For pnts loader, NORMAL: not yet managed");if(o.NORMAL_OCT16P)throw new Error("For pnts loader, NORMAL_OCT16P: not yet managed");if(o.BATCH_ID)throw new Error("For pnts loader, BATCH_ID: not yet managed");return{geometry:i,offset:o.RTC_CENTER?(new f.Vector3).fromArray(o.RTC_CENTER):void 0}}(t,n,i.FTJSONLength)),i.BTJSONLength>0){var h=n+i.FTJSONLength+i.FTBinaryLength,d=t.slice(h,i.BTJSONLength+i.BTBinaryLength+h);o=function(t,e){if(t.geometry)return e.content&&e.content.Classification&&t.geometry.setAttribute("classification",new f.BufferAttribute(new Uint8Array(e.content.Classification),1,!0)),t}(o,a=new N.Z(d,i.BTJSONLength,i.BTBinaryLength,s.BATCH_ID&&s.BATCH_LENGTH?s.BATCH_LENGTH:s.POINTS_LENGTH,e))}var p={point:o,batchTable:a};return Promise.resolve(p)}throw new Error("Invalid pnts file.")};var G=r(33347),Z=r(52521),V=r(32204);function Q(t,e,r){var n=f.LoaderUtils.extractUrlBase(r),i={gltfUpAxis:e.tileset.asset.gltfUpAxis,urlBase:n,overrideMaterials:e.overrideMaterials,doNotPatchMaterial:e.doNotPatchMaterial,opacity:e.opacity,registeredExtensions:e.registeredExtensions,layer:e};return O.ZP.parse(t,i).then((function(t){return{batchTable:t.batchTable,object3d:t.gltf.scene}}))}function j(t,e){return z(t,e.registeredExtensions).then((function(t){var r=e.material?e.material.clone():new V.ZP({size:.05,mode:e.pntsMode,shape:e.pntsShape,classification:e.classification,sizeMode:e.pntsSizeMode,minAttenuatedSize:e.pntsMinAttenuatedSize,maxAttenuatedSize:e.pntsMaxAttenuatedSize});(0,Z.Z)(r,e);var n=new f.Points(t.point.geometry,r);return t.point.offset&&n.position.copy(t.point.offset),{object3d:n,batchTable:t.batchTable}}))}const W={executeCommand:function(t){var e=t.layer,r=t.metadata,n=new f.Object3D;!function(t,e,r,n){t.frustumCulled=!1,t.layer=e,r.transform&&t.applyMatrix4(r.transform),t.geometricError=r.geometricError,t.tileId=r.tileId,r.refine?t.additiveRefinement="ADD"===r.refine.toUpperCase():t.additiveRefinement=!!n&&n.additiveRefinement,t.viewerRequestVolume=r.viewerRequestVolume,t.boundingVolume=r.boundingVolume,t.updateMatrixWorld()}(n,e,r,t.requester);var i=r.content&&(r.content.url||r.content.uri),a=function(t){t.userData.metadata=r,t.layer=e};if(i){var o=i.startsWith("http")?i:r.baseURL+i,s={b3dm:Q,pnts:j};return G.Z.arrayBuffer(o,e.source.networkOptions).then((function(t){if(void 0!==t){var i,l=F.Z.decode(new Uint8Array(t,0,4));if("{"===l[0]){t=JSON.parse(F.Z.decode(new Uint8Array(t)));var c=o.slice(0,o.lastIndexOf("/")+1);e.tileset.extendTileset(t,r.tileId,c,e.registeredExtensions)}else if("b3dm"==l)i=s.b3dm;else{if("pnts"!=l)return Promise.reject("Unsupported magic code ".concat(l));i=s.pnts}if(i)return i(t,e,o).then((function(t){return n.content=t.object3d,t.batchTable&&(n.batchTable=t.batchTable),n.add(t.object3d),n.traverse(a),n}))}return n.traverse(a),n}))}return n.traverse(a),Promise.resolve(n)}};var H=r(99128),X=1;const q={executeCommand:function(t){var e=t.layer,r=t.requester;return r.load().then((function(n){var i=new f.Points(n,e.material);return function(t){var e=t.geometry.attributes.position.count,r=new Uint8Array(4*e),n=X++;if(e>65535||n>65535)return console.warn("Currently picking is limited to Points with less than 65535 elements and less than 65535 Points instances"),t;for(var i=0;i>24,r[4*i+1]=(16711680&a)>>16,r[4*i+2]=(65280&a)>>8,r[4*i+3]=(255&a)>>0}t.baseId=n,t.geometry.setAttribute("unique_id",new f.BufferAttribute(r,4,!0))}(i),i.frustumCulled=!1,i.matrixAutoUpdate=!1,e.isEntwinePointTileLayer||(i.position.copy(r.bbox.min),i.scale.copy(e.scale)),i.updateMatrix(),i.tightbbox=n.boundingBox.applyMatrix4(i.matrix),i.layer=e,i.extent=H.ZP.fromBox3(t.view.referenceCrs,r.bbox),i.userData.node=r,i}))}};var Y=r(13012);function J(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return K(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&(i+=o.priority,o.accumulator+=o.priority,(!e||o.accumulator>r)&&(e=o,r=o.accumulator))}}catch(t){a.e(t)}finally{a.f()}if(e)return e.accumulator-=i,e.q}(t.storages);e&&e.length>0;){var r=e.dequeue();if(!r.earlyDropFunction||!r.earlyDropFunction(r))return r;t.counters.pending--,t.counters.cancelled++,r.reject(new P(r))}};const rt=et;var nt=r(73773),it=r(85299),at=r(1857);function ot(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return st(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?st(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function st(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:{};if((0,i.Z)(this,m),!e)throw new Error("Invalid viewerDiv parameter (must non be null/undefined)");r=p.call(this),lt((0,o.Z)(r),yt,{writable:!0,value:[]}),lt((0,o.Z)(r),bt,{writable:!0,value:new Uint8Array(4)}),lt((0,o.Z)(r),xt,{writable:!0,value:void 0}),r.domElement=e,r.referenceCrs=t,n=a.renderer&&a.renderer.domElement?new S(a.renderer):new S(e,a.renderer),r.mainLoop=a.mainLoop||new v.ZP(new rt,n),r.scene=a.scene3D||new f.Scene,a.scene3D||(r.scene.matrixWorldAutoUpdate=!1),r.camera=new d.Z(r.referenceCrs,r.mainLoop.gfxEngine.getWindowSize().x,r.mainLoop.gfxEngine.getWindowSize().y,a.camera),r._frameRequesters={},r._resizeListener=function(){return r.resize()},window.addEventListener("resize",r._resizeListener,!1),r._changeSources=new Set,r._delayedFrameRequesterRemoval=[],r._allLayersAreReadyCallback=function(){r.getLayers().every((function(t){return t.ready}))&&0==r.mainLoop.scheduler.commandsWaitingExecutionCount()&&r.mainLoop.renderingState==v.HR&&(r.dispatchEvent({type:ut.LAYERS_INITIALIZED}),r.removeFrameRequester(v.Ao.UPDATE_END,r._allLayersAreReadyCallback))},r.camera.resize(r.domElement.clientWidth,r.domElement.clientHeight);var s,l=function(){r.removeEventListener(ut.LAYERS_INITIALIZED,l),r.dispatchEvent({type:ut.INITIALIZED})};return r.addEventListener(ut.LAYERS_INITIALIZED,l),(0,h.Z)((0,o.Z)(r),xt,new Uint8Array(4*r.camera.width*r.camera.height)),r.domElement.tabIndex=-1,a.disableFocusOnStart||r.domElement.focus(),r.domElement.addEventListener("mouseup",(function(t){2===t.button&&(s&&t.timeStamp-s<500&&r.domElement.dispatchEvent(new MouseEvent("dblclick-right",t)),s=t.timeStamp)})),vt.push((0,o.Z)(r)),a.webXR&&function(t,e){var r=e.scale||1,n=t.mainLoop.gfxEngine.renderer.xr;n.addEventListener("sessionstart",(function(){var e=t.camera.camera3D,i=function(a){"Escape"===a.key&&(document.removeEventListener("keydown",i),n.enabled=!1,t.camera.camera3D=e,t.scene.scale.multiplyScalar(1/r),t.scene.updateMatrixWorld(),function(){g.apply(this,arguments)}(n.getSession()),t.notifyChange(t.camera.camera3D,!0))};t.scene.scale.multiplyScalar(r),t.scene.updateMatrixWorld(),n.enabled=!0,n.getReferenceSpace("local");var a=t.camera.position(),o=(new f.Quaternion).setFromUnitVectors(new f.Vector3(0,0,1),a.geodesicNormal).invert(),s=new f.Quaternion(-1,0,0,1).normalize().multiply(o),l=e.position.clone().multiplyScalar(-r).applyQuaternion(s),c=new XRRigidTransform(l,s),u=n.getReferenceSpace().getOffsetReferenceSpace(c);n.setReferenceSpace(u),t.camera.camera3D=n.getCamera(),t.camera.resize(t.camera.width,t.camera.height),document.addEventListener("keydown",i,!1),n.setAnimationLoop((function(e){n.isPresenting&&t.camera.camera3D.cameras[0]&&(t.camera.camera3D.updateMatrix(),t.camera.camera3D.updateMatrixWorld(!0),t.notifyChange(t.camera.camera3D,!0)),t.mainLoop.step(t,e)}))}))}((0,o.Z)(r),a.webXR),r}return(0,a.Z)(m,[{key:"renderer",get:function(){var t,e;return null===(t=this.mainLoop)||void 0===t||null===(e=t.gfxEngine)||void 0===e?void 0:e.getRenderer()}},{key:"camera3D",get:function(){var t;return null===(t=this.camera)||void 0===t?void 0:t.camera3D}},{key:"dispose",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=vt.indexOf(this);if(-1!=e){window.removeEventListener("resize",this._resizeListener),this.controls&&("function"==typeof this.controls.dispose&&this.controls.dispose(),delete this.controls),this.removeAllFrameRequesters(),this.removeAllEvents();var r,n=ot(this.getLayers((function(t){return!t.isTiledGeometryLayer&&!t.isAtmosphere})));try{for(n.s();!(r=n.n()).done;){var i=r.value;this.removeLayer(i.id,t)}}catch(t){n.e(t)}finally{n.f()}var a,o=ot(this.getLayers((function(t){return t.isAtmosphere})));try{for(o.s();!(a=o.n()).done;){var s=a.value;this.removeLayer(s.id,t)}}catch(t){o.e(t)}finally{o.f()}var l,c=ot(this.getLayers((function(t){return t.isTiledGeometryLayer})));try{for(c.s();!(l=c.n()).done;){var u=l.value;this.removeLayer(u.id,t)}}catch(t){c.e(t)}finally{c.f()}vt.splice(e,1),this.scene.traverse(at.Z.cleanup)}else console.warn("View already disposed")}},{key:"addLayer",value:function(t,e){var r=this;if(!t||!t.isLayer)return Promise.reject(new Error("Add Layer type object"));if(this.getLayerById(t.id))return t._reject(new Error("Invalid id '".concat(t.id,"': id already used")));if(t=function(t,e,r){var n=e.source;if(r&&!e.extent&&(e.extent=r.extent,n&&!n.extent&&(n.extent=r.extent)),e.isGeometryLayer&&!e.isLabelLayer?e.crs=t.referenceCrs:e.crs||(r&&r.tileMatrixSets&&r.tileMatrixSets.includes(T.Z.formatToTms(n.crs))?e.crs=n.crs:e.crs=r&&r.extent.crs),e.isLabelLayer)t.mainLoop.gfxEngine.label2dRenderer.registerLayer(e);else if(e.labelEnabled||e.addLabelLayer){e.labelEnabled&&console.info("layer.labelEnabled is deprecated use addLabelLayer, instead of"),e.buildExtent=!0,e.structure="3d";var i=new it.Z("".concat(e.id,"-label"),{source:n,style:e.style,zoom:e.zoom,performance:e.addLabelLayer.performance,crs:n.crs,visible:e.visible,margin:15,forceClampToTerrain:e.addLabelLayer.forceClampToTerrain});e.addEventListener("visible-property-changed",(function(){i.visible=e.visible}));var a=function(r){r.layerId===e.id&&t.removeLayer(i.id),t.removeEventListener(ut.LAYER_REMOVED,a)};t.addEventListener(ut.LAYER_REMOVED,a),e.whenReady=e.whenReady.then((function(){return t.addLayer(i),e}))}return e}(this,t,e),e)if(t.isColorLayer){var i=this.getLayers((function(t){return t.isColorLayer}));if(t.sequence=i.length,!(e.countColorLayersTextures.apply(e,(0,n.Z)(i).concat([t]))<=(0,x.dn)()))return t._reject(new Error("Cant add color layer ".concat(t.id,": the maximum layer is reached")));e.attach(t)}else if(t.isElevationLayer&&"image/x-bil;bits=32"==t.source.format){var a,o;t.source.networkOptions.isWebGL2=null===(a=this.renderer)||void 0===a||null===(o=a.capabilities)||void 0===o?void 0:o.isWebGL2,e.attach(t)}else e.attach(t);else{if("function"!=typeof t.update)return t._reject(new Error("Cant add GeometryLayer: missing a update function"));if("function"!=typeof t.preUpdate)return t._reject(new Error("Cant add GeometryLayer: missing a preUpdate function"));(0,u.Z)(this,yt).push(t)}return t.object3d&&!t.object3d.parent&&t.object3d!==this.scene&&this.scene.add(t.object3d),Promise.all(t._promises).then((function(){t._resolve(),r.notifyChange(e||t,!1),r._frameRequesters[v.Ao.UPDATE_END]&&r._frameRequesters[v.Ao.UPDATE_END].includes(r._allLayersAreReadyCallback)||r.addFrameRequester(v.Ao.UPDATE_END,r._allLayersAreReadyCallback),r.dispatchEvent({type:ut.LAYER_ADDED,layerId:t.id})}),t._reject),t.whenReady}},{key:"removeLayer",value:function(t,e){var r=this.getLayerById(t);if(r){var n=r.parent;if(r.delete(e),n&&!n.detach(r))throw new Error("Error to detach ".concat(t," from ").concat(n.id));if(null==n&&(0,u.Z)(this,yt).splice((0,u.Z)(this,yt).findIndex((function(e){return e.id==t})),1),r.isColorLayer){var i,a=ot(this.getLayers((function(t){return t.isColorLayer})));try{for(a.s();!(i=a.n()).done;){var o=i.value;o.sequence>r.sequence&&o.sequence--}}catch(t){a.e(t)}finally{a.f()}}for(var s=0,l=0,c=vt;l0&&void 0!==arguments[0]?arguments[0]:void 0,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t&&(this._changeSources.add(t),this.mainLoop.gfxEngine.renderer.xr.isPresenting||!t.isTileMesh&&!t.isCamera||((0,u.Z)(this,xt).needsUpdate=!0)),this.mainLoop.scheduleViewUpdate(this,e)}},{key:"getLayers",value:function(t){var e,r=[],n=ot((0,u.Z)(this,yt));try{for(n.s();!(e=n.n()).done;){var i=e.value;if(t&&!t(i)||r.push(i),i.attachedLayers){var a,o=ot(i.attachedLayers);try{for(o.s();!(a=o.n()).done;){var s=a.value;t&&!t(s,i)||r.push(s)}}catch(t){o.e(t)}finally{o.f()}}}}catch(t){n.e(t)}finally{n.f()}return r}},{key:"getLayerById",value:function(t){return this.getLayers((function(e){return e.id===t}))[0]}},{key:"addFrameRequester",value:function(t,e){if("function"!=typeof e)throw new Error("frameRequester must be a function");this._frameRequesters[t]?this._frameRequesters[t].push(e):this._frameRequesters[t]=[e]}},{key:"removeFrameRequester",value:function(t,e){this._frameRequesters[t].includes(e)?this._delayedFrameRequesterRemoval.push({when:t,frameRequester:e}):console.error("Invalid call to removeFrameRequester: frameRequester isn't registered")}},{key:"removeAllFrameRequesters",value:function(){for(var t in this._frameRequesters)if(Object.prototype.hasOwnProperty.call(this._frameRequesters,t)){var e,r=ot(this._frameRequesters[t]);try{for(r.s();!(e=r.n()).done;){var n=e.value;this.removeFrameRequester(t,n)}}catch(t){r.e(t)}finally{r.f()}}this._executeFrameRequestersRemovals()}},{key:"removeAllEvents",value:function(){if(void 0!==this._listeners){for(var t in this._listeners)Object.prototype.hasOwnProperty.call(this._listeners,t)&&delete this._listeners[t];this._listeners=void 0}}},{key:"_executeFrameRequestersRemovals",value:function(){var t,e=ot(this._delayedFrameRequesterRemoval);try{for(e.s();!(t=e.n()).done;){var r=t.value,n=this._frameRequesters[r.when].indexOf(r.frameRequester);n>=0?this._frameRequesters[r.when].splice(n,1):console.warn("FrameReq has already been removed")}}catch(t){e.e(t)}finally{e.f()}this._delayedFrameRequesterRemoval.length=0}},{key:"execFrameRequesters",value:function(t,e,r){if(this._frameRequesters[t]){this._delayedFrameRequesterRemoval.length>0&&this._executeFrameRequestersRemovals();for(var n=arguments.length,i=new Array(n>3?n-3:0),a=3;a1&&void 0!==arguments[1]?arguments[1]:ht,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=this.domElement.getBoundingClientRect();if(t.touches&&t.touches.length)return e.set(t.touches[r].clientX-n.x,t.touches[r].clientY-n.y);if(void 0!==t.offsetX&&void 0!==t.offsetY){var i=t.target.getBoundingClientRect();return e.set(i.x+t.offsetX-n.x,i.y+t.offsetY-n.y)}}},{key:"eventToNormalizedCoords",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.viewToNormalizedCoords(this.eventToViewCoords(t,ht,e))}},{key:"viewToNormalizedCoords",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ht;return e.x=t.x/this.camera.width*2-1,e.y=t.y/this.camera.height*-2+1,e}},{key:"normalizedToViewCoords",value:function(t){return ht.x=.5*(t.x+1)*this.camera.width,ht.y=-.5*(t.y-1)*this.camera.height,ht}},{key:"pickObjectsAt",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,i=[];if(n&&0!==n.length||(n=this.getLayers((function(t){return t.isGeometryLayer}))),Array.isArray(n)||(n=[n]),n.forEach((function(t){"string"==typeof t&&(t=e.getLayerById(t)),t&&(t.isGeometryLayer||t.isObject3D)&&i.push(t)})),0==i.length)return[];for(var a=[],o=t instanceof Event?this.eventToViewCoords(t):t,s=0,l=i;s0&&void 0!==arguments[0]?arguments[0]:.28;return this.camera3D.isOrthographicCamera?.001*t/this.getPixelsToMeters():this.getScaleFromDistance(t,this.getDistanceFromCamera())}},{key:"getScaleFromDistance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.28,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;t/=1e3;var r=f.MathUtils.degToRad(this.camera3D.fov);return t*(this.camera.height/(2*e*Math.tan(.5*r)))}},{key:"getDistanceFromCamera",value:function(t){return this.getPickingPositionFromDepth(t,At),this.camera3D.position.distanceTo(At)}},{key:"getPixelsToMeters",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1?arguments[1]:void 0;return this.camera3D.isOrthographicCamera?t*(ct=(this.camera3D.right-this.camera3D.left)/this.camera3D.zoom)/this.camera.width:this.getPixelsToMetersFromDistance(t,this.getDistanceFromCamera(e))}},{key:"getPixelsToMetersFromDistance",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1)/this.camera._preSSE}},{key:"getMetersToPixels",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1?arguments[1]:void 0;return this.camera3D.isOrthographicCamera?(ct=(this.camera3D.right-this.camera3D.left)/this.camera3D.zoom,t*this.camera.width/ct):this.getMetersToPixelsFromDistance(t,this.getDistanceFromCamera(e))}},{key:"getMetersToPixelsFromDistance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.camera._preSSE*t/e}},{key:"pickFeaturesAt",value:function(t){for(var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,i=arguments.length,a=new Array(i>2?i-2:0),o=2;o0&&h.forEach((function(t){return l[t.layer.id].push(t)})),0==s.length)return l;this.getPickingPositionFromDepth(u,At),gt.crs=this.referenceCrs,gt.setFromVector3(At);var f={M:this.getPixelsToMeters(r,u),D:.001*r};this.isPlanarView?f.D=f.M:this.getPixelsToDegrees&&(f.D=this.getMetersToDegrees(f.M));var d,p=ot(nt.Z.pickTilesAt(this,u,r,this.tileLayer));try{for(p.s();!(d=p.n()).done;){var m=d.value;if(m.object.material){var A,g=ot(m.object.material.getLayers(s));try{var v=function(){var t,e=A.value,r=ot(e.textures);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.features&&(c=T.Z.isMetricUnit(n.features.crs)?f.M:f.D,R.Z.filterFeaturesUnderCoordinate(gt,n.features,c).forEach((function(t){l[e.id].find((function(e){return e.geometry===t.geometry}))||l[e.id].push(t)})))}}catch(t){r.e(t)}finally{r.f()}};for(g.s();!(A=g.n()).done;)v()}catch(t){g.e(t)}finally{g.f()}}}}catch(t){p.e(t)}finally{p.f()}return l}},{key:"readDepthBuffer",value:function(t,e,r,n,i){var a=this.mainLoop.gfxEngine,o=this.tileLayer.wireframe,s=this.tileLayer.opacity,l=this.tileLayer.visible;o&&(this.tileLayer.wireframe=!1),s<1&&(this.tileLayer.opacity=1),l||(this.tileLayer.visible=!0);var c=this.tileLayer.level0Nodes.map((function(t){return C.Z.push(t,C.Z.MODES.DEPTH)}));return i=a.renderViewToBuffer({camera:this.camera,scene:this.tileLayer.object3d},{x:t,y:e,width:r,height:n,buffer:i}),c.forEach((function(t){return t()})),this.tileLayer.wireframe!==o&&(this.tileLayer.wireframe=o),this.tileLayer.opacity!==s&&(this.tileLayer.opacity=s),this.tileLayer.visible!==l&&(this.tileLayer.visible=l),i}},{key:"getPickingPositionFromDepth",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new f.Vector3;if(this.tileLayer&&0!=this.tileLayer.level0Nodes.length&&this.tileLayer.level0Nodes[0]){var r,n=this.mainLoop,i=0==n.scheduler.commandsWaitingExecutionCount()&&n.renderingState==v.HR,a=n.gfxEngine,o=a.getWindowSize();if((t=t||o.clone().multiplyScalar(.5)).x=Math.floor(t.x),t.y=Math.floor(t.y),i){(0,u.Z)(this,xt).needsUpdate&&(this.readDepthBuffer(0,0,o.x,o.y,(0,u.Z)(this,xt)),(0,u.Z)(this,xt).needsUpdate=!1);var s=4*((o.y-t.y-1)*o.x+t.x);r=(0,u.Z)(this,xt).slice(s,s+4)}else r=this.readDepthBuffer(t.x,t.y,1,1,(0,u.Z)(this,bt));if(dt.x=t.x/o.x*2-1,dt.y=-t.y/o.y*2+1,y.Z.isLogDepthBufferSupported()&&"PerspectiveCamera"==this.camera3D.type){pt.origin.copy(this.camera3D.position),pt.direction.set(dt.x,dt.y,.5),ft.multiplyMatrices(this.camera3D.matrixWorld,ft.copy(this.camera3D.projectionMatrix).invert()),pt.direction.applyMatrix4(ft),pt.direction.sub(pt.origin),mt.set(0,0,1),mt.applyMatrix4(ft),mt.sub(pt.origin);var l=mt.angleTo(pt.direction),c=a.depthBufferRGBAValueToOrthoZ(r,this.camera3D)/Math.cos(l);e.addVectors(this.camera3D.position,pt.direction.setLength(c))}else{var h=a.depthBufferRGBAValueToOrthoZ(r,this.camera3D);e.set(dt.x,dt.y,h),e.unproject(this.camera3D)}if(!(e.length()>1e7))return e}else e=void 0}},{key:"pickTerrainCoordinates",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new I.Z(this.referenceCrs);return t instanceof Event?this.eventToViewCoords(t):t&&void 0!==t.x&&void 0!==t.y?ht.copy(t):ht.set(this.mainLoop.gfxEngine.width/2,this.mainLoop.gfxEngine.height/2),this.getPickingPositionFromDepth(ht,At),gt.crs=this.referenceCrs,gt.setFromVector3(At),gt.as(e.crs,e),e}},{key:"pickCoordinates",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new I.Z(this.referenceCrs);return console.warn("Deprecated, use View#pickTerrainCoordinates instead."),this.pickTerrainCoordinates(t,e)}},{key:"resize",value:function(t,e){t<0||e<0?console.warn("Trying to resize the View with negative height (".concat(e,") or width (").concat(t,"). Skipping resize.")):(null==t&&(t=this.domElement.clientWidth),null==e&&(e=this.domElement.clientHeight),(0,h.Z)(this,xt,new Uint8Array(4*t*e)),this.mainLoop.gfxEngine.onWindowResize(t,e),0!==t&&0!==e&&(this.camera.resize(t,e),this.notifyChange(this.camera3D)))}}]),m}(f.EventDispatcher)},24266:(t,e,r)=>{"use strict";r.d(e,{Z:()=>C,y:()=>w});var n=r(70885),i=r(15671),a=r(43144),o=r(97326),s=r(79340),l=r(82963),c=r(61120),u=r(86033),h=r(13092),f=r(99477),d=r(20193),p=r(77474),m=r(45571),A=r(83500),g=r(32204),v=(r(48891),r(97498)),y=r(12306);function b(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return x(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=i.position.array.length&&l()}}}))}},{key:"updateStyle",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!this._style)return!1;if(!this.object3d)return!1;var r=[],i=new Map;this.object3d.traverse((function(t){if(M(t)){var r=E(t);if(e&&!e.includes(r))return;i.has(r)||i.set(r,[]),i.get(r).push(t)}}));var a,o=b(i);try{var s=function(){var e=(0,n.Z)(a.value,2),i=e[0],o=e[1],s=t.tilesC3DTileFeatures.get(i);o.forEach((function(e){e.geometry.clearGroups(),e.material=[];var i,a=b(s);try{var o=function(){var r=(0,n.Z)(i.value,2)[1];if(r.object3d!=e)return"continue";var a=null;a="function"==typeof t._style.fill.color?new f.Color(t._style.fill.color(r)):new f.Color(t._style.fill.color);var o;o="function"==typeof t._style.fill.opacity?t._style.fill.opacity(r):t._style.fill.opacity;var s=a.getHexString()+o,l=null;(0,u.Z)(t,S).has(s)?l=(0,u.Z)(t,S).get(s):(l=new f.MeshStandardMaterial({color:a,opacity:o,transparent:o<1,alphaTest:.09}),(0,u.Z)(t,S).set(s,l));for(var c=-1,h=0;h{"use strict";r.d(e,{Z:()=>h,c:()=>u});var n=r(15671),i=r(43144),a=r(79340),o=r(82963),s=r(61120),l=r(66165),c=r(52872);function u(t){var e;return null==t||null===(e=t.attachedLayers.filter((function(t){return t.isGeoidLayer}))[0])||void 0===e?void 0:e.visible}const h=function(t){(0,a.Z)(u,t);var e,r,l=(e=u,r=function(){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(t){return!1}}(),function(){var t,n=(0,s.Z)(e);if(r){var i=(0,s.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,o.Z)(this,t)});function u(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.Z)(this,u),(e=l.call(this,t,r)).isGeoidLayer=!0,e.defineLayerProperty("visible",!0),e}return(0,i.Z)(u,[{key:"updateNodeZ",value:function(t){t.material.geoidHeight=this.visible?t.geoidHeight:0,t.obb.updateZ({geoidHeight:t.material.geoidHeight})}},{key:"update",value:function(t,e,r,n){var i=this;if(n&&r.material){var a=r.getExtentsByProjection(e.crs),o=a[0].zoom;if(!(o>e.zoom.max||o{"use strict";r.d(e,{Z:()=>d});var n=r(15671),i=r(43144),a=r(97326),o=r(79340),s=r(82963),l=r(61120),c=r(66165),u=r(73773),h=r(1537),f=r(1857);const d=function(t){(0,o.Z)(d,t);var e,r,c=(e=d,r=function(){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(t){return!1}}(),function(){var t,n=(0,l.Z)(e);if(r){var i=(0,l.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,s.Z)(this,t)});function d(t,e){var r,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,n.Z)(this,d),o.cacheLifeTime=null!==(r=o.cacheLifeTime)&&void 0!==r?r:h.D.GEOMETRY;var s=o.visible;if(delete o.visible,(i=c.call(this,t,o)).isGeometryLayer=!0,!e||!e.isObject3D)throw new Error("Missing/Invalid object3d parameter (must be a\n three.js Object3D instance)");return"Group"===e.type&&""===e.name&&(e.name=t),Object.defineProperty((0,a.Z)(i),"object3d",{value:e,writable:!1,configurable:!0}),i.opacity=1,i.wireframe=!1,i.attachedLayers=[],i.visible=null==s||s,Object.defineProperty(i.zoom,"max",{value:1/0,writable:!1}),i.filteringExtent=!i.source.isFileSource,i.structure="3d",i}return(0,i.Z)(d,[{key:"visible",get:function(){return this.object3d.visible},set:function(t){if(this.object3d.visible!==t){var e={type:"visible-property-changed",previous:{},new:{}};e.previous.visible=this.object3d.visible,e.new.visible=t,this.dispatchEvent(e),this.object3d.visible=t}}},{key:"getObjectToUpdateForAttachedLayers",value:function(t){if(t.parent&&t.material)return{element:t,parent:t.parent}}},{key:"postUpdate",value:function(){}},{key:"culling",value:function(){return!0}},{key:"attach",value:function(t){if(!t.update)throw new Error("Missing 'update' function -> can't attach layer\n ".concat(t.id));this.attachedLayers.push(t),t.parent=this}},{key:"detach",value:function(t){var e=this.attachedLayers.length;return this.attachedLayers=this.attachedLayers.filter((function(e){return e.id!=t.id})),t.parent=void 0,this.attachedLayers.length2&&void 0!==arguments[2]?arguments[2]:this.options.defaultPickingRadius,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return u.Z.pickObjectsAt(t,e,r,this.object3d,n)}}]),d}(c.Z)},63133:(t,e,r)=>{"use strict";r.d(e,{$:()=>h,Z:()=>u});var n=r(42982),i=r(79340),a=r(82963),o=r(61120),s=r(15671),l=r(43144),c=r(99128);var u=function(){function t(e){(0,s.Z)(this,t),this.layer=e}return(0,l.Z)(t,[{key:"clear",value:function(){}},{key:"update",value:function(){}}]),t}(),h=function(t){(0,i.Z)(h,t);var e,r,u=(e=h,r=function(){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(t){return!1}}(),function(){var t,n=(0,o.Z)(e);if(r){var i=(0,o.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,a.Z)(this,t)});function h(t){var e;return(0,s.Z)(this,h),(e=u.call(this,t)).displayed={tiles:new Set},Object.defineProperty(e.displayed,"layers",{get:function(){var t=[];return e.displayed.tiles.forEach((function(e){var r=e.material;t=(0,n.Z)(new Set([].concat((0,n.Z)(t),(0,n.Z)(r.colorLayerIds.filter((function(t){return r.getLayer(t)}))),(0,n.Z)(r.elevationLayerIds))))})),e.layer.attachedLayers.filter((function(e){return t.includes(e.id)}))}}),Object.defineProperty(e.displayed,"extent",{get:function(){var t=new c.ZP(e.layer.extent.crs,1/0,-1/0,1/0,-1/0);return t.min=1/0,t.max=-1/0,e.displayed.tiles.forEach((function(e){t.union(e.extent),t.min=Math.min(e.obb.z.min,t.min),t.max=Math.max(e.obb.z.max,t.max)})),t}}),e}return(0,l.Z)(h,[{key:"clear",value:function(){this.displayed.tiles.clear()}},{key:"update",value:function(t){t.material.visible?this.displayed.tiles.add(t):this.displayed.tiles.delete(t)}}]),h}(u)},85299:(t,e,r)=>{"use strict";r.d(e,{Z:()=>Y});var n=r(97326),i=r(18415),a=r(4942);function o(t,e,r,n){return o="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,r,n){var o,s=(0,i.Z)(t,e);if(s){if((o=Object.getOwnPropertyDescriptor(s,e)).set)return o.set.call(n,r),!0;if(!o.writable)return!1}if(o=Object.getOwnPropertyDescriptor(n,e)){if(!o.writable)return!1;o.value=r,Object.defineProperty(n,e,o)}else(0,a.Z)(n,e,r);return!0},o(t,e,r,n)}var s=r(88301),l=r(79340),c=r(82963),u=r(61120),h=r(15671),f=r(43144),d=r(13092),p=r(86033),m=r(99477),A=r(52872),g=r(1857),v=r(20193),y=r(60145),b=r(99128),x=r(57918),w=r(94596),_=r(48891),E=r(6755);function M(t,e){I(t,e),e.add(t)}function S(t,e,r){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return r}function C(t){var e=function(){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(t){return!1}}();return function(){var r,n=(0,u.Z)(t);if(e){var i=(0,u.Z)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,c.Z)(this,r)}}function T(t,e,r){I(t,e),e.set(t,r)}function I(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}var R=new _.uP,B=new y.Z("EPSG:4326",0,0,0),k=new b.ZP("EPSG:4326",0,0,0,0),L=new m.Vector2,P=new m.Vector2,D=new m.Vector2,U=new WeakMap,O=function(){function t(){(0,h.Z)(this,t),T(this,U,{writable:!0,value:!1}),this.dom=document.createElement("div"),this.dom.style.display="none",this.visible=!0}return(0,f.Z)(t,[{key:"visible",get:function(){return(0,p.Z)(this,U)},set:function(t){t!==(0,p.Z)(this,U)&&((0,d.Z)(this,U,t),this.dom.style.display=t?"block":"none")}},{key:"hide",value:function(){this.visible=!1}},{key:"show",value:function(){this.visible=!0}},{key:"add",value:function(t){this.dom.append(t.dom)}}]),t}(),F=function(t){(0,l.Z)(r,t);var e=C(r);function r(t){var n;return(0,h.Z)(this,r),(n=e.call(this)).nodeParent=t,n.needsUpdate=!0,n}return(0,f.Z)(r,[{key:"initializeDom",value:function(){this.domElements=new O,this.domElements.labels=new O,this.domElements.add(this.domElements.labels),this.domElements.labels.dom.style.opacity="0"}},{key:"addLabel",value:function(t){this.add(t),this.domElements.labels.dom.append(t.content),t.initDimensions(),this.nodeParent.layer.isGlobeLayer&&this.nodeParent.level<4&&(t.horizonCullingPoint=new m.Vector3)}},{key:"removeLabel",value:function(t){this.remove(t),this.domElements.labels.dom.removeChild(t.content)}},{key:"updatePosition",value:function(t){this.needsUpdate&&(this.needsAltitude&&t.updateElevationFromLayer(this.nodeParent.layer,[this.nodeParent]),t.update3dPosition(this.nodeParent.layer.crs),t.updateHorizonCullingPoint())}},{key:"count",value:function(){return this.children.length}},{key:"labels",get:function(){return this.children}}]),r}(m.Group),N=new WeakMap,z=new WeakSet,G=new WeakSet,Z=new WeakSet,V=new WeakSet,Q=new WeakSet;function j(t){this.object3d.add(t)}function W(t){this.toHide.add(t)}function H(t){var e,r;return null!==(e=t.parent)&&void 0!==e&&e.isTileMesh?(null===(r=t.parent.link[this.id])||void 0===r?void 0:r.domElements)||S(this,Z,H).call(this,t.parent):this.domElement}function X(t){var e=this;return t.children.every((function(t){var r;return t.layerUpdateState&&(null===(r=t.layerUpdateState[e.id])||void 0===r?void 0:r.hasFinished())}))}function q(t){var e=this,r=t.children.slice();(0,p.Z)(this,N).reset(),r.sort((function(t,e){return e.order-t.order})),r.forEach((function(r){t.nodeParent.extent.planarDimensions(L),B.crs=t.nodeParent.extent.crs,B.setFromValues(t.nodeParent.extent.west,t.nodeParent.extent.north,0).toVector3(P),B.copy(r.coordinates).as(t.nodeParent.extent.crs,B).toVector3(D),D.sub(P),D.y+=L.y,D.divide(L).multiplyScalar((0,p.Z)(e,N).width),r.updateProjectedPosition(D.x,D.y),(0,p.Z)(e,N).insert(r)||t.removeLabel(r)}))}const Y=function(t){(0,l.Z)(r,t);var e=C(r);function r(t){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,h.Z)(this,r);var o=a.domElement;return delete a.domElement,i=e.call(this,t,a.object3d||new m.Group,a),M((0,n.Z)(i),Q),M((0,n.Z)(i),V),M((0,n.Z)(i),Z),M((0,n.Z)(i),G),M((0,n.Z)(i),z),T((0,n.Z)(i),N,{writable:!0,value:new E.R}),i.isLabelLayer=!0,i.domElement=new O,i.domElement.show(),i.domElement.dom.id="itowns-label-".concat(i.id),i.buildExtent=!0,i.crs=a.source.crs,i.performance=a.performance||!0,i.forceClampToTerrain=a.forceClampToTerrain||!1,i.toHide=new m.Group,i.labelDomelement=o,i.margin=a.margin,i}return(0,f.Z)(r,[{key:"visible",get:function(){return(0,s.Z)((0,u.Z)(r.prototype),"visible",this)},set:function(t){var e,n;(function(t,e,r,n,i){if(!o(t,e,r,n||t)&&i)throw new TypeError("failed to set property")})((0,u.Z)(r.prototype),"visible",t,this,!0),t?null===(e=this.domElement)||void 0===e||e.show():null===(n=this.domElement)||void 0===n||n.hide()}},{key:"submittedLabelNodes",get:function(){return this.object3d.children}},{key:"convert",value:function(t,e){var r=this,n=[];return e.as(t.crs,k),B.crs=t.crs,R.setZoom(e.zoom),t.features.forEach((function(e){var i,a,o,s;if(e.type===w.tg.POINT){R.setFeature(e);var l=null===(i=e.style)||void 0===i||null===(a=i.text)||void 0===a?void 0:a.field,c=null===(o=e.style)||void 0===o||null===(s=o.point)||void 0===s?void 0:s.base_altitude,u=c instanceof Function&&"baseAltitudeDefault"==c.name;n.needsAltitude=n.needsAltitude||!0===r.forceClampToTerrain||u&&!e.hasRawElevationData,e.geometries.forEach((function(i){if(B.setFromArray(e.vertices,i.size*i.indices[0].offset),B.applyMatrix4(t.matrixWorld),k.isPointInside(B)){var a,o=i.properties.style&&i.properties.style.text&&i.properties.style.text.field;R.setGeometry(i),r.style.setContext(R);var s=r.style.text&&r.style.text.field;if(r.labelDomelement)a=(0,_.Lu)(r.labelDomelement,R);else if(!(o||l||s||i.properties.style&&(i.properties.style.icon.source||i.properties.style.icon.key)||e.style&&e.style.icon&&(e.style.icon.source||e.style.icon.key)||r.style.icon&&(r.style.icon.source||r.style.icon.key)))return;var c=new x.Z(a,B.clone(),r.style);c.layerId=r.id,c.padding=r.margin||c.padding,n.push(c)}}))}})),n}},{key:"preUpdate",value:function(t,e){e.has(this.parent)&&(this.object3d.clear(),(0,p.Z)(this,N).width=.5*this.parent.maxScreenSizeNode,(0,p.Z)(this,N).height=.5*this.parent.maxScreenSizeNode,(0,p.Z)(this,N).resize())}},{key:"update",value:function(t,e,r,n){var i=this;if(n||!r.link[e.id]){var a=r.link[e.id]||new F(r);if(r.link[e.id]=a,!this.frozen&&r.visible&&this.visible){if(!r.material.visible&&S(this,V,X).call(this,r))return S(this,G,W).call(this,a);var o=r.getExtentsByProjection(this.source.crs)||[r.extent],s=o[0].zoom;if(se.zoom.max)return S(this,G,W).call(this,a);if(void 0===r.layerUpdateState[this.id]&&(r.layerUpdateState[this.id]=new A.Z),this.source.extentInsideLimit(r.extent,s)){if(S(this,V,X).call(this,r.parent))return r.material.visible||(a.needsUpdate=!0),void S(this,z,j).call(this,a);if(r.layerUpdateState[this.id].canTryUpdate()){r.layerUpdateState[this.id].newTry();var l={layer:this,extentsSource:o,view:t.view,requester:r};return t.scheduler.execute(l).then((function(e){if(e){var n=t.view.mainLoop.gfxEngine.label2dRenderer;a.initializeDom(),S(i,Z,H).call(i,r).add(a.domElements),e.forEach((function(t){r.parent?(a.needsAltitude=a.needsAltitude||t.needsAltitude,t.forEach((function(t){r.extent.isPointInside(t.coordinates)&&a.addLabel(t)}))):t.forEach((function(t){g.Z.removeChildrenAndCleanupRecursively(i,t),n.removeLabelDOM(t)}))})),a.count()&&(a.domElements.labels.hide(),a.domElements.labels.dom.style.opacity="1.0",r.addEventListener("show",(function(){return a.domElements.labels.show()})),r.addEventListener("hidden",(function(){return S(i,G,W).call(i,a)})),r.addEventListener("removed",(function(){return i.removeNodeDomElement(r)})),a.needsAltitude&&r.material.getElevationLayer()&&r.material.getElevationLayer().addEventListener("rasterElevationLevelChanged",(function(){a.needsUpdate=!0})),i.performance&&S(i,Q,q).call(i,a)),r.layerUpdateState[i.id].noMoreUpdatePossible()}}))}}else r.layerUpdateState[this.id].noMoreUpdatePossible()}}else g.Z.removeChildrenAndCleanupRecursively(this,r)}},{key:"removeLabelsFromNodeRecursive",value:function(t){var e=this;t.children.forEach((function(t){t.link[e.id]&&delete t.link[e.id],e.removeLabelsFromNodeRecursive(t)})),this.removeNodeDomElement(t)}},{key:"removeNodeDomElement",value:function(t){var e;if(null!==(e=t.link[this.id])&&void 0!==e&&e.domElements){var r=t.link[this.id].domElements.dom;r.parentElement.removeChild(r),delete t.link[this.id].domElements}}},{key:"delete",value:function(t){var e=this;t&&this.cache.clear(),this.domElement.dom.parentElement.removeChild(this.domElement.dom),this.parent.level0Nodes.forEach((function(t){return e.removeLabelsFromNodeRecursive(t)}))}}]),r}(v.Z)},66165:(t,e,r)=>{"use strict";r.d(e,{M:()=>g,Z:()=>A});var n=r(15671),i=r(43144),a=r(97326),o=r(79340),s=r(82963),l=r(61120),c=r(99477),u=r(54919),h=r(63133),f=r(51123),d=r(1537),p=r(48891);function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{};if((0,n.Z)(this,m),i.projection&&(console.warn("Layer projection parameter is deprecated, use crs instead."),i.crs=i.crs||i.projection),void 0===i.source||!0===i.source)throw new Error("Layer ".concat(t," needs Source"));return(e=c.call(this)).isLayer=!0,!i.style||i.style instanceof p.ZP||("string"==typeof(null===(r=i.style.fill)||void 0===r?void 0:r.pattern)&&(console.warn("Using style.fill.pattern = { source: Img|url } is adviced"),i.style.fill.pattern={source:i.style.fill.pattern}),i.style=new p.ZP(i.style)),e.style=i.style||new p.ZP,Object.assign((0,a.Z)(e),i),Object.defineProperty((0,a.Z)(e),"id",{value:t,writable:!1}),e.options=i.options||{},e.updateStrategy||(e.updateStrategy={type:u.R3,options:{}}),e.defineLayerProperty("frozen",!1),i.zoom?(e.zoom={max:i.zoom.max,min:i.zoom.min||0},null==e.zoom.max&&(e.zoom.max=1/0)):e.zoom={max:1/0,min:0},e.info=new h.Z((0,a.Z)(e)),e.source=e.source||new f.ZP({url:"none"}),e.ready=!1,e._promises=[],e.whenReady=new Promise((function(t,r){e._resolve=t,e._reject=r})).then((function(){return e.ready=!0,e.source.onLayerAdded({out:(0,a.Z)(e)}),(0,a.Z)(e)})),e._promises.push(e.source.whenReady),e.cache=new d.Z(i.cacheLifeTime),e.mergeFeatures=void 0===e.mergeFeatures||i.mergeFeatures,e.filter=e.filter||e.source.filter,e}return(0,i.Z)(m,[{key:"addInitializationStep",value:function(){var t;return this._promises.push(new Promise((function(e){t=e}))),t}},{key:"defineLayerProperty",value:function(t,e,r){var n=this,i=Object.getOwnPropertyDescriptor(this,t);if(!i||!i.set){var a=null==this[t]?e:this[t];Object.defineProperty(this,t,{get:function(){return a},set:function(e){if(a!==e){var i={type:"".concat(t,"-property-changed"),previous:{},new:{}};i.previous[t]=a,i.new[t]=e,a=e,r&&r(n,t),n.dispatchEvent(i)}}})}}},{key:"convert",value:function(t){return t}},{key:"getData",value:function(t,e){var r=this,n=this.source.requestToKey(this.source.isVectorSource?e:t),i=this.cache.getByArray(n);return i||(i=this.source.loadData(t,this).then((function(t){return r.convert(t,e)}),(function(t){throw t})),this.cache.setByArray(i,n)),i}},{key:"isValidData",value:function(){}},{key:"delete",value:function(){console.warn("Function delete doesn't exist for this layer")}}]),m}(c.EventDispatcher);var g={moveLayerToIndex:function(t,e,r){e=Math.min(e,r.length-1),e=Math.max(e,0);var n,i=t.sequence,a=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(r);try{for(a.s();!(n=a.n()).done;){var o=n.value;o.id===t.id?o.sequence=e:o.sequence>i&&o.sequence<=e?o.sequence--:o.sequence>=e&&o.sequence0&&this.moveLayerToIndex(t,t.sequence-1,e)},moveLayerUp:function(t,e){var r=e.length-1;t.sequence{"use strict";r.d(e,{Z:()=>o});var n=r(15671),i=r(43144),a=[1,3,7,60];const o=function(){function t(){(0,n.Z)(this,t),this.state=0,this.lastErrorTimestamp=0,this.errorCount=0,this.failureParams={lowestLevelError:1/0}}return(0,i.Z)(t,[{key:"hasFinished",value:function(){return 4==this.state}},{key:"canTryUpdate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();switch(this.state){case 0:return!0;case 3:case 1:case 4:return!1;default:return 1e3*this.secondsUntilNextTry()<=t-this.lastErrorTimestamp}}},{key:"secondsUntilNextTry",value:function(){if(2!==this.state)return 0;var t=Math.max(0,Math.min(this.errorCount,a.length)-1);return a[t]}},{key:"newTry",value:function(){this.state=1}},{key:"success",value:function(){this.lastErrorTimestamp=0,this.state=0}},{key:"noMoreUpdatePossible",value:function(){this.state=4}},{key:"noData",value:function(t){this.state=0,this.failureParams.lowestLevelError=Math.min(t.targetLevel,this.failureParams.lowestLevelError)}},{key:"failure",value:function(t,e,r){r&&null!=r.targetLevel&&(this.failureParams.lowestLevelError=Math.min(r.targetLevel,this.failureParams.lowestLevelError)),this.lastErrorTimestamp=t,this.state=e?3:2,this.errorCount++}},{key:"inError",value:function(){return 3==this.state||2==this.state}}]),t}()},54919:(t,e,r)=>{"use strict";r.d(e,{AE:()=>a,ET:()=>s,R3:()=>i,c:()=>o,k5:()=>u});var n=r(79736),i=0,a=1,o=2,s=3;function l(t,e){var r=e.groups.filter((function(e){return e<=t}));return r.length?r[r.length-1]:e.groups[0]}function c(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e==n.pL?r.zoom?r.zoom.min:0:Math.min(t,Math.ceil((e+t)/2))}function u(t,e){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.level,i=arguments.length>3?arguments[3]:void 0,u=arguments.length>4?arguments[4]:void 0,h=arguments.length>5?arguments[5]:void 0,f=u.source.zoom?u.source.zoom.max:1/0;if(h.lowestLevelError!=1/0)r=c(h.lowestLevelError,i,u.source),r=h.lowestLevelError==r?r-1:r,t==a&&(r=l(r,u.updateStrategy.options));else{switch(t){case a:r=l(n,u.updateStrategy.options);break;case o:r=function(t,e,r){return Math.min(t,e+(r.increment||1))}(n,i,u.updateStrategy.options);break;case s:r=c(n,i,u.source);break;default:r=function(t,e,r,n){return t.pendingSubdivision&&!n.isVectorTileSource?r:e}(e,n,i,u.source)}r=Math.min(r,f)}return r}},52521:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=function(t,e){if(e&&e.isGeometryLayer){var r=t.transparent;t.layer=e,t.uniforms&&null!=t.uniforms.opacity?Object.defineProperty(t.uniforms.opacity,"value",{get:function(){return t.layer.opacity}}):null!=t.opacity&&Object.defineProperty(t,"opacity",{get:function(){return t.layer.opacity}}),t.uniforms&&null!=t.uniforms.mode&&Object.defineProperty(t.uniforms.mode,"value",{get:function(){return t.layer.pntsMode}}),t.uniforms&&null!=t.uniforms.shape&&Object.defineProperty(t.uniforms.shape,"value",{get:function(){return t.layer.pntsShape}}),t.uniforms&&null!=t.uniforms.sizeMode&&Object.defineProperty(t.uniforms.sizeMode,"value",{get:function(){return t.layer.pntsSizeMode}}),t.uniforms&&null!=t.uniforms.minAttenuatedSize&&Object.defineProperty(t.uniforms.minAttenuatedSize,"value",{get:function(){return t.layer.pntsMinAttenuatedSize}}),t.uniforms&&null!=t.uniforms.maxAttenuatedSize&&Object.defineProperty(t.uniforms.maxAttenuatedSize,"value",{get:function(){return t.layer.pntsMaxAttenuatedSize}}),Object.defineProperty(t,"wireframe",{get:function(){return t.layer.wireframe}}),Object.defineProperty(t,"transparent",{get:function(){return r!=t.layer.opacity<1&&(t.needsUpdate=!0,r=t.layer.opacity<1),r}})}return t}},62968:(t,e,r)=>{"use strict";r.d(e,{Z:()=>N});var n=r(42982),i=r(15671),a=r(43144),o=r(97326),s=r(79340),l=r(82963),c=r(61120),u=r(99477),h=r(20193),f=r(63133),d=r(73773),p=r(13092),m=r(86033),A=r(82150),g=r(27313);function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r4&&void 0!==arguments[4]?arguments[4]:0;if((0,i.Z)(this,h),s=n.call(this,t,e),y((0,o.Z)(s),b,{writable:!0,value:new Map}),y((0,o.Z)(s),x,{writable:!0,value:!0}),!a)throw new Error("extent is mandatory to build a TileMesh");s.layer=r,s.extent=a,s.extent.zoom=l,s.level=l,s.material.objectId=s.id,s.obb=s.geometry.OBB.clone(),s.boundingSphere=new u.Sphere,s.obb.box3D.getBoundingSphere(s.boundingSphere);var c,f=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return v(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(r.tileMatrixSets);try{for(f.s();!(c=f.n()).done;){var d=c.value;(0,m.Z)((0,o.Z)(s),b).set(d,s.extent.tiledCovering(d))}}catch(t){f.e(t)}finally{f.f()}return s.frustumCulled=!1,s.matrixAutoUpdate=!1,s.rotationAutoUpdate=!1,s.layerUpdateState={},s.isTileMesh=!0,s.geoidHeight=0,s.link={},Object.defineProperty((0,o.Z)(s),"visible",{get:function(){return(0,m.Z)(this,x)},set:function(t){(0,m.Z)(this,x)!=t&&((0,p.Z)(this,x,t),this.dispatchEvent({type:t?"shown":"hidden"}))}}),s}return(0,a.Z)(h,[{key:"setBBoxZ",value:function(t){t.geoidHeight=(0,g.c)(this.layer)?this.geoidHeight:0,this.obb.updateZ(t),this.horizonCullingPointElevationScaled&&this.horizonCullingPointElevationScaled.setLength(this.obb.z.delta+this.horizonCullingPoint.length()),this.obb.box3D.getBoundingSphere(this.boundingSphere)}},{key:"getExtentsByProjection",value:function(t){return(0,m.Z)(this,b).get(A.Z.formatToTms(t))}},{key:"findCommonAncestor",value:function(t){if(t)return t.level==this.level?t.id==this.id?t:0!=t.level?this.parent.findCommonAncestor(t.parent):void 0:t.level=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:this.options.defaultPickingRadius,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return d.Z.pickTilesAt(t,e,r,this,n)}},{key:"preUpdate",value:function(t,e){var r=this;if(e.has(void 0)||0==e.size)return this.level0Nodes;t.colorLayers=t.view.getLayers((function(t,e){return e&&e.id==r.id&&t.isColorLayer})),t.elevationLayers=t.view.getLayers((function(t,e){return e&&e.id==r.id&&t.isElevationLayer})),t.maxElevationLevel=-1;var n,i,a=D(t.elevationLayers);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.maxElevationLevel=Math.max(o.source.zoom.max,t.maxElevationLevel)}}catch(t){a.e(t)}finally{a.f()}-1==t.maxElevationLevel&&(t.maxElevationLevel=1/0),this.colorLayersOrder=P.M.getColorLayersIdOrderedBySequence(t.colorLayers);var s,l=D(e.values());try{for(l.s();!(s=l.n()).done;){var c=s.value;if(c.isCamera)return this.level0Nodes;if(c.layer===this){if(i){if(!(i=c.findCommonAncestor(i)))return this.level0Nodes}else i=c;null==i.material&&(i=void 0)}}}catch(t){l.e(t)}finally{l.f()}return i?[i]:this.level0Nodes}},{key:"update",value:function(t,e,r){var n=this;if(!r.parent)return k.Z.removeChildrenAndCleanup(this,r);if(r.parent.pendingSubdivision)return r.visible=!1,r.material.visible=!1,void this.info.update(r);if(r.visible=!this.culling(r,t.camera),r.visible){var i=!1;return r.material.visible=!0,this.info.update(r),(r.pendingSubdivision||p.hasEnoughTexturesToSubdivide(t,r)&&this.subdivision(t,this,r))&&(this.subdivideNode(t,r),r.material.visible=r.pendingSubdivision,this.info.update(r),i=!0),r.material.visible&&!i?k.Z.removeChildren(this,r):i?r.children.filter((function(t){return t.layer==n})):void 0}return r.material.visible=!1,this.info.update(r),k.Z.removeChildren(this,r)}},{key:"convert",value:function(t,e){return function(t,e,r){var n=r.builder,i=t,a=void 0!==i?i.level+1:0,o={extent:e,level:a,segment:r.segments||16,disableSkirt:r.disableSkirt};return function(t,e){var r=t.computeSharableExtent(e.extent),n=r.sharableExtent,i=r.quaternion,a=r.position,o=n.south.toFixed(6),s="".concat(t.crs,"_").concat(e.disableSkirt?0:1,"_").concat(e.segment),l=I.get(o,e.level,s);if(!l){var c;l=new Promise((function(t){c=t})),I.set(l,o,e.level,s),e.extent=n,e.center=t.center(e.extent).clone();var h,f=T.get(s);e.buildIndexAndUv_0=!f,e.builder=t;try{h=(0,S.Z)(e)}catch(t){return Promise.reject(t)}f||((f={}).index=new u.BufferAttribute(h.index,1),f.uv=new u.BufferAttribute(h.uvs[0],2),T.set(s,f)),h.index=f.index,h.uvs[0]=f.uv,h.position=new u.BufferAttribute(h.position,3),h.normal=new u.BufferAttribute(h.normal,3),e.builder.uvCount>1&&(h.uvs[1]=new u.BufferAttribute(h.uvs[1],1));var d=new E.Z(e,h);return d.OBB=new C.Z(d.boundingBox.min,d.boundingBox.max),d._count=0,d.dispose=function(){d._count--,d._count<=0&&(d.index=null,delete d.attributes.uv_0,u.BufferGeometry.prototype.dispose.call(d),I.delete(o,e.level,s))},c(d),Promise.resolve({geometry:d,quaternion:i,position:a})}return l.then((function(t){return{geometry:t,quaternion:i,position:a}}))}(n,o).then((function(t){t.geometry._count++;var o=r.tileMatrixSets.length,s=new _.ZP(r.materialOptions,o);(0,R.Z)(s,r);var l=new w(t.geometry,s,r,e,a);if(i&&i.isTileMesh){var c=n.computeSharableExtent(i.extent);t.position.sub(c.position).applyQuaternion(c.quaternion.invert()),t.quaternion.premultiply(c.quaternion)}if(l.position.copy(t.position),l.quaternion.copy(t.quaternion),l.visible=!1,l.updateMatrix(),function(t,e){if(e.diffuse&&(t.material.diffuse=e.diffuse),e.isGlobeLayer){t.horizonCullingPoint=t.extent.center().as("EPSG:4978").toVector3(),t.extent.planarDimensions(B).multiplyScalar(u.MathUtils.DEG2RAD);var r=B.length(),n=Math.abs(1/Math.cos(.5*r));t.horizonCullingPoint.setLength(n*t.horizonCullingPoint.length()),t.horizonCullingPointElevationScaled=t.horizonCullingPoint.clone()}}(l,r),i){l.geoidHeight=i.geoidHeight;var h=(0,g.c)(r)?l.geoidHeight:0;l.setBBoxZ({min:i.obb.z.min,max:i.obb.z.max,geoidHeight:h}),l.material.geoidHeight=h}return l}))}(t,e,this)}},{key:"countColorLayersTextures",value:function(){return arguments.length}},{key:"culling",value:function(t,e){return!e.isBox3Visible(t.obb.box3D,t.matrixWorld)}},{key:"subdivideNode",value:function(t,e){var r=this;if(!e.pendingSubdivision&&!e.children.some((function(t){return t.layer==r}))){var n=e.extent.subdivision();e.pendingSubdivision=!0;var i={view:t.view,requester:e,layer:this,priority:1e4,extentsSource:n,redraw:!1};return t.scheduler.execute(i).then((function(r){var n,i=D(r);try{for(i.s();!(n=i.n()).done;){var a=n.value;e.add(a),a.updateMatrixWorld(!0)}}catch(t){i.e(t)}finally{i.f()}e.pendingSubdivision=!1,t.view.notifyChange(e,!1)}),(function(t){if(e.pendingSubdivision=!1,!t.isCancelledCommandException)throw new Error(t)}))}}},{key:"subdivision",value:function(t,e,r){if(r.levelo.zoom.max||su.zoom.max||h{"use strict";r.r(e),r.d(e,{$3dTilesCulling:()=>Vi.y,$3dTilesSubdivisionControl:()=>Vi.Y0,C3DTBatchTable:()=>Fi.Z,C3DTBatchTableHierarchyExtension:()=>Zi,C3DTBoundingVolume:()=>Oi.Z,C3DTExtensions:()=>Ni.Z,C3DTFeature:()=>Di.Z,C3DTILES_LAYER_EVENTS:()=>vr.y,C3DTilesBoundingVolumeTypes:()=>zi.D,C3DTilesIonSource:()=>Un,C3DTilesLayer:()=>vr.Z,C3DTilesSource:()=>Dn,C3DTilesTypes:()=>zi.h,C3DTileset:()=>Ui.Z,CAMERA_TYPE:()=>be.P,CONTROL_EVENTS:()=>P.Q,CRS:()=>l.Z,CameraCalibrationParser:()=>Rr,CameraUtils:()=>pe.ZP,Capabilities:()=>ye.Z,ClassificationScheme:()=>L.wy,ColorLayer:()=>qe,ColorLayersOrdering:()=>Fr.Z,Coordinates:()=>o.Z,DEMUtils:()=>de.Z,ElevationLayer:()=>Je,Ellipsoid:()=>c.Z,EntwinePointTileLayer:()=>Yr,EntwinePointTileSource:()=>Mi,Extent:()=>a.ZP,FEATURE_TYPES:()=>xt.tg,Feature:()=>xt.ZP,Feature2Mesh:()=>he,FeatureCollection:()=>xt.t1,FeatureGeometry:()=>xt.iL,FeatureGeometryLayer:()=>$e,FeatureProcessing:()=>b,FeaturesUtils:()=>fe.Z,Fetcher:()=>f.Z,FileSource:()=>$r,FirstPersonControls:()=>rt,FlyControls:()=>j,GDFParser:()=>ki.Z,GLOBE_VIEW_EVENTS:()=>u.b,GTXParser:()=>Li.ZP,GeoJsonParser:()=>Cr.Z,GeoidGrid:()=>s.Z,GeoidLayer:()=>v.Z,GeometryLayer:()=>Ke.Z,GlobeControls:()=>P.Z,GlobeLayer:()=>Nr.Z,GlobeView:()=>u.Z,GpxParser:()=>Si.Z,ISGParser:()=>Bi.Z,ImageryLayers:()=>we.M,KMLParser:()=>Ci.Z,LASParser:()=>_i,Label:()=>xe.Z,LabelLayer:()=>Gr.Z,Layer:()=>we.Z,MAIN_LOOP_EVENTS:()=>d.Ao,OrientationUtils:()=>Lt,OrientedImageCamera:()=>k,OrientedImageLayer:()=>Ur,OrientedImageSource:()=>Mn,PLANAR_CONTROL_EVENT:()=>mt.uZ,PNTS_MODE:()=>L.vj,PNTS_SHAPE:()=>L.Uz,PNTS_SIZE_MODE:()=>L.E7,PlanarControls:()=>mt.ZP,PlanarLayer:()=>zr.Z,PlanarView:()=>h.Z,PointCloudLayer:()=>ur,PointsMaterial:()=>L.ZP,PotreeLayer:()=>gr,PotreeSource:()=>Pn,REVISION:()=>Qi,STRATEGY_DICHOTOMY:()=>Or.ET,STRATEGY_GROUP:()=>Or.AE,STRATEGY_MIN_NETWORK_TRAFFIC:()=>Or.R3,STRATEGY_PROGRESSIVE:()=>Or.c,ShaderChunk:()=>ge,ShapefileParser:()=>Ri,Source:()=>Jr.ZP,StreetControls:()=>pt,Style:()=>Pt.ZP,THREE:()=>n,TMSSource:()=>nn,TiledGeometryLayer:()=>yr.Z,VIEW_EVENTS:()=>p.b,VectorTilesSource:()=>En,View:()=>p.Z,WFSSource:()=>on,WMSSource:()=>ln,WMTSSource:()=>cn,colorLayerEffects:()=>ve.pO,ellipsoidSizes:()=>c.c,enableDracoLoader:()=>Pi.qw,enableKtx2Loader:()=>Pi.hu,getMaxColorSamplerUnitsCount:()=>ve.dn,glTFLoader:()=>Pi.zL,legacyGLTFLoader:()=>Pi.mp,process3dTilesNode:()=>Vi.Ti,proj4:()=>i.default,updateLayeredMaterialNodeElevation:()=>x.pN,updateLayeredMaterialNodeImagery:()=>x.XP});var n=r(99477),i=r(24472),a=r(99128),o=r(60145),s=r(67503),l=r(82150),c=r(16828),u=r(91742),h=r(48682),f=r(33347),d=r(49469),p=r(36873),m=r(52872),A=r(1857),g=r(13324),v=r(27313),y=new o.Z("EPSG:4326",0,0,0);const b={update:function(t,e,r){if(r.parent||!r.children.length){if(r.visible){if(void 0===r.layerUpdateState[e.id])r.layerUpdateState[e.id]=new m.Z;else if(!r.layerUpdateState[e.id].canTryUpdate()){var n;return void(null===(n=r.link[e.id])||void 0===n||n.forEach((function(t){t.layer.object3d.add(t),t.meshes.position.z=(0,v.c)(e.parent)?r.geoidHeight:0,t.meshes.updateMatrixWorld()})))}var i=r.getExtentsByProjection(e.source.crs)||[r.extent],a=i[0].zoom;if(a==e.zoom.min&&this.source.extentInsideLimit(r.extent,a)&&(!e.source.isFileSource||r.extent.isPointInside(e.source.extent.center(y)))){r.layerUpdateState[e.id].newTry();var o={layer:e,extentsSource:i,view:t.view,requester:r};return t.scheduler.execute(o).then((function(n){r.layerUpdateState[e.id].noMoreUpdatePossible(),n.forEach((function(n){n?(r.link[e.id]=r.link[e.id]||[],n.as(t.view.referenceCrs),n.meshes.position.z=(0,v.c)(e.parent)?r.geoidHeight:0,n.updateMatrixWorld(),e.onMeshCreated&&e.onMeshCreated(n,t),r.parent?(e.object3d.add(n),r.link[e.id].push(n)):A.Z.removeChildrenAndCleanupRecursively(e,n),n.layer=e):r.layerUpdateState[e.id].failure(1,!0)}))}),(function(n){return(0,g.Z)(n,r,e,r.level,t.view)}))}r.layerUpdateState[e.id].noMoreUpdatePossible()}}else A.Z.removeChildrenAndCleanupRecursively(e,r)}};var x=r(75963),w=r(97326),_=r(88301),E=r(79340),M=r(82963),S=r(61120),C=r(15671),T=r(43144);var I=function(){function t(e){(0,C.Z)(this,t),this.size=e,this.pps=null,this.polynom=null,this.l1l2=null}return(0,T.Z)(t,[{key:"setFromMicmacCalibration",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.pps=(new n.Vector2).fromArray(t.pps),this.polynom=(new n.Vector4).fromArray(t.poly357),this.l1l2=new n.Vector3,this.pps.y=e?this.size.y-this.pps.y:this.pps.y,this.polynom.w=Math.pow(t.limit,2),t.l1l2&&(this.l1l2.fromArray(t.l1l2),this.l1l2.z=t.etats)}},{key:"clone",value:function(){var e=new t(this.size.clone());return e.pps=this.pps.clone(),e.polynom=this.polynom.clone(),e.l1l2=this.l1l2.clone(),e}}]),t}(),R=new n.Vector3,B=function(t){(0,E.Z)(a,t);var e,r,i=(e=a,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function a(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1024,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.1,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1e4,c=arguments.length>5?arguments[5]:void 0,u=arguments.length>6?arguments[6]:void 0;return(0,C.Z)(this,a),e=e.isVector2?e:new n.Vector2(e,e),u=u||e.x/e.y,(t=i.call(this,void 0,u,s,l)).size=e,t.focal=r.isVector2?r:new n.Vector2(r,r),t.center=o||e.clone().multiplyScalar(.5),t.skew=c||0,t.textureMatrixWorldInverse=new n.Matrix4,Object.defineProperty((0,w.Z)(t),"fov",{get:function(){return 2*n.MathUtils.radToDeg(Math.atan2(t.size.y,2*t.focal.y))},set:function(e){var r=.5*t.size.y/Math.tan(n.MathUtils.degToRad(.5*e));t.focal.x=r,t.focal.y=r}}),t.distortion=new I(t.size),t.maskPath=void 0,t.mask=void 0,t.updateProjectionMatrix(),t}return(0,T.Z)(a,[{key:"updateProjectionMatrix",value:function(){if(this.focal){var t=this.near,e=t/this.focal.x,r=t/this.focal.y,n=-e*this.center.x,i=-r*this.center.y,a=n+e*this.size.x,o=i+r*this.size.y;this.projectionMatrix.makePerspective(n,a,o,i,t,this.far),this.projectionMatrix.elements[4]=2*this.skew/this.size.x;var s=this.size.x/this.size.y,l=this.aspect/s;R.set(this.zoom,this.zoom,1),l>1?R.x/=l:R.y*=l,this.projectionMatrix.scale(R)}}},{key:"copy",value:function(t,e){return(0,_.Z)((0,S.Z)(a.prototype),"copy",this).call(this,t,e),this.size=t.size.clone(),this.focal=t.focal.clone(),this.center=t.center.clone(),this.distortion=t.distortion.clone(),this.textureMatrixWorldInverse=t.textureMatrixWorldInverse.clone(),this.skew=t.skew,this.maskPath=t.maskPath,this.mask=t.mask,this}}]),a}(n.PerspectiveCamera);const k=B;var L=r(32204),P=r(11925);function D(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return U(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?U(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{};(0,C.Z)(this,i),(e=n.call(this)).view=t,e.options=r,e._camera3D=t.camera3D,e.moves=new Set,e.moveSpeed=10,e._onMouseDownMouseX=0,e._onMouseDownMouseY=0,e._isMouseDown=!1,t.domElement.addEventListener("mousedown",F.bind((0,w.Z)(e)),!1),t.domElement.addEventListener("touchstart",N.bind((0,w.Z)(e)),!1);var a=z.bind((0,w.Z)(e));return t.domElement.addEventListener("mousemove",a,!1),t.domElement.addEventListener("touchmove",a,!1),t.domElement.addEventListener("mouseup",G.bind((0,w.Z)(e)),!1),t.domElement.addEventListener("touchend",G.bind((0,w.Z)(e)),!1),t.domElement.addEventListener("wheel",Q.bind((0,w.Z)(e)),!1),t.domElement.addEventListener("keyup",Z.bind((0,w.Z)(e)),!0),t.domElement.addEventListener("keydown",V.bind((0,w.Z)(e)),!0),e.view.addFrameRequester(d.Ao.AFTER_CAMERA_UPDATE,e.update.bind((0,w.Z)(e))),r.focusOnMouseOver&&t.domElement.addEventListener("mouseover",(function(){return t.domElement.focus()})),r.focusOnClick&&t.domElement.addEventListener("click",(function(){return t.domElement.focus()})),e}return(0,T.Z)(i,[{key:"isUserInteracting",value:function(){return 0!==this.moves.size||this._isMouseDown}},{key:"update",value:function(t,e){e&&(t=16);var r,n=D(this.moves);try{for(n.s();!(r=n.n()).done;){var i=r.value;this._camera3D[i.method](i.sign*(i.noSpeed?1:this.moveSpeed)*t/1e3)}}catch(t){n.e(t)}finally{n.f()}if(this.moves.size>0||this._isMouseDown){this.view.notifyChange(this._camera3D);var a,o=D(this.moves);try{for(o.s();!(a=o.n()).done;){var s=a.value;s.oneshot&&this.moves.delete(s)}}catch(t){o.e(t)}finally{o.f()}}}}]),i}(n.EventDispatcher);function W(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{};if((0,C.Z)(this,a),(e=i.call(this)).isFirstPersonControls=!0,e.camera=t.camera3D,e.view=t,e.moves=new Set,r.panoramaRatio){var o=200*r.panoramaRatio/(2*Math.PI);r.verticalFOV=2==r.panoramaRatio?180:n.MathUtils.radToDeg(2*Math.atan(200/(2*o)))}return r.verticalFOV=r.verticalFOV||180,r.moveSpeed=void 0===r.moveSpeed?10:r.moveSpeed,e.options=r,e._isMouseDown=!1,e._onMouseDownMouseX=0,e._onMouseDownMouseY=0,e._state={rotateX:0,rotateY:0,snapshot:function(){return{rotateX:this.rotateX,rotateY:this.rotateY}}},e.reset(),e.eventListeners=r.disableEventListeners,r.disableEventListeners||(e._onMouseDown=e.onMouseDown.bind((0,w.Z)(e)),e._onMouseMove=e.onMouseMove.bind((0,w.Z)(e)),e._onMouseUp=e.onMouseUp.bind((0,w.Z)(e)),e._onMouseWheel=e.onMouseWheel.bind((0,w.Z)(e)),e._onKeyUp=e.onKeyUp.bind((0,w.Z)(e)),e._onKeyDown=e.onKeyDown.bind((0,w.Z)(e)),e._onContextMenu=e.onContextMenu.bind((0,w.Z)(e)),t.domElement.addEventListener("mousedown",e._onMouseDown,!1),t.domElement.addEventListener("touchstart",e._onMouseDown,!1),t.domElement.addEventListener("mousemove",e._onMouseMove,!1),t.domElement.addEventListener("touchmove",e._onMouseMove,!1),t.domElement.addEventListener("mouseup",e._onMouseUp,!1),t.domElement.addEventListener("touchend",e._onMouseUp,!1),t.domElement.addEventListener("wheel",e._onMouseWheel,!1),t.domElement.addEventListener("contextmenu",e._onContextMenu,!1),document.addEventListener("keydown",e._onKeyDown,!1),document.addEventListener("keyup",e._onKeyUp,!1)),e.view.addFrameRequester(d.Ao.AFTER_CAMERA_UPDATE,e.update.bind((0,w.Z)(e))),e._onFocus=function(){return t.domElement.focus()},e.focusOnMouseOver=r.focusOnMouseOver,r.focusOnMouseOver&&t.domElement.addEventListener("mouseover",e._onFocus),e.focusOnClick=r.focusOnClick,r.focusOnClick&&t.domElement.addEventListener("click",e._onFocus),"EPSG:4978"==t.referenceCrs?e.moveCameraVertical=et:e.moveCameraVertical=J,e}return(0,T.Z)(a,[{key:"isUserInteracting",value:function(){return 0!==this.moves.size&&!this._isMouseDown}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];$.setFromUnitVectors(X,this.camera.up),$.invert(),$.multiply(this.camera.quaternion),tt.setFromQuaternion($),t||(this._state.rotateX=tt.x),this._state.rotateY=tt.y}},{key:"update",value:function(t,e,r){if(0!=this.enabled){e&&(t=16);var n,i=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return W(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?W(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(this.moves);try{for(i.s();!(n=i.n()).done;){var a=n.value;"translateY"===a.method?this.moveCameraVertical(a.sign*this.options.moveSpeed*t/1e3):this.camera[a.method](a.sign*this.options.moveSpeed*t/1e3)}}catch(t){i.e(t)}finally{i.f()}!0!==this._isMouseDown&&!0!==r||q(this.view,this.camera,this._state),this.moves.size&&this.view.notifyChange(this.camera)}}},{key:"onMouseDown",value:function(t){if(0!=this.enabled){this._isMouseDown=!0;var e=this.view.eventToViewCoords(t);this._onMouseDownMouseX=e.x,this._onMouseDownMouseY=e.y,this._stateOnMouseDown=this._state.snapshot()}}},{key:"onMouseUp",value:function(){0!=this.enabled&&(this._isMouseDown=!1)}},{key:"onMouseMove",value:function(t){if(0!=this.enabled&&!0===this._isMouseDown){var e=n.MathUtils.degToRad(this.camera.fov)/this.view.mainLoop.gfxEngine.height,r=this.view.eventToViewCoords(t);this._state.rotateY=(r.x-this._onMouseDownMouseX)*e+this._stateOnMouseDown.rotateY,this._state.rotateX=H(this.camera,(r.y-this._onMouseDownMouseY)*e+this._stateOnMouseDown.rotateX,this.options.verticalFOV),q(this.view,this.camera,this._state)}}},{key:"onMouseWheel",value:function(t){if(0!=this.enabled){var e=t.deltaY;this.camera.fov=n.MathUtils.clamp(this.camera.fov+Math.sign(e),10,Math.min(100,this.options.verticalFOV)),this.camera.updateProjectionMatrix(),this._state.rotateX=H(this.camera,this._state.rotateX,this.options.verticalFOV),q(this.view,this.camera,this._state)}}},{key:"onKeyUp",value:function(t){if(0!=this.enabled){var e=Y[t.keyCode];e&&(this.moves.delete(e),this.view.notifyChange(void 0,!1),t.preventDefault())}}},{key:"onKeyDown",value:function(t){if(0!=this.enabled){var e=Y[t.keyCode];e&&(this.moves.add(e),this.view.notifyChange(void 0,!1),t.preventDefault())}}},{key:"onContextMenu",value:function(t){t.preventDefault()}},{key:"dispose",value:function(){this.eventListeners||(this.view.domElement.removeEventListener("mousedown",this._onMouseDown,!1),this.view.domElement.removeEventListener("touchstart",this._onMouseDown,!1),this.view.domElement.removeEventListener("mousemove",this._onMouseMove,!1),this.view.domElement.removeEventListener("touchmove",this._onMouseMove,!1),this.view.domElement.removeEventListener("mouseup",this._onMouseUp,!1),this.view.domElement.removeEventListener("touchend",this._onMouseUp,!1),this.view.domElement.removeEventListener("wheel",this._onMouseWheel,!1),this.view.domElement.removeEventListener("contextmenu",this._onContextMenu,!1),document.removeEventListener("keydown",this._onKeyDown,!1),document.removeEventListener("keyup",this._onKeyUp,!1)),this.focusOnMouseOver&&this.view.domElement.removeEventListener("mouseover",this._onFocus),this.focusOnClick&&this.view.domElement.removeEventListener("click",this._onFocus),this.dispatchEvent({type:"dispose"})}}]),a}(n.EventDispatcher);var nt=r(36194);var it=new n.MeshBasicMaterial({color:16777215,depthTest:!1,transparent:!0,opacity:.5});function at(t,e,r){t.position.copy(e),t.up.copy(e).normalize(),t.lookAt(r),t.updateMatrixWorld(!0)}var ot=new n.Vector3,st=new n.Vector3,lt=new n.Matrix3,ct=new n.Vector3,ut=new n.Quaternion;function ht(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){};e.getPickingPositionFromDepth(e.eventToViewCoords(t),ot);var o=e.camera3D.position.distanceTo(ot),s=r?e.pickObjectsAt(t,-1,r):[];s.length&&s[0].distance1&&void 0!==arguments[1]?arguments[1]:{};return(0,C.Z)(this,a),(r=i.call(this,t,c)).isStreetControls=!0,r._onMouseOut=(0,_.Z)((e=(0,w.Z)(r),(0,S.Z)(a.prototype)),"onMouseUp",e).bind((0,w.Z)(r)),t.domElement.addEventListener("mouseout",r._onMouseOut),r.previousPosition=void 0,r.currentPosition=void 0,r.nextPosition=void 0,r.keyGoToNextPosition=90,r.keyGoToPreviousPosition=83,r.keySetCameraToCurrentPositionAndLookAtNext=65,r.keySetCameraToCurrentPositionAndLookAtPrevious=81,r.tweenGroup=new nt.ZP.Group,r.surfaceGround=c.surfaceGround||(o=new n.CircleGeometry(1,32),new n.Mesh(o,it)),r.surfaceWall=c.surfaceWall||(s=new n.PlaneGeometry(4,2,1),(l=new n.Mesh(s,it)).rotateX(.5*-Math.PI),l),r.surfaces=new n.Object3D,r.surfaces.add(r.surfaceGround),r.surfaces.add(r.surfaceWall),r.view.scene.add(r.surfaces),r.wallMaxDistance=c.wallMaxDistance||1e3,r.animationDurationWall=c.animationDurationWall||200,r.buildingsLayer=c.buildingsLayer,r.computeTime=c.computeTime||ft,r.offset=c.offset||4,r.transformationPositionPickOnTheGround=c.transformationPositionPickOnTheGround||function(t){return t},r.end=r.camera.clone(),r}return(0,T.Z)(a,[{key:"setCurrentPosition",value:function(t){this.currentPosition=t}},{key:"setNextPosition",value:function(t){this.nextPosition=t}},{key:"setPreviousPosition",value:function(t){this.previousPosition=t}},{key:"onMouseUp",value:function(t){0!=this.enabled&&((0,_.Z)((0,S.Z)(a.prototype),"onMouseUp",this).call(this),this._stateOnMouseDrag?this._stateOnMouseDrag=!1:ht(t,this.view,this.buildingsLayer,this.onClickOnGround.bind(this),this.onClickOnWall.bind(this)))}},{key:"onMouseMove",value:function(t){var e=this;0!=this.enabled&&((0,_.Z)((0,S.Z)(a.prototype),"onMouseMove",this).call(this,t),this._isMouseDown?(this._stateOnMouseDrag=!0,this.stopAnimations()):this.tween||(ht(t,this.view,this.buildingsLayer,(function(t,r){at(e.surfaces,t,r),e.surfaceGround.visible=!0,e.surfaceWall.visible=!1}),(function(t,r){at(e.surfaces,t,r),e.surfaceWall.visible=!0,e.surfaceGround.visible=!1})),this.view.notifyChange(this.surfaces)))}},{key:"setCameraToCurrentPosition",value:function(t){t?this.setCameraOnPosition(this.currentPosition,this.previousPosition):this.setCameraOnPosition(this.currentPosition,this.nextPosition)}},{key:"setCameraOnPosition",value:function(t,e){t&&e&&(this.camera.position.copy(t),this.view.tileLayer&&this.view.tileLayer.isGlobeLayer?this.camera.up.copy(t).normalize():this.camera.up.set(0,0,1),this.camera.lookAt(e),this.camera.updateMatrixWorld(),this.reset())}},{key:"onClickOnGround",value:function(t){t=this.transformationPositionPickOnTheGround(t),this.view.tileLayer&&this.view.tileLayer.isGlobeLayer?ct.copy(t).normalize():ct.set(0,0,1),t.add(ct.multiplyScalar(this.offset));var e=this.camera.position.distanceTo(t),r=this.computeTime(e);this.moveCameraTo(t,r)}},{key:"onClickOnWall",value:function(t){this.camera.position.distanceTo(t)1&&void 0!==arguments[1]?arguments[1]:50;if(!t)return Promise.resolve();var i=new Promise((function(t){e=t}));return this.stopAnimations(),this.tween=new nt.ZP.Tween(this.camera.position,this.tweenGroup).to(t.clone(),n).easing(nt.ZP.Easing.Quadratic.Out).onComplete((function(){r.stopAnimations(),e()})).start(),this.animationFrameRequester=function(){r.tweenGroup.update(),r.view.notifyChange(r.camera)},this.view.addFrameRequester(d.Ao.BEFORE_RENDER,this.animationFrameRequester),this.view.notifyChange(this.camera),i}},{key:"stopAnimations",value:function(){this.tween&&(this.tween.stop(),this.tween=void 0),this.animationFrameRequester&&(this.view.removeFrameRequester(d.Ao.BEFORE_RENDER,this.animationFrameRequester),this.animationFrameRequester=null)}},{key:"moveCameraToCurrentPosition",value:function(){this.moveCameraTo(this.currentPosition)}},{key:"onKeyDown",value:function(t){0!=this.enabled&&((0,_.Z)((0,S.Z)(a.prototype),"onKeyDown",this).call(this,t),t.keyCode==this.keyGoToNextPosition&&this.moveCameraTo(this.nextPosition),t.keyCode==this.keyGoToPreviousPosition&&this.moveCameraTo(this.previousPosition),t.keyCode==this.keySetCameraToCurrentPositionAndLookAtNext&&(this.setCameraToCurrentPosition(),this.view.notifyChange(this.view.camera3D)),t.keyCode==this.keySetCameraToCurrentPositionAndLookAtPrevious&&(this.setCameraToCurrentPosition(!0),this.view.notifyChange(this.view.camera3D)))}},{key:"dispose",value:function(){this.view.domElement.removeEventListener("mouseout",this._onMouseOut,!1),(0,_.Z)((0,S.Z)(a.prototype),"dispose",this).call(this)}}]),a}(rt);const pt=dt;var mt=r(44450),At=r(42982),gt=r(86033),vt=r(13092),yt=r(9187),bt=r.n(yt),xt=r(94596),wt=r(52521),_t=r(86896),Et=n.MathUtils.DEG2RAD,Mt=new n.Matrix4,St=new n.Vector3,Ct=new n.Vector3,Tt=(new n.Vector3).set(0,0,1),It=new o.Z("EPSG:4326",0,0,0),Rt=new n.Euler,Bt=new n.Quaternion;function kt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;return t?e.set(0,0,0,1):kt}const Lt={quaternionFromRollPitchHeading:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=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]:new n.Quaternion;return t*=Et,e*=Et,r*=Et,i.setFromEuler(Rt.set(-e,-t,-r,"YXZ"))},quaternionFromOmegaPhiKappa:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=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]:new n.Quaternion;return t*=Et,e*=Et,r*=Et,i.setFromEuler(Rt.set(t,e,r,"XYZ")),i.set(i.w,i.z,-i.y,-i.x),i},quaternionFromAttitude:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;return void 0!==t.roll||void 0!==t.pitch||void 0!==t.heading?this.quaternionFromRollPitchHeading(t.roll,t.pitch,t.heading,e):void 0!==t.omega||void 0!==t.phi||void 0!==t.kappa?this.quaternionFromOmegaPhiKappa(t.omega,t.phi,t.kappa,e):e.set(0,0,0,1)},quaternionFromEnuToGeocent:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;return t?this.quaternionFromEnuToGeocent()(t,e):function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion,r=t.geodesicNormal;return 0==r.x&&0==r.y?e.set(0,0,0,1):(Ct.set(-r.y,r.x,0).normalize(),St.crossVectors(r,Ct),Mt.makeBasis(Ct,St,r),e.setFromRotationMatrix(Mt))}},quaternionFromGeocentToEnu:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;if(t)return this.quaternionFromGeocentToEnu()(t,e);var r=this.quaternionFromEnuToGeocent();return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;return r(t,e).conjugate()}},quaternionFromLCCToEnu:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.Quaternion;if(e)return this.quaternionFromLCCToEnu(t)(e,r);var i=Math.sin(t.lat0);return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion,a=e.as(It.crs,It).longitude*Et;return r.setFromAxisAngle(Tt,i*(t.long0-a))}},quaternionFromEnuToLCC:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.Quaternion;if(e)return this.quaternionFromEnuToLCC(t)(e,r);var i=this.quaternionFromLCCToEnu(t);return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;return i(t,e).conjugate()}},quaternionFromTMercToEnu:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.Quaternion;if(e)return this.quaternionFromTMercToEnu(t)(e,r);var i=t.a*t.a,a=t.b*t.b,o=t.e*t.e,s=t.e?o/(1-o):i/a-1;return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;e.as(It.crs,It);var i=It.longitude*Et,a=It.latitude*Et,o=t.long0-i,l=Math.cos(a),c=Math.sin(a),u=l*l,h=o*o*u,f=s*u;return r.setFromAxisAngle(Tt,o*c*(1+h/3*(1+3*f+2*f*f)+h*h*(2-c/l)/15))}},quaternionFromEnuToTMerc:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.Quaternion;if(e)return this.quaternionFromEnuToTMerc(t)(e,r);var i=this.quaternionFromTMercToEnu(t);return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;return i(t,e).conjugate()}},quaternionFromLongLatToEnu:function(t){return kt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion)},quaternionFromEnuToLongLat:function(t){return kt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion)},quaternionUnimplemented:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.Quaternion;return console.warn("This quaternion function is not implemented for projections of type",t.projName),kt(e,r)},quaternionFromEnuToCRS:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.Quaternion;if(e)return this.quaternionFromEnuToCRS(t)(e,r);var a=t.projName?t:i.default.defs(t);switch(a.projName){case"geocent":return this.quaternionFromEnuToGeocent();case"lcc":return this.quaternionFromEnuToLCC(a);case"tmerc":return this.quaternionFromEnuToTMerc(a);case"longlat":return this.quaternionFromEnuToLongLat();default:return this.quaternionUnimplemented(a)}},quaternionFromCRSToEnu:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.Quaternion;if(e)return this.quaternionFromCRSToEnu(t)(e,r);var a=t.projName?t:i.default.defs(t);switch(a.projName){case"geocent":return this.quaternionFromGeocentToEnu();case"lcc":return this.quaternionFromLCCToEnu(a);case"tmerc":return this.quaternionFromTMercToEnu(a);case"longlat":return this.quaternionFromLongLatToEnu();default:return this.quaternionUnimplemented(a)}},quaternionFromCRSToCRS:function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new n.Quaternion;if(r)return this.quaternionFromCRSToCRS(t,e)(r,i);if(t==e)return function(){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion).set(0,0,0,1)};var a=this.quaternionFromCRSToEnu(t),o=this.quaternionFromEnuToCRS(e);return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;return o(t,e).multiply(a(t,Bt))}}};var Pt=r(48891);function Dt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Ut(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ut(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&console.warn("Too many differents point.radius, only the first one will be used"),new n.Points(w,e.pointMaterial)}function ce(t,e,r){for(var i=new n.InstancedMesh(t.geometry,t.material,e),a=0,o=0;o<3*e;o+=3){var s=new n.Matrix4;s.setPosition(r[o],r[o+1],r[o+2]),i.setMatrixAt(a,s),a++}return i.instanceMatrix.needsUpdate=!0,i}function ue(t,e){var r,i;if(t.vertices){var a;switch(t.type){case xt.tg.POINT:if(null!==(r=Ft.point)&&void 0!==r&&null!==(i=r.model)&&void 0!==i&&i.object)try{(a=function(t){var e,r,i=t.vertices,a=t.geometries.length,o=Ft.point.model.object;if(o instanceof n.Mesh)return ce(o,a,i);if(o instanceof n.Object3D){var s=new n.Group;return(e=o,r=[],e.updateMatrixWorld(),e.traverse((function(t){t instanceof n.Mesh&&(t.updateMatrixWorld(),t.geometry.applyMatrix4(t.matrixWorld),r.push(t))})),r).forEach((function(t){return s.add(ce(t,a,i))})),s}throw new Error("The format of the model object provided in the style (layer.style.point.model.object) is not supported. Only THREE.Mesh or THREE.Object3D are supported.")}(t)).isInstancedMesh=!0}catch(r){a=le(t,e)}else a=le(t,e);break;case xt.tg.LINE:a=function(t,e){var r=t.vertices,i=new Uint8Array(r.length),a=r.length/3,o=new Uint32Array(a),s=e.batchId||function(t,e){return e},l=0,c=new Float32Array(r.length),u=new n.BufferGeometry;u.setAttribute("position",new n.BufferAttribute(c,3));var h=[];zt.setFeature(t);var f=oe(2*(a-t.geometries.length),a),d=0;Ht.setFromMatrixScale(zt.collection.matrixWorldInverse),Qt.set(0,0,1).multiply(Ht);var p,m=Dt(t.geometries);try{for(m.s();!(p=m.n()).done;){var A=p.value;zt.setGeometry(A);var g=s(A.properties,l),v=A.indices[0].offset;if(v>65535){console.warn("Feature to Line: integer overflow, too many points in lines");break}for(var y=v+A.indices[0].count,b=3*v,x=v;x1&&console.warn("Too many differents stroke.width, only the first one will be used"),u.setAttribute("color",new n.BufferAttribute(i,3,!0)),u.setAttribute("batchId",new n.BufferAttribute(o,1)),u.setIndex(new n.BufferAttribute(f,1)),new n.LineSegments(u,e.lineMaterial)}(t,e);break;case xt.tg.POLYGON:a=Ft.fill&&Object.keys(Ft.fill).includes("extrusion_height")?function(t,e){var r=t.vertices,i=new Float32Array(2*r.length),a=r.length/3,o=new Uint8Array(2*r.length),s=[],l=new Uint32Array(i.length/3),c=e.batchId||function(t,e){return e},u=0;zt.setFeature(t),Ht.setFromMatrixScale(zt.collection.matrixWorldInverse),Qt.set(0,0,1).multiply(Ht),Nt.setCrs(zt.collection.crs);var h,f=Dt(t.geometries);try{var d=function(){var e,n=h.value;zt.setGeometry(n);for(var f=n.indices[0].offset,d=n.indices.slice(-1)[0],p=d.offset+d.count,m=p-f,A=null!==(e=n.indices[0].ccw)&&void 0!==e?e:function(t,e,r){for(var n=(e*=3)+3*r,i=0,a=n-3,o=e;oKt)return console.warn("Feature to Polygon: integer overflow, too many points in polygons"),"break";zt.setGeometry(e);for(var u=e.indices.slice(-1)[0],h=u.offset+u.count,f=3*n,d=f+3*(h-n),p=s(e.properties,c),m=f,A=n;m0&&void 0!==arguments[0]?arguments[0]:{};return(0,_t.ie)(t),function(e){var r=this;if(e){t.pointMaterial||(t.pointMaterial=(0,wt.Z)(new n.PointsMaterial,this),t.lineMaterial=(0,wt.Z)(new n.LineBasicMaterial,this),t.polygonMaterial=(0,wt.Z)(new n.MeshBasicMaterial,this)),Ft=(null==this?void 0:this.style)||(t.style?new Pt.ZP(t.style):Gt),zt.setCollection(e);var i=e.features;if(i&&0!=i.length){var a=i.map((function(e){var n=ue(e,t);return n.layer=r,n}));return new ie(a,e)}}}}};var fe=r(39683),de=r(79295),pe=r(4596),me={color_layers_pars_fragment:"struct Layer {\n int textureOffset;\n int crs;\n int effect_type;\n float effect_parameter;\n float opacity;\n bool transparent;\n};\n\n#include \n\nuniform sampler2D colorTextures[NUM_FS_TEXTURES];\nuniform vec4 colorOffsetScales[NUM_FS_TEXTURES];\nuniform Layer colorLayers[NUM_FS_TEXTURES];\nuniform int colorTextureCount;\n\nvec3 uvs[NUM_CRS];\n\nfloat getBorderDistance(vec2 uv) {\n vec2 p2 = min(uv, 1. -uv);\n return min(p2.x, p2.y);\n}\n\nfloat tolerance = 0.99;\n\nvec4 applyWhiteToInvisibleEffect(vec4 color) {\n float a = dot(color.rgb, vec3(0.333333333));\n if (a >= tolerance) {\n color.a = 0.0;\n }\n return color;\n}\n\nvec4 applyLightColorToInvisibleEffect(vec4 color, float intensity) {\n float a = max(0.05,1. - length(color.xyz - 1.));\n color.a *= 1.0 - pow(abs(a), intensity);\n color.rgb *= color.rgb * color.rgb;\n return color;\n}\n\n#if defined(DEBUG)\nuniform bool showOutline;\nuniform vec3 outlineColors[NUM_CRS];\nuniform float outlineWidth;\n\nvec4 getOutlineColor(vec3 outlineColor, vec2 uv) {\n float alpha = 1. - clamp(getBorderDistance(uv) / outlineWidth, 0., 1.);\n return vec4(outlineColor, alpha);\n}\n#endif\n\nuniform float minBorderDistance;\nvec4 getLayerColor(int textureOffset, sampler2D tex, vec4 offsetScale, Layer layer) {\n if ( textureOffset >= colorTextureCount ) return vec4(0);\n\n vec3 uv;\n // #pragma unroll_loop\n for ( int i = 0; i < NUM_CRS; i ++ ) {\n if ( i == layer.crs ) uv = uvs[ i ];\n }\n\n float borderDistance = getBorderDistance(uv.xy);\n if (textureOffset != layer.textureOffset + int(uv.z) || borderDistance < minBorderDistance ) return vec4(0);\n vec4 color = texture2D(tex, pitUV(uv.xy, offsetScale));\n if (layer.effect_type == 3) {\n #include \n } else {\n if (layer.transparent && color.a != 0.0) {\n color.rgb /= color.a;\n }\n\n if (layer.effect_type == 1) {\n color = applyLightColorToInvisibleEffect(color, layer.effect_parameter);\n } else if (layer.effect_type == 2) {\n color = applyWhiteToInvisibleEffect(color);\n }\n }\n color.a *= layer.opacity;\n return color;\n}\n",custom_body_colorLayer:"// no custom body",custom_header_colorLayer:"// no custom header",elevation_pars_vertex:"#if NUM_VS_TEXTURES > 0\n struct Layer {\n float scale;\n float bias;\n int mode;\n float zmin;\n float zmax;\n };\n\n uniform Layer elevationLayers[NUM_VS_TEXTURES];\n uniform sampler2D elevationTextures[NUM_VS_TEXTURES];\n uniform vec4 elevationOffsetScales[NUM_VS_TEXTURES];\n uniform int elevationTextureCount;\n uniform float geoidHeight;\n\n highp float decode32(highp vec4 rgba) {\n highp float Sign = 1.0 - step(128.0,rgba[0])*2.0;\n highp float Exponent = 2.0 * mod(rgba[0],128.0) + step(128.0,rgba[1]) - 127.0;\n highp float Mantissa = mod(rgba[1],128.0)*65536.0 + rgba[2]*256.0 +rgba[3] + float(0x800000);\n highp float Result = Sign * exp2(Exponent) * (Mantissa * exp2(-23.0 ));\n return Result;\n }\n\n float getElevationMode(vec2 uv, sampler2D tex, int mode) {\n if (mode == ELEVATION_RGBA)\n return decode32(texture2D( tex, uv ).abgr * 255.0);\n if (mode == ELEVATION_DATA || mode == ELEVATION_COLOR)\n #if defined(WEBGL2)\n return texture2D( tex, uv ).r;\n #else\n return texture2D( tex, uv ).w;\n #endif\n return 0.;\n }\n\n float getElevation(vec2 uv, sampler2D tex, vec4 offsetScale, Layer layer) {\n uv = uv * offsetScale.zw + offsetScale.xy;\n float d = clamp(getElevationMode(uv, tex, layer.mode), layer.zmin, layer.zmax);\n return d * layer.scale + layer.bias;\n }\n#endif\n",elevation_vertex:"#if NUM_VS_TEXTURES > 0\n if(elevationTextureCount > 0) {\n float elevation = getElevation(uv, elevationTextures[0], elevationOffsetScales[0], elevationLayers[0]);\n transformed += elevation * normal;\n }\n#endif\n",geoid_vertex:"transformed += geoidHeight * normal;\n",fog_fragment:"#if defined(USE_FOG)\n float fogFactor = 1. - min( exp(-vFogDepth / fogDistance), 1.);\n gl_FragColor.rgb = mix(gl_FragColor.rgb, fogColor, fogFactor);\n#endif\n",fog_pars_fragment:"#if defined(USE_FOG)\nuniform vec3 fogColor;\nuniform float fogDistance;\nvarying float vFogDepth;\n#endif\n",lighting_fragment:"if (lightingEnabled) {\n float light = min(2. * dot(vNormal, lightPosition), 1.);\n gl_FragColor.rgb *= light;\n}\n",lighting_pars_fragment:"uniform bool lightingEnabled;\nuniform vec3 lightPosition;\nvarying vec3 vNormal;\n",mode_depth_fragment:"#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\ngl_FragColor = packDepthToRGBA(gl_FragDepthEXT);\n#else\nfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\ngl_FragColor = packDepthToRGBA(fragCoordZ);\n#endif",mode_id_fragment:"// 16777216.0 == 256.0 * 256.0 * 256.0\ngl_FragColor = packDepthToRGBA(float(objectId) / 16777216.0);\n",mode_pars_fragment:"#if MODE == MODE_ID || MODE == MODE_DEPTH\n#include \n#endif\n\n#if MODE == MODE_ID\nuniform int objectId;\n#endif\n",overlay_fragment:"gl_FragColor.rgb = mix(gl_FragColor.rgb, overlayColor, overlayAlpha);\n",overlay_pars_fragment:"uniform vec3 overlayColor;\nuniform float overlayAlpha;\n",pitUV:"vec2 pitUV(vec2 uv, vec4 pit)\n{\n return uv * pit.zw + vec2(pit.x, 1.0 - pit.w - pit.y);\n}\n\n",precision_qualifier:"precision highp float;\nprecision highp int;\n",projective_texturing_vertex:"for(int i = 0; i < ORIENTED_IMAGES_COUNT; ++i)\n projectiveTextureCoords[i] = projectiveTextureMatrix[i] * mvPosition;\n",projective_texturing_pars_vertex:"uniform mat4 projectiveTextureMatrix[ORIENTED_IMAGES_COUNT];\nvarying vec4 projectiveTextureCoords[ORIENTED_IMAGES_COUNT];\n",projective_texturing_pars_fragment:"uniform sampler2D projectiveTexture[ORIENTED_IMAGES_COUNT];\nuniform sampler2D mask[ORIENTED_IMAGES_COUNT];\nvarying vec4 projectiveTextureCoords[ORIENTED_IMAGES_COUNT];\nuniform float projectiveTextureAlphaBorder;\nuniform float opacity;\nuniform bool boostLight;\n\nstruct Distortion {\n vec2 size;\n#if USE_DISTORTION\n vec2 pps;\n vec4 polynom;\n vec3 l1l2;\n#endif\n};\n\nuniform Distortion projectiveTextureDistortion[ORIENTED_IMAGES_COUNT];\n\nfloat getAlphaBorder(vec2 p)\n{\n vec2 d = clamp(projectiveTextureAlphaBorder * min(p, 1. - p), 0., 1.);\n return min(d.x, d.y);\n}\n\n#if USE_DISTORTION\nvoid distort(inout vec2 p, vec4 polynom, vec2 pps)\n{\n vec2 v = p - pps;\n float v2 = dot(v, v);\n if (v2 > polynom.w) {\n p = vec2(-1.);\n }\n else {\n p += (v2 * (polynom.x + v2 * (polynom.y + v2 * polynom.z) ) ) * v;\n }\n}\n\nvoid distort(inout vec2 p, vec4 polynom, vec3 l1l2, vec2 pps)\n{\n if ((l1l2.x == 0.) && (l1l2.y == 0.)) {\n distort(p, polynom, pps);\n } else {\n vec2 AB = (p - pps) / l1l2.z;\n float R = length(AB);\n float lambda = atan(R) / R;\n vec2 ab = lambda * AB;\n float rho2 = dot(ab, ab);\n float r357 = 1. + rho2* (polynom.x + rho2* (polynom.y + rho2 * polynom.z));\n p = pps + l1l2.z * (r357 * ab + vec2(dot(l1l2.xy, ab), l1l2.y * ab.x));\n }\n}\n#endif\n\nvec4 mixBaseColor(vec4 aColor, vec4 baseColor) {\n #ifdef USE_BASE_MATERIAL\n baseColor.rgb = aColor.a == 1.0 ? aColor.rgb : mix(baseColor, aColor, aColor.a).rgb;\n baseColor.a = min(1.0, aColor.a + baseColor.a);\n #else\n baseColor.rgb += aColor.rgb * aColor.a;\n baseColor.a += aColor.a;\n #endif\n return baseColor;\n}\n\nvec4 projectiveTextureColor(vec4 coords, Distortion distortion, sampler2D tex, sampler2D mask, vec4 baseColor) {\n vec3 p = coords.xyz / coords.w;\n if(p.z * p.z < 1.) {\n#if USE_DISTORTION\n p.xy *= distortion.size;\n distort(p.xy, distortion.polynom, distortion.l1l2, distortion.pps);\n p.xy /= distortion.size;\n#endif\n\n float d = getAlphaBorder(p.xy) * texture2D(mask, p.xy).r;\n\n if(d > 0.) {\n\n#if DEBUG_ALPHA_BORDER\n vec3 r = texture2D(tex, p.xy).rgb;\n return mixBaseColor(vec4( r.r * d, r.g, r.b, 1.0), baseColor);\n#else\n vec4 color = texture2D(tex, p.xy);\n color.a *= d;\n if (boostLight) {\n return mixBaseColor(vec4(sqrt(color.rgb), color.a), baseColor);\n } else {\n return mixBaseColor(color, baseColor);\n }\n#endif\n\n }\n }\n return mixBaseColor(vec4(0.), baseColor);\n}\n",project_pars_vertex:"attribute vec3 position;\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\n",WebGL2_pars_vertex:"// Copy from GLSL 3.0 conversion for built-in materials and ShaderMaterial in THREE.WebGLProgram\n// https://github.com/mrdoob/three.js/blob/696d7836d1fc56c4702a475e6991c4adef7357f4/src/renderers/webgl/WebGLProgram.js#L682\n#if defined(WEBGL2)\n#define attribute in\n#define varying out\n#define texture2D texture\n#endif\n",WebGL2_pars_fragment:"// Copy from GLSL 3.0 conversion for built-in materials and ShaderMaterial in THREE.WebGLProgram\n// https://github.com/mrdoob/three.js/blob/696d7836d1fc56c4702a475e6991c4adef7357f4/src/renderers/webgl/WebGLProgram.js#L682\n#if defined(WEBGL2)\n#define varying in\nout highp vec4 pc_fragColor;\n#define gl_FragColor pc_fragColor\n#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n#define texture2DLodEXT textureLod\n#define texture2DProjLodEXT textureProjLod\n#define textureCubeLodEXT textureLod\n#define texture2DGradEXT textureGrad\n#define texture2DProjGradEXT textureProjGrad\n#define textureCubeGradEXT textureGrad\n#endif\n"},Ae=function(){function t(e,r){(0,C.Z)(this,t),this.path=r,this.target=e,this.install()}return(0,T.Z)(t,[{key:"customHeaderColorLayer",value:function(t){me.custom_header_colorLayer=t,this.target["".concat(this.path,"custom_header_colorLayer")]=t}},{key:"customBodyColorLayer",value:function(t){me.custom_body_colorLayer=t,this.target["".concat(this.path,"custom_body_colorLayer")]=t}},{key:"install",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.target,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:me,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.path;return Object.keys(r).forEach((function(i){Object.defineProperty(t,i,{get:function(){return r[i]}}),e[n+i]=r[i]})),e}}]),t}();const ge=new Ae(n.ShaderChunk,"itowns/");var ve=r(27240),ye=r(47052),be=r(800),xe=r(57918),we=r(66165);function _e(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Ee(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ee(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Ee(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:[{offset:0,count:1}],n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0;if(0!==e.length){var l,c=new Path2D,u=_e(r);try{for(u.s();!(l=u.n()).done;){var h=l.value;if(h.extent&&a.ZP.intersectsExtent(h.extent,i)){var f=h.offset*n,d=f+h.count*n;c.moveTo(e[f],e[f+1]);for(var p=f+n;pt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(this.parent.level0Nodes);try{for(r.s();!(e=r.n()).done;)e.value.traverse((0,x.U8)(this.id))}catch(t){r.e(t)}finally{r.f()}}}]),i}(we.Z);const We=je;var He=r(79736);var Xe=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e,r,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,C.Z)(this,i),(0,_t.S_)(o),(a=n.call(this,t,o)).isColorLayer=!0,a.defineLayerProperty("visible",!0),a.defineLayerProperty("opacity",1),a.defineLayerProperty("sequence",0),a.transparent=o.transparent||a.opacity<1,a.noTextureParentOutsideLimit=!!o.source&&o.source.isFileSource,a.effect_type=null!==(e=o.effect_type)&&void 0!==e?e:0,a.effect_parameter=null!==(r=o.effect_parameter)&&void 0!==r?r:1,a.buildExtent=!0,a.structure="2d",a}return(0,T.Z)(i,[{key:"setupRasterNode",value:function(t){var e=new He.AN(t.material,this);return t.material.addLayer(e),t.material.setSequence(this.parent.colorLayersOrder),e}},{key:"update",value:function(t,e,r,n){return(0,x.XP)(t,this,r,n)}}]),i}(We);const qe=Xe;var Ye=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e,r,a,o,s,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,C.Z)(this,i),s=n.call(this,t,l),(l.zmin||l.zmax)&&console.warn("Config using zmin and zmax are deprecated, use {clampValues: {min, max}} structure."),s.zmin=null!==(e=null===(r=l.clampValues)||void 0===r?void 0:r.min)&&void 0!==e?e:l.zmin,s.zmax=null!==(a=null===(o=l.clampValues)||void 0===o?void 0:o.max)&&void 0!==a?a:l.zmax,s.isElevationLayer=!0,s.defineLayerProperty("scale",s.scale||1),s}return(0,T.Z)(i,[{key:"setupRasterNode",value:function(t){var e=this,r=new He.NO(t.material,this);t.material.addLayer(r),t.material.setSequenceElevation(this.id);var n=function(){return t.setBBoxZ({min:r.min,max:r.max,scale:e.scale})};return n(),r.addEventListener("rasterElevationLevelChanged",n),this.addEventListener("scale-property-changed",n),t.addEventListener("dispose",(function(){e.removeEventListener("scale-property-changed",n)})),r}},{key:"update",value:function(t,e,r,n){return(0,x.pN)(t,this,r,n)}}]),i}(We);const Je=Ye;var Ke=r(20193);const $e=function(t){(0,E.Z)(a,t);var e,r,i=(e=a,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function a(t){var e,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,C.Z)(this,a),o.update=b.update,o.convert=he.convert({batchId:o.batchId}),(r=i.call(this,t,o.object3d||new n.Group,o)).isFeatureGeometryLayer=!0,r.accurate=null===(e=o.accurate)||void 0===e||e,r.buildExtent=!r.accurate,r}return(0,T.Z)(a,[{key:"preUpdate",value:function(t,e){e.has(this.parent)&&this.object3d.clear()}}]),a}(Ke.Z);var tr=r(73773);function er(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return rr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function rr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{};return(0,C.Z)(this,a),(e=i.call(this,t,new n.Group,r)).isPointCloudLayer=!0,e.protocol="pointcloud",e.group=r.group||new n.Group,e.object3d.add(e.group),e.bboxes=r.bboxes||new n.Group,e.bboxes.visible=!1,e.object3d.add(e.bboxes),e.group.updateMatrixWorld(),e.octreeDepthLimit=r.octreeDepthLimit||-1,e.pointBudget=r.pointBudget||2e6,e.pointSize=0!==r.pointSize&&isNaN(r.pointSize)?4:r.pointSize,e.sseThreshold=r.sseThreshold||2,e.defineLayerProperty("minIntensityRange",r.minIntensityRange||0,lr),e.defineLayerProperty("maxIntensityRange",r.maxIntensityRange||1,lr),e.material=r.material||{},e.material.isMaterial||(r.material=r.material||{},r.material.intensityRange=new n.Vector2(e.minIntensityRange,e.maxIntensityRange),e.material=new L.ZP(r.material)),e.material.defines=e.material.defines||{},e.mode=r.mode||L.vj.COLOR,e}return(0,T.Z)(a,[{key:"preUpdate",value:function(t,e){var r;t.camera.preSSE=t.camera.height/(2*Math.tan(.5*n.MathUtils.degToRad(t.camera.camera3D.fov))),this.material&&(this.material.visible=this.visible,this.material.opacity=this.opacity,this.material.transparent=this.opacity<1,this.material.size=this.pointSize,this.material.scale=t.camera.preSSE,this.material.updateUniforms&&this.material.updateUniforms());var i,a=er(e.values());try{for(a.s();!(i=a.n()).done;){var o=i.value;if(o.isCamera||o==this)return[this.root];if(void 0!==o.obj&&o.obj.isPoints&&o.obj.layer==this)if(r){if(!(r=o.findCommonAncestor(r)))return[this.root]}else r=o}}catch(t){a.e(t)}finally{a.f()}return r?[r]:[this.root]}},{key:"update",value:function(t,e,r){var n=this;if(r.visible=!1,this.octreeDepthLimit>=0&&this.octreeDepthLimit=1)return r.children;var l,c=er(r.children);try{for(c.s();!(l=c.n()).done;)sr(l.value)}catch(t){c.e(t)}finally{c.f()}}}else sr(r)}}},{key:"postUpdate",value:function(){this.displayedCount=0;var t,e=er(this.group.children);try{for(e.s();!(t=e.n()).done;){var r=t.value;if(r.visible){var n=r.geometry.attributes.position.count;r.geometry.setDrawRange(0,n),this.displayedCount+=n}}}catch(t){e.e(t)}finally{e.f()}if(this.displayedCount>this.pointBudget)if(this.supportsProgressiveDisplay){var i,a=this.pointBudget/this.displayedCount,o=er(this.group.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s.visible){var l=Math.floor(s.geometry.drawRange.count*a);l>0?s.geometry.setDrawRange(0,l):s.visible=!1}}}catch(t){o.e(t)}finally{o.f()}this.displayedCount*=a}else{this.group.children.sort((function(t,e){return e.userData.node.sse-t.userData.node.sse}));var c=!1;this.displayedCount=0;var u,h=er(this.group.children);try{for(h.s();!(u=h.n()).done;){var f=u.value,d=f.geometry.attributes.position.count;c||this.displayedCount+d>this.pointBudget?(f.visible=!1,c=!0):this.displayedCount+=d}}catch(t){h.e(t)}finally{h.f()}}for(var p=Date.now(),m=this.group.children.length-1;m>=0;m--){var A=this.group.children[m];!A.visible&&p-A.userData.node.notVisibleSince>1e4&&(this.group.children.splice(m,1),A.geometry.dispose(),A.material=null,A.geometry=null,A.userData.node.obj=null)}}},{key:"pickObjectsAt",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return tr.Z.pickPointsAt(t,e,r,this,n)}},{key:"getObjectToUpdateForAttachedLayers",value:function(t){if(t.obj){var e=t.parent;return e&&e.obj?{element:t.obj,parent:e.obj}:{element:t.obj}}}}]),a}(Ke.Z);const ur=cr;const hr=function(t){(0,E.Z)(a,t);var e,r,i=(e=a,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function a(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0;return(0,C.Z)(this,a),(t=i.call(this)).numPoints=e,t.layer=r,t.children=[],t.bbox=new n.Box3,t.sse=-1,t}return(0,T.Z)(a,[{key:"add",value:function(t,e){this.children.push(t),t.parent=this,this.createChildAABB(t,e)}},{key:"load",value:function(){var t=this;return this.octreeIsLoaded||this.loadOctree(),this.layer.source.fetcher(this.url,this.layer.source.networkOptions).then((function(e){return t.layer.source.parse(e,{out:t.layer,in:t.layer.source})}))}},{key:"findCommonAncestor",value:function(t){return t.depth!=this.depth?t.depth0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2?arguments[2]:void 0;return(0,C.Z)(this,i),(t=n.call(this,e,a)).childrenBitField=r,t.id="",t.depth=0,t.baseurl=a.source.baseurl,t}return(0,T.Z)(i,[{key:"add",value:function(t,e,r){(0,_.Z)((0,S.Z)(i.prototype),"add",this).call(this,t,e),t.id=this.id+e,t.depth=t.id.length,t.id.length%this.layer.hierarchyStepSize==0?t.baseurl="".concat(r.baseurl,"/").concat(t.id.substr(r.id.length)):t.baseurl=r.baseurl}},{key:"createChildAABB",value:function(t,e){t.bbox.copy(this.bbox),this.bbox.getCenter(t.bbox.max),fr.copy(t.bbox.max).sub(this.bbox.min),1===e?(t.bbox.min.z+=fr.z,t.bbox.max.z+=fr.z):3===e?(t.bbox.min.z+=fr.z,t.bbox.max.z+=fr.z,t.bbox.min.y+=fr.y,t.bbox.max.y+=fr.y):0===e||(2===e?(t.bbox.min.y+=fr.y,t.bbox.max.y+=fr.y):5===e?(t.bbox.min.z+=fr.z,t.bbox.max.z+=fr.z,t.bbox.min.x+=fr.x,t.bbox.max.x+=fr.x):7===e?(t.bbox.min.add(fr),t.bbox.max.add(fr)):4===e?(t.bbox.min.x+=fr.x,t.bbox.max.x+=fr.x):6===e&&(t.bbox.min.y+=fr.y,t.bbox.max.y+=fr.y,t.bbox.min.x+=fr.x,t.bbox.max.x+=fr.x))}},{key:"octreeIsLoaded",get:function(){return!(this.childrenBitField&&0===this.children.length)}},{key:"url",get:function(){return"".concat(this.baseurl,"/r").concat(this.id,".").concat(this.layer.source.extension)}},{key:"loadOctree",value:function(){var t=this,e="".concat(this.baseurl,"/r").concat(this.id,".").concat(this.layer.source.extensionOctree);return this.layer.source.fetcher(e,this.layer.source.networkOptions).then((function(e){var r=new DataView(e),n=[],a=0;for(t.childrenBitField=r.getUint8(0),a+=1,t.numPoints=r.getUint32(1,!0),a+=4,n.push(t);n.length&&a1&&void 0!==arguments[1]?arguments[1]:{};(0,C.Z)(this,a),c.side=null!==(e=c.side)&&void 0!==e?e:n.DoubleSide,c.transparent=null===(r=c.transparent)||void 0===r||r,c.opacity=null!==(o=c.opacity)&&void 0!==o?o:1;var u={};for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&void 0!==Er[h]&&(u[h]=c[h]);(l=i.call(this,u)).defines.ORIENTED_IMAGES_COUNT=null!==(s=c.OrientedImagesCount)&&void 0!==s?s:t.length;var f=ye.Z.getMaxTextureUnitsCount();l.defines.ORIENTED_IMAGES_COUNT>f&&(console.warn("OrientedImageMaterial: Can't project ".concat(t.length," textures, because it's more than GPU capabilities maximum texture units (").concat(f,")")),l.defines.ORIENTED_IMAGES_COUNT=f-1,console.warn("OrientedImageMaterial: We'll use only the first ".concat(l.defines.ORIENTED_IMAGES_COUNT," cameras."))),c.useBaseMaterial&&(l.defines.USE_BASE_MATERIAL=!0),l.defines.USE_DISTORTION=Number(t.some((function(t){return null!==t.distortion.pps}))),l.alphaBorder=20|c.alphaBorder,l.defines.DEBUG_ALPHA_BORDER=0|c.debugAlphaBorder,l.cameras=t;var d=[],p=[],m=[],A=[];l.group=new n.Group;for(var g=0;g\n#include \n#include \n#include \n#include \n#include \n\nvarying vec3 vNormal;\nattribute vec3 normal;\n\nvoid main() {\n #include \n #include \n vNormal = normal;\n #include \n #include \n}\n",l.fragmentShader=br.Z.unrollLoops("#include \n#include \n#include \n#include \nvarying vec3 vNormal;\n\n#ifdef USE_BASE_MATERIAL\nstruct noPT {\n vec3 lightDirection;\n vec3 ambient;\n float opacity;\n};\n\nuniform noPT noProjectiveMaterial;\n#endif\n\nvoid main(void)\n{\n #include \n #ifdef USE_BASE_MATERIAL\n float nDotVP = (max(0.1, dot(vNormal, normalize(noProjectiveMaterial.lightDirection))));\n vec4 color = vec4(noProjectiveMaterial.ambient + nDotVP, 0.0);\n #else\n vec4 color = vec4(0.0);\n #endif\n\n #pragma unroll_loop\n for (int i = 0; i < ORIENTED_IMAGES_COUNT; i++) {\n color = projectiveTextureColor(projectiveTextureCoords[ ORIENTED_IMAGES_COUNT - 1 - i ], projectiveTextureDistortion[ ORIENTED_IMAGES_COUNT - 1 - i ], projectiveTexture[ ORIENTED_IMAGES_COUNT - 1 - i ], mask[ORIENTED_IMAGES_COUNT - 1 - i], color);\n }\n\n #ifdef USE_BASE_MATERIAL\n color.a = color.a < 1.0 ? max(noProjectiveMaterial.opacity, color.a) : 1.0 ;\n gl_FragColor = vec4(color.rgb, color.a * opacity);\n #else\n gl_FragColor = vec4(color.rgb / color.a, opacity);\n #endif\n\n}\n",l.defines),l}return(0,T.Z)(a,[{key:"onBeforeCompile",value:function(t,e){e.capabilities.isWebGL2&&(this.defines.WEBGL2=!0,t.glslVersion="300 es")}},{key:"setTextures",value:function(t,e,r){var n=this;if(t){this.group.position.copy(e.position),this.group.quaternion.copy(e.quaternion);for(var i=function(e){if(n.uniforms.projectiveTexture.value[e].dispose(),n.uniforms.projectiveTexture.value[e]=t[e],r){var i=n.group.children[e];if(r[e]!=i.name){var a=n.cameras.find((function(t){return t.name===r[e]}));n.uniforms.mask.value[e]=a.maskTexture||wr,n.uniforms.mask.value[e].needsUpdate=!0,n.uniforms.projectiveTextureDistortion.value[e]=a.distortion,n.group.children[e]=a,a.parent=n.group}}n.group.children[e].needsUpdate=!0},a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=JSON.parse(t)),Promise.all(t.map((function(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null==e.useMask||e.useMask,i=null==e.imageYDown||e.imageYDown,a=t.projection,o=(new n.Vector2).fromArray(t.size),s=new n.Vector2(a[0],a[4]),l=new n.Vector2(a[2],i?o.y-a[5]:a[5]),c=a[1],u=new k(o,s,l,e.near,e.far,c);u.position.fromArray(t.position);var h,f=Ir.fromArray(t.rotation);u.matrix.setFromMatrix3(f),u.quaternion.setFromRotationMatrix(u.matrix),u.rotateX(Math.PI),t.distortion&&u.distortion.setFromMicmacCalibration(t.distortion,i),u.maskPath=t.mask,u.name=t.id;var d=new Promise((function(t){h=t}));return r&&u.maskPath?Tr.load(u.maskPath,(function(t){u.maskTexture=t,h(u)})):h(u),d}(t,e)})))}};function Br(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return kr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function kr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{};(0,C.Z)(this,a),s.projection&&(console.warn("OrientedImageLayer projection parameter is deprecated, use crs instead."),s.crs=s.crs||s.projection),(e=i.call(this,t,new n.Group,s)).isOrientedImageLayer=!0,e.background=s.background||function(t){if(t&&!(t<=0)){var e=new n.SphereGeometry(t,32,32),r=new n.MeshPhongMaterial({color:7829503,side:n.DoubleSide,transparent:!0,opacity:.5,wireframe:!0}),i=new n.Mesh(e,r);return i.visible=!0,i.name="OrientedImageBackground",i}}(s.backgroundDistance),e.background&&(e.background.layer=null!==(r=e.background.layer)&&void 0!==r?r:{},e.background.layer.id=null!==(o=e.background.layer.id)&&void 0!==o?o:t,e.object3d.add(e.background)),e.currentPano=void 0,e.onPanoChanged=s.onPanoChanged||function(){},e.getCamerasNameFromFeature=s.getCamerasNameFromFeature||function(){};var l=e.addInitializationStep();e.mergeFeatures=!1,e.filteringExtent=!1,e.accurate=!0;var c={out:(0,w.Z)(e)};return e.source.whenReady.then((function(t){return Cr.Z.parse(s.orientation||t.orientation,c).then((function(t){e.panos=t.features;var r,i=c.in.crs,a=s.crs,o=Lt.quaternionFromCRSToCRS(i,a),l=new n.Quaternion,u=0,h=Br(e.panos);try{for(h.s();!(r=h.n()).done;){var f=r.value;Lr.crs=f.crs,Lr.setFromArray(f.vertices).applyMatrix4(t.matrix),f.position=Lr.toVector3(),o(Lr,l),f.quaternion=Lt.quaternionFromAttitude(f.geometries[0].properties).premultiply(l),f.id=f.geometries[0].properties.id,f.index=u++}}catch(t){h.e(t)}finally{h.f()}})).then((function(){Rr.parse(s.calibration||t.calibration,s).then((function(t){e.cameras=t,e.material=new Sr(e.cameras,s),l()}))}))})),e}return(0,T.Z)(a,[{key:"update",value:function(){}},{key:"boostLight",get:function(){return this.material.uniforms.boostLight.value},set:function(t){this.material.uniforms.boostLight.value=t}},{key:"preUpdate",value:function(t){var e;!function(t,e,r){var n=r.mostNearPano(e.position),i=r.currentPano?r.currentPano.id:void 0;if(n&&i!=n.id){r.currentPano=n,r.onPanoChanged({previousPanoPosition:r.getPreviousPano()?r.getPreviousPano().position:void 0,currentPanoPosition:r.getCurrentPano().position,nextPanoPosition:r.getNextPano().position});var a=n.geometries[0].properties.idSensors,o=r.cameras.map((function(t){return{cameraId:t.name,panoId:n.id,as:function(){}}})).filter((function(t){return!a||a.includes(t.cameraId)})),s={layer:r,extentsSource:o,view:t.view,requester:n,earlyDropFunction:Pr};t.scheduler.execute(s).then((function(e){n.id===r.currentPano.id&&(r.material.setTextures(e,n,r.getCamerasNameFromFeature(n)),r.material.updateUniforms(t.camera.camera3D),t.view.notifyChange(r,!0))}),(function(){}))}}(t,t.camera.camera3D,this),this.material.updateUniforms(t.camera.camera3D),(e=this).background&&e.currentPano&&(e.background.position.copy(e.currentPano.position),e.background.updateMatrixWorld(),e.background.material=e.material||e.background.material)}},{key:"getNextPano",value:function(){var t=(this.currentPano.index+1)%this.panos.length;return this.panos[t]}},{key:"getCurrentPano",value:function(){return this.currentPano}},{key:"getPreviousPano",value:function(){var t=(this.currentPano.index-1)%this.panos.length;return this.panos[t]}},{key:"delete",value:function(t){this.background&&(0,_.Z)((0,S.Z)(a.prototype),"delete",this).call(this),t&&this.cache.clear(),this.material.visible=!1,console.warn("You need to replace OrientedImageLayer.material applied on each object. This issue will be fixed when OrientedImageLayer will be a ColorLayer. the material visibility is set to false. To follow issue see https://github.com/iTowns/itowns/issues/1018")}},{key:"mostNearPano",value:function(t){var e,r,n=1/0,i=Br(this.panos);try{for(i.s();!(r=i.n()).done;){var a=r.value,o=t.distanceTo(a.position);o5&&void 0!==arguments[5]?arguments[5]:0;return(0,C.Z)(this,i),(s=n.call(this,l,o)).isEntwinePointTileNode=!0,s.depth=t,s.x=e,s.y=r,s.z=a,s.id=jr(t,e,r,a),s.url="".concat(s.layer.source.url,"/ept-data/").concat(s.id,".").concat(s.layer.source.extension),s}return(0,T.Z)(i,[{key:"createChildAABB",value:function(t){var e=Math.pow(2,t.depth-this.depth);this.bbox.getSize(Zr).divideScalar(e),t.bbox.min.copy(this.bbox.min),Vr.copy(this).multiplyScalar(e),Qr.subVectors(t,Vr).multiply(Zr),t.bbox.min.add(Qr),t.bbox.max.copy(t.bbox.min).add(Zr)}},{key:"octreeIsLoaded",get:function(){return this.numPoints>=0}},{key:"loadOctree",value:function(){var t=this;return f.Z.json("".concat(this.layer.source.url,"/ept-hierarchy/").concat(this.id,".json"),this.layer.source.networkOptions).then((function(e){t.numPoints=e[t.id];var r=[];for(r.push(t);r.length;){var n=r.shift(),i=n.depth+1,a=2*n.x,o=2*n.y,s=2*n.z;n.findAndCreateChild(i,a,o,s,e,r),n.findAndCreateChild(i,a+1,o,s,e,r),n.findAndCreateChild(i,a,o+1,s,e,r),n.findAndCreateChild(i,a+1,o+1,s,e,r),n.findAndCreateChild(i,a,o,s+1,e,r),n.findAndCreateChild(i,a+1,o,s+1,e,r),n.findAndCreateChild(i,a,o+1,s+1,e,r),n.findAndCreateChild(i,a+1,o+1,s+1,e,r)}}))}},{key:"findAndCreateChild",value:function(t,e,r,n,a,o){var s=a[jr(t,e,r,n)];if("number"==typeof s){var l=new i(t,e,r,n,this.layer,s);this.add(l),o.push(l)}}}]),i}(hr);var Hr=new n.Mesh,Xr=new n.Box3;Hr.geometry.boundingBox=Xr;var qr=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t,e){var r;(0,C.Z)(this,i),(r=n.call(this,t,e)).isEntwinePointTileLayer=!0;var o=r.addInitializationStep();return r.whenReady=r.source.whenReady.then((function(){return r.root=new Wr(0,0,0,0,(0,w.Z)(r),-1),r.root.bbox.min.fromArray(r.source.boundsConforming,0),r.root.bbox.max.fromArray(r.source.boundsConforming,3),r.extent=a.ZP.fromBox3(e.crs||"EPSG:4326",r.root.bbox),r.root.loadOctree().then(o)})),r}return(0,T.Z)(i,[{key:"spacing",get:function(){return this.source.spacing}}]),i}(ur);const Yr=qr;var Jr=r(51123);var Kr=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e;if((0,C.Z)(this,i),t.parsedData&&(console.warn("FileSource parsedData parameter is deprecated, use features instead of."),t.features=t.features||t.parsedData),t.projection&&(console.warn("FileSource projection parameter is deprecated, use crs instead."),t.crs=t.crs||t.projection),!t.crs){if(!t.features||!t.features.crs)throw new Error("source.crs is required in FileSource");t.crs=t.features.crs}if(!t.url&&!t.fetchedData&&!t.features)throw new Error("url, fetchedData and features are not set in\n FileSource; at least one needs to be present");return t.url=t.url||"fake-file-url",(e=n.call(this,t)).isFileSource=!0,e.fetchedData=t.fetchedData,e.fetchedData||t.features?t.features&&(e._featuresCaches[t.features.crs]=new Ve.Z,e._featuresCaches[t.features.crs].setByArray(Promise.resolve(t.features),[0])):e.whenReady=e.fetcher(e.urlFromExtent(),e.networkOptions).then((function(t){e.fetchedData=t})),e.whenReady.then((function(){return e.fetchedData})),e.zoom={min:0,max:1/0},e}return(0,T.Z)(i,[{key:"urlFromExtent",value:function(){return this.url}},{key:"onLayerAdded",value:function(t){var e=this;t.in=this,(0,_.Z)((0,S.Z)(i.prototype),"onLayerAdded",this).call(this,t);var r=this._featuresCaches[t.out.crs].getByArray([0]);r||(t.out.buildExtent="EPSG:4978"!=this.crs,t.out.buildExtent&&(t.out.forcedExtentCrs="EPSG:4978"!=t.out.crs?t.out.crs:l.Z.formatToEPSG(this.crs)),r=this.parser(this.fetchedData,t),this._featuresCaches[t.out.crs].setByArray(r,[0])),r.then((function(t){t.extent&&(e.extent=t.extent.clone(),e.extent.crs==t.crs&&e.extent.applyMatrix4(t.matrixWorld))}))}},{key:"loadData",value:function(t,e){return this._featuresCaches[e.crs].getByArray([0])}},{key:"extentInsideLimit",value:function(t){return this.extent.intersectsExtent(t)}}]),i}(Jr.ZP);const $r=Kr;var tn=r(13012);var en=new a.ZP(l.Z.tms_4326,0,0,0),rn=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e;if((0,C.Z)(this,i),t.format=t.format||"image/png",e=n.call(this,t),!t.crs)throw new Error("New TMSSource/WMTSSource: crs is required");if(e.isTMSSource=!0,t.extent||(e.extent=a.Mh.get(t.crs)),e.zoom=t.zoom,e.isInverted=t.isInverted||!1,e.url=t.url,e.crs=l.Z.formatToTms(t.crs),e.tileMatrixSetLimits=t.tileMatrixSetLimits,e.extentSetlimits={},e.tileMatrixCallback=t.tileMatrixCallback||function(t){return t},!e.zoom)if(e.tileMatrixSetLimits){var r=Object.keys(e.tileMatrixSetLimits),o=r.length,s=Number(r[o-1]);e.zoom={min:s-o+1,max:s}}else e.zoom={min:0,max:1/0};return e}return(0,T.Z)(i,[{key:"urlFromExtent",value:function(t){return tn.Z.xyz(t,this)}},{key:"onLayerAdded",value:function(t){(0,_.Z)((0,S.Z)(i.prototype),"onLayerAdded",this).call(this,t);var e=t.out.parent,r=e?e.extent.crs:t.out.crs;if(this.tileMatrixSetLimits&&!this.extentSetlimits[r]){this.extentSetlimits[r]={},en.crs=this.crs;for(var n=this.zoom.max;n>=this.zoom.min;n--){var o=this.tileMatrixSetLimits[n],s=en.set(n,o.minTileRow,o.minTileCol).as(r),l=s.west,c=s.north,u=en.set(n,o.maxTileRow,o.maxTileCol).as(r),h=u.east,f=u.south;this.extentSetlimits[r][n]=new a.ZP(r,l,h,f,c)}}}},{key:"extentInsideLimit",value:function(t,e){return e>=this.zoom.min&&e<=this.zoom.max&&(null==this.extentSetlimits[t.crs]||this.extentSetlimits[t.crs][e].intersectsExtent(t))}}]),i}(Jr.ZP);const nn=rn;var an=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e;if((0,C.Z)(this,i),t.projection&&(console.warn("WFSSource projection parameter is deprecated, use crs instead."),t.crs=t.crs||t.projection),!t.typeName)throw new Error("source.typeName is required in wfs source.");if(!t.crs)throw new Error("source.crs is required in wfs source");for(var r in t.format=t.format||"application/json",(e=n.call(this,t)).isWFSSource=!0,e.typeName=t.typeName,e.version=t.version||"2.0.2",e.url.endsWith("?")||(e.url="".concat(e.url,"?")),e.url="".concat(t.url,"SERVICE=WFS&REQUEST=GetFeature&typeName=").concat(e.typeName,"&VERSION=").concat(e.version,"&SRSNAME=").concat(e.crs,"&outputFormat=").concat(e.format,"&BBOX=%bbox,").concat(e.crs),e.zoom={min:0,max:1/0},e.vendorSpecific=t.vendorSpecific,e.vendorSpecific)Object.prototype.hasOwnProperty.call(e.vendorSpecific,r)&&(e.url="".concat(e.url,"&").concat(r,"=").concat(e.vendorSpecific[r]));return e}return(0,T.Z)(i,[{key:"handlingError",value:function(t){var e=this;return t.response&&400==t.response.status?t.response.text().then((function(r){var n="".concat(e.url,"SERVICE=WFS&REQUEST=GetCapabilities&VERSION=").concat(e.version),i=(new DOMParser).parseFromString(r,"application/xml").querySelector("Exception"),a=i.getAttribute("exceptionCode"),o=i.querySelector("ExceptionText").textContent;console.error("Source ".concat(e.typeName,': bad request when fetching data. Server says: "').concat(a,": ").concat(o,'". \nReviewing ').concat(n," may help."),t)})):(0,_.Z)((0,S.Z)(i.prototype),"handlingError",this).call(this,t)}},{key:"requestToKey",value:function(t){return l.Z.isTms(t.crs)?(0,_.Z)((0,S.Z)(i.prototype),"requestToKey",this).call(this,t):[t.zoom,t.south,t.west]}},{key:"urlFromExtent",value:function(t){return tn.Z.bbox(t,this)}},{key:"extentInsideLimit",value:function(t){return this.extent.intersectsExtent(t)}}]),i}(Jr.ZP);const on=an;var sn=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e;if((0,C.Z)(this,i),!t.name)throw new Error("source.name is required.");if(!t.extent)throw new Error("source.extent is required");if(!t.crs&&!t.projection)throw new Error("source.crs is required");t.format=t.format||"image/png",(e=n.call(this,t)).isWMSSource=!0,e.name=t.name,e.zoom={min:0,max:1/0},e.style=t.style||"",e.width=t.width||t.height||256,e.height=t.height||t.width||256,e.version=t.version||"1.3.0",e.transparent=t.transparent||!1,t.axisOrder||("EPSG:4326"==e.crs?e.axisOrder="1.1.0"===e.version?"wsen":"swne":e.axisOrder="wsen");var r="1.3.0"===e.version?"CRS":"SRS";for(var a in e.url.endsWith("?")||(e.url="".concat(e.url,"?")),e.url="".concat(e.url,"SERVICE=WMS&REQUEST=GetMap&LAYERS=").concat(e.name,"&VERSION=").concat(e.version,"&STYLES=").concat(e.style,"&FORMAT=").concat(e.format,"&TRANSPARENT=").concat(e.transparent,"&BBOX=%bbox&").concat(r,"=").concat(e.crs,"&WIDTH=").concat(e.width,"&HEIGHT=").concat(e.height),e.vendorSpecific=t.vendorSpecific,e.vendorSpecific)Object.prototype.hasOwnProperty.call(e.vendorSpecific,a)&&(e.url="".concat(e.url,"&").concat(a,"=").concat(e.vendorSpecific[a]));return e}return(0,T.Z)(i,[{key:"urlFromExtent",value:function(t){return tn.Z.bbox(t,this)}},{key:"extentInsideLimit",value:function(t){return this.extent.intersectsExtent(t)}}]),i}(Jr.ZP);const ln=sn;const cn=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e;if((0,C.Z)(this,i),!t.name)throw new Error("New WMTSSource: name is required");for(var r in(e=n.call(this,t)).isWMTSSource=!0,e.url.endsWith("?")||(e.url="".concat(e.url,"?")),e.url="".concat(e.url)+"LAYER=".concat(t.name)+"&FORMAT=".concat(e.format)+"&SERVICE=WMTS"+"&VERSION=".concat(t.version||"1.0.0")+"&REQUEST=GetTile"+"&STYLE=".concat(t.style||"normal")+"&TILEMATRIXSET=".concat(t.tileMatrixSet)+"&TILEMATRIX=%TILEMATRIX&TILEROW=%ROW&TILECOL=%COL",e.vendorSpecific=t.vendorSpecific,e.vendorSpecific)Object.prototype.hasOwnProperty.call(e.vendorSpecific,r)&&(e.url="".concat(e.url,"&").concat(r,"=").concat(e.vendorSpecific[r]));return e}return(0,T.Z)(i)}(nn);var un=r(92294),hn=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/,fn="https://api.mapbox.com",dn=!0,pn=null;function mn(t){var e=t.params.length?"?".concat(t.params.join("&")):"";return"".concat(t.protocol,"://").concat(t.authority).concat(t.path).concat(e)}function An(t,e){var r=vn(fn);if(t.protocol=r.protocol,t.authority=r.authority,"http"===t.protocol){var n=t.params.indexOf("secure");n>=0&&t.params.splice(n,1)}if("/"!==r.path&&(t.path="".concat(r.path).concat(t.path)),!dn)return mn(t);if(!(e=e||pn))throw new Error("An API access token is required");if("s"===e[0])throw new Error("Use a public access token (pk.*), not a secret access token (sk.*).");return t.params=t.params.filter((function(t){return-1===t.indexOf("access_token")})),t.params.push("access_token=".concat(e)),mn(t)}function gn(t){return 0===t.indexOf("mapbox:")}function vn(t){var e=t.match(hn);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}const yn=function(t,e){if(!gn(t))return t;var r=vn(t);return r.path="/styles/v1".concat(r.path),An(r,e)},bn=function(t,e){if(!gn(t))return t;var r=vn(t);return r.path="/v4/".concat(r.authority,".json"),r.params.push("secure"),An(r,e)},xn=function(t,e,r,n){var i=vn(t);return gn(t)?(i.path="/styles/v1".concat(i.path,"/sprite").concat(e).concat(r),An(i,n)):(i.path+="".concat(e).concat(r),mn(i))};function wn(t){return t.replace(/\{/g,"${")}var _n=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e;(0,C.Z)(this,i),t.format="application/x-protobuf;type=mapbox-vector",t.crs="EPSG:3857",t.isInverted=!0,t.url=t.url||".",e=n.call(this,t);var r,a=t.filter||function(){return!0};if(e.layers={},e.styles={},e.isVectorTileSource=!0,e.accessToken=t.accessToken,!t.style)throw new Error("New VectorTilesSource: style is required");if("string"==typeof t.style){var o=yn(t.style,e.accessToken);r=f.Z.json(o,e.networkOptions)}else r=Promise.resolve(t.style);return e.whenReady=r.then((function(r){e.jsonStyle=r;var n=t.sprite||r.sprite;if(n){var i=xn(n,"",".json",e.accessToken);return f.Z.json(i,e.networkOptions).then((function(t){e.sprites=t;var i=xn(n,"",".png",e.accessToken);return e.sprites.source=i,r}))}return r})).then((function(t){var r=Object.keys(t.sources)[0],n=t.sources[r];if(t.layers.forEach((function(t,r){if(t.sourceUid=e.uid,"background"===t.type)e.backgroundLayer=t;else if(a(t)){var n=Pt.ZP.setFromVectorTileLayer(t,e.sprites,r,e.symbolToCircle);e.styles[t.id]=n,e.layers[t["source-layer"]]||(e.layers[t["source-layer"]]=[]),e.layers[t["source-layer"]].push({id:t.id,order:r,filterExpression:(0,un.TE)(t.filter),zoom:{min:t.minzoom||0,max:t.maxzoom||24}})}})),"."==e.url){if(n.url){var i=bn(n.url,e.accessToken);return f.Z.json(i,e.networkOptions).then((function(t){t.tiles[0]&&(e.url=wn(t.tiles[0]))}))}n.tiles[0]&&(e.url=wn(n.tiles[0]))}})),e}return(0,T.Z)(i,[{key:"onLayerAdded",value:function(t){(0,_.Z)((0,S.Z)(i.prototype),"onLayerAdded",this).call(this,t),t.out.style&&t.out.isFeatureGeometryLayer&&t.out.accurate&&(console.warn("With VectorTilesSource and FeatureGeometryLayer, the accurate option is always false"),t.out.accurate=!1)}}]),i}(nn);const En=_n;const Mn=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e;(0,C.Z)(this,i),t.format=t.format||"json",(e=n.call(this,t)).isOrientedImageSource=!0;var r=[];return r.push(t.orientationsUrl?f.Z.json(t.orientationsUrl,e.networkOptions):Promise.resolve()),r.push(t.calibrationUrl?f.Z.json(t.calibrationUrl,e.networkOptions):Promise.resolve()),e.whenReady=Promise.all(r).then((function(t){return{orientation:t[0],calibration:t[1]}})),e}return(0,T.Z)(i,[{key:"urlFromExtent",value:function(t){return this.imageUrl(t.cameraId,t.panoId)}},{key:"requestToKey",value:function(t){return[t.cameraId,t.panoId]}},{key:"imageUrl",value:function(t,e){return this.url.replace("{cameraId}",t).replace("{panoId}",e)}}]),i}(Jr.ZP);function Sn(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Cn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Cn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Cn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt[e.name]));return new Fn(i,this.metadata)}selectAt(){for(var t=arguments.length,e=new Array(t),r=0;rthis.fields[t])).filter(Boolean);return new Fn(n,this.metadata)}assign(t){let e,r=this.metadata;if(t instanceof Fn){const n=t;e=n.fields,r=Nn(Nn(new Map,this.metadata),n.metadata)}else e=t;const n=Object.create(null);for(const t of this.fields)n[t.name]=t;for(const t of e)n[t.name]=t;const i=Object.values(n);return new Fn(i,r)}}function Nn(t,e){return new Map([...t||new Map,...e||new Map])}function zn(t){let e=1/0,r=1/0,n=1/0,i=-1/0,a=-1/0,o=-1/0;const s=t.POSITION?t.POSITION.value:[],l=s&&s.length;for(let t=0;ti?l:i,a=c>a?c:a,o=u>o?u:o}return[[e,r,n],[i,a,o]]}var Gn=r(21524);let Zn=null;const Vn={0:t=>({position:[t.getInt32(0,!0),t.getInt32(4,!0),t.getInt32(8,!0)],intensity:t.getUint16(12,!0),classification:t.getUint8(15)}),1:t=>({position:[t.getInt32(0,!0),t.getInt32(4,!0),t.getInt32(8,!0)],intensity:t.getUint16(12,!0),classification:t.getUint8(15)}),2:t=>({position:[t.getInt32(0,!0),t.getInt32(4,!0),t.getInt32(8,!0)],intensity:t.getUint16(12,!0),classification:t.getUint8(15),color:[t.getUint16(20,!0),t.getUint16(22,!0),t.getUint16(24,!0)]}),3:t=>({position:[t.getInt32(0,!0),t.getInt32(4,!0),t.getInt32(8,!0)],intensity:t.getUint16(12,!0),classification:t.getUint8(15),color:[t.getUint16(28,!0),t.getUint16(30,!0),t.getUint16(32,!0)]})};function Qn(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;n=void 0===n||0===n?1:n;const i=new e(t.slice(r,r+e.BYTES_PER_ELEMENT*n));if(1===n)return i[0];const a=[];for(let t=0;t=this.pointsCount)throw new Error("Point index out of range");const e=new DataView(this.arrayb,t*this.pointSize,this.pointSize);return this.decoder(e)}}class qn{constructor(t){if((0,On.Z)(this,"arraybuffer",void 0),(0,On.Z)(this,"formatId",0),(0,On.Z)(this,"loader",void 0),(0,On.Z)(this,"isCompressed",!0),(0,On.Z)(this,"isOpen",!1),(0,On.Z)(this,"version",0),(0,On.Z)(this,"versionAsString",""),this.arraybuffer=t,this.determineVersion()>13)throw new Error("Only file versions <= 1.3 are supported at this time");if(this.determineFormat(),void 0===Vn[this.formatId])throw new Error("The point format ID is not supported");this.loader=this.isCompressed?new Hn(this.arraybuffer):new Wn(this.arraybuffer)}determineFormat(){const t=Qn(this.arraybuffer,Uint8Array,104),e=(128&t)>>7,r=(64&t)>>6;if(1===e&&1===r)throw new Error("Old style compression not supported");this.formatId=63&t,this.isCompressed=1===e||1===r}determineVersion(){const t=new Int8Array(this.arraybuffer,24,2);return this.version=10*t[0]+t[1],this.versionAsString="".concat(t[0],".").concat(t[1]),this.version}open(){this.loader.open()&&(this.isOpen=!0)}getHeader(){return this.loader.getHeader()}readData(t,e,r){return this.loader.readData(t,e,r)}close(){this.loader.close()&&(this.isOpen=!1)}getUnpacker(){return Xn}}class Yn{constructor(t,e){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;(0,On.Z)(this,"name",void 0),(0,On.Z)(this,"type",void 0),(0,On.Z)(this,"nullable",void 0),(0,On.Z)(this,"metadata",void 0),this.name=t,this.type=e,this.nullable=r,this.metadata=n}get typeId(){return this.type&&this.type.typeId}clone(){return new Yn(this.name,this.type,this.nullable,this.metadata)}compareTo(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}toString(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}let Jn,Kn,$n,ti,ei,ri,ni,ii,ai=((oi={})[oi.NONE=0]="NONE",oi[oi.Null=1]="Null",oi[oi.Int=2]="Int",oi[oi.Float=3]="Float",oi[oi.Binary=4]="Binary",oi[oi.Utf8=5]="Utf8",oi[oi.Bool=6]="Bool",oi[oi.Decimal=7]="Decimal",oi[oi.Date=8]="Date",oi[oi.Time=9]="Time",oi[oi.Timestamp=10]="Timestamp",oi[oi.Interval=11]="Interval",oi[oi.List=12]="List",oi[oi.Struct=13]="Struct",oi[oi.Union=14]="Union",oi[oi.FixedSizeBinary=15]="FixedSizeBinary",oi[oi.FixedSizeList=16]="FixedSizeList",oi[oi.Map=17]="Map",oi[oi.Dictionary=-1]="Dictionary",oi[oi.Int8=-2]="Int8",oi[oi.Int16=-3]="Int16",oi[oi.Int32=-4]="Int32",oi[oi.Int64=-5]="Int64",oi[oi.Uint8=-6]="Uint8",oi[oi.Uint16=-7]="Uint16",oi[oi.Uint32=-8]="Uint32",oi[oi.Uint64=-9]="Uint64",oi[oi.Float16=-10]="Float16",oi[oi.Float32=-11]="Float32",oi[oi.Float64=-12]="Float64",oi[oi.DateDay=-13]="DateDay",oi[oi.DateMillisecond=-14]="DateMillisecond",oi[oi.TimestampSecond=-15]="TimestampSecond",oi[oi.TimestampMillisecond=-16]="TimestampMillisecond",oi[oi.TimestampMicrosecond=-17]="TimestampMicrosecond",oi[oi.TimestampNanosecond=-18]="TimestampNanosecond",oi[oi.TimeSecond=-19]="TimeSecond",oi[oi.TimeMillisecond=-20]="TimeMillisecond",oi[oi.TimeMicrosecond=-21]="TimeMicrosecond",oi[oi.TimeNanosecond=-22]="TimeNanosecond",oi[oi.DenseUnion=-23]="DenseUnion",oi[oi.SparseUnion=-24]="SparseUnion",oi[oi.IntervalDayTime=-25]="IntervalDayTime",oi[oi.IntervalYearMonth=-26]="IntervalYearMonth",oi);var oi;class si{static isNull(t){return t&&t.typeId===ai.Null}static isInt(t){return t&&t.typeId===ai.Int}static isFloat(t){return t&&t.typeId===ai.Float}static isBinary(t){return t&&t.typeId===ai.Binary}static isUtf8(t){return t&&t.typeId===ai.Utf8}static isBool(t){return t&&t.typeId===ai.Bool}static isDecimal(t){return t&&t.typeId===ai.Decimal}static isDate(t){return t&&t.typeId===ai.Date}static isTime(t){return t&&t.typeId===ai.Time}static isTimestamp(t){return t&&t.typeId===ai.Timestamp}static isInterval(t){return t&&t.typeId===ai.Interval}static isList(t){return t&&t.typeId===ai.List}static isStruct(t){return t&&t.typeId===ai.Struct}static isUnion(t){return t&&t.typeId===ai.Union}static isFixedSizeBinary(t){return t&&t.typeId===ai.FixedSizeBinary}static isFixedSizeList(t){return t&&t.typeId===ai.FixedSizeList}static isMap(t){return t&&t.typeId===ai.Map}static isDictionary(t){return t&&t.typeId===ai.Dictionary}get typeId(){return ai.NONE}compareTo(t){return this===t}}Symbol.toStringTag,Symbol.toStringTag,Jn=Symbol.toStringTag;class li extends si{constructor(t,e){super(),(0,On.Z)(this,"isSigned",void 0),(0,On.Z)(this,"bitWidth",void 0),this.isSigned=t,this.bitWidth=e}get typeId(){return ai.Int}get[Jn](){return"Int"}toString(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}class ci extends li{constructor(){super(!0,8)}}class ui extends li{constructor(){super(!0,16)}}class hi extends li{constructor(){super(!0,32)}}class fi extends li{constructor(){super(!1,8)}}class di extends li{constructor(){super(!1,16)}}class pi extends li{constructor(){super(!1,32)}}Kn=Symbol.toStringTag;class mi extends si{constructor(t){super(),(0,On.Z)(this,"precision",void 0),this.precision=t}get typeId(){return ai.Float}get[Kn](){return"Float"}toString(){return"Float".concat(this.precision)}}class Ai extends mi{constructor(){super(32)}}class gi extends mi{constructor(){super(64)}}Symbol.toStringTag,Symbol.toStringTag,$n=Symbol.toStringTag,ti=Symbol.toStringTag,ei=Symbol.toStringTag,ri=Symbol.toStringTag,ni=Symbol.toStringTag;class vi extends si{constructor(t,e){super(),(0,On.Z)(this,"listSize",void 0),(0,On.Z)(this,"children",void 0),this.listSize=t,this.children=[e]}get typeId(){return ai.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[ni](){return"FixedSizeList"}toString(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}function yi(t,e,r){const n=function(t){switch(t.constructor){case Int8Array:return new ci;case Uint8Array:return new fi;case Int16Array:return new ui;case Uint16Array:return new di;case Int32Array:return new hi;case Uint32Array:return new pi;case Float32Array:return new Ai;case Float64Array:return new gi;default:throw new Error("array type not supported")}}(e.value),i=r||function(t){const e=new Map;return"byteOffset"in t&&e.set("byteOffset",t.byteOffset.toString(10)),"byteStride"in t&&e.set("byteStride",t.byteStride.toString(10)),"normalized"in t&&e.set("normalized",t.normalized.toString()),e}(e);return new Yn(t,new vi(e.size,new Yn("value",n)),!1,i)}function bi(t,e){const r=function(t){const e=new Map;return e.set("las_pointsOffset",t.pointsOffset.toString(10)),e.set("las_pointsFormatId",t.pointsFormatId.toString(10)),e.set("las_pointsStructSize",t.pointsStructSize.toString(10)),e.set("las_pointsCount",t.pointsCount.toString(10)),e.set("las_scale",JSON.stringify(t.scale)),e.set("las_offset",JSON.stringify(t.offset)),void 0!==t.maxs&&e.set("las_maxs",JSON.stringify(t.maxs)),void 0!==t.mins&&e.set("las_mins",JSON.stringify(t.mins)),e.set("las_totalToRead",t.totalToRead.toString(10)),e.set("las_pointsFortotalReadmatId",t.totalRead.toString(10)),void 0!==t.versionAsString&&e.set("las_versionAsString",t.versionAsString),void 0!==t.isCompressed&&e.set("las_isCompressed",t.isCompressed.toString()),e}(t);return function(t,e){const r=function(t){const e=[];for(const r in t){const n=t[r];e.push(yi(r,n))}return e}(t);return new Fn(r,e)}(e,r)}function xi(t,e){return function(t){var e;let r,n,i,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=0;const c={loader:"las",loaderData:{},schema:new Fn([]),header:{vertexCount:0,boundingBox:[[0,0,0],[0,0,0]]},attributes:{},topology:"point-list",mode:0};return function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=new qn(t);try{n.open();const t=n.getHeader(),i=n.getUnpacker(),a=Math.ceil(t.pointsCount/Math.max(1,e));t.totalToRead=a;let o=0;for(;;){const s=n.readData(1e5,0,e);if(o+=s.count,t.totalRead=o,t.versionAsString=s.versionAsString,t.isCompressed=s.isCompressed,r(new i(s.buffer,s.count,t),t),!s.hasMoreData||o>=a)break}}catch(t){throw t}finally{n.close()}}(t,null===(e=s.las)||void 0===e?void 0:e.skip,(function(){var t,e;let u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},h=arguments.length>1?arguments[1]:void 0;if(!o){var f;o=h;const t=h.totalToRead,e=null!==(f=s.las)&&void 0!==f&&f.fp64?Float64Array:Float32Array;r=new e(3*t),n=h.pointsFormatId>=2?new Uint8Array(4*t):null,i=new Uint16Array(t),a=new Uint8Array(t),c.loaderData=h,c.attributes={POSITION:{value:r,size:3},intensity:{value:i,size:1},classification:{value:a,size:1}},n&&(c.attributes.COLOR_0={value:n,size:4})}const d=u.pointsCount,{scale:[p,m,A],offset:[g,v,y]}=h,b=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,r=!1;switch(arguments.length>2?arguments[2]:void 0){case 8:r=!1;break;case 16:r=!0;break;case"auto":if(t.getPoint(0).color)for(let n=0;n255||e[1]>255||e[2]>255)&&(r=!0)}break;default:console.warn("las: illegal value for options.las.colorDepth")}return r}(u,d,null===(t=s.las)||void 0===t?void 0:t.colorDepth);for(let t=0;txi(t,e),parseSync:(t,e)=>xi(t,e)},_i={parse:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.in=e.in||{},e.out=e.out||{},wi.parse(t,{las:{colorDepth:e.in.colorDepth||"auto",skip:e.out.skip||1}}).then((function(t){var e=new n.BufferGeometry;e.userData=t.loaderData,e.userData.vertexCount=t.header.vertexCount,e.userData.boundingBox=t.header.boundingBox;var r=new n.BufferAttribute(t.attributes.POSITION.value,3);e.setAttribute("position",r);var i=new n.BufferAttribute(t.attributes.intensity.value,1,!0);e.setAttribute("intensity",i);var a=new n.BufferAttribute(t.attributes.classification.value,1,!0);if(e.setAttribute("classification",a),t.attributes.COLOR_0){var o=new n.BufferAttribute(t.attributes.COLOR_0.value,4,!0);e.setAttribute("color",o)}return e.computeBoundingBox(),e}))}};var Ei=function(t){(0,E.Z)(a,t);var e,r,n=(e=a,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function a(t){var e;return(0,C.Z)(this,a),(e=n.call(this,t)).isEntwinePointTileSource=!0,e.colorDepth=t.colorDepth,e.url=e.url.replace("/ept.json",""),e.whenReady=f.Z.json("".concat(e.url,"/ept.json"),e.networkOptions).then((function(t){return e.parse="laszip"===t.dataType?_i.parse:kn.parse,e.extension="laszip"===t.dataType?"laz":"bin",t.srs&&t.srs.authority&&t.srs.horizontal&&(e.crs="".concat(t.srs.authority,":").concat(t.srs.horizontal),i.default.defs(e.crs)||i.default.defs(e.crs,t.srs.wkt),t.srs.vertical&&t.srs.vertical!==t.srs.horizontal&&console.warn("EntwinePointTileSource: Vertical coordinates system code is not yet supported.")),e.spacing=(Math.abs(t.boundsConforming[3]-t.boundsConforming[0])+Math.abs(t.boundsConforming[4]-t.boundsConforming[1]))/(2*t.span),e.boundsConforming=t.boundsConforming,e.span=t.span,(0,w.Z)(e)})),e.fetcher=f.Z.arrayBuffer,e}return(0,T.Z)(a)}(Jr.ZP);const Mi=Ei;var Si=r(70274),Ci=r(99127),Ti=r(79003),Ii=r.n(Ti);const Ri={parse:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r=(0,_t._F)(r),t.zip?e=Ii().parseZip(t.zip):t.shp&&t.shx&&t.dbf&&(e=Promise.all([Ii().parseShp(t.shp,t.prj),Ii().parseDbf(t.dbf)]).then(Ii().combine)),r.in=r.in||{},r.in.crs=t.prj?(0,i.default)(t.prj).oProj.datumName:r.in.crs,Promise.resolve(e).then((function(t){return Cr.Z.parse(t,r)}))}};var Bi=r(49472),ki=r(71077),Li=r(14278),Pi=r(82853),Di=r(97498),Ui=r(45571),Oi=r(25655),Fi=r(68932),Ni=r(83500),zi=r(24147);function Gi(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(this.inverseHierarchy[t]);try{for(c.s();!(l=c.n()).done;){var u=l.value;Object.assign(s,this.getInfoById(u))}}catch(t){c.e(t)}finally{c.f()}}return s}}]),t}();var Vi=r(77474),Qi="2.41.0"},82853:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>ee,qw:()=>$t,hu:()=>te,zL:()=>Yt,mp:()=>Jt});var n=r(71002),i=r(99477),a=r(47052),o=r(70885),s=r(88301),l=r(15671),c=r(43144),u=r(79340),h=r(82963),f=r(61120);function d(t,e){if(e===i.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(e===i.TriangleFanDrawMode||e===i.TriangleStripDrawMode){var r=t.getIndex();if(null===r){var n=[],a=t.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),t;for(var o=0;o=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=2.0 are supported."));else{var l=new at(i,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(var c=0;c=0&&void 0===o[f]&&console.warn('THREE.GLTFLoader: Unknown extension "'+f+'".')}}l.setExtensions(a),l.setPlugins(o),l.parse(r,n)}}},{key:"parseAsync",value:function(t,e){var r=this;return new Promise((function(n,i){r.parse(t,e,n,i)}))}}]),r}(i.Loader);function v(){var t={};return{get:function(e){return t[e]},add:function(e,r){t[e]=r},remove:function(e){delete t[e]},removeAll:function(){t={}}}}var y={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"},b=function(){function t(e){(0,l.Z)(this,t),this.parser=e,this.name=y.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}return(0,c.Z)(t,[{key:"_markDefs",value:function(){for(var t=this.parser,e=this.parser.json.nodes||[],r=0,n=e.length;r=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,i.source,a)}}]),t}(),k=function(){function t(e){(0,l.Z)(this,t),this.parser=e,this.name=y.EXT_TEXTURE_WEBP,this.isSupported=null}return(0,c.Z)(t,[{key:"loadTexture",value:function(t){var e=this.name,r=this.parser,n=r.json,i=n.textures[t];if(!i.extensions||!i.extensions[e])return null;var a=i.extensions[e],o=n.images[a.source],s=r.textureLoader;if(o.uri){var l=r.options.manager.getHandler(o.uri);null!==l&&(s=l)}return this.detectSupport().then((function(i){if(i)return r.loadTextureImage(t,a.source,s);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(t)}))}},{key:"detectSupport",value:function(){return this.isSupported||(this.isSupported=new Promise((function(t){var e=new Image;e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.onload=e.onerror=function(){t(1===e.height)}}))),this.isSupported}}]),t}(),L=function(){function t(e){(0,l.Z)(this,t),this.parser=e,this.name=y.EXT_TEXTURE_AVIF,this.isSupported=null}return(0,c.Z)(t,[{key:"loadTexture",value:function(t){var e=this.name,r=this.parser,n=r.json,i=n.textures[t];if(!i.extensions||!i.extensions[e])return null;var a=i.extensions[e],o=n.images[a.source],s=r.textureLoader;if(o.uri){var l=r.options.manager.getHandler(o.uri);null!==l&&(s=l)}return this.detectSupport().then((function(i){if(i)return r.loadTextureImage(t,a.source,s);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(t)}))}},{key:"detectSupport",value:function(){return this.isSupported||(this.isSupported=new Promise((function(t){var e=new Image;e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",e.onload=e.onerror=function(){t(1===e.height)}}))),this.isSupported}}]),t}(),P=function(){function t(e){(0,l.Z)(this,t),this.name=y.EXT_MESHOPT_COMPRESSION,this.parser=e}return(0,c.Z)(t,[{key:"loadBufferView",value:function(t){var e=this.parser.json,r=e.bufferViews[t];if(r.extensions&&r.extensions[this.name]){var n=r.extensions[this.name],i=this.parser.getDependency("buffer",n.buffer),a=this.parser.options.meshoptDecoder;if(!a||!a.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return i.then((function(t){var e=n.byteOffset||0,r=n.byteLength||0,i=n.count,o=n.byteStride,s=new Uint8Array(t,e,r);return a.decodeGltfBufferAsync?a.decodeGltfBufferAsync(i,o,s,n.mode,n.filter).then((function(t){return t.buffer})):a.ready.then((function(){var t=new ArrayBuffer(i*o);return a.decodeGltfBuffer(new Uint8Array(t),i,o,s,n.mode,n.filter),t}))}))}return null}}]),t}(),D=function(){function t(e){(0,l.Z)(this,t),this.name=y.EXT_MESH_GPU_INSTANCING,this.parser=e}return(0,c.Z)(t,[{key:"createNodeMesh",value:function(t){var e=this,r=this.parser.json,n=r.nodes[t];if(!n.extensions||!n.extensions[this.name]||void 0===n.mesh)return null;var a,o=p(r.meshes[n.mesh].primitives);try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.mode!==Q.TRIANGLES&&s.mode!==Q.TRIANGLE_STRIP&&s.mode!==Q.TRIANGLE_FAN&&void 0!==s.mode)return null}}catch(t){o.e(t)}finally{o.f()}var l=n.extensions[this.name].attributes,c=[],u={},h=function(t){c.push(e.parser.getDependency("accessor",l[t]).then((function(e){return u[t]=e,u[t]})))};for(var f in l)h(f);return c.length<1?null:(c.push(this.parser.createNodeMesh(t)),Promise.all(c).then((function(t){var r,n=t.pop(),a=n.isGroup?n.children:[n],o=t[0].count,s=[],l=p(a);try{for(l.s();!(r=l.n()).done;){for(var c=r.value,h=new i.Matrix4,f=new i.Vector3,d=new i.Quaternion,m=new i.Vector3(1,1,1),A=new i.InstancedMesh(c.geometry,c.material,o),g=0;g0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,l.Z)(this,t),this.json=e,this.extensions={},this.plugins={},this.options=r,this.cache=new v,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};var n=!1,a=!1,o=-1;"undefined"!=typeof navigator&&(n=!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent),o=(a=navigator.userAgent.indexOf("Firefox")>-1)?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||n||a&&o<98?this.textureLoader=new i.TextureLoader(this.options.manager):this.textureLoader=new i.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new i.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}return(0,c.Z)(t,[{key:"setExtensions",value:function(t){this.extensions=t}},{key:"setPlugins",value:function(t){this.plugins=t}},{key:"parse",value:function(t,e){var r=this,n=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll((function(t){return t._markDefs&&t._markDefs()})),Promise.all(this._invokeAll((function(t){return t.beforeRoot&&t.beforeRoot()}))).then((function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])})).then((function(e){var a={scene:e[0][n.scene||0],scenes:e[0],animations:e[1],cameras:e[2],asset:n.asset,parser:r,userData:{}};K(i,a,n),$(a,n),Promise.all(r._invokeAll((function(t){return t.afterRoot&&t.afterRoot(a)}))).then((function(){t(a)}))})).catch(e)}},{key:"_markDefs",value:function(){for(var t=this.json.nodes||[],e=this.json.skins||[],r=this.json.meshes||[],n=0,i=e.length;n=2&&o.setY(S,_[E*l+1]),l>=3&&o.setZ(S,_[E*l+2]),l>=4&&o.setW(S,_[E*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o}))}},{key:"loadTexture",value:function(t){var e=this.json,r=this.options,n=e.textures[t].source,i=e.images[n],a=this.textureLoader;if(i.uri){var o=r.manager.getHandler(i.uri);null!==o&&(a=o)}return this.loadTextureImage(t,n,a)}},{key:"loadTextureImage",value:function(t,e,r){var n=this,a=this.json,o=a.textures[t],s=a.images[e],l=(s.uri||s.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];var c=this.loadImageSource(e,r).then((function(e){e.flipY=!1,e.name=o.name||s.name||"",""===e.name&&"string"==typeof s.uri&&!1===s.uri.startsWith("data:image/")&&(e.name=s.uri);var r=(a.samplers||{})[o.sampler]||{};return e.magFilter=W[r.magFilter]||i.LinearFilter,e.minFilter=W[r.minFilter]||i.LinearMipmapLinearFilter,e.wrapS=H[r.wrapS]||i.RepeatWrapping,e.wrapT=H[r.wrapT]||i.RepeatWrapping,n.associations.set(e,{textures:t}),e})).catch((function(){return null}));return this.textureCache[l]=c,c}},{key:"loadImageSource",value:function(t,e){var r=this.json,n=this.options;if(void 0!==this.sourceCache[t])return this.sourceCache[t].then((function(t){return t.clone()}));var a=r.images[t],o=self.URL||self.webkitURL,s=a.uri||"",l=!1;if(void 0!==a.bufferView)s=this.getDependency("bufferView",a.bufferView).then((function(t){l=!0;var e=new Blob([t],{type:a.mimeType});return s=o.createObjectURL(e)}));else if(void 0===a.uri)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");var c=Promise.resolve(s).then((function(t){return new Promise((function(r,a){var o=r;!0===e.isImageBitmapLoader&&(o=function(t){var e=new i.Texture(t);e.needsUpdate=!0,r(e)}),e.load(i.LoaderUtils.resolveURL(t,n.path),o,void 0,a)}))})).then((function(t){var e;return!0===l&&o.revokeObjectURL(s),t.userData.mimeType=a.mimeType||((e=a.uri).search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/)?"image/jpeg":e.search(/\.webp($|\?)/i)>0||0===e.search(/^data\:image\/webp/)?"image/webp":"image/png"),t})).catch((function(t){throw console.error("THREE.GLTFLoader: Couldn't load texture",s),t}));return this.sourceCache[t]=c,c}},{key:"assignTexture",value:function(t,e,r,n){var i=this;return this.getDependency("texture",r.index).then((function(a){if(!a)return null;if(void 0!==r.texCoord&&r.texCoord>0&&((a=a.clone()).channel=r.texCoord),i.extensions[y.KHR_TEXTURE_TRANSFORM]){var o=void 0!==r.extensions?r.extensions[y.KHR_TEXTURE_TRANSFORM]:void 0;if(o){var s=i.associations.get(a);a=i.extensions[y.KHR_TEXTURE_TRANSFORM].extendTexture(a,o),i.associations.set(a,s)}}return void 0!==n&&(a.colorSpace=n),t[e]=a,a}))}},{key:"assignFinalMaterial",value:function(t){var e=t.geometry,r=t.material,n=void 0===e.attributes.tangent,a=void 0!==e.attributes.color,o=void 0===e.attributes.normal;if(t.isPoints){var s="PointsMaterial:"+r.uuid,l=this.cache.get(s);l||(l=new i.PointsMaterial,i.Material.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,l.sizeAttenuation=!1,this.cache.add(s,l)),r=l}else if(t.isLine){var c="LineBasicMaterial:"+r.uuid,u=this.cache.get(c);u||(u=new i.LineBasicMaterial,i.Material.prototype.copy.call(u,r),u.color.copy(r.color),u.map=r.map,this.cache.add(c,u)),r=u}if(n||a||o){var h="ClonedMaterial:"+r.uuid+":";n&&(h+="derivative-tangents:"),a&&(h+="vertex-colors:"),o&&(h+="flat-shading:");var f=this.cache.get(h);f||(f=r.clone(),a&&(f.vertexColors=!0),o&&(f.flatShading=!0),n&&(f.normalScale&&(f.normalScale.y*=-1),f.clearcoatNormalScale&&(f.clearcoatNormalScale.y*=-1)),this.cache.add(h,f),this.associations.set(f,this.associations.get(r))),r=f}t.material=r}},{key:"getMaterialType",value:function(){return i.MeshStandardMaterial}},{key:"loadMaterial",value:function(t){var e,r=this,n=this.json,a=this.extensions,o=n.materials[t],s={},l=[];if((o.extensions||{})[y.KHR_MATERIALS_UNLIT]){var c=a[y.KHR_MATERIALS_UNLIT];e=c.getMaterialType(),l.push(c.extendParams(s,o,r))}else{var u=o.pbrMetallicRoughness||{};if(s.color=new i.Color(1,1,1),s.opacity=1,Array.isArray(u.baseColorFactor)){var h=u.baseColorFactor;s.color.fromArray(h),s.opacity=h[3]}void 0!==u.baseColorTexture&&l.push(r.assignTexture(s,"map",u.baseColorTexture,i.SRGBColorSpace)),s.metalness=void 0!==u.metallicFactor?u.metallicFactor:1,s.roughness=void 0!==u.roughnessFactor?u.roughnessFactor:1,void 0!==u.metallicRoughnessTexture&&(l.push(r.assignTexture(s,"metalnessMap",u.metallicRoughnessTexture)),l.push(r.assignTexture(s,"roughnessMap",u.metallicRoughnessTexture))),e=this._invokeOne((function(e){return e.getMaterialType&&e.getMaterialType(t)})),l.push(Promise.all(this._invokeAll((function(e){return e.extendMaterialParams&&e.extendMaterialParams(t,s)}))))}!0===o.doubleSided&&(s.side=i.DoubleSide);var f=o.alphaMode||"OPAQUE";if("BLEND"===f?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,"MASK"===f&&(s.alphaTest=void 0!==o.alphaCutoff?o.alphaCutoff:.5)),void 0!==o.normalTexture&&e!==i.MeshBasicMaterial&&(l.push(r.assignTexture(s,"normalMap",o.normalTexture)),s.normalScale=new i.Vector2(1,1),void 0!==o.normalTexture.scale)){var d=o.normalTexture.scale;s.normalScale.set(d,d)}return void 0!==o.occlusionTexture&&e!==i.MeshBasicMaterial&&(l.push(r.assignTexture(s,"aoMap",o.occlusionTexture)),void 0!==o.occlusionTexture.strength&&(s.aoMapIntensity=o.occlusionTexture.strength)),void 0!==o.emissiveFactor&&e!==i.MeshBasicMaterial&&(s.emissive=(new i.Color).fromArray(o.emissiveFactor)),void 0!==o.emissiveTexture&&e!==i.MeshBasicMaterial&&l.push(r.assignTexture(s,"emissiveMap",o.emissiveTexture,i.SRGBColorSpace)),Promise.all(l).then((function(){var n=new e(s);return o.name&&(n.name=o.name),$(n,o),r.associations.set(n,{materials:t}),o.extensions&&K(a,n,o),n}))}},{key:"createUniqueName",value:function(t){var e=i.PropertyBinding.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}},{key:"loadGeometries",value:function(t){var e=this,r=this.extensions,n=this.primitiveCache;function a(t){return r[y.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(t,e).then((function(r){return ot(r,t,e)}))}for(var o=[],s=0,l=t.length;s0&&tt(m,o),m.name=r.createUniqueName(o.name||"mesh_"+t),$(m,o),p.extensions&&K(a,m,p),r.assignFinalMaterial(m),c.push(m)}for(var g=0,v=c.length;g1?new i.Group:1===e.length?e[0]:new i.Object3D)!==e[0])for(var l=0,c=e.length;l4&&void 0!==arguments[4]?arguments[4]:i.LinearSRGBColorSpace,o={attributeIDs:r||this.defaultAttributeIDs,attributeTypes:n||this.defaultAttributeTypes,useUniqueIDs:!!r,vertexColorSpace:a};return this.decodeGeometry(t,o).then(e)}},{key:"decodeGeometry",value:function(t,e){var r,n=this,i=JSON.stringify(e);if(st.has(t)){var a=st.get(t);if(a.key===i)return a.promise;if(0===t.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}var o=this.workerNextTaskID++,s=t.byteLength,l=this._getWorker(o,s).then((function(n){return r=n,new Promise((function(n,i){r._callbacks[o]={resolve:n,reject:i},r.postMessage({type:"decode",id:o,taskConfig:e,buffer:t},[t])}))})).then((function(t){return n._createGeometry(t.geometry)}));return l.catch((function(){return!0})).then((function(){r&&o&&n._releaseTask(r,o)})),st.set(t,{key:i,promise:l}),l}},{key:"_createGeometry",value:function(t){var e=new i.BufferGeometry;t.index&&e.setIndex(new i.BufferAttribute(t.index.array,1));for(var r=0;re._taskLoad?-1:1}));var i=r.workerPool[r.workerPool.length-1];return i._taskCosts[t]=e,i._taskLoad+=e,i}))}},{key:"_releaseTask",value:function(t,e){t._taskLoad-=t._taskCosts[e],delete t._callbacks[e],delete t._taskCosts[e]}},{key:"debug",value:function(){console.log("Task load: ",this.workerPool.map((function(t){return t._taskLoad})))}},{key:"dispose",value:function(){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:4;(0,l.Z)(this,t),this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}return(0,c.Z)(t,[{key:"_initWorker",value:function(t){if(!this.workers[t]){var e=this.workerCreator();e.addEventListener("message",this._onMessage.bind(this,t)),this.workers[t]=e}}},{key:"_getIdleWorker",value:function(){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:0,r=this._offset,n=0;this._dataView.getUint8(this._offset)!==e&&n1&&void 0!==arguments[1]?arguments[1]:0;if(!ht)throw new Error("ZSTDDecoder: Await .init() before decoding.");var r=t.byteLength,n=ht.exports.malloc(r);ft.set(t,n),e=e||Number(ht.exports.ZSTD_findDecompressedSize(n,r));var i=ht.exports.malloc(e),a=ht.exports.ZSTD_decompress(i,e,n,r),o=ft.slice(i,i+a);return ht.exports.free(n),ht.exports.free(i),o}}]),t}(),Rt="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgAEEIIAEQFGs2AgQgAg8LIABBADYCBEF/DwsgACABNgIIIAAgAS0AACIDNgIAIAJBfmoiBEEBTQRAIARBAWtFBEAgACABLQACQRB0IANyIgM2AgALIAAgAS0AAUEIdCADajYCAAsgASACakF/ai0AACIBRQRAIABBADYCBEFsDwsgAEEoIAEQFCACQQN0ams2AgQgAgsWACAAIAEpAAA3AAAgACABKQAINwAICy8BAX8gAUECdEGgHWooAgAgACgCAEEgIAEgACgCBGprQR9xdnEhAiAAIAEQASACCyEAIAFCz9bTvtLHq9lCfiAAfEIfiUKHla+vmLbem55/fgsdAQF/IAAoAgggACgCDEYEfyAAKAIEQSBGBUEACwuCBAEDfyACQYDAAE8EQCAAIAEgAhBnIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAkEBSARAIAAhAgwBCyAAQQNxRQRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADTw0BIAJBA3ENAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQNqIQcMAQsLIAcgCGoiByAPSw0EIAVBAmohBQNAIAIgB0kEQCANIAJBAXRqQQA7AQAgAkEBaiECDAELCyAGIA5LQQAgBiAFQQN1aiIHIAxLG0UEQCAHKAAAIAVBB3EiBXYhBAwCCyAEQQJ2IQQLIAYhBwsCfyALQX9qIAQgAEF/anEiBiAAQQF0QX9qIgggCWsiEUkNABogBCAIcSIEQQAgESAEIABIG2shBiALCyEIIA0gAkEBdGogBkF/aiIEOwEAIAlBASAGayAEIAZBAUgbayEJA0AgCSAASARAIABBAXUhACALQX9qIQsMAQsLAn8gByAOS0EAIAcgBSAIaiIFQQN1aiIGIAxLG0UEQCAFQQdxDAELIAUgDCIGIAdrQQN0awshBSACQQFqIQIgBEUhCCAGKAAAIAVBH3F2IQQMAQsLQWwgCUEBRyAFQSBKcg0BGiABIAJBf2o2AgAgBiAFQQdqQQN1aiADawwBC0FQCyEAIApBEGokACAACwkAQQFBBSAAGwsMACAAIAEoAAA2AAALqgMBCn8jAEHwAGsiCiQAIAJBAWohDiAAQQhqIQtBgIAEIAVBf2p0QRB1IQxBACECQQEhBkEBIAV0IglBf2oiDyEIA0AgAiAORkUEQAJAIAEgAkEBdCINai8BACIHQf//A0YEQCALIAhBA3RqIAI2AgQgCEF/aiEIQQEhBwwBCyAGQQAgDCAHQRB0QRB1ShshBgsgCiANaiAHOwEAIAJBAWohAgwBCwsgACAFNgIEIAAgBjYCACAJQQN2IAlBAXZqQQNqIQxBACEAQQAhBkEAIQIDQCAGIA5GBEADQAJAIAAgCUYNACAKIAsgAEEDdGoiASgCBCIGQQF0aiICIAIvAQAiAkEBajsBACABIAUgAhAUayIIOgADIAEgAiAIQf8BcXQgCWs7AQAgASAEIAZBAnQiAmooAgA6AAIgASACIANqKAIANgIEIABBAWohAAwBCwsFIAEgBkEBdGouAQAhDUEAIQcDQCAHIA1ORQRAIAsgAkEDdGogBjYCBANAIAIgDGogD3EiAiAISw0ACyAHQQFqIQcMAQsLIAZBAWohBgwBCwsgCkHwAGokAAsjAEIAIAEQCSAAhUKHla+vmLbem55/fkLj3MqV/M7y9YV/fAsQACAAQn43AwggACABNgIACyQBAX8gAARAIAEoAgQiAgRAIAEoAgggACACEQEADwsgABAmCwsfACAAIAEgAi8BABAINgIAIAEQBBogACACQQRqNgIEC0oBAX9BoCAoAgAiASAAaiIAQX9MBEBBiCBBMDYCAEF/DwsCQCAAPwBBEHRNDQAgABBmDQBBiCBBMDYCAEF/DwtBoCAgADYCACABC9cBAQh/Qbp/IQoCQCACKAIEIgggAigCACIJaiIOIAEgAGtLDQBBbCEKIAkgBCADKAIAIgtrSw0AIAAgCWoiBCACKAIIIgxrIQ0gACABQWBqIg8gCyAJQQAQKSADIAkgC2o2AgACQAJAIAwgBCAFa00EQCANIQUMAQsgDCAEIAZrSw0CIAcgDSAFayIAaiIBIAhqIAdNBEAgBCABIAgQDxoMAgsgBCABQQAgAGsQDyEBIAIgACAIaiIINgIEIAEgAGshBAsgBCAPIAUgCEEBECkLIA4hCgsgCgubAgEBfyMAQYABayINJAAgDSADNgJ8AkAgAkEDSwRAQX8hCQwBCwJAAkACQAJAIAJBAWsOAwADAgELIAZFBEBBuH8hCQwEC0FsIQkgBS0AACICIANLDQMgACAHIAJBAnQiAmooAgAgAiAIaigCABA7IAEgADYCAEEBIQkMAwsgASAJNgIAQQAhCQwCCyAKRQRAQWwhCQwCC0EAIQkgC0UgDEEZSHINAUEIIAR0QQhqIQBBACECA0AgAiAATw0CIAJBQGshAgwAAAsAC0FsIQkgDSANQfwAaiANQfgAaiAFIAYQFSICEAMNACANKAJ4IgMgBEsNACAAIA0gDSgCfCAHIAggAxAYIAEgADYCACACIQkLIA1BgAFqJAAgCQsLACAAIAEgAhALGgsQACAALwAAIAAtAAJBEHRyCy8AAn9BuH8gAUEISQ0AGkFyIAAoAAQiAEF3Sw0AGkG4fyAAQQhqIgAgACABSxsLCwkAIAAgATsAAAsDAAELigYBBX8gACAAKAIAIgVBfnE2AgBBACAAIAVBAXZqQYQgKAIAIgQgAEYbIQECQAJAIAAoAgQiAkUNACACKAIAIgNBAXENACACQQhqIgUgA0EBdkF4aiIDQQggA0EISxtnQR9zQQJ0QYAfaiIDKAIARgRAIAMgAigCDDYCAAsgAigCCCIDBEAgAyACKAIMNgIECyACKAIMIgMEQCADIAIoAgg2AgALIAIgAigCACAAKAIAQX5xajYCAEGEICEAAkACQCABRQ0AIAEgAjYCBCABKAIAIgNBAXENASADQQF2QXhqIgNBCCADQQhLG2dBH3NBAnRBgB9qIgMoAgAgAUEIakYEQCADIAEoAgw2AgALIAEoAggiAwRAIAMgASgCDDYCBAsgASgCDCIDBEAgAyABKAIINgIAQYQgKAIAIQQLIAIgAigCACABKAIAQX5xajYCACABIARGDQAgASABKAIAQQF2akEEaiEACyAAIAI2AgALIAIoAgBBAXZBeGoiAEEIIABBCEsbZ0Efc0ECdEGAH2oiASgCACEAIAEgBTYCACACIAA2AgwgAkEANgIIIABFDQEgACAFNgIADwsCQCABRQ0AIAEoAgAiAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAigCACABQQhqRgRAIAIgASgCDDYCAAsgASgCCCICBEAgAiABKAIMNgIECyABKAIMIgIEQCACIAEoAgg2AgBBhCAoAgAhBAsgACAAKAIAIAEoAgBBfnFqIgI2AgACQCABIARHBEAgASABKAIAQQF2aiAANgIEIAAoAgAhAgwBC0GEICAANgIACyACQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgIoAgAhASACIABBCGoiAjYCACAAIAE2AgwgAEEANgIIIAFFDQEgASACNgIADwsgBUEBdkF4aiIBQQggAUEISxtnQR9zQQJ0QYAfaiICKAIAIQEgAiAAQQhqIgI2AgAgACABNgIMIABBADYCCCABRQ0AIAEgAjYCAAsLDgAgAARAIABBeGoQJQsLgAIBA38CQCAAQQ9qQXhxQYQgKAIAKAIAQQF2ayICEB1Bf0YNAAJAQYQgKAIAIgAoAgAiAUEBcQ0AIAFBAXZBeGoiAUEIIAFBCEsbZ0Efc0ECdEGAH2oiASgCACAAQQhqRgRAIAEgACgCDDYCAAsgACgCCCIBBEAgASAAKAIMNgIECyAAKAIMIgFFDQAgASAAKAIINgIAC0EBIQEgACAAKAIAIAJBAXRqIgI2AgAgAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAygCACECIAMgAEEIaiIDNgIAIAAgAjYCDCAAQQA2AgggAkUNACACIAM2AgALIAELtwIBA38CQAJAIABBASAAGyICEDgiAA0AAkACQEGEICgCACIARQ0AIAAoAgAiA0EBcQ0AIAAgA0EBcjYCACADQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgAgAEEIakYEQCABIAAoAgw2AgALIAAoAggiAQRAIAEgACgCDDYCBAsgACgCDCIBBEAgASAAKAIINgIACyACECchAkEAIQFBhCAoAgAhACACDQEgACAAKAIAQX5xNgIAQQAPCyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqMQAADAMLIAEgBGovAACtQoACfAwCCyABIARqKAAArQwBCyABIARqKQAACyEHIAAgBTYCICAAIAI2AhwgACAHNwMAQQAhAyAAQQA2AhQgACAHIAggBhsiBzcDCCAAIAdCgIAIIAdCgIAIVBs+AhALIAMLWwEBf0G4fyEDIAIQFiICIAFNBH8gACACakF/ai0AACIAQQNxQQJ0QaAeaigCACACaiAAQQZ2IgFBAnRBsB5qKAIAaiAAQSBxIgBFaiABRSAAQQV2cWoFQbh/CwsdACAAKAKQ4gEQWiAAQQA2AqDiASAAQgA3A5DiAQu1AwEFfyMAQZACayIKJABBuH8hBgJAIAVFDQAgBCwAACIIQf8BcSEHAkAgCEF/TARAIAdBgn9qQQF2IgggBU8NAkFsIQYgB0GBf2oiBUGAAk8NAiAEQQFqIQdBACEGA0AgBiAFTwRAIAUhBiAIIQcMAwUgACAGaiAHIAZBAXZqIgQtAABBBHY6AAAgACAGQQFyaiAELQAAQQ9xOgAAIAZBAmohBgwBCwAACwALIAcgBU8NASAAIARBAWogByAKEFMiBhADDQELIAYhBEEAIQYgAUEAQTQQECEJQQAhBQNAIAQgBkcEQCAAIAZqIggtAAAiAUELSwRAQWwhBgwDBSAJIAFBAnRqIgEgASgCAEEBajYCACAGQQFqIQZBASAILQAAdEEBdSAFaiEFDAILAAsLQWwhBiAFRQ0AIAUQFEEBaiIBQQxLDQAgAyABNgIAQQFBASABdCAFayIDEBQiAXQgA0cNACAAIARqIAFBAWoiADoAACAJIABBAnRqIgAgACgCAEEBajYCACAJKAIEIgBBAkkgAEEBcXINACACIARBAWo2AgAgB0EBaiEGCyAKQZACaiQAIAYLxhEBDH8jAEHwAGsiBSQAQWwhCwJAIANBCkkNACACLwAAIQogAi8AAiEJIAIvAAQhByAFQQhqIAQQDgJAIAMgByAJIApqakEGaiIMSQ0AIAUtAAohCCAFQdgAaiACQQZqIgIgChAGIgsQAw0BIAVBQGsgAiAKaiICIAkQBiILEAMNASAFQShqIAIgCWoiAiAHEAYiCxADDQEgBUEQaiACIAdqIAMgDGsQBiILEAMNASAAIAFqIg9BfWohECAEQQRqIQZBASELIAAgAUEDakECdiIDaiIMIANqIgIgA2oiDiEDIAIhBCAMIQcDQCALIAMgEElxBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgCS0AAyELIAcgBiAFQUBrIAgQAkECdGoiCS8BADsAACAFQUBrIAktAAIQASAJLQADIQogBCAGIAVBKGogCBACQQJ0aiIJLwEAOwAAIAVBKGogCS0AAhABIAktAAMhCSADIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgDS0AAyENIAAgC2oiCyAGIAVB2ABqIAgQAkECdGoiAC8BADsAACAFQdgAaiAALQACEAEgAC0AAyEAIAcgCmoiCiAGIAVBQGsgCBACQQJ0aiIHLwEAOwAAIAVBQGsgBy0AAhABIActAAMhByAEIAlqIgkgBiAFQShqIAgQAkECdGoiBC8BADsAACAFQShqIAQtAAIQASAELQADIQQgAyANaiIDIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgACALaiEAIAcgCmohByAEIAlqIQQgAyANLQADaiEDIAVB2ABqEA0gBUFAaxANciAFQShqEA1yIAVBEGoQDXJFIQsMAQsLIAQgDksgByACS3INAEFsIQsgACAMSw0BIAxBfWohCQNAQQAgACAJSSAFQdgAahAEGwRAIAAgBiAFQdgAaiAIEAJBAnRqIgovAQA7AAAgBUHYAGogCi0AAhABIAAgCi0AA2oiACAGIAVB2ABqIAgQAkECdGoiCi8BADsAACAFQdgAaiAKLQACEAEgACAKLQADaiEADAEFIAxBfmohCgNAIAVB2ABqEAQgACAKS3JFBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgACAJLQADaiEADAELCwNAIAAgCk0EQCAAIAYgBUHYAGogCBACQQJ0aiIJLwEAOwAAIAVB2ABqIAktAAIQASAAIAktAANqIQAMAQsLAkAgACAMTw0AIAAgBiAFQdgAaiAIEAIiAEECdGoiDC0AADoAACAMLQADQQFGBEAgBUHYAGogDC0AAhABDAELIAUoAlxBH0sNACAFQdgAaiAGIABBAnRqLQACEAEgBSgCXEEhSQ0AIAVBIDYCXAsgAkF9aiEMA0BBACAHIAxJIAVBQGsQBBsEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiIAIAYgBUFAayAIEAJBAnRqIgcvAQA7AAAgBUFAayAHLQACEAEgACAHLQADaiEHDAEFIAJBfmohDANAIAVBQGsQBCAHIAxLckUEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwNAIAcgDE0EQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwJAIAcgAk8NACAHIAYgBUFAayAIEAIiAEECdGoiAi0AADoAACACLQADQQFGBEAgBUFAayACLQACEAEMAQsgBSgCREEfSw0AIAVBQGsgBiAAQQJ0ai0AAhABIAUoAkRBIUkNACAFQSA2AkQLIA5BfWohAgNAQQAgBCACSSAFQShqEAQbBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2oiACAGIAVBKGogCBACQQJ0aiIELwEAOwAAIAVBKGogBC0AAhABIAAgBC0AA2ohBAwBBSAOQX5qIQIDQCAFQShqEAQgBCACS3JFBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsDQCAEIAJNBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsCQCAEIA5PDQAgBCAGIAVBKGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBKGogAi0AAhABDAELIAUoAixBH0sNACAFQShqIAYgAEECdGotAAIQASAFKAIsQSFJDQAgBUEgNgIsCwNAQQAgAyAQSSAFQRBqEAQbBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2oiACAGIAVBEGogCBACQQJ0aiICLwEAOwAAIAVBEGogAi0AAhABIAAgAi0AA2ohAwwBBSAPQX5qIQIDQCAFQRBqEAQgAyACS3JFBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsDQCADIAJNBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsCQCADIA9PDQAgAyAGIAVBEGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBEGogAi0AAhABDAELIAUoAhRBH0sNACAFQRBqIAYgAEECdGotAAIQASAFKAIUQSFJDQAgBUEgNgIUCyABQWwgBUHYAGoQCiAFQUBrEApxIAVBKGoQCnEgBUEQahAKcRshCwwJCwAACwALAAALAAsAAAsACwAACwALQWwhCwsgBUHwAGokACALC7UEAQ5/IwBBEGsiBiQAIAZBBGogABAOQVQhBQJAIARB3AtJDQAgBi0ABCEHIANB8ARqQQBB7AAQECEIIAdBDEsNACADQdwJaiIJIAggBkEIaiAGQQxqIAEgAhAxIhAQA0UEQCAGKAIMIgQgB0sNASADQdwFaiEPIANBpAVqIREgAEEEaiESIANBqAVqIQEgBCEFA0AgBSICQX9qIQUgCCACQQJ0aigCAEUNAAsgAkEBaiEOQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgASALaiAKNgIAIAVBAWohBSAKIAxqIQoMAQsLIAEgCjYCAEEAIQUgBigCCCELA0AgBSALRkUEQCABIAUgCWotAAAiDEECdGoiDSANKAIAIg1BAWo2AgAgDyANQQF0aiINIAw6AAEgDSAFOgAAIAVBAWohBQwBCwtBACEBIANBADYCqAUgBEF/cyAHaiEJQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgAyALaiABNgIAIAwgBSAJanQgAWohASAFQQFqIQUMAQsLIAcgBEEBaiIBIAJrIgRrQQFqIQgDQEEBIQUgBCAIT0UEQANAIAUgDk9FBEAgBUECdCIJIAMgBEE0bGpqIAMgCWooAgAgBHY2AgAgBUEBaiEFDAELCyAEQQFqIQQMAQsLIBIgByAPIAogESADIAIgARBkIAZBAToABSAGIAc6AAYgACAGKAIENgIACyAQIQULIAZBEGokACAFC8ENAQt/IwBB8ABrIgUkAEFsIQkCQCADQQpJDQAgAi8AACEKIAIvAAIhDCACLwAEIQYgBUEIaiAEEA4CQCADIAYgCiAMampBBmoiDUkNACAFLQAKIQcgBUHYAGogAkEGaiICIAoQBiIJEAMNASAFQUBrIAIgCmoiAiAMEAYiCRADDQEgBUEoaiACIAxqIgIgBhAGIgkQAw0BIAVBEGogAiAGaiADIA1rEAYiCRADDQEgACABaiIOQX1qIQ8gBEEEaiEGQQEhCSAAIAFBA2pBAnYiAmoiCiACaiIMIAJqIg0hAyAMIQQgCiECA0AgCSADIA9JcQRAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAACAGIAVBQGsgBxACQQF0aiIILQAAIQsgBUFAayAILQABEAEgAiALOgAAIAYgBUEoaiAHEAJBAXRqIggtAAAhCyAFQShqIAgtAAEQASAEIAs6AAAgBiAFQRBqIAcQAkEBdGoiCC0AACELIAVBEGogCC0AARABIAMgCzoAACAGIAVB2ABqIAcQAkEBdGoiCC0AACELIAVB2ABqIAgtAAEQASAAIAs6AAEgBiAFQUBrIAcQAkEBdGoiCC0AACELIAVBQGsgCC0AARABIAIgCzoAASAGIAVBKGogBxACQQF0aiIILQAAIQsgBUEoaiAILQABEAEgBCALOgABIAYgBUEQaiAHEAJBAXRqIggtAAAhCyAFQRBqIAgtAAEQASADIAs6AAEgA0ECaiEDIARBAmohBCACQQJqIQIgAEECaiEAIAkgBUHYAGoQDUVxIAVBQGsQDUVxIAVBKGoQDUVxIAVBEGoQDUVxIQkMAQsLIAQgDUsgAiAMS3INAEFsIQkgACAKSw0BIApBfWohCQNAIAVB2ABqEAQgACAJT3JFBEAgBiAFQdgAaiAHEAJBAXRqIggtAAAhCyAFQdgAaiAILQABEAEgACALOgAAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAASAAQQJqIQAMAQsLA0AgBUHYAGoQBCAAIApPckUEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCwNAIAAgCkkEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCyAMQX1qIQADQCAFQUBrEAQgAiAAT3JFBEAgBiAFQUBrIAcQAkEBdGoiCi0AACEJIAVBQGsgCi0AARABIAIgCToAACAGIAVBQGsgBxACQQF0aiIKLQAAIQkgBUFAayAKLQABEAEgAiAJOgABIAJBAmohAgwBCwsDQCAFQUBrEAQgAiAMT3JFBEAgBiAFQUBrIAcQAkEBdGoiAC0AACEKIAVBQGsgAC0AARABIAIgCjoAACACQQFqIQIMAQsLA0AgAiAMSQRAIAYgBUFAayAHEAJBAXRqIgAtAAAhCiAFQUBrIAAtAAEQASACIAo6AAAgAkEBaiECDAELCyANQX1qIQADQCAFQShqEAQgBCAAT3JFBEAgBiAFQShqIAcQAkEBdGoiAi0AACEKIAVBKGogAi0AARABIAQgCjoAACAGIAVBKGogBxACQQF0aiICLQAAIQogBUEoaiACLQABEAEgBCAKOgABIARBAmohBAwBCwsDQCAFQShqEAQgBCANT3JFBEAgBiAFQShqIAcQAkEBdGoiAC0AACECIAVBKGogAC0AARABIAQgAjoAACAEQQFqIQQMAQsLA0AgBCANSQRAIAYgBUEoaiAHEAJBAXRqIgAtAAAhAiAFQShqIAAtAAEQASAEIAI6AAAgBEEBaiEEDAELCwNAIAVBEGoQBCADIA9PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIAYgBUEQaiAHEAJBAXRqIgAtAAAhAiAFQRBqIAAtAAEQASADIAI6AAEgA0ECaiEDDAELCwNAIAVBEGoQBCADIA5PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIANBAWohAwwBCwsDQCADIA5JBEAgBiAFQRBqIAcQAkEBdGoiAC0AACECIAVBEGogAC0AARABIAMgAjoAACADQQFqIQMMAQsLIAFBbCAFQdgAahAKIAVBQGsQCnEgBUEoahAKcSAFQRBqEApxGyEJDAELQWwhCQsgBUHwAGokACAJC8oCAQR/IwBBIGsiBSQAIAUgBBAOIAUtAAIhByAFQQhqIAIgAxAGIgIQA0UEQCAEQQRqIQIgACABaiIDQX1qIQQDQCAFQQhqEAQgACAET3JFBEAgAiAFQQhqIAcQAkEBdGoiBi0AACEIIAVBCGogBi0AARABIAAgCDoAACACIAVBCGogBxACQQF0aiIGLQAAIQggBUEIaiAGLQABEAEgACAIOgABIABBAmohAAwBCwsDQCAFQQhqEAQgACADT3JFBEAgAiAFQQhqIAcQAkEBdGoiBC0AACEGIAVBCGogBC0AARABIAAgBjoAACAAQQFqIQAMAQsLA0AgACADT0UEQCACIAVBCGogBxACQQF0aiIELQAAIQYgBUEIaiAELQABEAEgACAGOgAAIABBAWohAAwBCwsgAUFsIAVBCGoQChshAgsgBUEgaiQAIAILtgMBCX8jAEEQayIGJAAgBkEANgIMIAZBADYCCEFUIQQCQAJAIANBQGsiDCADIAZBCGogBkEMaiABIAIQMSICEAMNACAGQQRqIAAQDiAGKAIMIgcgBi0ABEEBaksNASAAQQRqIQogBkEAOgAFIAYgBzoABiAAIAYoAgQ2AgAgB0EBaiEJQQEhBANAIAQgCUkEQCADIARBAnRqIgEoAgAhACABIAU2AgAgACAEQX9qdCAFaiEFIARBAWohBAwBCwsgB0EBaiEHQQAhBSAGKAIIIQkDQCAFIAlGDQEgAyAFIAxqLQAAIgRBAnRqIgBBASAEdEEBdSILIAAoAgAiAWoiADYCACAHIARrIQhBACEEAkAgC0EDTQRAA0AgBCALRg0CIAogASAEakEBdGoiACAIOgABIAAgBToAACAEQQFqIQQMAAALAAsDQCABIABPDQEgCiABQQF0aiIEIAg6AAEgBCAFOgAAIAQgCDoAAyAEIAU6AAIgBCAIOgAFIAQgBToABCAEIAg6AAcgBCAFOgAGIAFBBGohAQwAAAsACyAFQQFqIQUMAAALAAsgAiEECyAGQRBqJAAgBAutAQECfwJAQYQgKAIAIABHIAAoAgBBAXYiAyABa0F4aiICQXhxQQhHcgR/IAIFIAMQJ0UNASACQQhqC0EQSQ0AIAAgACgCACICQQFxIAAgAWpBD2pBeHEiASAAa0EBdHI2AgAgASAANgIEIAEgASgCAEEBcSAAIAJBAXZqIAFrIgJBAXRyNgIAQYQgIAEgAkH/////B3FqQQRqQYQgKAIAIABGGyABNgIAIAEQJQsLygIBBX8CQAJAAkAgAEEIIABBCEsbZ0EfcyAAaUEBR2oiAUEESSAAIAF2cg0AIAFBAnRB/B5qKAIAIgJFDQADQCACQXhqIgMoAgBBAXZBeGoiBSAATwRAIAIgBUEIIAVBCEsbZ0Efc0ECdEGAH2oiASgCAEYEQCABIAIoAgQ2AgALDAMLIARBHksNASAEQQFqIQQgAigCBCICDQALC0EAIQMgAUEgTw0BA0AgAUECdEGAH2ooAgAiAkUEQCABQR5LIQIgAUEBaiEBIAJFDQEMAwsLIAIgAkF4aiIDKAIAQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgBGBEAgASACKAIENgIACwsgAigCACIBBEAgASACKAIENgIECyACKAIEIgEEQCABIAIoAgA2AgALIAMgAygCAEEBcjYCACADIAAQNwsgAwvhCwINfwV+IwBB8ABrIgckACAHIAAoAvDhASIINgJcIAEgAmohDSAIIAAoAoDiAWohDwJAAkAgBUUEQCABIQQMAQsgACgCxOABIRAgACgCwOABIREgACgCvOABIQ4gAEEBNgKM4QFBACEIA0AgCEEDRwRAIAcgCEECdCICaiAAIAJqQazQAWooAgA2AkQgCEEBaiEIDAELC0FsIQwgB0EYaiADIAQQBhADDQEgB0EsaiAHQRhqIAAoAgAQEyAHQTRqIAdBGGogACgCCBATIAdBPGogB0EYaiAAKAIEEBMgDUFgaiESIAEhBEEAIQwDQCAHKAIwIAcoAixBA3RqKQIAIhRCEIinQf8BcSEIIAcoAkAgBygCPEEDdGopAgAiFUIQiKdB/wFxIQsgBygCOCAHKAI0QQN0aikCACIWQiCIpyEJIBVCIIghFyAUQiCIpyECAkAgFkIQiKdB/wFxIgNBAk8EQAJAIAZFIANBGUlyRQRAIAkgB0EYaiADQSAgBygCHGsiCiAKIANLGyIKEAUgAyAKayIDdGohCSAHQRhqEAQaIANFDQEgB0EYaiADEAUgCWohCQwBCyAHQRhqIAMQBSAJaiEJIAdBGGoQBBoLIAcpAkQhGCAHIAk2AkQgByAYNwNIDAELAkAgA0UEQCACBEAgBygCRCEJDAMLIAcoAkghCQwBCwJAAkAgB0EYakEBEAUgCSACRWpqIgNBA0YEQCAHKAJEQX9qIgMgA0VqIQkMAQsgA0ECdCAHaigCRCIJIAlFaiEJIANBAUYNAQsgByAHKAJINgJMCwsgByAHKAJENgJIIAcgCTYCRAsgF6chAyALBEAgB0EYaiALEAUgA2ohAwsgCCALakEUTwRAIAdBGGoQBBoLIAgEQCAHQRhqIAgQBSACaiECCyAHQRhqEAQaIAcgB0EYaiAUQhiIp0H/AXEQCCAUp0H//wNxajYCLCAHIAdBGGogFUIYiKdB/wFxEAggFadB//8DcWo2AjwgB0EYahAEGiAHIAdBGGogFkIYiKdB/wFxEAggFqdB//8DcWo2AjQgByACNgJgIAcoAlwhCiAHIAk2AmggByADNgJkAkACQAJAIAQgAiADaiILaiASSw0AIAIgCmoiEyAPSw0AIA0gBGsgC0Egak8NAQsgByAHKQNoNwMQIAcgBykDYDcDCCAEIA0gB0EIaiAHQdwAaiAPIA4gESAQEB4hCwwBCyACIARqIQggBCAKEAcgAkERTwRAIARBEGohAgNAIAIgCkEQaiIKEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgAmohAgsgB0EoahAEGiAHIAcoAmggAmoiCSADajYCaCAKIAwgCCAJSxsoAgAhDSAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogB0EoaiAfQhiIp0H/AXEQCCEOIAdB8ABqIARBBHRqIgsgCSANaiAIazYCDCALIAg2AgggCyADNgIEIAsgAjYCACAHIA4gH6dB//8DcWo2AkQgBEEBaiEEDAELCyAEIBdIDQEgEkFgaiEYIAdB4ABqIRogB0HkAGohGyABIQMDQCAHQShqEARBAksgBCAFTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEIIAcoAkggBygCREEDdGopAgAiH0IgiKchCSAeQiCIISAgHUIgiKchDAJAIB9CEIinQf8BcSICQQJPBEACQCAGRSACQRlJckUEQCAJIAdBKGogAkEgIAcoAixrIgogCiACSxsiChAFIAIgCmsiAnRqIQkgB0EoahAEGiACRQ0BIAdBKGogAhAFIAlqIQkMAQsgB0EoaiACEAUgCWohCSAHQShqEAQaCyAHKQJUISEgByAJNgJUIAcgITcDWAwBCwJAIAJFBEAgDARAIAcoAlQhCQwDCyAHKAJYIQkMAQsCQAJAIAdBKGpBARAFIAkgDEVqaiICQQNGBEAgBygCVEF/aiICIAJFaiEJDAELIAJBAnQgB2ooAlQiCSAJRWohCSACQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAk2AlQLICCnIRQgCARAIAdBKGogCBAFIBRqIRQLIAggC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgDGohDAsgB0EoahAEGiAHIAcoAmggDGoiGSAUajYCaCAbIBogCSAZSxsoAgAhHCAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogByAHQShqIB9CGIinQf8BcRAIIB+nQf//A3FqNgJEIAcgB0HwAGogBEEDcUEEdGoiDSkDCCIdNwPIASAHIA0pAwAiHjcDwAECQAJAAkAgBygCvAEiDiAepyICaiIWIBNLDQAgAyAHKALEASIKIAJqIgtqIBhLDQAgEiADayALQSBqTw0BCyAHIAcpA8gBNwMQIAcgBykDwAE3AwggAyASIAdBCGogB0G8AWogEyAPIBUgERAeIQsMAQsgAiADaiEIIAMgDhAHIAJBEU8EQCADQRBqIQIDQCACIA5BEGoiDhAHIAJBEGoiAiAISQ0ACwsgCCAdpyIOayECIAcgFjYCvAEgDiAIIA9rSwRAIA4gCCAVa0sEQEFsIQsMAgsgESACIA9rIgJqIhYgCmogEU0EQCAIIBYgChAPGgwCCyAIIBZBACACaxAPIQggByACIApqIgo2AsQBIAggAmshCCAPIQILIA5BEE8EQCAIIApqIQoDQCAIIAIQByACQRBqIQIgCEEQaiIIIApJDQALDAELAkAgDkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgDkECdCIKQcAeaigCAGoiAhAXIAIgCkHgHmooAgBrIQIgBygCxAEhCgwBCyAIIAIQDAsgCkEJSQ0AIAggCmohCiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAKSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAKSQ0ACwsgCxADBEAgCyEQDAQFIA0gDDYCACANIBkgHGogCWs2AgwgDSAJNgIIIA0gFDYCBCAEQQFqIQQgAyALaiEDDAILAAsLIAQgBUgNASAEIBdrIQtBACEEA0AgCyAFSARAIAcgB0HwAGogC0EDcUEEdGoiAikDCCIdNwPIASAHIAIpAwAiHjcDwAECQAJAAkAgBygCvAEiDCAepyICaiIKIBNLDQAgAyAHKALEASIJIAJqIhBqIBhLDQAgEiADayAQQSBqTw0BCyAHIAcpA8gBNwMgIAcgBykDwAE3AxggAyASIAdBGGogB0G8AWogEyAPIBUgERAeIRAMAQsgAiADaiEIIAMgDBAHIAJBEU8EQCADQRBqIQIDQCACIAxBEGoiDBAHIAJBEGoiAiAISQ0ACwsgCCAdpyIGayECIAcgCjYCvAEgBiAIIA9rSwRAIAYgCCAVa0sEQEFsIRAMAgsgESACIA9rIgJqIgwgCWogEU0EQCAIIAwgCRAPGgwCCyAIIAxBACACaxAPIQggByACIAlqIgk2AsQBIAggAmshCCAPIQILIAZBEE8EQCAIIAlqIQYDQCAIIAIQByACQRBqIQIgCEEQaiIIIAZJDQALDAELAkAgBkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgBkECdCIGQcAeaigCAGoiAhAXIAIgBkHgHmooAgBrIQIgBygCxAEhCQwBCyAIIAIQDAsgCUEJSQ0AIAggCWohBiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAGSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAGSQ0ACwsgEBADDQMgC0EBaiELIAMgEGohAwwBCwsDQCAEQQNHBEAgACAEQQJ0IgJqQazQAWogAiAHaigCVDYCACAEQQFqIQQMAQsLIAcoArwBIQgLQbp/IRAgEyAIayIAIBIgA2tLDQAgAwR/IAMgCCAAEAsgAGoFQQALIAFrIRALIAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqIAQgBCAFaiAGGyIEIAEgAmoiAiAEaxAVIgUQAw0AIAMoAnwiBkEfSw0AIAMoAngiB0EJTw0AIABBiCBqIAMgBkGAC0GADCAHEBggA0E0NgJ8IAMgA0H8AGogA0H4AGogBCAFaiIEIAIgBGsQFSIFEAMNACADKAJ8IgZBNEsNACADKAJ4IgdBCk8NACAAQZAwaiADIAZBgA1B4A4gBxAYIANBIzYCfCADIANB/ABqIANB+ABqIAQgBWoiBCACIARrEBUiBRADDQAgAygCfCIGQSNLDQAgAygCeCIHQQpPDQAgACADIAZBwBBB0BEgBxAYIAQgBWoiBEEMaiIFIAJLDQAgAiAFayEFQQAhAgNAIAJBA0cEQCAEKAAAIgZBf2ogBU8NAiAAIAJBAnRqQZzQAWogBjYCACACQQFqIQIgBEEEaiEEDAELCyAEIAFrIQgLIANBgAFqJAAgCAtGAQN/IABBCGohAyAAKAIEIQJBACEAA0AgACACdkUEQCABIAMgAEEDdGotAAJBFktqIQEgAEEBaiEADAELCyABQQggAmt0C4YDAQV/Qbh/IQcCQCADRQ0AIAItAAAiBEUEQCABQQA2AgBBAUG4fyADQQFGGw8LAn8gAkEBaiIFIARBGHRBGHUiBkF/Sg0AGiAGQX9GBEAgA0EDSA0CIAUvAABBgP4BaiEEIAJBA2oMAQsgA0ECSA0BIAItAAEgBEEIdHJBgIB+aiEEIAJBAmoLIQUgASAENgIAIAVBAWoiASACIANqIgNLDQBBbCEHIABBEGogACAFLQAAIgVBBnZBI0EJIAEgAyABa0HAEEHQEUHwEiAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBmCBqIABBCGogBUEEdkEDcUEfQQggASABIAZqIAgbIgEgAyABa0GAC0GADEGAFyAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBoDBqIABBBGogBUECdkEDcUE0QQkgASABIAZqIAgbIgEgAyABa0GADUHgDkGQGSAAKAKM4QEgACgCnOIBIAQQHyIAEAMNACAAIAFqIAJrIQcLIAcLrQMBCn8jAEGABGsiCCQAAn9BUiACQf8BSw0AGkFUIANBDEsNABogAkEBaiELIABBBGohCUGAgAQgA0F/anRBEHUhCkEAIQJBASEEQQEgA3QiB0F/aiIMIQUDQCACIAtGRQRAAkAgASACQQF0Ig1qLwEAIgZB//8DRgRAIAkgBUECdGogAjoAAiAFQX9qIQVBASEGDAELIARBACAKIAZBEHRBEHVKGyEECyAIIA1qIAY7AQAgAkEBaiECDAELCyAAIAQ7AQIgACADOwEAIAdBA3YgB0EBdmpBA2ohBkEAIQRBACECA0AgBCALRkUEQCABIARBAXRqLgEAIQpBACEAA0AgACAKTkUEQCAJIAJBAnRqIAQ6AAIDQCACIAZqIAxxIgIgBUsNAAsgAEEBaiEADAELCyAEQQFqIQQMAQsLQX8gAg0AGkEAIQIDfyACIAdGBH9BAAUgCCAJIAJBAnRqIgAtAAJBAXRqIgEgAS8BACIBQQFqOwEAIAAgAyABEBRrIgU6AAMgACABIAVB/wFxdCAHazsBACACQQFqIQIMAQsLCyEFIAhBgARqJAAgBQvjBgEIf0FsIQcCQCACQQNJDQACQAJAAkACQCABLQAAIgNBA3EiCUEBaw4DAwEAAgsgACgCiOEBDQBBYg8LIAJBBUkNAkEDIQYgASgAACEFAn8CQAJAIANBAnZBA3EiCEF+aiIEQQFNBEAgBEEBaw0BDAILIAVBDnZB/wdxIQQgBUEEdkH/B3EhAyAIRQwCCyAFQRJ2IQRBBCEGIAVBBHZB//8AcSEDQQAMAQsgBUEEdkH//w9xIgNBgIAISw0DIAEtAARBCnQgBUEWdnIhBEEFIQZBAAshBSAEIAZqIgogAksNAgJAIANBgQZJDQAgACgCnOIBRQ0AQQAhAgNAIAJBg4ABSw0BIAJBQGshAgwAAAsACwJ/IAlBA0YEQCABIAZqIQEgAEHw4gFqIQIgACgCDCEGIAUEQCACIAMgASAEIAYQXwwCCyACIAMgASAEIAYQXQwBCyAAQbjQAWohAiABIAZqIQEgAEHw4gFqIQYgAEGo0ABqIQggBQRAIAggBiADIAEgBCACEF4MAQsgCCAGIAMgASAEIAIQXAsQAw0CIAAgAzYCgOIBIABBATYCiOEBIAAgAEHw4gFqNgLw4QEgCUECRgRAIAAgAEGo0ABqNgIMCyAAIANqIgBBiOMBakIANwAAIABBgOMBakIANwAAIABB+OIBakIANwAAIABB8OIBakIANwAAIAoPCwJ/AkACQAJAIANBAnZBA3FBf2oiBEECSw0AIARBAWsOAgACAQtBASEEIANBA3YMAgtBAiEEIAEvAABBBHYMAQtBAyEEIAEQIUEEdgsiAyAEaiIFQSBqIAJLBEAgBSACSw0CIABB8OIBaiABIARqIAMQCyEBIAAgAzYCgOIBIAAgATYC8OEBIAEgA2oiAEIANwAYIABCADcAECAAQgA3AAggAEIANwAAIAUPCyAAIAM2AoDiASAAIAEgBGo2AvDhASAFDwsCfwJAAkACQCADQQJ2QQNxQX9qIgRBAksNACAEQQFrDgIAAgELQQEhByADQQN2DAILQQIhByABLwAAQQR2DAELIAJBBEkgARAhIgJBj4CAAUtyDQFBAyEHIAJBBHYLIQIgAEHw4gFqIAEgB2otAAAgAkEgahAQIQEgACACNgKA4gEgACABNgLw4QEgB0EBaiEHCyAHC0sAIABC+erQ0OfJoeThADcDICAAQgA3AxggAELP1tO+0ser2UI3AxAgAELW64Lu6v2J9eAANwMIIABCADcDACAAQShqQQBBKBAQGgviAgICfwV+IABBKGoiASAAKAJIaiECAn4gACkDACIDQiBaBEAgACkDECIEQgeJIAApAwgiBUIBiXwgACkDGCIGQgyJfCAAKQMgIgdCEol8IAUQGSAEEBkgBhAZIAcQGQwBCyAAKQMYQsXP2bLx5brqJ3wLIAN8IQMDQCABQQhqIgAgAk0EQEIAIAEpAAAQCSADhUIbiUKHla+vmLbem55/fkLj3MqV/M7y9YV/fCEDIAAhAQwBCwsCQCABQQRqIgAgAksEQCABIQAMAQsgASgAAK1Ch5Wvr5i23puef34gA4VCF4lCz9bTvtLHq9lCfkL5893xmfaZqxZ8IQMLA0AgACACSQRAIAAxAABCxc/ZsvHluuonfiADhUILiUKHla+vmLbem55/fiEDIABBAWohAAwBCwsgA0IhiCADhULP1tO+0ser2UJ+IgNCHYggA4VC+fPd8Zn2masWfiIDQiCIIAOFC+8CAgJ/BH4gACAAKQMAIAKtfDcDAAJAAkAgACgCSCIDIAJqIgRBH00EQCABRQ0BIAAgA2pBKGogASACECAgACgCSCACaiEEDAELIAEgAmohAgJ/IAMEQCAAQShqIgQgA2ogAUEgIANrECAgACAAKQMIIAQpAAAQCTcDCCAAIAApAxAgACkAMBAJNwMQIAAgACkDGCAAKQA4EAk3AxggACAAKQMgIABBQGspAAAQCTcDICAAKAJIIQMgAEEANgJIIAEgA2tBIGohAQsgAUEgaiACTQsEQCACQWBqIQMgACkDICEFIAApAxghBiAAKQMQIQcgACkDCCEIA0AgCCABKQAAEAkhCCAHIAEpAAgQCSEHIAYgASkAEBAJIQYgBSABKQAYEAkhBSABQSBqIgEgA00NAAsgACAFNwMgIAAgBjcDGCAAIAc3AxAgACAINwMICyABIAJPDQEgAEEoaiABIAIgAWsiBBAgCyAAIAQ2AkgLCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQEBogAwVBun8LCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQCxogAwVBun8LC6gCAQZ/IwBBEGsiByQAIABB2OABaikDAEKAgIAQViEIQbh/IQUCQCAEQf//B0sNACAAIAMgBBBCIgUQAyIGDQAgACgCnOIBIQkgACAHQQxqIAMgAyAFaiAGGyIKIARBACAFIAYbayIGEEAiAxADBEAgAyEFDAELIAcoAgwhBCABRQRAQbp/IQUgBEEASg0BCyAGIANrIQUgAyAKaiEDAkAgCQRAIABBADYCnOIBDAELAkACQAJAIARBBUgNACAAQdjgAWopAwBCgICACFgNAAwBCyAAQQA2ApziAQwBCyAAKAIIED8hBiAAQQA2ApziASAGQRRPDQELIAAgASACIAMgBSAEIAgQOSEFDAELIAAgASACIAMgBSAEIAgQOiEFCyAHQRBqJAAgBQtnACAAQdDgAWogASACIAAoAuzhARAuIgEQAwRAIAEPC0G4fyECAkAgAQ0AIABB7OABaigCACIBBEBBYCECIAAoApjiASABRw0BC0EAIQIgAEHw4AFqKAIARQ0AIABBkOEBahBDCyACCycBAX8QVyIERQRAQUAPCyAEIAAgASACIAMgBBBLEE8hACAEEFYgAAs/AQF/AkACQAJAIAAoAqDiAUEBaiIBQQJLDQAgAUEBaw4CAAECCyAAEDBBAA8LIABBADYCoOIBCyAAKAKU4gELvAMCB38BfiMAQRBrIgkkAEG4fyEGAkAgBCgCACIIQQVBCSAAKALs4QEiBRtJDQAgAygCACIHQQFBBSAFGyAFEC8iBRADBEAgBSEGDAELIAggBUEDakkNACAAIAcgBRBJIgYQAw0AIAEgAmohCiAAQZDhAWohCyAIIAVrIQIgBSAHaiEHIAEhBQNAIAcgAiAJECwiBhADDQEgAkF9aiICIAZJBEBBuH8hBgwCCyAJKAIAIghBAksEQEFsIQYMAgsgB0EDaiEHAn8CQAJAAkAgCEEBaw4CAgABCyAAIAUgCiAFayAHIAYQSAwCCyAFIAogBWsgByAGEEcMAQsgBSAKIAVrIActAAAgCSgCCBBGCyIIEAMEQCAIIQYMAgsgACgC8OABBEAgCyAFIAgQRQsgAiAGayECIAYgB2ohByAFIAhqIQUgCSgCBEUNAAsgACkD0OABIgxCf1IEQEFsIQYgDCAFIAFrrFINAQsgACgC8OABBEBBaiEGIAJBBEkNASALEEQhDCAHKAAAIAynRw0BIAdBBGohByACQXxqIQILIAMgBzYCACAEIAI2AgAgBSABayEGCyAJQRBqJAAgBgsuACAAECsCf0EAQQAQAw0AGiABRSACRXJFBEBBYiAAIAEgAhA9EAMNARoLQQALCzcAIAEEQCAAIAAoAsTgASABKAIEIAEoAghqRzYCnOIBCyAAECtBABADIAFFckUEQCAAIAEQWwsL0QIBB38jAEEQayIGJAAgBiAENgIIIAYgAzYCDCAFBEAgBSgCBCEKIAUoAgghCQsgASEIAkACQANAIAAoAuzhARAWIQsCQANAIAQgC0kNASADKAAAQXBxQdDUtMIBRgRAIAMgBBAiIgcQAw0EIAQgB2shBCADIAdqIQMMAQsLIAYgAzYCDCAGIAQ2AggCQCAFBEAgACAFEE5BACEHQQAQA0UNAQwFCyAAIAogCRBNIgcQAw0ECyAAIAgQUCAMQQFHQQAgACAIIAIgBkEMaiAGQQhqEEwiByIDa0EAIAMQAxtBCkdyRQRAQbh/IQcMBAsgBxADDQMgAiAHayECIAcgCGohCEEBIQwgBigCDCEDIAYoAgghBAwBCwsgBiADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEEdCAAbiECCyAAQQh2IgEgAkEYbCIAQYwIaigCAGwgAEGICGooAgBqIgJBA3YgAmogAEGACGooAgAgAEGECGooAgAgAWxqSQs3ACAAIAMgBCAFQYAQEDMiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQMgVBuH8LC78DAQN/IwBBIGsiBSQAIAVBCGogAiADEAYiAhADRQRAIAAgAWoiB0F9aiEGIAUgBBAOIARBBGohAiAFLQACIQMDQEEAIAAgBkkgBUEIahAEGwRAIAAgAiAFQQhqIAMQAkECdGoiBC8BADsAACAFQQhqIAQtAAIQASAAIAQtAANqIgQgAiAFQQhqIAMQAkECdGoiAC8BADsAACAFQQhqIAAtAAIQASAEIAAtAANqIQAMAQUgB0F+aiEEA0AgBUEIahAEIAAgBEtyRQRAIAAgAiAFQQhqIAMQAkECdGoiBi8BADsAACAFQQhqIAYtAAIQASAAIAYtAANqIQAMAQsLA0AgACAES0UEQCAAIAIgBUEIaiADEAJBAnRqIgYvAQA7AAAgBUEIaiAGLQACEAEgACAGLQADaiEADAELCwJAIAAgB08NACAAIAIgBUEIaiADEAIiA0ECdGoiAC0AADoAACAALQADQQFGBEAgBUEIaiAALQACEAEMAQsgBSgCDEEfSw0AIAVBCGogAiADQQJ0ai0AAhABIAUoAgxBIUkNACAFQSA2AgwLIAFBbCAFQQhqEAobIQILCwsgBUEgaiQAIAILkgIBBH8jAEFAaiIJJAAgCSADQTQQCyEDAkAgBEECSA0AIAMgBEECdGooAgAhCSADQTxqIAgQIyADQQE6AD8gAyACOgA+QQAhBCADKAI8IQoDQCAEIAlGDQEgACAEQQJ0aiAKNgEAIARBAWohBAwAAAsAC0EAIQkDQCAGIAlGRQRAIAMgBSAJQQF0aiIKLQABIgtBAnRqIgwoAgAhBCADQTxqIAotAABBCHQgCGpB//8DcRAjIANBAjoAPyADIAcgC2siCiACajoAPiAEQQEgASAKa3RqIQogAygCPCELA0AgACAEQQJ0aiALNgEAIARBAWoiBCAKSQ0ACyAMIAo2AgAgCUEBaiEJDAELCyADQUBrJAALowIBCX8jAEHQAGsiCSQAIAlBEGogBUE0EAsaIAcgBmshDyAHIAFrIRADQAJAIAMgCkcEQEEBIAEgByACIApBAXRqIgYtAAEiDGsiCGsiC3QhDSAGLQAAIQ4gCUEQaiAMQQJ0aiIMKAIAIQYgCyAPTwRAIAAgBkECdGogCyAIIAUgCEE0bGogCCAQaiIIQQEgCEEBShsiCCACIAQgCEECdGooAgAiCEEBdGogAyAIayAHIA4QYyAGIA1qIQgMAgsgCUEMaiAOECMgCUEBOgAPIAkgCDoADiAGIA1qIQggCSgCDCELA0AgBiAITw0CIAAgBkECdGogCzYBACAGQQFqIQYMAAALAAsgCUHQAGokAA8LIAwgCDYCACAKQQFqIQoMAAALAAs0ACAAIAMgBCAFEDYiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQNAVBuH8LCyMAIAA/AEEQdGtB//8DakEQdkAAQX9GBEBBAA8LQQAQAEEBCzsBAX8gAgRAA0AgACABIAJBgCAgAkGAIEkbIgMQCyEAIAFBgCBqIQEgAEGAIGohACACIANrIgINAAsLCwYAIAAQAwsLqBUJAEGICAsNAQAAAAEAAAACAAAAAgBBoAgLswYBAAAAAQAAAAIAAAACAAAAJgAAAIIAAAAhBQAASgAAAGcIAAAmAAAAwAEAAIAAAABJBQAASgAAAL4IAAApAAAALAIAAIAAAABJBQAASgAAAL4IAAAvAAAAygIAAIAAAACKBQAASgAAAIQJAAA1AAAAcwMAAIAAAACdBQAASgAAAKAJAAA9AAAAgQMAAIAAAADrBQAASwAAAD4KAABEAAAAngMAAIAAAABNBgAASwAAAKoKAABLAAAAswMAAIAAAADBBgAATQAAAB8NAABNAAAAUwQAAIAAAAAjCAAAUQAAAKYPAABUAAAAmQQAAIAAAABLCQAAVwAAALESAABYAAAA2gQAAIAAAABvCQAAXQAAACMUAABUAAAARQUAAIAAAABUCgAAagAAAIwUAABqAAAArwUAAIAAAAB2CQAAfAAAAE4QAAB8AAAA0gIAAIAAAABjBwAAkQAAAJAHAACSAAAAAAAAAAEAAAABAAAABQAAAA0AAAAdAAAAPQAAAH0AAAD9AAAA/QEAAP0DAAD9BwAA/Q8AAP0fAAD9PwAA/X8AAP3/AAD9/wEA/f8DAP3/BwD9/w8A/f8fAP3/PwD9/38A/f//AP3//wH9//8D/f//B/3//w/9//8f/f//P/3//38AAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAAAZAAAAGgAAABsAAAAcAAAAHQAAAB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACUAAAAnAAAAKQAAACsAAAAvAAAAMwAAADsAAABDAAAAUwAAAGMAAACDAAAAAwEAAAMCAAADBAAAAwgAAAMQAAADIAAAA0AAAAOAAAADAAEAQeAPC1EBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAQcQQC4sBAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABIAAAAUAAAAFgAAABgAAAAcAAAAIAAAACgAAAAwAAAAQAAAAIAAAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAQAAAAIAAAAAAAQBBkBIL5gQBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAAAEAAAAEAAAACAAAAAAAAAABAAEBBgAAAAAAAAQAAAAAEAAABAAAAAAgAAAFAQAAAAAAAAUDAAAAAAAABQQAAAAAAAAFBgAAAAAAAAUHAAAAAAAABQkAAAAAAAAFCgAAAAAAAAUMAAAAAAAABg4AAAAAAAEFEAAAAAAAAQUUAAAAAAABBRYAAAAAAAIFHAAAAAAAAwUgAAAAAAAEBTAAAAAgAAYFQAAAAAAABwWAAAAAAAAIBgABAAAAAAoGAAQAAAAADAYAEAAAIAAABAAAAAAAAAAEAQAAAAAAAAUCAAAAIAAABQQAAAAAAAAFBQAAACAAAAUHAAAAAAAABQgAAAAgAAAFCgAAAAAAAAULAAAAAAAABg0AAAAgAAEFEAAAAAAAAQUSAAAAIAABBRYAAAAAAAIFGAAAACAAAwUgAAAAAAADBSgAAAAAAAYEQAAAABAABgRAAAAAIAAHBYAAAAAAAAkGAAIAAAAACwYACAAAMAAABAAAAAAQAAAEAQAAACAAAAUCAAAAIAAABQMAAAAgAAAFBQAAACAAAAUGAAAAIAAABQgAAAAgAAAFCQAAACAAAAULAAAAIAAABQwAAAAAAAAGDwAAACAAAQUSAAAAIAABBRQAAAAgAAIFGAAAACAAAgUcAAAAIAADBSgAAAAgAAQFMAAAAAAAEAYAAAEAAAAPBgCAAAAAAA4GAEAAAAAADQYAIABBgBcLhwIBAAEBBQAAAAAAAAUAAAAAAAAGBD0AAAAAAAkF/QEAAAAADwX9fwAAAAAVBf3/HwAAAAMFBQAAAAAABwR9AAAAAAAMBf0PAAAAABIF/f8DAAAAFwX9/38AAAAFBR0AAAAAAAgE/QAAAAAADgX9PwAAAAAUBf3/DwAAAAIFAQAAABAABwR9AAAAAAALBf0HAAAAABEF/f8BAAAAFgX9/z8AAAAEBQ0AAAAQAAgE/QAAAAAADQX9HwAAAAATBf3/BwAAAAEFAQAAABAABgQ9AAAAAAAKBf0DAAAAABAF/f8AAAAAHAX9//8PAAAbBf3//wcAABoF/f//AwAAGQX9//8BAAAYBf3//wBBkBkLhgQBAAEBBgAAAAAAAAYDAAAAAAAABAQAAAAgAAAFBQAAAAAAAAUGAAAAAAAABQgAAAAAAAAFCQAAAAAAAAULAAAAAAAABg0AAAAAAAAGEAAAAAAAAAYTAAAAAAAABhYAAAAAAAAGGQAAAAAAAAYcAAAAAAAABh8AAAAAAAAGIgAAAAAAAQYlAAAAAAABBikAAAAAAAIGLwAAAAAAAwY7AAAAAAAEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ";var Bt,kt=new WeakMap,Lt=0,Pt=function(t){(0,u.Z)(s,t);var e,r,n,a=(r=s,n=function(){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(t){return!1}}(),function(){var t,e=(0,f.Z)(r);if(n){var i=(0,f.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,h.Z)(this,t)});function s(t){var e;return(0,l.Z)(this,s),(e=a.call(this,t)).transcoderPath="",e.transcoderBinary=null,e.transcoderPending=null,e.workerPool=new gt,e.workerSourceURL="",e.workerConfig=null,"undefined"!=typeof MSC_TRANSCODER&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.'),e}return(0,c.Z)(s,[{key:"setTranscoderPath",value:function(t){return this.transcoderPath=t,this}},{key:"setWorkerLimit",value:function(t){return this.workerPool.setWorkerLimit(t),this}},{key:"detectSupport",value:function(t){return!0===t.isWebGPURenderer?this.workerConfig={astcSupported:t.hasFeature("texture-compression-astc"),etc1Supported:!1,etc2Supported:t.hasFeature("texture-compression-etc2"),dxtSupported:t.hasFeature("texture-compression-bc"),bptcSupported:!1,pvrtcSupported:!1}:(this.workerConfig={astcSupported:t.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:t.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:t.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:t.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:t.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:t.extensions.has("WEBGL_compressed_texture_pvrtc")||t.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},t.capabilities.isWebGL2&&(this.workerConfig.etc1Supported=!1)),this}},{key:"init",value:function(){var t=this;if(!this.transcoderPending){var e=new i.FileLoader(this.manager);e.setPath(this.transcoderPath),e.setWithCredentials(this.withCredentials);var r=e.loadAsync("basis_transcoder.js"),n=new i.FileLoader(this.manager);n.setPath(this.transcoderPath),n.setResponseType("arraybuffer"),n.setWithCredentials(this.withCredentials);var a=n.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([r,a]).then((function(e){var r=(0,o.Z)(e,2),n=r[0],i=r[1],a=s.BasisWorker.toString(),l=["/* constants */","let _EngineFormat = "+JSON.stringify(s.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(s.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(s.BasisFormat),"/* basis_transcoder.js */",n,"/* worker */",a.substring(a.indexOf("{")+1,a.lastIndexOf("}"))].join("\n");t.workerSourceURL=URL.createObjectURL(new Blob([l])),t.transcoderBinary=i,t.workerPool.setWorkerCreator((function(){var e=new Worker(t.workerSourceURL),r=t.transcoderBinary.slice(0);return e.postMessage({type:"init",config:t.workerConfig,transcoderBinary:r},[r]),e}))})),Lt>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),Lt++}return this.transcoderPending}},{key:"load",value:function(t,e,r,n){var a=this;if(null===this.workerConfig)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");var o=new i.FileLoader(this.manager);o.setResponseType("arraybuffer"),o.setWithCredentials(this.withCredentials),o.load(t,(function(t){if(kt.has(t))return kt.get(t).promise.then(e).catch(n);a._createTexture(t).then((function(t){return e?e(t):null})).catch(n)}),r,n)}},{key:"_createTextureFrom",value:function(t,e){var r,n=t.faces,a=t.width,o=t.height,s=t.format,l=t.type,c=t.error,u=t.dfdTransferFn,h=t.dfdFlags;if("error"===l)return Promise.reject(c);if(6===e.faceCount)(r=new i.CompressedTexture).image=n,r.format=s,r.type=i.UnsignedByteType;else{var f=n[0].mipmaps;r=e.layerCount>1?new i.CompressedArrayTexture(f,a,o,e.layerCount,s,i.UnsignedByteType):new i.CompressedTexture(f,a,o,s,i.UnsignedByteType)}return r.minFilter=1===n[0].mipmaps.length?i.LinearFilter:i.LinearMipmapLinearFilter,r.magFilter=i.LinearFilter,r.generateMipmaps=!1,r.needsUpdate=!0,r.colorSpace=2===u?i.SRGBColorSpace:i.NoColorSpace,r.premultiplyAlpha=!!(1&h),r}},{key:"_createTexture",value:(e=(0,pt.Z)(At().mark((function t(e){var r,n,i,a,o,s,l,c,u,h=this,f=arguments;return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=f.length>1&&void 0!==f[1]?f[1]:{},0===(n=Et(new Uint8Array(e))).vkFormat){t.next=17;break}i=[],a=[],o=At().mark((function(t){return At().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.push(Ft(n,t).then((function(e){i[t]=e})));case 1:case"end":return e.stop()}}),o)})),s=0;case 7:if(!(s1?(R=L.origWidth,B=L.origHeight):(R=L.width,B=L.height);var P=new Uint8Array(o.getImageTranscodedSizeInBytes(T,k,0,w));if(!o.transcodeImage(P,T,k,S,w,0,-1,-1))throw h(),new Error("THREE.KTX2Loader: .transcodeImage failed.");I.push(P)}var D=u(I);C.push({data:D,width:R,height:B}),M.push(D.buffer)}E.push({mipmaps:C,width:d,height:p,format:_})}return h(),{faces:E,buffers:M,width:d,height:p,hasAlpha:v,format:_,dfdTransferFn:y,dfdFlags:b}}(f.buffer),o=e.faces,h=e.buffers,d=e.width,p=e.height,m=e.hasAlpha,A=e.format,g=e.dfdTransferFn,v=e.dfdFlags;self.postMessage({type:"transcode",id:f.id,faces:o,width:d,height:p,hasAlpha:m,format:A,dfdTransferFn:g,dfdFlags:v},h)}catch(t){console.error(t),self.postMessage({type:"error",id:f.id,error:t.message})}}))}}));var o=[{if:"astcSupported",basisFormat:[a.UASTC_4x4],transcoderFormat:[i.ASTC_4x4,i.ASTC_4x4],engineFormat:[n.RGBA_ASTC_4x4_Format,n.RGBA_ASTC_4x4_Format],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[a.ETC1S,a.UASTC_4x4],transcoderFormat:[i.BC7_M5,i.BC7_M5],engineFormat:[n.RGBA_BPTC_Format,n.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[a.ETC1S,a.UASTC_4x4],transcoderFormat:[i.BC1,i.BC3],engineFormat:[n.RGB_S3TC_DXT1_Format,n.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[a.ETC1S,a.UASTC_4x4],transcoderFormat:[i.ETC1,i.ETC2],engineFormat:[n.RGB_ETC2_Format,n.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[a.ETC1S,a.UASTC_4x4],transcoderFormat:[i.ETC1],engineFormat:[n.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[a.ETC1S,a.UASTC_4x4],transcoderFormat:[i.PVRTC1_4_RGB,i.PVRTC1_4_RGBA],engineFormat:[n.RGB_PVRTC_4BPPV1_Format,n.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0}],s=o.sort((function(t,e){return t.priorityETC1S-e.priorityETC1S})),l=o.sort((function(t,e){return t.priorityUASTC-e.priorityUASTC}));function c(t){return t<=2||0==(t&t-1)&&0!==t}function u(t){if(1===t.length)return t[0];for(var e=0,r=0;r1&&void 0!==f[1]?f[1]:0,n=e.vkFormat,a=Math.max(1,e.pixelWidth>>r),o=Math.max(1,e.pixelHeight>>r),s=Math.max(1,e.pixelDepth>>r),void 0!==Dt[n]){t.next=7;break}throw new Error("THREE.KTX2Loader: Unsupported vkFormat.");case 7:if(l=e.levels[r],e.supercompressionScheme!==vt){t.next=12;break}c=l.levelData,t.next=20;break;case 12:if(e.supercompressionScheme!==yt){t.next=19;break}return Bt||(Bt=new Promise(function(){var t=(0,pt.Z)(At().mark((function t(e){var r;return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new It,t.next=3,r.init();case 3:e(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),t.next=16,Bt;case 16:c=t.sent.decode(l.levelData,l.uncompressedByteLength),t.next=20;break;case 19:throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");case 20:return u=Ut[n]===i.FloatType?new Float32Array(c.buffer,c.byteOffset,c.byteLength/Float32Array.BYTES_PER_ELEMENT):Ut[n]===i.HalfFloatType?new Uint16Array(c.buffer,c.byteOffset,c.byteLength/Uint16Array.BYTES_PER_ELEMENT):c,(h=0===s?new i.DataTexture(u,a,o):new i.Data3DTexture(u,a,o,s)).type=Ut[n],h.format=Dt[n],h.colorSpace=Ot[n]||i.NoColorSpace,h.needsUpdate=!0,t.abrupt("return",Promise.resolve(h));case 27:case"end":return t.stop()}}),t)}))),Nt.apply(this,arguments)}var zt={};zt.LegacyGLTFLoader=function(){var t=function(t){(0,u.Z)(p,t);var e,r,s=(e=p,r=function(){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(t){return!1}}(),function(){var t,n=(0,f.Z)(e);if(r){var i=(0,f.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,h.Z)(this,t)});function p(t){return(0,l.Z)(this,p),s.call(this,t)}return(0,c.Z)(p,[{key:"load",value:function(t,e,r,n){var a,o=this;a=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:i.LoaderUtils.extractUrlBase(t);var s=new i.FileLoader(o.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.load(t,(function(t){o.parse(t,a,e)}),r,n)}},{key:"parse",value:function(t,e,r){var s,l={};i.LoaderUtils.decodeText(new Uint8Array(t,0,4))===o.magic?(l[n.KHR_BINARY_GLTF]=new d(t),s=l[n.KHR_BINARY_GLTF].content):s=i.LoaderUtils.decodeText(new Uint8Array(t));var c=JSON.parse(s);c.extensionsUsed&&c.extensionsUsed.indexOf(n.KHR_MATERIALS_COMMON)>=0&&(l[n.KHR_MATERIALS_COMMON]=new a(c)),new k(c,l,{crossOrigin:this.crossOrigin,manager:this.manager,path:e||this.resourcePath||""}).parse((function(t,e,n,i){r({scene:t,scenes:e,cameras:n,animations:i})}))}}]),p}(i.Loader);function e(){var t={};return{get:function(e){return t[e]},add:function(e,r){t[e]=r},remove:function(e){delete t[e]},removeAll:function(){t={}},update:function(e,r){for(var n in t){var i=t[n];i.update&&i.update(e,r)}}}}function r(t,e){var r={},n=t.material.uniforms;for(var a in n){var o=n[a];if(o.semantic){var s=o.node,l=t;s&&(l=e[s]),r[a]={semantic:o.semantic,sourceNode:l,targetNode:t,uniform:o}}}this.boundUniforms=r,this._m4=new i.Matrix4}t.Shaders={update:function(){console.warn("threeExamples.LegacyGLTFLoader.Shaders has been deprecated, and now updates automatically.")}},r.prototype.update=function(t,e){var r=this.boundUniforms;for(var n in r){var i=r[n];switch(i.semantic){case"MODELVIEW":i.uniform.value.multiplyMatrices(e.matrixWorldInverse,i.sourceNode.matrixWorld);break;case"MODELVIEWINVERSETRANSPOSE":var a=i.uniform.value;this._m4.multiplyMatrices(e.matrixWorldInverse,i.sourceNode.matrixWorld),a.getNormalMatrix(this._m4);break;case"PROJECTION":i.uniform.value.copy(e.projectionMatrix);break;case"JOINTMATRIX":for(var o=i.uniform.value,s=0;st.length)&&(e=t.length);for(var r=0,n=new Array(e);r0){var p=u,m=t.slice(p,c.FTJSONLength+p),A=Vt.Z.decode(new Uint8Array(m));(f=JSON.parse(A)).RTC_CENTER?d.fromArray(f.RTC_CENTER):d.set(0,0,0)}if(c.FTBinaryLength>0&&console.warn("3D Tiles feature table binary not supported yet."),c.BTJSONLength>0){var g=u+c.FTJSONLength+c.FTBinaryLength,v=t.slice(g,g+c.BTJSONLength+c.BTBinaryLength);h.push(Promise.resolve(new Qt.Z(v,c.BTJSONLength,c.BTBinaryLength,f.BATCH_LENGTH,e.registeredExtensions)))}else h.push(Promise.resolve(new Qt.Z));var y=u+c.FTJSONLength+c.FTBinaryLength+c.BTJSONLength+c.BTBinaryLength,b=t.slice(y),x=new DataView(b,0,20);return h.push(new Promise((function(t){var s=function(o){var s,l=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Ht(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ht(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(o.scenes);try{for(l.s();!(s=l.n()).done;)s.value.traverse(Kt)}catch(t){l.e(t)}finally{l.f()}void 0===r||"Y"===r?o.scene.applyMatrix4(Xt):"X"===r&&o.scene.applyMatrix4(qt),o.scene.position.copy(d);var c=new Uint8Array(b,20,x.getUint32(12,!0)),u=Vt.Z.decode(new Uint8Array(c)),h=JSON.parse(u);h.extensions&&h.extensions.CESIUM_RTC&&(o.scene.position.fromArray(h.extensions.CESIUM_RTC.center),o.scene.updateMatrixWorld(!0)),o.scene.traverse((function(t){if(t.frustumCulled=!1,t.material){if(e.overrideMaterials){var r=t.material;"object"===(0,n.Z)(e.overrideMaterials)&&e.overrideMaterials.isMaterial?t.material=e.overrideMaterials:t.material=new i.MeshBasicMaterial,(0,Wt.Z)(r)}else a.Z.isLogDepthBufferSupported()&&t.material.isRawShaderMaterial&&!e.doNotPatchMaterial&&(Zt.Z.patchMaterialForLogDepthSupport(t.material),console.warn("b3dm shader has been patched to add log depth buffer support"));(0,jt.Z)(t.material,e.layer)}})),t(o)};1===x.getUint32(4,!0)?Jt.parse(b,o,s):Yt.parse(b,o,s)}))),Promise.all(h).then((function(t){return{gltf:t[1],batchTable:t[0]}}))}throw new Error("Invalid b3dm file.")}}},71077:(t,e,r)=>{"use strict";r.d(e,{S:()=>l,Z:()=>c});var n=r(99477),i=r(67503),a=r(99128),o=r(14278);function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{in:{}},c=t.split("\n"),u=c.indexOf(c.find((function(t){return t.includes("end_of_head")})))+1,h=c.slice(0,u),f={minX:l(h,"longlimit_west"),maxX:l(h,"longlimit_east"),minY:l(h,"latlimit_south"),maxY:l(h,"latlimit_north"),stepX:l(h,"gridstep"),stepY:l(h,"gridstep"),nRows:l(h,"latitude_parallels"),nColumns:l(h,"longitude_parallels")},d=new DataView(new ArrayBuffer(o.h8*f.nRows*f.nColumns)),p=0,m=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}(c.slice(u,c.length));try{for(m.s();!(e=m.n()).done;){var A=e.value;(A=A.split(" ").filter((function(t){return""!==t}))).length&&(d.setFloat64(p*o.h8,parseFloat(A[2])),p++)}}catch(t){m.e(t)}finally{m.f()}var g=new a.ZP(r.in.crs||"EPSG:4326",f.minX,f.maxX,f.minY,f.maxY),v=new n.Vector2(f.stepX,f.stepY);return Promise.resolve(new i.Z(g,v,(function(t,e){return d.getFloat64((f.nColumns*(f.nRows-t-1)+e)*o.h8)})))}}},14278:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>s,h8:()=>o});var n=r(99477),i=r(67503),a=r(99128),o=8;const s={parse:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{in:{}},r=e.in.dataType||"float";if(!["float","double"].includes(r))throw new Error("`dataType` parameter is incorrect for GTXParser.parse method. This parameter must be either `double` or `float`.");var s=new DataView(t,0,40),l={minX:s.getFloat64(8),minY:s.getFloat64(0),stepX:s.getFloat64(24),stepY:s.getFloat64(16),nColumns:s.getInt32(36),nRows:s.getInt32(32)},c=new DataView(t,40),u=l.minX+l.stepX*(l.nColumns-1),h=l.minY+l.stepY*(l.nRows-1),f=new a.ZP(e.in.crs||"EPSG:4326",l.minX,u,l.minY,h),d=new n.Vector2(l.stepX,l.stepY);return Promise.resolve(new i.Z(f,d,(function(t,e){return"float"===r?c.getFloat32(4*(l.nColumns*t+e)):"double"===r?c.getFloat64((l.nColumns*t+e)*o):void 0})))}}},97400:(t,e,r)=>{"use strict";r.d(e,{Z:()=>g});var n=r(60145),i=r(94596),a=r(86896);function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{};(e=(0,a._F)(e)).in=e.in||{};var r=e.out,n=e.in;switch("string"==typeof t&&(t=JSON.parse(t)),n.crs=n.crs||function(t){if(t.crs){if("epsg"==t.crs.type.toLowerCase())return"EPSG:".concat(t.crs.properties.code);if("name"==t.crs.type.toLowerCase()){if(t.crs.properties.name.toLowerCase().includes("epsg:")){var e=t.crs.properties.name.lastIndexOf(":");if(e>0)return"EPSG:".concat(t.crs.properties.name.substr(e+1))}throw new Error("Unsupported CRS authority '".concat(t.crs.properties.name,"'"))}throw new Error("Unsupported CRS type '".concat(t.crs,"'"))}return"EPSG:4326"}(t),r.filteringExtent&&("boolean"==typeof r.filteringExtent?r.filterExtent=t.extent.as(n.crs):r.filteringExtent.isExtent&&(r.filterExtent=r.filteringExtent)),t.type.toLowerCase()){case"featurecollection":return Promise.resolve(A(n.crs,t.features,r));case"feature":return Promise.resolve(A(n.crs,[t],r));default:throw new Error("Unsupported GeoJSON type: '".concat(t.type))}}}},70274:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(75153),i=r(97400),a=r(86896);const o={parse:function(t,e){return e=(0,a._F)(e),i.Z.parse((0,n.ng)(t),e)}}},49472:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var n=r(99477),i=r(67503),a=r(99128),o=r(71077),s=r(14278);function l(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{in:{}},c=t.split("\n"),u=c.indexOf(c.find((function(t){return t.includes("end_of_head")})))+1,h=c.slice(0,u),f={minX:(0,o.S)(h,"lon min"),maxX:(0,o.S)(h,"lon max"),minY:(0,o.S)(h,"lat min"),maxY:(0,o.S)(h,"lat max"),stepX:(0,o.S)(h,"delta lon"),stepY:(0,o.S)(h,"delta lat"),nRows:(0,o.S)(h,"nrows"),nColumns:(0,o.S)(h,"ncols")},d=new DataView(new ArrayBuffer(s.h8*f.nRows*f.nColumns)),p=0,m=l(c.slice(u,c.length));try{for(m.s();!(e=m.n()).done;){var A=e.value;if(A=A.split(" ").filter((function(t){return""!==t})),A.length){var g,v=l(A);try{for(v.s();!(g=v.n()).done;){var y=g.value;d.setFloat64(p*s.h8,parseFloat(y)),p++}}catch(t){v.e(t)}finally{v.f()}}}}catch(t){m.e(t)}finally{m.f()}var b=new a.ZP(r.in.crs||"EPSG:4326",f.minX+f.stepX/2,f.maxX-f.stepX/2,f.minY+f.stepY/2,f.maxY-f.stepY/2),x=new n.Vector2(f.stepX,f.stepY);return Promise.resolve(new i.Z(b,x,(function(t,e){return d.getFloat64((f.nColumns*t+e)*s.h8)})))}}},99127:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(75153),i=r(97400),a=r(86896);const o={parse:function(t,e){return e=(0,a._F)(e),i.Z.parse((0,n.DS)(t),e)}}},77474:(t,e,r)=>{"use strict";r.d(e,{SR:()=>v,SY:()=>m,Ti:()=>x,Y0:()=>w,y:()=>d});var n=r(42982),i=r(99477),a=r(1857),o=r(24147),s=r(24266);function l(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:0,i=e.additiveRefinement||r>0,o=0;othis.cleanupDelay){this.root.cleanableSince=void 0;for(var e=0;ethis.cleanupDelay))break;p(this,r)}this._cleanableTiles.splice(0,e)}return[this.root]}var A=new i.Box3,g=new i.Sphere;function v(t,e,r,n){return u(t,e,r,n,void 0,!0).then((function(t){r.object3d.add(t),t.updateMatrixWorld(),r.tileset.tiles[t.tileId].loaded=!0,r.root=t,r.onTileContentLoaded(t)}))}function y(t,e){t.content&&(t.content.visible=e)}function b(t,e){e.cleanableSince||(e.cleanableSince=Date.now(),t._cleanableTiles.push(e))}function x(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w;return function(r,n,i){if(!i.parent.pendingSubdivision||i.parent.additiveRefinement){var a=!t||!t(n,r.camera,i,i.matrixWorld);if(i.visible=a,a){var o;if(i.cleanableSince&&(n._cleanableTiles.splice(n._cleanableTiles.indexOf(i),1),i.cleanableSince=void 0),i.pendingSubdivision||e(r,n,i))(function(t,e,r,n){r.additiveRefinement?function(t,e,r,n){var i,a=l(e.tileset.tiles[r.tileId].children);try{var o=function(){var a=i.value;if(a.promise||a.loaded)return"continue";var o=r.matrixWorld;if(a.transform&&(o=f.multiplyMatrices(r.matrixWorld,a.transform)),n&&n(e,t.camera,a,o))return"continue";a.promise=u(t.view,t.scheduler,e,a,r,!0).then((function(n){r.add(n),n.updateMatrixWorld(),e.onTileContentLoaded(n),t.view.notifyChange(a),a.loaded=!0,delete a.promise}))};for(a.s();!(i=a.n()).done;)o()}catch(t){a.e(t)}finally{a.f()}}(t,e,r,n):function(t,e,r){if(!r.pendingSubdivision&&0==h(r).length){var n=e.tileset.tiles[r.tileId].children;if(void 0===n||0===n.length)return;r.pendingSubdivision=!0;for(var i=[],a=function(a){i.push(u(t.view,t.scheduler,e,n[a],r,!1).then((function(i){n[a].loaded=!0,r.add(i),i.updateMatrixWorld(),r.additiveRefinement&&t.view.notifyChange(r),e.tileset.tiles[i.tileId].loaded=!0,e.onTileContentLoaded(i)})))},o=0;oe.sseThreshold}},75963:(t,e,r)=>{"use strict";r.d(e,{U8:()=>h,XP:()=>c,kE:()=>o,pN:()=>u});var n=r(54919),i=r(52872),a=r(13324),o=Math.pow(131072,.5);function s(t){return!(t.requester.parent&&t.requester.material&&!(t.layer.isElevationLayer&&t.requester.material.getElevationLayer()&&t.targetLevel<=t.requester.material.getElevationLayer().level)&&t.requester.layerUpdateState[t.layer.id]&&t.layer.source._featuresCaches[t.layer.crs]&&t.requester.material.visible)}function l(t,e,r,n,i){return{view:t,layer:e,extentsSource:r,extentsDestination:n,requester:i,priority:(a=i.material,a.visible?100:10),earlyDropFunction:s};var a}function c(t,e,r,o){var s=r.material;if(o&&s){var c=r.getExtentsByProjection(e.crs),u=c[0].zoom;if(!(u>e.zoom.max||u=e.source.zoom.min)return void t.view.notifyChange(r,!1)}if(s.visible&&e.visible&&r.layerUpdateState[e.id].canTryUpdate())if(h.level>=c[0].zoom)r.layerUpdateState[e.id].noMoreUpdatePossible();else if(!e.frozen){var p=r.layerUpdateState[e.id].failureParams,m=c[0].zoom||r.level,A=(0,n.k5)(e.updateStrategy.type,r,m,h.level,e,p);if(!(!e.source.isVectorSource&&A<=h.level||A>m)){if(!e.source.extentInsideLimit(r.extent,A))return r.layerUpdateState[e.id].noData({targetLevel:A}),void t.view.notifyChange(r,!1);var g=c.map((function(t){return t.tiledExtentParent(A)}));r.layerUpdateState[e.id].newTry();var v=l(t.view,e,g,c,r);return t.scheduler.execute(v).then((function(t){if(r.layerUpdateState[e.id]){var n=c.map((function(e,r){return e.offsetToParent(t[r].extent,h.offsetScales[r])}));h.setTextures(t,n),r.layerUpdateState[e.id].success()}}),(function(n){return(0,a.Z)(n,r,e,A,t.view)}))}p.lowestLevelError!=1/0&&r.layerUpdateState[e.id].noMoreUpdatePossible()}}}}function u(t,e,r,o){var s=r.material;if(o&&s){var c=r.getExtentsByProjection(e.crs),u=c[0].zoom;if(!(u>e.zoom.max||u=e.source.zoom.min)return void t.view.notifyChange(r,!1)}if(!e.frozen&&s.visible&&r.layerUpdateState[e.id].canTryUpdate()){var p=r.layerUpdateState[e.id].failureParams,m=(0,n.k5)(e.updateStrategy.type,r,c[0].zoom,h.level,e,p);if(!(m<=h.level||m>c[0].zoom)){if(!e.source.extentInsideLimit(r.extent,m))return r.layerUpdateState[e.id].noData({targetLevel:m}),void t.view.notifyChange(r,!1);var A=c.map((function(t){return t.tiledExtentParent(m)}));r.layerUpdateState[e.id].newTry();var g=l(t.view,e,A,c,r);return t.scheduler.execute(g).then((function(t){if(r.layerUpdateState[e.id])if(m<=h.level)r.layerUpdateState[e.id].noMoreUpdatePossible();else{var n=c.map((function(e,r){return e.offsetToParent(t[r].extent,h.offsetScales[r])}));h.setTextures(t,n),r.layerUpdateState[e.id].success()}}),(function(n){return(0,a.Z)(n,r,e,m,t.view)}))}r.layerUpdateState[e.id].noMoreUpdatePossible()}}}}function h(t){return function(e){var r;null!==(r=e.material)&&void 0!==r&&r.removeLayer&&(e.material.removeLayer(t),e.material.elevationLayerIds[0]==t&&e.setBBoxZ({min:0,max:0})),e.layerUpdateState&&e.layerUpdateState[t]&&delete e.layerUpdateState[t]}}},1857:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(42982);function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 o,s=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){l=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r{"use strict";r.d(e,{Z:()=>i});var n=4;function i(t,e,r,i,a){if(e.layerUpdateState[r.id])if(t.isCancelledCommandException)e.layerUpdateState[r.id].success();else if(t instanceof SyntaxError)e.layerUpdateState[r.id].failure(0,!0);else{var o=e.layerUpdateState[r.id].errorCount>n;e.layerUpdateState[r.id].failure(Date.now(),o,{targetLevel:i}),o||window.setTimeout((function(){a.notifyChange(e,!1)}),1e3*e.layerUpdateState[r.id].secondsUntilNextTry())}}},33347:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var n=r(99477);function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 o,s=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){l=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{}).then((function(t){return l(t),t.arrayBuffer()}))};const u={text:function(t){return fetch(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).then((function(t){return l(t),t.text()}))},json:function(t){return fetch(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).then((function(t){return l(t),t.json()}))},xml:function(t){return fetch(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).then((function(t){return l(t),t.text()})).then((function(t){return(new window.DOMParser).parseFromString(t,"text/xml")}))},texture:function(t){var e,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o.crossOrigin=n.crossOrigin;var i=new Promise((function(t,n){e=t,r=n}));return o.load(t,e,(function(){}),r),i},arrayBuffer:c,textureFloat:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(t,e).then((function(t){var r=function(t){if(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]){var e=new n.DataTexture(t,s,s,n.RedFormat,n.FloatType);return e.internalFormat="R32F",e.needsUpdate=!0,e}return new n.DataTexture(t,s,s,n.AlphaFormat,n.FloatType)}(new Float32Array(t),e.isWebGL2);return r}))},multiple:function(t,e){var r,n=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=[];for(var s in e){if(!this[s])throw new Error("".concat(s," is not a valid Fetcher method."));var l,c=i(e[s]);try{var u=function(){var e=l.value;r="".concat(t,".").concat(e),o.push(n[s](r,a).then((function(t){return{type:e,result:t}})))};for(c.s();!(l=c.n()).done;)u()}catch(t){c.e(t)}finally{c.f()}}return Promise.all(o).then((function(t){var e,r={},n=i(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;r[a.type]=a.result}}catch(t){n.e(t)}finally{n.f()}return Promise.resolve(r)}))}}},13012:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=new(r(99128).ZP)("EPSG:4326",[0,0,0,0]),i=0;function a(t){var e=/\$\{u:([\w-_.|]+)\}/.exec(t);if(!e)return t;var r=e[1].split("|");return t.replace(e[0],r[i++%r.length])}const o={subDomains:a,xyz:function(t,e){return a(e.url.replace(/(\$\{z\}|%TILEMATRIX)/,e.tileMatrixCallback(t.zoom)).replace(/(\$\{y\}|%ROW)/,t.row).replace(/(\$\{x\}|%COL)/,t.col))},bbox:function(t,e){var r="EPSG:4326"==e.crs?9:2;t.as(e.crs,n);var i=n.west.toFixed(r),o=n.south.toFixed(r),s=n.east.toFixed(r),l=n.north.toFixed(r),c=e.axisOrder||"wsen";return c=c.replace("w","".concat(i,",")).replace("s","".concat(o,",")).replace("e","".concat(s,",")).replace("n","".concat(l,",")).slice(0,-1),a(e.url.replace("%bbox",c))}}},800:(t,e,r)=>{"use strict";r.d(e,{P:()=>h,Z:()=>y});var n=r(15671),i=r(43144),a=r(86033),o=r(13092),s=r(99477),l=r(60145),c=r(79295);function u(t,e,r){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,r)}var h={PERSPECTIVE:0,ORTHOGRAPHIC:1},f={frustum:new s.Frustum,matrix:new s.Matrix4,box3:new s.Box3},d=new s.Box3(new s.Vector3(-1,-1,-1),new s.Vector3(1,1,1));function p(t,e,r){if(t.camera3D.isOrthographicCamera)t._preSSE=e;else{var n=s.MathUtils.degToRad(r);t._preSSE=e/(2*Math.tan(.5*n))}}var m=new WeakMap,A=new WeakMap,g=function(){function t(e,r,i){var a,o=this,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if((0,n.Z)(this,t),u(this,m,{writable:!0,value:!0}),u(this,A,{writable:!0,value:new s.Matrix4}),this.crs=e,l.isCamera)console.warn("options.camera parameter is deprecated. Use options.camera.cameraThree to place a custom camera as a parameter. See the documentation of Camera."),this.camera3D=l;else if(l.cameraThree)this.camera3D=l.cameraThree;else switch(l.type){case h.ORTHOGRAPHIC:this.camera3D=new s.OrthographicCamera;break;case h.PERSPECTIVE:default:this.camera3D=new s.PerspectiveCamera(30)}if(this.camera3D.aspect=null!==(a=this.camera3D.aspect)&&void 0!==a?a:1,this.width=r,this.height=i,this.resize(r,i),this._preSSE=1/0,this.camera3D.isPerspectiveCamera){var c=this.camera3D.fov;Object.defineProperty(this.camera3D,"fov",{get:function(){return c},set:function(t){c=t,p(o,o.height,c)}})}}return(0,i.Z)(t,[{key:"resize",value:function(t,e){if(!t||t<=0||!e||e<=0)console.warn("Trying to resize the Camera with invalid height (".concat(e,") or width (").concat(t,"). Skipping resize."));else{var r=t/e;if(this.camera3D.aspect!==r){if(this.camera3D.isOrthographicCamera){this.camera3D.zoom*=this.width/t;var n=this.camera3D.top*this.camera3D.aspect/r;this.camera3D.bottom=-n,this.camera3D.top=n}else this.camera3D.isPerspectiveCamera&&(this.camera3D.fov=2*s.MathUtils.radToDeg(Math.atan(e/this.height*Math.tan(s.MathUtils.degToRad(this.camera3D.fov)/2))));this.camera3D.aspect=r}this.width=t,this.height=e,p(this,this.height,this.camera3D.fov),this.camera3D.updateProjectionMatrix&&(this.camera3D.updateProjectionMatrix(),(0,o.Z)(this,m,!0))}}},{key:"update",value:function(){this.camera3D.updateMatrixWorld(),(0,o.Z)(this,m,!0)}},{key:"position",value:function(t){return new l.Z(this.crs,this.camera3D.position).as(t||this.crs)}},{key:"setPosition",value:function(t){this.camera3D.position.copy(t.as(this.crs))}},{key:"isBox3Visible",value:function(t,e){return this.box3SizeOnScreen(t,e).intersectsBox(d)}},{key:"isSphereVisible",value:function(t,e){return(0,a.Z)(this,m)&&((0,a.Z)(this,A).multiplyMatrices(this.camera3D.projectionMatrix,this.camera3D.matrixWorldInverse),(0,o.Z)(this,m,!1)),e?(f.matrix.multiplyMatrices((0,a.Z)(this,A),e),f.frustum.setFromProjectionMatrix(f.matrix)):f.frustum.setFromProjectionMatrix((0,a.Z)(this,A)),f.frustum.intersectsSphere(t)}},{key:"box3SizeOnScreen",value:function(t,e){var r=function(t,e,r){var n=t.camera3D.matrixWorldInverse;r&&(n=f.matrix.multiplyMatrices(t.camera3D.matrixWorldInverse,r)),v[0].set(e.min.x,e.min.y,e.min.z).applyMatrix4(n),v[1].set(e.min.x,e.min.y,e.max.z).applyMatrix4(n),v[2].set(e.min.x,e.max.y,e.min.z).applyMatrix4(n),v[3].set(e.min.x,e.max.y,e.max.z).applyMatrix4(n),v[4].set(e.max.x,e.min.y,e.min.z).applyMatrix4(n),v[5].set(e.max.x,e.min.y,e.max.z).applyMatrix4(n),v[6].set(e.max.x,e.max.y,e.min.z).applyMatrix4(n),v[7].set(e.max.x,e.max.y,e.max.z).applyMatrix4(n);for(var i=!1,a=0;a<8;a++)v[a].z<=-t.camera3D.near?i=!0:v[a].z=-t.camera3D.near;return i?v:void 0}(this,t,e);if(!r)return f.box3.makeEmpty();for(var n=0;n<8;n++)r[n].applyMatrix4(this.camera3D.projectionMatrix);return f.box3.setFromPoints(r)}},{key:"adjustAltitudeToAvoidCollisionWithLayer",value:function(t,e,r){var n=t.camera.position().as("EPSG:4326");if(void 0!==e){var i=c.Z.getElevationValueAt(e,n);void 0!==i&&n.altitude-(i+r)<0&&(n.altitude=i+r,t.camera3D.position.copy(n.as(t.referenceCrs)),t.notifyChange(this.camera3D))}}}]),t}(),v=[new s.Vector3,new s.Vector3,new s.Vector3,new s.Vector3,new s.Vector3,new s.Vector3,new s.Vector3,new s.Vector3];const y=g},12276:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s,i:()=>o});var n=r(66165);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}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 o,s=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){l=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw o}}}}(t.level0Nodes);try{for(s.s();!(r=s.n()).done;)r.value.traverse(o)}catch(t){s.e(t)}finally{s.f()}}var o="layers-order-changed";const s={moveLayerUp:function(t,e){var r=t.getLayers((function(t){return t.isColorLayer})),i=t.getLayerById(e);if(!i)throw new Error("".concat(e," isn't color layer"));var s=n.M.getColorLayersIdOrderedBySequence(r);n.M.moveLayerUp(i,r),a(t.tileLayer,r),t.dispatchEvent({type:o,previous:{sequence:s},new:{sequence:n.M.getColorLayersIdOrderedBySequence(r)}}),t.notifyChange(t.tileLayer)},moveLayerDown:function(t,e){var r=t.getLayers((function(t){return t.isColorLayer})),i=t.getLayerById(e);if(!i)throw new Error("".concat(e," isn't color layer"));var s=n.M.getColorLayersIdOrderedBySequence(r);n.M.moveLayerDown(i,r),a(t.tileLayer,r),t.dispatchEvent({type:o,previous:{sequence:s},new:{sequence:n.M.getColorLayersIdOrderedBySequence(r)}}),t.notifyChange(t.tileLayer)},moveLayerToIndex:function(t,e,r){var i=t.getLayers((function(t){return t.isColorLayer})),s=t.getLayerById(e);if(!s)throw new Error("".concat(e," isn't color layer"));var l=n.M.getColorLayersIdOrderedBySequence(i);n.M.moveLayerToIndex(s,r,i),a(t.tileLayer,i),t.dispatchEvent({type:o,previous:{sequence:l},new:{sequence:n.M.getColorLayersIdOrderedBySequence(i)}}),t.notifyChange(t.tileLayer)}}},96586:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(99477);const i={setDefineMapping:function(t,e,r){Object.keys(r).forEach((function(n){t.defines["".concat(e,"_").concat(n)]=r[n]}))},setDefineProperty:function(t,e,r,n){t.defines[r]=n,Object.defineProperty(t,e,{get:function(){return t.defines[r]},set:function(e){t.defines[r]!=e&&(t.defines[r]=e,t.needsUpdate=!0)}})},setUniformProperty:function(t,e,r){t.uniforms[e]=new n.Uniform(r),Object.defineProperty(t,e,{get:function(){return t.uniforms[e].value},set:function(r){t.uniforms[e].value!=r&&(t.uniforms[e].value=r)}})}}},6755:(t,e,r)=>{"use strict";r.d(e,{R:()=>l,Z:()=>u});var n=r(15671),i=r(43144),a=r(99477),o=r(10268),s=new a.Frustum,l=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:12,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;(0,n.Z)(this,t),this.x=e,this.y=r,this.grid=[],this.visible=[],this.resize(),this.reset(),this.width=i,this.height=a}return(0,i.Z)(t,[{key:"reset",value:function(){for(var t=0;t0&&this.grid[a][o].some((function(e){return r=e.boundaries,n=t.boundaries,!(r.left>n.right||r.rightn.bottom||r.bottom{"use strict";r.d(e,{On:()=>x,ZP:()=>k,dn:()=>E,pO:()=>M,zQ:()=>I});var n=r(15671),i=r(43144),a=r(97326),o=r(79340),s=r(82963),l=r(61120),c=r(13092),u=r(86033),h=r(99477),f=r(77567),d=r(47052),p=r(32475),m=r(96586);function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(e);try{for(c.s();!(n=c.n()).done;){var u=n.value;u.textureOffset=l;for(var h=0,f=u.textures.length;hr&&console.warn("LayeredMaterial: Not enough texture units (".concat(r," < ").concat(l,"), excess textures have been discarded.")),s.value=l;for(var d=l;d0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;return(0,n.Z)(this,y),t=A.call(this,o),e=(0,a.Z)(t),i={writable:!0,value:!0},function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,r=B),r.set(e,i),T=T||[_,E()],t.defines.NUM_VS_TEXTURES=T[0],t.defines.NUM_FS_TEXTURES=T[1],t.defines.USE_FOG=1,t.defines.NUM_CRS=s,m.Z.setDefineMapping((0,a.Z)(t),"ELEVATION",I),m.Z.setDefineMapping((0,a.Z)(t),"MODE",p.Z.MODES),m.Z.setDefineProperty((0,a.Z)(t),"mode","MODE",p.Z.MODES.FINAL),d.Z.isLogDepthBufferSupported()&&(t.defines.USE_LOGDEPTHBUF=1,t.defines.USE_LOGDEPTHBUF_EXT=1),t.vertexShader="#include \n#include \n#include \n#include \n#include \n#include \nattribute vec2 uv_0;\n#if NUM_CRS > 1\nattribute float uv_1;\n#endif\nattribute vec3 normal;\n\nuniform mat4 modelMatrix;\nuniform bool lightingEnabled;\nvarying vec2 vHighPrecisionZW;\n\n#if MODE == MODE_FINAL\n#include \nvarying vec3 vUv;\nvarying vec3 vNormal;\n#endif\nvoid main() {\n vec2 uv = vec2(uv_0.x, 1.0 - uv_0.y);\n\n #include \n #include \n #include \n #include \n #include \n vHighPrecisionZW = gl_Position.zw;\n#if MODE == MODE_FINAL\n #include \n #if NUM_CRS > 1\n vUv = vec3(uv_0, (uv_1 > 0.) ? uv_1 : uv_0.y); // set uv_1 = uv_0 if uv_1 is undefined\n #else\n vUv = vec3(uv_0, 0.0);\n #endif\n vNormal = normalize ( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n#endif\n}\n",R[s]=R[s]||f.Z.unrollLoops("#include \n#include \n#include \n#include \n#include \n#if MODE == MODE_FINAL\n#include \n#include \n#include \n#endif\n#include \n\nuniform vec3 diffuse;\nuniform float opacity;\nvarying vec3 vUv; // uv_0.x/uv_1.x, uv_0.y, uv_1.y\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n #include \n\n#if MODE == MODE_ID\n\n #include \n\n#elif MODE == MODE_DEPTH\n\n #include \n\n#else\n\n gl_FragColor = vec4(diffuse, opacity);\n\n uvs[0] = vec3(vUv.xy, 0.);\n\n#if NUM_CRS > 1\n uvs[1] = vec3(vUv.x, fract(vUv.z), floor(vUv.z));\n#endif\n\n vec4 color;\n #pragma unroll_loop\n for ( int i = 0; i < NUM_FS_TEXTURES; i ++ ) {\n color = getLayerColor( i , colorTextures[ i ], colorOffsetScales[ i ], colorLayers[ i ]);\n gl_FragColor.rgb = mix(gl_FragColor.rgb, color.rgb, color.a);\n }\n\n #if defined(DEBUG)\n if (showOutline) {\n #pragma unroll_loop\n for ( int i = 0; i < NUM_CRS; i ++) {\n color = getOutlineColor( outlineColors[ i ], uvs[ i ].xy);\n gl_FragColor.rgb = mix(gl_FragColor.rgb, color.rgb, color.a);\n }\n }\n #endif\n\n #include \n #include \n #include \n\n#endif\n}\n",t.defines),t.fragmentShader=R[s],m.Z.setUniformProperty((0,a.Z)(t),"diffuse",new h.Color(.04,.23,.35)),m.Z.setUniformProperty((0,a.Z)(t),"opacity",t.opacity),m.Z.setUniformProperty((0,a.Z)(t),"lightingEnabled",!1),m.Z.setUniformProperty((0,a.Z)(t),"lightPosition",new h.Vector3(-.5,0,1)),m.Z.setUniformProperty((0,a.Z)(t),"fogDistance",1e9),m.Z.setUniformProperty((0,a.Z)(t),"fogColor",new h.Color(.76,.85,1)),m.Z.setUniformProperty((0,a.Z)(t),"overlayAlpha",0),m.Z.setUniformProperty((0,a.Z)(t),"overlayColor",new h.Color(1,.3,0)),m.Z.setUniformProperty((0,a.Z)(t),"objectId",0),m.Z.setUniformProperty((0,a.Z)(t),"geoidHeight",0),m.Z.setUniformProperty((0,a.Z)(t),"minBorderDistance",-.01),t.layers=[],t.elevationLayerIds=[],t.colorLayerIds=[],t.uniforms.elevationLayers=new h.Uniform(new Array(T[0]).fill(S)),t.uniforms.elevationTextures=new h.Uniform(new Array(T[0]).fill(v)),t.uniforms.elevationOffsetScales=new h.Uniform(new Array(T[0]).fill(g)),t.uniforms.elevationTextureCount=new h.Uniform(0),t.uniforms.colorLayers=new h.Uniform(new Array(T[1]).fill(S)),t.uniforms.colorTextures=new h.Uniform(new Array(T[1]).fill(v)),t.uniforms.colorOffsetScales=new h.Uniform(new Array(T[1]).fill(g)),t.uniforms.colorTextureCount=new h.Uniform(0),Object.defineProperty((0,a.Z)(t),"visible",{get:function(){return(0,u.Z)(this,B)},set:function(t){(0,u.Z)(this,B)!=t&&((0,c.Z)(this,B,t),this.dispatchEvent({type:t?"shown":"hidden"}))}}),t}return(0,i.Z)(y,[{key:"onBeforeCompile",value:function(t,e){e.capabilities.isWebGL2&&(this.defines.WEBGL2=!0,t.glslVersion="300 es")}},{key:"getUniformByType",value:function(t){return{layers:this.uniforms["".concat(t,"Layers")],textures:this.uniforms["".concat(t,"Textures")],offsetScales:this.uniforms["".concat(t,"OffsetScales")],textureCount:this.uniforms["".concat(t,"TextureCount")]}}},{key:"updateLayersUniforms",value:function(){var t=this,e=this.layers.filter((function(e){return t.colorLayerIds.includes(e.id)&&e.visible&&e.opacity>0}));if(e.sort((function(e,r){return t.colorLayerIds.indexOf(e.id)-t.colorLayerIds.indexOf(r.id)})),C(this.getUniformByType("color"),e,this.defines.NUM_FS_TEXTURES),this.elevationLayerIds.some((function(e){return t.getLayer(e)}))||this.uniforms.elevationTextureCount.value&&!this.elevationLayerIds.length){var r=this.getElevationLayer()?[this.getElevationLayer()]:[];C(this.getUniformByType("elevation"),r,this.defines.NUM_VS_TEXTURES)}this.layersNeedUpdate=!1}},{key:"dispose",value:function(){this.dispatchEvent({type:"dispose"}),this.layers.forEach((function(t){return t.dispose(!0)})),this.layers.length=0,this.layersNeedUpdate=!0}},{key:"setSequence",value:function(t){this.colorLayerIds=t,this.layersNeedUpdate=!0}},{key:"setSequenceElevation",value:function(t){this.elevationLayerIds[0]=t,this.layersNeedUpdate=!0}},{key:"removeLayer",value:function(t){var e=this.layers.findIndex((function(e){return e.id===t}));if(e>-1){this.layers[e].dispose(),this.layers.splice(e,1);var r=this.colorLayerIds.indexOf(t);r>-1?this.colorLayerIds.splice(r,1):this.elevationLayerIds=[]}}},{key:"addLayer",value:function(t){t.layer.id in this.layers&&console.warn('The "{layer.id}" layer was already present in the material, overwritting.'),this.layers.push(t)}},{key:"getLayer",value:function(t){return this.layers.find((function(e){return e.id===t}))}},{key:"getLayers",value:function(t){return this.layers.filter((function(e){return t.includes(e.id)}))}},{key:"getElevationLayer",value:function(){var t=this;return this.layers.find((function(e){return e.id===t.elevationLayerIds[0]}))}},{key:"setElevationScale",value:function(t){this.elevationLayerIds.length&&(this.getElevationLayer().scale=t)}}]),y}(h.RawShaderMaterial)},44996:(t,e,r)=>{"use strict";r.d(e,{Z:()=>x});var n=r(15671),i=r(43144),a=r(88301),o=r(79340),s=r(82963),l=r(61120),c=r(99477),u=r(3590),h=r(56564),f=r(60145),d=r(82150);var p,m=new h.Z({crs:"EPSG:4978",uvCount:1}),A=new c.Vector3,g=new c.Vector2,v=new c.Vector3,y=new f.Z("EPSG:4326",0,0,0),b=function(t){(0,o.Z)(f,t);var e,r,h=(e=f,r=function(){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(t){return!1}}(),function(){var t,n=(0,l.Z)(e);if(r){var i=(0,l.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,s.Z)(this,t)});function f(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new c.Vector3(1/0,1/0,1/0),r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new c.Vector3(-1/0,-1/0,-1/0);return(0,n.Z)(this,f),(t=h.call(this)).box3D=new c.Box3(e.clone(),r.clone()),t.natBox=t.box3D.clone(),t.z={min:0,max:0,scale:1},t}return(0,i.Z)(f,[{key:"clone",value:function(){return(new f).copy(this)}},{key:"copy",value:function(t){return(0,a.Z)((0,l.Z)(f.prototype),"copy",this).call(this,t),this.box3D.copy(t.box3D),this.natBox.copy(t.natBox),this.z.min=t.z.min,this.z.max=t.z.max,this.z.scale=t.z.scale,this}},{key:"updateZ",value:function(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.z.min=null!==(t=r.min)&&void 0!==t?t:this.z.min,this.z.max=null!==(e=r.max)&&void 0!==e?e:this.z.max,this.z.scale=r.scale>0?r.scale:this.z.scale,this.z.delta=Math.abs(this.z.max-this.z.min)*this.z.scale;var n=r.geoidHeight||0;this.box3D.min.z=this.natBox.min.z+this.z.min*this.z.scale+n,this.box3D.max.z=this.natBox.max.z+this.z.max*this.z.scale+n}},{key:"isSphereAboveXYBox",value:function(t){var e=this.worldToLocal(t.center),r=Math.max(this.box3D.min.x,Math.min(e.x,this.box3D.max.x)),n=Math.max(this.box3D.min.y,Math.min(e.y,this.box3D.max.y));return Math.sqrt((r-e.x)*(r-e.x)+(n-e.y)*(n-e.y))1&&void 0!==arguments[1]?arguments[1]:t.min||0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.max||0;if("EPSG:4326"==t.crs){var n=m.computeSharableExtent(t),i=n.sharableExtent,a=n.quaternion,o=n.position,s=Math.max(Math.floor(i.planarDimensions(g).x/90+1),2),l=new u.Z({extent:i,level:0,segment:s,disableSkirt:!0,builder:m});p.box3D.copy(l.boundingBox),p.natBox.copy(l.boundingBox),this.copy(p),this.updateZ({min:e,max:r}),this.position.copy(o),this.quaternion.copy(a),this.updateMatrixWorld(!0)}else{if(d.Z.isTms(t.crs)||!d.Z.isMetricUnit(t.crs))throw new Error("Unsupported extent crs");t.center(y).toVector3(this.position),t.planarDimensions(g),A.set(g.x,g.y,Math.abs(r-e)),this.box3D.setFromCenterAndSize(v,A),this.updateMatrixWorld(!0)}return this}}]),f}(c.Object3D);p=new b;const x=b},32204:(t,e,r)=>{"use strict";r.d(e,{E7:()=>g,Uz:()=>A,ZP:()=>b,vj:()=>m,wy:()=>y});var n=r(97326),i=r(88301),a=r(79340),o=r(82963),s=r(61120),l=r(43144),c=r(15671),u=r(99477),h=r(47052),f=r(77567),d=r(96586);var p="#include \n#include \n#include \n#if defined(USE_TEXTURES_PROJECTIVE)\n#include \n#endif\n\nvarying vec4 vColor;\nuniform bool picking;\nuniform int shape;\n\nvoid main() {\n #include \n //square shape does not require any change.\n if (shape == PNTS_SHAPE_CIRCLE) {\n //circular rendering in glsl\n if ((length(gl_PointCoord - 0.5) > 0.5) || (vColor.a == 0.0)) {\n discard;\n }\n }\n\n#if defined(USE_TEXTURES_PROJECTIVE)\n vec4 color = vColor;\n if (!picking) {\n #pragma unroll_loop\n for (int i = 0; i < ORIENTED_IMAGES_COUNT; i++) {\n color = projectiveTextureColor(projectiveTextureCoords[ ORIENTED_IMAGES_COUNT - 1 - i ], projectiveTextureDistortion[ ORIENTED_IMAGES_COUNT - 1 - i ], projectiveTexture[ ORIENTED_IMAGES_COUNT - 1 - i ], mask[ORIENTED_IMAGES_COUNT - 1 - i], color);\n }\n gl_FragColor = vec4(color.rgb, color.a * opacity);\n } else {\n gl_FragColor = color;\n }\n#else\n gl_FragColor = vColor;\n#endif\n}\n",m={COLOR:0,INTENSITY:1,CLASSIFICATION:2,NORMAL:3},A={CIRCLE:0,SQUARE:1},g={VALUE:0,ATTENUATED:1},v=new u.Color(1,1,1),y={DEFAULT:{0:{visible:!0,name:"never classified",color:new u.Color(.5,.5,.5),opacity:1},1:{visible:!0,name:"unclassified",color:new u.Color(.5,.5,.5),opacity:1},2:{visible:!0,name:"ground",color:new u.Color(.63,.32,.18),opacity:1},3:{visible:!0,name:"low vegetation",color:new u.Color(0,1,0),opacity:1},4:{visible:!0,name:"medium vegetation",color:new u.Color(0,.8,0),opacity:1},5:{visible:!0,name:"high vegetation",color:new u.Color(0,.6,0),opacity:1},6:{visible:!0,name:"building",color:new u.Color(1,.66,0),opacity:1},7:{visible:!0,name:"low point(noise)",color:new u.Color(1,0,1),opacity:1},8:{visible:!0,name:"key-point",color:new u.Color(1,0,0),opacity:1},9:{visible:!0,name:"water",color:new u.Color(0,0,1),opacity:1},10:{visible:!0,name:"rail",color:new u.Color(.8,.8,1),opacity:1},11:{visible:!0,name:"road Surface",color:new u.Color(.4,.4,.7),opacity:1},12:{visible:!0,name:"overlap",color:new u.Color(1,1,0),opacity:1},DEFAULT:{visible:!0,name:"default",color:new u.Color(.3,.6,.6),opacity:.5}}};const b=function(t){(0,a.Z)(x,t);var e,r,b=(e=x,r=function(){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(t){return!1}}(),function(){var t,n=(0,s.Z)(e);if(r){var i=(0,s.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,o.Z)(this,t)});function x(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,c.Z)(this,x);var r=e.intensityRange||new u.Vector2(0,1),i=e.orientedImageMaterial,a=e.classification||y.DEFAULT,o=null!=e.applyOpacityClassication&&e.applyOpacityClassication,s=e.size||0,l=e.mode||m.COLOR,v=e.shape||A.CIRCLE,w=0===s?g.ATTENUATED:e.sizeMode||g.VALUE,_=e.minAttenuatedSize||3,E=e.maxAttenuatedSize||10;delete e.orientedImageMaterial,delete e.intensityRange,delete e.classification,delete e.applyOpacityClassication,delete e.size,delete e.mode,delete e.shape,delete e.sizeMode,delete e.minAttenuatedSize,delete e.maxAttenuatedSize,(t=b.call(this,e)).vertexShader="#include \n#include \n#include \n#if defined(USE_TEXTURES_PROJECTIVE)\n#include \n#endif\n#include \n#include \n\nuniform float size;\nuniform float scale;\n\nuniform bool picking;\nuniform int mode;\nuniform float opacity;\nuniform vec4 overlayColor;\nuniform vec2 intensityRange;\nuniform bool applyOpacityClassication;\nattribute vec3 color;\nattribute vec4 unique_id;\nattribute float intensity;\nattribute float classification;\nuniform sampler2D classificationLUT;\nuniform int sizeMode;\nuniform float minAttenuatedSize;\nuniform float maxAttenuatedSize;\n\n#if defined(NORMAL_OCT16)\nattribute vec2 oct16Normal;\n#elif defined(NORMAL_SPHEREMAPPED)\nattribute vec2 sphereMappedNormal;\n#else\nattribute vec3 normal;\n#endif\n\nvarying vec4 vColor;\n\n// see https://web.archive.org/web/20150303053317/http://lgdv.cs.fau.de/get/1602\n// and implementation in PotreeConverter (BINPointReader.cpp) and potree (BinaryDecoderWorker.js)\n#if defined(NORMAL_OCT16)\nvec3 decodeOct16Normal(vec2 encodedNormal) {\n vec2 nNorm = 2. * (encodedNormal / 255.) - 1.;\n vec3 n;\n n.z = 1. - abs(nNorm.x) - abs(nNorm.y);\n if (n.z >= 0.) {\n n.x = nNorm.x;\n n.y = nNorm.y;\n } else {\n n.x = sign(nNorm.x) - sign(nNorm.x) * sign(nNorm.y) * nNorm.y;\n n.y = sign(nNorm.y) - sign(nNorm.y) * sign(nNorm.x) * nNorm.x;\n }\n return normalize(n);\n}\n#elif defined(NORMAL_SPHEREMAPPED)\n// see http://aras-p.info/texts/CompactNormalStorage.html method #4\n// or see potree's implementation in BINPointReader.cpp\nvec3 decodeSphereMappedNormal(vec2 encodedNormal) {\n vec2 fenc = 2. * encodedNormal / 255. - 1.;\n float f = dot(fenc,fenc);\n float g = 2. * sqrt(1. - f);\n vec3 n;\n n.xy = fenc * g;\n n.z = 1. - 2. * f;\n return n;\n}\n#endif\n\nvoid main() {\n\n#if defined(NORMAL_OCT16)\n vec3 normal = decodeOct16Normal(oct16Normal);\n#elif defined(NORMAL_SPHEREMAPPED)\n vec3 normal = decodeSphereMappedNormal(sphereMappedNormal);\n#elif defined(NORMAL)\n // nothing to do\n#else\n // default to color\n vec3 normal = color;\n#endif\n\n if (picking) {\n vColor = unique_id;\n } else {\n vColor.a = opacity;\n if (applyOpacityClassication || mode == PNTS_MODE_CLASSIFICATION) {\n vec2 uv = vec2(classification, 0.5);\n vColor = texture2D(classificationLUT, uv);\n vColor.a *= opacity;\n }\n\n if (mode == PNTS_MODE_INTENSITY) {\n // adapt the grayscale knowing the range\n float i = (intensity - intensityRange.x) / (intensityRange.y - intensityRange.x);\n vColor.rgb = vec3(i, i, i);\n } else if (mode == PNTS_MODE_NORMAL) {\n vColor.rgb = abs(normal);\n } else if (mode == PNTS_MODE_COLOR) {\n // default to color mode\n vColor.rgb = mix(color, overlayColor.rgb, overlayColor.a);\n }\n }\n\n #include \n #include \n\n gl_PointSize = size;\n\n if (sizeMode == PNTS_SIZE_MODE_ATTENUATED) {\n bool isPerspective = isPerspectiveMatrix(projectionMatrix);\n\n if (isPerspective) {\n gl_PointSize *= scale / -mvPosition.z;\n gl_PointSize = clamp(gl_PointSize, minAttenuatedSize, maxAttenuatedSize);\n }\n }\n\n#if defined(USE_TEXTURES_PROJECTIVE)\n #include \n#endif\n #include \n}\n";var M=e.scale||.025/Math.tan(.5);d.Z.setDefineMapping((0,n.Z)(t),"PNTS_MODE",m),d.Z.setDefineMapping((0,n.Z)(t),"PNTS_SHAPE",A),d.Z.setDefineMapping((0,n.Z)(t),"PNTS_SIZE_MODE",g),d.Z.setUniformProperty((0,n.Z)(t),"size",s),d.Z.setUniformProperty((0,n.Z)(t),"mode",l),d.Z.setUniformProperty((0,n.Z)(t),"shape",v),d.Z.setUniformProperty((0,n.Z)(t),"picking",!1),d.Z.setUniformProperty((0,n.Z)(t),"opacity",t.opacity),d.Z.setUniformProperty((0,n.Z)(t),"overlayColor",e.overlayColor||new u.Vector4(0,0,0,0)),d.Z.setUniformProperty((0,n.Z)(t),"intensityRange",r),d.Z.setUniformProperty((0,n.Z)(t),"applyOpacityClassication",o),d.Z.setUniformProperty((0,n.Z)(t),"sizeMode",w),d.Z.setUniformProperty((0,n.Z)(t),"scale",M),d.Z.setUniformProperty((0,n.Z)(t),"minAttenuatedSize",_),d.Z.setUniformProperty((0,n.Z)(t),"maxAttenuatedSize",E);var S=new Uint8Array(1024),C=new u.DataTexture(S,256,1,u.RGBAFormat);return C.needsUpdate=!0,C.magFilter=u.NearestFilter,d.Z.setUniformProperty((0,n.Z)(t),"classificationLUT",C),t.classification=a,t.recomputeClassification(),i?(t.uniforms.projectiveTextureAlphaBorder=i.uniforms.projectiveTextureAlphaBorder,t.uniforms.projectiveTextureDistortion=i.uniforms.projectiveTextureDistortion,t.uniforms.projectiveTextureMatrix=i.uniforms.projectiveTextureMatrix,t.uniforms.projectiveTexture=i.uniforms.projectiveTexture,t.uniforms.mask=i.uniforms.mask,t.uniforms.boostLight=i.uniforms.boostLight,t.defines.ORIENTED_IMAGES_COUNT=i.defines.ORIENTED_IMAGES_COUNT,t.defines.USE_DISTORTION=i.defines.USE_DISTORTION,t.defines.DEBUG_ALPHA_BORDER=i.defines.DEBUG_ALPHA_BORDER,t.defines.USE_TEXTURES_PROJECTIVE=!0,t.defines.USE_BASE_MATERIAL=!0,t.fragmentShader=f.Z.unrollLoops(p,t.defines)):t.fragmentShader=p,h.Z.isLogDepthBufferSupported()&&(t.defines.USE_LOGDEPTHBUF=1,t.defines.USE_LOGDEPTHBUF_EXT=1),t}return(0,l.Z)(x,[{key:"recomputeClassification",value:function(){for(var t=this.classification,e=this.classificationLUT.image.data,r=this.classificationLUT.image.width,n=0;n{"use strict";r.d(e,{pL:()=>g,AN:()=>b,NO:()=>x});var n=r(88301),i=r(15671),a=r(43144),o=r(79340),s=r(82963),l=r(61120),c=r(99477),u=r(27240),h=r(42982),f=r(79295);var d=r(82150);function p(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rthis.level){var r,n=0,i=p(e);try{for(i.s();!(r=i.n()).done;){var a,o=r.value,s=p(t.textures);try{for(s.s();!(a=s.n()).done;){var l=a.value;if(o.isInside(l.extent)){this.setTexture(n++,l,o.offsetToParent(l.extent));break}}}catch(t){s.e(t)}finally{s.f()}}}catch(t){i.e(t)}finally{i.f()}}}},{key:"dispose",value:function(t){t&&(this.layer.removeEventListener("visible-property-changed",this._handlerCBEvent),this.layer.removeEventListener("opacity-property-changed",this._handlerCBEvent),this._listeners={});var e,r=p(this.textures);try{for(r.s();!(e=r.n()).done;){var n=e.value;n.isTexture&&n.dispose()}}catch(t){r.e(t)}finally{r.f()}this.level=g,this.textures=[],this.offsetScales=[],this.material.layersNeedUpdate=!0}},{key:"setTexture",value:function(t,e,r){this.level=e&&0==t?e.extent.zoom:this.level,this.textures[t]=e||null,this.offsetScales[t]=r,this.material.layersNeedUpdate=!0}},{key:"setTextures",value:function(t,e){this.dispose(!1);for(var r=0,n=t.length;r2){for(var d=Math.floor(e.z*a),p=Math.floor(e.x*i),m=Math.floor(e.y*a),A=Math.max(Math.floor(u/32),2),g=m;gl&&(l=r.zmin),r.zmaxn&&r[i-1]>n&&r[Math.sqrt(i)-1]>n&&r[i-Math.sqrt(i)]>n)||function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return 0},r=arguments.length>2?arguments[2]:void 0,n=0,i=t.length;n{"use strict";r.d(e,{Z:()=>i});var n={FINAL:0,DEPTH:1,ID:2};const i={MODES:n,push:function(t,e){var r,i=null!==(r=t.mode)&&void 0!==r?r:n.FINAL;if(i==e)return function(){};var a=function(t){return function(e){var r=e.material;r&&(r.mode=t)}};return t.traverse(a(e)),function(){t.traverse(a(i))}}}},77567:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var n=new RegExp("gl_Position.*(?![^]*gl_Position)"),i=new RegExp("[^\\w]*main[^\\w]*(void)?[^\\w]*{");const a={patchMaterialForLogDepthSupport:function(t){if(!t.vertexShader.includes("USE_LOGDEPTHBUF")&&!t.vertexShader.includes("logdepthbuf_pars_vertex")){t.vertexShader="#include \n#define EPSILON 1e-6\n".concat(t.vertexShader);var e=n.exec(t.vertexShader),r=e[0].length+e.index;t.vertexShader="".concat(t.vertexShader.slice(0,r),"\n#include \n").concat(t.vertexShader.slice(r)),t.fragmentShader="#include \n").concat(t.fragmentShader.slice(r)),t.defines={USE_LOGDEPTHBUF:1,USE_LOGDEPTHBUF_EXT:1}}},unrollLoops:function(t,e){return t.replace(/#pragma unroll_loop\s+for\s*\(\s*int\s+i\s*=\s*([\w\d]+);\s*i\s+<\s+([\w\d]+);\s*i\s*\+\+\s*\)\s*\{\n([^}]*)\}/g,(function(t,r,n,i){var a="";r=r in e?e[r]:parseInt(r,10),n=n in e?e[n]:parseInt(n,10);for(var o=r;o{"use strict";r.d(e,{ZP:()=>O});var n=r(79340),i=r(82963),a=r(61120),o=r(43144),s=r(15671),l=r(99128),c=r(97400),u=r(99127),h=r(71077),f=r(70274),d=r(14278),p=r(49472),m=r(99477),A=r(3614),g=r.n(A),v=r(38929),y=r(94596),b=r(86896),x=r(60145);function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(e.in.layers[n].filter((function(t){return t.filterExpression.filter({zoom:a},r)&&a>=t.zoom.min&&a2&&void 0!==arguments[2]&&arguments[2],n=e.bindNewGeometry(),i=e.type===y.tg.POLYGON;r=r&&i,n.properties=t.properties;var a=t._pbf;a.pos=t._geometry;for(var o=a.readVarint()+a.pos,s=1,l=0,c=0,u=0,h=0,f=0;a.pos>3}if(l--,1===s||2===s){c+=a.readSVarint(),u+=a.readSVarint(),1===s&&(h&&(r&&f>0&&n.indices.length>0&&(e.updateExtent(n),(n=e.bindNewGeometry()).properties=t.properties),n.closeSubGeometry(h,e),n.getLastSubGeometry().ccw=f<0),h=0,f=0),h++;var p=C(c,u,t.tileNumbers,t.extent);n.pushCoordinatesValues(e,{x:c,y:u},p),1==h?(S.set(c,u),S.coordProj=p,M.set(c,u)):i&&h>1&&(f+=(M.x-c)*(M.y+u),M.set(c,u))}else{if(7!==s)throw new Error("unknown command ".concat(s));h&&(h++,n.pushCoordinatesValues(e,{x:S.x,y:S.y},S.coordProj),i&&(f+=(M.x-S.x)*(M.y+S.y)))}}h&&(r&&f>0&&n.indices.length>0&&(e.updateExtent(n),(n=e.bindNewGeometry()).properties=t.properties),n.closeSubGeometry(h,e),n.getLastSubGeometry().ccw=f<0),e.updateExtent(n)}(r,l))};for(h.s();!(u=h.n()).done;)f()}catch(t){h.e(t)}finally{h.f()}},c=o.length-1;c>=0;c--)l()})),s.removeEmptyFeature(),s.features.sort((function(t,e){return t.order-e.order})),s.updateExtent(),s.extent=t.extent,s.isInverted=e.in.isInverted,Promise.resolve(s)}}const I={parse:function(t,e){return e=(0,b._F)(e),Promise.resolve(T(t,e))}};var R=r(33347),B=r(1537),k=r(82150);var L=new Map([["image/x-bil;bits=32",R.Z.textureFloat],["geojson",R.Z.json],["application/json",R.Z.json],["application/kml",R.Z.xml],["application/gpx",R.Z.xml],["application/x-protobuf;type=mapbox-vector",R.Z.arrayBuffer],["application/gtx",R.Z.arrayBuffer],["application/isg",R.Z.text],["application/gdf",R.Z.text]]),P=new Map([["geojson",c.Z.parse],["application/json",c.Z.parse],["application/kml",u.Z.parse],["application/gpx",f.Z.parse],["application/x-protobuf;type=mapbox-vector",I.parse],["application/gtx",d.ZP.parse],["application/isg",p.Z.parse],["application/gdf",h.Z.parse]]),D={getByArray:function(){},setByArray:function(t){return t},clear:function(){}},U=0;const O=function(t){(0,n.Z)(u,t);var e,r,c=(e=u,r=function(){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(t){return!1}}(),function(){var t,n=(0,a.Z)(e);if(r){var o=(0,a.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,i.Z)(this,t)});function u(t){var e;if((0,s.Z)(this,u),(e=c.call(this,t)).isSource=!0,!t.url)throw new Error("New Source: url is required");return e.uid=U++,e.url=t.url,e.format=t.format,e.fetcher=t.fetcher||L.get(t.format)||R.Z.texture,e.parser=t.parser||P.get(t.format)||function(t){return t},e.isVectorSource=null!=(t.parser||P.get(t.format)),e.networkOptions=t.networkOptions||{crossOrigin:"anonymous"},e.attribution=t.attribution,e.whenReady=Promise.resolve(),e._featuresCaches={},t.extent&&!t.extent.isExtent?e.extent=new l.ZP(e.crs,t.extent):e.extent=t.extent,e}return(0,o.Z)(u,[{key:"handlingError",value:function(t){throw new Error(t)}},{key:"urlFromExtent",value:function(){throw new Error("In extended Source, you have to implement the method urlFromExtent!")}},{key:"requestToKey",value:function(t){return[t.zoom,t.row,t.col]}},{key:"loadData",value:function(t,e){var r=this,n=this._featuresCaches[e.crs],i=this.requestToKey(t),a=n.getByArray(i);return a||(a=n.setByArray(function(t,e){var r=t.urlFromExtent(e);return t.fetcher(r,t.networkOptions).then((function(t){return t.extent=e,t}),(function(e){return t.handlingError(e)}))}(this,t).then((function(t){return r.parser(t,{out:e,in:r})}),(function(t){return r.handlingError(t)})),i),this.onParsedFile&&a.then((function(t){return r.onParsedFile(t),console.warn("Source.onParsedFile was deprecated"),t}))),a}},{key:"onLayerAdded",value:function(t){this._featuresCaches[t.out.crs]||(this._featuresCaches[t.out.crs]=this.isVectorSource?new B.Z:D)}},{key:"onLayerRemoved",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._featuresCaches[t.unusedCrs];e&&(e.clear(),delete this._featuresCaches[t.unusedCrs])}},{key:"extentInsideLimit",value:function(){throw new Error("In extented Source, you have to implement the method extentInsideLimit!")}}]),u}((0,o.Z)((function t(e){(0,s.Z)(this,t),e.projection&&(console.warn("Source projection parameter is deprecated, use crs instead."),e.crs=e.crs||e.projection),e.crs&&k.Z.isValid(e.crs),this.crs=e.crs})))},4596:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>S});var n=r(15671),i=r(43144),a=r(79340),o=r(82963),s=r(61120),l=r(99477),c=r(36194),u=r(79295),h=r(49469),f=r(60145),d=r(16828),p=r(44996),m=r(36873);l.Object3D.DEFAULT_UP.set(0,0,1);var A=new l.Vector3,g=new f.Z("EPSG:4326",0,0,0),v=new d.Z,y=[],b=new p.Z,x=new l.Vector3;function w(t){return t-360*Math.floor((t+180)/360)}function _(t){return t.getLayers((function(t){return t.isTiledGeometryLayer}))[0]}var E=function(t){(0,a.Z)(p,t);var e,r,d=(e=p,r=function(){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(t){return!1}}(),function(){var t,n=(0,s.Z)(e);if(r){var i=(0,s.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,o.Z)(this,t)});function p(){var t;return(0,n.Z)(this,p),(t=d.call(this)).seaLevel=new l.Object3D,t.target=new l.Object3D,t.target.rotation.order="ZXY",t.camera=new l.Camera,t.add(t.seaLevel),t.seaLevel.add(t.target),t.target.add(t.camera),t.coord=new f.Z("EPSG:4978",0,0),t.targetWorldPosition=new l.Vector3,t.removeAll=function(){},t._onChangeCallback=null,t}return(0,i.Z)(p,[{key:"applyTransformToCamera",value:function(t,e){var r=this;this.proxy?(e.quaternion._onChange(this._onChangeCallback),this.camera.matrixWorld.decompose(this.proxy.position,e.quaternion,e.scale),e.quaternion._onChange((function(){return r.removeProxy(t,e)}))):this.camera.matrixWorld.decompose(e.position,e.quaternion,e.scale),t.dispatchEvent({type:m.b.CAMERA_MOVED,coord:this.coord,range:this.range,heading:this.heading,tilt:this.tilt})}},{key:"setProxy",value:function(t,e){var r=this;!this.proxy&&t&&e&&(this.proxy={position:new l.Vector3},Object.keys(e.position).forEach((function(n){return function(t,e,r,n){r.proxy.position[n]=e.position[n],Object.defineProperty(e.position,n,{get:function(){return r.proxy.position[n]},set:function(i){r.removeProxy(t,e),e.position[n]=i}})}(t,e,r,n)})),this._onChangeCallback=e.quaternion._onChangeCallback,e.quaternion._onChange((function(){return r.removeProxy(t,e)})))}},{key:"removeProxy",value:function(t,e){var r=this;this.stop(t),this.proxy&&t&&e&&(Object.keys(e.position).forEach((function(t){return Object.defineProperty(e.position,t,{value:r.proxy.position[t],writable:!0})})),e.quaternion._onChange(this._onChangeCallback),this.proxy=null)}},{key:"setTargetFromCoordinate",value:function(t,e){e.as(_(t).extent.crs,this.coord);var r=Math.max(0,u.Z.getElevationValueAt(_(t),this.coord,u.Z.PRECISE_READ_Z)||this.coord.z);this.coord.z=r,this.coord.as(t.referenceCrs).toVector3(A),"EPSG:4978"==t.referenceCrs?(this.lookAt(A),this.seaLevel.position.set(0,0,A.length()-r)):(this.position.set(A.x,A.y,0),this.seaLevel.position.set(0,0,0)),this.target.position.set(0,0,r)}},{key:"setFromPositions",value:function(t,e){this.setTargetFromCoordinate(t,new f.Z(t.referenceCrs,A)),this.target.rotation.set(0,0,0),this.updateMatrixWorld(!0),this.camera.position.copy(e),this.target.worldToLocal(this.camera.position);var r=this.camera.position.length();this.target.rotation.x=Math.asin(this.camera.position.z/r);var n=l.MathUtils.clamp(this.camera.position.y/(Math.cos(this.target.rotation.x)*r),-1,1);this.target.rotation.z=Math.sign(-this.camera.position.x||1)*Math.acos(n),this.camera.position.set(0,r,0)}},{key:"applyParams",value:function(t,e){e.coord&&this.setTargetFromCoordinate(t,e.coord),null!=e.tilt&&(this.target.rotation.x=l.MathUtils.degToRad(e.tilt)),null!=e.heading&&(this.target.rotation.z=l.MathUtils.degToRad(-w(e.heading+180))),e.range&&this.camera.position.set(0,e.range,0),this.camera.rotation.set(.5*-Math.PI,0,Math.PI),this.updateMatrixWorld(!0),this.targetWorldPosition.setFromMatrixPosition(this.seaLevel.matrixWorld)}},{key:"getParams",value:function(){return{coord:this.coord.clone(),tilt:this.tilt,heading:this.heading,range:this.range,targetWorldPosition:this.targetWorldPosition}}},{key:"setfromCamera",value:function(t,e,r){e.updateMatrixWorld(!0),null==r&&(r=t.getPickingPositionFromDepth()||function(t,e){var r=new l.Vector3(0,0,.5);if(r.unproject(e),r.sub(e.position).normalize(),"EPSG:4978"==t.referenceCrs)return v.intersection({direction:r,origin:e.position});var n=e.position.z/r.z;return r.multiplyScalar(n).add(e.position)}(t,e));var n=r&&!isNaN(r.x)?e.position.distanceTo(r):100;e.localToWorld(A.set(0,0,-n)),this.setFromPositions(t,e.position)}},{key:"copyObject3D",value:function(t){return this.copy(t,!1),this.seaLevel.copy(t.seaLevel,!1),this.target.copy(t.target,!1),this.camera.copy(t.camera),this}},{key:"animateCameraToLookAtTarget",value:function(t,e,r){var n=this;r.easing=r.easing||c.ZP.Easing.Quartic.InOut,this.setfromCamera(t,e);var i=new c.ZP.Group;this.start=(this.start||new p).copyObject3D(this),this.end=(this.end||new p).copyObject3D(this);var a,o,s=r.time||2500,u={t:0},f=[],d={promise:new Promise((function(t,e){a=t,o=e})),resolve:a,reject:o};this.addPlaceTargetOnGround(t,e,r.coord,u),this.end.applyParams(t,r);var m=this.end.target.rotation.z-this.start.target.rotation.z;return Math.abs(m)>Math.PI&&(this.end.target.rotation.z=this.start.target.rotation.z+m-2*Math.sign(m)*Math.PI),f.push(new c.ZP.Tween(u,i).to({t:1},s).easing(r.easing).onUpdate((function(e){"EPSG:4978"==t.referenceCrs&&n.quaternion.slerpQuaternions(n.start.quaternion,n.end.quaternion,e.t),n.camera.quaternion.slerpQuaternions(n.start.camera.quaternion,n.end.camera.quaternion,e.t),n.target.rotation.set(0,0,0),n.target.rotateZ(l.MathUtils.lerp(n.start.target.rotation.z,n.end.target.rotation.z,e.t)),n.target.rotateX(l.MathUtils.lerp(n.start.target.rotation.x,n.end.target.rotation.x,e.t))}))),"EPSG:4978"!=t.referenceCrs&&f.push(new c.ZP.Tween(this.position,i).to(this.end.position,s).easing(r.easing)),f.push(new c.ZP.Tween(this.seaLevel.position,i).to(this.end.seaLevel.position,s).easing(r.easing)),f.push(new c.ZP.Tween(this.camera.position,i).to(this.end.camera.position,s).easing(r.easing)),this.animationFrameRequester=function(){i.update(),n.updateMatrixWorld(!0),n.applyTransformToCamera(t,e),n.targetWorldPosition.setFromMatrixPosition(n.seaLevel.matrixWorld),r.callback&&r.callback(n),g.crs=t.referenceCrs,g.setFromVector3(n.targetWorldPosition).as(_(t).extent.crs,n.coord),t.notifyChange(e)},this.removeAll=function(e){this.removeAll=function(){},i.removeAll(),this.animationFrameRequester&&t.removeFrameRequester(h.Ao.BEFORE_RENDER,this.animationFrameRequester),d.resolve(void 0!==e),this.animationFrameRequester=null},f[f.length-1].onComplete(this.removeAll),f.forEach((function(t){return t.start()})),t.addFrameRequester(h.Ao.BEFORE_RENDER,this.animationFrameRequester),t.notifyChange(e),d}},{key:"stop",value:function(t){this.removePlaceTargetOnGround(t),this.removeAll()}},{key:"addPlaceTargetOnGround",value:function(t,e,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{t:1};if(this.removePlaceTargetOnGround(t),t&&e){var a=this.target.position.z;this.placeTargetOnGround=function(){var o=Math.max(0,u.Z.getElevationValueAt(_(t),r||n.coord,u.Z.PRECISE_READ_Z)||0);n.target.position.z=a*(1-i.t)+o*i.t,n.target.updateMatrixWorld(!0),n.applyTransformToCamera(t,e)},this.placeTargetOnGround(),t.addFrameRequester(h.Ao.BEFORE_RENDER,this.placeTargetOnGround)}}},{key:"removePlaceTargetOnGround",value:function(t){t&&this.placeTargetOnGround&&(t.removeFrameRequester(h.Ao.BEFORE_RENDER,this.placeTargetOnGround),this.placeTargetOnGround=null)}},{key:"tilt",get:function(){return l.MathUtils.radToDeg(this.target.rotation.x)}},{key:"heading",get:function(){return-w(l.MathUtils.radToDeg(this.target.rotation.z)+180)}},{key:"range",get:function(){return this.camera.position.y}}]),p}(l.Object3D);function M(t){return y[t.uuid]=y[t.uuid]||new E,y[t.uuid]}const S={defaultStopPlaceOnGroundAtEnd:!1,Easing:c.ZP.Easing,stop:function(t,e){M(e).stop(t)},getTransformCameraLookingAtTarget:function(t,e,r){var n=M(e);return n.setfromCamera(t,e,r),n.getParams()},transformCameraToLookAtTarget:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.isExtent&&(r=this.getCameraTransformOptionsFromExtent(t,e,r)),r.proxy=void 0===r.proxy||r.proxy;var n=M(e);return n.stop(t),n.setfromCamera(t,e),r.proxy&&n.setProxy(t,e),n.applyParams(t,r),n.addPlaceTargetOnGround(t,e,r.coord),n.applyTransformToCamera(t,e),t.notifyChange(e),Promise.resolve(n.getParams())},getCameraTransformOptionsFromExtent:function(t,e,r){var n,i={coord:new f.Z(r.crs,0,0,0),heading:0,tilt:t.isPlanarView?90:89.9};if(t.isGlobeView?(r=r.as("EPSG:4326"),b.setFromExtent(r),b.box3D.getSize(x),n={x:x.y,y:x.x}):n=(r=r.as(t.referenceCrs)).planarDimensions(),r.center(i.coord),e.isOrthographicCamera)n.x/n.y>e.aspect?e.zoom=(e.right-e.left)/n.x:e.zoom=(e.top-e.bottom)/n.y,e.updateProjectionMatrix(),i.range=1e3;else if(e.isPerspectiveCamera){var a=l.MathUtils.degToRad(e.fov);if(n.x/n.y>e.aspect){var o=.5*t.domElement.clientHeight/Math.tan(.5*a),s=2*Math.atan(.5*t.domElement.clientWidth/o);i.range=n.x/(2*Math.tan(.5*s))}else i.range=n.y/(2*Math.tan(.5*a))}return i},animateCameraToLookAtTarget:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.proxy=void 0===n.proxy||n.proxy;var i=M(e);return i.stop(t),n.proxy&&i.setProxy(t,e),i.animateCameraToLookAtTarget(t,e,n).promise.then((function(e){var a=void 0===n.stopPlaceOnGroundAtEnd?r.defaultStopPlaceOnGroundAtEnd:n.stopPlaceOnGroundAtEnd,o=i.getParams();return a&&i.stop(t),o.finished=e,o}))},sequenceAnimationsToLookAtTarget:function(t,e){var r=this;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[{}]).map((function(n){return function(){return r.animateCameraToLookAtTarget(t,e,n)}})).reduce((function(t,e){return t.then((function(t){return!t.length||t[t.length-1].finished?e().then(Array.prototype.concat.bind(t)):Promise.resolve([{finished:!1}])}))}),Promise.resolve([]))},getDiffParams:function(t,e){var r;if(t&&e)return Math.abs(t.range-e.range)/t.range>.001&&((r=r||{}).range={previous:t.range,new:e.range}),Math.abs(t.tilt-e.tilt)>.1&&((r=r||{}).tilt={previous:t.tilt,new:e.tilt}),Math.abs(t.heading-e.heading)>.1&&((r=r||{}).heading={previous:t.heading,new:e.heading}),(Math.abs(t.coord.x-e.coord.x)>1e-6||Math.abs(t.coord.y-e.coord.y)>1e-6)&&((r=r||{}).coord={previous:t.coord,new:e.coord}),r}}},79295:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l,P:()=>p});var n=r(70885),i=r(99477),a=r(60145),o={v:new i.Vector3,coord1:new a.Z("EPSG:4978"),coord2:new a.Z("EPSG:4978"),offset:new i.Vector2};function s(t,e,r,n,i,s){var c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},u=arguments.length>8?arguments[8]:void 0,h=(arguments.length>7?arguments[7]:void 0)||new a.Z(n);c.worldFromLocal?h.setFromVector3(o.v.copy(i).applyMatrix4(c.worldFromLocal)):h.setFromVector3(i);var f=l.getTerrainObjectAt(t,h,e,r,u);if(f)return f.coord.z+=s,f.coord.as(n,o.coord2).toVector3(i),c.localFromWorld&&i.applyMatrix4(c.localFromWorld),{id:f.texture.id,version:f.texture.version,tile:f.tile}}const l={getElevationValueAt:function(t,e){var r=v(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,e,(arguments.length>3?arguments[3]:void 0)||t.level0Nodes);if(r)return r.coord.z},getTerrainObjectAt:function(t,e){var r=arguments.length>4?arguments[4]:void 0;return v(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,e,(arguments.length>3?arguments[3]:void 0)||t.level0Nodes,r)},FAST_READ_Z:0,PRECISE_READ_Z:1,placeObjectOnGround:function(t,e,r){var n,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=arguments.length>4?arguments[4]:void 0;if(console.warn("placeObjectOnGround has been deprecated because it needs review and test"),n=c?c.concat(t.level0Nodes):t.level0Nodes,o.modifyGeometry){var u={worldFromLocal:r.matrixWorld,localFromWorld:(new i.Matrix4).copy(r.matrixWorld).invert()},h=r.geometry;if(h.vertices){o.cache&&(o.cache.length=h.vertices.length);for(var f=!0,d=new a.Z(e),p=0;p=0?e:void 0}}var u;function h(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a2&&void 0!==arguments[2]?arguments[2]:new i.Vector2;if(t.crs!=e.crs)throw new Error("Unsupported mix: ".concat(t.crs," and ").concat(e.crs));e.planarDimensions(g);var n=(t.x-e.west)/g.x,a=(e.north-t.y)/g.y;r.set(n,a)}(s,l.extent,A.offset),s.z=1==e?function(t,e,r,n,a){var o=n.x/a.x/16,s=Math.floor(r.x/o)*o,l=Math.floor(r.y/o)*o;1==s&&(s-=o),1==l&&(l-=o);var c=s,u=s+o,h=l,f=l+o,d=(r.x-s)/o,A=(r.y-l)/o,g=new i.Triangle(new i.Vector3(c,f),new i.Vector3(u,h),1==A||d/(1-A)>=1?new i.Vector3(u,f):new i.Vector3(c,h));g.getBarycoord(new i.Vector3(r.x,r.y),m);var v=t.attachedLayers.filter((function(t){return t.isElevationLayer}))[0],y=p(v,e,g.a.x,g.a.y),b=p(v,e,g.b.x,g.b.y),x=p(v,e,g.c.x,g.c.y);return y*m.x+b*m.y+x*m.z}(t,y,A.offset,d.extent.planarDimensions(),l.extent.planarDimensions()):function(t,e,r){return function(t,e,r,n){var i=f(e,r,n);return h(t,e,i.wu<=0?i.u1:i.u2,i.wv<=0?i.v1:i.v2)}(t.attachedLayers.filter((function(t){return t.isElevationLayer}))[0],e,r.x,r.y)}(t,y,A.offset),null!=s.z?{coord:s,texture:y,tile:d}:void 0}}},39683:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var n=r(94596);function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 o,s=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){l=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=-r&&y<=v+r&&Math.abs(g*o-A*s+f*h-d*u)/v<=r)return!0}return!1}function s(t,e,r,i,a,s,l){if(e==n.tg.LINE&&o(t,r,i,a,s,l))return!0;if(e==n.tg.POLYGON&&function(t,e,r,n,i,a){for(var s=t.x,l=t.y,c=!1,u=n,h=n+i-a;ul!=m>l&&s<(p-f)*(l-d)/(m-d)+f&&(c=!c)}return c}(t,r,i,a,s,l))return!0;if(e==n.tg.POINT){var c=function(t,e,r,n,i,a){for(var o,s=t.x,l=t.y,c=r*r,u=n;u2&&void 0!==arguments[2]?arguments[2]:.1,n=[];if(t.as(e.crs,c),c.applyMatrix4(e.matrixWorldInverse),e.extent.isPointInside(c,r))if(e.isFeatureCollection){r*=Math.sqrt(Math.pow(e.scale.x,2)+Math.pow(e.scale.y,2));var a,o=i(e.features);try{for(o.s();!(a=o.n()).done;){var s=a.value;s.extent&&!s.extent.isPointInside(c,r)||l(c,s,r,n)}}catch(t){o.e(t)}finally{o.f()}}else e.geometries&&l(c,e,r,n);return n}}},12306:(t,e,r)=>{"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}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 o,s=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){l=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw o}}}}(t);try{for(i.s();!(r=i.n()).done;)r.value.dispose()}catch(t){i.e(t)}finally{i.f()}}else t.dispose();for(var a=0;a=0;i--){var a=t.geometry.groups[i];a.materialIndex===r?(t.geometry.groups[i+1].count+=a.count,t.geometry.groups.splice(i,1)):(r=a.materialIndex,n.push(r))}for(var o=function(e){n.includes(e)||(t.geometry.groups.forEach((function(t){t.materialIndex>e&&(t.materialIndex-=1)})),t.material.splice(e,1))},s=t.material.length-1;s>=0;s--)o(s)}}r.d(e,{O:()=>a,Z:()=>i})},30633:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(11379);const i=new("function"==typeof r.g.TextDecoder?r.g.TextDecoder:n.k)("utf-8")},79742:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,a=s(t),o=a[0],l=a[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,o,l)),u=0,h=l>0?o-4:o;for(r=0;r>16&255,c[u++]=e>>8&255,c[u++]=255&e;return 2===l&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[u++]=255&e),1===l&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[u++]=e>>8&255,c[u++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,a=[],o=16383,s=0,c=n-i;sc?c:s+o));return 1===i?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,n){for(var i,a,o=[],s=e;s>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},48764:(t,e,r)=>{"use strict";var n=r(79742),i=r(80645),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.lW=l,e.h2=50;var o=2147483647;function s(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|m(t,e),n=s(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(G(t,Uint8Array)){var e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(G(t,ArrayBuffer)||t&&G(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(G(t,SharedArrayBuffer)||t&&G(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return l.from(n,e,r);var i=function(t){if(l.isBuffer(t)){var e=0|p(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||Z(t.length)?s(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return u(t),s(t<0?0:0|p(t))}function f(t){for(var e=t.length<0?0:0|p(t.length),r=s(e),n=0;n=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function m(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||G(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(t).length;default:if(i)return n?-1:F(t).length;e=(""+e).toLowerCase(),i=!0}}function A(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return T(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return M(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Z(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var u=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var h=!0,f=0;fi&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function M(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(a=t[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=h}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn.length?l.from(a).copy(n,i):Uint8Array.prototype.set.call(n,a,i);else{if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i)}i+=a.length}return n},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;er&&(t+=" ... "),""},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(t,e,r,n,i){if(G(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(e>>>=0),s=Math.min(a,o),c=this.slice(n,i),u=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return x(this,t,e,r);case"ascii":case"latin1":case"binary":return w(this,t,e,r);case"base64":return _(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function T(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,n,i,a){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function P(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(t,e,r,n,a){return e=+e,r>>>=0,a||P(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,a){return e=+e,r>>>=0,a||P(t,0,r,8),i.write(t,e,r,n,52,8),r+8}l.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||k(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||k(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||k(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||k(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||k(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||k(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||k(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||k(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},l.prototype.readInt8=function(t,e){return t>>>=0,e||k(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||k(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(t,e){t>>>=0,e||k(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return t>>>=0,e||k(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||k(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||k(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||k(t,8,this.length),i.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,n||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},l.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},l.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeFloatLE=function(t,e,r){return D(this,t,e,!0,r)},l.prototype.writeFloatBE=function(t,e,r){return D(this,t,e,!1,r)},l.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},l.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},l.prototype.copy=function(t,e,r,n){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(a=e;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function N(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(O,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function G(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Z(t){return t!=t}var V=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},28001:(t,e,r)=>{r(82526),r(41817),r(72443),r(92401),r(8722),r(32165),r(69007),r(16066),r(83510),r(41840),r(6982),r(32159),r(96649),r(39341),r(60543),r(21703),r(96647),r(9170),r(32120),r(52262),r(92222),r(50545),r(26541),r(43290),r(57327),r(69826),r(34553),r(67635),r(77287),r(84944),r(86535),r(89554),r(91038),r(26699),r(82772),r(79753),r(66992),r(69600),r(94986),r(21249),r(26572),r(57658),r(85827),r(96644),r(65069),r(47042),r(5212),r(2707),r(38706),r(40561),r(90476),r(76459),r(99892),r(33792),r(99244),r(30541),r(35581),r(18264),r(76938),r(39575),r(16716),r(43016),r(3843),r(81801),r(9550),r(28733),r(5735),r(96078),r(83710),r(62130),r(24812),r(4855),r(68309),r(35837),r(38862),r(73706),r(51532),r(99752),r(82376),r(73181),r(23484),r(2388),r(88621),r(60403),r(84755),r(25438),r(90332),r(40658),r(40197),r(44914),r(52420),r(60160),r(60970),r(10408),r(73689),r(9653),r(93299),r(35192),r(33161),r(44048),r(78285),r(44363),r(55994),r(61874),r(9494),r(31354),r(56977),r(55147),r(19601),r(78011),r(59595),r(33321),r(69070),r(35500),r(69720),r(43371),r(38559),r(38880),r(49337),r(36210),r(30489),r(46314),r(43304),r(41825),r(98410),r(72200),r(47941),r(94869),r(33952),r(57227),r(67987),r(60514),r(68304),r(41539),r(26833),r(54678),r(91058),r(88674),r(17922),r(34668),r(17727),r(36535),r(12419),r(69596),r(52586),r(74819),r(95683),r(39361),r(51037),r(5898),r(67556),r(14361),r(83593),r(39532),r(81299),r(24603),r(28450),r(74916),r(92087),r(88386),r(77601),r(39714),r(70189),r(24506),r(79841),r(27852),r(94953),r(32023),r(20787),r(78783),r(4723),r(76373),r(66528),r(83112),r(38992),r(82481),r(15306),r(68757),r(64765),r(23123),r(23157),r(83650),r(57442),r(73210),r(48702),r(55674),r(15218),r(74475),r(57929),r(50915),r(29253),r(42125),r(78830),r(58734),r(29254),r(37268),r(7397),r(60086),r(80623),r(44197),r(76495),r(87145),r(35109),r(65125),r(82472),r(49743),r(8255),r(29135),r(48675),r(92990),r(18927),r(33105),r(35035),r(74345),r(7174),r(63408),r(14590),r(32846),r(98145),r(44731),r(77209),r(96319),r(58867),r(37789),r(33739),r(95206),r(29368),r(14483),r(12056),r(3462),r(30678),r(27462),r(33824),r(55021),r(12974),r(1439),r(87585),r(15016),r(55315),r(78221),r(4129),r(38478),r(8628),r(16586),r(19258),r(69810),r(84811),r(34286),r(3048),r(77461),r(52550),r(1999),r(61886),r(59422),r(8e4),r(83475),r(46273),r(56882),r(78525),r(27004),r(3087),r(97391),r(23252),r(6461),r(32372),r(4763),r(66342),r(40787),r(1094),r(23647),r(68216),r(88449),r(31672),r(74326),r(15581),r(78631),r(48746),r(57640),r(25387),r(64211),r(12771),r(62962),r(71790),r(51568),r(26349),r(30800),r(48580),r(67427),r(32279),r(54537),r(13384),r(65743),r(2490),r(85567),r(18359),r(5332),r(79433),r(59849),r(59461),r(82499),r(34514),r(26877),r(64994),r(9924),r(64411),r(72608),r(41874),r(66043),r(23748),r(71501),r(60855),r(43847),r(38564),r(10072),r(23042),r(99137),r(71957),r(96306),r(103),r(8582),r(90618),r(74592),r(88440),r(58276),r(35082),r(12813),r(18222),r(24838),r(38563),r(50336),r(7512),r(74442),r(87713),r(46603),r(70100),r(10490),r(13187),r(60092),r(19041),r(30666),r(51638),r(62975),r(15728),r(46056),r(44299),r(5162),r(50292),r(29427),r(96936),r(99964),r(75238),r(4987),r(43565),r(1025),r(97314),r(96290),r(77479),r(5794),r(34582),r(47896),r(12647),r(98558),r(84018),r(97507),r(61605),r(49076),r(34999),r(88921),r(96248),r(27561),r(13599),r(11477),r(64362),r(15389),r(46006),r(3440),r(90401),r(66244),r(45164),r(89772),r(91238),r(88910),r(54837),r(87485),r(56767),r(69916),r(76651),r(61437),r(63252),r(35285),r(17454),r(39865),r(86035),r(50058),r(67501),r(85576),r(13728),r(27207),r(609),r(21568),r(44177),r(96431),r(53431),r(40050),r(54534),r(95090),r(34744),r(48824),r(44130),r(35954),r(16850),r(38012),r(26182),r(8922),r(37380),r(1118),r(5835),r(23767),r(8585),r(8970),r(84444),r(68696),r(78206),r(76478),r(79715),r(12714),r(5964),r(43561),r(32049),r(86020),r(56585),r(75505),r(27479),r(54747),r(33948),r(87714),r(82801),r(1174),r(84633),r(85844),r(71550),r(61295),r(32564),r(60285),r(7994),r(83753),r(41637),r(46229),r(17330),r(62062),r(98275),r(71842),r(40857)},81486:(t,e,r)=>{r(28001)},19662:(t,e,r)=>{var n=r(60614),i=r(66330),a=TypeError;t.exports=function(t){if(n(t))return t;throw a(i(t)+" is not a function")}},39483:(t,e,r)=>{var n=r(4411),i=r(66330),a=TypeError;t.exports=function(t){if(n(t))return t;throw a(i(t)+" is not a constructor")}},40027:(t,e,r)=>{var n=r(75706).has;t.exports=function(t){return n(t),t}},96077:(t,e,r)=>{var n=r(60614),i=String,a=TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw a("Can't set "+i(t)+" as a prototype")}},88999:(t,e,r)=>{var n=r(79405).has;t.exports=function(t){return n(t),t}},29257:(t,e,r)=>{var n=r(60953).has;t.exports=function(t){return n(t),t}},72682:(t,e,r)=>{var n=r(78818).has;t.exports=function(t){return n(t),t}},8557:(t,e,r)=>{var n=r(1702),i=r(49974),a=r(19670),o=r(68554),s=r(58173),l=r(5112),c=l("asyncDispose"),u=l("dispose"),h=n([].push),f=function(t,e,r){return i(r||function(t,e){return"async-dispose"==e&&s(t,c)||s(t,u)}(t,e),t)};t.exports=function(t,e,r,n){var i;if(n)i=f(void 0,r,n);else{if(o(e))return;i=f(a(e),r)}h(t.stack,i)}},51223:(t,e,r)=>{var n=r(5112),i=r(70030),a=r(3070).f,o=n("unscopables"),s=Array.prototype;null==s[o]&&a(s,o,{configurable:!0,value:i(null)}),t.exports=function(t){s[o][t]=!0}},31530:(t,e,r)=>{"use strict";var n=r(28710).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},25787:(t,e,r)=>{var n=r(47976),i=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw i("Incorrect invocation")}},19670:(t,e,r)=>{var n=r(70111),i=String,a=TypeError;t.exports=function(t){if(n(t))return t;throw a(i(t)+" is not an object")}},23013:t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},38321:(t,e,r)=>{var n=r(75668),i=r(84326),a=TypeError;t.exports=n(ArrayBuffer.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!=i(t))throw a("ArrayBuffer expected");return t.byteLength}},58199:(t,e,r)=>{var n=r(1702),i=r(38321),a=n(ArrayBuffer.prototype.slice);t.exports=function(t){if(0!==i(t))return!1;try{return a(t,0,0),!1}catch(t){return!0}}},7556:(t,e,r)=>{var n=r(47293);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},58846:(t,e,r)=>{var n=r(17854),i=r(1702),a=r(75668),o=r(57067),s=r(58199),l=r(38321),c=r(64124),u=n.TypeError,h=n.structuredClone,f=n.ArrayBuffer,d=n.DataView,p=Math.min,m=f.prototype,A=d.prototype,g=i(m.slice),v=a(m,"resizable","get"),y=a(m,"maxByteLength","get"),b=i(A.getInt8),x=i(A.setInt8);t.exports=c&&function(t,e,r){var n=l(t),i=void 0===e?n:o(e),a=!v||!v(t);if(s(t))throw u("ArrayBuffer is detached");var c=h(t,{transfer:[t]});if(n==i&&(r||a))return c;if(n>=i&&(!r||a))return g(c,0,i);for(var m=r&&!a&&y?{maxByteLength:y(c)}:void 0,A=new f(i,m),w=new d(c),_=new d(A),E=p(i,n),M=0;M{"use strict";var n,i,a,o=r(23013),s=r(19781),l=r(17854),c=r(60614),u=r(70111),h=r(92597),f=r(70648),d=r(66330),p=r(68880),m=r(98052),A=r(47045),g=r(47976),v=r(79518),y=r(27674),b=r(5112),x=r(69711),w=r(29909),_=w.enforce,E=w.get,M=l.Int8Array,S=M&&M.prototype,C=l.Uint8ClampedArray,T=C&&C.prototype,I=M&&v(M),R=S&&v(S),B=Object.prototype,k=l.TypeError,L=b("toStringTag"),P=x("TYPED_ARRAY_TAG"),D="TypedArrayConstructor",U=o&&!!y&&"Opera"!==f(l.opera),O=!1,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},N={BigInt64Array:8,BigUint64Array:8},z=function(t){var e=v(t);if(u(e)){var r=E(e);return r&&h(r,D)?r[D]:z(e)}},G=function(t){if(!u(t))return!1;var e=f(t);return h(F,e)||h(N,e)};for(n in F)(a=(i=l[n])&&i.prototype)?_(a)[D]=i:U=!1;for(n in N)(a=(i=l[n])&&i.prototype)&&(_(a)[D]=i);if((!U||!c(I)||I===Function.prototype)&&(I=function(){throw k("Incorrect invocation")},U))for(n in F)l[n]&&y(l[n],I);if((!U||!R||R===B)&&(R=I.prototype,U))for(n in F)l[n]&&y(l[n].prototype,R);if(U&&v(T)!==R&&y(T,R),s&&!h(R,L))for(n in O=!0,A(R,L,{configurable:!0,get:function(){return u(this)?this[P]:void 0}}),F)l[n]&&p(l[n],P,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:U,TYPED_ARRAY_TAG:O&&P,aTypedArray:function(t){if(G(t))return t;throw k("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!y||g(I,t)))return t;throw k(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,n){if(s){if(r)for(var i in F){var a=l[i];if(a&&h(a.prototype,t))try{delete a.prototype[t]}catch(r){try{a.prototype[t]=e}catch(t){}}}R[t]&&!r||m(R,t,r?e:U&&S[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,r){var n,i;if(s){if(y){if(r)for(n in F)if((i=l[n])&&h(i,t))try{delete i[t]}catch(t){}if(I[t]&&!r)return;try{return m(I,t,r?e:U&&I[t]||e)}catch(t){}}for(n in F)!(i=l[n])||i[t]&&!r||m(i,t,e)}},getTypedArrayConstructor:z,isView:function(t){if(!u(t))return!1;var e=f(t);return"DataView"===e||h(F,e)||h(N,e)},isTypedArray:G,TypedArray:I,TypedArrayPrototype:R}},13331:(t,e,r)=>{"use strict";var n=r(17854),i=r(1702),a=r(19781),o=r(23013),s=r(76530),l=r(68880),c=r(47045),u=r(89190),h=r(47293),f=r(25787),d=r(19303),p=r(17466),m=r(57067),A=r(11179),g=r(79518),v=r(27674),y=r(8006).f,b=r(21285),x=r(41589),w=r(58003),_=r(29909),E=s.PROPER,M=s.CONFIGURABLE,S="ArrayBuffer",C="DataView",T="prototype",I="Wrong index",R=_.getterFor(S),B=_.getterFor(C),k=_.set,L=n[S],P=L,D=P&&P[T],U=n[C],O=U&&U[T],F=Object.prototype,N=n.Array,z=n.RangeError,G=i(b),Z=i([].reverse),V=A.pack,Q=A.unpack,j=function(t){return[255&t]},W=function(t){return[255&t,t>>8&255]},H=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},X=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},q=function(t){return V(t,23,4)},Y=function(t){return V(t,52,8)},J=function(t,e,r){c(t[T],e,{configurable:!0,get:function(){return r(this)[e]}})},K=function(t,e,r,n){var i=m(r),a=B(t);if(i+e>a.byteLength)throw z(I);var o=a.bytes,s=i+a.byteOffset,l=x(o,s,s+e);return n?l:Z(l)},$=function(t,e,r,n,i,a){var o=m(r),s=B(t);if(o+e>s.byteLength)throw z(I);for(var l=s.bytes,c=o+s.byteOffset,u=n(+i),h=0;hnt;)(et=rt[nt++])in P||l(P,et,L[et]);D.constructor=P}v&&g(O)!==F&&v(O,F);var it=new U(new P(2)),at=i(O.setInt8);it.setInt8(0,2147483648),it.setInt8(1,2147483649),!it.getInt8(0)&&it.getInt8(1)||u(O,{setInt8:function(t,e){at(this,t,e<<24>>24)},setUint8:function(t,e){at(this,t,e<<24>>24)}},{unsafe:!0})}else D=(P=function(t){f(this,D);var e=m(t);k(this,{type:S,bytes:G(N(e),0),byteLength:e}),a||(this.byteLength=e,this.detached=!1)})[T],O=(U=function(t,e,r){f(this,O),f(t,D);var n=R(t),i=n.byteLength,o=d(e);if(o<0||o>i)throw z("Wrong offset");if(o+(r=void 0===r?i-o:p(r))>i)throw z("Wrong length");k(this,{type:C,buffer:t,byteLength:r,byteOffset:o,bytes:n.bytes}),a||(this.buffer=t,this.byteLength=r,this.byteOffset=o)})[T],a&&(J(P,"byteLength",R),J(U,"buffer",B),J(U,"byteLength",B),J(U,"byteOffset",B)),u(O,{getInt8:function(t){return K(this,1,t)[0]<<24>>24},getUint8:function(t){return K(this,1,t)[0]},getInt16:function(t){var e=K(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=K(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return X(K(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return X(K(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return Q(K(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return Q(K(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){$(this,1,t,j,e)},setUint8:function(t,e){$(this,1,t,j,e)},setInt16:function(t,e){$(this,2,t,W,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){$(this,2,t,W,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){$(this,4,t,H,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){$(this,4,t,H,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){$(this,4,t,q,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){$(this,8,t,Y,e,arguments.length>2?arguments[2]:void 0)}});w(P,S),w(U,C),t.exports={ArrayBuffer:P,DataView:U}},1048:(t,e,r)=>{"use strict";var n=r(47908),i=r(51400),a=r(26244),o=r(85117),s=Math.min;t.exports=[].copyWithin||function(t,e){var r=n(this),l=a(r),c=i(t,l),u=i(e,l),h=arguments.length>2?arguments[2]:void 0,f=s((void 0===h?l:i(h,l))-u,l-c),d=1;for(u0;)u in r?r[c]=r[u]:o(r,c),c+=d,u+=d;return r}},21285:(t,e,r)=>{"use strict";var n=r(47908),i=r(51400),a=r(26244);t.exports=function(t){for(var e=n(this),r=a(e),o=arguments.length,s=i(o>1?arguments[1]:void 0,r),l=o>2?arguments[2]:void 0,c=void 0===l?r:i(l,r);c>s;)e[s++]=t;return e}},18533:(t,e,r)=>{"use strict";var n=r(42092).forEach,i=r(9341)("forEach");t.exports=i?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},33253:(t,e,r)=>{"use strict";var n=r(49974),i=r(1702),a=r(47908),o=r(4411),s=r(54777),l=r(18554),c=r(24942),u=r(71246),h=r(58173),f=r(98770),d=r(35005),p=r(5112),m=r(28091),A=r(12269).toArray,g=p("asyncIterator"),v=i(f("Array").values),y=i(v([]).next),b=function(){return new x(this)},x=function(t){this.iterator=v(t)};x.prototype.next=function(){return y(this.iterator)},t.exports=function(t){var e=this,r=arguments.length,i=r>1?arguments[1]:void 0,f=r>2?arguments[2]:void 0;return new(d("Promise"))((function(r){var d=a(t);void 0!==i&&(i=n(i,f));var p=h(d,g),v=p?void 0:u(d)||b,y=o(e)?new e:[],x=p?s(d,p):new m(c(l(d,v)));r(A(x,i,y))}))}},97745:(t,e,r)=>{var n=r(26244);t.exports=function(t,e){for(var r=0,i=n(e),a=new t(i);i>r;)a[r]=e[r++];return a}},48457:(t,e,r)=>{"use strict";var n=r(49974),i=r(46916),a=r(47908),o=r(53411),s=r(97659),l=r(4411),c=r(26244),u=r(86135),h=r(18554),f=r(71246),d=Array;t.exports=function(t){var e=a(t),r=l(this),p=arguments.length,m=p>1?arguments[1]:void 0,A=void 0!==m;A&&(m=n(m,p>2?arguments[2]:void 0));var g,v,y,b,x,w,_=f(e),E=0;if(!_||this===d&&s(_))for(g=c(e),v=r?new this(g):d(g);g>E;E++)w=A?m(e[E],E):e[E],u(v,E,w);else for(x=(b=h(e,_)).next,v=r?new this:[];!(y=i(x,b)).done;E++)w=A?o(b,m,[y.value,E],!0):y.value,u(v,E,w);return v.length=E,v}},59921:(t,e,r)=>{"use strict";var n=r(49974),i=r(1702),a=r(68361),o=r(47908),s=r(26244),l=r(75706),c=l.Map,u=l.get,h=l.has,f=l.set,d=i([].push);t.exports=function(t){for(var e,r,i=o(this),l=a(i),p=n(t,arguments.length>1?arguments[1]:void 0),m=new c,A=s(l),g=0;A>g;g++)e=p(r=l[g],g,i),h(m,e)?d(u(m,e),r):f(m,e,[r]);return m}},21191:(t,e,r)=>{var n=r(49974),i=r(1702),a=r(68361),o=r(47908),s=r(34948),l=r(26244),c=r(70030),u=r(97745),h=Array,f=i([].push);t.exports=function(t,e,r,i){for(var d,p,m,A=o(t),g=a(A),v=n(e,r),y=c(null),b=l(g),x=0;b>x;x++)m=g[x],(p=s(v(m,x,A)))in y?f(y[p],m):y[p]=[m];if(i&&(d=i(A))!==h)for(p in y)y[p]=u(d,y[p]);return y}},41318:(t,e,r)=>{var n=r(45656),i=r(51400),a=r(26244),o=function(t){return function(e,r,o){var s,l=n(e),c=a(l),u=i(o,c);if(t&&r!=r){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===r)return t||u||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},9671:(t,e,r)=>{var n=r(49974),i=r(68361),a=r(47908),o=r(26244),s=function(t){var e=1==t;return function(r,s,l){for(var c,u=a(r),h=i(u),f=n(s,l),d=o(h);d-- >0;)if(f(c=h[d],d,u))switch(t){case 0:return c;case 1:return d}return e?-1:void 0}};t.exports={findLast:s(0),findLastIndex:s(1)}},42092:(t,e,r)=>{var n=r(49974),i=r(1702),a=r(68361),o=r(47908),s=r(26244),l=r(65417),c=i([].push),u=function(t){var e=1==t,r=2==t,i=3==t,u=4==t,h=6==t,f=7==t,d=5==t||h;return function(p,m,A,g){for(var v,y,b=o(p),x=a(b),w=n(m,A),_=s(x),E=0,M=g||l,S=e?M(p,_):r||f?M(p,0):void 0;_>E;E++)if((d||E in x)&&(y=w(v=x[E],E,b),t))if(e)S[E]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return E;case 2:c(S,v)}else switch(t){case 4:return!1;case 7:c(S,v)}return h?-1:i||u?u:S}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},86583:(t,e,r)=>{"use strict";var n=r(22104),i=r(45656),a=r(19303),o=r(26244),s=r(9341),l=Math.min,c=[].lastIndexOf,u=!!c&&1/[1].lastIndexOf(1,-0)<0,h=s("lastIndexOf"),f=u||!h;t.exports=f?function(t){if(u)return n(c,this,arguments)||0;var e=i(this),r=o(e),s=r-1;for(arguments.length>1&&(s=l(s,a(arguments[1]))),s<0&&(s=r+s);s>=0;s--)if(s in e&&e[s]===t)return s||0;return-1}:c},81194:(t,e,r)=>{var n=r(47293),i=r(5112),a=r(7392),o=i("species");t.exports=function(t){return a>=51||!n((function(){var e=[];return(e.constructor={})[o]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:(t,e,r)=>{"use strict";var n=r(47293);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){return 1},1)}))}},53671:(t,e,r)=>{var n=r(19662),i=r(47908),a=r(68361),o=r(26244),s=TypeError,l=function(t){return function(e,r,l,c){n(r);var u=i(e),h=a(u),f=o(u),d=t?f-1:0,p=t?-1:1;if(l<2)for(;;){if(d in h){c=h[d],d+=p;break}if(d+=p,t?d<0:f<=d)throw s("Reduce of empty array with no initial value")}for(;t?d>=0:f>d;d+=p)d in h&&(c=r(c,h[d],d,u));return c}};t.exports={left:l(!1),right:l(!0)}},83658:(t,e,r)=>{"use strict";var n=r(19781),i=r(43157),a=TypeError,o=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(i(t)&&!o(t,"length").writable)throw a("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},41589:(t,e,r)=>{var n=r(51400),i=r(26244),a=r(86135),o=Array,s=Math.max;t.exports=function(t,e,r){for(var l=i(t),c=n(e,l),u=n(void 0===r?l:r,l),h=o(s(u-c,0)),f=0;c{var n=r(1702);t.exports=n([].slice)},94362:(t,e,r)=>{var n=r(41589),i=Math.floor,a=function(t,e){var r=t.length,l=i(r/2);return r<8?o(t,e):s(t,a(n(t,0,l),e),a(n(t,l),e),e)},o=function(t,e){for(var r,n,i=t.length,a=1;a0;)t[n]=t[--n];n!==a++&&(t[n]=r)}return t},s=function(t,e,r,n){for(var i=e.length,a=r.length,o=0,s=0;o{var n=r(43157),i=r(4411),a=r(70111),o=r(5112)("species"),s=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,(i(e)&&(e===s||n(e.prototype))||a(e)&&null===(e=e[o]))&&(e=void 0)),void 0===e?s:e}},65417:(t,e,r)=>{var n=r(77475);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},21843:(t,e,r)=>{var n=r(26244);t.exports=function(t,e){for(var r=n(t),i=new e(r),a=0;a{"use strict";var n=r(1702),i=r(19662),a=r(68554),o=r(26244),s=r(47908),l=r(75706),c=r(14995),u=l.Map,h=l.has,f=l.set,d=n([].push);t.exports=function(t){var e,r,n,l=s(this),p=o(l),m=[],A=new u,g=a(t)?function(t){return t}:i(t);for(e=0;e{var n=r(26244),i=r(19303),a=RangeError;t.exports=function(t,e,r,o){var s=n(t),l=i(r),c=l<0?s+l:l;if(c>=s||c<0)throw a("Incorrect index");for(var u=new e(s),h=0;h{"use strict";var n=r(46916),i=r(19670),a=r(70030),o=r(58173),s=r(89190),l=r(29909),c=r(35005),u=r(66462),h=r(76178),f=c("Promise"),d="AsyncFromSyncIterator",p=l.set,m=l.getterFor(d),A=function(t,e,r){var n=t.done;f.resolve(t.value).then((function(t){e(h(t,n))}),r)},g=function(t){t.type=d,p(this,t)};g.prototype=s(a(u),{next:function(){var t=m(this);return new f((function(e,r){var a=i(n(t.next,t.iterator));A(a,e,r)}))},return:function(){var t=m(this).iterator;return new f((function(e,r){var a=o(t,"return");if(void 0===a)return e(h(void 0,!0));var s=i(n(a,t));A(s,e,r)}))}}),t.exports=g},21753:(t,e,r)=>{var n=r(46916),i=r(35005),a=r(58173);t.exports=function(t,e,r,o){try{var s=a(t,"return");if(s)return i("Promise").resolve(n(s,t)).then((function(){e(r)}),(function(t){o(t)}))}catch(t){return o(t)}e(r)}},45348:(t,e,r)=>{"use strict";var n=r(46916),i=r(12534),a=r(19670),o=r(70030),s=r(68880),l=r(89190),c=r(5112),u=r(29909),h=r(35005),f=r(58173),d=r(66462),p=r(76178),m=r(99212),A=h("Promise"),g=c("toStringTag"),v="AsyncIteratorHelper",y="WrapForValidAsyncIterator",b=u.set,x=function(t){var e=!t,r=u.getterFor(t?y:v),s=function(t){var n=i((function(){return r(t)})),a=n.error,o=n.value;return a||e&&o.done?{exit:!0,value:a?A.reject(o):A.resolve(p(void 0,!0))}:{exit:!1,value:o}};return l(o(d),{next:function(){var t=s(this),e=t.value;if(t.exit)return e;var r=i((function(){return a(e.nextHandler(A))})),n=r.error,o=r.value;return n&&(e.done=!0),n?A.reject(o):A.resolve(o)},return:function(){var e=s(this),r=e.value;if(e.exit)return r;r.done=!0;var o,l,c=r.iterator,u=i((function(){if(r.inner)try{m(r.inner.iterator,"normal")}catch(t){return m(c,"throw",t)}return f(c,"return")}));return o=l=u.value,u.error?A.reject(l):void 0===o?A.resolve(p(void 0,!0)):(l=(u=i((function(){return n(o,c)}))).value,u.error?A.reject(l):t?A.resolve(l):A.resolve(l).then((function(t){return a(t),p(void 0,!0)})))}})},w=x(!0),_=x(!1);s(_,g,"Async Iterator Helper"),t.exports=function(t,e){var r=function(r,n){n?(n.iterator=r.iterator,n.next=r.next):n=r,n.type=e?y:v,n.nextHandler=t,n.counter=0,n.done=!1,b(this,n)};return r.prototype=e?w:_,r}},47520:(t,e,r)=>{"use strict";var n=r(46916),i=r(13232),a=function(t,e){return[e,t]};t.exports=function(){return n(i,this,a)}},12269:(t,e,r)=>{"use strict";var n=r(46916),i=r(19662),a=r(19670),o=r(70111),s=r(7207),l=r(35005),c=r(24942),u=r(21753),h=function(t){var e=0==t,r=1==t,h=2==t,f=3==t;return function(t,d,p){a(t);var m=void 0!==d;!m&&e||i(d);var A=c(t),g=l("Promise"),v=A.iterator,y=A.next,b=0;return new g((function(t,i){var l=function(t){u(v,i,t,i)},c=function(){try{if(m)try{s(b)}catch(t){l(t)}g.resolve(a(n(y,v))).then((function(n){try{if(a(n).done)e?(p.length=b,t(p)):t(!f&&(h||void 0));else{var s=n.value;try{if(m){var A=d(s,b),y=function(n){if(r)c();else if(h)n?c():u(v,t,!1,i);else if(e)try{p[b++]=n,c()}catch(t){l(t)}else n?u(v,t,f||s,i):c()};o(A)?g.resolve(A).then(y,l):y(A)}else p[b++]=s,c()}catch(t){l(t)}}}catch(t){i(t)}}),i)}catch(t){i(t)}};c()}))}};t.exports={toArray:h(0),forEach:h(1),every:h(2),some:h(3),find:h(4)}},13232:(t,e,r)=>{"use strict";var n=r(46916),i=r(19662),a=r(19670),o=r(70111),s=r(24942),l=r(45348),c=r(76178),u=r(21753),h=l((function(t){var e=this,r=e.iterator,i=e.mapper;return new t((function(s,l){var h=function(t){e.done=!0,l(t)},f=function(t){u(r,h,t,h)};t.resolve(a(n(e.next,r))).then((function(r){try{if(a(r).done)e.done=!0,s(c(void 0,!0));else{var n=r.value;try{var l=i(n,e.counter++),u=function(t){s(c(t,!1))};o(l)?t.resolve(l).then(u,f):u(l)}catch(t){f(t)}}}catch(t){h(t)}}),h)}))}));t.exports=function(t){return a(this),i(t),new h(s(this),{mapper:t})}},66462:(t,e,r)=>{var n,i,a=r(17854),o=r(5465),s=r(60614),l=r(70030),c=r(79518),u=r(98052),h=r(5112),f=r(31913),d="USE_FUNCTION_CONSTRUCTOR",p=h("asyncIterator"),m=a.AsyncIterator,A=o.AsyncIteratorPrototype;if(A)n=A;else if(s(m))n=m.prototype;else if(o[d]||a[d])try{i=c(c(c(Function("return async function*(){}()")()))),c(i)===Object.prototype&&(n=i)}catch(t){}n?f&&(n=l(n)):n={},s(n[p])||u(n,p,(function(){return this})),t.exports=n},86221:(t,e,r)=>{var n=r(46916),i=r(45348);t.exports=i((function(){return n(this.next,this.iterator)}),!0)},14170:t=>{for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r={},n=0;n<66;n++)r[e.charAt(n)]=n;t.exports={itoc:e,ctoi:r}},53411:(t,e,r)=>{var n=r(19670),i=r(99212);t.exports=function(t,e,r,a){try{return a?e(n(r)[0],r[1]):e(r)}catch(e){i(t,"throw",e)}}},17072:(t,e,r)=>{var n=r(5112)("iterator"),i=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){i=!0}};o[n]=function(){return this},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var r=!1;try{var a={};a[n]=function(){return{next:function(){return{done:r=!0}}}},t(a)}catch(t){}return r}},84326:(t,e,r)=>{var n=r(1702),i=n({}.toString),a=n("".slice);t.exports=function(t){return a(i(t),8,-1)}},70648:(t,e,r)=>{var n=r(51694),i=r(60614),a=r(84326),o=r(5112)("toStringTag"),s=Object,l="Arguments"==a(function(){return arguments}());t.exports=n?a:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=s(t),o))?r:l?a(e):"Object"==(n=a(e))&&i(e.callee)?"Arguments":n}},27296:(t,e,r)=>{"use strict";var n=r(49974),i=r(46916),a=r(19662),o=r(39483),s=r(68554),l=r(20408),c=[].push;t.exports=function(t){var e,r,u,h,f=arguments.length,d=f>1?arguments[1]:void 0;return o(this),(e=void 0!==d)&&a(d),s(t)?new this:(r=[],e?(u=0,h=n(d,f>2?arguments[2]:void 0),l(t,(function(t){i(c,r,h(t,u++))}))):l(t,c,{that:r}),new this(r))}},82044:(t,e,r)=>{"use strict";var n=r(50206);t.exports=function(){return new this(n(arguments))}},95631:(t,e,r)=>{"use strict";var n=r(70030),i=r(47045),a=r(89190),o=r(49974),s=r(25787),l=r(68554),c=r(20408),u=r(51656),h=r(76178),f=r(96340),d=r(19781),p=r(62423).fastKey,m=r(29909),A=m.set,g=m.getterFor;t.exports={getConstructor:function(t,e,r,u){var h=t((function(t,i){s(t,f),A(t,{type:e,index:n(null),first:void 0,last:void 0,size:0}),d||(t.size=0),l(i)||c(i,t[u],{that:t,AS_ENTRIES:r})})),f=h.prototype,m=g(e),v=function(t,e,r){var n,i,a=m(t),o=y(t,e);return o?o.value=r:(a.last=o={index:i=p(e,!0),key:e,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=o),n&&(n.next=o),d?a.size++:t.size++,"F"!==i&&(a.index[i]=o)),t},y=function(t,e){var r,n=m(t),i=p(e);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==e)return r};return a(f,{clear:function(){for(var t=m(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,d?t.size=0:this.size=0},delete:function(t){var e=this,r=m(e),n=y(e,t);if(n){var i=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=i),i&&(i.previous=a),r.first==n&&(r.first=i),r.last==n&&(r.last=a),d?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=m(this),n=o(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!y(this,t)}}),a(f,r?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return v(this,0===t?0:t,e)}}:{add:function(t){return v(this,t=0===t?0:t,t)}}),d&&i(f,"size",{configurable:!0,get:function(){return m(this).size}}),h},setStrong:function(t,e,r){var n=e+" Iterator",i=g(e),a=g(n);u(t,e,(function(t,e){A(this,{type:n,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=a(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?h("keys"==e?r.key:"values"==e?r.value:[r.key,r.value],!1):(t.target=void 0,h(void 0,!0))}),r?"entries":"values",!r,!0),f(e)}}},29320:(t,e,r)=>{"use strict";var n=r(1702),i=r(89190),a=r(62423).getWeakData,o=r(25787),s=r(19670),l=r(68554),c=r(70111),u=r(20408),h=r(42092),f=r(92597),d=r(29909),p=d.set,m=d.getterFor,A=h.find,g=h.findIndex,v=n([].splice),y=0,b=function(t){return t.frozen||(t.frozen=new x)},x=function(){this.entries=[]},w=function(t,e){return A(t.entries,(function(t){return t[0]===e}))};x.prototype={get:function(t){var e=w(this,t);if(e)return e[1]},has:function(t){return!!w(this,t)},set:function(t,e){var r=w(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=g(this.entries,(function(e){return e[0]===t}));return~e&&v(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,r,n){var h=t((function(t,i){o(t,d),p(t,{type:e,id:y++,frozen:void 0}),l(i)||u(i,t[n],{that:t,AS_ENTRIES:r})})),d=h.prototype,A=m(e),g=function(t,e,r){var n=A(t),i=a(s(e),!0);return!0===i?b(n).set(e,r):i[n.id]=r,t};return i(d,{delete:function(t){var e=A(this);if(!c(t))return!1;var r=a(t);return!0===r?b(e).delete(t):r&&f(r,e.id)&&delete r[e.id]},has:function(t){var e=A(this);if(!c(t))return!1;var r=a(t);return!0===r?b(e).has(t):r&&f(r,e.id)}}),i(d,r?{get:function(t){var e=A(this);if(c(t)){var r=a(t);return!0===r?b(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return g(this,t,e)}}:{add:function(t){return g(this,t,!0)}}),h}}},77710:(t,e,r)=>{"use strict";var n=r(82109),i=r(17854),a=r(1702),o=r(54705),s=r(98052),l=r(62423),c=r(20408),u=r(25787),h=r(60614),f=r(68554),d=r(70111),p=r(47293),m=r(17072),A=r(58003),g=r(79587);t.exports=function(t,e,r){var v=-1!==t.indexOf("Map"),y=-1!==t.indexOf("Weak"),b=v?"set":"add",x=i[t],w=x&&x.prototype,_=x,E={},M=function(t){var e=a(w[t]);s(w,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(y&&!d(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return y&&!d(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!d(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(o(t,!h(x)||!(y||w.forEach&&!p((function(){(new x).entries().next()})))))_=r.getConstructor(e,t,v,b),l.enable();else if(o(t,!0)){var S=new _,C=S[b](y?{}:-0,1)!=S,T=p((function(){S.has(1)})),I=m((function(t){new x(t)})),R=!y&&p((function(){for(var t=new x,e=5;e--;)t[b](e,e);return!t.has(-0)}));I||((_=e((function(t,e){u(t,w);var r=g(new x,t,_);return f(e)||c(e,r[b],{that:r,AS_ENTRIES:v}),r}))).prototype=w,w.constructor=_),(T||R)&&(M("delete"),M("has"),v&&M("get")),(R||C)&&M(b),y&&w.clear&&delete w.clear}return E[t]=_,n({global:!0,constructor:!0,forced:_!=x},E),A(_,t),y||r.setStrong(_,t,v),_}},10313:(t,e,r)=>{r(51532),r(4129);var n=r(35005),i=r(70030),a=r(70111),o=Object,s=TypeError,l=n("Map"),c=n("WeakMap"),u=function(){this.object=null,this.symbol=null,this.primitives=null,this.objectsByIndex=i(null)};u.prototype.get=function(t,e){return this[t]||(this[t]=e())},u.prototype.next=function(t,e,r){var n=r?this.objectsByIndex[t]||(this.objectsByIndex[t]=new c):this.primitives||(this.primitives=new l),i=n.get(e);return i||n.set(e,i=new u),i};var h=new u;t.exports=function(){var t,e,r=h,n=arguments.length;for(t=0;t{var n=r(92597),i=r(53887),a=r(31236),o=r(3070);t.exports=function(t,e,r){for(var s=i(e),l=o.f,c=a.f,u=0;u{var n=r(5112)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},49920:(t,e,r)=>{var n=r(47293);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},14230:(t,e,r)=>{var n=r(1702),i=r(84488),a=r(41340),o=/"/g,s=n("".replace);t.exports=function(t,e,r,n){var l=a(i(t)),c="<"+e;return""!==r&&(c+=" "+r+'="'+s(a(n),o,""")+'"'),c+">"+l+""}},76178:t=>{t.exports=function(t,e){return{value:t,done:e}}},68880:(t,e,r)=>{var n=r(19781),i=r(3070),a=r(79114);t.exports=n?function(t,e,r){return i.f(t,e,a(1,r))}:function(t,e,r){return t[e]=r,t}},79114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},86135:(t,e,r)=>{"use strict";var n=r(34948),i=r(3070),a=r(79114);t.exports=function(t,e,r){var o=n(e);o in t?i.f(t,o,a(0,r)):t[o]=r}},85573:(t,e,r)=>{"use strict";var n=r(1702),i=r(47293),a=r(76650).start,o=RangeError,s=isFinite,l=Math.abs,c=Date.prototype,u=c.toISOString,h=n(c.getTime),f=n(c.getUTCDate),d=n(c.getUTCFullYear),p=n(c.getUTCHours),m=n(c.getUTCMilliseconds),A=n(c.getUTCMinutes),g=n(c.getUTCMonth),v=n(c.getUTCSeconds);t.exports=i((function(){return"0385-07-25T07:06:39.999Z"!=u.call(new Date(-50000000000001))}))||!i((function(){u.call(new Date(NaN))}))?function(){if(!s(h(this)))throw o("Invalid time value");var t=this,e=d(t),r=m(t),n=e<0?"-":e>9999?"+":"";return n+a(l(e),n?6:4,0)+"-"+a(g(t)+1,2,0)+"-"+a(f(t),2,0)+"T"+a(p(t),2,0)+":"+a(A(t),2,0)+":"+a(v(t),2,0)+"."+a(r,3,0)+"Z"}:u},38709:(t,e,r)=>{"use strict";var n=r(19670),i=r(92140),a=TypeError;t.exports=function(t){if(n(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw a("Incorrect hint");return i(this,t)}},47045:(t,e,r)=>{var n=r(56339),i=r(3070);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},98052:(t,e,r)=>{var n=r(60614),i=r(3070),a=r(56339),o=r(13072);t.exports=function(t,e,r,s){s||(s={});var l=s.enumerable,c=void 0!==s.name?s.name:e;if(n(r)&&a(r,c,s),s.global)l?t[e]=r:o(e,r);else{try{s.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},89190:(t,e,r)=>{var n=r(98052);t.exports=function(t,e,r){for(var i in e)n(t,i,e[i],r);return t}},13072:(t,e,r)=>{var n=r(17854),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},85117:(t,e,r)=>{"use strict";var n=r(66330),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw i("Cannot delete property "+n(e)+" of "+n(t))}},19781:(t,e,r)=>{var n=r(47293);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:t=>{var e="object"==typeof document&&document.all,r=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:r}},80317:(t,e,r)=>{var n=r(17854),i=r(70111),a=n.document,o=i(a)&&i(a.createElement);t.exports=function(t){return o?a.createElement(t):{}}},7207:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},93678:t=>{t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},48324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},98509:(t,e,r)=>{var n=r(80317)("span").classList,i=n&&n.constructor&&n.constructor.prototype;t.exports=i===Object.prototype?void 0:i},68886:(t,e,r)=>{var n=r(88113).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},7871:(t,e,r)=>{var n=r(83823),i=r(35268);t.exports=!n&&!i&&"object"==typeof window&&"object"==typeof document},89363:t=>{t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},83823:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},30256:(t,e,r)=>{var n=r(88113);t.exports=/MSIE|Trident/.test(n)},71528:(t,e,r)=>{var n=r(88113);t.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},6833:(t,e,r)=>{var n=r(88113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},35268:(t,e,r)=>{var n=r(84326);t.exports="undefined"!=typeof process&&"process"==n(process)},71036:(t,e,r)=>{var n=r(88113);t.exports=/web0s(?!.*chrome)/i.test(n)},88113:t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7392:(t,e,r)=>{var n,i,a=r(17854),o=r(88113),s=a.process,l=a.Deno,c=s&&s.versions||l&&l.version,u=c&&c.v8;u&&(i=(n=u.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(i=+n[1]),t.exports=i},98008:(t,e,r)=>{var n=r(88113).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},98770:(t,e,r)=>{var n=r(17854);t.exports=function(t){return n[t].prototype}},80748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},11060:(t,e,r)=>{var n=r(1702),i=Error,a=n("".replace),o=String(i("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,l=s.test(o);t.exports=function(t,e){if(l&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=a(t,s,"");return t}},5392:(t,e,r)=>{var n=r(68880),i=r(11060),a=r(22914),o=Error.captureStackTrace;t.exports=function(t,e,r,s){a&&(o?o(t,e):n(t,"stack",i(r,s)))}},22914:(t,e,r)=>{var n=r(47293),i=r(79114);t.exports=!n((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)}))},7762:(t,e,r)=>{"use strict";var n=r(19781),i=r(47293),a=r(19670),o=r(70030),s=r(56277),l=Error.prototype.toString,c=i((function(){if(n){var t=o(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==l.call(t))return!0}return"2: 1"!==l.call({message:1,name:2})||"Error"!==l.call({})}));t.exports=c?function(){var t=a(this),e=s(t.name,"Error"),r=s(t.message);return e?r?e+": "+r:e:r}:l},82109:(t,e,r)=>{var n=r(17854),i=r(31236).f,a=r(68880),o=r(98052),s=r(13072),l=r(99920),c=r(54705);t.exports=function(t,e){var r,u,h,f,d,p=t.target,m=t.global,A=t.stat;if(r=m?n:A?n[p]||s(p,{}):(n[p]||{}).prototype)for(u in e){if(f=e[u],h=t.dontCallGetSet?(d=i(r,u))&&d.value:r[u],!c(m?u:p+(A?".":"#")+u,t.forced)&&void 0!==h){if(typeof f==typeof h)continue;l(f,h)}(t.sham||h&&h.sham)&&a(f,"sham",!0),o(r,u,f,t)}}},47293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},27007:(t,e,r)=>{"use strict";r(74916);var n=r(21470),i=r(98052),a=r(22261),o=r(47293),s=r(5112),l=r(68880),c=s("species"),u=RegExp.prototype;t.exports=function(t,e,r,h){var f=s(t),d=!o((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),p=d&&!o((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[f]=/./[f]),r.exec=function(){return e=!0,null},r[f](""),!e}));if(!d||!p||r){var m=n(/./[f]),A=e(f,""[t],(function(t,e,r,i,o){var s=n(t),l=e.exec;return l===a||l===u.exec?d&&!o?{done:!0,value:m(e,r,i)}:{done:!0,value:s(r,e,i)}:{done:!1}}));i(String.prototype,t,A[0]),i(u,f,A[1])}h&&l(u[f],"sham",!0)}},6790:(t,e,r)=>{"use strict";var n=r(43157),i=r(26244),a=r(7207),o=r(49974),s=function(t,e,r,l,c,u,h,f){for(var d,p,m=c,A=0,g=!!h&&o(h,f);A0&&n(d)?(p=i(d),m=s(t,e,d,p,m,u-1)-1):(a(m+1),t[m]=d),m++),A++;return m};t.exports=s},76677:(t,e,r)=>{var n=r(47293);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},22104:(t,e,r)=>{var n=r(34374),i=Function.prototype,a=i.apply,o=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?o.bind(a):function(){return o.apply(a,arguments)})},49974:(t,e,r)=>{var n=r(21470),i=r(19662),a=r(34374),o=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:a?o(t,e):function(){return t.apply(e,arguments)}}},34374:(t,e,r)=>{var n=r(47293);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},27065:(t,e,r)=>{"use strict";var n=r(1702),i=r(19662),a=r(70111),o=r(92597),s=r(50206),l=r(34374),c=Function,u=n([].concat),h=n([].join),f={};t.exports=l?c.bind:function(t){var e=i(this),r=e.prototype,n=s(arguments,1),l=function(){var r=u(n,s(arguments));return this instanceof l?function(t,e,r){if(!o(f,e)){for(var n=[],i=0;i{var n=r(34374),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},55040:(t,e,r)=>{"use strict";var n=r(1702),i=r(19662);t.exports=function(){return n(i(this))}},76530:(t,e,r)=>{var n=r(19781),i=r(92597),a=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,s=i(a,"name"),l=s&&"something"===function(){}.name,c=s&&(!n||n&&o(a,"name").configurable);t.exports={EXISTS:s,PROPER:l,CONFIGURABLE:c}},75668:(t,e,r)=>{var n=r(1702),i=r(19662);t.exports=function(t,e,r){try{return n(i(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},21470:(t,e,r)=>{var n=r(84326),i=r(1702);t.exports=function(t){if("Function"===n(t))return i(t)}},1702:(t,e,r)=>{var n=r(34374),i=Function.prototype,a=i.call,o=n&&i.bind.bind(a,a);t.exports=n?o:function(t){return function(){return a.apply(t,arguments)}}},62617:(t,e,r)=>{var n=r(46916),i=r(60614),a=r(19670),o=r(24942),s=r(71246),l=r(58173),c=r(5112),u=r(28091),h=c("asyncIterator");t.exports=function(t){var e,r=a(t),c=!0,f=l(r,h);return i(f)||(f=s(r),c=!1),void 0!==f?e=n(f,r):(e=r,c=!0),a(e),o(c?e:new u(o(e)))}},54777:(t,e,r)=>{var n=r(46916),i=r(28091),a=r(19670),o=r(18554),s=r(24942),l=r(58173),c=r(5112)("asyncIterator");t.exports=function(t,e){var r=arguments.length<2?l(t,c):e;return r?a(n(r,t)):new i(s(o(t)))}},35005:(t,e,r)=>{var n=r(17854),i=r(60614);t.exports=function(t,e){return arguments.length<2?(r=n[t],i(r)?r:void 0):n[t]&&n[t][e];var r}},24942:t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},72897:(t,e,r)=>{var n=r(46916),i=r(19670),a=r(24942),o=r(71246);t.exports=function(t){var e=i(t),r=o(e);return a(i(void 0!==r?n(r,e):e))}},71246:(t,e,r)=>{var n=r(70648),i=r(58173),a=r(68554),o=r(97497),s=r(5112)("iterator");t.exports=function(t){if(!a(t))return i(t,s)||i(t,"@@iterator")||o[n(t)]}},18554:(t,e,r)=>{var n=r(46916),i=r(19662),a=r(19670),o=r(66330),s=r(71246),l=TypeError;t.exports=function(t,e){var r=arguments.length<2?s(t):e;if(i(r))return a(n(r,t));throw l(o(t)+" is not iterable")}},88044:(t,e,r)=>{var n=r(1702),i=r(43157),a=r(60614),o=r(84326),s=r(41340),l=n([].push);t.exports=function(t){if(a(t))return t;if(i(t)){for(var e=t.length,r=[],n=0;n{var n=r(19662),i=r(68554);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},738:(t,e,r)=>{var n=r(19662),i=r(19670),a=r(46916),o=r(19303),s=TypeError,l=Math.max,c=function(t,e,r,n){this.set=t,this.size=e,this.has=r,this.keys=n};c.prototype={getIterator:function(){return i(a(this.keys,this.set))},includes:function(t){return a(this.has,this.set,t)}},t.exports=function(t){i(t);var e=+t.size;if(e!=e)throw s("Invalid size");return new c(t,l(o(e),0),n(t.has),n(t.keys))}},10647:(t,e,r)=>{var n=r(1702),i=r(47908),a=Math.floor,o=n("".charAt),s=n("".replace),l=n("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,n,h,f){var d=r+t.length,p=n.length,m=u;return void 0!==h&&(h=i(h),m=c),s(f,m,(function(i,s){var c;switch(o(s,0)){case"$":return"$";case"&":return t;case"`":return l(e,0,r);case"'":return l(e,d);case"<":c=h[l(s,1,-1)];break;default:var u=+s;if(0===u)return i;if(u>p){var f=a(u/10);return 0===f?i:f<=p?void 0===n[f-1]?o(s,1):n[f-1]+o(s,1):i}c=n[u-1]}return void 0===c?"":c}))}},17854:function(t,e,r){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||this||Function("return this")()},92597:(t,e,r)=>{var n=r(1702),i=r(47908),a=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return a(i(t),e)}},3501:t=>{t.exports={}},842:t=>{t.exports=function(t,e){try{1==arguments.length?console.error(t):console.error(t,e)}catch(t){}}},60490:(t,e,r)=>{var n=r(35005);t.exports=n("document","documentElement")},64664:(t,e,r)=>{var n=r(19781),i=r(47293),a=r(80317);t.exports=!n&&!i((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},11179:t=>{var e=Array,r=Math.abs,n=Math.pow,i=Math.floor,a=Math.log,o=Math.LN2;t.exports={pack:function(t,s,l){var c,u,h,f=e(l),d=8*l-s-1,p=(1<>1,A=23===s?n(2,-24)-n(2,-77):0,g=t<0||0===t&&1/t<0?1:0,v=0;for((t=r(t))!=t||t===1/0?(u=t!=t?1:0,c=p):(c=i(a(t)/o),t*(h=n(2,-c))<1&&(c--,h*=2),(t+=c+m>=1?A/h:A*n(2,1-m))*h>=2&&(c++,h/=2),c+m>=p?(u=0,c=p):c+m>=1?(u=(t*h-1)*n(2,s),c+=m):(u=t*n(2,m-1)*n(2,s),c=0));s>=8;)f[v++]=255&u,u/=256,s-=8;for(c=c<0;)f[v++]=255&c,c/=256,d-=8;return f[--v]|=128*g,f},unpack:function(t,e){var r,i=t.length,a=8*i-e-1,o=(1<>1,l=a-7,c=i-1,u=t[c--],h=127&u;for(u>>=7;l>0;)h=256*h+t[c--],l-=8;for(r=h&(1<<-l)-1,h>>=-l,l+=e;l>0;)r=256*r+t[c--],l-=8;if(0===h)h=1-s;else{if(h===o)return r?NaN:u?-1/0:1/0;r+=n(2,e),h-=s}return(u?-1:1)*r*n(2,h-e)}}},68361:(t,e,r)=>{var n=r(1702),i=r(47293),a=r(84326),o=Object,s=n("".split);t.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?s(t,""):o(t)}:o},79587:(t,e,r)=>{var n=r(60614),i=r(70111),a=r(27674);t.exports=function(t,e,r){var o,s;return a&&n(o=e.constructor)&&o!==r&&i(s=o.prototype)&&s!==r.prototype&&a(t,s),t}},42788:(t,e,r)=>{var n=r(1702),i=r(60614),a=r(5465),o=n(Function.toString);i(a.inspectSource)||(a.inspectSource=function(t){return o(t)}),t.exports=a.inspectSource},58340:(t,e,r)=>{var n=r(70111),i=r(68880);t.exports=function(t,e){n(e)&&"cause"in e&&i(t,"cause",e.cause)}},62423:(t,e,r)=>{var n=r(82109),i=r(1702),a=r(3501),o=r(70111),s=r(92597),l=r(3070).f,c=r(8006),u=r(1156),h=r(52050),f=r(69711),d=r(76677),p=!1,m=f("meta"),A=0,g=function(t){l(t,m,{value:{objectID:"O"+A++,weakData:{}}})},v=t.exports={enable:function(){v.enable=function(){},p=!0;var t=c.f,e=i([].splice),r={};r[m]=1,t(r).length&&(c.f=function(r){for(var n=t(r),i=0,a=n.length;i{var n,i,a,o=r(94811),s=r(17854),l=r(70111),c=r(68880),u=r(92597),h=r(5465),f=r(6200),d=r(3501),p="Object already initialized",m=s.TypeError,A=s.WeakMap;if(o||h.state){var g=h.state||(h.state=new A);g.get=g.get,g.has=g.has,g.set=g.set,n=function(t,e){if(g.has(t))throw m(p);return e.facade=t,g.set(t,e),e},i=function(t){return g.get(t)||{}},a=function(t){return g.has(t)}}else{var v=f("state");d[v]=!0,n=function(t,e){if(u(t,v))throw m(p);return e.facade=t,c(t,v,e),e},i=function(t){return u(t,v)?t[v]:{}},a=function(t){return u(t,v)}}t.exports={set:n,get:i,has:a,enforce:function(t){return a(t)?i(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!l(e)||(r=i(e)).type!==t)throw m("Incompatible receiver, "+t+" required");return r}}}},97659:(t,e,r)=>{var n=r(5112),i=r(97497),a=n("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||o[a]===t)}},43157:(t,e,r)=>{var n=r(84326);t.exports=Array.isArray||function(t){return"Array"==n(t)}},44067:(t,e,r)=>{var n=r(70648);t.exports=function(t){var e=n(t);return"BigInt64Array"==e||"BigUint64Array"==e}},60614:(t,e,r)=>{var n=r(4154),i=n.all;t.exports=n.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},4411:(t,e,r)=>{var n=r(1702),i=r(47293),a=r(60614),o=r(70648),s=r(35005),l=r(42788),c=function(){},u=[],h=s("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=n(f.exec),p=!f.exec(c),m=function(t){if(!a(t))return!1;try{return h(c,u,t),!0}catch(t){return!1}},A=function(t){if(!a(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(f,l(t))}catch(t){return!0}};A.sham=!0,t.exports=!h||i((function(){var t;return m(m.call)||!m(Object)||!m((function(){t=!0}))||t}))?A:m},45032:(t,e,r)=>{var n=r(92597);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},54705:(t,e,r)=>{var n=r(47293),i=r(60614),a=/#|\.prototype\./,o=function(t,e){var r=l[s(t)];return r==u||r!=c&&(i(e)?n(e):!!e)},s=o.normalize=function(t){return String(t).replace(a,".").toLowerCase()},l=o.data={},c=o.NATIVE="N",u=o.POLYFILL="P";t.exports=o},55988:(t,e,r)=>{var n=r(70111),i=Math.floor;t.exports=Number.isInteger||function(t){return!n(t)&&isFinite(t)&&i(t)===t}},25615:(t,e,r)=>{var n=r(70648),i=r(92597),a=r(68554),o=r(5112),s=r(97497),l=o("iterator"),c=Object;t.exports=function(t){if(a(t))return!1;var e=c(t);return void 0!==e[l]||"@@iterator"in e||i(s,n(e))}},68554:t=>{t.exports=function(t){return null==t}},70111:(t,e,r)=>{var n=r(60614),i=r(4154),a=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:n(t)||t===a}:function(t){return"object"==typeof t?null!==t:n(t)}},31913:t=>{t.exports=!1},73633:(t,e,r)=>{var n=r(70111),i=r(29909).get;t.exports=function(t){if(!n(t))return!1;var e=i(t);return!!e&&"RawJSON"===e.type}},47850:(t,e,r)=>{var n=r(70111),i=r(84326),a=r(5112)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==i(t))}},52190:(t,e,r)=>{var n=r(35005),i=r(60614),a=r(47976),o=r(43307),s=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&a(e.prototype,s(t))}},6333:(t,e,r)=>{var n=r(46916);t.exports=function(t,e,r){for(var i,a,o=r||t.next;!(i=n(o,t)).done;)if(void 0!==(a=e(i.value)))return a}},20408:(t,e,r)=>{var n=r(49974),i=r(46916),a=r(19670),o=r(66330),s=r(97659),l=r(26244),c=r(47976),u=r(18554),h=r(71246),f=r(99212),d=TypeError,p=function(t,e){this.stopped=t,this.result=e},m=p.prototype;t.exports=function(t,e,r){var A,g,v,y,b,x,w,_=r&&r.that,E=!(!r||!r.AS_ENTRIES),M=!(!r||!r.IS_RECORD),S=!(!r||!r.IS_ITERATOR),C=!(!r||!r.INTERRUPTED),T=n(e,_),I=function(t){return A&&f(A,"normal",t),new p(!0,t)},R=function(t){return E?(a(t),C?T(t[0],t[1],I):T(t[0],t[1])):C?T(t,I):T(t)};if(M)A=t.iterator;else if(S)A=t;else{if(!(g=h(t)))throw d(o(t)+" is not iterable");if(s(g)){for(v=0,y=l(t);y>v;v++)if((b=R(t[v]))&&c(m,b))return b;return new p(!1)}A=u(t,g)}for(x=M?t.next:A.next;!(w=i(x,A)).done;){try{b=R(w.value)}catch(t){f(A,"throw",t)}if("object"==typeof b&&b&&c(m,b))return b}return new p(!1)}},99212:(t,e,r)=>{var n=r(46916),i=r(19670),a=r(58173);t.exports=function(t,e,r){var o,s;i(t);try{if(!(o=a(t,"return"))){if("throw"===e)throw r;return r}o=n(o,t)}catch(t){s=!0,o=t}if("throw"===e)throw r;if(s)throw o;return i(o),r}},63061:(t,e,r)=>{"use strict";var n=r(13383).IteratorPrototype,i=r(70030),a=r(79114),o=r(58003),s=r(97497),l=function(){return this};t.exports=function(t,e,r,c){var u=e+" Iterator";return t.prototype=i(n,{next:a(+!c,r)}),o(t,u,!1,!0),s[u]=l,t}},54956:(t,e,r)=>{"use strict";var n=r(46916),i=r(70030),a=r(68880),o=r(89190),s=r(5112),l=r(29909),c=r(58173),u=r(13383).IteratorPrototype,h=r(76178),f=r(99212),d=s("toStringTag"),p="IteratorHelper",m="WrapForValidIterator",A=l.set,g=function(t){var e=l.getterFor(t?m:p);return o(i(u),{next:function(){var r=e(this);if(t)return r.nextHandler();try{var n=r.done?void 0:r.nextHandler();return h(n,r.done)}catch(t){throw r.done=!0,t}},return:function(){var r=e(this),i=r.iterator;if(r.done=!0,t){var a=c(i,"return");return a?n(a,i):h(void 0,!0)}if(r.inner)try{f(r.inner.iterator,"normal")}catch(t){return f(i,"throw",t)}return f(i,"normal"),h(void 0,!0)}})},v=g(!0),y=g(!1);a(y,d,"Iterator Helper"),t.exports=function(t,e){var r=function(r,n){n?(n.iterator=r.iterator,n.next=r.next):n=r,n.type=e?m:p,n.nextHandler=t,n.counter=0,n.done=!1,A(this,n)};return r.prototype=e?v:y,r}},51656:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(31913),o=r(76530),s=r(60614),l=r(63061),c=r(79518),u=r(27674),h=r(58003),f=r(68880),d=r(98052),p=r(5112),m=r(97497),A=r(13383),g=o.PROPER,v=o.CONFIGURABLE,y=A.IteratorPrototype,b=A.BUGGY_SAFARI_ITERATORS,x=p("iterator"),w="keys",_="values",E="entries",M=function(){return this};t.exports=function(t,e,r,o,p,A,S){l(r,e,o);var C,T,I,R=function(t){if(t===p&&D)return D;if(!b&&t in L)return L[t];switch(t){case w:case _:case E:return function(){return new r(this,t)}}return function(){return new r(this)}},B=e+" Iterator",k=!1,L=t.prototype,P=L[x]||L["@@iterator"]||p&&L[p],D=!b&&P||R(p),U="Array"==e&&L.entries||P;if(U&&(C=c(U.call(new t)))!==Object.prototype&&C.next&&(a||c(C)===y||(u?u(C,y):s(C[x])||d(C,x,M)),h(C,B,!0,!0),a&&(m[B]=M)),g&&p==_&&P&&P.name!==_&&(!a&&v?f(L,"name",_):(k=!0,D=function(){return i(P,this)})),p)if(T={values:R(_),keys:A?D:R(w),entries:R(E)},S)for(I in T)(b||k||!(I in L))&&d(L,I,T[I]);else n({target:e,proto:!0,forced:b||k},T);return a&&!S||L[x]===D||d(L,x,D,{name:p}),m[e]=D,T}},14323:(t,e,r)=>{"use strict";var n=r(46916),i=r(20487),a=function(t,e){return[e,t]};t.exports=function(){return n(i,this,a)}},20487:(t,e,r)=>{"use strict";var n=r(46916),i=r(19662),a=r(19670),o=r(24942),s=r(54956),l=r(53411),c=s((function(){var t=this.iterator,e=a(n(this.next,t));if(!(this.done=!!e.done))return l(t,this.mapper,[e.value,this.counter++],!0)}));t.exports=function(t){return a(this),i(t),new c(o(this),{mapper:t})}},13383:(t,e,r)=>{"use strict";var n,i,a,o=r(47293),s=r(60614),l=r(70111),c=r(70030),u=r(79518),h=r(98052),f=r(5112),d=r(31913),p=f("iterator"),m=!1;[].keys&&("next"in(a=[].keys())?(i=u(u(a)))!==Object.prototype&&(n=i):m=!0),!l(n)||o((function(){var t={};return n[p].call(t)!==t}))?n={}:d&&(n=c(n)),s(n[p])||h(n,p,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},97497:t=>{t.exports={}},26244:(t,e,r)=>{var n=r(17466);t.exports=function(t){return n(t.length)}},56339:(t,e,r)=>{var n=r(1702),i=r(47293),a=r(60614),o=r(92597),s=r(19781),l=r(76530).CONFIGURABLE,c=r(42788),u=r(29909),h=u.enforce,f=u.get,d=String,p=Object.defineProperty,m=n("".slice),A=n("".replace),g=n([].join),v=s&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),y=String(String).split("String"),b=t.exports=function(t,e,r){"Symbol("===m(d(e),0,7)&&(e="["+A(d(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!o(t,"name")||l&&t.name!==e)&&(s?p(t,"name",{value:e,configurable:!0}):t.name=e),v&&r&&o(r,"arity")&&t.length!==r.arity&&p(t,"length",{value:r.arity});try{r&&o(r,"constructor")&&r.constructor?s&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=h(t);return o(n,"source")||(n.source=g(y,"string"==typeof e?e:"")),t};Function.prototype.toString=b((function(){return a(this)&&f(this).source||c(this)}),"toString")},75706:(t,e,r)=>{var n=r(1702),i=Map.prototype;t.exports={Map,set:n(i.set),get:n(i.get),has:n(i.has),remove:n(i.delete),proto:i}},14995:(t,e,r)=>{var n=r(1702),i=r(6333),a=r(75706),o=a.Map,s=a.proto,l=n(s.forEach),c=n(s.entries),u=c(new o).next;t.exports=function(t,e,r){return r?i(c(t),(function(t){return e(t[1],t[0])}),u):l(t,e)}},8154:(t,e,r)=>{"use strict";var n=r(46916),i=r(19662),a=r(60614),o=r(19670),s=TypeError;t.exports=function(t,e){var r,l=o(this),c=i(l.get),u=i(l.has),h=i(l.set),f=arguments.length>2?arguments[2]:void 0;if(!a(e)&&!a(f))throw s("At least one callback required");return n(u,l,t)?(r=n(c,l,t),a(e)&&(r=e(r),n(h,l,t,r))):a(f)&&(r=f(),n(h,l,t,r)),r}},66736:t=>{var e=Math.expm1,r=Math.exp;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){var e=+t;return 0==e?e:e>-1e-6&&e<1e-6?e+e*e/2:r(e)-1}:e},26130:(t,e,r)=>{var n=r(64310),i=Math.abs,a=Math.pow,o=a(2,-52),s=a(2,-23),l=a(2,127)*(2-s),c=a(2,-126);t.exports=Math.fround||function(t){var e,r,a=+t,u=i(a),h=n(a);return ul||r!=r?h*(1/0):h*r}},20403:t=>{var e=Math.log,r=Math.LOG10E;t.exports=Math.log10||function(t){return e(t)*r}},26513:t=>{var e=Math.log;t.exports=Math.log1p||function(t){var r=+t;return r>-1e-8&&r<1e-8?r-r*r/2:e(1+r)}},47103:t=>{t.exports=Math.scale||function(t,e,r,n,i){var a=+t,o=+e,s=+r,l=+n,c=+i;return a!=a||o!=o||s!=s||l!=l||c!=c?NaN:a===1/0||a===-1/0?a:(a-o)*(c-l)/(s-o)+l}},64310:t=>{t.exports=Math.sign||function(t){var e=+t;return 0==e||e!=e?e:e<0?-1:1}},74758:t=>{var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},95948:(t,e,r)=>{var n,i,a,o,s,l=r(17854),c=r(49974),u=r(31236).f,h=r(20261).set,f=r(18572),d=r(6833),p=r(71528),m=r(71036),A=r(35268),g=l.MutationObserver||l.WebKitMutationObserver,v=l.document,y=l.process,b=l.Promise,x=u(l,"queueMicrotask"),w=x&&x.value;if(!w){var _=new f,E=function(){var t,e;for(A&&(t=y.domain)&&t.exit();e=_.get();)try{e()}catch(t){throw _.head&&n(),t}t&&t.enter()};d||A||m||!g||!v?!p&&b&&b.resolve?((o=b.resolve(void 0)).constructor=b,s=c(o.then,o),n=function(){s(E)}):A?n=function(){y.nextTick(E)}:(h=c(h,l),n=function(){h(E)}):(i=!0,a=v.createTextNode(""),new g(E).observe(a,{characterData:!0}),n=function(){a.data=i=!i}),w=function(t){_.head||n(),_.add(t)}}t.exports=w},80363:(t,e,r)=>{var n=r(47293);t.exports=!n((function(){var t="9007199254740993",e=JSON.rawJSON(t);return!JSON.isRawJSON(e)||JSON.stringify(e)!==t}))},78523:(t,e,r)=>{"use strict";var n=r(19662),i=TypeError,a=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw i("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new a(t)}},56277:(t,e,r)=>{var n=r(41340);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},66336:t=>{var e=RangeError;t.exports=function(t){if(t==t)return t;throw e("NaN is not allowed")}},3929:(t,e,r)=>{var n=r(47850),i=TypeError;t.exports=function(t){if(n(t))throw i("The method doesn't accept regular expressions");return t}},77023:(t,e,r)=>{var n=r(17854).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&n(t)}},2814:(t,e,r)=>{var n=r(17854),i=r(47293),a=r(1702),o=r(41340),s=r(53111).trim,l=r(81361),c=a("".charAt),u=n.parseFloat,h=n.Symbol,f=h&&h.iterator,d=1/u(l+"-0")!=-1/0||f&&!i((function(){u(Object(f))}));t.exports=d?function(t){var e=s(o(t)),r=u(e);return 0===r&&"-"==c(e,0)?-0:r}:u},83009:(t,e,r)=>{var n=r(17854),i=r(47293),a=r(1702),o=r(41340),s=r(53111).trim,l=r(81361),c=n.parseInt,u=n.Symbol,h=u&&u.iterator,f=/^[+-]?0x/i,d=a(f.exec),p=8!==c(l+"08")||22!==c(l+"0x16")||h&&!i((function(){c(Object(h))}));t.exports=p?function(t,e){var r=s(o(t));return c(r,e>>>0||(d(f,r)?16:10))}:c},80430:(t,e,r)=>{"use strict";var n=r(29909),i=r(63061),a=r(76178),o=r(68554),s=r(70111),l=r(47045),c=r(19781),u="Incorrect Iterator.range arguments",h="NumericRangeIterator",f=n.set,d=n.getterFor(h),p=RangeError,m=TypeError,A=i((function(t,e,r,n,i,a){if(typeof t!=n||e!==1/0&&e!==-1/0&&typeof e!=n)throw m(u);if(t===1/0||t===-1/0)throw p(u);var l,d=e>t,A=!1;if(void 0===r)l=void 0;else if(s(r))l=r.step,A=!!r.inclusive;else{if(typeof r!=n)throw m(u);l=r}if(o(l)&&(l=d?a:-a),typeof l!=n)throw m(u);if(l===1/0||l===-1/0||l===i&&t!==e)throw p(u);f(this,{type:h,start:t,end:e,step:l,inclusive:A,hitsEnd:t!=t||e!=e||l!=l||e>t!=l>i,currentCount:i,zero:i}),c||(this.start=t,this.end=e,this.step=l,this.inclusive=A)}),h,(function(){var t=d(this);if(t.hitsEnd)return a(void 0,!0);var e=t.start,r=t.end,n=e+t.step*t.currentCount++;n===r&&(t.hitsEnd=!0);var i=t.inclusive;return(r>e?i?n>r:n>=r:i?r>n:r>=n)?(t.hitsEnd=!0,a(void 0,!0)):a(n,!1)})),g=function(t){l(A.prototype,t,{get:function(){return d(this)[t]},set:function(){},configurable:!0,enumerable:!1})};c&&(g("start"),g("end"),g("inclusive"),g("step")),t.exports=A},21574:(t,e,r)=>{"use strict";var n=r(19781),i=r(1702),a=r(46916),o=r(47293),s=r(81956),l=r(25181),c=r(55296),u=r(47908),h=r(68361),f=Object.assign,d=Object.defineProperty,p=i([].concat);t.exports=!f||o((function(){if(n&&1!==f({b:1},f(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),i="abcdefghijklmnopqrst";return t[r]=7,i.split("").forEach((function(t){e[t]=t})),7!=f({},t)[r]||s(f({},e)).join("")!=i}))?function(t,e){for(var r=u(t),i=arguments.length,o=1,f=l.f,d=c.f;i>o;)for(var m,A=h(arguments[o++]),g=f?p(s(A),f(A)):s(A),v=g.length,y=0;v>y;)m=g[y++],n&&!a(d,A,m)||(r[m]=A[m]);return r}:f},70030:(t,e,r)=>{var n,i=r(19670),a=r(36048),o=r(80748),s=r(3501),l=r(60490),c=r(80317),u=r(6200),h="prototype",f="script",d=u("IE_PROTO"),p=function(){},m=function(t){return"<"+f+">"+t+""},A=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;g="undefined"!=typeof document?document.domain&&n?A(n):(e=c("iframe"),r="java"+f+":",e.style.display="none",l.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(m("document.F=Object")),t.close(),t.F):A(n);for(var i=o.length;i--;)delete g[h][o[i]];return g()};s[d]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(p[h]=i(t),r=new p,p[h]=null,r[d]=t):r=g(),void 0===e?r:a.f(r,e)}},36048:(t,e,r)=>{var n=r(19781),i=r(3353),a=r(3070),o=r(19670),s=r(45656),l=r(81956);e.f=n&&!i?Object.defineProperties:function(t,e){o(t);for(var r,n=s(e),i=l(e),c=i.length,u=0;c>u;)a.f(t,r=i[u++],n[r]);return t}},3070:(t,e,r)=>{var n=r(19781),i=r(64664),a=r(3353),o=r(19670),s=r(34948),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",f="configurable",d="writable";e.f=n?a?function(t,e,r){if(o(t),e=s(e),o(r),"function"==typeof t&&"prototype"===e&&"value"in r&&d in r&&!r[d]){var n=u(t,e);n&&n[d]&&(t[e]=r.value,r={configurable:f in r?r[f]:n[f],enumerable:h in r?r[h]:n[h],writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(o(t),e=s(e),o(r),i)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw l("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},31236:(t,e,r)=>{var n=r(19781),i=r(46916),a=r(55296),o=r(79114),s=r(45656),l=r(34948),c=r(92597),u=r(64664),h=Object.getOwnPropertyDescriptor;e.f=n?h:function(t,e){if(t=s(t),e=l(e),u)try{return h(t,e)}catch(t){}if(c(t,e))return o(!i(a.f,t,e),t[e])}},1156:(t,e,r)=>{var n=r(84326),i=r(45656),a=r(8006).f,o=r(41589),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"==n(t)?function(t){try{return a(t)}catch(t){return o(s)}}(t):a(i(t))}},8006:(t,e,r)=>{var n=r(16324),i=r(80748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},25181:(t,e)=>{e.f=Object.getOwnPropertySymbols},79518:(t,e,r)=>{var n=r(92597),i=r(60614),a=r(47908),o=r(6200),s=r(49920),l=o("IE_PROTO"),c=Object,u=c.prototype;t.exports=s?c.getPrototypeOf:function(t){var e=a(t);if(n(e,l))return e[l];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof c?u:null}},52050:(t,e,r)=>{var n=r(47293),i=r(70111),a=r(84326),o=r(7556),s=Object.isExtensible,l=n((function(){s(1)}));t.exports=l||o?function(t){return!!i(t)&&(!o||"ArrayBuffer"!=a(t))&&(!s||s(t))}:s},47976:(t,e,r)=>{var n=r(1702);t.exports=n({}.isPrototypeOf)},60996:(t,e,r)=>{"use strict";var n=r(29909),i=r(63061),a=r(76178),o=r(92597),s=r(81956),l=r(47908),c="Object Iterator",u=n.set,h=n.getterFor(c);t.exports=i((function(t,e){var r=l(t);u(this,{type:c,mode:e,object:r,keys:s(r),index:0})}),"Object",(function(){for(var t=h(this),e=t.keys;;){if(null===e||t.index>=e.length)return t.object=t.keys=null,a(void 0,!0);var r=e[t.index++],n=t.object;if(o(n,r)){switch(t.mode){case"keys":return a(r,!1);case"values":return a(n[r],!1)}return a([r,n[r]],!1)}}}))},16324:(t,e,r)=>{var n=r(1702),i=r(92597),a=r(45656),o=r(41318).indexOf,s=r(3501),l=n([].push);t.exports=function(t,e){var r,n=a(t),c=0,u=[];for(r in n)!i(s,r)&&i(n,r)&&l(u,r);for(;e.length>c;)i(n,r=e[c++])&&(~o(u,r)||l(u,r));return u}},81956:(t,e,r)=>{var n=r(16324),i=r(80748);t.exports=Object.keys||function(t){return n(t,i)}},55296:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},69026:(t,e,r)=>{"use strict";var n=r(31913),i=r(17854),a=r(47293),o=r(98008);t.exports=n||!a((function(){if(!(o&&o<535)){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete i[t]}}))},27674:(t,e,r)=>{var n=r(75668),i=r(19670),a=r(96077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return i(r),a(n),e?t(r,n):r.__proto__=n,r}}():void 0)},44699:(t,e,r)=>{var n=r(19781),i=r(47293),a=r(1702),o=r(79518),s=r(81956),l=r(45656),c=a(r(55296).f),u=a([].push),h=n&&i((function(){var t=Object.create(null);return t[2]=2,!c(t,2)})),f=function(t){return function(e){for(var r,i=l(e),a=s(i),f=h&&null===o(i),d=a.length,p=0,m=[];d>p;)r=a[p++],n&&!(f?r in i:c(i,r))||u(m,t?[r,i[r]]:i[r]);return m}};t.exports={entries:f(!0),values:f(!1)}},90288:(t,e,r)=>{"use strict";var n=r(51694),i=r(70648);t.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},90515:(t,e,r)=>{var n=r(17854),i=r(60614),a=r(5112)("observable"),o=n.Observable,s=o&&o.prototype;t.exports=!(i(o)&&i(o.from)&&i(o.of)&&i(s.subscribe)&&i(s[a]))},92140:(t,e,r)=>{var n=r(46916),i=r(60614),a=r(70111),o=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&i(r=t.toString)&&!a(s=n(r,t)))return s;if(i(r=t.valueOf)&&!a(s=n(r,t)))return s;if("string"!==e&&i(r=t.toString)&&!a(s=n(r,t)))return s;throw o("Can't convert object to primitive value")}},53887:(t,e,r)=>{var n=r(35005),i=r(1702),a=r(8006),o=r(25181),s=r(19670),l=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=a.f(s(t)),r=o.f;return r?l(e,r(t)):e}},18832:(t,e,r)=>{var n=r(1702),i=r(92597),a=SyntaxError,o=parseInt,s=String.fromCharCode,l=n("".charAt),c=n("".slice),u=n(/./.exec),h={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},f=/^[\da-f]{4}$/i,d=/^[\u0000-\u001F]$/;t.exports=function(t,e){for(var r=!0,n="";e{var n=r(17854);t.exports=n},12534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},63702:(t,e,r)=>{var n=r(17854),i=r(2492),a=r(60614),o=r(54705),s=r(42788),l=r(5112),c=r(7871),u=r(83823),h=r(31913),f=r(7392),d=i&&i.prototype,p=l("species"),m=!1,A=a(n.PromiseRejectionEvent),g=o("Promise",(function(){var t=s(i),e=t!==String(i);if(!e&&66===f)return!0;if(h&&(!d.catch||!d.finally))return!0;if(!f||f<51||!/native code/.test(t)){var r=new i((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[p]=n,!(m=r.then((function(){}))instanceof n))return!0}return!e&&(c||u)&&!A}));t.exports={CONSTRUCTOR:g,REJECTION_EVENT:A,SUBCLASSING:m}},2492:(t,e,r)=>{var n=r(17854);t.exports=n.Promise},69478:(t,e,r)=>{var n=r(19670),i=r(70111),a=r(78523);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=a.f(t);return(0,r.resolve)(e),r.promise}},80612:(t,e,r)=>{var n=r(2492),i=r(17072),a=r(63702).CONSTRUCTOR;t.exports=a||!i((function(t){n.all(t).then(void 0,(function(){}))}))},2626:(t,e,r)=>{var n=r(3070).f;t.exports=function(t,e,r){r in t||n(t,r,{configurable:!0,get:function(){return e[r]},set:function(t){e[r]=t}})}},18572:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},38845:(t,e,r)=>{r(51532),r(4129);var n=r(35005),i=r(1702),a=r(72309),o=n("Map"),s=n("WeakMap"),l=i([].push),c=a("metadata"),u=c.store||(c.store=new s),h=function(t,e,r){var n=u.get(t);if(!n){if(!r)return;u.set(t,n=new o)}var i=n.get(e);if(!i){if(!r)return;n.set(e,i=new o)}return i};t.exports={store:u,getMap:h,has:function(t,e,r){var n=h(e,r,!1);return void 0!==n&&n.has(t)},get:function(t,e,r){var n=h(e,r,!1);return void 0===n?void 0:n.get(t)},set:function(t,e,r,n){h(r,n,!0).set(t,e)},keys:function(t,e){var r=h(t,e,!1),n=[];return r&&r.forEach((function(t,e){l(n,e)})),n},toKey:function(t){return void 0===t||"symbol"==typeof t?t:String(t)}}},97651:(t,e,r)=>{var n=r(46916),i=r(19670),a=r(60614),o=r(84326),s=r(22261),l=TypeError;t.exports=function(t,e){var r=t.exec;if(a(r)){var c=n(r,t,e);return null!==c&&i(c),c}if("RegExp"===o(t))return n(s,t,e);throw l("RegExp#exec called on incompatible receiver")}},22261:(t,e,r)=>{"use strict";var n,i,a=r(46916),o=r(1702),s=r(41340),l=r(67066),c=r(52999),u=r(72309),h=r(70030),f=r(29909).get,d=r(9441),p=r(38173),m=u("native-string-replace",String.prototype.replace),A=RegExp.prototype.exec,g=A,v=o("".charAt),y=o("".indexOf),b=o("".replace),x=o("".slice),w=(i=/b*/g,a(A,n=/a/,"a"),a(A,i,"a"),0!==n.lastIndex||0!==i.lastIndex),_=c.BROKEN_CARET,E=void 0!==/()??/.exec("")[1];(w||E||_||d||p)&&(g=function(t){var e,r,n,i,o,c,u,d=this,p=f(d),M=s(t),S=p.raw;if(S)return S.lastIndex=d.lastIndex,e=a(g,S,M),d.lastIndex=S.lastIndex,e;var C=p.groups,T=_&&d.sticky,I=a(l,d),R=d.source,B=0,k=M;if(T&&(I=b(I,"y",""),-1===y(I,"g")&&(I+="g"),k=x(M,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==v(M,d.lastIndex-1))&&(R="(?: "+R+")",k=" "+k,B++),r=new RegExp("^(?:"+R+")",I)),E&&(r=new RegExp("^"+R+"$(?!\\s)",I)),w&&(n=d.lastIndex),i=a(A,T?r:d,k),T?i?(i.input=x(i.input,B),i[0]=x(i[0],B),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:w&&i&&(d.lastIndex=d.global?i.index+i[0].length:n),E&&i&&i.length>1&&a(m,i[0],r,(function(){for(o=1;o{"use strict";var n=r(19670);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},34706:(t,e,r)=>{var n=r(46916),i=r(92597),a=r(47976),o=r(67066),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||i(t,"flags")||!a(s,t)?e:n(o,t)}},52999:(t,e,r)=>{var n=r(47293),i=r(17854).RegExp,a=n((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),o=a||n((function(){return!i("a","y").sticky})),s=a||n((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:s,MISSED_STICKY:o,UNSUPPORTED_Y:a}},9441:(t,e,r)=>{var n=r(47293),i=r(17854).RegExp;t.exports=n((function(){var t=i(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},38173:(t,e,r)=>{var n=r(47293),i=r(17854).RegExp;t.exports=n((function(){var t=i("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}))},84488:(t,e,r)=>{var n=r(68554),i=TypeError;t.exports=function(t){if(n(t))throw i("Can't call method on "+t);return t}},46465:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},81150:t=>{t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},17152:(t,e,r)=>{"use strict";var n,i=r(17854),a=r(22104),o=r(60614),s=r(89363),l=r(88113),c=r(50206),u=r(48053),h=i.Function,f=/MSIE .\./.test(l)||s&&((n=i.Bun.version.split(".")).length<3||0==n[0]&&(n[1]<3||3==n[1]&&0==n[2]));t.exports=function(t,e){var r=e?2:1;return f?function(n,i){var s=u(arguments.length,1)>r,l=o(n)?n:h(n),f=s?c(arguments,r):[],d=s?function(){a(l,this,f)}:l;return e?t(d,i):t(d)}:t}},26283:(t,e,r)=>{var n=r(79405),i=r(87758),a=n.Set,o=n.add;t.exports=function(t){var e=new a;return i(t,(function(t){o(e,t)})),e}},37075:(t,e,r)=>{"use strict";var n=r(88999),i=r(79405),a=r(26283),o=r(1043),s=r(738),l=r(87758),c=r(6333),u=i.has,h=i.remove;t.exports=function(t){var e=n(this),r=s(t),i=a(e);return o(e)<=r.size?l(e,(function(t){r.includes(t)&&h(i,t)})):c(r.getIterator(),(function(t){u(e,t)&&h(i,t)})),i}},79405:(t,e,r)=>{var n=r(1702),i=Set.prototype;t.exports={Set,add:n(i.add),has:n(i.has),remove:n(i.delete),proto:i}},81920:(t,e,r)=>{"use strict";var n=r(88999),i=r(79405),a=r(1043),o=r(738),s=r(87758),l=r(6333),c=i.Set,u=i.add,h=i.has;t.exports=function(t){var e=n(this),r=o(t),i=new c;return a(e)>r.size?l(r.getIterator(),(function(t){h(e,t)&&u(i,t)})):s(e,(function(t){r.includes(t)&&u(i,t)})),i}},78239:(t,e,r)=>{"use strict";var n=r(88999),i=r(79405).has,a=r(1043),o=r(738),s=r(87758),l=r(6333),c=r(99212);t.exports=function(t){var e=n(this),r=o(t);if(a(e)<=r.size)return!1!==s(e,(function(t){if(r.includes(t))return!1}),!0);var u=r.getIterator();return!1!==l(u,(function(t){if(i(e,t))return c(u,"normal",!1)}))}},49180:(t,e,r)=>{"use strict";var n=r(88999),i=r(1043),a=r(87758),o=r(738);t.exports=function(t){var e=n(this),r=o(t);return!(i(e)>r.size)&&!1!==a(e,(function(t){if(!r.includes(t))return!1}),!0)}},10107:(t,e,r)=>{"use strict";var n=r(88999),i=r(79405).has,a=r(1043),o=r(738),s=r(6333),l=r(99212);t.exports=function(t){var e=n(this),r=o(t);if(a(e){var n=r(1702),i=r(6333),a=r(79405),o=a.Set,s=a.proto,l=n(s.forEach),c=n(s.keys),u=c(new o).next;t.exports=function(t,e,r){return r?i(c(t),e,u):l(t,e)}},13831:(t,e,r)=>{var n=r(35005);t.exports=function(t){try{return(new(n("Set")))[t]({size:0,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}),!0}catch(t){return!1}}},1043:(t,e,r)=>{var n=r(75668),i=r(79405);t.exports=n(i.proto,"size","get")||function(t){return t.size}},96340:(t,e,r)=>{"use strict";var n=r(35005),i=r(47045),a=r(5112),o=r(19781),s=a("species");t.exports=function(t){var e=n(t);o&&e&&!e[s]&&i(e,s,{configurable:!0,get:function(){return this}})}},98506:(t,e,r)=>{"use strict";var n=r(88999),i=r(79405),a=r(26283),o=r(738),s=r(6333),l=i.add,c=i.has,u=i.remove;t.exports=function(t){var e=n(this),r=o(t).getIterator(),i=a(e);return s(r,(function(t){c(e,t)?u(i,t):l(i,t)})),i}},58003:(t,e,r)=>{var n=r(3070).f,i=r(92597),a=r(5112)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!i(t,a)&&n(t,a,{configurable:!0,value:e})}},39391:(t,e,r)=>{"use strict";var n=r(88999),i=r(79405).add,a=r(26283),o=r(738),s=r(6333);t.exports=function(t){var e=n(this),r=o(t).getIterator(),l=a(e);return s(r,(function(t){i(l,t)})),l}},6200:(t,e,r)=>{var n=r(72309),i=r(69711),a=n("keys");t.exports=function(t){return a[t]||(a[t]=i(t))}},5465:(t,e,r)=>{var n=r(17854),i=r(13072),a="__core-js_shared__",o=n[a]||i(a,{});t.exports=o},72309:(t,e,r)=>{var n=r(31913),i=r(5465);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.31.0",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.31.0/LICENSE",source:"https://github.com/zloirock/core-js"})},36707:(t,e,r)=>{var n=r(19670),i=r(39483),a=r(68554),o=r(5112)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||a(r=n(s)[o])?e:i(r)}},92386:(t,e,r)=>{var n=r(1702),i=r(45656),a=r(41340),o=r(26244),s=TypeError,l=n([].push),c=n([].join);t.exports=function(t){var e=i(t),r=o(e);if(!r)return"";for(var n=arguments.length,u=[],h=0;;){var f=e[h++];if(void 0===f)throw s("Incorrect template");if(l(u,a(f)),h===r)return c(u,"");h{var n=r(47293);t.exports=function(t){return n((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},28710:(t,e,r)=>{var n=r(1702),i=r(19303),a=r(41340),o=r(84488),s=n("".charAt),l=n("".charCodeAt),c=n("".slice),u=function(t){return function(e,r){var n,u,h=a(o(e)),f=i(r),d=h.length;return f<0||f>=d?t?"":void 0:(n=l(h,f))<55296||n>56319||f+1===d||(u=l(h,f+1))<56320||u>57343?t?s(h,f):n:t?c(h,f,f+2):u-56320+(n-55296<<10)+65536}};t.exports={codeAt:u(!1),charAt:u(!0)}},54986:(t,e,r)=>{var n=r(88113);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(n)},76650:(t,e,r)=>{var n=r(1702),i=r(17466),a=r(41340),o=r(38415),s=r(84488),l=n(o),c=n("".slice),u=Math.ceil,h=function(t){return function(e,r,n){var o,h,f=a(s(e)),d=i(r),p=f.length,m=void 0===n?" ":a(n);return d<=p||""==m?f:((h=l(m,u((o=d-p)/m.length))).length>o&&(h=c(h,0,o)),t?f+h:h+f)}};t.exports={start:h(!1),end:h(!0)}},70327:(t,e,r)=>{var n=r(35005),i=r(1702),a=String.fromCharCode,o=n("String","fromCodePoint"),s=i("".charAt),l=i("".charCodeAt),c=i("".indexOf),u=i("".slice),h=function(t,e){var r=l(t,e);return r>=48&&r<=57},f=function(t,e,r){if(r>=t.length)return-1;for(var n=0;e=48&&t<=57?t-48:t>=97&&t<=102?t-97+10:t>=65&&t<=70?t-65+10:-1};t.exports=function(t){for(var e,r="",n=0,i=0;(i=c(t,"\\",i))>-1;){if(r+=u(t,n,i),++i===t.length)return;var l=s(t,i++);switch(l){case"b":r+="\b";break;case"t":r+="\t";break;case"n":r+="\n";break;case"v":r+="\v";break;case"f":r+="\f";break;case"r":r+="\r";break;case"\r":i1114111)return;r+=o(e);break;default:if(h(l,0))return;r+=l}n=i}return r+u(t,n)}},33197:(t,e,r)=>{var n=r(1702),i=2147483647,a=/[^\0-\u007E]/,o=/[.\u3002\uFF0E\uFF61]/g,s="Overflow: input needs wider integers to process",l=RangeError,c=n(o.exec),u=Math.floor,h=String.fromCharCode,f=n("".charCodeAt),d=n([].join),p=n([].push),m=n("".replace),A=n("".split),g=n("".toLowerCase),v=function(t){return t+22+75*(t<26)},y=function(t,e,r){var n=0;for(t=r?u(t/700):t>>1,t+=u(t/e);t>455;)t=u(t/35),n+=36;return u(n+36*t/(t+38))},b=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r=55296&&i<=56319&&r=o&&nu((i-c)/x))throw l(s);for(c+=(b-o)*x,o=b,r=0;ri)throw l(s);if(n==o){for(var w=c,_=36;;){var E=_<=m?1:_>=m+26?26:_-m;if(w{"use strict";var n=r(19303),i=r(41340),a=r(84488),o=RangeError;t.exports=function(t){var e=i(a(this)),r="",s=n(t);if(s<0||s==1/0)throw o("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(e+=e))1&s&&(r+=e);return r}},10365:(t,e,r)=>{"use strict";var n=r(53111).end,i=r(76091);t.exports=i("trimEnd")?function(){return n(this)}:"".trimEnd},76091:(t,e,r)=>{var n=r(76530).PROPER,i=r(47293),a=r(81361);t.exports=function(t){return i((function(){return!!a[t]()||"​…᠎"!=="​…᠎"[t]()||n&&a[t].name!==t}))}},33217:(t,e,r)=>{"use strict";var n=r(53111).start,i=r(76091);t.exports=i("trimStart")?function(){return n(this)}:"".trimStart},53111:(t,e,r)=>{var n=r(1702),i=r(84488),a=r(41340),o=r(81361),s=n("".replace),l=RegExp("^["+o+"]+"),c=RegExp("(^|[^"+o+"])["+o+"]+$"),u=function(t){return function(e){var r=a(i(e));return 1&t&&(r=s(r,l,"")),2&t&&(r=s(r,c,"$1")),r}};t.exports={start:u(1),end:u(2),trim:u(3)}},64124:(t,e,r)=>{var n=r(17854),i=r(47293),a=r(7392),o=r(7871),s=r(83823),l=r(35268),c=n.structuredClone;t.exports=!!c&&!i((function(){if(s&&a>92||l&&a>94||o&&a>97)return!1;var t=new ArrayBuffer(8),e=c(t,{transfer:[t]});return 0!=t.byteLength||8!=e.byteLength}))},36293:(t,e,r)=>{var n=r(7392),i=r(47293),a=r(17854).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},56532:(t,e,r)=>{var n=r(46916),i=r(35005),a=r(5112),o=r(98052);t.exports=function(){var t=i("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,s=a("toPrimitive");e&&!e[s]&&o(e,s,(function(t){return n(r,this)}),{arity:1})}},68238:(t,e,r)=>{var n=r(35005),i=r(1702),a=n("Symbol"),o=a.keyFor,s=i(a.prototype.valueOf);t.exports=a.isRegisteredSymbol||function(t){try{return void 0!==o(s(t))}catch(t){return!1}}},58741:(t,e,r)=>{for(var n=r(72309),i=r(35005),a=r(1702),o=r(52190),s=r(5112),l=i("Symbol"),c=l.isWellKnownSymbol,u=i("Object","getOwnPropertyNames"),h=a(l.prototype.valueOf),f=n("wks"),d=0,p=u(l),m=p.length;d{var n=r(36293);t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},20261:(t,e,r)=>{var n,i,a,o,s=r(17854),l=r(22104),c=r(49974),u=r(60614),h=r(92597),f=r(47293),d=r(60490),p=r(50206),m=r(80317),A=r(48053),g=r(6833),v=r(35268),y=s.setImmediate,b=s.clearImmediate,x=s.process,w=s.Dispatch,_=s.Function,E=s.MessageChannel,M=s.String,S=0,C={},T="onreadystatechange";f((function(){n=s.location}));var I=function(t){if(h(C,t)){var e=C[t];delete C[t],e()}},R=function(t){return function(){I(t)}},B=function(t){I(t.data)},k=function(t){s.postMessage(M(t),n.protocol+"//"+n.host)};y&&b||(y=function(t){A(arguments.length,1);var e=u(t)?t:_(t),r=p(arguments,1);return C[++S]=function(){l(e,void 0,r)},i(S),S},b=function(t){delete C[t]},v?i=function(t){x.nextTick(R(t))}:w&&w.now?i=function(t){w.now(R(t))}:E&&!g?(o=(a=new E).port2,a.port1.onmessage=B,i=c(o.postMessage,o)):s.addEventListener&&u(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!f(k)?(i=k,s.addEventListener("message",B,!1)):i=T in m("script")?function(t){d.appendChild(m("script"))[T]=function(){d.removeChild(this),I(t)}}:function(t){setTimeout(R(t),0)}),t.exports={set:y,clear:b}},50863:(t,e,r)=>{var n=r(1702);t.exports=n(1..valueOf)},51400:(t,e,r)=>{var n=r(19303),i=Math.max,a=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):a(r,e)}},64599:(t,e,r)=>{var n=r(57593),i=TypeError;t.exports=function(t){var e=n(t,"number");if("number"==typeof e)throw i("Can't convert number to bigint");return BigInt(e)}},57067:(t,e,r)=>{var n=r(19303),i=r(17466),a=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=n(t),r=i(e);if(e!==r)throw a("Wrong length or index");return r}},45656:(t,e,r)=>{var n=r(68361),i=r(84488);t.exports=function(t){return n(i(t))}},19303:(t,e,r)=>{var n=r(74758);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},17466:(t,e,r)=>{var n=r(19303),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},47908:(t,e,r)=>{var n=r(84488),i=Object;t.exports=function(t){return i(n(t))}},84590:(t,e,r)=>{var n=r(73002),i=RangeError;t.exports=function(t,e){var r=n(t);if(r%e)throw i("Wrong offset");return r}},73002:(t,e,r)=>{var n=r(19303),i=RangeError;t.exports=function(t){var e=n(t);if(e<0)throw i("The argument can't be less than 0");return e}},57593:(t,e,r)=>{var n=r(46916),i=r(70111),a=r(52190),o=r(58173),s=r(92140),l=r(5112),c=TypeError,u=l("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var r,l=o(t,u);if(l){if(void 0===e&&(e="default"),r=n(l,t,e),!i(r)||a(r))return r;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},34948:(t,e,r)=>{var n=r(57593),i=r(52190);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},45965:(t,e,r)=>{var n=r(35005),i=r(60614),a=r(25615),o=r(70111),s=n("Set");t.exports=function(t){return function(t){return o(t)&&"number"==typeof t.size&&i(t.has)&&i(t.keys)}(t)?t:a(t)?new s(t):t}},51694:(t,e,r)=>{var n={};n[r(5112)("toStringTag")]="z",t.exports="[object z]"===String(n)},41340:(t,e,r)=>{var n=r(70648),i=String;t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},44038:(t,e,r)=>{var n=r(35268);t.exports=function(t){try{if(n)return Function('return require("'+t+'")')()}catch(t){}}},66330:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},19843:(t,e,r)=>{"use strict";var n=r(82109),i=r(17854),a=r(46916),o=r(19781),s=r(63832),l=r(90260),c=r(13331),u=r(25787),h=r(79114),f=r(68880),d=r(55988),p=r(17466),m=r(57067),A=r(84590),g=r(34948),v=r(92597),y=r(70648),b=r(70111),x=r(52190),w=r(70030),_=r(47976),E=r(27674),M=r(8006).f,S=r(97321),C=r(42092).forEach,T=r(96340),I=r(47045),R=r(3070),B=r(31236),k=r(29909),L=r(79587),P=k.get,D=k.set,U=k.enforce,O=R.f,F=B.f,N=Math.round,z=i.RangeError,G=c.ArrayBuffer,Z=G.prototype,V=c.DataView,Q=l.NATIVE_ARRAY_BUFFER_VIEWS,j=l.TYPED_ARRAY_TAG,W=l.TypedArray,H=l.TypedArrayPrototype,X=l.aTypedArrayConstructor,q=l.isTypedArray,Y="BYTES_PER_ELEMENT",J="Wrong length",K=function(t,e){X(t);for(var r=0,n=e.length,i=new t(n);n>r;)i[r]=e[r++];return i},$=function(t,e){I(t,e,{configurable:!0,get:function(){return P(this)[e]}})},tt=function(t){var e;return _(Z,t)||"ArrayBuffer"==(e=y(t))||"SharedArrayBuffer"==e},et=function(t,e){return q(t)&&!x(e)&&e in t&&d(+e)&&e>=0},rt=function(t,e){return e=g(e),et(t,e)?h(2,t[e]):F(t,e)},nt=function(t,e,r){return e=g(e),!(et(t,e)&&b(r)&&v(r,"value"))||v(r,"get")||v(r,"set")||r.configurable||v(r,"writable")&&!r.writable||v(r,"enumerable")&&!r.enumerable?O(t,e,r):(t[e]=r.value,t)};o?(Q||(B.f=rt,R.f=nt,$(H,"buffer"),$(H,"byteOffset"),$(H,"byteLength"),$(H,"length")),n({target:"Object",stat:!0,forced:!Q},{getOwnPropertyDescriptor:rt,defineProperty:nt}),t.exports=function(t,e,r){var o=t.match(/\d+/)[0]/8,l=t+(r?"Clamped":"")+"Array",c="get"+t,h="set"+t,d=i[l],g=d,v=g&&g.prototype,y={},x=function(t,e){O(t,e,{get:function(){return function(t,e){var r=P(t);return r.view[c](e*o+r.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,n){var i=P(t);r&&(n=(n=N(n))<0?0:n>255?255:255&n),i.view[h](e*o+i.byteOffset,n,!0)}(this,e,t)},enumerable:!0})};Q?s&&(g=e((function(t,e,r,n){return u(t,v),L(b(e)?tt(e)?void 0!==n?new d(e,A(r,o),n):void 0!==r?new d(e,A(r,o)):new d(e):q(e)?K(g,e):a(S,g,e):new d(m(e)),t,g)})),E&&E(g,W),C(M(d),(function(t){t in g||f(g,t,d[t])})),g.prototype=v):(g=e((function(t,e,r,n){u(t,v);var i,s,l,c=0,h=0;if(b(e)){if(!tt(e))return q(e)?K(g,e):a(S,g,e);i=e,h=A(r,o);var f=e.byteLength;if(void 0===n){if(f%o)throw z(J);if((s=f-h)<0)throw z(J)}else if((s=p(n)*o)+h>f)throw z(J);l=s/o}else l=m(e),i=new G(s=l*o);for(D(t,{buffer:i,byteOffset:h,byteLength:s,length:l,view:new V(i)});c{var n=r(17854),i=r(47293),a=r(17072),o=r(90260).NATIVE_ARRAY_BUFFER_VIEWS,s=n.ArrayBuffer,l=n.Int8Array;t.exports=!o||!i((function(){l(1)}))||!i((function(){new l(-1)}))||!a((function(t){new l,new l(null),new l(1.5),new l(t)}),!0)||i((function(){return 1!==new l(new s(2),1,void 0).length}))},43074:(t,e,r)=>{var n=r(97745),i=r(66304);t.exports=function(t,e){return n(i(t),e)}},97321:(t,e,r)=>{var n=r(49974),i=r(46916),a=r(39483),o=r(47908),s=r(26244),l=r(18554),c=r(71246),u=r(97659),h=r(44067),f=r(90260).aTypedArrayConstructor,d=r(64599);t.exports=function(t){var e,r,p,m,A,g,v,y,b=a(this),x=o(t),w=arguments.length,_=w>1?arguments[1]:void 0,E=void 0!==_,M=c(x);if(M&&!u(M))for(y=(v=l(x,M)).next,x=[];!(g=i(y,v)).done;)x.push(g.value);for(E&&w>2&&(_=n(_,arguments[2])),r=s(x),p=new(f(b))(r),m=h(p),e=0;r>e;e++)A=E?_(x[e],e):x[e],p[e]=m?d(A):+A;return p}},66304:(t,e,r)=>{var n=r(90260),i=r(36707),a=n.aTypedArrayConstructor,o=n.getTypedArrayConstructor;t.exports=function(t){return a(i(t,o(t)))}},69711:(t,e,r)=>{var n=r(1702),i=0,a=Math.random(),o=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++i+a,36)}},85143:(t,e,r)=>{var n=r(47293),i=r(5112),a=r(19781),o=r(31913),s=i("iterator");t.exports=!n((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r=new URLSearchParams("a=1&a=2"),n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),r.delete("a",2),o&&(!t.toJSON||!r.has("a",1)||r.has("a",2))||!e.size&&(o||!a)||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},43307:(t,e,r)=>{var n=r(36293);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(t,e,r)=>{var n=r(19781),i=r(47293);t.exports=n&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},48053:t=>{var e=TypeError;t.exports=function(t,r){if(t{var n=r(17854),i=r(60614),a=n.WeakMap;t.exports=i(a)&&/native code/.test(String(a))},60953:(t,e,r)=>{var n=r(1702),i=WeakMap.prototype;t.exports={WeakMap,set:n(i.set),get:n(i.get),has:n(i.has),remove:n(i.delete)}},78818:(t,e,r)=>{var n=r(1702),i=WeakSet.prototype;t.exports={WeakSet,add:n(i.add),has:n(i.has),remove:n(i.delete)}},26800:(t,e,r)=>{var n=r(40857),i=r(92597),a=r(6061),o=r(3070).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});i(e,t)||o(e,t,{value:a.f(t)})}},6061:(t,e,r)=>{var n=r(5112);e.f=n},5112:(t,e,r)=>{var n=r(17854),i=r(72309),a=r(92597),o=r(69711),s=r(36293),l=r(43307),c=n.Symbol,u=i("wks"),h=l?c.for||c:c&&c.withoutSetter||o;t.exports=function(t){return a(u,t)||(u[t]=s&&a(c,t)?c[t]:h("Symbol."+t)),u[t]}},81361:t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},89191:(t,e,r)=>{"use strict";var n=r(35005),i=r(92597),a=r(68880),o=r(47976),s=r(27674),l=r(99920),c=r(2626),u=r(79587),h=r(56277),f=r(58340),d=r(5392),p=r(19781),m=r(31913);t.exports=function(t,e,r,A){var g="stackTraceLimit",v=A?2:1,y=t.split("."),b=y[y.length-1],x=n.apply(null,y);if(x){var w=x.prototype;if(!m&&i(w,"cause")&&delete w.cause,!r)return x;var _=n("Error"),E=e((function(t,e){var r=h(A?e:t,void 0),n=A?new x(t):new x;return void 0!==r&&a(n,"message",r),d(n,E,n.stack,2),this&&o(w,this)&&u(n,this,E),arguments.length>v&&f(n,arguments[v]),n}));if(E.prototype=w,"Error"!==b?s?s(E,_):l(E,_,{name:!0}):p&&g in x&&(c(E,x,g),c(E,x,"prepareStackTrace")),l(E,x),!m)try{w.name!==b&&a(w,"name",b),w.constructor=E}catch(t){}return E}}},32120:(t,e,r)=>{var n=r(82109),i=r(35005),a=r(22104),o=r(47293),s=r(89191),l="AggregateError",c=i(l),u=!o((function(){return 1!==c([1]).errors[0]}))&&o((function(){return 7!==c([1],l,{cause:7}).cause}));n({global:!0,constructor:!0,arity:2,forced:u},{AggregateError:s(l,(function(t){return function(e,r){return a(t,this,arguments)}}),u,!0)})},56967:(t,e,r)=>{"use strict";var n=r(82109),i=r(47976),a=r(79518),o=r(27674),s=r(99920),l=r(70030),c=r(68880),u=r(79114),h=r(58340),f=r(5392),d=r(20408),p=r(56277),m=r(5112)("toStringTag"),A=Error,g=[].push,v=function(t,e){var r,n=i(y,this);o?r=o(A(),n?a(this):y):(r=n?this:l(y),c(r,m,"Error")),void 0!==e&&c(r,"message",p(e)),f(r,v,r.stack,1),arguments.length>2&&h(r,arguments[2]);var s=[];return d(t,g,{that:s}),c(r,"errors",s),r};o?o(v,A):s(v,A,{name:!0});var y=v.prototype=l(A.prototype,{constructor:u(1,v),message:u(1,""),name:u(1,"AggregateError")});n({global:!0,constructor:!0,arity:2},{AggregateError:v})},9170:(t,e,r)=>{r(56967)},18264:(t,e,r)=>{"use strict";var n=r(82109),i=r(17854),a=r(13331),o=r(96340),s="ArrayBuffer",l=a[s];n({global:!0,constructor:!0,forced:i[s]!==l},{ArrayBuffer:l}),o(s)},76938:(t,e,r)=>{var n=r(82109),i=r(90260);n({target:"ArrayBuffer",stat:!0,forced:!i.NATIVE_ARRAY_BUFFER_VIEWS},{isView:i.isView})},39575:(t,e,r)=>{"use strict";var n=r(82109),i=r(21470),a=r(47293),o=r(13331),s=r(19670),l=r(51400),c=r(17466),u=r(36707),h=o.ArrayBuffer,f=o.DataView,d=f.prototype,p=i(h.prototype.slice),m=i(d.getUint8),A=i(d.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:a((function(){return!new h(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(p&&void 0===e)return p(s(this),t);for(var r=s(this).byteLength,n=l(t,r),i=l(void 0===e?r:e,r),a=new(u(this,h))(c(i-n)),o=new f(this),d=new f(a),g=0;n{"use strict";var n=r(82109),i=r(47908),a=r(26244),o=r(19303),s=r(51223);n({target:"Array",proto:!0},{at:function(t){var e=i(this),r=a(e),n=o(t),s=n>=0?n:r+n;return s<0||s>=r?void 0:e[s]}}),s("at")},92222:(t,e,r)=>{"use strict";var n=r(82109),i=r(47293),a=r(43157),o=r(70111),s=r(47908),l=r(26244),c=r(7207),u=r(86135),h=r(65417),f=r(81194),d=r(5112),p=r(7392),m=d("isConcatSpreadable"),A=p>=51||!i((function(){var t=[];return t[m]=!1,t.concat()[0]!==t})),g=function(t){if(!o(t))return!1;var e=t[m];return void 0!==e?!!e:a(t)};n({target:"Array",proto:!0,arity:1,forced:!A||!f("concat")},{concat:function(t){var e,r,n,i,a,o=s(this),f=h(o,0),d=0;for(e=-1,n=arguments.length;e{var n=r(82109),i=r(1048),a=r(51223);n({target:"Array",proto:!0},{copyWithin:i}),a("copyWithin")},26541:(t,e,r)=>{"use strict";var n=r(82109),i=r(42092).every;n({target:"Array",proto:!0,forced:!r(9341)("every")},{every:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},43290:(t,e,r)=>{var n=r(82109),i=r(21285),a=r(51223);n({target:"Array",proto:!0},{fill:i}),a("fill")},57327:(t,e,r)=>{"use strict";var n=r(82109),i=r(42092).filter;n({target:"Array",proto:!0,forced:!r(81194)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},34553:(t,e,r)=>{"use strict";var n=r(82109),i=r(42092).findIndex,a=r(51223),o="findIndex",s=!0;o in[]&&Array(1)[o]((function(){s=!1})),n({target:"Array",proto:!0,forced:s},{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a(o)},77287:(t,e,r)=>{"use strict";var n=r(82109),i=r(9671).findLastIndex,a=r(51223);n({target:"Array",proto:!0},{findLastIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a("findLastIndex")},67635:(t,e,r)=>{"use strict";var n=r(82109),i=r(9671).findLast,a=r(51223);n({target:"Array",proto:!0},{findLast:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a("findLast")},69826:(t,e,r)=>{"use strict";var n=r(82109),i=r(42092).find,a=r(51223),o="find",s=!0;o in[]&&Array(1)[o]((function(){s=!1})),n({target:"Array",proto:!0,forced:s},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a(o)},86535:(t,e,r)=>{"use strict";var n=r(82109),i=r(6790),a=r(19662),o=r(47908),s=r(26244),l=r(65417);n({target:"Array",proto:!0},{flatMap:function(t){var e,r=o(this),n=s(r);return a(t),(e=l(r,0)).length=i(e,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},84944:(t,e,r)=>{"use strict";var n=r(82109),i=r(6790),a=r(47908),o=r(26244),s=r(19303),l=r(65417);n({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=a(this),r=o(e),n=l(e,0);return n.length=i(n,e,e,r,0,void 0===t?1:s(t)),n}})},89554:(t,e,r)=>{"use strict";var n=r(82109),i=r(18533);n({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},91038:(t,e,r)=>{var n=r(82109),i=r(48457);n({target:"Array",stat:!0,forced:!r(17072)((function(t){Array.from(t)}))},{from:i})},26699:(t,e,r)=>{"use strict";var n=r(82109),i=r(41318).includes,a=r(47293),o=r(51223);n({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},82772:(t,e,r)=>{"use strict";var n=r(82109),i=r(21470),a=r(41318).indexOf,o=r(9341),s=i([].indexOf),l=!!s&&1/s([1],1,-0)<0;n({target:"Array",proto:!0,forced:l||!o("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return l?s(this,t,e)||0:a(this,t,e)}})},79753:(t,e,r)=>{r(82109)({target:"Array",stat:!0},{isArray:r(43157)})},66992:(t,e,r)=>{"use strict";var n=r(45656),i=r(51223),a=r(97497),o=r(29909),s=r(3070).f,l=r(51656),c=r(76178),u=r(31913),h=r(19781),f="Array Iterator",d=o.set,p=o.getterFor(f);t.exports=l(Array,"Array",(function(t,e){d(this,{type:f,target:n(t),index:0,kind:e})}),(function(){var t=p(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,c(void 0,!0)):c("keys"==r?n:"values"==r?e[n]:[n,e[n]],!1)}),"values");var m=a.Arguments=a.Array;if(i("keys"),i("values"),i("entries"),!u&&h&&"values"!==m.name)try{s(m,"name",{value:"values"})}catch(t){}},69600:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(68361),o=r(45656),s=r(9341),l=i([].join);n({target:"Array",proto:!0,forced:a!=Object||!s("join",",")},{join:function(t){return l(o(this),void 0===t?",":t)}})},94986:(t,e,r)=>{var n=r(82109),i=r(86583);n({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},21249:(t,e,r)=>{"use strict";var n=r(82109),i=r(42092).map;n({target:"Array",proto:!0,forced:!r(81194)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},26572:(t,e,r)=>{"use strict";var n=r(82109),i=r(47293),a=r(4411),o=r(86135),s=Array;n({target:"Array",stat:!0,forced:i((function(){function t(){}return!(s.of.call(t)instanceof t)}))},{of:function(){for(var t=0,e=arguments.length,r=new(a(this)?this:s)(e);e>t;)o(r,t,arguments[t++]);return r.length=e,r}})},57658:(t,e,r)=>{"use strict";var n=r(82109),i=r(47908),a=r(26244),o=r(83658),s=r(7207);n({target:"Array",proto:!0,arity:1,forced:r(47293)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=i(this),r=a(e),n=arguments.length;s(r+n);for(var l=0;l{"use strict";var n=r(82109),i=r(53671).right,a=r(9341),o=r(7392);n({target:"Array",proto:!0,forced:!r(35268)&&o>79&&o<83||!a("reduceRight")},{reduceRight:function(t){return i(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},85827:(t,e,r)=>{"use strict";var n=r(82109),i=r(53671).left,a=r(9341),o=r(7392);n({target:"Array",proto:!0,forced:!r(35268)&&o>79&&o<83||!a("reduce")},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},65069:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(43157),o=i([].reverse),s=[1,2];n({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return a(this)&&(this.length=this.length),o(this)}})},47042:(t,e,r)=>{"use strict";var n=r(82109),i=r(43157),a=r(4411),o=r(70111),s=r(51400),l=r(26244),c=r(45656),u=r(86135),h=r(5112),f=r(81194),d=r(50206),p=f("slice"),m=h("species"),A=Array,g=Math.max;n({target:"Array",proto:!0,forced:!p},{slice:function(t,e){var r,n,h,f=c(this),p=l(f),v=s(t,p),y=s(void 0===e?p:e,p);if(i(f)&&(r=f.constructor,(a(r)&&(r===A||i(r.prototype))||o(r)&&null===(r=r[m]))&&(r=void 0),r===A||void 0===r))return d(f,v,y);for(n=new(void 0===r?A:r)(g(y-v,0)),h=0;v{"use strict";var n=r(82109),i=r(42092).some;n({target:"Array",proto:!0,forced:!r(9341)("some")},{some:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},2707:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(19662),o=r(47908),s=r(26244),l=r(85117),c=r(41340),u=r(47293),h=r(94362),f=r(9341),d=r(68886),p=r(30256),m=r(7392),A=r(98008),g=[],v=i(g.sort),y=i(g.push),b=u((function(){g.sort(void 0)})),x=u((function(){g.sort(null)})),w=f("sort"),_=!u((function(){if(m)return m<70;if(!(d&&d>3)){if(p)return!0;if(A)return A<603;var t,e,r,n,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)g.push({k:e+n,v:r})}for(g.sort((function(t,e){return e.v-t.v})),n=0;nc(r)?1:-1}}(t)),r=s(i),n=0;n{r(96340)("Array")},40561:(t,e,r)=>{"use strict";var n=r(82109),i=r(47908),a=r(51400),o=r(19303),s=r(26244),l=r(83658),c=r(7207),u=r(65417),h=r(86135),f=r(85117),d=r(81194)("splice"),p=Math.max,m=Math.min;n({target:"Array",proto:!0,forced:!d},{splice:function(t,e){var r,n,d,A,g,v,y=i(this),b=s(y),x=a(t,b),w=arguments.length;for(0===w?r=n=0:1===w?(r=0,n=b-x):(r=w-2,n=m(p(o(e),0),b-x)),c(b+r-n),d=u(y,n),A=0;Ab-n+r;A--)f(y,A-1)}else if(r>n)for(A=b-n;A>x;A--)v=A+r-1,(g=A+n-1)in y?y[v]=y[g]:f(y,v);for(A=0;A{"use strict";var n=r(82109),i=r(21843),a=r(45656),o=r(51223),s=Array;n({target:"Array",proto:!0},{toReversed:function(){return i(a(this),s)}}),o("toReversed")},76459:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(19662),o=r(45656),s=r(97745),l=r(98770),c=r(51223),u=Array,h=i(l("Array").sort);n({target:"Array",proto:!0},{toSorted:function(t){void 0!==t&&a(t);var e=o(this),r=s(u,e);return h(r,t)}}),c("toSorted")},99892:(t,e,r)=>{"use strict";var n=r(82109),i=r(51223),a=r(7207),o=r(26244),s=r(51400),l=r(45656),c=r(19303),u=Array,h=Math.max,f=Math.min;n({target:"Array",proto:!0},{toSpliced:function(t,e){var r,n,i,d,p=l(this),m=o(p),A=s(t,m),g=arguments.length,v=0;for(0===g?r=n=0:1===g?(r=0,n=m-A):(r=g-2,n=f(h(c(e),0),m-A)),i=a(m+r-n),d=u(i);v{r(51223)("flatMap")},33792:(t,e,r)=>{r(51223)("flat")},30541:(t,e,r)=>{"use strict";var n=r(82109),i=r(47908),a=r(26244),o=r(83658),s=r(85117),l=r(7207);n({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(t){return t instanceof TypeError}}()},{unshift:function(t){var e=i(this),r=a(e),n=arguments.length;if(n){l(r+n);for(var c=r;c--;){var u=c+n;c in e?e[u]=e[c]:s(e,u)}for(var h=0;h{"use strict";var n=r(82109),i=r(11572),a=r(45656),o=Array;n({target:"Array",proto:!0},{with:function(t,e){return i(a(this),o,t,e)}})},3690:(t,e,r)=>{var n=r(82109),i=r(13331);n({global:!0,constructor:!0,forced:!r(23013)},{DataView:i.DataView})},16716:(t,e,r)=>{r(3690)},43016:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(47293)((function(){return 120!==new Date(16e11).getYear()})),o=i(Date.prototype.getFullYear);n({target:"Date",proto:!0,forced:a},{getYear:function(){return o(this)-1900}})},3843:(t,e,r)=>{var n=r(82109),i=r(1702),a=Date,o=i(a.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return o(new a)}})},81801:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(19303),o=Date.prototype,s=i(o.getTime),l=i(o.setFullYear);n({target:"Date",proto:!0},{setYear:function(t){s(this);var e=a(t);return l(this,0<=e&&e<=99?e+1900:e)}})},9550:(t,e,r)=>{r(82109)({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})},28733:(t,e,r)=>{var n=r(82109),i=r(85573);n({target:"Date",proto:!0,forced:Date.prototype.toISOString!==i},{toISOString:i})},5735:(t,e,r)=>{"use strict";var n=r(82109),i=r(47293),a=r(47908),o=r(57593);n({target:"Date",proto:!0,arity:1,forced:i((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=a(this),r=o(e,"number");return"number"!=typeof r||isFinite(r)?e.toISOString():null}})},96078:(t,e,r)=>{var n=r(92597),i=r(98052),a=r(38709),o=r(5112)("toPrimitive"),s=Date.prototype;n(s,o)||i(s,o,a)},83710:(t,e,r)=>{var n=r(1702),i=r(98052),a=Date.prototype,o="Invalid Date",s="toString",l=n(a[s]),c=n(a.getTime);String(new Date(NaN))!=o&&i(a,s,(function(){var t=c(this);return t==t?l(this):o}))},21703:(t,e,r)=>{var n=r(82109),i=r(17854),a=r(22104),o=r(89191),s="WebAssembly",l=i[s],c=7!==Error("e",{cause:7}).cause,u=function(t,e){var r={};r[t]=o(t,e,c),n({global:!0,constructor:!0,arity:1,forced:c},r)},h=function(t,e){if(l&&l[t]){var r={};r[t]=o(s+"."+t,e,c),n({target:s,stat:!0,constructor:!0,arity:1,forced:c},r)}};u("Error",(function(t){return function(e){return a(t,this,arguments)}})),u("EvalError",(function(t){return function(e){return a(t,this,arguments)}})),u("RangeError",(function(t){return function(e){return a(t,this,arguments)}})),u("ReferenceError",(function(t){return function(e){return a(t,this,arguments)}})),u("SyntaxError",(function(t){return function(e){return a(t,this,arguments)}})),u("TypeError",(function(t){return function(e){return a(t,this,arguments)}})),u("URIError",(function(t){return function(e){return a(t,this,arguments)}})),h("CompileError",(function(t){return function(e){return a(t,this,arguments)}})),h("LinkError",(function(t){return function(e){return a(t,this,arguments)}})),h("RuntimeError",(function(t){return function(e){return a(t,this,arguments)}}))},96647:(t,e,r)=>{var n=r(98052),i=r(7762),a=Error.prototype;a.toString!==i&&n(a,"toString",i)},62130:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(41340),o=i("".charAt),s=i("".charCodeAt),l=i(/./.exec),c=i(1..toString),u=i("".toUpperCase),h=/[\w*+\-./@]/,f=function(t,e){for(var r=c(t,16);r.length{var n=r(82109),i=r(27065);n({target:"Function",proto:!0,forced:Function.bind!==i},{bind:i})},4855:(t,e,r)=>{"use strict";var n=r(60614),i=r(70111),a=r(3070),o=r(79518),s=r(5112),l=r(56339),c=s("hasInstance"),u=Function.prototype;c in u||a.f(u,c,{value:l((function(t){if(!n(this)||!i(t))return!1;var e=this.prototype;if(!i(e))return t instanceof this;for(;t=o(t);)if(e===t)return!0;return!1}),c)})},68309:(t,e,r)=>{var n=r(19781),i=r(76530).EXISTS,a=r(1702),o=r(47045),s=Function.prototype,l=a(s.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=a(c.exec);n&&!i&&o(s,"name",{configurable:!0,get:function(){try{return u(c,l(this))[1]}catch(t){return""}}})},35837:(t,e,r)=>{var n=r(82109),i=r(17854);n({global:!0,forced:i.globalThis!==i},{globalThis:i})},38862:(t,e,r)=>{var n=r(82109),i=r(35005),a=r(22104),o=r(46916),s=r(1702),l=r(47293),c=r(60614),u=r(52190),h=r(50206),f=r(88044),d=r(36293),p=String,m=i("JSON","stringify"),A=s(/./.exec),g=s("".charAt),v=s("".charCodeAt),y=s("".replace),b=s(1..toString),x=/[\uD800-\uDFFF]/g,w=/^[\uD800-\uDBFF]$/,_=/^[\uDC00-\uDFFF]$/,E=!d||l((function(){var t=i("Symbol")();return"[null]"!=m([t])||"{}"!=m({a:t})||"{}"!=m(Object(t))})),M=l((function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")})),S=function(t,e){var r=h(arguments),n=f(e);if(c(n)||void 0!==t&&!u(t))return r[1]=function(t,e){if(c(n)&&(e=o(n,this,p(t),e)),!u(e))return e},a(m,null,r)},C=function(t,e,r){var n=g(r,e-1),i=g(r,e+1);return A(w,t)&&!A(_,i)||A(_,t)&&!A(w,n)?"\\u"+b(v(t,0),16):t};m&&n({target:"JSON",stat:!0,arity:3,forced:E||M},{stringify:function(t,e,r){var n=h(arguments),i=a(E?S:m,null,n);return M&&"string"==typeof i?y(i,x,C):i}})},73706:(t,e,r)=>{var n=r(17854);r(58003)(n.JSON,"JSON",!0)},69098:(t,e,r)=>{"use strict";r(77710)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(95631))},51532:(t,e,r)=>{r(69098)},99752:(t,e,r)=>{var n=r(82109),i=r(26513),a=Math.acosh,o=Math.log,s=Math.sqrt,l=Math.LN2;n({target:"Math",stat:!0,forced:!a||710!=Math.floor(a(Number.MAX_VALUE))||a(1/0)!=1/0},{acosh:function(t){var e=+t;return e<1?NaN:e>94906265.62425156?o(e)+l:i(e-1+s(e-1)*s(e+1))}})},82376:(t,e,r)=>{var n=r(82109),i=Math.asinh,a=Math.log,o=Math.sqrt;n({target:"Math",stat:!0,forced:!(i&&1/i(0)>0)},{asinh:function t(e){var r=+e;return isFinite(r)&&0!=r?r<0?-t(-r):a(r+o(r*r+1)):r}})},73181:(t,e,r)=>{var n=r(82109),i=Math.atanh,a=Math.log;n({target:"Math",stat:!0,forced:!(i&&1/i(-0)<0)},{atanh:function(t){var e=+t;return 0==e?e:a((1+e)/(1-e))/2}})},23484:(t,e,r)=>{var n=r(82109),i=r(64310),a=Math.abs,o=Math.pow;n({target:"Math",stat:!0},{cbrt:function(t){var e=+t;return i(e)*o(a(e),1/3)}})},2388:(t,e,r)=>{var n=r(82109),i=Math.floor,a=Math.log,o=Math.LOG2E;n({target:"Math",stat:!0},{clz32:function(t){var e=t>>>0;return e?31-i(a(e+.5)*o):32}})},88621:(t,e,r)=>{var n=r(82109),i=r(66736),a=Math.cosh,o=Math.abs,s=Math.E;n({target:"Math",stat:!0,forced:!a||a(710)===1/0},{cosh:function(t){var e=i(o(t)-1)+1;return(e+1/(e*s*s))*(s/2)}})},60403:(t,e,r)=>{var n=r(82109),i=r(66736);n({target:"Math",stat:!0,forced:i!=Math.expm1},{expm1:i})},84755:(t,e,r)=>{r(82109)({target:"Math",stat:!0},{fround:r(26130)})},25438:(t,e,r)=>{var n=r(82109),i=Math.hypot,a=Math.abs,o=Math.sqrt;n({target:"Math",stat:!0,arity:2,forced:!!i&&i(1/0,NaN)!==1/0},{hypot:function(t,e){for(var r,n,i=0,s=0,l=arguments.length,c=0;s0?(n=r/c)*n:r;return c===1/0?1/0:c*o(i)}})},90332:(t,e,r)=>{var n=r(82109),i=r(47293),a=Math.imul;n({target:"Math",stat:!0,forced:i((function(){return-5!=a(4294967295,5)||2!=a.length}))},{imul:function(t,e){var r=65535,n=+t,i=+e,a=r&n,o=r&i;return 0|a*o+((r&n>>>16)*o+a*(r&i>>>16)<<16>>>0)}})},40658:(t,e,r)=>{r(82109)({target:"Math",stat:!0},{log10:r(20403)})},40197:(t,e,r)=>{r(82109)({target:"Math",stat:!0},{log1p:r(26513)})},44914:(t,e,r)=>{var n=r(82109),i=Math.log,a=Math.LN2;n({target:"Math",stat:!0},{log2:function(t){return i(t)/a}})},52420:(t,e,r)=>{r(82109)({target:"Math",stat:!0},{sign:r(64310)})},60160:(t,e,r)=>{var n=r(82109),i=r(47293),a=r(66736),o=Math.abs,s=Math.exp,l=Math.E;n({target:"Math",stat:!0,forced:i((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(t){var e=+t;return o(e)<1?(a(e)-a(-e))/2:(s(e-1)-s(-e-1))*(l/2)}})},60970:(t,e,r)=>{var n=r(82109),i=r(66736),a=Math.exp;n({target:"Math",stat:!0},{tanh:function(t){var e=+t,r=i(e),n=i(-e);return r==1/0?1:n==1/0?-1:(r-n)/(a(e)+a(-e))}})},10408:(t,e,r)=>{r(58003)(Math,"Math",!0)},73689:(t,e,r)=>{r(82109)({target:"Math",stat:!0},{trunc:r(74758)})},9653:(t,e,r)=>{"use strict";var n=r(82109),i=r(31913),a=r(19781),o=r(17854),s=r(40857),l=r(1702),c=r(54705),u=r(92597),h=r(79587),f=r(47976),d=r(52190),p=r(57593),m=r(47293),A=r(8006).f,g=r(31236).f,v=r(3070).f,y=r(50863),b=r(53111).trim,x="Number",w=o[x],_=s[x],E=w.prototype,M=o.TypeError,S=l("".slice),C=l("".charCodeAt),T=c(x,!w(" 0o1")||!w("0b1")||w("+0x1")),I=function(t){var e,r=arguments.length<1?0:w(function(t){var e=p(t,"number");return"bigint"==typeof e?e:function(t){var e,r,n,i,a,o,s,l,c=p(t,"number");if(d(c))throw M("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=b(c),43===(e=C(c,0))||45===e){if(88===(r=C(c,2))||120===r)return NaN}else if(48===e){switch(C(c,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+c}for(o=(a=S(c,2)).length,s=0;si)return NaN;return parseInt(a,n)}return+c}(e)}(t));return f(E,e=this)&&m((function(){y(e)}))?h(Object(r),this,I):r};I.prototype=E,T&&!i&&(E.constructor=I),n({global:!0,constructor:!0,wrap:!0,forced:T},{Number:I});var R=function(t,e){for(var r,n=a?A(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;n.length>i;i++)u(e,r=n[i])&&!u(t,r)&&v(t,r,g(e,r))};i&&_&&R(s[x],_),(T||i)&&R(s[x],w)},93299:(t,e,r)=>{r(82109)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})},35192:(t,e,r)=>{r(82109)({target:"Number",stat:!0},{isFinite:r(77023)})},33161:(t,e,r)=>{r(82109)({target:"Number",stat:!0},{isInteger:r(55988)})},44048:(t,e,r)=>{r(82109)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},78285:(t,e,r)=>{var n=r(82109),i=r(55988),a=Math.abs;n({target:"Number",stat:!0},{isSafeInteger:function(t){return i(t)&&a(t)<=9007199254740991}})},44363:(t,e,r)=>{r(82109)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},55994:(t,e,r)=>{r(82109)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})},61874:(t,e,r)=>{var n=r(82109),i=r(2814);n({target:"Number",stat:!0,forced:Number.parseFloat!=i},{parseFloat:i})},9494:(t,e,r)=>{var n=r(82109),i=r(83009);n({target:"Number",stat:!0,forced:Number.parseInt!=i},{parseInt:i})},31354:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(19303),o=r(50863),s=r(38415),l=r(20403),c=r(47293),u=RangeError,h=String,f=isFinite,d=Math.abs,p=Math.floor,m=Math.pow,A=Math.round,g=i(1..toExponential),v=i(s),y=i("".slice),b="-6.9000e-11"===g(-69e-12,4)&&"1.25e+0"===g(1.255,2)&&"1.235e+4"===g(12345,3)&&"3e+1"===g(25,0);n({target:"Number",proto:!0,forced:!b||!(c((function(){g(1,1/0)}))&&c((function(){g(1,-1/0)})))||!!c((function(){g(1/0,1/0),g(NaN,1/0)}))},{toExponential:function(t){var e=o(this);if(void 0===t)return g(e);var r=a(t);if(!f(e))return String(e);if(r<0||r>20)throw u("Incorrect fraction digits");if(b)return g(e,r);var n="",i="",s=0,c="",x="";if(e<0&&(n="-",e=-e),0===e)s=0,i=v("0",r+1);else{var w=l(e);s=p(w);var _=0,E=m(10,s-r);2*e>=(2*(_=A(e/E))+1)*E&&(_+=1),_>=m(10,r+1)&&(_/=10,s+=1),i=h(_)}return 0!==r&&(i=y(i,0,1)+"."+y(i,1)),0===s?(c="+",x="0"):(c=s>0?"+":"-",x=h(d(s))),n+(i+"e")+c+x}})},56977:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(19303),o=r(50863),s=r(38415),l=r(47293),c=RangeError,u=String,h=Math.floor,f=i(s),d=i("".slice),p=i(1..toFixed),m=function(t,e,r){return 0===e?r:e%2==1?m(t,e-1,r*t):m(t*t,e/2,r)},A=function(t,e,r){for(var n=-1,i=r;++n<6;)i+=e*t[n],t[n]=i%1e7,i=h(i/1e7)},g=function(t,e){for(var r=6,n=0;--r>=0;)n+=t[r],t[r]=h(n/e),n=n%e*1e7},v=function(t){for(var e=6,r="";--e>=0;)if(""!==r||0===e||0!==t[e]){var n=u(t[e]);r=""===r?n:r+f("0",7-n.length)+n}return r};n({target:"Number",proto:!0,forced:l((function(){return"0.000"!==p(8e-5,3)||"1"!==p(.9,0)||"1.25"!==p(1.255,2)||"1000000000000000128"!==p(0xde0b6b3a7640080,0)}))||!l((function(){p({})}))},{toFixed:function(t){var e,r,n,i,s=o(this),l=a(t),h=[0,0,0,0,0,0],p="",y="0";if(l<0||l>20)throw c("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return u(s);if(s<0&&(p="-",s=-s),s>1e-21)if(r=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(s*m(2,69,1))-69)<0?s*m(2,-e,1):s/m(2,e,1),r*=4503599627370496,(e=52-e)>0){for(A(h,0,r),n=l;n>=7;)A(h,1e7,0),n-=7;for(A(h,m(10,n,1),0),n=e-1;n>=23;)g(h,1<<23),n-=23;g(h,1<0?p+((i=y.length)<=l?"0."+f("0",l-i)+y:d(y,0,i-l)+"."+d(y,i-l)):p+y}})},55147:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(47293),o=r(50863),s=i(1..toPrecision);n({target:"Number",proto:!0,forced:a((function(){return"1"!==s(1,void 0)}))||!a((function(){s({})}))},{toPrecision:function(t){return void 0===t?s(o(this)):s(o(this),t)}})},19601:(t,e,r)=>{var n=r(82109),i=r(21574);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},78011:(t,e,r)=>{r(82109)({target:"Object",stat:!0,sham:!r(19781)},{create:r(70030)})},59595:(t,e,r)=>{"use strict";var n=r(82109),i=r(19781),a=r(69026),o=r(19662),s=r(47908),l=r(3070);i&&n({target:"Object",proto:!0,forced:a},{__defineGetter__:function(t,e){l.f(s(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},33321:(t,e,r)=>{var n=r(82109),i=r(19781),a=r(36048).f;n({target:"Object",stat:!0,forced:Object.defineProperties!==a,sham:!i},{defineProperties:a})},69070:(t,e,r)=>{var n=r(82109),i=r(19781),a=r(3070).f;n({target:"Object",stat:!0,forced:Object.defineProperty!==a,sham:!i},{defineProperty:a})},35500:(t,e,r)=>{"use strict";var n=r(82109),i=r(19781),a=r(69026),o=r(19662),s=r(47908),l=r(3070);i&&n({target:"Object",proto:!0,forced:a},{__defineSetter__:function(t,e){l.f(s(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},69720:(t,e,r)=>{var n=r(82109),i=r(44699).entries;n({target:"Object",stat:!0},{entries:function(t){return i(t)}})},43371:(t,e,r)=>{var n=r(82109),i=r(76677),a=r(47293),o=r(70111),s=r(62423).onFreeze,l=Object.freeze;n({target:"Object",stat:!0,forced:a((function(){l(1)})),sham:!i},{freeze:function(t){return l&&o(t)?l(s(t)):t}})},38559:(t,e,r)=>{var n=r(82109),i=r(20408),a=r(86135);n({target:"Object",stat:!0},{fromEntries:function(t){var e={};return i(t,(function(t,r){a(e,t,r)}),{AS_ENTRIES:!0}),e}})},38880:(t,e,r)=>{var n=r(82109),i=r(47293),a=r(45656),o=r(31236).f,s=r(19781);n({target:"Object",stat:!0,forced:!s||i((function(){o(1)})),sham:!s},{getOwnPropertyDescriptor:function(t,e){return o(a(t),e)}})},49337:(t,e,r)=>{var n=r(82109),i=r(19781),a=r(53887),o=r(45656),s=r(31236),l=r(86135);n({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,r,n=o(t),i=s.f,c=a(n),u={},h=0;c.length>h;)void 0!==(r=i(n,e=c[h++]))&&l(u,e,r);return u}})},36210:(t,e,r)=>{var n=r(82109),i=r(47293),a=r(1156).f;n({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:a})},29660:(t,e,r)=>{var n=r(82109),i=r(36293),a=r(47293),o=r(25181),s=r(47908);n({target:"Object",stat:!0,forced:!i||a((function(){o.f(1)}))},{getOwnPropertySymbols:function(t){var e=o.f;return e?e(s(t)):[]}})},30489:(t,e,r)=>{var n=r(82109),i=r(47293),a=r(47908),o=r(79518),s=r(49920);n({target:"Object",stat:!0,forced:i((function(){o(1)})),sham:!s},{getPrototypeOf:function(t){return o(a(t))}})},46314:(t,e,r)=>{r(82109)({target:"Object",stat:!0},{hasOwn:r(92597)})},41825:(t,e,r)=>{var n=r(82109),i=r(52050);n({target:"Object",stat:!0,forced:Object.isExtensible!==i},{isExtensible:i})},98410:(t,e,r)=>{var n=r(82109),i=r(47293),a=r(70111),o=r(84326),s=r(7556),l=Object.isFrozen;n({target:"Object",stat:!0,forced:s||i((function(){l(1)}))},{isFrozen:function(t){return!a(t)||!(!s||"ArrayBuffer"!=o(t))||!!l&&l(t)}})},72200:(t,e,r)=>{var n=r(82109),i=r(47293),a=r(70111),o=r(84326),s=r(7556),l=Object.isSealed;n({target:"Object",stat:!0,forced:s||i((function(){l(1)}))},{isSealed:function(t){return!a(t)||!(!s||"ArrayBuffer"!=o(t))||!!l&&l(t)}})},43304:(t,e,r)=>{r(82109)({target:"Object",stat:!0},{is:r(81150)})},47941:(t,e,r)=>{var n=r(82109),i=r(47908),a=r(81956);n({target:"Object",stat:!0,forced:r(47293)((function(){a(1)}))},{keys:function(t){return a(i(t))}})},94869:(t,e,r)=>{"use strict";var n=r(82109),i=r(19781),a=r(69026),o=r(47908),s=r(34948),l=r(79518),c=r(31236).f;i&&n({target:"Object",proto:!0,forced:a},{__lookupGetter__:function(t){var e,r=o(this),n=s(t);do{if(e=c(r,n))return e.get}while(r=l(r))}})},33952:(t,e,r)=>{"use strict";var n=r(82109),i=r(19781),a=r(69026),o=r(47908),s=r(34948),l=r(79518),c=r(31236).f;i&&n({target:"Object",proto:!0,forced:a},{__lookupSetter__:function(t){var e,r=o(this),n=s(t);do{if(e=c(r,n))return e.set}while(r=l(r))}})},57227:(t,e,r)=>{var n=r(82109),i=r(70111),a=r(62423).onFreeze,o=r(76677),s=r(47293),l=Object.preventExtensions;n({target:"Object",stat:!0,forced:s((function(){l(1)})),sham:!o},{preventExtensions:function(t){return l&&i(t)?l(a(t)):t}})},67987:(t,e,r)=>{"use strict";var n=r(19781),i=r(47045),a=r(70111),o=r(47908),s=r(84488),l=Object.getPrototypeOf,c=Object.setPrototypeOf,u=Object.prototype,h="__proto__";if(n&&l&&c&&!(h in u))try{i(u,h,{configurable:!0,get:function(){return l(o(this))},set:function(t){var e=s(this);(a(t)||null===t)&&a(e)&&c(e,t)}})}catch(t){}},60514:(t,e,r)=>{var n=r(82109),i=r(70111),a=r(62423).onFreeze,o=r(76677),s=r(47293),l=Object.seal;n({target:"Object",stat:!0,forced:s((function(){l(1)})),sham:!o},{seal:function(t){return l&&i(t)?l(a(t)):t}})},68304:(t,e,r)=>{r(82109)({target:"Object",stat:!0},{setPrototypeOf:r(27674)})},41539:(t,e,r)=>{var n=r(51694),i=r(98052),a=r(90288);n||i(Object.prototype,"toString",a,{unsafe:!0})},26833:(t,e,r)=>{var n=r(82109),i=r(44699).values;n({target:"Object",stat:!0},{values:function(t){return i(t)}})},54678:(t,e,r)=>{var n=r(82109),i=r(2814);n({global:!0,forced:parseFloat!=i},{parseFloat:i})},91058:(t,e,r)=>{var n=r(82109),i=r(83009);n({global:!0,forced:parseInt!=i},{parseInt:i})},17922:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(19662),o=r(78523),s=r(12534),l=r(20408);n({target:"Promise",stat:!0,forced:r(80612)},{allSettled:function(t){var e=this,r=o.f(e),n=r.resolve,c=r.reject,u=s((function(){var r=a(e.resolve),o=[],s=0,c=1;l(t,(function(t){var a=s++,l=!1;c++,i(r,e,t).then((function(t){l||(l=!0,o[a]={status:"fulfilled",value:t},--c||n(o))}),(function(t){l||(l=!0,o[a]={status:"rejected",reason:t},--c||n(o))}))})),--c||n(o)}));return u.error&&c(u.value),r.promise}})},70821:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(19662),o=r(78523),s=r(12534),l=r(20408);n({target:"Promise",stat:!0,forced:r(80612)},{all:function(t){var e=this,r=o.f(e),n=r.resolve,c=r.reject,u=s((function(){var r=a(e.resolve),o=[],s=0,u=1;l(t,(function(t){var a=s++,l=!1;u++,i(r,e,t).then((function(t){l||(l=!0,o[a]=t,--u||n(o))}),c)})),--u||n(o)}));return u.error&&c(u.value),r.promise}})},34668:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(19662),o=r(35005),s=r(78523),l=r(12534),c=r(20408),u=r(80612),h="No one promise resolved";n({target:"Promise",stat:!0,forced:u},{any:function(t){var e=this,r=o("AggregateError"),n=s.f(e),u=n.resolve,f=n.reject,d=l((function(){var n=a(e.resolve),o=[],s=0,l=1,d=!1;c(t,(function(t){var a=s++,c=!1;l++,i(n,e,t).then((function(t){c||d||(d=!0,u(t))}),(function(t){c||d||(c=!0,o[a]=t,--l||f(new r(o,h)))}))})),--l||f(new r(o,h))}));return d.error&&f(d.value),n.promise}})},94164:(t,e,r)=>{"use strict";var n=r(82109),i=r(31913),a=r(63702).CONSTRUCTOR,o=r(2492),s=r(35005),l=r(60614),c=r(98052),u=o&&o.prototype;if(n({target:"Promise",proto:!0,forced:a,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&l(o)){var h=s("Promise").prototype.catch;u.catch!==h&&c(u,"catch",h,{unsafe:!0})}},43401:(t,e,r)=>{"use strict";var n,i,a,o=r(82109),s=r(31913),l=r(35268),c=r(17854),u=r(46916),h=r(98052),f=r(27674),d=r(58003),p=r(96340),m=r(19662),A=r(60614),g=r(70111),v=r(25787),y=r(36707),b=r(20261).set,x=r(95948),w=r(842),_=r(12534),E=r(18572),M=r(29909),S=r(2492),C=r(63702),T=r(78523),I="Promise",R=C.CONSTRUCTOR,B=C.REJECTION_EVENT,k=C.SUBCLASSING,L=M.getterFor(I),P=M.set,D=S&&S.prototype,U=S,O=D,F=c.TypeError,N=c.document,z=c.process,G=T.f,Z=G,V=!!(N&&N.createEvent&&c.dispatchEvent),Q="unhandledrejection",j=function(t){var e;return!(!g(t)||!A(e=t.then))&&e},W=function(t,e){var r,n,i,a=e.value,o=1==e.state,s=o?t.ok:t.fail,l=t.resolve,c=t.reject,h=t.domain;try{s?(o||(2===e.rejection&&J(e),e.rejection=1),!0===s?r=a:(h&&h.enter(),r=s(a),h&&(h.exit(),i=!0)),r===t.promise?c(F("Promise-chain cycle")):(n=j(r))?u(n,r,l,c):l(r)):c(a)}catch(t){h&&!i&&h.exit(),c(t)}},H=function(t,e){t.notified||(t.notified=!0,x((function(){for(var r,n=t.reactions;r=n.get();)W(r,t);t.notified=!1,e&&!t.rejection&&q(t)})))},X=function(t,e,r){var n,i;V?((n=N.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:e,reason:r},!B&&(i=c["on"+t])?i(n):t===Q&&w("Unhandled promise rejection",r)},q=function(t){u(b,c,(function(){var e,r=t.facade,n=t.value;if(Y(t)&&(e=_((function(){l?z.emit("unhandledRejection",n,r):X(Q,r,n)})),t.rejection=l||Y(t)?2:1,e.error))throw e.value}))},Y=function(t){return 1!==t.rejection&&!t.parent},J=function(t){u(b,c,(function(){var e=t.facade;l?z.emit("rejectionHandled",e):X("rejectionhandled",e,t.value)}))},K=function(t,e,r){return function(n){t(e,n,r)}},$=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,H(t,!0))},tt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw F("Promise can't be resolved itself");var n=j(e);n?x((function(){var r={done:!1};try{u(n,e,K(tt,r,t),K($,r,t))}catch(e){$(r,e,t)}})):(t.value=e,t.state=1,H(t,!1))}catch(e){$({done:!1},e,t)}}};if(R&&(O=(U=function(t){v(this,O),m(t),u(n,this);var e=L(this);try{t(K(tt,e),K($,e))}catch(t){$(e,t)}}).prototype,(n=function(t){P(this,{type:I,done:!1,notified:!1,parent:!1,reactions:new E,rejection:!1,state:0,value:void 0})}).prototype=h(O,"then",(function(t,e){var r=L(this),n=G(y(this,U));return r.parent=!0,n.ok=!A(t)||t,n.fail=A(e)&&e,n.domain=l?z.domain:void 0,0==r.state?r.reactions.add(n):x((function(){W(n,r)})),n.promise})),i=function(){var t=new n,e=L(t);this.promise=t,this.resolve=K(tt,e),this.reject=K($,e)},T.f=G=function(t){return t===U||void 0===t?new i(t):Z(t)},!s&&A(S)&&D!==Object.prototype)){a=D.then,k||h(D,"then",(function(t,e){var r=this;return new U((function(t,e){u(a,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete D.constructor}catch(t){}f&&f(D,O)}o({global:!0,constructor:!0,wrap:!0,forced:R},{Promise:U}),d(U,I,!1,!0),p(I)},17727:(t,e,r)=>{"use strict";var n=r(82109),i=r(31913),a=r(2492),o=r(47293),s=r(35005),l=r(60614),c=r(36707),u=r(69478),h=r(98052),f=a&&a.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!a&&o((function(){f.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=c(this,s("Promise")),r=l(t);return this.then(r?function(r){return u(e,t()).then((function(){return r}))}:t,r?function(r){return u(e,t()).then((function(){throw r}))}:t)}}),!i&&l(a)){var d=s("Promise").prototype.finally;f.finally!==d&&h(f,"finally",d,{unsafe:!0})}},88674:(t,e,r)=>{r(43401),r(70821),r(94164),r(6027),r(60683),r(96294)},6027:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(19662),o=r(78523),s=r(12534),l=r(20408);n({target:"Promise",stat:!0,forced:r(80612)},{race:function(t){var e=this,r=o.f(e),n=r.reject,c=s((function(){var o=a(e.resolve);l(t,(function(t){i(o,e,t).then(r.resolve,n)}))}));return c.error&&n(c.value),r.promise}})},60683:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(78523);n({target:"Promise",stat:!0,forced:r(63702).CONSTRUCTOR},{reject:function(t){var e=a.f(this);return i(e.reject,void 0,t),e.promise}})},96294:(t,e,r)=>{"use strict";var n=r(82109),i=r(35005),a=r(31913),o=r(2492),s=r(63702).CONSTRUCTOR,l=r(69478),c=i("Promise"),u=a&&!s;n({target:"Promise",stat:!0,forced:a||s},{resolve:function(t){return l(u&&this===c?o:this,t)}})},36535:(t,e,r)=>{var n=r(82109),i=r(22104),a=r(19662),o=r(19670);n({target:"Reflect",stat:!0,forced:!r(47293)((function(){Reflect.apply((function(){}))}))},{apply:function(t,e,r){return i(a(t),e,o(r))}})},12419:(t,e,r)=>{var n=r(82109),i=r(35005),a=r(22104),o=r(27065),s=r(39483),l=r(19670),c=r(70111),u=r(70030),h=r(47293),f=i("Reflect","construct"),d=Object.prototype,p=[].push,m=h((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),A=!h((function(){f((function(){}))})),g=m||A;n({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(t,e){s(t),l(e);var r=arguments.length<3?t:s(arguments[2]);if(A&&!m)return f(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return a(p,n,e),new(a(o,t,n))}var i=r.prototype,h=u(c(i)?i:d),g=a(t,h,e);return c(g)?g:h}})},69596:(t,e,r)=>{var n=r(82109),i=r(19781),a=r(19670),o=r(34948),s=r(3070);n({target:"Reflect",stat:!0,forced:r(47293)((function(){Reflect.defineProperty(s.f({},1,{value:1}),1,{value:2})})),sham:!i},{defineProperty:function(t,e,r){a(t);var n=o(e);a(r);try{return s.f(t,n,r),!0}catch(t){return!1}}})},52586:(t,e,r)=>{var n=r(82109),i=r(19670),a=r(31236).f;n({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var r=a(i(t),e);return!(r&&!r.configurable)&&delete t[e]}})},95683:(t,e,r)=>{var n=r(82109),i=r(19781),a=r(19670),o=r(31236);n({target:"Reflect",stat:!0,sham:!i},{getOwnPropertyDescriptor:function(t,e){return o.f(a(t),e)}})},39361:(t,e,r)=>{var n=r(82109),i=r(19670),a=r(79518);n({target:"Reflect",stat:!0,sham:!r(49920)},{getPrototypeOf:function(t){return a(i(t))}})},74819:(t,e,r)=>{var n=r(82109),i=r(46916),a=r(70111),o=r(19670),s=r(45032),l=r(31236),c=r(79518);n({target:"Reflect",stat:!0},{get:function t(e,r){var n,u,h=arguments.length<3?e:arguments[2];return o(e)===h?e[r]:(n=l.f(e,r))?s(n)?n.value:void 0===n.get?void 0:i(n.get,h):a(u=c(e))?t(u,r,h):void 0}})},51037:(t,e,r)=>{r(82109)({target:"Reflect",stat:!0},{has:function(t,e){return e in t}})},5898:(t,e,r)=>{var n=r(82109),i=r(19670),a=r(52050);n({target:"Reflect",stat:!0},{isExtensible:function(t){return i(t),a(t)}})},67556:(t,e,r)=>{r(82109)({target:"Reflect",stat:!0},{ownKeys:r(53887)})},14361:(t,e,r)=>{var n=r(82109),i=r(35005),a=r(19670);n({target:"Reflect",stat:!0,sham:!r(76677)},{preventExtensions:function(t){a(t);try{var e=i("Object","preventExtensions");return e&&e(t),!0}catch(t){return!1}}})},39532:(t,e,r)=>{var n=r(82109),i=r(19670),a=r(96077),o=r(27674);o&&n({target:"Reflect",stat:!0},{setPrototypeOf:function(t,e){i(t),a(e);try{return o(t,e),!0}catch(t){return!1}}})},83593:(t,e,r)=>{var n=r(82109),i=r(46916),a=r(19670),o=r(70111),s=r(45032),l=r(47293),c=r(3070),u=r(31236),h=r(79518),f=r(79114);n({target:"Reflect",stat:!0,forced:l((function(){var t=function(){},e=c.f(new t,"a",{configurable:!0});return!1!==Reflect.set(t.prototype,"a",1,e)}))},{set:function t(e,r,n){var l,d,p,m=arguments.length<4?e:arguments[3],A=u.f(a(e),r);if(!A){if(o(d=h(e)))return t(d,r,n,m);A=f(0)}if(s(A)){if(!1===A.writable||!o(m))return!1;if(l=u.f(m,r)){if(l.get||l.set||!1===l.writable)return!1;l.value=n,c.f(m,r,l)}else c.f(m,r,f(0,n))}else{if(void 0===(p=A.set))return!1;i(p,m,n)}return!0}})},81299:(t,e,r)=>{var n=r(82109),i=r(17854),a=r(58003);n({global:!0},{Reflect:{}}),a(i.Reflect,"Reflect",!0)},24603:(t,e,r)=>{var n=r(19781),i=r(17854),a=r(1702),o=r(54705),s=r(79587),l=r(68880),c=r(8006).f,u=r(47976),h=r(47850),f=r(41340),d=r(34706),p=r(52999),m=r(2626),A=r(98052),g=r(47293),v=r(92597),y=r(29909).enforce,b=r(96340),x=r(5112),w=r(9441),_=r(38173),E=x("match"),M=i.RegExp,S=M.prototype,C=i.SyntaxError,T=a(S.exec),I=a("".charAt),R=a("".replace),B=a("".indexOf),k=a("".slice),L=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,P=/a/g,D=/a/g,U=new M(P)!==P,O=p.MISSED_STICKY,F=p.UNSUPPORTED_Y;if(o("RegExp",n&&(!U||O||w||_||g((function(){return D[E]=!1,M(P)!=P||M(D)==D||"/a/i"!=M(P,"i")}))))){for(var N=function(t,e){var r,n,i,a,o,c,p=u(S,this),m=h(t),A=void 0===e,g=[],b=t;if(!p&&m&&A&&t.constructor===N)return t;if((m||u(S,t))&&(t=t.source,A&&(e=d(b))),t=void 0===t?"":f(t),e=void 0===e?"":f(e),b=t,w&&"dotAll"in P&&(n=!!e&&B(e,"s")>-1)&&(e=R(e,/s/g,"")),r=e,O&&"sticky"in P&&(i=!!e&&B(e,"y")>-1)&&F&&(e=R(e,/y/g,"")),_&&(a=function(t){for(var e,r=t.length,n=0,i="",a=[],o={},s=!1,l=!1,c=0,u="";n<=r;n++){if("\\"===(e=I(t,n)))e+=I(t,++n);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:T(L,k(t,n+1))&&(n+=2,l=!0),i+=e,c++;continue;case">"===e&&l:if(""===u||v(o,u))throw new C("Invalid capture group name");o[u]=!0,a[a.length]=[u,c],l=!1,u="";continue}l?u+=e:i+=e}return[i,a]}(t),t=a[0],g=a[1]),o=s(M(t,e),p?this:S,N),(n||i||g.length)&&(c=y(o),n&&(c.dotAll=!0,c.raw=N(function(t){for(var e,r=t.length,n=0,i="",a=!1;n<=r;n++)"\\"!==(e=I(t,n))?a||"."!==e?("["===e?a=!0:"]"===e&&(a=!1),i+=e):i+="[\\s\\S]":i+=e+I(t,++n);return i}(t),r)),i&&(c.sticky=!0),g.length&&(c.groups=g)),t!==b)try{l(o,"source",""===b?"(?:)":b)}catch(t){}return o},z=c(M),G=0;z.length>G;)m(N,M,z[G++]);S.constructor=N,N.prototype=S,A(i,"RegExp",N,{constructor:!0})}b("RegExp")},28450:(t,e,r)=>{var n=r(19781),i=r(9441),a=r(84326),o=r(47045),s=r(29909).get,l=RegExp.prototype,c=TypeError;n&&i&&o(l,"dotAll",{configurable:!0,get:function(){if(this!==l){if("RegExp"===a(this))return!!s(this).dotAll;throw c("Incompatible receiver, RegExp required")}}})},74916:(t,e,r)=>{"use strict";var n=r(82109),i=r(22261);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},92087:(t,e,r)=>{var n=r(17854),i=r(19781),a=r(47045),o=r(67066),s=r(47293),l=n.RegExp,c=l.prototype;i&&s((function(){var t=!0;try{l(".","d")}catch(e){t=!1}var e={},r="",n=t?"dgimsy":"gimsy",i=function(t,n){Object.defineProperty(e,t,{get:function(){return r+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var o in t&&(a.hasIndices="d"),a)i(o,a[o]);return Object.getOwnPropertyDescriptor(c,"flags").get.call(e)!==n||r!==n}))&&a(c,"flags",{configurable:!0,get:o})},88386:(t,e,r)=>{var n=r(19781),i=r(52999).MISSED_STICKY,a=r(84326),o=r(47045),s=r(29909).get,l=RegExp.prototype,c=TypeError;n&&i&&o(l,"sticky",{configurable:!0,get:function(){if(this!==l){if("RegExp"===a(this))return!!s(this).sticky;throw c("Incompatible receiver, RegExp required")}}})},77601:(t,e,r)=>{"use strict";r(74916);var n,i,a=r(82109),o=r(46916),s=r(60614),l=r(19670),c=r(41340),u=(n=!1,(i=/[ac]/).exec=function(){return n=!0,/./.exec.apply(this,arguments)},!0===i.test("abc")&&n),h=/./.test;a({target:"RegExp",proto:!0,forced:!u},{test:function(t){var e=l(this),r=c(t),n=e.exec;if(!s(n))return o(h,e,r);var i=o(n,e,r);return null!==i&&(l(i),!0)}})},39714:(t,e,r)=>{"use strict";var n=r(76530).PROPER,i=r(98052),a=r(19670),o=r(41340),s=r(47293),l=r(34706),c="toString",u=RegExp.prototype[c],h=s((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),f=n&&u.name!=c;(h||f)&&i(RegExp.prototype,c,(function(){var t=a(this);return"/"+o(t.source)+"/"+o(l(t))}),{unsafe:!0})},37227:(t,e,r)=>{"use strict";r(77710)("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(95631))},70189:(t,e,r)=>{r(37227)},15218:(t,e,r)=>{"use strict";var n=r(82109),i=r(14230);n({target:"String",proto:!0,forced:r(43429)("anchor")},{anchor:function(t){return i(this,"a","name",t)}})},24506:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(84488),o=r(19303),s=r(41340),l=r(47293),c=i("".charAt);n({target:"String",proto:!0,forced:l((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(t){var e=s(a(this)),r=e.length,n=o(t),i=n>=0?n:r+n;return i<0||i>=r?void 0:c(e,i)}})},74475:(t,e,r)=>{"use strict";var n=r(82109),i=r(14230);n({target:"String",proto:!0,forced:r(43429)("big")},{big:function(){return i(this,"big","","")}})},57929:(t,e,r)=>{"use strict";var n=r(82109),i=r(14230);n({target:"String",proto:!0,forced:r(43429)("blink")},{blink:function(){return i(this,"blink","","")}})},50915:(t,e,r)=>{"use strict";var n=r(82109),i=r(14230);n({target:"String",proto:!0,forced:r(43429)("bold")},{bold:function(){return i(this,"b","","")}})},79841:(t,e,r)=>{"use strict";var n=r(82109),i=r(28710).codeAt;n({target:"String",proto:!0},{codePointAt:function(t){return i(this,t)}})},27852:(t,e,r)=>{"use strict";var n,i=r(82109),a=r(21470),o=r(31236).f,s=r(17466),l=r(41340),c=r(3929),u=r(84488),h=r(84964),f=r(31913),d=a("".endsWith),p=a("".slice),m=Math.min,A=h("endsWith");i({target:"String",proto:!0,forced:!(!f&&!A&&(n=o(String.prototype,"endsWith"),n&&!n.writable)||A)},{endsWith:function(t){var e=l(u(this));c(t);var r=arguments.length>1?arguments[1]:void 0,n=e.length,i=void 0===r?n:m(s(r),n),a=l(t);return d?d(e,a,i):p(e,i-a.length,i)===a}})},29253:(t,e,r)=>{"use strict";var n=r(82109),i=r(14230);n({target:"String",proto:!0,forced:r(43429)("fixed")},{fixed:function(){return i(this,"tt","","")}})},42125:(t,e,r)=>{"use strict";var n=r(82109),i=r(14230);n({target:"String",proto:!0,forced:r(43429)("fontcolor")},{fontcolor:function(t){return i(this,"font","color",t)}})},78830:(t,e,r)=>{"use strict";var n=r(82109),i=r(14230);n({target:"String",proto:!0,forced:r(43429)("fontsize")},{fontsize:function(t){return i(this,"font","size",t)}})},94953:(t,e,r)=>{var n=r(82109),i=r(1702),a=r(51400),o=RangeError,s=String.fromCharCode,l=String.fromCodePoint,c=i([].join);n({target:"String",stat:!0,arity:1,forced:!!l&&1!=l.length},{fromCodePoint:function(t){for(var e,r=[],n=arguments.length,i=0;n>i;){if(e=+arguments[i++],a(e,1114111)!==e)throw o(e+" is not a valid code point");r[i]=e<65536?s(e):s(55296+((e-=65536)>>10),e%1024+56320)}return c(r,"")}})},32023:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(3929),o=r(84488),s=r(41340),l=r(84964),c=i("".indexOf);n({target:"String",proto:!0,forced:!l("includes")},{includes:function(t){return!!~c(s(o(this)),s(a(t)),arguments.length>1?arguments[1]:void 0)}})},20787:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(84488),o=r(41340),s=i("".charCodeAt);n({target:"String",proto:!0},{isWellFormed:function(){for(var t=o(a(this)),e=t.length,r=0;r=56320||++r>=e||56320!=(64512&s(t,r))))return!1}return!0}})},58734:(t,e,r)=>{"use strict";var n=r(82109),i=r(14230);n({target:"String",proto:!0,forced:r(43429)("italics")},{italics:function(){return i(this,"i","","")}})},78783:(t,e,r)=>{"use strict";var n=r(28710).charAt,i=r(41340),a=r(29909),o=r(51656),s=r(76178),l="String Iterator",c=a.set,u=a.getterFor(l);o(String,"String",(function(t){c(this,{type:l,string:i(t),index:0})}),(function(){var t,e=u(this),r=e.string,i=e.index;return i>=r.length?s(void 0,!0):(t=n(r,i),e.index+=t.length,s(t,!1))}))},29254:(t,e,r)=>{"use strict";var n=r(82109),i=r(14230);n({target:"String",proto:!0,forced:r(43429)("link")},{link:function(t){return i(this,"a","href",t)}})},76373:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(21470),o=r(63061),s=r(76178),l=r(84488),c=r(17466),u=r(41340),h=r(19670),f=r(68554),d=r(84326),p=r(47850),m=r(34706),A=r(58173),g=r(98052),v=r(47293),y=r(5112),b=r(36707),x=r(31530),w=r(97651),_=r(29909),E=r(31913),M=y("matchAll"),S="RegExp String",C=S+" Iterator",T=_.set,I=_.getterFor(C),R=RegExp.prototype,B=TypeError,k=a("".indexOf),L=a("".matchAll),P=!!L&&!v((function(){L("a",/./)})),D=o((function(t,e,r,n){T(this,{type:C,regexp:t,string:e,global:r,unicode:n,done:!1})}),S,(function(){var t=I(this);if(t.done)return s(void 0,!0);var e=t.regexp,r=t.string,n=w(e,r);return null===n?(t.done=!0,s(void 0,!0)):t.global?(""===u(n[0])&&(e.lastIndex=x(r,c(e.lastIndex),t.unicode)),s(n,!1)):(t.done=!0,s(n,!1))})),U=function(t){var e,r,n,i=h(this),a=u(t),o=b(i,RegExp),s=u(m(i));return e=new o(o===RegExp?i.source:i,s),r=!!~k(s,"g"),n=!!~k(s,"u"),e.lastIndex=c(i.lastIndex),new D(e,a,r,n)};n({target:"String",proto:!0,forced:P},{matchAll:function(t){var e,r,n,a,o=l(this);if(f(t)){if(P)return L(o,t)}else{if(p(t)&&(e=u(l(m(t))),!~k(e,"g")))throw B("`.matchAll` does not allow non-global regexes");if(P)return L(o,t);if(void 0===(n=A(t,M))&&E&&"RegExp"==d(t)&&(n=U),n)return i(n,t,o)}return r=u(o),a=new RegExp(t,"g"),E?i(U,a,r):a[M](r)}}),E||M in R||g(R,M,U)},4723:(t,e,r)=>{"use strict";var n=r(46916),i=r(27007),a=r(19670),o=r(68554),s=r(17466),l=r(41340),c=r(84488),u=r(58173),h=r(31530),f=r(97651);i("match",(function(t,e,r){return[function(e){var r=c(this),i=o(e)?void 0:u(e,t);return i?n(i,e,r):new RegExp(e)[t](l(r))},function(t){var n=a(this),i=l(t),o=r(e,n,i);if(o.done)return o.value;if(!n.global)return f(n,i);var c=n.unicode;n.lastIndex=0;for(var u,d=[],p=0;null!==(u=f(n,i));){var m=l(u[0]);d[p]=m,""===m&&(n.lastIndex=h(i,s(n.lastIndex),c)),p++}return 0===p?null:d}]}))},66528:(t,e,r)=>{"use strict";var n=r(82109),i=r(76650).end;n({target:"String",proto:!0,forced:r(54986)},{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},83112:(t,e,r)=>{"use strict";var n=r(82109),i=r(76650).start;n({target:"String",proto:!0,forced:r(54986)},{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},38992:(t,e,r)=>{var n=r(82109),i=r(1702),a=r(45656),o=r(47908),s=r(41340),l=r(26244),c=i([].push),u=i([].join);n({target:"String",stat:!0},{raw:function(t){var e=a(o(t).raw),r=l(e);if(!r)return"";for(var n=arguments.length,i=[],h=0;;){if(c(i,s(e[h++])),h===r)return u(i,"");h{r(82109)({target:"String",proto:!0},{repeat:r(38415)})},68757:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(1702),o=r(84488),s=r(60614),l=r(68554),c=r(47850),u=r(41340),h=r(58173),f=r(34706),d=r(10647),p=r(5112),m=r(31913),A=p("replace"),g=TypeError,v=a("".indexOf),y=a("".replace),b=a("".slice),x=Math.max,w=function(t,e,r){return r>t.length?-1:""===e?r:v(t,e,r)};n({target:"String",proto:!0},{replaceAll:function(t,e){var r,n,a,p,_,E,M,S,C,T=o(this),I=0,R=0,B="";if(!l(t)){if((r=c(t))&&(n=u(o(f(t))),!~v(n,"g")))throw g("`.replaceAll` does not allow non-global regexes");if(a=h(t,A))return i(a,t,T,e);if(m&&r)return y(u(T),t,e)}for(p=u(T),_=u(t),(E=s(e))||(e=u(e)),M=_.length,S=x(1,M),I=w(p,_,0);-1!==I;)C=E?u(e(_,I,p)):d(_,p,I,[],void 0,e),B+=b(p,R,I)+C,R=I+M,I=w(p,_,I+S);return R{"use strict";var n=r(22104),i=r(46916),a=r(1702),o=r(27007),s=r(47293),l=r(19670),c=r(60614),u=r(68554),h=r(19303),f=r(17466),d=r(41340),p=r(84488),m=r(31530),A=r(58173),g=r(10647),v=r(97651),y=r(5112)("replace"),b=Math.max,x=Math.min,w=a([].concat),_=a([].push),E=a("".indexOf),M=a("".slice),S="$0"==="a".replace(/./,"$0"),C=!!/./[y]&&""===/./[y]("a","$0");o("replace",(function(t,e,r){var a=C?"$":"$0";return[function(t,r){var n=p(this),a=u(t)?void 0:A(t,y);return a?i(a,t,n,r):i(e,d(n),t,r)},function(t,i){var o=l(this),s=d(t);if("string"==typeof i&&-1===E(i,a)&&-1===E(i,"$<")){var u=r(e,o,s,i);if(u.done)return u.value}var p=c(i);p||(i=d(i));var A=o.global;if(A){var y=o.unicode;o.lastIndex=0}for(var S=[];;){var C=v(o,s);if(null===C)break;if(_(S,C),!A)break;""===d(C[0])&&(o.lastIndex=m(s,f(o.lastIndex),y))}for(var T,I="",R=0,B=0;B=R&&(I+=M(s,R,L)+F,R=L+k.length)}return I+M(s,R)}]}),!!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}))||!S||C)},64765:(t,e,r)=>{"use strict";var n=r(46916),i=r(27007),a=r(19670),o=r(68554),s=r(84488),l=r(81150),c=r(41340),u=r(58173),h=r(97651);i("search",(function(t,e,r){return[function(e){var r=s(this),i=o(e)?void 0:u(e,t);return i?n(i,e,r):new RegExp(e)[t](c(r))},function(t){var n=a(this),i=c(t),o=r(e,n,i);if(o.done)return o.value;var s=n.lastIndex;l(s,0)||(n.lastIndex=0);var u=h(n,i);return l(n.lastIndex,s)||(n.lastIndex=s),null===u?-1:u.index}]}))},37268:(t,e,r)=>{"use strict";var n=r(82109),i=r(14230);n({target:"String",proto:!0,forced:r(43429)("small")},{small:function(){return i(this,"small","","")}})},23123:(t,e,r)=>{"use strict";var n=r(22104),i=r(46916),a=r(1702),o=r(27007),s=r(19670),l=r(68554),c=r(47850),u=r(84488),h=r(36707),f=r(31530),d=r(17466),p=r(41340),m=r(58173),A=r(41589),g=r(97651),v=r(22261),y=r(52999),b=r(47293),x=y.UNSUPPORTED_Y,w=4294967295,_=Math.min,E=[].push,M=a(/./.exec),S=a(E),C=a("".slice);o("split",(function(t,e,r){var a;return a="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var a=p(u(this)),o=void 0===r?w:r>>>0;if(0===o)return[];if(void 0===t)return[a];if(!c(t))return i(e,a,t,o);for(var s,l,h,f=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),m=0,g=new RegExp(t.source,d+"g");(s=i(v,g,a))&&!((l=g.lastIndex)>m&&(S(f,C(a,m,s.index)),s.length>1&&s.index=o));)g.lastIndex===s.index&&g.lastIndex++;return m===a.length?!h&&M(g,"")||S(f,""):S(f,C(a,m)),f.length>o?A(f,0,o):f}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:i(e,this,t,r)}:e,[function(e,r){var n=u(this),o=l(e)?void 0:m(e,t);return o?i(o,e,n,r):i(a,p(n),e,r)},function(t,n){var i=s(this),o=p(t),l=r(a,i,o,n,a!==e);if(l.done)return l.value;var c=h(i,RegExp),u=i.unicode,m=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(x?"g":"y"),A=new c(x?"^(?:"+i.source+")":i,m),v=void 0===n?w:n>>>0;if(0===v)return[];if(0===o.length)return null===g(A,o)?[o]:[];for(var y=0,b=0,E=[];b{"use strict";var n,i=r(82109),a=r(21470),o=r(31236).f,s=r(17466),l=r(41340),c=r(3929),u=r(84488),h=r(84964),f=r(31913),d=a("".startsWith),p=a("".slice),m=Math.min,A=h("startsWith");i({target:"String",proto:!0,forced:!(!f&&!A&&(n=o(String.prototype,"startsWith"),n&&!n.writable)||A)},{startsWith:function(t){var e=l(u(this));c(t);var r=s(m(arguments.length>1?arguments[1]:void 0,e.length)),n=l(t);return d?d(e,n,r):p(e,r,r+n.length)===n}})},7397:(t,e,r)=>{"use strict";var n=r(82109),i=r(14230);n({target:"String",proto:!0,forced:r(43429)("strike")},{strike:function(){return i(this,"strike","","")}})},60086:(t,e,r)=>{"use strict";var n=r(82109),i=r(14230);n({target:"String",proto:!0,forced:r(43429)("sub")},{sub:function(){return i(this,"sub","","")}})},83650:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(84488),o=r(19303),s=r(41340),l=i("".slice),c=Math.max,u=Math.min;n({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(t,e){var r,n,i=s(a(this)),h=i.length,f=o(t);return f===1/0&&(f=0),f<0&&(f=c(h+f,0)),(r=void 0===e?h:o(e))<=0||r===1/0||f>=(n=u(f+r,h))?"":l(i,f,n)}})},80623:(t,e,r)=>{"use strict";var n=r(82109),i=r(14230);n({target:"String",proto:!0,forced:r(43429)("sup")},{sup:function(){return i(this,"sup","","")}})},57442:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(1702),o=r(84488),s=r(41340),l=r(47293),c=Array,u=a("".charAt),h=a("".charCodeAt),f=a([].join),d="".toWellFormed,p=d&&l((function(){return"1"!==i(d,1)}));n({target:"String",proto:!0,forced:p},{toWellFormed:function(){var t=s(o(this));if(p)return i(d,t);for(var e=t.length,r=c(e),n=0;n=56320||n+1>=e||56320!=(64512&h(t,n+1))?r[n]="�":(r[n]=u(t,n),r[++n]=u(t,n))}return f(r,"")}})},48702:(t,e,r)=>{r(83462);var n=r(82109),i=r(10365);n({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==i},{trimEnd:i})},99967:(t,e,r)=>{var n=r(82109),i=r(33217);n({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==i},{trimLeft:i})},83462:(t,e,r)=>{var n=r(82109),i=r(10365);n({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==i},{trimRight:i})},55674:(t,e,r)=>{r(99967);var n=r(82109),i=r(33217);n({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==i},{trimStart:i})},73210:(t,e,r)=>{"use strict";var n=r(82109),i=r(53111).trim;n({target:"String",proto:!0,forced:r(76091)("trim")},{trim:function(){return i(this)}})},72443:(t,e,r)=>{r(26800)("asyncIterator")},4032:(t,e,r)=>{"use strict";var n=r(82109),i=r(17854),a=r(46916),o=r(1702),s=r(31913),l=r(19781),c=r(36293),u=r(47293),h=r(92597),f=r(47976),d=r(19670),p=r(45656),m=r(34948),A=r(41340),g=r(79114),v=r(70030),y=r(81956),b=r(8006),x=r(1156),w=r(25181),_=r(31236),E=r(3070),M=r(36048),S=r(55296),C=r(98052),T=r(47045),I=r(72309),R=r(6200),B=r(3501),k=r(69711),L=r(5112),P=r(6061),D=r(26800),U=r(56532),O=r(58003),F=r(29909),N=r(42092).forEach,z=R("hidden"),G="Symbol",Z="prototype",V=F.set,Q=F.getterFor(G),j=Object[Z],W=i.Symbol,H=W&&W[Z],X=i.TypeError,q=i.QObject,Y=_.f,J=E.f,K=x.f,$=S.f,tt=o([].push),et=I("symbols"),rt=I("op-symbols"),nt=I("wks"),it=!q||!q[Z]||!q[Z].findChild,at=l&&u((function(){return 7!=v(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=Y(j,e);n&&delete j[e],J(t,e,r),n&&t!==j&&J(j,e,n)}:J,ot=function(t,e){var r=et[t]=v(H);return V(r,{type:G,tag:t,description:e}),l||(r.description=e),r},st=function(t,e,r){t===j&&st(rt,e,r),d(t);var n=m(e);return d(r),h(et,n)?(r.enumerable?(h(t,z)&&t[z][n]&&(t[z][n]=!1),r=v(r,{enumerable:g(0,!1)})):(h(t,z)||J(t,z,g(1,{})),t[z][n]=!0),at(t,n,r)):J(t,n,r)},lt=function(t,e){d(t);var r=p(e),n=y(r).concat(ft(r));return N(n,(function(e){l&&!a(ct,r,e)||st(t,e,r[e])})),t},ct=function(t){var e=m(t),r=a($,this,e);return!(this===j&&h(et,e)&&!h(rt,e))&&(!(r||!h(this,e)||!h(et,e)||h(this,z)&&this[z][e])||r)},ut=function(t,e){var r=p(t),n=m(e);if(r!==j||!h(et,n)||h(rt,n)){var i=Y(r,n);return!i||!h(et,n)||h(r,z)&&r[z][n]||(i.enumerable=!0),i}},ht=function(t){var e=K(p(t)),r=[];return N(e,(function(t){h(et,t)||h(B,t)||tt(r,t)})),r},ft=function(t){var e=t===j,r=K(e?rt:p(t)),n=[];return N(r,(function(t){!h(et,t)||e&&!h(j,t)||tt(n,et[t])})),n};c||(C(H=(W=function(){if(f(H,this))throw X("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?A(arguments[0]):void 0,e=k(t),r=function(t){this===j&&a(r,rt,t),h(this,z)&&h(this[z],e)&&(this[z][e]=!1),at(this,e,g(1,t))};return l&&it&&at(j,e,{configurable:!0,set:r}),ot(e,t)})[Z],"toString",(function(){return Q(this).tag})),C(W,"withoutSetter",(function(t){return ot(k(t),t)})),S.f=ct,E.f=st,M.f=lt,_.f=ut,b.f=x.f=ht,w.f=ft,P.f=function(t){return ot(L(t),t)},l&&(T(H,"description",{configurable:!0,get:function(){return Q(this).description}}),s||C(j,"propertyIsEnumerable",ct,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:W}),N(y(nt),(function(t){D(t)})),n({target:G,stat:!0,forced:!c},{useSetter:function(){it=!0},useSimple:function(){it=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!l},{create:function(t,e){return void 0===e?v(t):lt(v(t),e)},defineProperty:st,defineProperties:lt,getOwnPropertyDescriptor:ut}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ht}),U(),O(W,G),B[z]=!0},41817:(t,e,r)=>{"use strict";var n=r(82109),i=r(19781),a=r(17854),o=r(1702),s=r(92597),l=r(60614),c=r(47976),u=r(41340),h=r(47045),f=r(99920),d=a.Symbol,p=d&&d.prototype;if(i&&l(d)&&(!("description"in p)||void 0!==d().description)){var m={},A=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:u(arguments[0]),e=c(p,this)?new d(t):void 0===t?d():d(t);return""===t&&(m[e]=!0),e};f(A,d),A.prototype=p,p.constructor=A;var g="Symbol(test)"==String(d("test")),v=o(p.valueOf),y=o(p.toString),b=/^Symbol\((.*)\)[^)]+$/,x=o("".replace),w=o("".slice);h(p,"description",{configurable:!0,get:function(){var t=v(this);if(s(m,t))return"";var e=y(t),r=g?w(e,7,-1):x(e,b,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:A})}},40763:(t,e,r)=>{var n=r(82109),i=r(35005),a=r(92597),o=r(41340),s=r(72309),l=r(2015),c=s("string-to-symbol-registry"),u=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!l},{for:function(t){var e=o(t);if(a(c,e))return c[e];var r=i("Symbol")(e);return c[e]=r,u[r]=e,r}})},92401:(t,e,r)=>{r(26800)("hasInstance")},8722:(t,e,r)=>{r(26800)("isConcatSpreadable")},32165:(t,e,r)=>{r(26800)("iterator")},82526:(t,e,r)=>{r(4032),r(40763),r(26620),r(38862),r(29660)},26620:(t,e,r)=>{var n=r(82109),i=r(92597),a=r(52190),o=r(66330),s=r(72309),l=r(2015),c=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!l},{keyFor:function(t){if(!a(t))throw TypeError(o(t)+" is not a symbol");if(i(c,t))return c[t]}})},16066:(t,e,r)=>{r(26800)("matchAll")},69007:(t,e,r)=>{r(26800)("match")},83510:(t,e,r)=>{r(26800)("replace")},41840:(t,e,r)=>{r(26800)("search")},6982:(t,e,r)=>{r(26800)("species")},32159:(t,e,r)=>{r(26800)("split")},96649:(t,e,r)=>{var n=r(26800),i=r(56532);n("toPrimitive"),i()},39341:(t,e,r)=>{var n=r(35005),i=r(26800),a=r(58003);i("toStringTag"),a(n("Symbol"),"Symbol")},60543:(t,e,r)=>{r(26800)("unscopables")},48675:(t,e,r)=>{"use strict";var n=r(90260),i=r(26244),a=r(19303),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("at",(function(t){var e=o(this),r=i(e),n=a(t),s=n>=0?n:r+n;return s<0||s>=r?void 0:e[s]}))},92990:(t,e,r)=>{"use strict";var n=r(1702),i=r(90260),a=n(r(1048)),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(t,e){return a(o(this),t,e,arguments.length>2?arguments[2]:void 0)}))},18927:(t,e,r)=>{"use strict";var n=r(90260),i=r(42092).every,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},33105:(t,e,r)=>{"use strict";var n=r(90260),i=r(21285),a=r(64599),o=r(70648),s=r(46916),l=r(1702),c=r(47293),u=n.aTypedArray,h=n.exportTypedArrayMethod,f=l("".slice);h("fill",(function(t){var e=arguments.length;u(this);var r="Big"===f(o(this),0,3)?a(t):+t;return s(i,this,r,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),c((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})))},35035:(t,e,r)=>{"use strict";var n=r(90260),i=r(42092).filter,a=r(43074),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(t){var e=i(o(this),t,arguments.length>1?arguments[1]:void 0);return a(this,e)}))},7174:(t,e,r)=>{"use strict";var n=r(90260),i=r(42092).findIndex,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},14590:(t,e,r)=>{"use strict";var n=r(90260),i=r(9671).findLastIndex,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLastIndex",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},63408:(t,e,r)=>{"use strict";var n=r(90260),i=r(9671).findLast,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLast",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},74345:(t,e,r)=>{"use strict";var n=r(90260),i=r(42092).find,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},44197:(t,e,r)=>{r(19843)("Float32",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},76495:(t,e,r)=>{r(19843)("Float64",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},32846:(t,e,r)=>{"use strict";var n=r(90260),i=r(42092).forEach,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(t){i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},98145:(t,e,r)=>{"use strict";var n=r(63832);(0,r(90260).exportTypedArrayStaticMethod)("from",r(97321),n)},44731:(t,e,r)=>{"use strict";var n=r(90260),i=r(41318).includes,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},77209:(t,e,r)=>{"use strict";var n=r(90260),i=r(41318).indexOf,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},35109:(t,e,r)=>{r(19843)("Int16",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},65125:(t,e,r)=>{r(19843)("Int32",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},87145:(t,e,r)=>{r(19843)("Int8",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},96319:(t,e,r)=>{"use strict";var n=r(17854),i=r(47293),a=r(1702),o=r(90260),s=r(66992),l=r(5112)("iterator"),c=n.Uint8Array,u=a(s.values),h=a(s.keys),f=a(s.entries),d=o.aTypedArray,p=o.exportTypedArrayMethod,m=c&&c.prototype,A=!i((function(){m[l].call([1])})),g=!!m&&m.values&&m[l]===m.values&&"values"===m.values.name,v=function(){return u(d(this))};p("entries",(function(){return f(d(this))}),A),p("keys",(function(){return h(d(this))}),A),p("values",v,A||!g,{name:"values"}),p(l,v,A||!g,{name:"values"})},58867:(t,e,r)=>{"use strict";var n=r(90260),i=r(1702),a=n.aTypedArray,o=n.exportTypedArrayMethod,s=i([].join);o("join",(function(t){return s(a(this),t)}))},37789:(t,e,r)=>{"use strict";var n=r(90260),i=r(22104),a=r(86583),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(t){var e=arguments.length;return i(a,o(this),e>1?[t,arguments[1]]:[t])}))},33739:(t,e,r)=>{"use strict";var n=r(90260),i=r(42092).map,a=r(66304),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("map",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(a(t))(e)}))}))},95206:(t,e,r)=>{"use strict";var n=r(90260),i=r(63832),a=n.aTypedArrayConstructor;(0,n.exportTypedArrayStaticMethod)("of",(function(){for(var t=0,e=arguments.length,r=new(a(this))(e);e>t;)r[t]=arguments[t++];return r}),i)},14483:(t,e,r)=>{"use strict";var n=r(90260),i=r(53671).right,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(t){var e=arguments.length;return i(a(this),t,e,e>1?arguments[1]:void 0)}))},29368:(t,e,r)=>{"use strict";var n=r(90260),i=r(53671).left,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(t){var e=arguments.length;return i(a(this),t,e,e>1?arguments[1]:void 0)}))},12056:(t,e,r)=>{"use strict";var n=r(90260),i=n.aTypedArray,a=n.exportTypedArrayMethod,o=Math.floor;a("reverse",(function(){for(var t,e=this,r=i(e).length,n=o(r/2),a=0;a{"use strict";var n=r(17854),i=r(46916),a=r(90260),o=r(26244),s=r(84590),l=r(47908),c=r(47293),u=n.RangeError,h=n.Int8Array,f=h&&h.prototype,d=f&&f.set,p=a.aTypedArray,m=a.exportTypedArrayMethod,A=!c((function(){var t=new Uint8ClampedArray(2);return i(d,t,{length:1,0:3},1),3!==t[1]})),g=A&&a.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var t=new h(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));m("set",(function(t){p(this);var e=s(arguments.length>1?arguments[1]:void 0,1),r=l(t);if(A)return i(d,this,r,e);var n=this.length,a=o(r),c=0;if(a+e>n)throw u("Wrong length");for(;c{"use strict";var n=r(90260),i=r(66304),a=r(47293),o=r(50206),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("slice",(function(t,e){for(var r=o(s(this),t,e),n=i(this),a=0,l=r.length,c=new n(l);l>a;)c[a]=r[a++];return c}),a((function(){new Int8Array(1).slice()})))},27462:(t,e,r)=>{"use strict";var n=r(90260),i=r(42092).some,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},33824:(t,e,r)=>{"use strict";var n=r(17854),i=r(21470),a=r(47293),o=r(19662),s=r(94362),l=r(90260),c=r(68886),u=r(30256),h=r(7392),f=r(98008),d=l.aTypedArray,p=l.exportTypedArrayMethod,m=n.Uint16Array,A=m&&i(m.prototype.sort),g=!(!A||a((function(){A(new m(2),null)}))&&a((function(){A(new m(2),{})}))),v=!!A&&!a((function(){if(h)return h<74;if(c)return c<67;if(u)return!0;if(f)return f<602;var t,e,r=new m(516),n=Array(516);for(t=0;t<516;t++)e=t%4,r[t]=515-t,n[t]=t-2*e+3;for(A(r,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(r[t]!==n[t])return!0}));p("sort",(function(t){return void 0!==t&&o(t),v?A(this,t):s(d(this),function(t){return function(e,r){return void 0!==t?+t(e,r)||0:r!=r?-1:e!=e?1:0===e&&0===r?1/e>0&&1/r<0?1:-1:e>r}}(t))}),!v||g)},55021:(t,e,r)=>{"use strict";var n=r(90260),i=r(17466),a=r(51400),o=r(66304),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("subarray",(function(t,e){var r=s(this),n=r.length,l=a(t,n);return new(o(r))(r.buffer,r.byteOffset+l*r.BYTES_PER_ELEMENT,i((void 0===e?n:a(e,n))-l))}))},12974:(t,e,r)=>{"use strict";var n=r(17854),i=r(22104),a=r(90260),o=r(47293),s=r(50206),l=n.Int8Array,c=a.aTypedArray,u=a.exportTypedArrayMethod,h=[].toLocaleString,f=!!l&&o((function(){h.call(new l(1))}));u("toLocaleString",(function(){return i(h,f?s(c(this)):c(this),s(arguments))}),o((function(){return[1,2].toLocaleString()!=new l([1,2]).toLocaleString()}))||!o((function(){l.prototype.toLocaleString.call([1,2])})))},1439:(t,e,r)=>{"use strict";var n=r(21843),i=r(90260),a=i.aTypedArray,o=i.exportTypedArrayMethod,s=i.getTypedArrayConstructor;o("toReversed",(function(){return n(a(this),s(this))}))},87585:(t,e,r)=>{"use strict";var n=r(90260),i=r(1702),a=r(19662),o=r(97745),s=n.aTypedArray,l=n.getTypedArrayConstructor,c=n.exportTypedArrayMethod,u=i(n.TypedArrayPrototype.sort);c("toSorted",(function(t){void 0!==t&&a(t);var e=s(this),r=o(l(e),e);return u(r,t)}))},15016:(t,e,r)=>{"use strict";var n=r(90260).exportTypedArrayMethod,i=r(47293),a=r(17854),o=r(1702),s=a.Uint8Array,l=s&&s.prototype||{},c=[].toString,u=o([].join);i((function(){c.call({})}))&&(c=function(){return u(this)});var h=l.toString!=c;n("toString",c,h)},8255:(t,e,r)=>{r(19843)("Uint16",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},29135:(t,e,r)=>{r(19843)("Uint32",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},82472:(t,e,r)=>{r(19843)("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},49743:(t,e,r)=>{r(19843)("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}),!0)},55315:(t,e,r)=>{"use strict";var n=r(11572),i=r(90260),a=r(44067),o=r(19303),s=r(64599),l=i.aTypedArray,c=i.getTypedArrayConstructor,u=i.exportTypedArrayMethod,h=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();u("with",{with:function(t,e){var r=l(this),i=o(t),u=a(r)?s(e):+e;return n(r,c(r),i,u)}}.with,!h)},78221:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(41340),o=String.fromCharCode,s=i("".charAt),l=i(/./.exec),c=i("".slice),u=/^[\da-f]{2}$/i,h=/^[\da-f]{4}$/i;n({global:!0},{unescape:function(t){for(var e,r,n=a(t),i="",f=n.length,d=0;d{"use strict";var n,i=r(76677),a=r(17854),o=r(1702),s=r(89190),l=r(62423),c=r(77710),u=r(29320),h=r(70111),f=r(29909).enforce,d=r(47293),p=r(94811),m=Object,A=Array.isArray,g=m.isExtensible,v=m.isFrozen,y=m.isSealed,b=m.freeze,x=m.seal,w={},_={},E=!a.ActiveXObject&&"ActiveXObject"in a,M=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},S=c("WeakMap",M,u),C=S.prototype,T=o(C.set);if(p)if(E){n=u.getConstructor(M,"WeakMap",!0),l.enable();var I=o(C.delete),R=o(C.has),B=o(C.get);s(C,{delete:function(t){if(h(t)&&!g(t)){var e=f(this);return e.frozen||(e.frozen=new n),I(this,t)||e.frozen.delete(t)}return I(this,t)},has:function(t){if(h(t)&&!g(t)){var e=f(this);return e.frozen||(e.frozen=new n),R(this,t)||e.frozen.has(t)}return R(this,t)},get:function(t){if(h(t)&&!g(t)){var e=f(this);return e.frozen||(e.frozen=new n),R(this,t)?B(this,t):e.frozen.get(t)}return B(this,t)},set:function(t,e){if(h(t)&&!g(t)){var r=f(this);r.frozen||(r.frozen=new n),R(this,t)?T(this,t,e):r.frozen.set(t,e)}else T(this,t,e);return this}})}else i&&d((function(){var t=b([]);return T(new S,t,1),!v(t)}))&&s(C,{set:function(t,e){var r;return A(t)&&(v(t)?r=w:y(t)&&(r=_)),T(this,t,e),r==w&&b(t),r==_&&x(t),this}})},4129:(t,e,r)=>{r(41202)},72098:(t,e,r)=>{"use strict";r(77710)("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(29320))},38478:(t,e,r)=>{r(72098)},8628:(t,e,r)=>{r(9170)},23252:(t,e,r)=>{"use strict";var n=r(19781),i=r(47045),a=r(58199),o=ArrayBuffer.prototype;n&&!("detached"in o)&&i(o,"detached",{configurable:!0,get:function(){return a(this)}})},32372:(t,e,r)=>{"use strict";var n=r(82109),i=r(58846);i&&n({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return i(this,arguments.length?arguments[0]:void 0,!1)}})},6461:(t,e,r)=>{"use strict";var n=r(82109),i=r(58846);i&&n({target:"ArrayBuffer",proto:!0},{transfer:function(){return i(this,arguments.length?arguments[0]:void 0,!0)}})},69810:(t,e,r)=>{r(52262)},84811:(t,e,r)=>{"use strict";var n=r(82109),i=r(42092).filterReject,a=r(51223);n({target:"Array",proto:!0,forced:!0},{filterOut:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a("filterOut")},34286:(t,e,r)=>{"use strict";var n=r(82109),i=r(42092).filterReject,a=r(51223);n({target:"Array",proto:!0,forced:!0},{filterReject:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a("filterReject")},77461:(t,e,r)=>{r(77287)},3048:(t,e,r)=>{r(67635)},19258:(t,e,r)=>{r(82109)({target:"Array",stat:!0},{fromAsync:r(33253)})},61886:(t,e,r)=>{var n=r(82109),i=r(9341),a=r(51223),o=r(59921);n({target:"Array",proto:!0,name:"groupToMap",forced:r(31913)||!i("groupByToMap")},{groupByToMap:o}),a("groupByToMap")},1999:(t,e,r)=>{"use strict";var n=r(82109),i=r(21191),a=r(9341),o=r(51223);n({target:"Array",proto:!0,forced:!a("groupBy")},{groupBy:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("groupBy")},59422:(t,e,r)=>{var n=r(82109),i=r(51223),a=r(59921);n({target:"Array",proto:!0,forced:r(31913)},{groupToMap:a}),i("groupToMap")},52550:(t,e,r)=>{"use strict";var n=r(82109),i=r(21191),a=r(51223);n({target:"Array",proto:!0},{group:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a("group")},8e4:(t,e,r)=>{var n=r(82109),i=r(43157),a=Object.isFrozen,o=function(t,e){if(!a||!i(t)||!a(t))return!1;for(var r,n=0,o=t.length;n{"use strict";var n=r(19781),i=r(51223),a=r(47908),o=r(26244),s=r(47045);n&&(s(Array.prototype,"lastIndex",{configurable:!0,get:function(){var t=a(this),e=o(t);return 0==e?0:e-1}}),i("lastIndex"))},46273:(t,e,r)=>{"use strict";var n=r(19781),i=r(51223),a=r(47908),o=r(26244),s=r(47045);n&&(s(Array.prototype,"lastItem",{configurable:!0,get:function(){var t=a(this),e=o(t);return 0==e?void 0:t[e-1]},set:function(t){var e=a(this),r=o(e);return e[0==r?0:r-1]=t}}),i("lastItem"))},56882:(t,e,r)=>{r(90476)},78525:(t,e,r)=>{r(76459)},27004:(t,e,r)=>{r(99892)},3087:(t,e,r)=>{"use strict";var n=r(82109),i=r(51223);n({target:"Array",proto:!0,forced:!0},{uniqueBy:r(60956)}),i("uniqueBy")},97391:(t,e,r)=>{r(35581)},4763:(t,e,r)=>{"use strict";var n=r(82109),i=r(19781),a=r(35005),o=r(19662),s=r(25787),l=r(98052),c=r(89190),u=r(47045),h=r(5112),f=r(29909),d=r(8557),p=a("Promise"),m=a("SuppressedError"),A=ReferenceError,g=h("asyncDispose"),v=h("toStringTag"),y="AsyncDisposableStack",b=f.set,x=f.getterFor(y),w="async-dispose",_="disposed",E=function(t){var e=x(t);if(e.state==_)throw A(y+" already disposed");return e},M=function(){b(s(this,S),{type:y,state:"pending",stack:[]}),i||(this.disposed=!1)},S=M.prototype;c(S,{disposeAsync:function(){var t=this;return new p((function(e,r){var n=x(t);if(n.state==_)return e(void 0);n.state=_,i||(t.disposed=!0);var a,o=n.stack,s=o.length,l=!1,c=function(t){l?a=new m(t,a):(l=!0,a=t),u()},u=function(){if(s){var t=o[--s];o[s]=null;try{p.resolve(t()).then(u,c)}catch(t){c(t)}}else n.stack=null,l?r(a):e(void 0)};u()}))},use:function(t){return d(E(this),t,w),t},adopt:function(t,e){var r=E(this);return o(e),d(r,void 0,w,(function(){return e(t)})),t},defer:function(t){var e=E(this);o(t),d(e,void 0,w,t)},move:function(){var t=E(this),e=new M;return x(e).stack=t.stack,t.stack=[],t.state=_,i||(this.disposed=!0),e}}),i&&u(S,"disposed",{configurable:!0,get:function(){return x(this).state==_}}),l(S,g,S.disposeAsync,{name:"disposeAsync"}),l(S,v,y,{nonWritable:!0}),n({global:!0,constructor:!0,forced:!0},{AsyncDisposableStack:M})},40787:(t,e,r)=>{r(82109)({target:"AsyncIterator",name:"indexed",proto:!0,real:!0,forced:!0},{asIndexedPairs:r(47520)})},1094:(t,e,r)=>{"use strict";var n=r(46916),i=r(98052),a=r(35005),o=r(58173),s=r(92597),l=r(5112),c=r(66462),u=l("asyncDispose"),h=a("Promise");s(c,u)||i(c,u,(function(){var t=this;return new h((function(e,r){var i=o(t,"return");i?h.resolve(n(i,t)).then((function(){e(void 0)}),r):e(void 0)}))}))},66342:(t,e,r)=>{"use strict";var n=r(82109),i=r(25787),a=r(68880),o=r(92597),s=r(5112),l=r(66462),c=r(31913),u=s("toStringTag"),h=function(){i(this,l)};h.prototype=l,o(l,u)||a(l,u,"AsyncIterator"),!c&&o(l,"constructor")&&l.constructor!==Object||a(l,"constructor",h),n({global:!0,constructor:!0,forced:c},{AsyncIterator:h})},23647:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(19670),o=r(24942),s=r(66336),l=r(73002),c=r(45348),u=r(76178),h=c((function(t){var e=this;return new t((function(r,n){var o=function(t){e.done=!0,n(t)},s=function(){try{t.resolve(a(i(e.next,e.iterator))).then((function(t){try{a(t).done?(e.done=!0,r(u(void 0,!0))):e.remaining?(e.remaining--,s()):r(u(t.value,!1))}catch(t){o(t)}}),o)}catch(t){o(t)}};s()}))}));n({target:"AsyncIterator",proto:!0,real:!0},{drop:function(t){a(this);var e=l(s(+t));return new h(o(this),{remaining:e})}})},68216:(t,e,r)=>{"use strict";var n=r(82109),i=r(12269).every;n({target:"AsyncIterator",proto:!0,real:!0},{every:function(t){return i(this,t)}})},88449:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(19662),o=r(19670),s=r(70111),l=r(24942),c=r(45348),u=r(76178),h=r(21753),f=c((function(t){var e=this,r=e.iterator,n=e.predicate;return new t((function(a,l){var c=function(t){e.done=!0,l(t)},f=function(t){h(r,c,t,c)},d=function(){try{t.resolve(o(i(e.next,r))).then((function(r){try{if(o(r).done)e.done=!0,a(u(void 0,!0));else{var i=r.value;try{var l=n(i,e.counter++),h=function(t){t?a(u(i,!1)):d()};s(l)?t.resolve(l).then(h,f):h(l)}catch(t){f(t)}}}catch(t){c(t)}}),c)}catch(t){c(t)}};d()}))}));n({target:"AsyncIterator",proto:!0,real:!0},{filter:function(t){return o(this),a(t),new f(l(this),{predicate:t})}})},31672:(t,e,r)=>{"use strict";var n=r(82109),i=r(12269).find;n({target:"AsyncIterator",proto:!0,real:!0},{find:function(t){return i(this,t)}})},74326:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(19662),o=r(19670),s=r(70111),l=r(24942),c=r(45348),u=r(76178),h=r(62617),f=r(21753),d=c((function(t){var e=this,r=e.iterator,n=e.mapper;return new t((function(a,l){var c=function(t){e.done=!0,l(t)},d=function(t){f(r,c,t,c)},p=function(){try{t.resolve(o(i(e.next,r))).then((function(r){try{if(o(r).done)e.done=!0,a(u(void 0,!0));else{var i=r.value;try{var l=n(i,e.counter++),f=function(t){try{e.inner=h(t),m()}catch(t){d(t)}};s(l)?t.resolve(l).then(f,d):f(l)}catch(t){d(t)}}}catch(t){c(t)}}),c)}catch(t){c(t)}},m=function(){var r=e.inner;if(r)try{t.resolve(o(i(r.next,r.iterator))).then((function(t){try{o(t).done?(e.inner=null,p()):a(u(t.value,!1))}catch(t){d(t)}}),d)}catch(t){d(t)}else p()};m()}))}));n({target:"AsyncIterator",proto:!0,real:!0},{flatMap:function(t){return o(this),a(t),new d(l(this),{mapper:t,inner:null})}})},15581:(t,e,r)=>{"use strict";var n=r(82109),i=r(12269).forEach;n({target:"AsyncIterator",proto:!0,real:!0},{forEach:function(t){return i(this,t)}})},78631:(t,e,r)=>{var n=r(82109),i=r(47908),a=r(47976),o=r(62617),s=r(66462),l=r(86221);n({target:"AsyncIterator",stat:!0},{from:function(t){var e=o("string"==typeof t?i(t):t);return a(s,e.iterator)?e.iterator:new l(e)}})},48746:(t,e,r)=>{r(82109)({target:"AsyncIterator",proto:!0,real:!0,forced:!0},{indexed:r(47520)})},57640:(t,e,r)=>{r(82109)({target:"AsyncIterator",proto:!0,real:!0},{map:r(13232)})},25387:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(19662),o=r(19670),s=r(70111),l=r(35005),c=r(24942),u=r(21753),h=l("Promise"),f=TypeError;n({target:"AsyncIterator",proto:!0,real:!0},{reduce:function(t){o(this),a(t);var e=c(this),r=e.iterator,n=e.next,l=arguments.length<2,d=l?void 0:arguments[1],p=0;return new h((function(e,a){var c=function(t){u(r,a,t,a)},m=function(){try{h.resolve(o(i(n,r))).then((function(r){try{if(o(r).done)l?a(f("Reduce of empty iterator with no initial value")):e(d);else{var n=r.value;if(l)l=!1,d=n,m();else try{var i=t(d,n,p),u=function(t){d=t,m()};s(i)?h.resolve(i).then(u,c):u(i)}catch(t){c(t)}}p++}catch(t){a(t)}}),a)}catch(t){a(t)}};m()}))}})},64211:(t,e,r)=>{"use strict";var n=r(82109),i=r(12269).some;n({target:"AsyncIterator",proto:!0,real:!0},{some:function(t){return i(this,t)}})},12771:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(19670),o=r(24942),s=r(66336),l=r(73002),c=r(45348),u=r(76178),h=c((function(t){var e,r=this,n=r.iterator;if(!r.remaining--){var o=u(void 0,!0);return r.done=!0,void 0!==(e=n.return)?t.resolve(i(e,n,void 0)).then((function(){return o})):o}return t.resolve(i(r.next,n)).then((function(t){return a(t).done?(r.done=!0,u(void 0,!0)):u(t.value,!1)})).then(null,(function(t){throw r.done=!0,t}))}));n({target:"AsyncIterator",proto:!0,real:!0},{take:function(t){a(this);var e=l(s(+t));return new h(o(this),{remaining:e})}})},62962:(t,e,r)=>{"use strict";var n=r(82109),i=r(12269).toArray;n({target:"AsyncIterator",proto:!0,real:!0},{toArray:function(){return i(this,void 0,[])}})},71790:(t,e,r)=>{"use strict";var n=r(82109),i=r(80430);"function"==typeof BigInt&&n({target:"BigInt",stat:!0,forced:!0},{range:function(t,e,r){return new i(t,e,r,"bigint",BigInt(0),BigInt(1))}})},51568:(t,e,r)=>{var n=r(82109),i=r(22104),a=r(10313),o=r(35005),s=r(70030),l=Object,c=function(){var t=o("Object","freeze");return t?t(s(null)):s(null)};n({global:!0,forced:!0},{compositeKey:function(){return i(a,l,arguments).get("object",c)}})},26349:(t,e,r)=>{var n=r(82109),i=r(10313),a=r(35005),o=r(22104);n({global:!0,forced:!0},{compositeSymbol:function(){return 1==arguments.length&&"string"==typeof arguments[0]?a("Symbol").for(arguments[0]):o(i,null,arguments).get("symbol",a("Symbol"))}})},30800:(t,e,r)=>{"use strict";var n=r(82109),i=r(19781),a=r(35005),o=r(19662),s=r(25787),l=r(98052),c=r(89190),u=r(47045),h=r(5112),f=r(29909),d=r(8557),p=a("SuppressedError"),m=ReferenceError,A=h("dispose"),g=h("toStringTag"),v="DisposableStack",y=f.set,b=f.getterFor(v),x="sync-dispose",w="disposed",_=function(t){var e=b(t);if(e.state==w)throw m(v+" already disposed");return e},E=function(){y(s(this,M),{type:v,state:"pending",stack:[]}),i||(this.disposed=!1)},M=E.prototype;c(M,{dispose:function(){var t=b(this);if(t.state!=w){t.state=w,i||(this.disposed=!0);for(var e,r=t.stack,n=r.length,a=!1;n;){var o=r[--n];r[n]=null;try{o()}catch(t){a?e=new p(t,e):(a=!0,e=t)}}if(t.stack=null,a)throw e}},use:function(t){return d(_(this),t,x),t},adopt:function(t,e){var r=_(this);return o(e),d(r,void 0,x,(function(){e(t)})),t},defer:function(t){var e=_(this);o(t),d(e,void 0,x,t)},move:function(){var t=_(this),e=new E;return b(e).stack=t.stack,t.stack=[],t.state=w,i||(this.disposed=!0),e}}),i&&u(M,"disposed",{configurable:!0,get:function(){return b(this).state==w}}),l(M,A,M.dispose,{name:"dispose"}),l(M,g,v,{nonWritable:!0}),n({global:!0,constructor:!0},{DisposableStack:E})},48580:(t,e,r)=>{r(82109)({target:"Function",proto:!0,forced:!0},{demethodize:r(55040)})},67427:(t,e,r)=>{var n=r(82109),i=r(1702),a=r(60614),o=r(42788),s=r(92597),l=r(19781),c=Object.getOwnPropertyDescriptor,u=/^\s*class\b/,h=i(u.exec);n({target:"Function",stat:!0,sham:!0,forced:!0},{isCallable:function(t){return a(t)&&!function(t){try{if(!l||!h(u,o(t)))return!1}catch(t){}var e=c(t,"prototype");return!!e&&s(e,"writable")&&!e.writable}(t)}})},32279:(t,e,r)=>{r(82109)({target:"Function",stat:!0,forced:!0},{isConstructor:r(4411)})},54537:(t,e,r)=>{var n=r(5112),i=r(3070).f,a=n("metadata"),o=Function.prototype;void 0===o[a]&&i(o,a,{value:null})},13384:(t,e,r)=>{r(82109)({target:"Function",proto:!0,forced:!0,name:"demethodize"},{unThis:r(55040)})},65743:(t,e,r)=>{r(35837)},85567:(t,e,r)=>{r(82109)({target:"Iterator",name:"indexed",proto:!0,real:!0,forced:!0},{asIndexedPairs:r(14323)})},2490:(t,e,r)=>{"use strict";var n=r(82109),i=r(17854),a=r(25787),o=r(60614),s=r(68880),l=r(47293),c=r(92597),u=r(5112),h=r(13383).IteratorPrototype,f=r(31913),d=u("toStringTag"),p=i.Iterator,m=f||!o(p)||p.prototype!==h||!l((function(){p({})})),A=function(){a(this,h)};c(h,d)||s(h,d,"Iterator"),!m&&c(h,"constructor")&&h.constructor!==Object||s(h,"constructor",A),A.prototype=h,n({global:!0,constructor:!0,forced:m},{Iterator:A})},18359:(t,e,r)=>{"use strict";var n=r(46916),i=r(98052),a=r(58173),o=r(92597),s=r(5112),l=r(13383).IteratorPrototype,c=s("dispose");o(l,c)||i(l,c,(function(){var t=a(this,"return");t&&n(t,this)}))},5332:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(19670),o=r(24942),s=r(66336),l=r(73002),c=r(54956)((function(){for(var t,e=this.iterator,r=this.next;this.remaining;)if(this.remaining--,t=a(i(r,e)),this.done=!!t.done)return;if(t=a(i(r,e)),!(this.done=!!t.done))return t.value}));n({target:"Iterator",proto:!0,real:!0},{drop:function(t){a(this);var e=l(s(+t));return new c(o(this),{remaining:e})}})},79433:(t,e,r)=>{"use strict";var n=r(82109),i=r(20408),a=r(19662),o=r(19670),s=r(24942);n({target:"Iterator",proto:!0,real:!0},{every:function(t){o(this),a(t);var e=s(this),r=0;return!i(e,(function(e,n){if(!t(e,r++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},59849:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(19662),o=r(19670),s=r(24942),l=r(54956),c=r(53411),u=l((function(){for(var t,e,r=this.iterator,n=this.predicate,a=this.next;;){if(t=o(i(a,r)),this.done=!!t.done)return;if(e=t.value,c(r,n,[e,this.counter++],!0))return e}}));n({target:"Iterator",proto:!0,real:!0},{filter:function(t){return o(this),a(t),new u(s(this),{predicate:t})}})},59461:(t,e,r)=>{"use strict";var n=r(82109),i=r(20408),a=r(19662),o=r(19670),s=r(24942);n({target:"Iterator",proto:!0,real:!0},{find:function(t){o(this),a(t);var e=s(this),r=0;return i(e,(function(e,n){if(t(e,r++))return n(e)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},82499:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(19662),o=r(19670),s=r(24942),l=r(72897),c=r(54956),u=r(99212),h=c((function(){for(var t,e,r=this.iterator,n=this.mapper;;){if(e=this.inner)try{if(!(t=o(i(e.next,e.iterator))).done)return t.value;this.inner=null}catch(t){u(r,"throw",t)}if(t=o(i(this.next,r)),this.done=!!t.done)return;try{this.inner=l(n(t.value,this.counter++))}catch(t){u(r,"throw",t)}}}));n({target:"Iterator",proto:!0,real:!0},{flatMap:function(t){return o(this),a(t),new h(s(this),{mapper:t,inner:null})}})},34514:(t,e,r)=>{"use strict";var n=r(82109),i=r(20408),a=r(19662),o=r(19670),s=r(24942);n({target:"Iterator",proto:!0,real:!0},{forEach:function(t){o(this),a(t);var e=s(this),r=0;i(e,(function(e){t(e,r++)}),{IS_RECORD:!0})}})},26877:(t,e,r)=>{var n=r(82109),i=r(46916),a=r(47908),o=r(47976),s=r(13383).IteratorPrototype,l=r(54956),c=r(72897),u=l((function(){return i(this.next,this.iterator)}),!0);n({target:"Iterator",stat:!0},{from:function(t){var e=c("string"==typeof t?a(t):t);return o(s,e.iterator)?e.iterator:new u(e)}})},64994:(t,e,r)=>{r(82109)({target:"Iterator",proto:!0,real:!0,forced:!0},{indexed:r(14323)})},9924:(t,e,r)=>{r(82109)({target:"Iterator",proto:!0,real:!0},{map:r(20487)})},64411:(t,e,r)=>{"use strict";var n=r(82109),i=r(80430),a=TypeError;n({target:"Iterator",stat:!0,forced:!0},{range:function(t,e,r){if("number"==typeof t)return new i(t,e,r,"number",0,1);if("bigint"==typeof t)return new i(t,e,r,"bigint",BigInt(0),BigInt(1));throw a("Incorrect Iterator.range arguments")}})},72608:(t,e,r)=>{"use strict";var n=r(82109),i=r(20408),a=r(19662),o=r(19670),s=r(24942),l=TypeError;n({target:"Iterator",proto:!0,real:!0},{reduce:function(t){o(this),a(t);var e=s(this),r=arguments.length<2,n=r?void 0:arguments[1],c=0;if(i(e,(function(e){r?(r=!1,n=e):n=t(n,e,c),c++}),{IS_RECORD:!0}),r)throw l("Reduce of empty iterator with no initial value");return n}})},41874:(t,e,r)=>{"use strict";var n=r(82109),i=r(20408),a=r(19662),o=r(19670),s=r(24942);n({target:"Iterator",proto:!0,real:!0},{some:function(t){o(this),a(t);var e=s(this),r=0;return i(e,(function(e,n){if(t(e,r++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},66043:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(19670),o=r(24942),s=r(66336),l=r(73002),c=r(54956),u=r(99212),h=c((function(){var t=this.iterator;if(!this.remaining--)return this.done=!0,u(t,"normal",void 0);var e=a(i(this.next,t));return(this.done=!!e.done)?void 0:e.value}));n({target:"Iterator",proto:!0,real:!0},{take:function(t){a(this);var e=l(s(+t));return new h(o(this),{remaining:e})}})},23748:(t,e,r)=>{"use strict";var n=r(82109),i=r(19670),a=r(20408),o=r(24942),s=[].push;n({target:"Iterator",proto:!0,real:!0},{toArray:function(){var t=[];return a(o(i(this)),s,{that:t,IS_RECORD:!0}),t}})},71501:(t,e,r)=>{"use strict";var n=r(82109),i=r(19670),a=r(28091),o=r(86221),s=r(24942);n({target:"Iterator",proto:!0,real:!0},{toAsync:function(){return new o(s(new a(s(i(this)))))}})},60855:(t,e,r)=>{r(82109)({target:"JSON",stat:!0,forced:!r(80363)},{isRawJSON:r(73633)})},43847:(t,e,r)=>{"use strict";var n=r(82109),i=r(19781),a=r(17854),o=r(35005),s=r(1702),l=r(46916),c=r(60614),u=r(70111),h=r(43157),f=r(92597),d=r(41340),p=r(26244),m=r(86135),A=r(47293),g=r(18832),v=r(36293),y=a.JSON,b=a.Number,x=a.SyntaxError,w=y&&y.parse,_=o("Object","keys"),E=Object.getOwnPropertyDescriptor,M=s("".charAt),S=s("".slice),C=s(/./.exec),T=s([].push),I=/^\d$/,R=/^[1-9]$/,B=/^(-|\d)$/,k=/^[\t\n\r ]$/,L=function(t,e,r,n){var i,a,o,s,c,d=t[e],m=n&&d===n.value,A=m&&"string"==typeof n.source?{source:n.source}:{};if(u(d)){var g=h(d),v=m?n.nodes:g?[]:{};if(g)for(i=v.length,o=p(d),s=0;s{"use strict";var n=r(82109),i=r(76677),a=r(80363),o=r(35005),s=r(46916),l=r(1702),c=r(60614),u=r(73633),h=r(41340),f=r(86135),d=r(18832),p=r(88044),m=r(69711),A=r(29909).set,g=String,v=SyntaxError,y=o("JSON","parse"),b=o("JSON","stringify"),x=o("Object","create"),w=o("Object","freeze"),_=l("".charAt),E=l("".slice),M=l(/./.exec),S=l([].push),C=m(),T=C.length,I="Unacceptable as raw JSON",R=/^[\t\n\r ]$/;n({target:"JSON",stat:!0,forced:!a},{rawJSON:function(t){var e=h(t);if(""==e||M(R,_(e,0))||M(R,_(e,e.length-1)))throw v(I);var r=y(e);if("object"==typeof r&&null!==r)throw v(I);var n=x(null);return A(n,{type:"RawJSON"}),f(n,"rawJSON",e),i?w(n):n}}),b&&n({target:"JSON",stat:!0,arity:3,forced:!a},{stringify:function(t,e,r){var n=p(e),i=[],a=b(t,(function(t,e){var r=c(n)?s(n,this,g(t),e):e;return u(r)?C+(S(i,r.rawJSON)-1):r}),r);if("string"!=typeof a)return a;for(var o="",l=a.length,h=0;h{"use strict";var n=r(82109),i=r(40027),a=r(75706).remove;n({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n{"use strict";var n=r(82109),i=r(40027),a=r(75706),o=a.get,s=a.has,l=a.set;n({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(t,e){var r,n,a=i(this);return s(a,t)?(r=o(a,t),"update"in e&&(r=e.update(r,t,a),l(a,t,r)),r):(n=e.insert(t,a),l(a,t,n),n)}})},99137:(t,e,r)=>{"use strict";var n=r(82109),i=r(49974),a=r(40027),o=r(14995);n({target:"Map",proto:!0,real:!0,forced:!0},{every:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!1!==o(e,(function(t,n){if(!r(t,n,e))return!1}),!0)}})},71957:(t,e,r)=>{"use strict";var n=r(82109),i=r(49974),a=r(40027),o=r(75706),s=r(14995),l=o.Map,c=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new l;return s(e,(function(t,i){r(t,i,e)&&c(n,i,t)})),n}})},103:(t,e,r)=>{"use strict";var n=r(82109),i=r(49974),a=r(40027),o=r(14995);n({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=o(e,(function(t,n){if(r(t,n,e))return{key:n}}),!0);return n&&n.key}})},96306:(t,e,r)=>{"use strict";var n=r(82109),i=r(49974),a=r(40027),o=r(14995);n({target:"Map",proto:!0,real:!0,forced:!0},{find:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=o(e,(function(t,n){if(r(t,n,e))return{value:t}}),!0);return n&&n.value}})},8582:(t,e,r)=>{r(82109)({target:"Map",stat:!0,forced:!0},{from:r(27296)})},90618:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(19662),o=r(84488),s=r(20408),l=r(75706),c=l.Map,u=l.has,h=l.get,f=l.set,d=i([].push);n({target:"Map",stat:!0,forced:!0},{groupBy:function(t,e){o(t),a(e);var r=new c,n=0;return s(t,(function(t){var i=e(t,n++);u(r,i)?d(h(r,i),t):f(r,i,[t])})),r}})},74592:(t,e,r)=>{"use strict";var n=r(82109),i=r(46465),a=r(40027),o=r(14995);n({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(t){return!0===o(a(this),(function(e){if(i(e,t))return!0}),!0)}})},88440:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(20408),o=r(60614),s=r(19662),l=r(75706).Map;n({target:"Map",stat:!0,forced:!0},{keyBy:function(t,e){var r=new(o(this)?this:l);s(e);var n=s(r.set);return a(t,(function(t){i(n,r,e(t),t)})),r}})},58276:(t,e,r)=>{"use strict";var n=r(82109),i=r(40027),a=r(14995);n({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(t){var e=a(i(this),(function(e,r){if(e===t)return{key:r}}),!0);return e&&e.key}})},35082:(t,e,r)=>{"use strict";var n=r(82109),i=r(49974),a=r(40027),o=r(75706),s=r(14995),l=o.Map,c=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new l;return s(e,(function(t,i){c(n,r(t,i,e),t)})),n}})},12813:(t,e,r)=>{"use strict";var n=r(82109),i=r(49974),a=r(40027),o=r(75706),s=r(14995),l=o.Map,c=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new l;return s(e,(function(t,i){c(n,i,r(t,i,e))})),n}})},18222:(t,e,r)=>{"use strict";var n=r(82109),i=r(40027),a=r(20408),o=r(75706).set;n({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(t){for(var e=i(this),r=arguments.length,n=0;n{r(82109)({target:"Map",stat:!0,forced:!0},{of:r(82044)})},38563:(t,e,r)=>{"use strict";var n=r(82109),i=r(19662),a=r(40027),o=r(14995),s=TypeError;n({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=a(this),r=arguments.length<2,n=r?void 0:arguments[1];if(i(t),o(e,(function(i,a){r?(r=!1,n=i):n=t(n,i,a,e)})),r)throw s("Reduce of empty map with no initial value");return n}})},50336:(t,e,r)=>{"use strict";var n=r(82109),i=r(49974),a=r(40027),o=r(14995);n({target:"Map",proto:!0,real:!0,forced:!0},{some:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!0===o(e,(function(t,n){if(r(t,n,e))return!0}),!0)}})},74442:(t,e,r)=>{"use strict";r(82109)({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:r(8154)})},7512:(t,e,r)=>{"use strict";var n=r(82109),i=r(19662),a=r(40027),o=r(75706),s=TypeError,l=o.get,c=o.has,u=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{update:function(t,e){var r=a(this),n=arguments.length;i(e);var o=c(r,t);if(!o&&n<3)throw s("Updating absent value");var h=o?l(r,t):i(n>2?arguments[2]:void 0)(t,r);return u(r,t,e(h,t,r)),r}})},87713:(t,e,r)=>{"use strict";r(82109)({target:"Map",proto:!0,real:!0,forced:!0},{upsert:r(8154)})},46603:(t,e,r)=>{var n=r(82109),i=Math.min,a=Math.max;n({target:"Math",stat:!0,forced:!0},{clamp:function(t,e,r){return i(r,a(e,t))}})},70100:(t,e,r)=>{r(82109)({target:"Math",stat:!0,nonConfigurable:!0,nonWritable:!0},{DEG_PER_RAD:Math.PI/180})},10490:(t,e,r)=>{var n=r(82109),i=180/Math.PI;n({target:"Math",stat:!0,forced:!0},{degrees:function(t){return t*i}})},13187:(t,e,r)=>{var n=r(82109),i=r(47103),a=r(26130);n({target:"Math",stat:!0,forced:!0},{fscale:function(t,e,r,n,o){return a(i(t,e,r,n,o))}})},60092:(t,e,r)=>{r(82109)({target:"Math",stat:!0,forced:!0},{iaddh:function(t,e,r,n){var i=t>>>0,a=r>>>0;return(e>>>0)+(n>>>0)+((i&a|(i|a)&~(i+a>>>0))>>>31)|0}})},19041:(t,e,r)=>{r(82109)({target:"Math",stat:!0,forced:!0},{imulh:function(t,e){var r=65535,n=+t,i=+e,a=n&r,o=i&r,s=n>>16,l=i>>16,c=(s*o>>>0)+(a*o>>>16);return s*l+(c>>16)+((a*l>>>0)+(c&r)>>16)}})},30666:(t,e,r)=>{r(82109)({target:"Math",stat:!0,forced:!0},{isubh:function(t,e,r,n){var i=t>>>0,a=r>>>0;return(e>>>0)-(n>>>0)-((~i&a|~(i^a)&i-a>>>0)>>>31)|0}})},51638:(t,e,r)=>{r(82109)({target:"Math",stat:!0,nonConfigurable:!0,nonWritable:!0},{RAD_PER_DEG:180/Math.PI})},62975:(t,e,r)=>{var n=r(82109),i=Math.PI/180;n({target:"Math",stat:!0,forced:!0},{radians:function(t){return t*i}})},15728:(t,e,r)=>{r(82109)({target:"Math",stat:!0,forced:!0},{scale:r(47103)})},46056:(t,e,r)=>{var n=r(82109),i=r(19670),a=r(77023),o=r(63061),s=r(76178),l=r(29909),c="Seeded Random",u=c+" Generator",h=l.set,f=l.getterFor(u),d=TypeError,p=o((function(t){h(this,{type:u,seed:t%2147483647})}),c,(function(){var t=f(this),e=t.seed=(1103515245*t.seed+12345)%2147483647;return s((1073741823&e)/1073741823,!1)}));n({target:"Math",stat:!0,forced:!0},{seededPRNG:function(t){var e=i(t).seed;if(!a(e))throw d('Math.seededPRNG() argument should have a "seed" field with a finite value.');return new p(e)}})},44299:(t,e,r)=>{r(82109)({target:"Math",stat:!0,forced:!0},{signbit:function(t){var e=+t;return e==e&&0==e?1/e==-1/0:e<0}})},5162:(t,e,r)=>{r(82109)({target:"Math",stat:!0,forced:!0},{umulh:function(t,e){var r=65535,n=+t,i=+e,a=n&r,o=i&r,s=n>>>16,l=i>>>16,c=(s*o>>>0)+(a*o>>>16);return s*l+(c>>>16)+((a*l>>>0)+(c&r)>>>16)}})},50292:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(19303),o=r(83009),s="Invalid number representation",l=RangeError,c=SyntaxError,u=TypeError,h=/^[\da-z]+$/,f=i("".charAt),d=i(h.exec),p=i(1..toString),m=i("".slice);n({target:"Number",stat:!0,forced:!0},{fromString:function(t,e){var r,n,i=1;if("string"!=typeof t)throw u(s);if(!t.length)throw c(s);if("-"==f(t,0)&&(i=-1,!(t=m(t,1)).length))throw c(s);if((r=void 0===e?10:a(e))<2||r>36)throw l("Invalid radix");if(!d(h,t)||p(n=o(t,r),r)!==t)throw c(s);return i*n}})},29427:(t,e,r)=>{"use strict";var n=r(82109),i=r(80430);n({target:"Number",stat:!0,forced:!0},{range:function(t,e,r){return new i(t,e,r,"number",0,1)}})},43565:(t,e,r)=>{"use strict";var n=r(82109),i=r(35005),a=r(1702),o=r(19662),s=r(84488),l=r(34948),c=r(20408),u=i("Object","create"),h=a([].push);n({target:"Object",stat:!0,forced:!0},{groupBy:function(t,e){s(t),o(e);var r=u(null),n=0;return c(t,(function(t){var i=l(e(t,n++));i in r?h(r[i],t):r[i]=[t]})),r}})},96936:(t,e,r)=>{r(46314)},99964:(t,e,r)=>{"use strict";var n=r(82109),i=r(60996);n({target:"Object",stat:!0,forced:!0},{iterateEntries:function(t){return new i(t,"entries")}})},75238:(t,e,r)=>{"use strict";var n=r(82109),i=r(60996);n({target:"Object",stat:!0,forced:!0},{iterateKeys:function(t){return new i(t,"keys")}})},4987:(t,e,r)=>{"use strict";var n=r(82109),i=r(60996);n({target:"Object",stat:!0,forced:!0},{iterateValues:function(t){return new i(t,"values")}})},39769:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(19781),o=r(96340),s=r(19662),l=r(19670),c=r(25787),u=r(60614),h=r(68554),f=r(70111),d=r(58173),p=r(98052),m=r(89190),A=r(47045),g=r(842),v=r(5112),y=r(29909),b=r(90515),x=v("observable"),w="Observable",_="Subscription",E="SubscriptionObserver",M=y.getterFor,S=y.set,C=M(w),T=M(_),I=M(E),R=function(t){this.observer=l(t),this.cleanup=void 0,this.subscriptionObserver=void 0};R.prototype={type:_,clean:function(){var t=this.cleanup;if(t){this.cleanup=void 0;try{t()}catch(t){g(t)}}},close:function(){if(!a){var t=this.facade,e=this.subscriptionObserver;t.closed=!0,e&&(e.closed=!0)}this.observer=void 0},isClosed:function(){return void 0===this.observer}};var B=function(t,e){var r,n=S(this,new R(t));a||(this.closed=!1);try{(r=d(t,"start"))&&i(r,t,this)}catch(t){g(t)}if(!n.isClosed()){var o=n.subscriptionObserver=new k(n);try{var l=e(o),c=l;h(l)||(n.cleanup=u(l.unsubscribe)?function(){c.unsubscribe()}:s(l))}catch(t){return void o.error(t)}n.isClosed()&&n.clean()}};B.prototype=m({},{unsubscribe:function(){var t=T(this);t.isClosed()||(t.close(),t.clean())}}),a&&A(B.prototype,"closed",{configurable:!0,get:function(){return T(this).isClosed()}});var k=function(t){S(this,{type:E,subscriptionState:t}),a||(this.closed=!1)};k.prototype=m({},{next:function(t){var e=I(this).subscriptionState;if(!e.isClosed()){var r=e.observer;try{var n=d(r,"next");n&&i(n,r,t)}catch(t){g(t)}}},error:function(t){var e=I(this).subscriptionState;if(!e.isClosed()){var r=e.observer;e.close();try{var n=d(r,"error");n?i(n,r,t):g(t)}catch(t){g(t)}e.clean()}},complete:function(){var t=I(this).subscriptionState;if(!t.isClosed()){var e=t.observer;t.close();try{var r=d(e,"complete");r&&i(r,e)}catch(t){g(t)}t.clean()}}}),a&&A(k.prototype,"closed",{configurable:!0,get:function(){return I(this).subscriptionState.isClosed()}});var L=function(t){c(this,P),S(this,{type:w,subscriber:s(t)})},P=L.prototype;m(P,{subscribe:function(t){var e=arguments.length;return new B(u(t)?{next:t,error:e>1?arguments[1]:void 0,complete:e>2?arguments[2]:void 0}:f(t)?t:{},C(this).subscriber)}}),p(P,x,(function(){return this})),n({global:!0,constructor:!0,forced:b},{Observable:L}),o(w)},93532:(t,e,r)=>{"use strict";var n=r(82109),i=r(35005),a=r(46916),o=r(19670),s=r(4411),l=r(18554),c=r(58173),u=r(20408),h=r(5112),f=r(90515),d=h("observable");n({target:"Observable",stat:!0,forced:f},{from:function(t){var e=s(this)?this:i("Observable"),r=c(o(t),d);if(r){var n=o(a(r,t));return n.constructor===e?n:new e((function(t){return n.subscribe(t)}))}var h=l(t);return new e((function(t){u(h,(function(e,r){if(t.next(e),t.closed)return r()}),{IS_ITERATOR:!0,INTERRUPTED:!0}),t.complete()}))}})},1025:(t,e,r)=>{r(39769),r(93532),r(88170)},88170:(t,e,r)=>{"use strict";var n=r(82109),i=r(35005),a=r(4411),o=r(90515),s=i("Array");n({target:"Observable",stat:!0,forced:o},{of:function(){for(var t=a(this)?this:i("Observable"),e=arguments.length,r=s(e),n=0;n{r(17922)},96290:(t,e,r)=>{r(34668)},77479:(t,e,r)=>{"use strict";var n=r(82109),i=r(78523),a=r(12534);n({target:"Promise",stat:!0,forced:!0},{try:function(t){var e=i.f(this),r=a(t);return(r.error?e.reject:e.resolve)(r.value),e.promise}})},5794:(t,e,r)=>{"use strict";var n=r(82109),i=r(78523);n({target:"Promise",stat:!0,forced:!0},{withResolvers:function(){var t=i.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}})},34582:(t,e,r)=>{var n=r(82109),i=r(38845),a=r(19670),o=i.toKey,s=i.set;n({target:"Reflect",stat:!0},{defineMetadata:function(t,e,r){var n=arguments.length<4?void 0:o(arguments[3]);s(t,e,a(r),n)}})},47896:(t,e,r)=>{var n=r(82109),i=r(38845),a=r(19670),o=i.toKey,s=i.getMap,l=i.store;n({target:"Reflect",stat:!0},{deleteMetadata:function(t,e){var r=arguments.length<3?void 0:o(arguments[2]),n=s(a(e),r,!1);if(void 0===n||!n.delete(t))return!1;if(n.size)return!0;var i=l.get(e);return i.delete(r),!!i.size||l.delete(e)}})},98558:(t,e,r)=>{var n=r(82109),i=r(1702),a=r(38845),o=r(19670),s=r(79518),l=i(r(60956)),c=i([].concat),u=a.keys,h=a.toKey,f=function(t,e){var r=u(t,e),n=s(t);if(null===n)return r;var i=f(n,e);return i.length?r.length?l(c(r,i)):i:r};n({target:"Reflect",stat:!0},{getMetadataKeys:function(t){var e=arguments.length<2?void 0:h(arguments[1]);return f(o(t),e)}})},12647:(t,e,r)=>{var n=r(82109),i=r(38845),a=r(19670),o=r(79518),s=i.has,l=i.get,c=i.toKey,u=function(t,e,r){if(s(t,e,r))return l(t,e,r);var n=o(e);return null!==n?u(t,n,r):void 0};n({target:"Reflect",stat:!0},{getMetadata:function(t,e){var r=arguments.length<3?void 0:c(arguments[2]);return u(t,a(e),r)}})},97507:(t,e,r)=>{var n=r(82109),i=r(38845),a=r(19670),o=i.keys,s=i.toKey;n({target:"Reflect",stat:!0},{getOwnMetadataKeys:function(t){var e=arguments.length<2?void 0:s(arguments[1]);return o(a(t),e)}})},84018:(t,e,r)=>{var n=r(82109),i=r(38845),a=r(19670),o=i.get,s=i.toKey;n({target:"Reflect",stat:!0},{getOwnMetadata:function(t,e){var r=arguments.length<3?void 0:s(arguments[2]);return o(t,a(e),r)}})},61605:(t,e,r)=>{var n=r(82109),i=r(38845),a=r(19670),o=r(79518),s=i.has,l=i.toKey,c=function(t,e,r){if(s(t,e,r))return!0;var n=o(e);return null!==n&&c(t,n,r)};n({target:"Reflect",stat:!0},{hasMetadata:function(t,e){var r=arguments.length<3?void 0:l(arguments[2]);return c(t,a(e),r)}})},49076:(t,e,r)=>{var n=r(82109),i=r(38845),a=r(19670),o=i.has,s=i.toKey;n({target:"Reflect",stat:!0},{hasOwnMetadata:function(t,e){var r=arguments.length<3?void 0:s(arguments[2]);return o(t,a(e),r)}})},34999:(t,e,r)=>{var n=r(82109),i=r(38845),a=r(19670),o=i.toKey,s=i.set;n({target:"Reflect",stat:!0},{metadata:function(t,e){return function(r,n){s(t,e,a(r),o(n))}}})},88921:(t,e,r)=>{"use strict";var n=r(82109),i=r(88999),a=r(79405).add;n({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var t=i(this),e=0,r=arguments.length;e{"use strict";var n=r(82109),i=r(88999),a=r(79405).remove;n({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n{"use strict";var n=r(82109),i=r(46916),a=r(45965),o=r(37075);n({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(t){return i(o,this,a(t))}})},27561:(t,e,r)=>{var n=r(82109),i=r(37075);n({target:"Set",proto:!0,real:!0,forced:!r(13831)("difference")},{difference:i})},11477:(t,e,r)=>{"use strict";var n=r(82109),i=r(49974),a=r(88999),o=r(87758);n({target:"Set",proto:!0,real:!0,forced:!0},{every:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!1!==o(e,(function(t){if(!r(t,t,e))return!1}),!0)}})},64362:(t,e,r)=>{"use strict";var n=r(82109),i=r(49974),a=r(88999),o=r(79405),s=r(87758),l=o.Set,c=o.add;n({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new l;return s(e,(function(t){r(t,t,e)&&c(n,t)})),n}})},15389:(t,e,r)=>{"use strict";var n=r(82109),i=r(49974),a=r(88999),o=r(87758);n({target:"Set",proto:!0,real:!0,forced:!0},{find:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=o(e,(function(t){if(r(t,t,e))return{value:t}}),!0);return n&&n.value}})},46006:(t,e,r)=>{r(82109)({target:"Set",stat:!0,forced:!0},{from:r(27296)})},90401:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(45965),o=r(81920);n({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(t){return i(o,this,a(t))}})},3440:(t,e,r)=>{var n=r(82109),i=r(47293),a=r(81920);n({target:"Set",proto:!0,real:!0,forced:!r(13831)("intersection")||i((function(){return"3,2"!=Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}))},{intersection:a})},45164:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(45965),o=r(78239);n({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(t){return i(o,this,a(t))}})},66244:(t,e,r)=>{var n=r(82109),i=r(78239);n({target:"Set",proto:!0,real:!0,forced:!r(13831)("isDisjointFrom")},{isDisjointFrom:i})},91238:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(45965),o=r(49180);n({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(t){return i(o,this,a(t))}})},89772:(t,e,r)=>{var n=r(82109),i=r(49180);n({target:"Set",proto:!0,real:!0,forced:!r(13831)("isSubsetOf")},{isSubsetOf:i})},54837:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(45965),o=r(10107);n({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(t){return i(o,this,a(t))}})},88910:(t,e,r)=>{var n=r(82109),i=r(10107);n({target:"Set",proto:!0,real:!0,forced:!r(13831)("isSupersetOf")},{isSupersetOf:i})},87485:(t,e,r)=>{"use strict";var n=r(82109),i=r(1702),a=r(88999),o=r(87758),s=r(41340),l=i([].join),c=i([].push);n({target:"Set",proto:!0,real:!0,forced:!0},{join:function(t){var e=a(this),r=void 0===t?",":s(t),n=[];return o(e,(function(t){c(n,t)})),l(n,r)}})},56767:(t,e,r)=>{"use strict";var n=r(82109),i=r(49974),a=r(88999),o=r(79405),s=r(87758),l=o.Set,c=o.add;n({target:"Set",proto:!0,real:!0,forced:!0},{map:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new l;return s(e,(function(t){c(n,r(t,t,e))})),n}})},69916:(t,e,r)=>{r(82109)({target:"Set",stat:!0,forced:!0},{of:r(82044)})},76651:(t,e,r)=>{"use strict";var n=r(82109),i=r(19662),a=r(88999),o=r(87758),s=TypeError;n({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=a(this),r=arguments.length<2,n=r?void 0:arguments[1];if(i(t),o(e,(function(i){r?(r=!1,n=i):n=t(n,i,i,e)})),r)throw s("Reduce of empty set with no initial value");return n}})},61437:(t,e,r)=>{"use strict";var n=r(82109),i=r(49974),a=r(88999),o=r(87758);n({target:"Set",proto:!0,real:!0,forced:!0},{some:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!0===o(e,(function(t){if(r(t,t,e))return!0}),!0)}})},35285:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(45965),o=r(98506);n({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(t){return i(o,this,a(t))}})},63252:(t,e,r)=>{var n=r(82109),i=r(98506);n({target:"Set",proto:!0,real:!0,forced:!r(13831)("symmetricDifference")},{symmetricDifference:i})},39865:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916),a=r(45965),o=r(39391);n({target:"Set",proto:!0,real:!0,forced:!0},{union:function(t){return i(o,this,a(t))}})},17454:(t,e,r)=>{var n=r(82109),i=r(39391);n({target:"Set",proto:!0,real:!0,forced:!r(13831)("union")},{union:i})},86035:(t,e,r)=>{"use strict";var n=r(82109),i=r(28710).charAt,a=r(84488),o=r(19303),s=r(41340);n({target:"String",proto:!0,forced:!0},{at:function(t){var e=s(a(this)),r=e.length,n=o(t),l=n>=0?n:r+n;return l<0||l>=r?void 0:i(e,l)}})},67501:(t,e,r)=>{"use strict";var n=r(82109),i=r(63061),a=r(76178),o=r(84488),s=r(41340),l=r(29909),c=r(28710),u=c.codeAt,h=c.charAt,f="String Iterator",d=l.set,p=l.getterFor(f),m=i((function(t){d(this,{type:f,string:t,index:0})}),"String",(function(){var t,e=p(this),r=e.string,n=e.index;return n>=r.length?a(void 0,!0):(t=h(r,n),e.index+=t.length,a({codePoint:u(t,0),position:n},!1))}));n({target:"String",proto:!0,forced:!0},{codePoints:function(){return new m(s(o(this)))}})},50058:(t,e,r)=>{r(82109)({target:"String",stat:!0,forced:!0},{cooked:r(92386)})},85576:(t,e,r)=>{"use strict";var n=r(76677),i=r(82109),a=r(72309),o=r(35005),s=r(56339),l=r(1702),c=r(22104),u=r(19670),h=r(47908),f=r(60614),d=r(26244),p=r(3070).f,m=r(41589),A=r(92386),g=r(70327),v=r(81361),y=a("GlobalDedentRegistry",new(o("WeakMap")));y.has=y.has,y.get=y.get,y.set=y.set;var b=Array,x=TypeError,w=Object.freeze||Object,_=Object.isFrozen,E=Math.min,M=l("".charAt),S=l("".slice),C=l("".split),T=l(/./.exec),I=/([\n\u2028\u2029]|\r\n?)/g,R=RegExp("^["+v+"]*"),B=RegExp("[^"+v+"]"),k="Invalid tag",L=function(t,e){if(void 0===e||t===e)return t;for(var r=0,n=E(t.length,e.length);r0)throw x("Invalid opening line");e[1]=""}if(c){if(1===e.length||T(B,e[e.length-1]))throw x("Invalid closing line");e[e.length-2]="",e[e.length-1]=""}for(var u=2;u{r(20787)},13728:(t,e,r)=>{r(76373)},27207:(t,e,r)=>{r(68757)},71842:(t,e,r)=>{r(57442)},16586:(t,e,r)=>{"use strict";var n=r(82109),i=r(47976),a=r(79518),o=r(27674),s=r(99920),l=r(70030),c=r(68880),u=r(79114),h=r(5392),f=r(56277),d=r(5112)("toStringTag"),p=Error,m=function(t,e,r){var n,s=i(A,this);return o?n=o(p(),s?a(this):A):(n=s?this:l(A),c(n,d,"Error")),void 0!==r&&c(n,"message",f(r)),h(n,m,n.stack,1),c(n,"error",t),c(n,"suppressed",e),n};o?o(m,p):s(m,p,{name:!0});var A=m.prototype=l(p.prototype,{constructor:u(1,m),message:u(1,""),name:u(1,"SuppressedError")});n({global:!0,constructor:!0,arity:3},{SuppressedError:m})},609:(t,e,r)=>{r(26800)("asyncDispose")},21568:(t,e,r)=>{r(26800)("dispose")},44177:(t,e,r)=>{r(82109)({target:"Symbol",stat:!0},{isRegisteredSymbol:r(68238)})},96431:(t,e,r)=>{r(82109)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:r(68238)})},53431:(t,e,r)=>{r(82109)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:r(58741)})},40050:(t,e,r)=>{r(82109)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:r(58741)})},54534:(t,e,r)=>{r(26800)("matcher")},34744:(t,e,r)=>{r(26800)("metadataKey")},95090:(t,e,r)=>{r(26800)("metadata")},48824:(t,e,r)=>{r(26800)("observable")},44130:(t,e,r)=>{r(26800)("patternMatch")},35954:(t,e,r)=>{r(26800)("replaceAll")},38012:(t,e,r)=>{r(48675)},26182:(t,e,r)=>{"use strict";var n=r(90260),i=r(42092).filterReject,a=r(43074),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("filterOut",(function(t){var e=i(o(this),t,arguments.length>1?arguments[1]:void 0);return a(this,e)}),!0)},8922:(t,e,r)=>{"use strict";var n=r(90260),i=r(42092).filterReject,a=r(43074),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("filterReject",(function(t){var e=i(o(this),t,arguments.length>1?arguments[1]:void 0);return a(this,e)}),!0)},1118:(t,e,r)=>{r(14590)},37380:(t,e,r)=>{r(63408)},16850:(t,e,r)=>{"use strict";var n=r(35005),i=r(39483),a=r(33253),o=r(90260),s=r(97745),l=o.aTypedArrayConstructor;(0,o.exportTypedArrayStaticMethod)("fromAsync",(function(t){var e=this,r=arguments.length,o=r>1?arguments[1]:void 0,c=r>2?arguments[2]:void 0;return new(n("Promise"))((function(r){i(e),r(a(t,o,c))})).then((function(t){return s(l(e),t)}))}),!0)},5835:(t,e,r)=>{"use strict";var n=r(90260),i=r(21191),a=r(66304),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("groupBy",(function(t){var e=arguments.length>1?arguments[1]:void 0;return i(o(this),t,e,a)}),!0)},23767:(t,e,r)=>{r(1439)},8585:(t,e,r)=>{r(87585)},8970:(t,e,r)=>{"use strict";var n=r(90260),i=r(26244),a=r(44067),o=r(51400),s=r(64599),l=r(19303),c=r(47293),u=n.aTypedArray,h=n.getTypedArrayConstructor,f=n.exportTypedArrayMethod,d=Math.max,p=Math.min;f("toSpliced",(function(t,e){var r,n,c,f,m,A,g,v=u(this),y=h(v),b=i(v),x=o(t,b),w=arguments.length,_=0;if(0===w)r=n=0;else if(1===w)r=0,n=b-x;else if(n=p(d(l(e),0),b-x),r=w-2){f=new y(r),c=a(f);for(var E=2;E{"use strict";var n=r(1702),i=r(90260),a=r(97745),o=r(60956),s=i.aTypedArray,l=i.getTypedArrayConstructor,c=i.exportTypedArrayMethod,u=n(o);c("uniqueBy",(function(t){return s(this),a(l(this),u(this,t))}),!0)},68696:(t,e,r)=>{r(55315)},78206:(t,e,r)=>{"use strict";var n=r(82109),i=r(29257),a=r(60953).remove;n({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n{"use strict";var n=r(82109),i=r(29257),a=r(60953),o=a.get,s=a.has,l=a.set;n({target:"WeakMap",proto:!0,real:!0,forced:!0},{emplace:function(t,e){var r,n,a=i(this);return s(a,t)?(r=o(a,t),"update"in e&&(r=e.update(r,t,a),l(a,t,r)),r):(n=e.insert(t,a),l(a,t,n),n)}})},76478:(t,e,r)=>{r(82109)({target:"WeakMap",stat:!0,forced:!0},{from:r(27296)})},79715:(t,e,r)=>{r(82109)({target:"WeakMap",stat:!0,forced:!0},{of:r(82044)})},5964:(t,e,r)=>{"use strict";r(82109)({target:"WeakMap",proto:!0,real:!0,forced:!0},{upsert:r(8154)})},43561:(t,e,r)=>{"use strict";var n=r(82109),i=r(72682),a=r(78818).add;n({target:"WeakSet",proto:!0,real:!0,forced:!0},{addAll:function(){for(var t=i(this),e=0,r=arguments.length;e{"use strict";var n=r(82109),i=r(72682),a=r(78818).remove;n({target:"WeakSet",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n{r(82109)({target:"WeakSet",stat:!0,forced:!0},{from:r(27296)})},56585:(t,e,r)=>{r(82109)({target:"WeakSet",stat:!0,forced:!0},{of:r(82044)})},75505:(t,e,r)=>{var n=r(82109),i=r(17854),a=r(35005),o=r(1702),s=r(46916),l=r(47293),c=r(41340),u=r(92597),h=r(48053),f=r(14170).ctoi,d=/[^\d+/a-z]/i,p=/[\t\n\f\r ]+/g,m=/[=]{1,2}$/,A=a("atob"),g=String.fromCharCode,v=o("".charAt),y=o("".replace),b=o(d.exec),x=l((function(){return""!==A(" ")})),w=!l((function(){A("a")})),_=!x&&!w&&!l((function(){A()})),E=!x&&!w&&1!==A.length;n({global:!0,bind:!0,enumerable:!0,forced:x||w||_||E},{atob:function(t){if(h(arguments.length,1),_||E)return s(A,i,t);var e,r,n=y(c(t),p,""),o="",l=0,x=0;if(n.length%4==0&&(n=y(n,m,"")),n.length%4==1||b(d,n))throw new(a("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;e=v(n,l++);)u(f,e)&&(r=x%4?64*r+f[e]:f[e],x++%4&&(o+=g(255&r>>(-2*x&6))));return o}})},27479:(t,e,r)=>{var n=r(82109),i=r(17854),a=r(35005),o=r(1702),s=r(46916),l=r(47293),c=r(41340),u=r(48053),h=r(14170).itoc,f=a("btoa"),d=o("".charAt),p=o("".charCodeAt),m=!!f&&!l((function(){f()})),A=!!f&&l((function(){return"bnVsbA=="!==f(null)})),g=!!f&&1!==f.length;n({global:!0,bind:!0,enumerable:!0,forced:m||A||g},{btoa:function(t){if(u(arguments.length,1),m||A||g)return s(f,i,c(t));for(var e,r,n=c(t),o="",l=0,v=h;d(n,l)||(v="=",l%1);){if((r=p(n,l+=3/4))>255)throw new(a("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");o+=d(v,63&(e=e<<8|r)>>8-l%1*8)}return o}})},11091:(t,e,r)=>{var n=r(82109),i=r(17854),a=r(20261).clear;n({global:!0,bind:!0,enumerable:!0,forced:i.clearImmediate!==a},{clearImmediate:a})},54747:(t,e,r)=>{var n=r(17854),i=r(48324),a=r(98509),o=r(18533),s=r(68880),l=function(t){if(t&&t.forEach!==o)try{s(t,"forEach",o)}catch(e){t.forEach=o}};for(var c in i)i[c]&&l(n[c]&&n[c].prototype);l(a)},33948:(t,e,r)=>{var n=r(17854),i=r(48324),a=r(98509),o=r(66992),s=r(68880),l=r(5112),c=l("iterator"),u=l("toStringTag"),h=o.values,f=function(t,e){if(t){if(t[c]!==h)try{s(t,c,h)}catch(e){t[c]=h}if(t[u]||s(t,u,e),i[e])for(var r in o)if(t[r]!==o[r])try{s(t,r,o[r])}catch(e){t[r]=o[r]}}};for(var d in i)f(n[d]&&n[d].prototype,d);f(a,"DOMTokenList")},87714:(t,e,r)=>{"use strict";var n=r(82109),i=r(44038),a=r(35005),o=r(47293),s=r(70030),l=r(79114),c=r(3070).f,u=r(98052),h=r(47045),f=r(92597),d=r(25787),p=r(19670),m=r(7762),A=r(56277),g=r(93678),v=r(11060),y=r(29909),b=r(19781),x=r(31913),w="DOMException",_="DATA_CLONE_ERR",E=a("Error"),M=a(w)||function(){try{(new(a("MessageChannel")||i("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(t){if(t.name==_&&25==t.code)return t.constructor}}(),S=M&&M.prototype,C=E.prototype,T=y.set,I=y.getterFor(w),R="stack"in E(w),B=function(t){return f(g,t)&&g[t].m?g[t].c:0},k=function(){d(this,L);var t=arguments.length,e=A(t<1?void 0:arguments[0]),r=A(t<2?void 0:arguments[1],"Error"),n=B(r);if(T(this,{type:w,name:r,message:e,code:n}),b||(this.name=r,this.message=e,this.code=n),R){var i=E(e);i.name=w,c(this,"stack",l(1,v(i.stack,1)))}},L=k.prototype=s(C),P=function(t){return{enumerable:!0,configurable:!0,get:t}},D=function(t){return P((function(){return I(this)[t]}))};b&&(h(L,"code",D("code")),h(L,"message",D("message")),h(L,"name",D("name"))),c(L,"constructor",l(1,k));var U=o((function(){return!(new M instanceof E)})),O=U||o((function(){return C.toString!==m||"2: 1"!==String(new M(1,2))})),F=U||o((function(){return 25!==new M(1,"DataCloneError").code})),N=U||25!==M[_]||25!==S[_],z=x?O||F||N:U;n({global:!0,constructor:!0,forced:z},{DOMException:z?k:M});var G=a(w),Z=G.prototype;for(var V in O&&(x||M===G)&&u(Z,"toString",m),F&&b&&M===G&&h(Z,"code",P((function(){return B(p(this).name)}))),g)if(f(g,V)){var Q=g[V],j=Q.s,W=l(6,Q.c);f(G,j)||c(G,j,W),f(Z,j)||c(Z,j,W)}},82801:(t,e,r)=>{"use strict";var n=r(82109),i=r(17854),a=r(35005),o=r(79114),s=r(3070).f,l=r(92597),c=r(25787),u=r(79587),h=r(56277),f=r(93678),d=r(11060),p=r(19781),m=r(31913),A="DOMException",g=a("Error"),v=a(A),y=function(){c(this,b);var t=arguments.length,e=h(t<1?void 0:arguments[0]),r=h(t<2?void 0:arguments[1],"Error"),n=new v(e,r),i=g(e);return i.name=A,s(n,"stack",o(1,d(i.stack,1))),u(n,this,y),n},b=y.prototype=v.prototype,x="stack"in g(A),w="stack"in new v(1,2),_=v&&p&&Object.getOwnPropertyDescriptor(i,A),E=!(!_||_.writable&&_.configurable),M=x&&!E&&!w;n({global:!0,constructor:!0,forced:m||M},{DOMException:M?y:v});var S=a(A),C=S.prototype;if(C.constructor!==S)for(var T in m||s(C,"constructor",o(1,S)),f)if(l(f,T)){var I=f[T],R=I.s;l(S,R)||s(S,R,o(6,I.c))}},1174:(t,e,r)=>{var n=r(35005),i="DOMException";r(58003)(n(i),i)},84633:(t,e,r)=>{r(11091),r(12986)},85844:(t,e,r)=>{var n=r(82109),i=r(17854),a=r(95948),o=r(19662),s=r(48053),l=r(35268),c=i.process;n({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(t){s(arguments.length,1),o(t);var e=l&&c.domain;a(e?e.bind(t):t)}})},71550:(t,e,r)=>{"use strict";var n=r(82109),i=r(17854),a=r(47045),o=r(19781),s=TypeError,l=Object.defineProperty,c=i.self!==i;try{if(o){var u=Object.getOwnPropertyDescriptor(i,"self");!c&&u&&u.get&&u.enumerable||a(i,"self",{get:function(){return i},set:function(t){if(this!==i)throw s("Illegal invocation");l(i,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else n({global:!0,simple:!0,forced:c},{self:i})}catch(t){}},12986:(t,e,r)=>{var n=r(82109),i=r(17854),a=r(20261).set,o=r(17152),s=i.setImmediate?o(a,!1):a;n({global:!0,bind:!0,enumerable:!0,forced:i.setImmediate!==s},{setImmediate:s})},96815:(t,e,r)=>{var n=r(82109),i=r(17854),a=r(17152)(i.setInterval,!0);n({global:!0,bind:!0,forced:i.setInterval!==a},{setInterval:a})},88417:(t,e,r)=>{var n=r(82109),i=r(17854),a=r(17152)(i.setTimeout,!0);n({global:!0,bind:!0,forced:i.setTimeout!==a},{setTimeout:a})},61295:(t,e,r)=>{var n,i=r(31913),a=r(82109),o=r(17854),s=r(35005),l=r(1702),c=r(47293),u=r(69711),h=r(60614),f=r(4411),d=r(68554),p=r(70111),m=r(52190),A=r(20408),g=r(19670),v=r(70648),y=r(92597),b=r(86135),x=r(68880),w=r(26244),_=r(48053),E=r(34706),M=r(75706),S=r(79405),C=r(22914),T=r(64124),I=o.Object,R=o.Array,B=o.Date,k=o.Error,L=o.EvalError,P=o.RangeError,D=o.ReferenceError,U=o.SyntaxError,O=o.TypeError,F=o.URIError,N=o.PerformanceMark,z=o.WebAssembly,G=z&&z.CompileError||k,Z=z&&z.LinkError||k,V=z&&z.RuntimeError||k,Q=s("DOMException"),j=M.Map,W=M.has,H=M.get,X=M.set,q=S.Set,Y=S.add,J=s("Object","keys"),K=l([].push),$=l((!0).valueOf),tt=l(1..valueOf),et=l("".valueOf),rt=l(B.prototype.getTime),nt=u("structuredClone"),it="DataCloneError",at="Transferring",ot=function(t){return!c((function(){var e=new o.Set([7]),r=t(e),n=t(I(7));return r==e||!r.has(7)||"object"!=typeof n||7!=n}))&&t},st=function(t,e){return!c((function(){var r=new e,n=t({a:r,b:r});return!(n&&n.a===n.b&&n.a instanceof e&&n.a.stack===r.stack)}))},lt=o.structuredClone,ct=i||!st(lt,k)||!st(lt,Q)||(n=lt,!!c((function(){var t=n(new o.AggregateError([1],nt,{cause:3}));return"AggregateError"!=t.name||1!=t.errors[0]||t.message!=nt||3!=t.cause}))),ut=!lt&&ot((function(t){return new N(nt,{detail:t}).detail})),ht=ot(lt)||ut,ft=function(t){throw new Q("Uncloneable type: "+t,it)},dt=function(t,e){throw new Q((e||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",it)},pt=function(t,e){return ht||dt(e),ht(t)},mt=function(t,e){if(m(t)&&ft("Symbol"),!p(t))return t;if(e){if(W(e,t))return H(e,t)}else e=new j;var r,n,i,a,l,c,u,f,d,A,g,_=v(t),M=!1;switch(_){case"Array":i=R(w(t)),M=!0;break;case"Object":i={},M=!0;break;case"Map":i=new j,M=!0;break;case"Set":i=new q,M=!0;break;case"RegExp":i=new RegExp(t.source,E(t));break;case"Error":switch(n=t.name){case"AggregateError":i=s("AggregateError")([]);break;case"EvalError":i=L();break;case"RangeError":i=P();break;case"ReferenceError":i=D();break;case"SyntaxError":i=U();break;case"TypeError":i=O();break;case"URIError":i=F();break;case"CompileError":i=G();break;case"LinkError":i=Z();break;case"RuntimeError":i=V();break;default:i=k()}M=!0;break;case"DOMException":i=new Q(t.message,t.name),M=!0;break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":r=o[_],p(r)||dt(_),i=new r(mt(t.buffer,e),t.byteOffset,"DataView"===_?t.byteLength:t.length);break;case"DOMQuad":try{i=new DOMQuad(mt(t.p1,e),mt(t.p2,e),mt(t.p3,e),mt(t.p4,e))}catch(e){i=pt(t,_)}break;case"File":if(ht)try{i=ht(t),v(i)!==_&&(i=void 0)}catch(t){}if(!i)try{i=new File([t],t.name,t)}catch(t){}i||dt(_);break;case"FileList":if(a=function(){var t;try{t=new o.DataTransfer}catch(e){try{t=new o.ClipboardEvent("").clipboardData}catch(t){}}return t&&t.items&&t.files?t:null}()){for(l=0,c=w(t);l1&&!d(arguments[1])?g(arguments[1]):void 0,n=r?r.transfer:void 0;return void 0!==n&&function(t,e){if(!p(t))throw O("Transfer option cannot be converted to a sequence");var r=[];A(t,(function(t){K(r,g(t))}));var n,i,a,s,l,c,u=0,d=w(r);if(T)for(s=lt(r,{transfer:r});u{r(96815),r(88417)},65556:(t,e,r)=>{"use strict";r(66992);var n=r(82109),i=r(17854),a=r(46916),o=r(1702),s=r(19781),l=r(85143),c=r(98052),u=r(47045),h=r(89190),f=r(58003),d=r(63061),p=r(29909),m=r(25787),A=r(60614),g=r(92597),v=r(49974),y=r(70648),b=r(19670),x=r(70111),w=r(41340),_=r(70030),E=r(79114),M=r(18554),S=r(71246),C=r(48053),T=r(5112),I=r(94362),R=T("iterator"),B="URLSearchParams",k=B+"Iterator",L=p.set,P=p.getterFor(B),D=p.getterFor(k),U=Object.getOwnPropertyDescriptor,O=function(t){if(!s)return i[t];var e=U(i,t);return e&&e.value},F=O("fetch"),N=O("Request"),z=O("Headers"),G=N&&N.prototype,Z=z&&z.prototype,V=i.RegExp,Q=i.TypeError,j=i.decodeURIComponent,W=i.encodeURIComponent,H=o("".charAt),X=o([].join),q=o([].push),Y=o("".replace),J=o([].shift),K=o([].splice),$=o("".split),tt=o("".slice),et=/\+/g,rt=Array(4),nt=function(t){return rt[t-1]||(rt[t-1]=V("((?:%[\\da-f]{2}){"+t+"})","gi"))},it=function(t){try{return j(t)}catch(e){return t}},at=function(t){var e=Y(t,et," "),r=4;try{return j(e)}catch(t){for(;r;)e=Y(e,nt(r--),it);return e}},ot=/[!'()~]|%20/g,st={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},lt=function(t){return st[t]},ct=function(t){return Y(W(t),ot,lt)},ut=d((function(t,e){L(this,{type:k,iterator:M(P(t).entries),kind:e})}),"Iterator",(function(){var t=D(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r}),!0),ht=function(t){this.entries=[],this.url=null,void 0!==t&&(x(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===H(t,0)?tt(t,1):t:w(t)))};ht.prototype={type:B,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,i,o,s,l,c=S(t);if(c)for(r=(e=M(t,c)).next;!(n=a(r,e)).done;){if(o=(i=M(b(n.value))).next,(s=a(o,i)).done||(l=a(o,i)).done||!a(o,i).done)throw Q("Expected sequence with length 2");q(this.entries,{key:w(s.value),value:w(l.value)})}else for(var u in t)g(t,u)&&q(this.entries,{key:u,value:w(t[u])})},parseQuery:function(t){if(t)for(var e,r,n=$(t,"&"),i=0;i0?arguments[0]:void 0));s||(this.size=t.entries.length)},dt=ft.prototype;if(h(dt,{append:function(t,e){var r=P(this);C(arguments.length,2),q(r.entries,{key:w(t),value:w(e)}),s||this.length++,r.updateURL()},delete:function(t){for(var e=P(this),r=C(arguments.length,1),n=e.entries,i=w(t),a=r<2?void 0:arguments[1],o=void 0===a?a:w(a),l=0;le.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,r=P(this).entries,n=v(t,arguments.length>1?arguments[1]:void 0),i=0;i1?At(arguments[1]):{})}}),A(N)){var gt=function(t){return m(this,G),new N(t,arguments.length>1?At(arguments[1]):{})};G.constructor=gt,gt.prototype=G,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:gt})}}t.exports={URLSearchParams:ft,getState:P}},46229:(t,e,r)=>{"use strict";var n=r(98052),i=r(1702),a=r(41340),o=r(48053),s=URLSearchParams,l=s.prototype,c=i(l.append),u=i(l.delete),h=i(l.forEach),f=i([].push),d=new s("a=1&a=2");d.delete("a",1),d+""!="a=2"&&n(l,"delete",(function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return u(this,t);var n=[];h(this,(function(t,e){f(n,{key:e,value:t})})),o(e,1);for(var i,s=a(t),l=a(r),d=0,p=0,m=!1,A=n.length;d{"use strict";var n=r(98052),i=r(1702),a=r(41340),o=r(48053),s=URLSearchParams,l=s.prototype,c=i(l.getAll),u=i(l.has);new s("a=1").has("a",2)&&n(l,"has",(function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return u(this,t);var n=c(this,t);o(e,1);for(var i=a(r),s=0;s{r(65556)},62062:(t,e,r)=>{"use strict";var n=r(19781),i=r(1702),a=r(47045),o=URLSearchParams.prototype,s=i(o.forEach);n&&!("size"in o)&&a(o,"size",{get:function(){var t=0;return s(this,(function(){t++})),t},configurable:!0,enumerable:!0})},7994:(t,e,r)=>{var n=r(82109),i=r(35005),a=r(47293),o=r(48053),s=r(41340),l=r(85143),c=i("URL");n({target:"URL",stat:!0,forced:!(l&&a((function(){c.canParse()})))},{canParse:function(t){var e=o(arguments.length,1),r=s(t),n=e<2||void 0===arguments[1]?void 0:s(arguments[1]);try{return!!new c(r,n)}catch(t){return!1}}})},68789:(t,e,r)=>{"use strict";r(78783);var n,i=r(82109),a=r(19781),o=r(85143),s=r(17854),l=r(49974),c=r(1702),u=r(98052),h=r(47045),f=r(25787),d=r(92597),p=r(21574),m=r(48457),A=r(41589),g=r(28710).codeAt,v=r(33197),y=r(41340),b=r(58003),x=r(48053),w=r(65556),_=r(29909),E=_.set,M=_.getterFor("URL"),S=w.URLSearchParams,C=w.getState,T=s.URL,I=s.TypeError,R=s.parseInt,B=Math.floor,k=Math.pow,L=c("".charAt),P=c(/./.exec),D=c([].join),U=c(1..toString),O=c([].pop),F=c([].push),N=c("".replace),z=c([].shift),G=c("".split),Z=c("".slice),V=c("".toLowerCase),Q=c([].unshift),j="Invalid scheme",W="Invalid host",H="Invalid port",X=/[a-z]/i,q=/[\d+-.a-z]/i,Y=/\d/,J=/^0x/i,K=/^[0-7]+$/,$=/^\d+$/,tt=/^[\da-f]+$/i,et=/[\0\t\n\r #%/:<>?@[\\\]^|]/,rt=/[\0\t\n\r #/:<>?@[\\\]^|]/,nt=/^[\u0000-\u0020]+/,it=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,at=/[\t\n\r]/g,ot=function(t){var e,r,n,i;if("number"==typeof t){for(e=[],r=0;r<4;r++)Q(e,t%256),t=B(t/256);return D(e,".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,i=0,a=0;a<8;a++)0!==t[a]?(i>r&&(e=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(e=n,r=i),e}(t),r=0;r<8;r++)i&&0===t[r]||(i&&(i=!1),n===r?(e+=r?":":"::",i=!0):(e+=U(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},st={},lt=p({},st,{" ":1,'"':1,"<":1,">":1,"`":1}),ct=p({},lt,{"#":1,"?":1,"{":1,"}":1}),ut=p({},ct,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ht=function(t,e){var r=g(t,0);return r>32&&r<127&&!d(e,t)?t:encodeURIComponent(t)},ft={ftp:21,file:null,http:80,https:443,ws:80,wss:443},dt=function(t,e){var r;return 2==t.length&&P(X,L(t,0))&&(":"==(r=L(t,1))||!e&&"|"==r)},pt=function(t){var e;return t.length>1&&dt(Z(t,0,2))&&(2==t.length||"/"===(e=L(t,2))||"\\"===e||"?"===e||"#"===e)},mt=function(t){return"."===t||"%2e"===V(t)},At={},gt={},vt={},yt={},bt={},xt={},wt={},_t={},Et={},Mt={},St={},Ct={},Tt={},It={},Rt={},Bt={},kt={},Lt={},Pt={},Dt={},Ut={},Ot=function(t,e,r){var n,i,a,o=y(t);if(e){if(i=this.parse(o))throw I(i);this.searchParams=null}else{if(void 0!==r&&(n=new Ot(r,!0)),i=this.parse(o,null,n))throw I(i);(a=C(new S)).bindURL(this),this.searchParams=a}};Ot.prototype={type:"URL",parse:function(t,e,r){var i,a,o,s,l,c=this,u=e||At,h=0,f="",p=!1,g=!1,v=!1;for(t=y(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=N(t,nt,""),t=N(t,it,"$1")),t=N(t,at,""),i=m(t);h<=i.length;){switch(a=i[h],u){case At:if(!a||!P(X,a)){if(e)return j;u=vt;continue}f+=V(a),u=gt;break;case gt:if(a&&(P(q,a)||"+"==a||"-"==a||"."==a))f+=V(a);else{if(":"!=a){if(e)return j;f="",u=vt,h=0;continue}if(e&&(c.isSpecial()!=d(ft,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,e)return void(c.isSpecial()&&ft[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?u=It:c.isSpecial()&&r&&r.scheme==c.scheme?u=yt:c.isSpecial()?u=_t:"/"==i[h+1]?(u=bt,h++):(c.cannotBeABaseURL=!0,F(c.path,""),u=Pt)}break;case vt:if(!r||r.cannotBeABaseURL&&"#"!=a)return j;if(r.cannotBeABaseURL&&"#"==a){c.scheme=r.scheme,c.path=A(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,u=Ut;break}u="file"==r.scheme?It:xt;continue;case yt:if("/"!=a||"/"!=i[h+1]){u=xt;continue}u=Et,h++;break;case bt:if("/"==a){u=Mt;break}u=Lt;continue;case xt:if(c.scheme=r.scheme,a==n)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=A(r.path),c.query=r.query;else if("/"==a||"\\"==a&&c.isSpecial())u=wt;else if("?"==a)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=A(r.path),c.query="",u=Dt;else{if("#"!=a){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=A(r.path),c.path.length--,u=Lt;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=A(r.path),c.query=r.query,c.fragment="",u=Ut}break;case wt:if(!c.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,u=Lt;continue}u=Mt}else u=Et;break;case _t:if(u=Et,"/"!=a||"/"!=L(f,h+1))continue;h++;break;case Et:if("/"!=a&&"\\"!=a){u=Mt;continue}break;case Mt:if("@"==a){p&&(f="%40"+f),p=!0,o=m(f);for(var b=0;b65535)return H;c.port=c.isSpecial()&&_===ft[c.scheme]?null:_,f=""}if(e)return;u=kt;continue}return H}f+=a;break;case It:if(c.scheme="file","/"==a||"\\"==a)u=Rt;else{if(!r||"file"!=r.scheme){u=Lt;continue}if(a==n)c.host=r.host,c.path=A(r.path),c.query=r.query;else if("?"==a)c.host=r.host,c.path=A(r.path),c.query="",u=Dt;else{if("#"!=a){pt(D(A(i,h),""))||(c.host=r.host,c.path=A(r.path),c.shortenPath()),u=Lt;continue}c.host=r.host,c.path=A(r.path),c.query=r.query,c.fragment="",u=Ut}}break;case Rt:if("/"==a||"\\"==a){u=Bt;break}r&&"file"==r.scheme&&!pt(D(A(i,h),""))&&(dt(r.path[0],!0)?F(c.path,r.path[0]):c.host=r.host),u=Lt;continue;case Bt:if(a==n||"/"==a||"\\"==a||"?"==a||"#"==a){if(!e&&dt(f))u=Lt;else if(""==f){if(c.host="",e)return;u=kt}else{if(s=c.parseHost(f))return s;if("localhost"==c.host&&(c.host=""),e)return;f="",u=kt}continue}f+=a;break;case kt:if(c.isSpecial()){if(u=Lt,"/"!=a&&"\\"!=a)continue}else if(e||"?"!=a)if(e||"#"!=a){if(a!=n&&(u=Lt,"/"!=a))continue}else c.fragment="",u=Ut;else c.query="",u=Dt;break;case Lt:if(a==n||"/"==a||"\\"==a&&c.isSpecial()||!e&&("?"==a||"#"==a)){if(".."===(l=V(l=f))||"%2e."===l||".%2e"===l||"%2e%2e"===l?(c.shortenPath(),"/"==a||"\\"==a&&c.isSpecial()||F(c.path,"")):mt(f)?"/"==a||"\\"==a&&c.isSpecial()||F(c.path,""):("file"==c.scheme&&!c.path.length&&dt(f)&&(c.host&&(c.host=""),f=L(f,0)+":"),F(c.path,f)),f="","file"==c.scheme&&(a==n||"?"==a||"#"==a))for(;c.path.length>1&&""===c.path[0];)z(c.path);"?"==a?(c.query="",u=Dt):"#"==a&&(c.fragment="",u=Ut)}else f+=ht(a,ct);break;case Pt:"?"==a?(c.query="",u=Dt):"#"==a?(c.fragment="",u=Ut):a!=n&&(c.path[0]+=ht(a,st));break;case Dt:e||"#"!=a?a!=n&&("'"==a&&c.isSpecial()?c.query+="%27":c.query+="#"==a?"%23":ht(a,st)):(c.fragment="",u=Ut);break;case Ut:a!=n&&(c.fragment+=ht(a,lt))}h++}},parseHost:function(t){var e,r,n;if("["==L(t,0)){if("]"!=L(t,t.length-1))return W;if(e=function(t){var e,r,n,i,a,o,s,l=[0,0,0,0,0,0,0,0],c=0,u=null,h=0,f=function(){return L(t,h)};if(":"==f()){if(":"!=L(t,1))return;h+=2,u=++c}for(;f();){if(8==c)return;if(":"!=f()){for(e=r=0;r<4&&P(tt,f());)e=16*e+R(f(),16),h++,r++;if("."==f()){if(0==r)return;if(h-=r,c>6)return;for(n=0;f();){if(i=null,n>0){if(!("."==f()&&n<4))return;h++}if(!P(Y,f()))return;for(;P(Y,f());){if(a=R(f(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;h++}l[c]=256*l[c]+i,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;l[c++]=e}else{if(null!==u)return;h++,u=++c}}if(null!==u)for(o=c-u,c=7;0!=c&&o>0;)s=l[c],l[c--]=l[u+o-1],l[u+--o]=s;else if(8!=c)return;return l}(Z(t,1,-1)),!e)return W;this.host=e}else if(this.isSpecial()){if(t=v(t),P(et,t))return W;if(e=function(t){var e,r,n,i,a,o,s,l=G(t,".");if(l.length&&""==l[l.length-1]&&l.length--,(e=l.length)>4)return t;for(r=[],n=0;n1&&"0"==L(i,0)&&(a=P(J,i)?16:8,i=Z(i,8==a?1:2)),""===i)o=0;else{if(!P(10==a?$:8==a?K:tt,i))return t;o=R(i,a)}F(r,o)}for(n=0;n=k(256,5-e))return null}else if(o>255)return null;for(s=O(r),n=0;n1?arguments[1]:void 0,n=E(e,new Ot(t,!1,r));a||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},Nt=Ft.prototype,zt=function(t,e){return{get:function(){return M(this)[t]()},set:e&&function(t){return M(this)[e](t)},configurable:!0,enumerable:!0}};if(a&&(h(Nt,"href",zt("serialize","setHref")),h(Nt,"origin",zt("getOrigin")),h(Nt,"protocol",zt("getProtocol","setProtocol")),h(Nt,"username",zt("getUsername","setUsername")),h(Nt,"password",zt("getPassword","setPassword")),h(Nt,"host",zt("getHost","setHost")),h(Nt,"hostname",zt("getHostname","setHostname")),h(Nt,"port",zt("getPort","setPort")),h(Nt,"pathname",zt("getPathname","setPathname")),h(Nt,"search",zt("getSearch","setSearch")),h(Nt,"searchParams",zt("getSearchParams")),h(Nt,"hash",zt("getHash","setHash"))),u(Nt,"toJSON",(function(){return M(this).serialize()}),{enumerable:!0}),u(Nt,"toString",(function(){return M(this).serialize()}),{enumerable:!0}),T){var Gt=T.createObjectURL,Zt=T.revokeObjectURL;Gt&&u(Ft,"createObjectURL",l(Gt,T)),Zt&&u(Ft,"revokeObjectURL",l(Zt,T))}b(Ft,"URL"),i({global:!0,constructor:!0,forced:!o,sham:!a},{URL:Ft})},60285:(t,e,r)=>{r(68789)},83753:(t,e,r)=>{"use strict";var n=r(82109),i=r(46916);n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return i(URL.prototype.toString,this)}})},9187:t=>{"use strict";function e(t,e,n){n=n||2;var a,o,s,l,h,f,p,m=e&&e.length,A=m?e[0]*n:t.length,g=r(t,0,A,n,!0),v=[];if(!g||g.next===g.prev)return v;if(m&&(g=function(t,e,n,i){var a,o,s,l=[];for(a=0,o=e.length;a80*n){a=s=t[0],o=l=t[1];for(var y=n;ys&&(s=h),f>l&&(l=f);p=0!==(p=Math.max(s-a,l-o))?32767/p:0}return i(g,v,n,a,o,p,0),v}function r(t,e,r,n,i){var a,o;if(i===S(t,e,r,n)>0)for(a=e;a=e;a-=n)o=_(a,t[a],t[a+1],o);return o&&g(o,o.next)&&(E(o),o=o.next),o}function n(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!g(n,n.next)&&0!==A(n.prev,n,n.next))n=n.next;else{if(E(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function i(t,e,r,c,u,h,d){if(t){!d&&h&&function(t,e,r,n){var i=t;do{0===i.z&&(i.z=f(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(t,c,u,h);for(var p,m,A=t;t.prev!==t.next;)if(p=t.prev,m=t.next,h?o(t,c,u,h):a(t))e.push(p.i/r|0),e.push(t.i/r|0),e.push(m.i/r|0),E(t),t=m.next,A=m.next;else if((t=m)===A){d?1===d?i(t=s(n(t),e,r),e,r,c,u,h,2):2===d&&l(t,e,r,c,u,h):i(n(t),e,r,c,u,h,1);break}}}function a(t){var e=t.prev,r=t,n=t.next;if(A(e,r,n)>=0)return!1;for(var i=e.x,a=r.x,o=n.x,s=e.y,l=r.y,c=n.y,u=ia?i>o?i:o:a>o?a:o,d=s>l?s>c?s:c:l>c?l:c,m=n.next;m!==e;){if(m.x>=u&&m.x<=f&&m.y>=h&&m.y<=d&&p(i,s,a,l,o,c,m.x,m.y)&&A(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function o(t,e,r,n){var i=t.prev,a=t,o=t.next;if(A(i,a,o)>=0)return!1;for(var s=i.x,l=a.x,c=o.x,u=i.y,h=a.y,d=o.y,m=sl?s>c?s:c:l>c?l:c,y=u>h?u>d?u:d:h>d?h:d,b=f(m,g,e,r,n),x=f(v,y,e,r,n),w=t.prevZ,_=t.nextZ;w&&w.z>=b&&_&&_.z<=x;){if(w.x>=m&&w.x<=v&&w.y>=g&&w.y<=y&&w!==i&&w!==o&&p(s,u,l,h,c,d,w.x,w.y)&&A(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,_.x>=m&&_.x<=v&&_.y>=g&&_.y<=y&&_!==i&&_!==o&&p(s,u,l,h,c,d,_.x,_.y)&&A(_.prev,_,_.next)>=0)return!1;_=_.nextZ}for(;w&&w.z>=b;){if(w.x>=m&&w.x<=v&&w.y>=g&&w.y<=y&&w!==i&&w!==o&&p(s,u,l,h,c,d,w.x,w.y)&&A(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;_&&_.z<=x;){if(_.x>=m&&_.x<=v&&_.y>=g&&_.y<=y&&_!==i&&_!==o&&p(s,u,l,h,c,d,_.x,_.y)&&A(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function s(t,e,r){var i=t;do{var a=i.prev,o=i.next.next;!g(a,o)&&v(a,i,i.next,o)&&x(a,o)&&x(o,a)&&(e.push(a.i/r|0),e.push(i.i/r|0),e.push(o.i/r|0),E(i),E(i.next),i=t=o),i=i.next}while(i!==t);return n(i)}function l(t,e,r,a,o,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var u=w(l,c);return l=n(l,l.next),u=n(u,u.next),i(l,e,r,a,o,s,0),void i(u,e,r,a,o,s,0)}c=c.next}l=l.next}while(l!==t)}function c(t,e){return t.x-e.x}function u(t,e){var r=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o&&(o=s,r=n.x=n.x&&n.x>=u&&i!==n.x&&p(ar.x||n.x===r.x&&h(r,n)))&&(r=n,d=l)),n=n.next}while(n!==c);return r}(t,e);if(!r)return e;var i=w(r,t);return n(i,i.next),n(r,r.next)}function h(t,e){return A(t.prev,t,e.prev)<0&&A(e.next,t,t.next)<0}function f(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,r=t;do{(e.x=(t-o)*(a-s)&&(t-o)*(n-s)>=(r-o)*(e-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&v(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(x(t,e)&&x(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(A(t.prev,t,e.prev)||A(t,e.prev,e))||g(t,e)&&A(t.prev,t,t.next)>0&&A(e.prev,e,e.next)>0)}function A(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function g(t,e){return t.x===e.x&&t.y===e.y}function v(t,e,r,n){var i=b(A(t,e,r)),a=b(A(t,e,n)),o=b(A(r,n,t)),s=b(A(r,n,e));return i!==a&&o!==s||!(0!==i||!y(t,r,e))||!(0!==a||!y(t,n,e))||!(0!==o||!y(r,t,n))||!(0!==s||!y(r,e,n))}function y(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function b(t){return t>0?1:t<0?-1:0}function x(t,e){return A(t.prev,t,t.next)<0?A(t,e,t.next)>=0&&A(t,t.prev,e)>=0:A(t,e,t.prev)<0||A(t,t.next,e)<0}function w(t,e){var r=new M(t.i,t.x,t.y),n=new M(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function _(t,e,r,n){var i=new M(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function E(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function M(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},80645:(t,e)=>{e.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,u=-7,h=r?i-1:0,f=r?-1:1,d=t[e+h];for(h+=f,a=d&(1<<-u)-1,d>>=-u,u+=s;u>0;a=256*a+t[e+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+h],h+=f,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=c}return(d?-1:1)*o*Math.pow(2,a-n)},e.write=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(e*l-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;t[r+d]=255&o,d+=p,o/=256,c-=8);t[r+d-p]|=128*m}},25705:(t,e,r)=>{"use strict";var n,i,a=r.g.MutationObserver||r.g.WebKitMutationObserver;if(a){var o=0,s=new a(h),l=r.g.document.createTextNode("");s.observe(l,{characterData:!0}),n=function(){l.data=o=++o%2}}else if(r.g.setImmediate||void 0===r.g.MessageChannel)n="document"in r.g&&"onreadystatechange"in r.g.document.createElement("script")?function(){var t=r.g.document.createElement("script");t.onreadystatechange=function(){h(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},r.g.document.documentElement.appendChild(t)}:function(){setTimeout(h,0)};else{var c=new r.g.MessageChannel;c.port1.onmessage=h,n=function(){c.port2.postMessage(0)}}var u=[];function h(){var t,e;i=!0;for(var r=u.length;r;){for(e=u,u=[],t=-1;++t{t.exports=function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[o]={exports:{}};e[o][0].call(c.exports,(function(t){return i(e[o][1][t]||t)}),c,c.exports,t,e,r,n)}return r[o].exports}for(var a=void 0,o=0;o>>1],e)>=0?i=a+1:n=a;return i},e.exports=function(){function t(t){var e;this.options=t,this.comparator=this.options.comparator,this.data=(null!=(e=this.options.initialValues)?e.slice(0):void 0)||[],this.data.sort(this.comparator).reverse()}return t.prototype.queue=function(t){var e;e=n(this.data,t,this.comparator),this.data.splice(e,0,t)},t.prototype.dequeue=function(){return this.data.pop()},t.prototype.peek=function(){return this.data[this.data.length-1]},t.prototype.clear=function(){this.data.length=0},t}()},{}],4:[function(t,e,r){e.exports=function(){function t(t){var e,r,n,i,a,o,s,l;for(this.comparator=(null!=t?t.comparator:void 0)||function(t,e){return t-e},this.pageSize=(null!=t?t.pageSize:void 0)||512,this.length=0,s=0;1<a;0<=a?++r:--r)e.push(null);if(this._memory=[],this._mask=this.pageSize-1,t.initialValues)for(n=0,i=(o=t.initialValues).length;n0&&(this._write(1,e),this._bubbleDown(1,e)),t},t.prototype.peek=function(){return this._read(1)},t.prototype.clear=function(){this.length=0,this._memory.length=0},t.prototype._write=function(t,e){var r;for(r=t>>this._shift;r>=this._memory.length;)this._memory.push(this._emptyMemoryPageTemplate.slice(0));return this._memory[r][t&this._mask]=e},t.prototype._read=function(t){return this._memory[t>>this._shift][t&this._mask]},t.prototype._bubbleUp=function(t,e){var r,n,i,a;for(r=this.comparator;t>1&&(n=t&this._mask,t3?i=t&~this._mask|n>>1:n<2?(i=t-this.pageSize>>this._shift,i+=i&~(this._mask>>1),i|=this.pageSize>>1):i=t-2,!(r(a=this._read(i),e)<0));)this._write(i,e),this._write(t,a),t=i},t.prototype._bubbleDown=function(t,e){var r,n,i,a,o;for(o=this.comparator;tthis._mask&&!(t&this._mask-1)?r=n=t+2:t&this.pageSize>>1?(r=(t&~this._mask)>>1,n=1+(r=1+(r|=t&this._mask>>1)<0)for(t=e=1,r=this.data.length;1<=r?er;t=1<=r?++e:--e)this._bubbleUp(t)},t.prototype.queue=function(t){this.data.push(t),this._bubbleUp(this.data.length-1)},t.prototype.dequeue=function(){var t,e;return e=this.data[0],t=this.data.pop(),this.data.length>0&&(this.data[0]=t,this._bubbleDown(0)),e},t.prototype.peek=function(){return this.data[0]},t.prototype.clear=function(){this.length=0,this.data.length=0},t.prototype._bubbleUp=function(t){for(var e,r;t>0&&(e=t-1>>>1,this.comparator(this.data[t],this.data[e])<0);)r=this.data[e],this.data[e]=this.data[t],this.data[t]=r,t=e},t.prototype._bubbleDown=function(t){var e,r,n,i,a;for(e=this.data.length-1;i=1+(r=1+(t<<1)),n=t,r<=e&&this.comparator(this.data[r],this.data[n])<0&&(n=r),i<=e&&this.comparator(this.data[i],this.data[n])<0&&(n=i),n!==t;)a=this.data[n],this.data[n]=this.data[t],this.data[t]=a,t=n},t}()},{}]},{},[1])(1)},55733:(t,e,r)=>{t.exports=function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[o]={exports:{}};e[o][0].call(c.exports,(function(t){return i(e[o][1][t]||t)}),c,c.exports,t,e,r,n)}return r[o].exports}for(var a=void 0,o=0;o>2,s=(3&e)<<4|r>>4,l=1>6:64,c=2>4,r=(15&o)<<4|(s=a.indexOf(t.charAt(c++)))>>2,n=(3&s)<<6|(l=a.indexOf(t.charAt(c++))),f[u++]=e,64!==s&&(f[u++]=r),64!==l&&(f[u++]=n);return f}},{"./support":30,"./utils":32}],2:[function(t,e,r){"use strict";var n=t("./external"),i=t("./stream/DataWorker"),a=t("./stream/Crc32Probe"),o=t("./stream/DataLengthProbe");function s(t,e,r,n,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=n,this.compressedContent=i}s.prototype={getContentWorker:function(){var t=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(t,e,r){return t.pipe(new a).pipe(new o("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new o("compressedSize")).withStreamInfo("compression",e)},e.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){"use strict";var n=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){"use strict";var n=t("./utils"),i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==n.getTypeOf(t)?function(t,e,r,n){var a=i,o=0+r;t^=-1;for(var s=0;s>>8^a[255&(t^e[s])];return-1^t}(0|e,t,t.length):function(t,e,r,n){var a=i,o=0+r;t^=-1;for(var s=0;s>>8^a[255&(t^e.charCodeAt(s))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var n;n="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:n}},{lie:37}],7:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=t("pako"),a=t("./utils"),o=t("./stream/GenericWorker"),s=n?"uint8array":"array";function l(t,e){o.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\b\0",a.inherits(l,o),l.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(a.transformTo(s,t.data),!1)},l.prototype.flush=function(){o.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(t){return new l("Deflate",t)},r.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){"use strict";function n(t,e){var r,n="";for(r=0;r>>=8;return n}function i(t,e,r,i,o,u){var h,f,d=t.file,p=t.compression,m=u!==s.utf8encode,A=a.transformTo("string",u(d.name)),g=a.transformTo("string",s.utf8encode(d.name)),v=d.comment,y=a.transformTo("string",u(v)),b=a.transformTo("string",s.utf8encode(v)),x=g.length!==d.name.length,w=b.length!==v.length,_="",E="",M="",S=d.dir,C=d.date,T={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(T.crc32=t.crc32,T.compressedSize=t.compressedSize,T.uncompressedSize=t.uncompressedSize);var I=0;e&&(I|=8),m||!x&&!w||(I|=2048);var R=0,B=0;S&&(R|=16),"UNIX"===o?(B=798,R|=function(t,e){var r=t;return t||(r=e?16893:33204),(65535&r)<<16}(d.unixPermissions,S)):(B=20,R|=function(t){return 63&(t||0)}(d.dosPermissions)),h=C.getUTCHours(),h<<=6,h|=C.getUTCMinutes(),h<<=5,h|=C.getUTCSeconds()/2,f=C.getUTCFullYear()-1980,f<<=4,f|=C.getUTCMonth()+1,f<<=5,f|=C.getUTCDate(),x&&(E=n(1,1)+n(l(A),4)+g,_+="up"+n(E.length,2)+E),w&&(M=n(1,1)+n(l(y),4)+b,_+="uc"+n(M.length,2)+M);var k="";return k+="\n\0",k+=n(I,2),k+=p.magic,k+=n(h,2),k+=n(f,2),k+=n(T.crc32,4),k+=n(T.compressedSize,4),k+=n(T.uncompressedSize,4),k+=n(A.length,2),k+=n(_.length,2),{fileRecord:c.LOCAL_FILE_HEADER+k+A+_,dirRecord:c.CENTRAL_FILE_HEADER+n(B,2)+k+n(y.length,2)+"\0\0\0\0"+n(R,4)+n(i,4)+A+_+y}}var a=t("../utils"),o=t("../stream/GenericWorker"),s=t("../utf8"),l=t("../crc32"),c=t("../signature");function u(t,e,r,n){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,o.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-n-1))/r:100}}))},u.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=i(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:function(t){return c.DATA_DESCRIPTOR+n(t.crc32,4)+n(t.compressedSize,4)+n(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return n.transformTo("string",this.readData(t))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=i},{"../utils":32}],19:[function(t,e,r){"use strict";var n=t("./Uint8ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){"use strict";var n=t("./DataReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},i.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},i.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){"use strict";var n=t("./ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../support"),a=t("./ArrayReader"),o=t("./StringReader"),s=t("./NodeBufferReader"),l=t("./Uint8ArrayReader");e.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new s(t):i.uint8array?new l(n.transformTo("uint8array",t)):new a(n.transformTo("array",t)):new o(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../utils");function a(t){n.call(this,"ConvertWorker to "+t),this.destType=t}i.inherits(a,n),a.prototype.processChunk=function(t){this.push({data:i.transformTo(this.destType,t.data),meta:t.meta})},e.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../crc32");function a(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(a,n),a.prototype.processChunk=function(t){this.streamInfo.crc32=i(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function a(t){i.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}n.inherits(a,i),a.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}i.prototype.processChunk.call(this,t)},e.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function a(t){i.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=n.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}n.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){"use strict";function n(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r "+t:t}},e.exports=n},{}],29:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./ConvertWorker"),a=t("./GenericWorker"),o=t("../base64"),s=t("../support"),l=t("../external"),c=null;if(s.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function u(t,e,r){var o=e;switch(e){case"blob":case"arraybuffer":o="uint8array";break;case"base64":o="string"}try{this._internalType=o,this._outputType=e,this._mimeType=r,n.checkSupport(o),this._worker=t.pipe(new i(o)),t.lock()}catch(t){this._worker=new a("error"),this._worker.error(t)}}u.prototype={accumulate:function(t){return function(t,e){return new l.Promise((function(r,i){var a=[],s=t._internalType,l=t._outputType,c=t._mimeType;t.on("data",(function(t,r){a.push(t),e&&e(r)})).on("error",(function(t){a=[],i(t)})).on("end",(function(){try{var t=function(t,e,r){switch(t){case"blob":return n.newBlob(n.transformTo("arraybuffer",e),r);case"base64":return o.encode(e);default:return n.transformTo(t,e)}}(l,function(t,e){var r,n=0,i=null,a=0;for(r=0;r>>6:(r<65536?e[o++]=224|r>>>12:(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63),e[o++]=128|r>>>6&63),e[o++]=128|63&r);return e}(t)},r.utf8decode=function(t){return i.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,a,o=t.length,l=new Array(2*o);for(e=r=0;e>10&1023,l[r++]=56320|1023&i)}return l.length!==r&&(l.subarray?l=l.subarray(0,r):l.length=r),n.applyFromCharCode(l)}(t=n.transformTo(i.uint8array?"uint8array":"array",t))},n.inherits(c,o),c.prototype.processChunk=function(t){var e=n.transformTo(i.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=e;(e=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),e.set(a,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var o=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+s[t[r]]>e?r:e}(e),l=e;o!==e.length&&(i.uint8array?(l=e.subarray(0,o),this.leftOver=e.subarray(o,e.length)):(l=e.slice(0,o),this.leftOver=e.slice(o,e.length))),this.push({data:r.utf8decode(l),meta:t.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=c,n.inherits(u,o),u.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,r){"use strict";var n=t("./support"),i=t("./base64"),a=t("./nodejsUtils"),o=t("./external");function s(t){return t}function l(t,e){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var t=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4>>6:(r<65536?e[o++]=224|r>>>12:(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63),e[o++]=128|r>>>6&63),e[o++]=128|63&r);return e},r.buf2binstring=function(t){return l(t,t.length)},r.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r>10&1023,c[n++]=56320|1023&i)}return l(c,n)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+o[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){for(var i=65535&t|0,a=t>>>16&65535|0,o=0;0!==r;){for(r-=o=2e3>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,i){var a=n,o=i+r;t^=-1;for(var s=i;s>>8^a[255&(t^e[s])];return-1^t}},{}],46:[function(t,e,r){"use strict";var n,i=t("../utils/common"),a=t("./trees"),o=t("./adler32"),s=t("./crc32"),l=t("./messages"),c=0,u=0,h=-2,f=2,d=8,p=286,m=30,A=19,g=2*p+1,v=15,y=3,b=258,x=b+y+1,w=42,_=113;function E(t,e){return t.msg=l[e],e}function M(t){return(t<<1)-(4t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function T(t,e){a._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,C(t.strm)}function I(t,e){t.pending_buf[t.pending++]=e}function R(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function B(t,e){var r,n,i=t.max_chain_length,a=t.strstart,o=t.prev_length,s=t.nice_match,l=t.strstart>t.w_size-x?t.strstart-(t.w_size-x):0,c=t.window,u=t.w_mask,h=t.prev,f=t.strstart+b,d=c[a+o-1],p=c[a+o];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(c[(r=e)+o]===p&&c[r+o-1]===d&&c[r]===c[a]&&c[++r]===c[a+1]){a+=2,r++;do{}while(c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&al&&0!=--i);return o<=t.lookahead?o:t.lookahead}function k(t){var e,r,n,a,l,c,u,h,f,d,p=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-x)){for(i.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,e=r=t.hash_size;n=t.head[--e],t.head[e]=p<=n?n-p:0,--r;);for(e=r=p;n=t.prev[--e],t.prev[e]=p<=n?n-p:0,--r;);a+=p}if(0===t.strm.avail_in)break;if(c=t.strm,u=t.window,h=t.strstart+t.lookahead,d=void 0,(f=a)<(d=c.avail_in)&&(d=f),r=0===d?0:(c.avail_in-=d,i.arraySet(u,c.input,c.next_in,d,h),1===c.state.wrap?c.adler=o(c.adler,u,d,h):2===c.state.wrap&&(c.adler=s(c.adler,u,d,h)),c.next_in+=d,c.total_in+=d,d),t.lookahead+=r,t.lookahead+t.insert>=y)for(l=t.strstart-t.insert,t.ins_h=t.window[l],t.ins_h=(t.ins_h<=y&&(t.ins_h=(t.ins_h<=y)if(n=a._tr_tally(t,t.strstart-t.match_start,t.match_length-y),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=y){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=y&&(t.ins_h=(t.ins_h<=y&&t.match_length<=t.prev_length){for(i=t.strstart+t.lookahead-y,n=a._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-y),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=i&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(k(t),0===t.lookahead&&e===c)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,T(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-x&&(T(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(T(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(T(t,!1),t.strm.avail_out),1)})),new D(4,4,8,4,L),new D(4,5,16,8,L),new D(4,6,32,32,L),new D(4,4,16,16,P),new D(8,16,32,32,P),new D(8,16,128,128,P),new D(8,32,128,256,P),new D(32,128,258,1024,P),new D(32,258,258,4096,P)],r.deflateInit=function(t,e){return N(t,e,d,15,8,0)},r.deflateInit2=N,r.deflateReset=F,r.deflateResetKeep=O,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?h:(t.state.gzhead=e,u):h},r.deflate=function(t,e){var r,i,o,l;if(!t||!t.state||5>8&255),I(i,i.gzhead.time>>16&255),I(i,i.gzhead.time>>24&255),I(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),I(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(I(i,255&i.gzhead.extra.length),I(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(I(i,0),I(i,0),I(i,0),I(i,0),I(i,0),I(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),I(i,3),i.status=_);else{var f=d+(i.w_bits-8<<4)<<8;f|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=_,R(i,f),0!==i.strstart&&(R(i,t.adler>>>16),R(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),C(t),o=i.pending,i.pending!==i.pending_buf_size));)I(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),C(t),o=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexo&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),C(t),o=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexo&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),0===l&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&C(t),i.pending+2<=i.pending_buf_size&&(I(i,255&t.adler),I(i,t.adler>>8&255),t.adler=0,i.status=_)):i.status=_),0!==i.pending){if(C(t),0===t.avail_out)return i.last_flush=-1,u}else if(0===t.avail_in&&M(e)<=M(r)&&4!==e)return E(t,-5);if(666===i.status&&0!==t.avail_in)return E(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==c&&666!==i.status){var p=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(k(t),0===t.lookahead)){if(e===c)return 1;break}if(t.match_length=0,r=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(T(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(T(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,o,s=t.window;;){if(t.lookahead<=b){if(k(t),t.lookahead<=b&&e===c)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=y&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=y?(r=a._tr_tally(t,1,t.match_length-y),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(T(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(T(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==p&&4!==p||(i.status=666),1===p||3===p)return 0===t.avail_out&&(i.last_flush=-1),u;if(2===p&&(1===e?a._tr_align(i):5!==e&&(a._tr_stored_block(i,0,0,!1),3===e&&(S(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),C(t),0===t.avail_out))return i.last_flush=-1,u}return 4!==e?u:i.wrap<=0?1:(2===i.wrap?(I(i,255&t.adler),I(i,t.adler>>8&255),I(i,t.adler>>16&255),I(i,t.adler>>24&255),I(i,255&t.total_in),I(i,t.total_in>>8&255),I(i,t.total_in>>16&255),I(i,t.total_in>>24&255)):(R(i,t.adler>>>16),R(i,65535&t.adler)),C(t),0=r.w_size&&(0===s&&(S(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,e,p-r.w_size,r.w_size,0),e=d,p=r.w_size),l=t.avail_in,c=t.next_in,f=t.input,t.avail_in=p,t.next_in=0,t.input=e,k(r);r.lookahead>=y;){for(n=r.strstart,a=r.lookahead-(y-1);r.ins_h=(r.ins_h<>>=b=y>>>24,p-=b,0==(b=y>>>16&255))S[a++]=65535&y;else{if(!(16&b)){if(0==(64&b)){y=m[(65535&y)+(d&(1<>>=b,p-=b),p<15&&(d+=M[n++]<>>=b=y>>>24,p-=b,!(16&(b=y>>>16&255))){if(0==(64&b)){y=A[(65535&y)+(d&(1<>>=b,p-=b,(b=a-o)>3,d&=(1<<(p-=x<<3))-1,t.next_in=n,t.next_out=a,t.avail_in=n>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function p(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function m(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=u,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(h),e.distcode=e.distdyn=new n.Buf32(f),e.sane=1,e.back=-1,l):c}function A(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,m(t)):c}function g(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=o.wsize?(n.arraySet(o.window,e,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),n.arraySet(o.window,e,r-i,a,o.wnext),(i-=a)?(n.arraySet(o.window,e,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=a(r.check,F,2,0),y=v=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&v)<<8)+(v>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&v)){t.msg="unknown compression method",r.mode=30;break}if(y-=4,L=8+(15&(v>>>=4)),0===r.wbits)r.wbits=L;else if(L>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(F[0]=255&v,F[1]=v>>>8&255,r.check=a(r.check,F,2,0)),y=v=0,r.mode=3;case 3:for(;y<32;){if(0===A)break t;A--,v+=h[p++]<>>8&255,F[2]=v>>>16&255,F[3]=v>>>24&255,r.check=a(r.check,F,4,0)),y=v=0,r.mode=4;case 4:for(;y<16;){if(0===A)break t;A--,v+=h[p++]<>8),512&r.flags&&(F[0]=255&v,F[1]=v>>>8&255,r.check=a(r.check,F,2,0)),y=v=0,r.mode=5;case 5:if(1024&r.flags){for(;y<16;){if(0===A)break t;A--,v+=h[p++]<>>8&255,r.check=a(r.check,F,2,0)),y=v=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(A<(E=r.length)&&(E=A),E&&(r.head&&(L=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,h,p,E,L)),512&r.flags&&(r.check=a(r.check,h,E,p)),A-=E,p+=E,r.length-=E),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===A)break t;for(E=0;L=h[p+E++],r.head&&L&&r.length<65536&&(r.head.name+=String.fromCharCode(L)),L&&E>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;y<32;){if(0===A)break t;A--,v+=h[p++]<>>=7&y,y-=7&y,r.mode=27;break}for(;y<3;){if(0===A)break t;A--,v+=h[p++]<>>=1)){case 0:r.mode=14;break;case 1:if(w(r),r.mode=20,6!==e)break;v>>>=2,y-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}v>>>=2,y-=2;break;case 14:for(v>>>=7&y,y-=7&y;y<32;){if(0===A)break t;A--,v+=h[p++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&v,y=v=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(E=r.length){if(A>>=5,y-=5,r.ndist=1+(31&v),v>>>=5,y-=5,r.ncode=4+(15&v),v>>>=4,y-=4,286>>=3,y-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,D={bits:r.lenbits},P=s(0,r.lens,0,19,r.lencode,0,r.work,D),r.lenbits=D.bits,P){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,I=65535&O,!((C=O>>>24)<=y);){if(0===A)break t;A--,v+=h[p++]<>>=C,y-=C,r.lens[r.have++]=I;else{if(16===I){for(U=C+2;y>>=C,y-=C,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}L=r.lens[r.have-1],E=3+(3&v),v>>>=2,y-=2}else if(17===I){for(U=C+3;y>>=C)),v>>>=3,y-=3}else{for(U=C+7;y>>=C)),v>>>=7,y-=7}if(r.have+E>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;E--;)r.lens[r.have++]=L}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,D={bits:r.lenbits},P=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,D),r.lenbits=D.bits,P){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,D={bits:r.distbits},P=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,D),r.distbits=D.bits,P){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=A&&258<=g){t.next_out=m,t.avail_out=g,t.next_in=p,t.avail_in=A,r.hold=v,r.bits=y,o(t,x),m=t.next_out,f=t.output,g=t.avail_out,p=t.next_in,h=t.input,A=t.avail_in,v=r.hold,y=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;T=(O=r.lencode[v&(1<>>16&255,I=65535&O,!((C=O>>>24)<=y);){if(0===A)break t;A--,v+=h[p++]<>R)])>>>16&255,I=65535&O,!(R+(C=O>>>24)<=y);){if(0===A)break t;A--,v+=h[p++]<>>=R,y-=R,r.back+=R}if(v>>>=C,y-=C,r.back+=C,r.length=I,0===T){r.mode=26;break}if(32&T){r.back=-1,r.mode=12;break}if(64&T){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&T,r.mode=22;case 22:if(r.extra){for(U=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;T=(O=r.distcode[v&(1<>>16&255,I=65535&O,!((C=O>>>24)<=y);){if(0===A)break t;A--,v+=h[p++]<>R)])>>>16&255,I=65535&O,!(R+(C=O>>>24)<=y);){if(0===A)break t;A--,v+=h[p++]<>>=R,y-=R,r.back+=R}if(v>>>=C,y-=C,r.back+=C,64&T){t.msg="invalid distance code",r.mode=30;break}r.offset=I,r.extra=15&T,r.mode=24;case 24:if(r.extra){for(U=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===g)break t;if(E=x-g,r.offset>E){if((E=r.offset-E)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}M=E>r.wnext?(E-=r.wnext,r.wsize-E):r.wnext-E,E>r.length&&(E=r.length),S=r.window}else S=f,M=m-r.offset,E=r.length;for(gv?(b=O[F+h[E]],L[P+h[E]]):(b=96,0),d=1<<_-I,M=p=1<>I)+(p-=d)]=y<<24|b<<16|x|0,0!==p;);for(d=1<<_-1;k&d;)d>>=1;if(0!==d?(k&=d-1,k+=d):k=0,E++,0==--D[_]){if(_===S)break;_=e[r+h[E]]}if(C<_&&(k&A)!==m){for(0===I&&(I=C),g+=M,R=1<<(T=_-I);T+I>>7)]}function S(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function C(t,e,r){t.bi_valid>c-r?(t.bi_buf|=e<>c-t.bi_valid,t.bi_valid+=r-c):(t.bi_buf|=e<>>=1,r<<=1,0<--e;);return r>>>1}function R(t,e,r){var n,i,a=new Array(l+1),o=0;for(n=1;n<=l;n++)a[n]=o=o+r[n-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=I(a[s]++,s))}}function B(t){var e;for(e=0;e>1;1<=r;r--)P(t,a,r);for(i=c;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],P(t,a,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,a[2*i]=a[2*r]+a[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,a[2*r+1]=a[2*n+1]=i,t.heap[1]=i++,P(t,a,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,a,o,s,c=e.dyn_tree,u=e.max_code,h=e.stat_desc.static_tree,f=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,m=e.stat_desc.max_length,A=0;for(a=0;a<=l;a++)t.bl_count[a]=0;for(c[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)m<(a=c[2*c[2*(n=t.heap[r])+1]+1]+1)&&(a=m,A++),c[2*n+1]=a,u>=7;n>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?z(t,e,r,n):4===t.strategy||o===i?(C(t,2+(n?1:0),3),D(t,p,m)):(C(t,4+(n?1:0),3),function(t,e,r,n){var i;for(C(t,e-257,5),C(t,r-1,5),C(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(g[r]+a+1)]++,t.dyn_dtree[2*M(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){C(t,2,3),T(t,256,p),function(t){16===t.bi_valid?(S(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,n){(function(t){!function(t,e){"use strict";if(!t.setImmediate){var r,n,i,a,o=1,s={},l=!1,c=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,r="[object process]"==={}.toString.call(t.process)?function(t){process.nextTick((function(){f(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?(a="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",d,!1):t.attachEvent("onmessage",d),function(e){t.postMessage(a+e,"*")}):t.MessageChannel?((i=new MessageChannel).port1.onmessage=function(t){f(t.data)},function(t){i.port2.postMessage(t)}):c&&"onreadystatechange"in c.createElement("script")?(n=c.documentElement,function(t){var e=c.createElement("script");e.onreadystatechange=function(){f(t),e.onreadystatechange=null,n.removeChild(e),e=null},n.appendChild(e)}):function(t){setTimeout(f,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n{"use strict";var n=r(25705);function i(){}var a={},o=["REJECTED"],s=["FULFILLED"],l=["PENDING"];function c(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,t!==i&&d(this,t)}function u(t,e,r){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function h(t,e,r){n((function(){var n;try{n=e(r)}catch(e){return a.reject(t,e)}n===t?a.reject(t,new TypeError("Cannot resolve promise with itself")):a.resolve(t,n)}))}function f(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function d(t,e){var r=!1;function n(e){r||(r=!0,a.reject(t,e))}function i(e){r||(r=!0,a.resolve(t,e))}var o=p((function(){e(i,n)}));"error"===o.status&&n(o.value)}function p(t,e){var r={};try{r.value=t(e),r.status="success"}catch(t){r.status="error",r.value=t}return r}t.exports=c,c.prototype.finally=function(t){if("function"!=typeof t)return this;var e=this.constructor;return this.then((function(r){return e.resolve(t()).then((function(){return r}))}),(function(r){return e.resolve(t()).then((function(){throw r}))}))},c.prototype.catch=function(t){return this.then(null,t)},c.prototype.then=function(t,e){if("function"!=typeof t&&this.state===s||"function"!=typeof e&&this.state===o)return this;var r=new this.constructor(i);return this.state!==l?h(r,this.state===s?t:e,this.outcome):this.queue.push(new u(r,t,e)),r},u.prototype.callFulfilled=function(t){a.resolve(this.promise,t)},u.prototype.otherCallFulfilled=function(t){h(this.promise,this.onFulfilled,t)},u.prototype.callRejected=function(t){a.reject(this.promise,t)},u.prototype.otherCallRejected=function(t){h(this.promise,this.onRejected,t)},a.resolve=function(t,e){var r=p(f,e);if("error"===r.status)return a.reject(t,r.value);var n=r.value;if(n)d(t,n);else{t.state=s,t.outcome=e;for(var i=-1,o=t.queue.length;++i{r(29718);var n=r(6941).s;function i(t){var e=new n;return(e.write(t)+e.end()).replace(/\0/g,"").trim()}t.exports=function t(e,r){if(!e)return i;try{new TextDecoder(e.trim())}catch(o){var n=a.exec(e);return n&&!r?t("windows-"+n[1],!0):i}return function(t){var r=new TextDecoder(e);return(r.decode(t,{stream:!0})+r.decode()).replace(/\0/g,"").trim()}};var a=/^(?:ANSI\s)?(\d+)$/m},9462:(t,e,r)=>{var n=r(11392);function i(t,e,r,n,i){var a=i(t.slice(e,e+r));switch(n){case"N":case"F":case"O":return parseFloat(a,10);case"D":return new Date(a.slice(0,4),parseInt(a.slice(4,6),10)-1,a.slice(6,8));case"L":return"y"===a.toLowerCase()||"t"===a.toLowerCase();default:return a}}function a(t,e,r,n){for(var a,o,s={},l=0,c=r.length;l{"use strict";t.exports=i;var n=r(80645);function i(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var a=4294967296,o=1/a,s="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function l(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function c(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function u(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function h(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function w(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>3,a=this.pos;this.type=7&n,t(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=w(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=b(this.buf,this.pos)+b(this.buf,this.pos+4)*a;return this.pos+=8,t},readSFixed64:function(){var t=b(this.buf,this.pos)+w(this.buf,this.pos+4)*a;return this.pos+=8,t},readFloat:function(){var t=n.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=n.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,a=r.buf;if(n=(112&(i=a[r.pos++]))>>4,i<128)return c(t,n,e);if(n|=(127&(i=a[r.pos++]))<<3,i<128)return c(t,n,e);if(n|=(127&(i=a[r.pos++]))<<10,i<128)return c(t,n,e);if(n|=(127&(i=a[r.pos++]))<<17,i<128)return c(t,n,e);if(n|=(127&(i=a[r.pos++]))<<24,i<128)return c(t,n,e);if(n|=(1&(i=a[r.pos++]))<<31,i<128)return c(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&s?function(t,e,r){return s.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){for(var n="",i=e;i239?4:l>223?3:l>191?2:1;if(i+u>r)break;1===u?l<128&&(c=l):2===u?128==(192&(a=t[i+1]))&&(c=(31&l)<<6|63&a)<=127&&(c=null):3===u?(a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&((c=(15&l)<<12|(63&a)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&((c=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),i+=u}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==i.Bytes)return t.push(this.readVarint(e));var r=l(this);for(t=t||[];this.pos127;);else if(e===i.Bytes)this.pos=this.readVarint()+this.pos;else if(e===i.Fixed32)this.pos+=4;else{if(e!==i.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0?function(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,a=0;a55295&&n<57344){if(!i){n>56319||a+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&u(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),n.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),n.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&u(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,i.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,m,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,A,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,v,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,y,e)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},24472:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>rr});var n=1,i=2,a=3,o=5,s=6378137,l=6356752.314,c=.0066943799901413165,u=484813681109536e-20,h=Math.PI/2,f=1e-10,d=.017453292519943295,p=57.29577951308232,m=Math.PI/4,A=2*Math.PI,g=3.14159265359,v={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};const y={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var b=/[\s_\-\/\(\)]/g;function x(t,e){if(t[e])return t[e];for(var r,n=Object.keys(t),i=e.toLowerCase().replace(b,""),a=-1;++a=this.text.length)return;t=this.text[this.place++]}switch(this.state){case E:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},R.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(T.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},R.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=E)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=E,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},R.prototype.number=function(t){if(!I.test(t)){if(T.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},R.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},R.prototype.keyword=function(t){if(C.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=E)}if(!T.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},R.prototype.neutral=function(t){if(S.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(I.test(t))return this.word=t,void(this.state=3);if(!T.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},R.prototype.output=function(){for(;this.place0?90:-90)):(t.lat0=P(t.lat1>0?90:-90),t.lat_ts=t.lat1)}(i),i}function U(t){var e=this;if(2===arguments.length){var r=arguments[1];"string"==typeof r?"+"===r.charAt(0)?U[t]=w(arguments[1]):U[t]=D(arguments[1]):U[t]=r}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?U.apply(e,t):U(t)}));if("string"==typeof t){if(t in U)return U[t]}else"EPSG"in t?U["EPSG:"+t.EPSG]=t:"ESRI"in t?U["ESRI:"+t.ESRI]=t:"IAU2000"in t?U["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(U);const O=U;var F=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"],N=["3857","900913","3785","102113"];function z(t,e){var r,n;if(t=t||{},!e)return t;for(n in e)void 0!==(r=e[n])&&(t[n]=r);return t}function G(t,e,r){var n=t*e;return r/Math.sqrt(1-n*n)}function Z(t){return t<0?-1:1}function V(t){return Math.abs(t)<=g?t:t-Z(t)*A}function Q(t,e,r){var n=t*r,i=.5*t;return n=Math.pow((1-n)/(1+n),i),Math.tan(.5*(h-e))/n}function j(t,e){for(var r,n,i=.5*t,a=h-2*Math.atan(e),o=0;o<=15;o++)if(r=t*Math.sin(a),a+=n=h-2*Math.atan(e*Math.pow((1-r)/(1+r),i))-a,Math.abs(n)<=1e-10)return a;return-9999}function W(t){return t}var H=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=G(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var e,r,n=t.x,i=t.y;if(i*p>90&&i*p<-90&&n*p>180&&n*p<-180)return null;if(Math.abs(Math.abs(i)-h)<=f)return null;if(this.sphere)e=this.x0+this.a*this.k0*V(n-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(m+.5*i));else{var a=Math.sin(i),o=Q(this.e,i,a);e=this.x0+this.a*this.k0*V(n-this.long0),r=this.y0-this.a*this.k0*Math.log(o)}return t.x=e,t.y=r,t},inverse:function(t){var e,r,n=t.x-this.x0,i=t.y-this.y0;if(this.sphere)r=h-2*Math.atan(Math.exp(-i/(this.a*this.k0)));else{var a=Math.exp(-i/(this.a*this.k0));if(-9999===(r=j(this.e,a)))return null}return e=V(this.long0+n/(this.a*this.k0)),t.x=e,t.y=r,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:W,inverse:W,names:["longlat","identity"]}],X={},q=[];function Y(t,e){var r=q.length;return t.names?(q[r]=t,t.names.forEach((function(t){X[t.toLowerCase()]=r})),this):(console.log(e),!0)}const J={start:function(){H.forEach(Y)},add:Y,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==X[e]&&q[X[e]]?q[X[e]]:void 0}};var K={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},$=K.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};K.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var tt={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}};var et={};function rt(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:et[t]||null,isNull:!1}}function nt(t){return t/3600*Math.PI/180}function it(t,e,r){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,r)))}function at(t){return t.map((function(t){return[nt(t.longitudeShift),nt(t.latitudeShift)]}))}function ot(t,e,r){return{name:it(t,e+8,e+16).trim(),parent:it(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,r),upperLatitude:t.getFloat64(e+88,r),lowerLongitude:t.getFloat64(e+104,r),upperLongitude:t.getFloat64(e+120,r),latitudeInterval:t.getFloat64(e+136,r),longitudeInterval:t.getFloat64(e+152,r),gridNodeCount:t.getInt32(e+168,r)}}function st(t,e,r,n){for(var i=e+176,a=[],o=0;o-1}))}(t)){var e=D(t);if(function(t){var e=x(t,"authority");if(e){var r=x(e,"epsg");return r&&N.indexOf(r)>-1}}(e))return O["EPSG:3857"];var r=function(t){var e=x(t,"extension");if(e)return x(e,"proj4")}(e);return r?w(r):e}return function(t){return"+"===t[0]}(t)?w(t):void 0}(t);if("object"==typeof r){var s=lt.projections.get(r.projName);if(s){if(r.datumCode&&"none"!==r.datumCode){var l=x(tt,r.datumCode);l&&(r.datum_params=r.datum_params||(l.towgs84?l.towgs84.split(","):null),r.ellps=l.ellipse,r.datumName=l.datumName?l.datumName:r.datumCode)}r.k0=r.k0||1,r.axis=r.axis||"enu",r.ellps=r.ellps||"wgs84",r.lat1=r.lat1||r.lat0;var c,h,d,p,m,A,g=function(t,e,r,n,i){if(!t){var a=x(K,n);a||(a=$),t=a.a,e=a.b,r=a.rf}return r&&!e&&(e=(1-1/r)*t),(0===r||Math.abs(t-e)3&&(0===f.datum_params[3]&&0===f.datum_params[4]&&0===f.datum_params[5]&&0===f.datum_params[6]||(f.datum_type=i,f.datum_params[3]*=u,f.datum_params[4]*=u,f.datum_params[5]*=u,f.datum_params[6]=f.datum_params[6]/1e6+1))),h&&(f.datum_type=a,f.grids=h),f.a=r,f.b=s,f.es=l,f.ep2=c,f}(r.datumCode,r.datum_params,g.a,g.b,v.es,v.ep2,y);z(this,r),z(this,s),this.a=g.a,this.b=g.b,this.rf=g.rf,this.sphere=g.sphere,this.es=v.es,this.e=v.e,this.ep2=v.ep2,this.datum=b,this.init(),e(null,this)}else e(t)}else e(t)}lt.projections=J,lt.projections.start();const ct=lt;function ut(t,e,r){var n,i,a,o,s=t.x,l=t.y,c=t.z?t.z:0;if(l<-h&&l>-1.001*h)l=-h;else if(l>h&&l<1.001*h)l=h;else{if(l<-h)return{x:-1/0,y:-1/0,z:t.z};if(l>h)return{x:1/0,y:1/0,z:t.z}}return s>Math.PI&&(s-=2*Math.PI),i=Math.sin(l),o=Math.cos(l),a=i*i,{x:((n=r/Math.sqrt(1-e*a))+c)*o*Math.cos(s),y:(n+c)*o*Math.sin(s),z:(n*(1-e)+c)*i}}function ht(t,e,r,n){var i,a,o,s,l,c,u,h,f,d,p,m,A,g,v,y=t.x,b=t.y,x=t.z?t.z:0;if(i=Math.sqrt(y*y+b*b),a=Math.sqrt(y*y+b*b+x*x),i/r<1e-12){if(g=0,a/r<1e-12)return v=-n,{x:t.x,y:t.y,z:t.z}}else g=Math.atan2(b,y);o=x/a,h=(s=i/a)*(1-e)*(l=1/Math.sqrt(1-e*(2-e)*s*s)),f=o*l,A=0;do{A++,c=e*(u=r/Math.sqrt(1-e*f*f))/(u+(v=i*h+x*f-u*(1-e*f*f))),m=(p=o*(l=1/Math.sqrt(1-c*(2-c)*s*s)))*h-(d=s*(1-c)*l)*f,h=d,f=p}while(m*m>1e-24&&A<30);return{x:g,y:Math.atan(p/Math.abs(d)),z:v}}function ft(t){return t===n||t===i}function dt(t,e,r){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;for(var n={x:-r.x,y:r.y},i={x:Number.NaN,y:Number.NaN},a=[],o=0;on.y||u>n.x||d1e-12&&Math.abs(o.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=V(a.x+r.ll[0]),n.y=a.y+r.ll[1]}else isNaN(a.x)||(n.x=t.x+a.x,n.y=t.y+a.y);return n}function mt(t,e){var r,n={x:t.x/e.del[0],y:t.y/e.del[1]},i=Math.floor(n.x),a=Math.floor(n.y),o=n.x-1*i,s=n.y-1*a,l={x:Number.NaN,y:Number.NaN};if(i<0||i>=e.lim[0])return l;if(a<0||a>=e.lim[1])return l;r=a*e.lim[0]+i;var c=e.cvs[r][0],u=e.cvs[r][1];r++;var h=e.cvs[r][0],f=e.cvs[r][1];r+=e.lim[0];var d=e.cvs[r][0],p=e.cvs[r][1];r--;var m=e.cvs[r][0],A=e.cvs[r][1],g=o*s,v=o*(1-s),y=(1-o)*(1-s),b=(1-o)*s;return l.x=y*c+v*h+b*m+g*d,l.y=y*u+v*f+b*A+g*p,l}function At(t,e,r){var n,i,a,o=r.x,s=r.y,l=r.z||0,c={};for(a=0;a<3;a++)if(!e||2!==a||void 0!==r.z)switch(0===a?(n=o,i=-1!=="ew".indexOf(t.axis[a])?"x":"y"):1===a?(n=s,i=-1!=="ns".indexOf(t.axis[a])?"y":"x"):(n=l,i="z"),t.axis[a]){case"e":case"n":c[i]=n;break;case"w":case"s":c[i]=-n;break;case"u":void 0!==r[i]&&(c.z=n);break;case"d":void 0!==r[i]&&(c.z=-n);break;default:return null}return c}function gt(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}function vt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function yt(t,e,r,u){var h,f=void 0!==(r=Array.isArray(r)?gt(r):{x:r.x,y:r.y,z:r.z,m:r.m}).z;if(function(t){vt(t.x),vt(t.y)}(r),t.datum&&e.datum&&function(t,e){return(t.datum.datum_type===n||t.datum.datum_type===i||t.datum.datum_type===a)&&"WGS84"!==e.datumCode||(e.datum.datum_type===n||e.datum.datum_type===i||e.datum.datum_type===a)&&"WGS84"!==t.datumCode}(t,e)&&(r=yt(t,h=new ct("WGS84"),r,u),t=h),u&&"enu"!==t.axis&&(r=At(t,!1,r)),"longlat"===t.projName)r={x:r.x*d,y:r.y*d,z:r.z||0};else if(t.to_meter&&(r={x:r.x*t.to_meter,y:r.y*t.to_meter,z:r.z||0}),!(r=t.inverse(r)))return;if(t.from_greenwich&&(r.x+=t.from_greenwich),r=function(t,e,r){if(function(t,e){return t.datum_type===e.datum_type&&!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(t.datum_type===n?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:t.datum_type!==i||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6])}(t,e))return r;if(t.datum_type===o||e.datum_type===o)return r;var u=t.a,h=t.es;if(t.datum_type===a){if(0!==dt(t,!1,r))return;u=s,h=c}var f=e.a,d=e.b,p=e.es;return e.datum_type===a&&(f=s,d=l,p=c),h!==p||u!==f||ft(t.datum_type)||ft(e.datum_type)?(r=ut(r,h,u),ft(t.datum_type)&&(r=function(t,e,r){if(e===n)return{x:t.x+r[0],y:t.y+r[1],z:t.z+r[2]};if(e===i){var a=r[0],o=r[1],s=r[2],l=r[3],c=r[4],u=r[5],h=r[6];return{x:h*(t.x-u*t.y+c*t.z)+a,y:h*(u*t.x+t.y-l*t.z)+o,z:h*(-c*t.x+l*t.y+t.z)+s}}}(r,t.datum_type,t.datum_params)),ft(e.datum_type)&&(r=function(t,e,r){if(e===n)return{x:t.x-r[0],y:t.y-r[1],z:t.z-r[2]};if(e===i){var a=r[0],o=r[1],s=r[2],l=r[3],c=r[4],u=r[5],h=r[6],f=(t.x-a)/h,d=(t.y-o)/h,p=(t.z-s)/h;return{x:f+u*d-c*p,y:-u*f+d+l*p,z:c*f-l*d+p}}}(r,e.datum_type,e.datum_params)),r=ht(r,p,f,d),e.datum_type!==a||0===dt(e,!0,r)?r:void 0):r}(t.datum,e.datum,r))return e.from_greenwich&&(r={x:r.x-e.from_greenwich,y:r.y,z:r.z||0}),"longlat"===e.projName?r={x:r.x*p,y:r.y*p,z:r.z||0}:(r=e.forward(r),e.to_meter&&(r={x:r.x/e.to_meter,y:r.y/e.to_meter,z:r.z||0})),u&&"enu"!==e.axis?At(e,!0,r):(f||delete r.z,r)}var bt=ct("WGS84");function xt(t,e,r,n){var i,a,o;return Array.isArray(r)?(i=yt(t,e,r,n)||{x:NaN,y:NaN},r.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof i.z?[i.x,i.y,i.z].concat(r.splice(3)):[i.x,i.y,r[2]].concat(r.splice(3)):[i.x,i.y].concat(r.splice(2)):[i.x,i.y]):(a=yt(t,e,r,n),2===(o=Object.keys(r)).length||o.forEach((function(n){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;a[n]=r[n]})),a)}function wt(t){return t instanceof ct?t:t.oProj?t.oProj:ct(t)}const _t=function(t,e,r){t=wt(t);var n,i=!1;return void 0===e?(e=t,t=bt,i=!0):(void 0!==e.x||Array.isArray(e))&&(r=e,e=t,t=bt,i=!0),e=wt(e),r?xt(t,e,r):(n={forward:function(r,n){return xt(t,e,r,n)},inverse:function(r,n){return xt(e,t,r,n)}},i&&(n.oProj=e),n)};var Et=6,Mt="AJSAJS",St="AFAFAF",Ct=65,Tt=73,It=79,Rt=86,Bt=90;const kt={forward:Lt,inverse:function(t){var e=Ot(Nt(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]},toPoint:Pt};function Lt(t,e){return e=e||5,function(t,e){var r,n,i,a,o,s,l,c,u,h,f,d="00000"+t.easting,p="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(u=t.easting,h=t.northing,f=Ft(t.zoneNumber),r=Math.floor(u/1e5),n=Math.floor(h/1e5)%20,i=f-1,a=Mt.charCodeAt(i),o=St.charCodeAt(i),c=!1,(s=a+r-1)>Bt&&(s=s-Bt+Ct-1,c=!0),(s===Tt||aTt||(s>Tt||aIt||(s>It||aBt&&(s=s-Bt+Ct-1),(l=o+n)>Rt?(l=l-Rt+Ct-1,c=!0):c=!1,(l===Tt||oTt||(l>Tt||oIt||(l>It||oRt&&(l=l-Rt+Ct-1),String.fromCharCode(s)+String.fromCharCode(l))+d.substr(d.length-5,e)+p.substr(p.length-5,e)}(function(t){var e,r,n,i,a,o,s,l=t.lat,c=t.lon,u=6378137,h=.00669438,f=.9996,d=Dt(l),p=Dt(c);s=Math.floor((c+180)/6)+1,180===c&&(s=60),l>=56&&l<64&&c>=3&&c<12&&(s=32),l>=72&&l<84&&(c>=0&&c<9?s=31:c>=9&&c<21?s=33:c>=21&&c<33?s=35:c>=33&&c<42&&(s=37)),o=Dt(6*(s-1)-180+3),e=.006739496752268451,r=u/Math.sqrt(1-h*Math.sin(d)*Math.sin(d)),n=Math.tan(d)*Math.tan(d),i=e*Math.cos(d)*Math.cos(d);var m,A,g=f*r*((a=Math.cos(d)*(p-o))+(1-n+i)*a*a*a/6+(5-18*n+n*n+72*i-58*e)*a*a*a*a*a/120)+5e5,v=f*(u*(.9983242984503243*d-.002514607064228144*Math.sin(2*d)+2639046602129982e-21*Math.sin(4*d)-3.418046101696858e-9*Math.sin(6*d))+r*Math.tan(d)*(a*a/2+(5-n+9*i+4*i*i)*a*a*a*a/24+(61-58*n+n*n+600*i-2.2240339282485886)*a*a*a*a*a*a/720));return l<0&&(v+=1e7),{northing:Math.round(v),easting:Math.round(g),zoneNumber:s,zoneLetter:(m=l,A="Z",84>=m&&m>=72?A="X":72>m&&m>=64?A="W":64>m&&m>=56?A="V":56>m&&m>=48?A="U":48>m&&m>=40?A="T":40>m&&m>=32?A="S":32>m&&m>=24?A="R":24>m&&m>=16?A="Q":16>m&&m>=8?A="P":8>m&&m>=0?A="N":0>m&&m>=-8?A="M":-8>m&&m>=-16?A="L":-16>m&&m>=-24?A="K":-24>m&&m>=-32?A="J":-32>m&&m>=-40?A="H":-40>m&&m>=-48?A="G":-48>m&&m>=-56?A="F":-56>m&&m>=-64?A="E":-64>m&&m>=-72?A="D":-72>m&&m>=-80&&(A="C"),A)}}({lat:t[1],lon:t[0]}),e)}function Pt(t){var e=Ot(Nt(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function Dt(t){return t*(Math.PI/180)}function Ut(t){return t/Math.PI*180}function Ot(t){var e=t.northing,r=t.easting,n=t.zoneLetter,i=t.zoneNumber;if(i<0||i>60)return null;var a,o,s,l,c,u,h,f,d,p=.9996,m=6378137,A=.00669438,g=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),v=r-5e5,y=e;n<"N"&&(y-=1e7),h=6*(i-1)-180+3,a=.006739496752268451,d=(f=y/p/6367449.145945056)+(3*g/2-27*g*g*g/32)*Math.sin(2*f)+(21*g*g/16-55*g*g*g*g/32)*Math.sin(4*f)+151*g*g*g/96*Math.sin(6*f),o=m/Math.sqrt(1-A*Math.sin(d)*Math.sin(d)),s=Math.tan(d)*Math.tan(d),l=a*Math.cos(d)*Math.cos(d),c=.99330562*m/Math.pow(1-A*Math.sin(d)*Math.sin(d),1.5),u=v/(o*p);var b=d-o*Math.tan(d)/c*(u*u/2-(5+3*s+10*l-4*l*l-9*a)*u*u*u*u/24+(61+90*s+298*l+45*s*s-1.6983531815716497-3*l*l)*u*u*u*u*u*u/720);b=Ut(b);var x,w=(u-(1+2*s+l)*u*u*u/6+(5-2*l+28*s-3*l*l+8*a+24*s*s)*u*u*u*u*u/120)/Math.cos(d);if(w=h+Ut(w),t.accuracy){var _=Ot({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});x={top:_.lat,right:_.lon,bottom:b,left:w}}else x={lat:b,lon:w};return x}function Ft(t){var e=t%Et;return 0===e&&(e=Et),e}function Nt(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,r=t.length,n=null,i="",a=0;!/[A-Z]/.test(e=t.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+t;i+=e,a++}var o=parseInt(i,10);if(0===a||a+3>r)throw"MGRSPoint bad conversion from: "+t;var s=t.charAt(a++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+t;n=t.substring(a,a+=2);for(var l=Ft(o),c=function(t,e){for(var r=Mt.charCodeAt(e-1),n=1e5,i=!1;r!==t.charCodeAt(0);){if(++r===Tt&&r++,r===It&&r++,r>Bt){if(i)throw"Bad character: "+t;r=Ct,i=!0}n+=1e5}return n}(n.charAt(0),l),u=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var r=St.charCodeAt(e-1),n=0,i=!1;r!==t.charCodeAt(0);){if(++r===Tt&&r++,r===It&&r++,r>Rt){if(i)throw"Bad character: "+t;r=Ct,i=!0}n+=1e5}return n}(n.charAt(1),l);u0&&(f=1e5/Math.pow(10,m),d=t.substring(a,a+m),A=parseFloat(d)*f,p=t.substring(a+m),g=parseFloat(p)*f),{easting:A+c,northing:g+u,zoneLetter:s,zoneNumber:o,accuracy:f}}function zt(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function Gt(t,e,r){if(!(this instanceof Gt))return new Gt(t,e,r);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var n=t.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=t,this.y=e,this.z=r||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Gt.fromMGRS=function(t){return new Gt(Pt(t))},Gt.prototype.toMGRS=function(t){return Lt([this.x,this.y],t)};const Zt=Gt;var Vt=.046875,Qt=.01953125,jt=.01068115234375;function Wt(t){var e=[];e[0]=1-t*(.25+t*(Vt+t*(Qt+t*jt))),e[1]=t*(.75-t*(Vt+t*(Qt+t*jt)));var r=t*t;return e[2]=r*(.46875-t*(.013020833333333334+.007120768229166667*t)),r*=t,e[3]=r*(.3645833333333333-.005696614583333333*t),e[4]=r*t*.3076171875,e}function Ht(t,e,r,n){return r*=e,e*=e,n[0]*t-r*(n[1]+e*(n[2]+e*(n[3]+e*n[4])))}function Xt(t,e,r){for(var n=1/(1-e),i=t,a=20;a;--a){var o=Math.sin(i),s=1-e*o*o;if(i-=s=(Ht(i,o,Math.cos(i),r)-t)*(s*Math.sqrt(s))*n,Math.abs(s)f?Math.tan(a):0,m=Math.pow(p,2),A=Math.pow(m,2);e=1-this.es*Math.pow(s,2),c/=Math.sqrt(e);var g=Ht(a,s,l,this.en);r=this.a*(this.k0*c*(1+u/6*(1-m+h+u/20*(5-18*m+A+14*h-58*m*h+u/42*(61+179*A-A*m-479*m)))))+this.x0,n=this.a*(this.k0*(g-this.ml0+s*o*c/2*(1+u/12*(5-m+9*h+4*d+u/30*(61+A-58*m+270*h-330*m*h+u/56*(1385+543*A-A*m-3111*m))))))+this.y0}else{var v=l*Math.sin(o);if(Math.abs(Math.abs(v)-1)=1){if(v-1>f)return 93;n=0}else n=Math.acos(n);a<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return t.x=r,t.y=n,t},inverse:function(t){var e,r,n,i,a=(t.x-this.x0)*(1/this.a),o=(t.y-this.y0)*(1/this.a);if(this.es)if(r=Xt(e=this.ml0+o/this.k0,this.es,this.en),Math.abs(r)f?Math.tan(r):0,u=this.ep2*Math.pow(l,2),d=Math.pow(u,2),p=Math.pow(c,2),m=Math.pow(p,2);e=1-this.es*Math.pow(s,2);var A=a*Math.sqrt(e)/this.k0,g=Math.pow(A,2);n=r-(e*=c)*g/(1-this.es)*.5*(1-g/12*(5+3*p-9*u*p+u-4*d-g/30*(61+90*p-252*u*p+45*m+46*u-g/56*(1385+3633*p+4095*m+1574*m*p)))),i=V(this.long0+A*(1-g/6*(1+2*p+u-g/20*(5+28*p+24*m+8*u*p+6*u-g/42*(61+662*p+1320*m+720*m*p))))/l)}else n=h*Z(o),i=0;else{var v=Math.exp(a/this.k0),y=.5*(v-1/v),b=this.lat0+o/this.k0,x=Math.cos(b);e=Math.sqrt((1-Math.pow(x,2))/(1+Math.pow(y,2))),n=Math.asin(e),o<0&&(n=-n),i=0===y&&0===x?0:V(Math.atan2(y,x)+this.long0)}return t.x=i,t.y=n,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function Yt(t){var e=Math.exp(t);return(e-1/e)/2}function Jt(t,e){t=Math.abs(t),e=Math.abs(e);var r=Math.max(t,e),n=Math.min(t,e)/(r||1);return r*Math.sqrt(1+Math.pow(n,2))}function Kt(t,e){for(var r,n=2*Math.cos(2*e),i=t.length-1,a=t[i],o=0;--i>=0;)r=n*a-o+t[i],o=a,a=r;return e+r*Math.sin(2*e)}function $t(t,e,r){for(var n,i,a=Math.sin(e),o=Math.cos(e),s=Yt(r),l=function(t){var e=Math.exp(t);return(e+1/e)/2}(r),c=2*o*l,u=-2*a*s,h=t.length-1,f=t[h],d=0,p=0,m=0;--h>=0;)n=p,i=d,f=c*(p=f)-n-u*(d=m)+t[h],m=u*p-i+c*d;return[(c=a*l)*f-(u=o*s)*m,c*m+u*f]}const te={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(qt.init.apply(this),this.forward=qt.forward,this.inverse=qt.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),r=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),r*=e,this.cgb[1]=r*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=r*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),r*=e,this.cgb[2]=r*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=r*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),r*=e,this.cgb[3]=r*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=r*(1237/630+e*(e*(-24832/14175)-2.4)),r*=e,this.cgb[4]=r*(4174/315+e*(-144838/6237)),this.cbg[4]=r*(-734/315+e*(109598/31185)),r*=e,this.cgb[5]=r*(601676/22275),this.cbg[5]=r*(444337/155925),r=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+r*(1/4+r*(1/64+r/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=r*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=r*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),r*=e,this.utg[2]=r*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=r*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),r*=e,this.utg[3]=r*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=r*(49561/161280+e*(-179/168+e*(6601661/7257600))),r*=e,this.utg[4]=r*(-4583/161280+e*(108847/3991680)),this.gtu[4]=r*(34729/80640+e*(-3418889/1995840)),r*=e,this.utg[5]=r*(-20648693/638668800),this.gtu[5]=.6650675310896665*r;var n=Kt(this.cbg,this.lat0);this.Zb=-this.Qn*(n+function(t,e){for(var r,n=2*Math.cos(e),i=t.length-1,a=t[i],o=0;--i>=0;)r=n*a-o+t[i],o=a,a=r;return Math.sin(e)*r}(this.gtu,2*n))},forward:function(t){var e=V(t.x-this.long0),r=t.y;r=Kt(this.cbg,r);var n=Math.sin(r),i=Math.cos(r),a=Math.sin(e),o=Math.cos(e);r=Math.atan2(n,o*i),e=Math.atan2(a*i,Jt(n,i*o)),e=function(t){var e=Math.abs(t);return e=function(t){var e=1+t,r=e-1;return 0===r?t:t*Math.log(e)/r}(e*(1+e/(Jt(1,e)+1))),t<0?-e:e}(Math.tan(e));var s,l,c=$t(this.gtu,2*r,2*e);return r+=c[0],e+=c[1],Math.abs(e)<=2.623395162778?(s=this.a*(this.Qn*e)+this.x0,l=this.a*(this.Qn*r+this.Zb)+this.y0):(s=1/0,l=1/0),t.x=s,t.y=l,t},inverse:function(t){var e,r,n=(t.x-this.x0)*(1/this.a),i=(t.y-this.y0)*(1/this.a);if(i=(i-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var a=$t(this.utg,2*i,2*n);i+=a[0],n+=a[1],n=Math.atan(Yt(n));var o=Math.sin(i),s=Math.cos(i),l=Math.sin(n),c=Math.cos(n);i=Math.atan2(o*c,Jt(l,c*s)),e=V((n=Math.atan2(l,c*s))+this.long0),r=Kt(this.cgb,i)}else e=1/0,r=1/0;return t.x=e,t.y=r,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]},ee={init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(V(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*d,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,te.init.apply(this),this.forward=te.forward,this.inverse=te.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function re(t,e){return Math.pow((1-t)/(1+t),e)}const ne={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+m)/(Math.pow(Math.tan(.5*this.lat0+m),this.C)*re(this.e*t,this.ratexp))},forward:function(t){var e=t.x,r=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*r+m),this.C)*re(this.e*Math.sin(r),this.ratexp))-h,t.x=this.C*e,t},inverse:function(t){for(var e=t.x/this.C,r=t.y,n=Math.pow(Math.tan(.5*r+m)/this.K,1/this.C),i=20;i>0&&(r=2*Math.atan(n*re(this.e*Math.sin(t.y),-.5*this.e))-h,!(Math.abs(r-t.y)<1e-14));--i)t.y=r;return i?(t.x=e,t.y=r,t):null},names:["gauss"]},ie={init:function(){ne.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,r,n,i;return t.x=V(t.x-this.long0),ne.forward.apply(this,[t]),e=Math.sin(t.y),r=Math.cos(t.y),n=Math.cos(t.x),i=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*r*n),t.x=i*r*Math.sin(t.x),t.y=i*(this.cosc0*e-this.sinc0*r*n),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,r,n,i,a;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,a=Math.sqrt(t.x*t.x+t.y*t.y)){var o=2*Math.atan2(a,this.R2);e=Math.sin(o),r=Math.cos(o),i=Math.asin(r*this.sinc0+t.y*e*this.cosc0/a),n=Math.atan2(t.x*e,a*this.cosc0*r-t.y*this.sinc0*e)}else i=this.phic0,n=0;return t.x=n,t.y=i,ne.inverse.apply(this,[t]),t.x=V(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},ae={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=f&&(this.k0=.5*(1+Z(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=f&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=f&&(this.k0=.5*this.cons*G(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Q(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=G(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-h,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,r,n,i,a,o,s=t.x,l=t.y,c=Math.sin(l),u=Math.cos(l),d=V(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=f&&Math.abs(l+this.lat0)<=f?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*c+this.coslat0*u*Math.cos(d)),t.x=this.a*e*u*Math.sin(d)+this.x0,t.y=this.a*e*(this.coslat0*c-this.sinlat0*u*Math.cos(d))+this.y0,t):(r=2*Math.atan(this.ssfn_(l,c,this.e))-h,i=Math.cos(r),n=Math.sin(r),Math.abs(this.coslat0)<=f?(a=Q(this.e,l*this.con,this.con*c),o=2*this.a*this.k0*a/this.cons,t.x=this.x0+o*Math.sin(s-this.long0),t.y=this.y0-this.con*o*Math.cos(s-this.long0),t):(Math.abs(this.sinlat0)0?V(this.long0+Math.atan2(t.x,-1*t.y)):V(this.long0+Math.atan2(t.x,t.y)):V(this.long0+Math.atan2(t.x*Math.sin(s),o*this.coslat0*Math.cos(s)-t.y*this.sinlat0*Math.sin(s))),t.x=e,t.y=r,t)}if(Math.abs(this.coslat0)<=f){if(o<=f)return r=this.lat0,e=this.long0,t.x=e,t.y=r,t;t.x*=this.con,t.y*=this.con,n=o*this.cons/(2*this.a*this.k0),r=this.con*j(this.e,n),e=this.con*V(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else i=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,o<=f?a=this.X0:(a=Math.asin(Math.cos(i)*this.sinX0+t.y*Math.sin(i)*this.cosX0/o),e=V(this.long0+Math.atan2(t.x*Math.sin(i),o*this.cosX0*Math.cos(i)-t.y*this.sinX0*Math.sin(i)))),r=-1*j(this.e,Math.tan(.5*(h+a)));return t.x=e,t.y=r,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(t,e,r){return e*=r,Math.tan(.5*(h+t))*Math.pow((1-e)/(1+e),.5*r)}},oe={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),r=this.a,n=1/this.rf,i=2*n-Math.pow(n,2),a=this.e=Math.sqrt(i);this.R=this.k0*r*Math.sqrt(1-i)/(1-i*Math.pow(e,2)),this.alpha=Math.sqrt(1+i/(1-i)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+t/2)),l=Math.log((1+a*e)/(1-a*e));this.K=o-this.alpha*s+this.alpha*a/2*l},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),r=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),n=-this.alpha*(e+r)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),a=this.alpha*(t.x-this.lambda0),o=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(a))),s=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(a));return t.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,t.x=this.R*o+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,r=t.y-this.y0,n=e/this.R,i=2*(Math.atan(Math.exp(r/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),o=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),s=this.lambda0+o/this.alpha,l=0,c=a,u=-1e3,h=0;Math.abs(c-u)>1e-7;){if(++h>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(c))/2)),u=c,c=2*Math.atan(Math.exp(l))-Math.PI/2}return t.x=s,t.y=c,t},names:["somerc"]};var se=1e-7;const le={init:function(){var t,e,r,n,i,a,o,s,l,c,u,p,g,v=0,y=0,b=0,x=0,w=0,_=0,E=0;this.no_off=(g="object"==typeof(p=this).PROJECTION?Object.keys(p.PROJECTION)[0]:p.PROJECTION,"no_uoff"in p||"no_off"in p||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(g)),this.no_rot="no_rot"in this;var M=!1;"alpha"in this&&(M=!0);var S=!1;if("rectified_grid_angle"in this&&(S=!0),M&&(E=this.alpha),S&&(v=this.rectified_grid_angle*d),M||S)y=this.longc;else if(b=this.long1,w=this.lat1,x=this.long2,_=this.lat2,Math.abs(w-_)<=se||(t=Math.abs(w))<=se||Math.abs(t-h)<=se||Math.abs(Math.abs(this.lat0)-h)<=se||Math.abs(Math.abs(_)-h)<=se)throw new Error;var C=1-this.es;e=Math.sqrt(C),Math.abs(this.lat0)>f?(s=Math.sin(this.lat0),r=Math.cos(this.lat0),t=1-this.es*s*s,this.B=r*r,this.B=Math.sqrt(1+this.es*this.B*this.B/C),this.A=this.B*this.k0*e/t,(i=(n=this.B*e/(r*Math.sqrt(t)))*n-1)<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=n,this.E*=Math.pow(Q(this.e,this.lat0,s),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=i=1),M||S?(M?(u=Math.asin(Math.sin(E)/n),S||(v=E)):(u=v,E=Math.asin(n*Math.sin(u))),this.lam0=y-Math.asin(.5*(i-1/i)*Math.tan(u))/this.B):(a=Math.pow(Q(this.e,w,Math.sin(w)),this.B),o=Math.pow(Q(this.e,_,Math.sin(_)),this.B),i=this.E/a,l=(o-a)/(o+a),c=((c=this.E*this.E)-o*a)/(c+o*a),(t=b-x)<-Math.pi?x-=A:t>Math.pi&&(x+=A),this.lam0=V(.5*(b+x)-Math.atan(c*Math.tan(.5*this.B*(b-x))/l)/this.B),u=Math.atan(2*Math.sin(this.B*V(b-this.lam0))/(i-1/i)),v=E=Math.asin(n*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(v),this.cosrot=Math.cos(v),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(E))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(m-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(m+i))},forward:function(t){var e,r,n,i,a,o,s,l,c={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-h)>f){if(e=.5*((a=this.E/Math.pow(Q(this.e,t.y,Math.sin(t.y)),this.B))-(o=1/a)),r=.5*(a+o),i=Math.sin(this.B*t.x),n=(e*this.singam-i*this.cosgam)/r,Math.abs(Math.abs(n)-1)0?this.v_pole_n:this.v_pole_s,s=this.ArB*t.y;return this.no_rot?(c.x=s,c.y=l):(s-=this.u_0,c.x=l*this.cosrot+s*this.sinrot,c.y=s*this.cosrot-l*this.sinrot),c.x=this.a*c.x+this.x0,c.y=this.a*c.y+this.y0,c},inverse:function(t){var e,r,n,i,a,o,s,l={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(r=t.y,e=t.x):(r=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),i=.5*((n=Math.exp(-this.BrA*r))-1/n),a=.5*(n+1/n),s=((o=Math.sin(this.BrA*e))*this.cosgam+i*this.singam)/a,Math.abs(Math.abs(s)-1)f?this.ns=Math.log(n/s)/Math.log(i/l):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e=t.x,r=t.y;Math.abs(2*Math.abs(r)-Math.PI)<=f&&(r=Z(r)*(h-2e-10));var n,i,a=Math.abs(Math.abs(r)-h);if(a>f)n=Q(this.e,r,Math.sin(r)),i=this.a*this.f0*Math.pow(n,this.ns);else{if((a=r*this.ns)<=0)return null;i=0}var o=this.ns*V(e-this.long0);return t.x=this.k0*(i*Math.sin(o))+this.x0,t.y=this.k0*(this.rh-i*Math.cos(o))+this.y0,t},inverse:function(t){var e,r,n,i,a,o=(t.x-this.x0)/this.k0,s=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(o*o+s*s),r=1):(e=-Math.sqrt(o*o+s*s),r=-1);var l=0;if(0!==e&&(l=Math.atan2(r*o,r*s)),0!==e||this.ns>0){if(r=1/this.ns,n=Math.pow(e/(this.a*this.f0),r),-9999===(i=j(this.e,n)))return null}else i=-h;return a=V(l/this.ns+this.long0),t.x=a,t.y=i,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]},ue={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,r,n,i,a,o,s,l=t.x,c=t.y,u=V(l-this.long0);return e=Math.pow((1+this.e*Math.sin(c))/(1-this.e*Math.sin(c)),this.alfa*this.e/2),r=2*(Math.atan(this.k*Math.pow(Math.tan(c/2+this.s45),this.alfa)/e)-this.s45),n=-u*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(r)+Math.sin(this.ad)*Math.cos(r)*Math.cos(n)),a=Math.asin(Math.cos(r)*Math.sin(n)/Math.cos(i)),o=this.n*a,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),t.y=s*Math.cos(o)/1,t.x=s*Math.sin(o)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,r,n,i,a,o,s,l=t.x;t.x=t.y,t.y=l,this.czech||(t.y*=-1,t.x*=-1),a=Math.sqrt(t.x*t.x+t.y*t.y),i=Math.atan2(t.y,t.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),r=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(e)),t.x=this.long0-r/this.alfa,o=e,s=0;var c=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-t.y)<1e-10&&(s=1),o=t.y,c+=1}while(0===s&&c<15);return c>=15?null:t},names:["Krovak","krovak"]};function he(t,e,r,n,i){return t*i-e*Math.sin(2*i)+r*Math.sin(4*i)-n*Math.sin(6*i)}function fe(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function de(t){return.375*t*(1+.25*t*(1+.46875*t))}function pe(t){return.05859375*t*t*(1+.75*t)}function me(t){return t*t*t*(35/3072)}function Ae(t,e,r){var n=e*r;return t/Math.sqrt(1-n*n)}function ge(t){return Math.abs(t)1e-7?(1-t*t)*(e/(1-(r=t*e)*r)-.5/t*Math.log((1-r)/(1+r))):2*e}const xe={init:function(){var t,e=Math.abs(this.lat0);if(Math.abs(e-h)0)switch(this.qp=be(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,r=[];return r[0]=.3333333333333333*t,e=t*t,r[0]+=.17222222222222222*e,r[1]=.06388888888888888*e,e*=t,r[0]+=.10257936507936508*e,r[1]+=.0664021164021164*e,r[2]=.016415012942191543*e,r}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=be(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var e,r,n,i,a,o,s,l,c,u,d=t.x,p=t.y;if(d=V(d-this.long0),this.sphere){if(a=Math.sin(p),u=Math.cos(p),n=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((r=this.mode===this.EQUIT?1+u*n:1+this.sinph0*a+this.cosph0*u*n)<=f)return null;e=(r=Math.sqrt(2/r))*u*Math.sin(d),r*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(p+this.lat0)=0?(e=(c=Math.sqrt(o))*i,r=n*(this.mode===this.S_POLE?c:-c)):e=r=0}}return t.x=this.a*e+this.x0,t.y=this.a*r+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,r,n,i,a,o,s,l,c,u,d=t.x/this.a,p=t.y/this.a;if(this.sphere){var m,A=0,g=0;if((r=.5*(m=Math.sqrt(d*d+p*p)))>1)return null;switch(r=2*Math.asin(r),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(g=Math.sin(r),A=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(m)<=f?0:Math.asin(p*g/m),d*=g,p=A*m;break;case this.OBLIQ:r=Math.abs(m)<=f?this.lat0:Math.asin(A*this.sinph0+p*g*this.cosph0/m),d*=g*this.cosph0,p=(A-Math.sin(r)*this.sinph0)*m;break;case this.N_POLE:p=-p,r=h-r;break;case this.S_POLE:r-=h}e=0!==p||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(d,p):0}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(d/=this.dd,p*=this.dd,(o=Math.sqrt(d*d+p*p))1&&(t=t>1?1:-1),Math.asin(t)}const _e={init:function(){Math.abs(this.lat1+this.lat2)f?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,r=t.y;this.sin_phi=Math.sin(r),this.cos_phi=Math.cos(r);var n=be(this.e3,this.sin_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,a=this.ns0*V(e-this.long0),o=i*Math.sin(a)+this.x0,s=this.rh-i*Math.cos(a)+this.y0;return t.x=o,t.y=s,t},inverse:function(t){var e,r,n,i,a,o;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),n=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1),i=0,0!==e&&(i=Math.atan2(n*t.x,n*t.y)),n=e*this.ns0/this.a,this.sphere?o=Math.asin((this.c-n*n)/(2*this.ns0)):(r=(this.c-n*n)/this.ns0,o=this.phi1z(this.e3,r)),a=V(i/this.ns0+this.long0),t.x=a,t.y=o,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,e){var r,n,i,a,o=we(.5*e);if(t0||Math.abs(a)<=f?(o=this.x0+1*this.a*r*Math.sin(n)/a,s=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*r*i)/a):(o=this.x0+this.infinity_dist*r*Math.sin(n),s=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*r*i)),t.x=o,t.y=s,t},inverse:function(t){var e,r,n,i,a,o;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(i=Math.atan2(e,this.rc),r=Math.sin(i),o=we((n=Math.cos(i))*this.sin_p14+t.y*r*this.cos_p14/e),a=Math.atan2(t.x*r,e*this.cos_p14*n-t.y*this.sin_p14*r),a=V(this.long0+a)):(o=this.phic0,a=0),t.x=a,t.y=o,t},names:["gnom"]},Me={init:function(){this.sphere||(this.k0=G(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,r,n=t.x,i=t.y,a=V(n-this.long0);if(this.sphere)e=this.x0+this.a*a*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var o=be(this.e,Math.sin(i));e=this.x0+this.a*this.k0*a,r=this.y0+this.a*o*.5/this.k0}return t.x=e,t.y=r,t},inverse:function(t){var e,r;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=V(this.long0+t.x/this.a/Math.cos(this.lat_ts)),r=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(r=function(t,e){var r=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-r)<1e-6)return e<0?-1*h:h;for(var n,i,a,o,s=Math.asin(.5*e),l=0;l<30;l++)if(i=Math.sin(s),a=Math.cos(s),o=t*i,s+=n=Math.pow(1-o*o,2)/(2*a)*(e/(1-t*t)-i/(1-o*o)+.5/t*Math.log((1-o)/(1+o))),Math.abs(n)<=1e-10)return s;return NaN}(this.e,2*t.y*this.k0/this.a),e=V(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=r,t},names:["cea"]},Se={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,r=t.y,n=V(e-this.long0),i=ge(r-this.lat0);return t.x=this.x0+this.a*n*this.rc,t.y=this.y0+this.a*i,t},inverse:function(t){var e=t.x,r=t.y;return t.x=V(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=ge(this.lat0+(r-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},Ce={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=fe(this.es),this.e1=de(this.es),this.e2=pe(this.es),this.e3=me(this.es),this.ml0=this.a*he(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,r,n,i=t.x,a=t.y,o=V(i-this.long0);if(n=o*Math.sin(a),this.sphere)Math.abs(a)<=f?(e=this.a*o,r=-1*this.a*this.lat0):(e=this.a*Math.sin(n)/Math.tan(a),r=this.a*(ge(a-this.lat0)+(1-Math.cos(n))/Math.tan(a)));else if(Math.abs(a)<=f)e=this.a*o,r=-1*this.ml0;else{var s=Ae(this.a,this.e,Math.sin(a))/Math.tan(a);e=s*Math.sin(n),r=this.a*he(this.e0,this.e1,this.e2,this.e3,a)-this.ml0+s*(1-Math.cos(n))}return t.x=e+this.x0,t.y=r+this.y0,t},inverse:function(t){var e,r,n,i,a,o,s,l,c;if(n=t.x-this.x0,i=t.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=f)e=V(n/this.a+this.long0),r=0;else{var u;for(o=this.lat0+i/this.a,s=n*n/this.a/this.a+o*o,l=o,a=20;a;--a)if(l+=c=-1*(o*(l*(u=Math.tan(l))+1)-l-.5*(l*l+s)*u)/((l-o)/u-1),Math.abs(c)<=f){r=l;break}e=V(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(r))}else if(Math.abs(i+this.ml0)<=f)r=0,e=V(this.long0+n/this.a);else{var h,d,p,m,A;for(o=(this.ml0+i)/this.a,s=n*n/this.a/this.a+o*o,l=o,a=20;a;--a)if(A=this.e*Math.sin(l),h=Math.sqrt(1-A*A)*Math.tan(l),d=this.a*he(this.e0,this.e1,this.e2,this.e3,l),p=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=c=(o*(h*(m=d/this.a)+1)-m-.5*h*(m*m+s))/(this.es*Math.sin(2*l)*(m*m+s-2*o*m)/(4*h)+(o-m)*(h*p-2/Math.sin(2*l))-p),Math.abs(c)<=f){r=l;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(r),2))*Math.tan(r),e=V(this.long0+Math.asin(n*h/this.a)/Math.sin(r))}return t.x=e,t.y=r,t},names:["Polyconic","poly"]},Te={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var e,r=t.x,n=t.y-this.lat0,i=r-this.long0,a=n/u*1e-5,o=i,s=1,l=0;for(e=1;e<=10;e++)s*=a,l+=this.A[e]*s;var c,h=l,f=o,d=1,p=0,m=0,A=0;for(e=1;e<=6;e++)c=p*h+d*f,d=d*h-p*f,p=c,m=m+this.B_re[e]*d-this.B_im[e]*p,A=A+this.B_im[e]*d+this.B_re[e]*p;return t.x=A*this.a+this.x0,t.y=m*this.a+this.y0,t},inverse:function(t){var e,r,n=t.x,i=t.y,a=n-this.x0,o=(i-this.y0)/this.a,s=a/this.a,l=1,c=0,h=0,f=0;for(e=1;e<=6;e++)r=c*o+l*s,l=l*o-c*s,c=r,h=h+this.C_re[e]*l-this.C_im[e]*c,f=f+this.C_im[e]*l+this.C_re[e]*c;for(var d=0;d.999999999999&&(r=.999999999999),e=Math.asin(r);var n=V(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),r=(2*e+Math.sin(2*e))/Math.PI,Math.abs(r)>1&&(r=1);var i=Math.asin(r);return t.x=n,t.y=i,t},names:["Mollweide","moll"]},ke={init:function(){Math.abs(this.lat1+this.lat2)=0?(r=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(r=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var a=0;return 0!==r&&(a=Math.atan2(e*t.x,e*t.y)),this.sphere?(i=V(this.long0+a/this.ns),n=ge(this.g-r/this.a),t.x=i,t.y=n,t):(n=ve(this.g-r/this.a,this.e0,this.e1,this.e2,this.e3),i=V(this.long0+a/this.ns),t.x=i,t.y=n,t)},names:["Equidistant_Conic","eqdc"]},Le={init:function(){this.R=this.a},forward:function(t){var e,r,n=t.x,i=t.y,a=V(n-this.long0);Math.abs(i)<=f&&(e=this.x0+this.R*a,r=this.y0);var o=we(2*Math.abs(i/Math.PI));(Math.abs(a)<=f||Math.abs(Math.abs(i)-h)<=f)&&(e=this.x0,r=i>=0?this.y0+Math.PI*this.R*Math.tan(.5*o):this.y0+Math.PI*this.R*-Math.tan(.5*o));var s=.5*Math.abs(Math.PI/a-a/Math.PI),l=s*s,c=Math.sin(o),u=Math.cos(o),d=u/(c+u-1),p=d*d,m=d*(2/c-1),A=m*m,g=Math.PI*this.R*(s*(d-A)+Math.sqrt(l*(d-A)*(d-A)-(A+l)*(p-A)))/(A+l);a<0&&(g=-g),e=this.x0+g;var v=l+d;return g=Math.PI*this.R*(m*v-s*Math.sqrt((A+l)*(l+1)-v*v))/(A+l),r=i>=0?this.y0+g:this.y0-g,t.x=e,t.y=r,t},inverse:function(t){var e,r,n,i,a,o,s,l,c,u,h,d;return t.x-=this.x0,t.y-=this.y0,h=Math.PI*this.R,a=(n=t.x/h)*n+(i=t.y/h)*i,h=3*(i*i/(l=-2*(o=-Math.abs(i)*(1+a))+1+2*i*i+a*a)+(2*(s=o-2*i*i+n*n)*s*s/l/l/l-9*o*s/l/l)/27)/(c=(o-s*s/3/l)/l)/(u=2*Math.sqrt(-c/3)),Math.abs(h)>1&&(h=h>=0?1:-1),d=Math.acos(h)/3,r=t.y>=0?(-u*Math.cos(d+Math.PI/3)-s/3/l)*Math.PI:-(-u*Math.cos(d+Math.PI/3)-s/3/l)*Math.PI,e=Math.abs(n)2*h*this.a)return;return r=e/this.a,n=Math.sin(r),i=Math.cos(r),a=this.long0,Math.abs(e)<=f?o=this.lat0:(o=we(i*this.sin_p12+t.y*n*this.cos_p12/e),s=Math.abs(this.lat0)-h,a=Math.abs(s)<=f?this.lat0>=0?V(this.long0+Math.atan2(t.x,-t.y)):V(this.long0-Math.atan2(-t.x,t.y)):V(this.long0+Math.atan2(t.x*n,e*this.cos_p12*i-t.y*this.sin_p12*n))),t.x=a,t.y=o,t}return l=fe(this.es),c=de(this.es),u=pe(this.es),d=me(this.es),Math.abs(this.sin_p12-1)<=f?(o=ve(((p=this.a*he(l,c,u,d,h))-(e=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,l,c,u,d),a=V(this.long0+Math.atan2(t.x,-1*t.y)),t.x=a,t.y=o,t):Math.abs(this.sin_p12+1)<=f?(p=this.a*he(l,c,u,d,h),o=ve(((e=Math.sqrt(t.x*t.x+t.y*t.y))-p)/this.a,l,c,u,d),a=V(this.long0+Math.atan2(t.x,t.y)),t.x=a,t.y=o,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),g=Math.atan2(t.x,t.y),m=Ae(this.a,this.e,this.sin_p12),v=Math.cos(g),b=-(y=this.e*this.cos_p12*v)*y/(1-this.es),x=3*this.es*(1-b)*this.sin_p12*this.cos_p12*v/(1-this.es),E=1-b*(_=(w=e/m)-b*(1+b)*Math.pow(w,3)/6-x*(1+3*b)*Math.pow(w,4)/24)*_/2-w*_*_*_/6,A=Math.asin(this.sin_p12*Math.cos(_)+this.cos_p12*Math.sin(_)*v),a=V(this.long0+Math.asin(Math.sin(g)*Math.sin(_)/Math.cos(A))),M=Math.sin(A),o=Math.atan2((M-this.es*E*this.sin_p12)*Math.tan(A),M*(1-this.es)),t.x=a,t.y=o,t)},names:["Azimuthal_Equidistant","aeqd"]},De={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,r,n,i,a,o,s,l=t.x,c=t.y;return n=V(l-this.long0),e=Math.sin(c),r=Math.cos(c),i=Math.cos(n),((a=this.sin_p14*e+this.cos_p14*r*i)>0||Math.abs(a)<=f)&&(o=1*this.a*r*Math.sin(n),s=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*r*i)),t.x=o,t.y=s,t},inverse:function(t){var e,r,n,i,a,o,s;return t.x-=this.x0,t.y-=this.y0,r=we((e=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),n=Math.sin(r),i=Math.cos(r),o=this.long0,Math.abs(e)<=f?(s=this.lat0,t.x=o,t.y=s,t):(s=we(i*this.sin_p14+t.y*n*this.cos_p14/e),a=Math.abs(this.lat0)-h,Math.abs(a)<=f?(o=this.lat0>=0?V(this.long0+Math.atan2(t.x,-t.y)):V(this.long0-Math.atan2(-t.x,t.y)),t.x=o,t.y=s,t):(o=V(this.long0+Math.atan2(t.x*n,e*this.cos_p14*i-t.y*this.sin_p14*n)),t.x=o,t.y=s,t))},names:["ortho"]};var Ue=1,Oe=2,Fe=3,Ne=4;function ze(t,e,r,n){var i;return tm&&i<=h+m?(n.value=Oe,i-=h):i>h+m||i<=-(h+m)?(n.value=Fe,i=i>=0?i-g:i+g):(n.value=Ne,i+=h)),i}function Ge(t,e){var r=t+e;return r<-g?r+=A:r>+g&&(r-=A),r}const Ze={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=h-m/2?this.face=5:this.lat0<=-(h-m/2)?this.face=6:Math.abs(this.long0)<=m?this.face=1:Math.abs(this.long0)<=h+m?this.face=this.long0>0?2:4:this.face=3,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,r,n,i,a,o,s={x:0,y:0},l={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,r=t.x,5===this.face)i=h-e,r>=m&&r<=h+m?(l.value=Ue,n=r-h):r>h+m||r<=-(h+m)?(l.value=Oe,n=r>0?r-g:r+g):r>-(h+m)&&r<=-m?(l.value=Fe,n=r+h):(l.value=Ne,n=r);else if(6===this.face)i=h+e,r>=m&&r<=h+m?(l.value=Ue,n=-r+h):r=-m?(l.value=Oe,n=-r):r<-m&&r>=-(h+m)?(l.value=Fe,n=-r-h):(l.value=Ne,n=r>0?-r+g:-r-g);else{var c,u,f,d,p,A;2===this.face?r=Ge(r,+h):3===this.face?r=Ge(r,+g):4===this.face&&(r=Ge(r,-h)),d=Math.sin(e),p=Math.cos(e),A=Math.sin(r),c=p*Math.cos(r),u=p*A,f=d,1===this.face?n=ze(i=Math.acos(c),f,u,l):2===this.face?n=ze(i=Math.acos(u),f,-c,l):3===this.face?n=ze(i=Math.acos(-c),f,-u,l):4===this.face?n=ze(i=Math.acos(-u),f,c,l):(i=n=0,l.value=Ue)}return o=Math.atan(12/g*(n+Math.acos(Math.sin(n)*Math.cos(m))-h)),a=Math.sqrt((1-Math.cos(i))/(Math.cos(o)*Math.cos(o))/(1-Math.cos(Math.atan(1/Math.cos(n))))),l.value===Oe?o+=h:l.value===Fe?o+=g:l.value===Ne&&(o+=1.5*g),s.x=a*Math.cos(o),s.y=a*Math.sin(o),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,t.x=s.x,t.y=s.y,t},inverse:function(t){var e,r,n,i,a,o,s,l,c,u,f,d,p={lam:0,phi:0},m={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,r=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?m.value=Ue:t.y>=0&&t.y>=Math.abs(t.x)?(m.value=Oe,e-=h):t.x<0&&-t.x>=Math.abs(t.y)?(m.value=Fe,e=e<0?e+g:e-g):(m.value=Ne,e+=h),c=g/12*Math.tan(e),a=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),o=Math.atan(a),(s=1-(n=Math.cos(e))*n*(i=Math.tan(r))*i*(1-Math.cos(Math.atan(1/Math.cos(o)))))<-1?s=-1:s>1&&(s=1),5===this.face)l=Math.acos(s),p.phi=h-l,m.value===Ue?p.lam=o+h:m.value===Oe?p.lam=o<0?o+g:o-g:m.value===Fe?p.lam=o-h:p.lam=o;else if(6===this.face)l=Math.acos(s),p.phi=l-h,m.value===Ue?p.lam=-o+h:m.value===Oe?p.lam=-o:m.value===Fe?p.lam=-o-h:p.lam=o<0?-o-g:-o+g;else{var A,v,y;c=(A=s)*A,v=(c+=(y=c>=1?0:Math.sqrt(1-c)*Math.sin(o))*y)>=1?0:Math.sqrt(1-c),m.value===Oe?(c=v,v=-y,y=c):m.value===Fe?(v=-v,y=-y):m.value===Ne&&(c=v,v=y,y=-c),2===this.face?(c=A,A=-v,v=c):3===this.face?(A=-A,v=-v):4===this.face&&(c=A,A=v,v=-c),p.phi=Math.acos(-y)-h,p.lam=Math.atan2(v,A),2===this.face?p.lam=Ge(p.lam,-h):3===this.face?p.lam=Ge(p.lam,-g):4===this.face&&(p.lam=Ge(p.lam,+h))}return 0!==this.es&&(u=p.phi<0?1:0,f=Math.tan(p.phi),d=this.b/Math.sqrt(f*f+this.one_minus_f_squared),p.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),u&&(p.phi=-p.phi)),p.lam+=this.long0,t.x=p.lam,t.y=p.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]};var Ve=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Qe=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],je=.8487,We=1.3523,He=p/5,Xe=1/He,qe=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};const Ye={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=V(t.x-this.long0),r=Math.abs(t.y),n=Math.floor(r*He);n<0?n=0:n>=18&&(n=17);var i={x:qe(Ve[n],r=p*(r-Xe*n))*e,y:qe(Qe[n],r)};return t.y<0&&(i.y=-i.y),i.x=i.x*this.a*je+this.x0,i.y=i.y*this.a*We+this.y0,i},inverse:function(t){var e={x:(t.x-this.x0)/(this.a*je),y:Math.abs(t.y-this.y0)/(this.a*We)};if(e.y>=1)e.x/=Ve[18][0],e.y=t.y<0?-h:h;else{var r=Math.floor(18*e.y);for(r<0?r=0:r>=18&&(r=17);;)if(Qe[r][0]>e.y)--r;else{if(!(Qe[r+1][0]<=e.y))break;++r}var n=Qe[r],i=5*(e.y-n[0])/(Qe[r+1][0]-n[0]);i=function(t,e,r,n){for(var i=e;n;--n){var a=t(i);if(i-=a,Math.abs(a)<1e-10)break}return i}((function(t){return(qe(n,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(n,t)}),i,0,100),e.x/=qe(Ve[r],i),e.y=(5*r+i)*d,t.y<0&&(e.y=-e.y)}return e.x=V(e.x+this.long0),e},names:["Robinson","robin"]},Je={init:function(){this.name="geocent"},forward:function(t){return ut(t,this.es,this.a)},inverse:function(t){return ht(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};var Ke={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};const $e={init:function(){if(Object.keys(Ke).forEach(function(t){if(void 0===this[t])this[t]=Ke[t].def;else{if(Ke[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);Ke[t].num&&(this[t]=parseFloat(this[t]))}Ke[t].degrees&&(this[t]=this[t]*d)}.bind(this)),Math.abs(Math.abs(this.lat0)-h)1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var e,r,n,i,a=Math.sin(t.y),o=Math.cos(t.y),s=Math.cos(t.x);switch(this.mode){case 3:r=this.sinph0*a+this.cosph0*o*s;break;case 2:r=o*s;break;case 1:r=-a;break;case 0:r=a}switch(e=(r=this.pn1/(this.p-r))*o*Math.sin(t.x),this.mode){case 3:r*=this.cosph0*a-this.sinph0*o*s;break;case 2:r*=a;break;case 0:r*=-o*s;break;case 1:r*=o*s}return i=1/((n=r*this.cg+e*this.sg)*this.sw*this.h1+this.cw),e=(e*this.cg-r*this.sg)*this.cw*i,r=n*i,t.x=e*this.a,t.y=r*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var e,r,n,i={x:t.x,y:t.y};n=1/(this.pn1-t.y*this.sw),e=this.pn1*t.x*n,r=this.pn1*t.y*this.cw*n,t.x=e*this.cg+r*this.sg,t.y=r*this.cg-e*this.sg;var a=Jt(t.x,t.y);if(Math.abs(a)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,e=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var e,r,n,i,a=t.x,o=t.y;if(a-=this.long0,"ellipse"===this.shape){o=Math.atan(this.radius_p2*Math.tan(o));var s=this.radius_p/Jt(this.radius_p*Math.cos(o),Math.sin(o));if(r=s*Math.cos(a)*Math.cos(o),n=s*Math.sin(a)*Math.cos(o),i=s*Math.sin(o),(this.radius_g-r)*r-n*n-i*i*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=this.radius_g-r,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/Jt(i,e)),t.y=this.radius_g_1*Math.atan(i/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(i/Jt(n,e)))}else"sphere"===this.shape&&(e=Math.cos(o),r=Math.cos(a)*e,n=Math.sin(a)*e,i=Math.sin(o),e=this.radius_g-r,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/Jt(i,e)),t.y=this.radius_g_1*Math.atan(i/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(i/Jt(n,e))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var e,r,n,i,a=-1,o=0,s=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),o=Math.tan(t.x/this.radius_g_1)*Jt(1,s)):(o=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*Jt(1,o));var l=s/this.radius_p;if(e=o*o+l*l+a*a,(n=(r=2*this.radius_g*a)*r-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;i=(-r-Math.sqrt(n))/(2*e),a=this.radius_g+i*a,o*=i,s*=i,t.x=Math.atan2(o,a),t.y=Math.atan(s*Math.cos(t.x)/a),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),o=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+s*s)):(o=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+o*o)),e=o*o+s*s+a*a,(n=(r=2*this.radius_g*a)*r-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;i=(-r-Math.sqrt(n))/(2*e),a=this.radius_g+i*a,o*=i,s*=i,t.x=Math.atan2(o,a),t.y=Math.atan(s*Math.cos(t.x)/a)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};var er;_t.defaultDatum="WGS84",_t.Proj=ct,_t.WGS84=new _t.Proj("WGS84"),_t.Point=Zt,_t.toPoint=gt,_t.defs=O,_t.nadgrid=function(t,e){var r=new DataView(e),n=function(t){var e=t.getInt32(8,!1);return 11!==e&&(11!==(e=t.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}(r),i=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:it(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)}}(r,n);i.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var a=function(t,e,r){for(var n=[],i=0;i{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new R(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f="suspendedStart",d="suspendedYield",p="executing",m="completed",A={};function g(){}function v(){}function y(){}var b={};c(b,o,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(B([])));w&&w!==r&&n.call(w,o)&&(b=w);var _=y.prototype=g.prototype=Object.create(b);function E(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function M(t,e){function r(i,a,o,s){var l=h(t[i],t,a);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&n.call(u,"__await")?e.resolve(u.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(u).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(l.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(t,e,r){var n=f;return function(i,a){if(n===p)throw new Error("Generator is already running");if(n===m){if("throw"===i)throw a;return k()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=C(o,r);if(s){if(s===A)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var l=h(t,e,r);if("normal"===l.type){if(n=r.done?m:d,l.arg===A)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n=m,r.method="throw",r.arg=l.arg)}}}function C(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),A;var a=h(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,A;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,A):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,A)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function B(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),A}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;I(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:B(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),A}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},94830:(t,e,r)=>{"use strict";const n=r(43389),i=r(69208),a=r(48764).lW;t.exports=function(t,e){return new n((function(r,n){const o=i(t,e),s=new XMLHttpRequest;s.open("GET",o,!0),"prj"!==e&&"cpg"!==e&&(s.responseType="arraybuffer"),s.addEventListener("load",(function(){return s.status>399?"prj"===e||"cpg"===e?r(!1):n(new Error(s.status)):r("prj"!==e&&"cpg"!==e?a.from(s.response):s.response)}),!1),s.send()}))}},9078:(t,e,r)=>{"use strict";const n=r(94830),i=r(69208),a=r(48764).lW;t.exports=async function(t,e){if(!r.g.fetch)return n(t,e);const o=i(t,e),s="prj"===e||"cpg"===e;try{const t=await fetch(o);if(t.status>399)throw new Error(t.statusText);if(s)return t.text();const e=await t.arrayBuffer();return a.from(e)}catch(t){if(console.log("ERROR",t,e),s||"dbf"===e)return!1;throw t}}},69208:(t,e,r)=>{const n=r.g.URL;t.exports=(t,e)=>{if(!e)return t;const r=new n(t);return r.pathname=`${r.pathname}.${e}`,r.href}},79003:(t,e,r)=>{"use strict";let n=r(24472);n.default&&(n=n.default);const i=r(32555),a=r(9078),o=r(76415),s=r(9462),l=r(43389),c=r(95079),u=r(48764).lW,h=r.g.URL,f=new c({max:20});function d(t){if(!t)throw new Error("forgot to pass buffer");return u.isBuffer(t)?t:p(t)?u.from(t):p(t.buffer)?1===t.BYTES_PER_ELEMENT?u.from(t):u.from(t.buffer):void 0}function p(t){return t instanceof r.g.ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)}function m(t,e){return"string"==typeof t&&f.has(t)?l.resolve(f.get(t)):m.getShapefile(t,e).then((function(e){return"string"==typeof t&&f.set(t,e),e}))}m.combine=function([t,e]){const r={type:"FeatureCollection",features:[]};let n=0;const i=t.length;for(e||(e=[]);n-1?l.push(r.slice(0,-3)+r.slice(-3).toLowerCase()):"dbf"!==r.slice(-3).toLowerCase()&&"cpg"!==r.slice(-3).toLowerCase()||(a[r.slice(0,-3)+r.slice(-3).toLowerCase()]=a[r]));if(!l.length)throw new Error("no layers founds");const c=l.map((function(t){let r,n;const i=t.lastIndexOf(".");return i>-1&&t.slice(i).indexOf("json")>-1?(r=JSON.parse(a[t]),r.fileName=t.slice(0,i)):e.indexOf(t.slice(i+1))>-1?(r=a[t],r.fileName=t):(a[t+".dbf"]&&(n=s(a[t+".dbf"],a[t+".cpg"])),r=m.combine([o(a[t+".shp"],a[t+".prj"]),n]),r.fileName=t),r}));return 1===c.length?c[0]:c};const A=async t=>{const e=await l.all([a(t,"shp"),a(t,"prj")]);let r=!1;try{e[1]&&(r=n(e[1]))}catch(t){r=!1}return o(e[0],r)},g=async t=>{const[e,r]=await l.all([a(t,"dbf"),a(t,"cpg")]);if(e)return s(e,r)};m.getShapefile=async function(t,e){if("string"!=typeof t)return m.parseZip(t);if(((t,e)=>".zip"===new h(t).pathname.slice(-4).toLowerCase())(t))return async function(t,e){const r=await a(t);return m.parseZip(r,e)}(t,e);const r=await l.all([A(t),g(t)]);return m.combine(r)},m.parseShp=function(t,e){if(t=d(t),u.isBuffer(e)&&(e=e.toString()),"string"==typeof e)try{e=n(e)}catch(t){e=!1}return o(t,e)},m.parseDbf=function(t,e){return t=d(t),s(t,e)},t.exports=m},76415:t=>{"use strict";function e(t,e){return!function(t){let e=0,r=1;const n=t.length;let i,a;for(;r0}(e)&&t.length?t[t.length-1].push(e):t.push([e]),t}n.prototype.parsePoint=function(t){return{type:"Point",coordinates:this.parseCoord(t,0)}},n.prototype.parseZPoint=function(t){const e=this.parsePoint(t);return e.coordinates.push(t.readDoubleLE(16)),e},n.prototype.parsePointArray=function(t,e,r){const n=[];let i=0;for(;i20&&(e-=20),!(e in r))throw new Error("I don't know that shp type");var n;this.parseFunc=this[r[e]],this.parseCoord=(n=t)?function(t,e){const r=[t.readDoubleLE(e),t.readDoubleLE(e+8)];return n.inverse(r)}:function(t,e){return[t.readDoubleLE(e),t.readDoubleLE(e+8)]}},n.prototype.getShpCode=function(){return this.parseHeader().shpCode},n.prototype.parseHeader=function(){const t=this.buffer.slice(0,100);return{length:t.readInt32BE(24)<<1,version:t.readInt32LE(28),shpCode:t.readInt32LE(32),bbox:[t.readDoubleLE(36),t.readDoubleLE(44),t.readDoubleLE(52),t.readDoubleLE(52)]}},n.prototype.getRows=function(){let t=100;const e=this.buffer.byteLength,r=[];let n;for(;t{"use strict";const n=r(55733);t.exports=async t=>{const e=new n;await e.loadAsync(t);const r=e.file(/.+/),i={};return await Promise.all(r.map((async t=>{let e;e="shp"===t.name.slice(-3).toLowerCase()||"dbf"===t.name.slice(-3).toLowerCase()?await t.async("nodebuffer"):await t.async("text"),i[t.name]=e}))),i}},95079:t=>{!function(){function e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function r(){return 1}t.exports?t.exports=a:this.LRUCache=a;var n=!1;function i(t){n||"string"==typeof t||"number"==typeof t||(n=!0,console.error(new TypeError("LRU: key must be a string or number. Almost certainly a bug! "+typeof t).stack))}function a(t){if(!(this instanceof a))return new a(t);"number"==typeof t&&(t={max:t}),t||(t={}),this._max=t.max,(!this._max||"number"!=typeof this._max||this._max<=0)&&(this._max=1/0),this._lengthCalculator=t.length||r,"function"!=typeof this._lengthCalculator&&(this._lengthCalculator=r),this._allowStale=t.stale||!1,this._maxAge=t.maxAge||null,this._dispose=t.dispose,this.reset()}function o(t,e,r){i(e);var n=t._cache[e];return n&&(s(t,n)?(u(t,n),t._allowStale||(n=void 0)):r&&function(t,e){c(t,e),e.lu=t._mru++,t._lruList[e.lu]=e}(t,n),n&&(n=n.value)),n}function s(t,e){if(!e||!e.maxAge&&!t._maxAge)return!1;var r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t._maxAge&&r>t._maxAge}function l(t){for(;t._lrut._max;)u(t,t._lruList[t._lru])}function c(t,e){for(delete t._lruList[e.lu];t._lruthis._max&&l(this)},get:function(){return this._max},enumerable:!0}),Object.defineProperty(a.prototype,"lengthCalculator",{set:function(t){if("function"!=typeof t)for(var e in this._lengthCalculator=r,this._length=this._itemCount,this._cache)this._cache[e].length=1;else for(var e in this._lengthCalculator=t,this._length=0,this._cache)this._cache[e].length=this._lengthCalculator(this._cache[e].value),this._length+=this._cache[e].length;this._length>this._max&&l(this)},get:function(){return this._lengthCalculator},enumerable:!0}),Object.defineProperty(a.prototype,"length",{get:function(){return this._length},enumerable:!0}),Object.defineProperty(a.prototype,"itemCount",{get:function(){return this._itemCount},enumerable:!0}),a.prototype.forEach=function(t,e){e=e||this;for(var r=0,n=this._itemCount,i=this._mru-1;i>=0&&r=0&&e=0&&e=0&&ethis._max?(u(this,this._cache[t]),!1):(this._dispose&&this._dispose(t,this._cache[t].value),this._cache[t].now=a,this._cache[t].maxAge=n,this._cache[t].value=r,this._length+=o-this._cache[t].length,this._cache[t].length=o,this.get(t),this._length>this._max&&l(this),!0);var s=new h(t,r,this._mru++,o,a,n);return s.length>this._max?(this._dispose&&this._dispose(t,r),!1):(this._length+=s.length,this._lruList[s.lu]=this._cache[t]=s,this._itemCount++,this._length>this._max&&l(this),!0)},a.prototype.has=function(t){return i(t),!!e(this._cache,t)&&!s(this,this._cache[t])},a.prototype.get=function(t){return i(t),o(this,t,!0)},a.prototype.peek=function(t){return i(t),o(this,t,!1)},a.prototype.pop=function(){var t=this._lruList[this._lru];return u(this,t),t||null},a.prototype.del=function(t){i(t),u(this,this._cache[t])},a.prototype.load=function(t){this.reset();for(var e=Date.now(),r=t.length-1;r>=0;r--){var n=t[r];i(n.k);var a=n.e||0;if(0===a)this.set(n.k,n.v);else{var o=a-e;o>0&&this.set(n.k,n.v,o)}}}}()},6941:(t,e,r)=>{var n=r(48764).lW,i=n.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},a=e.s=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!i(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=l;break;default:return void(this.write=o)}this.charBuffer=new n(6),this.charReceived=0,this.charLength=0};function o(t){return t.toString(this.encoding)}function s(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function l(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}a.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var n,i=t.length;if(this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),i=(e+=t.toString(this.encoding,0,i)).length-1,(n=e.charCodeAt(i))>=55296&&n<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),t.copy(this.charBuffer,0,0,a),e.substring(0,i)}return e},a.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},a.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},29718:(t,e,r)=>{t.exports=r(59141)},59141:function(t,e,r){!function(e){"use strict";function n(t,e,r){return e<=t&&t<=r}t.exports&&!e["encoding-indexes"]&&r(37597);var i=Math.floor;function a(t){if(void 0===t)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function o(t){return 0<=t&&t<=127}var s=o,l=-1;function c(t){this.tokens=[].slice.call(t),this.tokens.reverse()}c.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():l},prepend:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.push(e.pop());else this.tokens.push(t)},push:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.unshift(e.shift());else this.tokens.unshift(t)}};var u=-1;function h(t,e){if(t)throw TypeError("Decoder error");return e||65533}function f(t){throw TypeError("The code point "+t+" could not be encoded.")}function d(t){return t=String(t).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(m,t)?m[t]:null}var p=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],m={};p.forEach((function(t){t.encodings.forEach((function(t){t.labels.forEach((function(e){m[e]=t}))}))}));var A,g,v={},y={};function b(t,e){return e&&e[t]||null}function x(t,e){var r=e.indexOf(t);return-1===r?null:r}function w(t){if(!("encoding-indexes"in e))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return e["encoding-indexes"][t]}var _="utf-8";function E(t,e){if(!(this instanceof E))throw TypeError("Called as a function. Did you forget 'new'?");t=void 0!==t?String(t):_,e=a(e),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var r=d(t);if(null===r||"replacement"===r.name)throw RangeError("Unknown encoding: "+t);if(!y[r.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var n=this;return n._encoding=r,Boolean(e.fatal)&&(n._error_mode="fatal"),Boolean(e.ignoreBOM)&&(n._ignoreBOM=!0),Object.defineProperty||(this.encoding=n._encoding.name.toLowerCase(),this.fatal="fatal"===n._error_mode,this.ignoreBOM=n._ignoreBOM),n}function M(t,r){if(!(this instanceof M))throw TypeError("Called as a function. Did you forget 'new'?");r=a(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var n=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){var i=d(t=void 0!==t?String(t):_);if(null===i||"replacement"===i.name)throw RangeError("Unknown encoding: "+t);if(!v[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");n._encoding=i}else n._encoding=d("utf-8"),void 0!==t&&"console"in e&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=n._encoding.name.toLowerCase()),n}function S(t){var e=t.fatal,r=0,i=0,a=0,o=128,s=191;this.handler=function(t,c){if(c===l&&0!==a)return a=0,h(e);if(c===l)return u;if(0===a){if(n(c,0,127))return c;if(n(c,194,223))a=1,r=31&c;else if(n(c,224,239))224===c&&(o=160),237===c&&(s=159),a=2,r=15&c;else{if(!n(c,240,244))return h(e);240===c&&(o=144),244===c&&(s=143),a=3,r=7&c}return null}if(!n(c,o,s))return r=a=i=0,o=128,s=191,t.prepend(c),h(e);if(o=128,s=191,r=r<<6|63&c,(i+=1)!==a)return null;var f=r;return r=a=i=0,f}}function C(t){t.fatal,this.handler=function(t,e){if(e===l)return u;if(s(e))return e;var r,i;n(e,128,2047)?(r=1,i=192):n(e,2048,65535)?(r=2,i=224):n(e,65536,1114111)&&(r=3,i=240);for(var a=[(e>>6*r)+i];r>0;){var o=e>>6*(r-1);a.push(128|63&o),r-=1}return a}}function T(t,e){var r=e.fatal;this.handler=function(e,n){if(n===l)return u;if(o(n))return n;var i=t[n-128];return null===i?h(r):i}}function I(t,e){e.fatal,this.handler=function(e,r){if(r===l)return u;if(s(r))return r;var n=x(r,t);return null===n&&f(r),n+128}}function R(t){var e=t.fatal,r=0,i=0,a=0;this.handler=function(t,s){if(s===l&&0===r&&0===i&&0===a)return u;var c;if(s!==l||0===r&&0===i&&0===a||(r=0,i=0,a=0,h(e)),0!==a){c=null,n(s,48,57)&&(c=function(t){if(t>39419&&t<189e3||t>1237575)return null;if(7457===t)return 59335;var e,r=0,n=0,i=w("gb18030-ranges");for(e=0;e>8,n=255&t;return e?[r,n]:[n,r]}function V(t,e){var r=e.fatal,i=null,a=null;this.handler=function(e,o){if(o===l&&(null!==i||null!==a))return h(r);if(o===l&&null===i&&null===a)return u;if(null===i)return i=o,null;var s;if(s=t?(i<<8)+o:(o<<8)+i,i=null,null!==a){var c=a;return a=null,n(s,56320,57343)?65536+1024*(c-55296)+(s-56320):(e.prepend(Z(s,t)),h(r))}return n(s,55296,56319)?(a=s,null):n(s,56320,57343)?h(r):s}}function Q(t,e){e.fatal,this.handler=function(e,r){if(r===l)return u;if(n(r,0,65535))return Z(r,t);var i=Z(55296+(r-65536>>10),t),a=Z(56320+(r-65536&1023),t);return i.concat(a)}}function j(t){t.fatal,this.handler=function(t,e){return e===l?u:o(e)?e:63360+e-128}}function W(t){t.fatal,this.handler=function(t,e){return e===l?u:s(e)?e:n(e,63360,63487)?e-63360+128:f(e)}}Object.defineProperty&&(Object.defineProperty(E.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(E.prototype,"fatal",{get:function(){return"fatal"===this._error_mode}}),Object.defineProperty(E.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}})),E.prototype.decode=function(t,e){var r;r="object"==typeof t&&t instanceof ArrayBuffer?new Uint8Array(t):"object"==typeof t&&"buffer"in t&&t.buffer instanceof ArrayBuffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),e=a(e),this._do_not_flush||(this._decoder=y[this._encoding.name]({fatal:"fatal"===this._error_mode}),this._BOMseen=!1),this._do_not_flush=Boolean(e.stream);for(var n,i=new c(r),o=[];;){var s=i.read();if(s===l)break;if((n=this._decoder.handler(i,s))===u)break;null!==n&&(Array.isArray(n)?o.push.apply(o,n):o.push(n))}if(!this._do_not_flush){do{if((n=this._decoder.handler(i,i.read()))===u)break;null!==n&&(Array.isArray(n)?o.push.apply(o,n):o.push(n))}while(!i.endOfStream());this._decoder=null}return function(t){var e,r;return e=["UTF-8","UTF-16LE","UTF-16BE"],r=this._encoding.name,-1===e.indexOf(r)||this._ignoreBOM||this._BOMseen||(t.length>0&&65279===t[0]?(this._BOMseen=!0,t.shift()):t.length>0&&(this._BOMseen=!0)),function(t){for(var e="",r=0;r>10),56320+(1023&n)))}return e}(t)}.call(this,o)},Object.defineProperty&&Object.defineProperty(M.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),M.prototype.encode=function(t,e){t=void 0===t?"":String(t),e=a(e),this._do_not_flush||(this._encoder=v[this._encoding.name]({fatal:"fatal"===this._fatal})),this._do_not_flush=Boolean(e.stream);for(var r,n=new c(function(t){for(var e=String(t),r=e.length,n=0,i=[];n57343)i.push(a);else if(56320<=a&&a<=57343)i.push(65533);else if(55296<=a&&a<=56319)if(n===r-1)i.push(65533);else{var o=e.charCodeAt(n+1);if(56320<=o&&o<=57343){var s=1023&a,l=1023&o;i.push(65536+(s<<10)+l),n+=1}else i.push(65533)}n+=1}return i}(t)),i=[];;){var o=n.read();if(o===l)break;if((r=this._encoder.handler(n,o))===u)break;Array.isArray(r)?i.push.apply(i,r):i.push(r)}if(!this._do_not_flush){for(;(r=this._encoder.handler(n,n.read()))!==u;)Array.isArray(r)?i.push.apply(i,r):i.push(r);this._encoder=null}return new Uint8Array(i)},v["UTF-8"]=function(t){return new C(t)},y["UTF-8"]=function(t){return new S(t)},"encoding-indexes"in e&&p.forEach((function(t){"Legacy single-byte encodings"===t.heading&&t.encodings.forEach((function(t){var e=t.name,r=w(e.toLowerCase());y[e]=function(t){return new T(r,t)},v[e]=function(t){return new I(r,t)}}))})),y.GBK=function(t){return new R(t)},v.GBK=function(t){return new B(t,!0)},v.gb18030=function(t){return new B(t)},y.gb18030=function(t){return new R(t)},v.Big5=function(t){return new L(t)},y.Big5=function(t){return new k(t)},v["EUC-JP"]=function(t){return new D(t)},y["EUC-JP"]=function(t){return new P(t)},v["ISO-2022-JP"]=function(t){return new O(t)},y["ISO-2022-JP"]=function(t){return new U(t)},v.Shift_JIS=function(t){return new N(t)},y.Shift_JIS=function(t){return new F(t)},v["EUC-KR"]=function(t){return new G(t)},y["EUC-KR"]=function(t){return new z(t)},v["UTF-16BE"]=function(t){return new Q(!0,t)},y["UTF-16BE"]=function(t){return new V(!0,t)},v["UTF-16LE"]=function(t){return new Q(!1,t)},y["UTF-16LE"]=function(t){return new V(!1,t)},v["x-user-defined"]=function(t){return new W(t)},y["x-user-defined"]=function(t){return new j(t)},e.TextEncoder||(e.TextEncoder=M),e.TextDecoder||(e.TextDecoder=E),t.exports&&(t.exports={TextEncoder:e.TextEncoder,TextDecoder:e.TextDecoder,EncodingIndexes:e["encoding-indexes"]})}(this||{})},11379:(t,e)=>{"use strict";function r(t,e,r){return e<=t&&t<=r}function n(t){if(void 0===t)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function i(t){this.tokens=[].slice.call(t)}i.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(t)},push:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.push(e.shift());else this.tokens.push(t)}};var a=-1;function o(t,e){if(t)throw TypeError("Decoder error");return e||65533}var s="utf-8";function l(t,e){if(!(this instanceof l))return new l(t,e);if((t=void 0!==t?String(t).toLowerCase():s)!==s)throw new Error("Encoding not supported. Only utf-8 is supported");e=n(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(e.fatal),this._ignoreBOM=Boolean(e.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function c(t){var e=t.fatal,n=0,i=0,s=0,l=128,c=191;this.handler=function(t,u){if(-1===u&&0!==s)return s=0,o(e);if(-1===u)return a;if(0===s){if(r(u,0,127))return u;if(r(u,194,223))s=1,n=u-192;else if(r(u,224,239))224===u&&(l=160),237===u&&(c=159),s=2,n=u-224;else{if(!r(u,240,244))return o(e);240===u&&(l=144),244===u&&(c=143),s=3,n=u-240}return n<<=6*s,null}if(!r(u,l,c))return n=s=i=0,l=128,c=191,t.prepend(u),o(e);if(l=128,c=191,n+=u-128<<6*(s-(i+=1)),i!==s)return null;var h=n;return n=s=i=0,h}}l.prototype={decode:function(t,e){var r;r="object"==typeof t&&t instanceof ArrayBuffer?new Uint8Array(t):"object"==typeof t&&"buffer"in t&&t.buffer instanceof ArrayBuffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),e=n(e),this._streaming||(this._decoder=new c({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(e.stream);for(var o,s=new i(r),l=[];!s.endOfStream()&&(o=this._decoder.handler(s,s.read()))!==a;)null!==o&&(Array.isArray(o)?l.push.apply(l,o):l.push(o));if(!this._streaming){do{if((o=this._decoder.handler(s,s.read()))===a)break;null!==o&&(Array.isArray(o)?l.push.apply(l,o):l.push(o))}while(!s.endOfStream());this._decoder=null}return l.length&&(-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===l[0]?(this._BOMseen=!0,l.shift()):this._BOMseen=!0)),function(t){for(var e="",r=0;r>10),56320+(1023&n)))}return e}(l)}},e.k=l},38264:function(t,e,r){!function(t){var e=function(){try{return!!Symbol.iterator}catch(t){return!1}}(),r=function(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e&&(r[Symbol.iterator]=function(){return r}),r},n=function(t){return encodeURIComponent(t).replace(/%20/g,"+")},i=function(t){return decodeURIComponent(String(t).replace(/\+/g," "))};(function(){try{var e=t.URLSearchParams;return"a=1"===new e("?a=1").toString()&&"function"==typeof e.prototype.set&&"function"==typeof e.prototype.entries}catch(t){return!1}})()||function(){var i=function(t){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var e=typeof t;if("undefined"===e);else if("string"===e)""!==t&&this._fromString(t);else if(t instanceof i){var r=this;t.forEach((function(t,e){r.append(e,t)}))}else{if(null===t||"object"!==e)throw new TypeError("Unsupported input's type for URLSearchParams");if("[object Array]"===Object.prototype.toString.call(t))for(var n=0;ne[0]?1:0})),t._entries&&(t._entries={});for(var r=0;r1?i(n[1]):"")}})}(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(t){if(function(){try{var e=new t.URL("b","http://a");return e.pathname="c d","http://a/c%20d"===e.href&&e.searchParams}catch(t){return!1}}()||function(){var e=t.URL,r=function(e,r){"string"!=typeof e&&(e=String(e)),r&&"string"!=typeof r&&(r=String(r));var n,i=document;if(r&&(void 0===t.location||r!==t.location.href)){r=r.toLowerCase(),(n=(i=document.implementation.createHTMLDocument("")).createElement("base")).href=r,i.head.appendChild(n);try{if(0!==n.href.indexOf(r))throw new Error(n.href)}catch(t){throw new Error("URL unable to set base "+r+" due to "+t)}}var a=i.createElement("a");a.href=e,n&&(i.body.appendChild(a),a.href=a.href);var o=i.createElement("input");if(o.type="url",o.value=e,":"===a.protocol||!/:/.test(a.href)||!o.checkValidity()&&!r)throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:a});var s=new t.URLSearchParams(this.search),l=!0,c=!0,u=this;["append","delete","set"].forEach((function(t){var e=s[t];s[t]=function(){e.apply(s,arguments),l&&(c=!1,u.search=s.toString(),c=!0)}})),Object.defineProperty(this,"searchParams",{value:s,enumerable:!0});var h=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==h&&(h=this.search,c&&(l=!1,this.searchParams._fromString(this.search),l=!0))}})},n=r.prototype;["hash","host","hostname","port","protocol"].forEach((function(t){!function(t){Object.defineProperty(n,t,{get:function(){return this._anchorElement[t]},set:function(e){this._anchorElement[t]=e},enumerable:!0})}(t)})),Object.defineProperty(n,"search",{get:function(){return this._anchorElement.search},set:function(t){this._anchorElement.search=t,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(n,{toString:{get:function(){var t=this;return function(){return t.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(t){this._anchorElement.href=t,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(t){this._anchorElement.pathname=t},enumerable:!0},origin:{get:function(){var t={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],e=this._anchorElement.port!=t&&""!==this._anchorElement.port;return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(e?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(t){},enumerable:!0},username:{get:function(){return""},set:function(t){},enumerable:!0}}),r.createObjectURL=function(t){return e.createObjectURL.apply(e,arguments)},r.revokeObjectURL=function(t){return e.revokeObjectURL.apply(e,arguments)},t.URL=r}(),void 0!==t.location&&!("origin"in t.location)){var e=function(){return t.location.protocol+"//"+t.location.hostname+(t.location.port?":"+t.location.port:"")};try{Object.defineProperty(t.location,"origin",{get:e,enumerable:!0})}catch(r){setInterval((function(){t.location.origin=e()}),100)}}}(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this)},57147:(t,e,r)=>{"use strict";var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==n&&n,i="URLSearchParams"in n,a="Symbol"in n&&"iterator"in Symbol,o="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(t){return!1}}(),s="FormData"in n,l="ArrayBuffer"in n;if(l)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&c.indexOf(Object.prototype.toString.call(t))>-1};function h(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function f(t){return"string"!=typeof t&&(t=String(t)),t}function d(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return a&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function m(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function A(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function g(t){var e=new FileReader,r=A(e);return e.readAsArrayBuffer(t),r}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:s&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:i&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():l&&o&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var t=m(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(g)}),this.text=function(){var t,e,r,n=m(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,r=A(e=new FileReader),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function w(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function _(t,e){if(!(this instanceof _))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new p(e.headers),this.url=e.url||"",this._initBody(t)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})},y.call(x.prototype),y.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},_.error=function(){var t=new _(null,{status:0,statusText:""});return t.type="error",t};var E=[301,302,303,307,308];_.redirect=function(t,e){if(-1===E.indexOf(e))throw new RangeError("Invalid status code");return new _(null,{status:e,headers:{location:t}})};var M=n.DOMException;try{new M}catch(t){(M=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack}).prototype=Object.create(Error.prototype),M.prototype.constructor=M}function S(t,e){return new Promise((function(r,i){var a=new x(t,e);if(a.signal&&a.signal.aborted)return i(new M("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var t,e,n={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new p,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}})),e)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;setTimeout((function(){r(new _(i,n))}),0)},s.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},s.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},s.onabort=function(){setTimeout((function(){i(new M("Aborted","AbortError"))}),0)},s.open(a.method,function(t){try{return""===t&&n.location.href?n.location.href:t}catch(e){return t}}(a.url),!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&(o?s.responseType="blob":l&&a.headers.get("Content-Type")&&-1!==a.headers.get("Content-Type").indexOf("application/octet-stream")&&(s.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof p?a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){s.setRequestHeader(t,f(e.headers[t]))})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}S.polyfill=!0,n.fetch||(n.fetch=S,n.Headers=p,n.Request=x,n.Response=_)},78075:()=>{},61915:()=>{},37597:()=>{},17061:(t,e,r)=>{var n=r(18698).default;function i(){"use strict";t.exports=i=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},r=Object.prototype,a=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),s=new T(n||[]);return o(a,"_invoke",{value:E(t,r,s)}),a}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p={};function m(){}function A(){}function g(){}var v={};h(v,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(I([])));b&&b!==r&&a.call(b,l)&&(v=b);var x=g.prototype=m.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,s,l){var c=d(t[i],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==n(h)&&a.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,l)}),(function(t){r("throw",t,s,l)})):e.resolve(h).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,l)}))}l(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return{value:void 0,done:!0}}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=M(o,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=d(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function M(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,M(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var i=d(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,p;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function I(t){if(t){var e=t[l];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(s&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;C(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:I(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},18698:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},64687:(t,e,r)=>{var n=r(17061)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},30907:(t,e,r)=>{"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rn})},97326:(t,e,r)=>{"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}r.d(e,{Z:()=>n})},15861:(t,e,r)=>{"use strict";function n(t,e,r,n,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,a){var o=t.apply(e,r);function s(t){n(o,i,a,s,l,"next",t)}function l(t){n(o,i,a,s,l,"throw",t)}s(void 0)}))}}r.d(e,{Z:()=>i})},15671:(t,e,r)=>{"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,{Z:()=>n})},1519:(t,e,r)=>{"use strict";function n(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}r.d(e,{Z:()=>n})},86033:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(1519);function i(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,(0,n.Z)(t,e,"get"))}},13092:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(1519);function i(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,(0,n.Z)(t,e,"set"),r),r}},43144:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var n=r(49142);function i(t,e){for(var r=0;r{"use strict";r.d(e,{Z:()=>i});var n=r(49142);function i(t,e,r){return(e=(0,n.Z)(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},88301:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(18415);function i(){return i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=(0,n.Z)(t,e);if(i){var a=Object.getOwnPropertyDescriptor(i,e);return a.get?a.get.call(arguments.length<3?t:r):a.value}},i.apply(this,arguments)}},61120:(t,e,r)=>{"use strict";function n(t){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}r.d(e,{Z:()=>n})},79340:(t,e,r)=>{"use strict";function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)}r.d(e,{Z:()=>i})},82963:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var n=r(71002),i=r(97326);function a(t,e){if(e&&("object"===(0,n.Z)(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(t)}},70885:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(40181);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||(0,n.Z)(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},18415:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(61120);function i(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=(0,n.Z)(t)););return t}},42982:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var n=r(30907),i=r(40181);function a(t){return function(t){if(Array.isArray(t))return(0,n.Z)(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||(0,i.Z)(t)||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.")}()}},49142:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(71002);function i(t){var e=function(t,e){if("object"!==(0,n.Z)(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!==(0,n.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===(0,n.Z)(e)?e:String(e)}},71002:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r.d(e,{Z:()=>n})},40181:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(30907);function i(t,e){if(t){if("string"==typeof t)return(0,n.Z)(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?(0,n.Z)(t,e):void 0}}},92294:(t,e,r)=>{"use strict";r.d(e,{TE:()=>kr,th:()=>jr});var n={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},terrain:{type:"terrain",doc:"A global modifier that elevates layers and markers based on a DEM data source."},fog:{type:"fog",doc:"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features. Note: fog is renamed to atmosphere in the Android and iOS SDKs and planned to be changed in GL-JS v.3.0.0."},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},projection:{type:"projection",doc:"The projection the map should be rendered in. Supported projections are Mercator, Globe, Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Natural Earth, and Winkel Tripel. Terrain, sky and fog are supported by only Mercator and globe. CustomLayerInterface is not supported outside of Mercator.",example:{name:"albers",center:[-154,50],parallels:[55,65]}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`. If specified as a string for a vector tile source, the same property is used across all its source layers. If specified as an object only specified source layers will have id overriden, others will fallback to original feature id"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},sky:{doc:"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:'An expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `["feature-state", ...]` expression is not supported in filter expressions. The `["pitch"]` and `["distance-from-center"]` expressions are supported only for filter expressions on the symbol layer.'},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"},"fill-extrusion-edge-radius":{type:"number",private:!0,default:0,minimum:0,maximum:1,doc:"Radius of a fill extrusion edge in meters. If not zero, rounds extrusion edges for a smoother appearance.","sdk-support":{"basic functionality":{js:"v2.10.0",android:"10.7.0",ios:"10.7.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options. SDF images are not supported in formatted text and will be ignored.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0",android:"10.0.0",ios:"10.0.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either ['horizontal', 'vertical'] or ['vertical', 'horizontal'], the order doesn't affect the placement.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_symbol:{type:"boolean",doc:'Expression which determines whether or not to display a symbol. Symbols support dynamic filtering, meaning this expression can use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",doc:'Expression which determines whether or not to display a polygon. Fill layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",doc:'Expression which determines whether or not to display a Polygon or LineString. Line layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",doc:'Expression which determines whether or not to display a circle. Circle layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",doc:'Expression which determines whether or not to display a Polygon. Fill-extrusion layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",doc:'Expression used to determine whether a point is being displayed or not. Heatmap layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0",android:"10.0.0",ios:"10.0.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0",android:"10.0.0",ios:"10.0.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `["get", "building_type"]`). Each label must be unique, and must be either:\n - a single literal value; or\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `["c", "b"]`).\n\nThe input matches if any of the values in the array matches using strict equality, similar to the `"in"` operator.\nIf the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first valid value is obtained. Invalid values are `null` and [`'image'`](#types-image) expressions that are unavailable in the style. If all values are invalid, `coalesce` returns the first value listed.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns a [`ResolvedImage`](/mapbox-gl-js/style-spec/types/#resolvedimage) for use in [`icon-image`](/mapbox-gl-js/style-spec/layers/#layout-symbol-icon-image), `*-pattern` entries, and as a section in the [`'format'`](#types-format) expression. A [`'coalesce'`](#coalesce) expression containing `image` expressions will evaluate to the first listed image that is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `'image'` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `unit` argument specifies a [simple ECMAScript unit](https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier) to use for unit-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0",android:"8.4.0",ios:"5.4.0",macos:"0.15.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a [`boolean`](#types-boolean), the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a [`color`](#color), it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. If the input is an [`\'image\'`](#types-image) expression, `\'to-string\'` returns the image name. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns `null` if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Returns the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Returns the feature properties object. Note that in some cases, it may be more efficient to use `["get", "property_name"]` directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns `null` if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0",android:"10.0.0",ios:"10.0.0"}}},"geometry-type":{doc:"Returns the feature's geometry type: `Point`, `LineString` or `Polygon`. `Multi*` feature types return the singular forms.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Returns the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Returns the current zoom level. Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Camera","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pitch:{doc:'Returns the current pitch in degrees. `["pitch"]` may only be used in the `filter` expression for a `symbol` layer.',group:"Camera","sdk-support":{"basic functionality":{js:"2.6.0",android:"10.9.0",ios:"10.9.0"}}},"distance-from-center":{doc:'Returns the distance of a `symbol` instance from the center of the map. The distance is measured in pixels divided by the height of the map container. It measures 0 at the center, decreases towards the camera and increase away from the camera. For example, if the height of the map is 1000px, a value of -1 means 1000px away from the center towards the camera, and a value of 1 means a distance of 1000px away from the camera from the center. `["distance-from-center"]` may only be used in the `filter` expression for a `symbol` layer.',group:"Camera","sdk-support":{"basic functionality":{js:"2.6.0",android:"10.9.0",ios:"10.9.0"}}},"heatmap-density":{doc:"Returns the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Returns the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},"sky-radial-progress":{doc:"Returns the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.",group:"sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},accumulated:{doc:"Returns the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0",android:"8.4.0",ios:"5.5.0",macos:"0.15.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0",ios:"4.1.0",macos:"0.8.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.",example:[.5,10],"sdk-support":{"basic functionality":{js:"2.3.0",android:"10.6.0",ios:"10.6.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the atmosphere region immediately below the horizon and within the `range` and above the horizon and within `horizon-blend`. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{js:"2.3.0",android:"10.6.0",ios:"10.6.0"}}},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the atmosphere region above the horizon, `high-color` extends further above the horizon than the `color` property and its spread can be controlled with `horizon-blend`. The opacity can be set to `0` to remove the high atmosphere color contribution.","sdk-support":{"basic functionality":{js:"2.9.0",android:"10.6.0",ios:"10.6.0"}}},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the region above the horizon and after the end of the `horizon-blend` contribution. The opacity can be set to `0` to have a transparent background.","sdk-support":{"basic functionality":{js:"2.9.0",android:"10.6.0",ios:"10.6.0"}}},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Horizon blend applies a smooth fade from the color of the atmosphere to the color of space. A value of zero leaves a sharp transition from atmosphere to space. Increasing the value blends the color of atmosphere into increasingly high angles of the sky.","sdk-support":{"basic functionality":{js:"2.3.0",android:"10.6.0",ios:"10.6.0"}}},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"A value controlling the star intensity where `0` will show no stars and `1` will show stars at their maximum intensity.","sdk-support":{"basic functionality":{js:"2.9.0",android:"10.6.0",ios:"10.6.0"}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},projection:{name:{type:"enum",values:{albers:{doc:"An Albers equal-area projection centered on the continental United States. You can configure the projection for a different region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region."},equalEarth:{doc:"An Equal Earth projection."},equirectangular:{doc:"An Equirectangular projection. This projection is very similar to the Plate Carrée projection."},lambertConformalConic:{doc:"A Lambert conformal conic projection. You can configure the projection for a region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region."},mercator:{doc:"The Mercator projection is the default projection."},naturalEarth:{doc:"A Natural Earth projection."},winkelTripel:{doc:"A Winkel Tripel projection."},globe:{doc:"A globe projection."}},default:"mercator",doc:"The name of the projection to be used for rendering the map.",required:!0,"sdk-support":{"basic functionality":{js:"2.6.0"}}},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,doc:"The reference longitude and latitude of the projection. `center` takes the form of [lng, lat]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic). All other projections are centered on [0, 0].",example:[-96,37.5],requires:[{name:["albers","lambertConformalConic"]}],"sdk-support":{"basic functionality":{js:"2.6.0"}}},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,doc:"The standard parallels of the projection, denoting the desired latitude range with minimal distortion. `parallels` takes the form of [lat0, lat1]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic).",example:[29.5,45.5],requires:[{name:["albers","lambertConformalConic"]}],"sdk-support":{"basic functionality":{js:"2.6.0"}}}},terrain:{source:{type:"string",doc:"Name of a source of `raster_dem` type to be used for terrain elevation.",required:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.",requires:["source"],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!1,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!1,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",android:"7.0.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant",type:"number",private:!0,default:0,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Controls the intensity of shading near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.","sdk-support":{"basic functionality":{js:"2.10.0",android:"10.7.0",ios:"10.7.0"}}},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant",type:"number",private:!0,default:3,minimum:0,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings.",requires:["fill-extrusion-edge-radius"],"sdk-support":{"basic functionality":{js:"2.10.0",android:"10.7.0",ios:"10.7.0"}}}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!1,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{type:"resolvedImage",transition:!1,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",doc:"The line part between [trim-start, trim-end] will be marked as transparent to make a route vanishing effect. The line trim-off offset is based on the whole line range [0.0, 1.0].",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"2.9.0",android:"10.5.0",ios:"10.5.0",macos:"10.5.0"}},"property-type":"constant"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. `queryRenderedFeatures` on heatmap layers will return points within this radius.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!1,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{doc:"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},atmosphere:{doc:"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},default:"atmosphere",doc:"The type of the sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,doc:"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,doc:"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],doc:"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.",transition:!1,requires:[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",doc:"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",doc:"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire sky layer.",transition:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}}},i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},a={},o={exports:{}};!function(t,e){!function(r){var n=e&&!e.nodeType&&e,a=t&&!t.nodeType&&t,o="object"==typeof i&&i;o.global!==o&&o.window!==o&&o.self!==o||(r=o);var s,l,c=2147483647,u=36,h=26,f=38,d=700,p=/^xn--/,m=/[^\x20-\x7E]/,A=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=u-1,y=Math.floor,b=String.fromCharCode;function x(t){throw RangeError(g[t])}function w(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function _(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+w((t=t.replace(A,".")).split("."),e).join(".")}function E(t){for(var e,r,n=[],i=0,a=t.length;i=55296&&e<=56319&&i65535&&(e+=b((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+b(t)})).join("")}function S(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function C(t,e,r){var n=0;for(t=r?y(t/d):t>>1,t+=y(t/e);t>v*h>>1;n+=u)t=y(t/v);return y(n+(v+1)*t/(t+f))}function T(t){var e,r,n,i,a,o,s,l,f,d,p,m=[],A=t.length,g=0,v=128,b=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&x("not-basic"),m.push(t.charCodeAt(n));for(i=r>0?r+1:0;i=A&&x("invalid-input"),((l=(p=t.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:u)>=u||l>y((c-g)/o))&&x("overflow"),g+=l*o,!(l<(f=s<=b?1:s>=b+h?h:s-b));s+=u)o>y(c/(d=u-f))&&x("overflow"),o*=d;b=C(g-a,e=m.length+1,0==a),y(g/e)>c-v&&x("overflow"),v+=y(g/e),g%=e,m.splice(g++,0,v)}return M(m)}function I(t){var e,r,n,i,a,o,s,l,f,d,p,m,A,g,v,w=[];for(m=(t=E(t)).length,e=128,r=0,a=72,o=0;o=e&&py((c-r)/(A=n+1))&&x("overflow"),r+=(s-e)*A,e=s,o=0;oc&&x("overflow"),p==e){for(l=r,f=u;!(l<(d=f<=a?1:f>=a+h?h:f-a));f+=u)v=l-d,g=u-d,w.push(b(S(d+v%g,0))),l=y(v/g);w.push(b(S(l,0))),a=C(r,A,n==i),r=0,++n}++r,++e}return w.join("")}if(s={version:"1.3.2",ucs2:{decode:E,encode:M},decode:T,encode:I,toASCII:function(t){return _(t,(function(t){return m.test(t)?"xn--"+I(t):t}))},toUnicode:function(t){return _(t,(function(t){return p.test(t)?T(t.slice(4).toLowerCase()):t}))}},n&&a)if(t.exports==n)a.exports=s;else for(l in s)s.hasOwnProperty(l)&&(n[l]=s[l]);else r.punycode=s}(i)}(o,o.exports);var s={};function l(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var c=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};s.decode=s.parse=function(t,e,r,n){e=e||"&",r=r||"=";var i={};if("string"!=typeof t||0===t.length)return i;var a=/\+/g;t=t.split(e);var o=1e3;n&&"number"==typeof n.maxKeys&&(o=n.maxKeys);var s=t.length;o>0&&s>o&&(s=o);for(var c=0;c=0?(u=p.substr(0,m),h=p.substr(m+1)):(u=p,h=""),f=decodeURIComponent(u),d=decodeURIComponent(h),l(i,f)?Array.isArray(i[f])?i[f].push(d):i[f]=[i[f],d]:i[f]=d}return i},s.encode=s.stringify=function(t,e,r,n){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(n){var i=encodeURIComponent(c(n))+r;return Array.isArray(t[n])?t[n].map((function(t){return i+encodeURIComponent(c(t))})).join(e):i+encodeURIComponent(c(t[n]))})).join(e):n?encodeURIComponent(c(n))+r+encodeURIComponent(c(t)):""};var u=o.exports,h=function(t){return"string"==typeof t},f=function(t){return"object"==typeof t&&null!==t},d=function(t){return null===t},p=function(t){return null==t};function m(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}a.parse=I,a.resolve=function(t,e){return I(t,!1,!0).resolve(e)},a.resolveObject=function(t,e){return t?I(t,!1,!0).resolveObject(e):e},a.format=function(t){return h(t)&&(t=I(t)),t instanceof m?t.format():m.prototype.format.call(t)},a.Url=m;var A=/^([a-z0-9.+-]+:)/i,g=/:[0-9]*$/,v=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,y=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),b=["'"].concat(y),x=["%","/","?",";","#"].concat(b),w=["/","?","#"],_=/^[+a-z0-9A-Z_-]{0,63}$/,E=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,M={javascript:!0,"javascript:":!0},S={javascript:!0,"javascript:":!0},C={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},T=s;function I(t,e,r){if(t&&f(t)&&t instanceof m)return t;var n=new m;return n.parse(t,e,r),n}function R(t,...e){for(const r of e)for(const e in r)t[e]=r[e];return t}m.prototype.parse=function(t,e,r){if(!h(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=-1!==n&&n127?L+="x":L+=k[P];if(!L.match(_)){var U=R.slice(0,g),O=R.slice(g+1),F=k.match(E);F&&(U.push(F[1]),O.unshift(F[2])),O.length&&(o="/"+O.join(".")+o),this.hostname=U.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=u.toASCII(this.hostname));var N=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+N,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!M[c])for(g=0,B=b.length;g0)&&r.host.split("@"))&&(r.auth=B.shift(),r.host=r.hostname=B.shift())),r.search=t.search,r.query=t.query,d(r.pathname)&&d(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var M=_.slice(-1)[0],T=(r.host||t.host||_.length>1)&&("."===M||".."===M)||""===M,I=0,R=_.length;R>=0;R--)"."===(M=_[R])?_.splice(R,1):".."===M?(_.splice(R,1),I++):I&&(_.splice(R,1),I--);if(!x&&!w)for(;I--;I)_.unshift("..");!x||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),T&&"/"!==_.join("/").substr(-1)&&_.push("");var B,k=""===_[0]||_[0]&&"/"===_[0].charAt(0);return E&&(r.hostname=r.host=k?"":_.length?_.shift():"",(B=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=B.shift(),r.host=r.hostname=B.shift())),(x=x||r.host&&_.length)&&!k&&_.unshift(""),_.length?r.pathname=_.join("/"):(r.pathname=null,r.path=null),d(r.pathname)&&d(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},m.prototype.parseHost=function(){var t=this.host,e=g.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};class B extends Error{constructor(t,e){super(e),this.message=e,this.key=t}}var k=B;class L{constructor(t,e=[]){this.parent=t,this.bindings={};for(const[t,r]of e)this.bindings[t]=r}concat(t){return new L(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}var P=L;const D={kind:"null"},U={kind:"number"},O={kind:"string"},F={kind:"boolean"},N={kind:"color"},z={kind:"object"},G={kind:"value"},Z={kind:"collator"},V={kind:"formatted"},Q={kind:"resolvedImage"};function j(t,e){return{kind:"array",itemType:t,N:e}}function W(t){if("array"===t.kind){const e=W(t.itemType);return"number"==typeof t.N?`array<${e}, ${t.N}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}const H=[D,U,O,F,N,V,z,j(G),Q];function X(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!X(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(const t of H)if(!X(t,e))return null}return`Expected ${W(t)} but found ${W(e)} instead.`}function q(t,e){return e.some((e=>e.kind===t.kind))}function Y(t,e){return e.some((e=>"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t))}var J,K={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function $(t){return(t=Math.round(t))<0?0:t>255?255:t}function tt(t){return t<0?0:t>1?1:t}function et(t){return"%"===t[t.length-1]?$(parseFloat(t)/100*255):$(parseInt(t))}function rt(t){return"%"===t[t.length-1]?tt(parseFloat(t)/100):tt(parseFloat(t))}function nt(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{J={}.parseCSSColor=function(t){var e,r=t.replace(/ /g,"").toLowerCase();if(r in K)return K[r].slice();if("#"===r[0])return 4===r.length?(e=parseInt(r.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===r.length&&(e=parseInt(r.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var n=r.indexOf("("),i=r.indexOf(")");if(-1!==n&&i+1===r.length){var a=r.substr(0,n),o=r.substr(n+1,i-(n+1)).split(","),s=1;switch(a){case"rgba":if(4!==o.length)return null;s=rt(o.pop());case"rgb":return 3!==o.length?null:[et(o[0]),et(o[1]),et(o[2]),s];case"hsla":if(4!==o.length)return null;s=rt(o.pop());case"hsl":if(3!==o.length)return null;var l=(parseFloat(o[0])%360+360)%360/360,c=rt(o[1]),u=rt(o[2]),h=u<=.5?u*(c+1):u+c-u*c,f=2*u-h;return[$(255*nt(f,h,l+1/3)),$(255*nt(f,h,l)),$(255*nt(f,h,l-1/3)),s];default:return null}}return null}}catch(t){}class it{constructor(t,e,r,n=1){this.r=t,this.g=e,this.b=r,this.a=n}static parse(t){if(!t)return;if(t instanceof it)return t;if("string"!=typeof t)return;const e=J(t);return e?new it(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3]):void 0}toString(){const[t,e,r,n]=this.toArray();return`rgba(${Math.round(t)},${Math.round(e)},${Math.round(r)},${n})`}toArray(){const{r:t,g:e,b:r,a:n}=this;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*r/n,n]}toArray01(){const{r:t,g:e,b:r,a:n}=this;return 0===n?[0,0,0,0]:[t/n,e/n,r/n,n]}toArray01PremultipliedAlpha(){const{r:t,g:e,b:r,a:n}=this;return[t,e,r,n]}}it.black=new it(0,0,0,1),it.white=new it(1,1,1,1),it.transparent=new it(0,0,0,0),it.red=new it(1,0,0,1),it.blue=new it(0,0,1,1);var at=it;class ot{constructor(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class st{constructor(t,e,r,n,i){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i}}class lt{constructor(t){this.sections=t}static fromString(t){return new lt([new st(t,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((t=>0!==t.text.length||t.image&&0!==t.image.name.length))}static factory(t){return t instanceof lt?t:lt.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map((t=>t.text)).join("")}serialize(){const t=["format"];for(const e of this.sections){if(e.image){t.push(["image",e.image.name]);continue}t.push(e.text);const r={};e.fontStack&&(r["text-font"]=["literal",e.fontStack.split(",")]),e.scale&&(r["font-scale"]=e.scale),e.textColor&&(r["text-color"]=["rgba"].concat(e.textColor.toArray())),t.push(r)}return t}}class ct{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new ct({name:t,available:!1}):null}serialize(){return["image",this.name]}}function ut(t,e,r,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[t,e,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function ht(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof at)return!0;if(t instanceof ot)return!0;if(t instanceof lt)return!0;if(t instanceof ct)return!0;if(Array.isArray(t)){for(const e of t)if(!ht(e))return!1;return!0}if("object"==typeof t){for(const e in t)if(!ht(t[e]))return!1;return!0}return!1}function ft(t){if(null===t)return D;if("string"==typeof t)return O;if("boolean"==typeof t)return F;if("number"==typeof t)return U;if(t instanceof at)return N;if(t instanceof ot)return Z;if(t instanceof lt)return V;if(t instanceof ct)return Q;if(Array.isArray(t)){const e=t.length;let r;for(const e of t){const t=ft(e);if(r){if(r===t)continue;r=G;break}r=t}return j(r||G,e)}return z}function dt(t){const e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof at||t instanceof lt||t instanceof ct?t.toString():JSON.stringify(t)}class pt{constructor(t,e){this.type=t,this.value=e}static parse(t,e){if(2!==t.length)return e.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!ht(t[1]))return e.error("invalid value");const r=t[1];let n=ft(r);const i=e.expectedType;return"array"!==n.kind||0!==n.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(n=i),new pt(n,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof at?["rgba"].concat(this.value.toArray()):this.value instanceof lt?this.value.serialize():this.value}}var mt=pt,At=class{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}};const gt={string:O,number:U,boolean:F,object:z};class vt{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let r,n=1;const i=t[0];if("array"===i){let i,a;if(t.length>2){const r=t[1];if("string"!=typeof r||!(r in gt)||"object"===r)return e.error('The item type argument of "array" must be one of string, number, boolean',1);i=gt[r],n++}else i=G;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=t[2],n++}r=j(i,a)}else r=gt[i];const a=[];for(;nt.outputDefined()))}serialize(){const t=this.type,e=[t.kind];if("array"===t.kind){const r=t.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){e.push(r.kind);const n=t.N;("number"==typeof n||this.args.length>1)&&e.push(n)}}return e.concat(this.args.map((t=>t.serialize())))}}var yt=vt;class bt{constructor(t){this.type=V,this.sections=t}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");const n=[];let i=!1;for(let r=1;r<=t.length-1;++r){const a=t[r];if(i&&"object"==typeof a&&!Array.isArray(a)){i=!1;let t=null;if(a["font-scale"]&&(t=e.parse(a["font-scale"],1,U),!t))return null;let r=null;if(a["text-font"]&&(r=e.parse(a["text-font"],1,j(O)),!r))return null;let o=null;if(a["text-color"]&&(o=e.parse(a["text-color"],1,N),!o))return null;const s=n[n.length-1];s.scale=t,s.font=r,s.textColor=o}else{const a=e.parse(t[r],1,G);if(!a)return null;const o=a.type.kind;if("string"!==o&&"value"!==o&&"null"!==o&&"resolvedImage"!==o)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:a,scale:null,font:null,textColor:null})}}return new bt(n)}evaluate(t){return new lt(this.sections.map((e=>{const r=e.content.evaluate(t);return ft(r)===Q?new st("",r,null,null,null):new st(dt(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))}eachChild(t){for(const e of this.sections)t(e.content),e.scale&&t(e.scale),e.font&&t(e.font),e.textColor&&t(e.textColor)}outputDefined(){return!1}serialize(){const t=["format"];for(const e of this.sections){t.push(e.content.serialize());const r={};e.scale&&(r["font-scale"]=e.scale.serialize()),e.font&&(r["text-font"]=e.font.serialize()),e.textColor&&(r["text-color"]=e.textColor.serialize()),t.push(r)}return t}}class xt{constructor(t){this.type=Q,this.input=t}static parse(t,e){if(2!==t.length)return e.error("Expected two arguments.");const r=e.parse(t[1],1,O);return r?new xt(r):e.error("No image name provided.")}evaluate(t){const e=this.input.evaluate(t),r=ct.fromString(e);return r&&t.availableImages&&(r.available=t.availableImages.indexOf(e)>-1),r}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const wt={"to-boolean":F,"to-color":N,"to-number":U,"to-string":O};class _t{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");const n=wt[r],i=[];for(let r=1;r4?`Invalid rbga value ${JSON.stringify(e)}: expected an array containing either three or four numeric values.`:ut(e[0],e[1],e[2],e[3]),!r))return new at(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new At(r||`Could not parse color from value '${"string"==typeof e?e:String(JSON.stringify(e))}'`)}if("number"===this.type.kind){let e=null;for(const r of this.args){if(e=r.evaluate(t),null===e)return 0;const n=Number(e);if(!isNaN(n))return n}throw new At(`Could not convert ${JSON.stringify(e)} to number.`)}return"formatted"===this.type.kind?lt.fromString(dt(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?ct.fromString(dt(this.args[0].evaluate(t))):dt(this.args[0].evaluate(t))}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){if("formatted"===this.type.kind)return new bt([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new xt(this.args[0]).serialize();const t=[`to-${this.type.kind}`];return this.eachChild((e=>{t.push(e.serialize())})),t}}var Et=_t;const Mt=["Unknown","Point","LineString","Polygon"];var St=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&void 0!==this.feature.id?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?Mt[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const t=this.featureDistanceData.center,e=this.featureDistanceData.scale,{x:r,y:n}=this.featureTileCoord,i=r*e-t[0],a=n*e-t[1];return this.featureDistanceData.bearing[0]*i+this.featureDistanceData.bearing[1]*a}return 0}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=at.parse(t)),e}};class Ct{constructor(t,e,r,n){this.name=t,this.type=e,this._evaluate=r,this.args=n}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map((t=>t.serialize())))}static parse(t,e){const r=t[0],n=Ct.definitions[r];if(!n)return e.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const i=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,o=a.filter((([e])=>!Array.isArray(e)||e.length===t.length-1));let s=null;for(const[n,a]of o){s=new ee(e.registry,e.path,null,e.scope);const o=[];let l=!1;for(let e=1;e{return e=t,Array.isArray(e)?`(${e.map(W).join(", ")})`:`(${W(e.type)}...)`;var e})).join(" | "),n=[];for(let r=1;r=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Lt(t,e){const r=(180+t[0])/360,n=(i=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360);var i;const a=Math.pow(2,e.z);return[Math.round(r*a*Rt),Math.round(n*a*Rt)]}function Pt(t,e,r){const n=t[0]-e[0],i=t[1]-e[1],a=t[0]-r[0],o=t[1]-r[1];return n*o-a*i==0&&n*a<=0&&i*o<=0}function Dt(t,e){let r=!1;for(let o=0,s=e.length;on[1]!=a[1]>n[1]&&n[0]<(a[0]-i[0])*(n[1]-i[1])/(a[1]-i[1])+i[0]&&(r=!r)}}var n,i,a;return r}function Ut(t,e){for(let r=0;r0&&h<0||u<0&&h>0}function Ft(t,e,r,n){const i=[e[0]-t[0],e[1]-t[1]];return 0!=(a=[n[0]-r[0],n[1]-r[1]])[0]*(o=i)[1]-a[1]*o[0]&&!(!Ot(t,e,r,n)||!Ot(r,n,t,e));var a,o}function Nt(t,e,r){for(const n of r)for(let r=0;rr[2]){const e=.5*n;let i=t[0]-r[0]>e?-n:r[0]-t[0]>e?n:0;0===i&&(i=t[0]-r[2]>e?-n:r[2]-t[0]>e?n:0),t[0]+=i}Bt(e,t)}function jt(t,e,r,n){const i=Math.pow(2,n.z)*Rt,a=[n.x*Rt,n.y*Rt],o=[];if(!t)return o;for(const n of t)for(const t of n){const n=[t.x+a[0],t.y+a[1]];Qt(n,e,r,i),o.push(n)}return o}function Wt(t,e,r,n){const i=Math.pow(2,n.z)*Rt,a=[n.x*Rt,n.y*Rt],o=[];if(!t)return o;for(const r of t){const t=[];for(const n of r){const r=[n.x+a[0],n.y+a[1]];Bt(e,r),t.push(r)}o.push(t)}if(e[2]-e[0]<=i/2){(s=e)[0]=s[1]=1/0,s[2]=s[3]=-1/0;for(const t of o)for(const n of t)Qt(n,e,r,i)}var s;return o}class Ht{constructor(t,e){this.type=F,this.geojson=t,this.geometries=e}static parse(t,e){if(2!==t.length)return e.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(ht(t[1])){const e=t[1];if("FeatureCollection"===e.type)for(let t=0;t{e&&!qt(t)&&(e=!1)})),e}function Yt(t){if(t instanceof Tt&&"feature-state"===t.name)return!1;let e=!0;return t.eachChild((t=>{e&&!Yt(t)&&(e=!1)})),e}function Jt(t,e){if(t instanceof Tt&&e.indexOf(t.name)>=0)return!1;let r=!0;return t.eachChild((t=>{r&&!Jt(t,e)&&(r=!1)})),r}class Kt{constructor(t,e){this.type=e.type,this.name=t,this.boundExpression=e}static parse(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");const r=t[1];return e.scope.has(r)?new Kt(r,e.scope.get(r)):e.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var $t=Kt;class te{constructor(t,e=[],r,n=new P,i=[]){this.registry=t,this.path=e,this.key=e.map((t=>`[${t}]`)).join(""),this.scope=n,this.errors=i,this.expectedType=r}parse(t,e,r,n,i={}){return e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)}_parse(t,e){function r(t,e,r){return"assert"===r?new yt(e,[t]):"coerce"===r?new Et(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const n=t[0];if("string"!=typeof n)return this.error(`Expression name must be a string, but found ${typeof n} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const i=this.registry[n];if(i){let n=i.parse(t,this);if(!n)return null;if(this.expectedType){const t=this.expectedType,i=n.type;if("string"!==t.kind&&"number"!==t.kind&&"boolean"!==t.kind&&"object"!==t.kind&&"array"!==t.kind||"value"!==i.kind)if("color"!==t.kind&&"formatted"!==t.kind&&"resolvedImage"!==t.kind||"value"!==i.kind&&"string"!==i.kind){if(this.checkSubtype(t,i))return null}else n=r(n,t,e.typeAnnotation||"coerce");else n=r(n,t,e.typeAnnotation||"assert")}if(!(n instanceof mt)&&"resolvedImage"!==n.type.kind&&re(n)){const t=new St;try{n=new mt(n.type,n.evaluate(t))}catch(t){return this.error(t.message),null}}return n}return this.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof t} instead.`)}concat(t,e,r){const n="number"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new te(this.registry,n,e||null,i,this.errors)}error(t,...e){const r=`${this.key}${e.map((t=>`[${t}]`)).join("")}`;this.errors.push(new k(r,t))}checkSubtype(t,e){const r=X(t,e);return r&&this.error(r),r}}var ee=te;function re(t){if(t instanceof $t)return re(t.boundExpression);if(t instanceof Tt&&"error"===t.name)return!1;if(t instanceof It)return!1;if(t instanceof Xt)return!1;const e=t instanceof Et||t instanceof yt;let r=!0;return t.eachChild((t=>{r=e?r&&re(t):r&&t instanceof mt})),!!r&&qt(t)&&Jt(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function ne(t,e){const r=t.length-1;let n,i,a=0,o=r,s=0;for(;a<=o;)if(s=Math.floor((a+o)/2),n=t[s],i=t[s+1],n<=e){if(s===r||ee))throw new At("Input is not a number.");o=s-1}return 0}class ie{constructor(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(const[t,e]of r)this.labels.push(t),this.outputs.push(e)}static parse(t,e){if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");const r=e.parse(t[1],1,U);if(!r)return null;const n=[];let i=null;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(let r=1;r=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);const c=e.parse(o,l,i);if(!c)return null;i=i||c.type,n.push([a,c])}return new ie(i,r,n)}evaluate(t){const e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);const n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);const i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[ne(e,n)].evaluate(t)}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){const t=["step",this.input.serialize()];for(let e=0;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t}}var ae=ie,oe=se;function se(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=e,this.p2x=r,this.p2y=n}function le(t,e,r){return t*(1-r)+e*r}se.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,e){if(void 0===e&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(var r=t,n=0;n<8;n++){var i=this.sampleCurveX(r)-t;if(Math.abs(i)i?o=r:s=r,r=.5*(s-o)+o;return r},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}};var ce=Object.freeze({__proto__:null,number:le,color:function(t,e,r){return new at(le(t.r,e.r,r),le(t.g,e.g,r),le(t.b,e.b,r),le(t.a,e.a,r))},array:function(t,e,r){return t.map(((t,n)=>le(t,e[n],r)))}});const ue=.95047,he=1.08883,fe=4/29,de=6/29,pe=3*de*de,me=de*de*de,Ae=Math.PI/180,ge=180/Math.PI;function ve(t){return t>me?Math.pow(t,1/3):t/pe+fe}function ye(t){return t>de?t*t*t:pe*(t-fe)}function be(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function xe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function we(t){const e=xe(t.r),r=xe(t.g),n=xe(t.b),i=ve((.4124564*e+.3575761*r+.1804375*n)/ue),a=ve((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*a-16,a:500*(i-a),b:200*(a-ve((.0193339*e+.119192*r+.9503041*n)/he)),alpha:t.a}}function _e(t){let e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=1*ye(e),r=ue*ye(r),n=he*ye(n),new at(be(3.2404542*r-1.5371385*e-.4985314*n),be(-.969266*r+1.8760108*e+.041556*n),be(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function Ee(t,e,r){const n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}const Me={forward:we,reverse:_e,interpolate:function(t,e,r){return{l:le(t.l,e.l,r),a:le(t.a,e.a,r),b:le(t.b,e.b,r),alpha:le(t.alpha,e.alpha,r)}}},Se={forward:function(t){const{l:e,a:r,b:n}=we(t),i=Math.atan2(n,r)*ge;return{h:i<0?i+360:i,c:Math.sqrt(r*r+n*n),l:e,alpha:t.a}},reverse:function(t){const e=t.h*Ae,r=t.c;return _e({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:Ee(t.h,e.h,r),c:le(t.c,e.c,r),l:le(t.l,e.l,r),alpha:le(t.alpha,e.alpha,r)}}};var Ce=Object.freeze({__proto__:null,lab:Me,hcl:Se});class Te{constructor(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(const[t,e]of i)this.labels.push(t),this.outputs.push(e)}static interpolationFactor(t,e,r,n){let i=0;if("exponential"===t.name)i=Ie(e,t.base,r,n);else if("linear"===t.name)i=Ie(e,1,r,n);else if("cubic-bezier"===t.name){const a=t.controlPoints;i=new oe(a[0],a[1],a[2],a[3]).solve(Ie(e,1,r,n))}return i}static parse(t,e){let[r,n,i,...a]=t;if(!Array.isArray(n)||0===n.length)return e.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){const t=n[1];if("number"!=typeof t)return e.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:t}}else{if("cubic-bezier"!==n[0])return e.error(`Unknown interpolation type ${String(n[0])}`,1,0);{const t=n.slice(1);if(4!==t.length||t.some((t=>"number"!=typeof t||t<0||t>1)))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:t}}}if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(i=e.parse(i,2,U),!i)return null;const o=[];let s=null;"interpolate-hcl"===r||"interpolate-lab"===r?s=N:e.expectedType&&"value"!==e.expectedType.kind&&(s=e.expectedType);for(let t=0;t=r)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',i);const c=e.parse(n,l,s);if(!c)return null;s=s||c.type,o.push([r,c])}return"number"===s.kind||"color"===s.kind||"array"===s.kind&&"number"===s.itemType.kind&&"number"==typeof s.N?new Te(s,r,n,i,o):e.error(`Type ${W(s)} is not interpolatable.`)}evaluate(t){const e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);const n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);const i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);const a=ne(e,n),o=e[a],s=e[a+1],l=Te.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(t),u=r[a+1].evaluate(t);return"interpolate"===this.operator?ce[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?Se.reverse(Se.interpolate(Se.forward(c),Se.forward(u),l)):Me.reverse(Me.interpolate(Me.forward(c),Me.forward(u),l))}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){let t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const e=[this.operator,t,this.input.serialize()];for(let t=0;tX(n,t.type)));return new Be(a?G:r,i)}evaluate(t){let e,r=null,n=0;for(const i of this.args){if(n++,r=i.evaluate(t),r&&r instanceof ct&&!r.available&&(e||(e=r),r=null,n===this.args.length))return e;if(null!==r)break}return r}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){const t=["coalesce"];return this.eachChild((e=>{t.push(e.serialize())})),t}}var ke=Be;class Le{constructor(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const e of this.bindings)t(e[1]);t(this.result)}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const r=[];for(let n=1;n=r.length)throw new At(`Array index out of bounds: ${e} > ${r.length-1}.`);if(e!==Math.floor(e))throw new At(`Array index must be an integer, but found ${e} instead.`);return r[e]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var Ue=De;class Oe{constructor(t,e){this.type=F,this.needle=t,this.haystack=e}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,G),n=e.parse(t[2],2,G);return r&&n?q(r.type,[F,O,U,D,G])?new Oe(r,n):e.error(`Expected first argument to be of type boolean, string, number or null, but found ${W(r.type)} instead`):null}evaluate(t){const e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(null==r)return!1;if(!Y(e,["boolean","string","number","null"]))throw new At(`Expected first argument to be of type boolean, string, number or null, but found ${W(ft(e))} instead.`);if(!Y(r,["string","array"]))throw new At(`Expected second argument to be of type array or string, but found ${W(ft(r))} instead.`);return r.indexOf(e)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var Fe=Oe;class Ne{constructor(t,e,r){this.type=U,this.needle=t,this.haystack=e,this.fromIndex=r}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,G),n=e.parse(t[2],2,G);if(!r||!n)return null;if(!q(r.type,[F,O,U,D,G]))return e.error(`Expected first argument to be of type boolean, string, number or null, but found ${W(r.type)} instead`);if(4===t.length){const i=e.parse(t[3],3,U);return i?new Ne(r,n,i):null}return new Ne(r,n)}evaluate(t){const e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!Y(e,["boolean","string","number","null"]))throw new At(`Expected first argument to be of type boolean, string, number or null, but found ${W(ft(e))} instead.`);if(!Y(r,["string","array"]))throw new At(`Expected second argument to be of type array or string, but found ${W(ft(r))} instead.`);if(this.fromIndex){const n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var ze=Ne;class Ge{constructor(t,e,r,n,i,a){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a}static parse(t,e){if(t.length<5)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return e.error("Expected an even number of arguments.");let r,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);const i={},a=[];for(let o=2;oNumber.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof t&&Math.floor(t)!==t)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,ft(t)))return null}else r=ft(t);if(void 0!==i[String(t)])return c.error("Branch labels must be unique.");i[String(t)]=a.length}const u=e.parse(l,o,n);if(!u)return null;n=n||u.type,a.push(u)}const o=e.parse(t[1],1,G);if(!o)return null;const s=e.parse(t[t.length-1],t.length-1,n);return s?"value"!==o.type.kind&&e.concat(1).checkSubtype(r,o.type)?null:new Ge(r,n,o,i,a,s):null}evaluate(t){const e=this.input.evaluate(t);return(ft(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["match",this.input.serialize()],e=Object.keys(this.cases).sort(),r=[],n={};for(const t of e){const e=n[this.cases[t]];void 0===e?(n[this.cases[t]]=r.length,r.push([this.cases[t],[t]])):r[e][1].push(t)}const i=t=>"number"===this.inputType.kind?Number(t):t;for(const[e,n]of r)1===n.length?t.push(i(n[0])):t.push(n.map(i)),t.push(this.outputs[e].serialize());return t.push(this.otherwise.serialize()),t}}var Ze=Ge;class Ve{constructor(t,e,r){this.type=t,this.branches=e,this.otherwise=r}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return e.error("Expected an odd number of arguments.");let r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);const n=[];for(let i=1;ie.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["case"];return this.eachChild((e=>{t.push(e.serialize())})),t}}var Qe=Ve;class je{constructor(t,e,r,n){this.type=t,this.input=e,this.beginIndex=r,this.endIndex=n}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,G),n=e.parse(t[2],2,U);if(!r||!n)return null;if(!q(r.type,[j(G),O,G]))return e.error(`Expected first argument to be of type array or string, but found ${W(r.type)} instead`);if(4===t.length){const i=e.parse(t[3],3,U);return i?new je(r.type,r,n,i):null}return new je(r.type,r,n)}evaluate(t){const e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!Y(e,["string","array"]))throw new At(`Expected first argument to be of type array or string, but found ${W(ft(e))} instead.`);if(this.endIndex){const n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var We=je;function He(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function Xe(t,e,r,n){return 0===n.compare(e,r)}function qe(t,e,r){const n="=="!==t&&"!="!==t;return class i{constructor(t,e,r){this.type=F,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}static parse(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");const r=t[0];let a=e.parse(t[1],1,G);if(!a)return null;if(!He(r,a.type))return e.concat(1).error(`"${r}" comparisons are not supported for type '${W(a.type)}'.`);let o=e.parse(t[2],2,G);if(!o)return null;if(!He(r,o.type))return e.concat(2).error(`"${r}" comparisons are not supported for type '${W(o.type)}'.`);if(a.type.kind!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return e.error(`Cannot compare types '${W(a.type)}' and '${W(o.type)}'.`);n&&("value"===a.type.kind&&"value"!==o.type.kind?a=new yt(o.type,[a]):"value"!==a.type.kind&&"value"===o.type.kind&&(o=new yt(a.type,[o])));let s=null;if(4===t.length){if("string"!==a.type.kind&&"string"!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return e.error("Cannot use collator to compare non-string types.");if(s=e.parse(t[3],3,Z),!s)return null}return new i(a,o,s)}evaluate(i){const a=this.lhs.evaluate(i),o=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){const e=ft(a),r=ft(o);if(e.kind!==r.kind||"string"!==e.kind&&"number"!==e.kind)throw new At(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${e.kind}, ${r.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const t=ft(a),r=ft(o);if("string"!==t.kind||"string"!==r.kind)return e(i,a,o)}return this.collator?r(i,a,o,this.collator.evaluate(i)):e(i,a,o)}eachChild(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}outputDefined(){return!0}serialize(){const e=[t];return this.eachChild((t=>{e.push(t.serialize())})),e}}}const Ye=qe("==",(function(t,e,r){return e===r}),Xe),Je=qe("!=",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!Xe(0,e,r,n)})),Ke=qe("<",(function(t,e,r){return e",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),tr=qe("<=",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),er=qe(">=",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0}));class rr{constructor(t,e,r,n,i,a){this.type=O,this.number=t,this.locale=e,this.currency=r,this.unit=n,this.minFractionDigits=i,this.maxFractionDigits=a}static parse(t,e){if(3!==t.length)return e.error("Expected two arguments.");const r=e.parse(t[1],1,U);if(!r)return null;const n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");let i=null;if(n.locale&&(i=e.parse(n.locale,1,O),!i))return null;let a=null;if(n.currency&&(a=e.parse(n.currency,1,O),!a))return null;let o=null;if(n.unit&&(o=e.parse(n.unit,1,O),!o))return null;let s=null;if(n["min-fraction-digits"]&&(s=e.parse(n["min-fraction-digits"],1,U),!s))return null;let l=null;return n["max-fraction-digits"]&&(l=e.parse(n["max-fraction-digits"],1,U),!l)?null:new rr(r,i,a,o,s,l)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(t):void 0,unit:this.unit?this.unit.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.unit&&t(this.unit),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.unit&&(t.unit=this.unit.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]}}class nr{constructor(t){this.type=U,this.input=t}static parse(t,e){if(2!==t.length)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error(`Expected argument of type string or array, but found ${W(r.type)} instead.`):new nr(r):null}evaluate(t){const e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new At(`Expected value to be of type string or array, but found ${W(ft(e))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){const t=["length"];return this.eachChild((e=>{t.push(e.serialize())})),t}}const ir={"==":Ye,"!=":Je,">":$e,"<":Ke,">=":er,"<=":tr,array:yt,at:Ue,boolean:yt,case:Qe,coalesce:ke,collator:It,format:bt,image:xt,in:Fe,"index-of":ze,interpolate:Re,"interpolate-hcl":Re,"interpolate-lab":Re,length:nr,let:Pe,literal:mt,match:Ze,number:yt,"number-format":rr,object:yt,slice:We,step:ae,string:yt,"to-boolean":Et,"to-color":Et,"to-number":Et,"to-string":Et,var:$t,within:Xt};function ar(t,[e,r,n,i]){e=e.evaluate(t),r=r.evaluate(t),n=n.evaluate(t);const a=i?i.evaluate(t):1,o=ut(e,r,n,a);if(o)throw new At(o);return new at(e/255*a,r/255*a,n/255*a,a)}function or(t,e){return t in e}function sr(t,e){const r=e[t];return void 0===r?null:r}function lr(t){return{type:t}}Tt.register(ir,{error:[{kind:"error"},[O],(t,[e])=>{throw new At(e.evaluate(t))}],typeof:[O,[G],(t,[e])=>W(ft(e.evaluate(t)))],"to-rgba":[j(U,4),[N],(t,[e])=>e.evaluate(t).toArray()],rgb:[N,[U,U,U],ar],rgba:[N,[U,U,U,U],ar],has:{type:F,overloads:[[[O],(t,[e])=>or(e.evaluate(t),t.properties())],[[O,z],(t,[e,r])=>or(e.evaluate(t),r.evaluate(t))]]},get:{type:G,overloads:[[[O],(t,[e])=>sr(e.evaluate(t),t.properties())],[[O,z],(t,[e,r])=>sr(e.evaluate(t),r.evaluate(t))]]},"feature-state":[G,[O],(t,[e])=>sr(e.evaluate(t),t.featureState||{})],properties:[z,[],t=>t.properties()],"geometry-type":[O,[],t=>t.geometryType()],id:[G,[],t=>t.id()],zoom:[U,[],t=>t.globals.zoom],pitch:[U,[],t=>t.globals.pitch||0],"distance-from-center":[U,[],t=>t.distanceFromCenter()],"heatmap-density":[U,[],t=>t.globals.heatmapDensity||0],"line-progress":[U,[],t=>t.globals.lineProgress||0],"sky-radial-progress":[U,[],t=>t.globals.skyRadialProgress||0],accumulated:[G,[],t=>void 0===t.globals.accumulated?null:t.globals.accumulated],"+":[U,lr(U),(t,e)=>{let r=0;for(const n of e)r+=n.evaluate(t);return r}],"*":[U,lr(U),(t,e)=>{let r=1;for(const n of e)r*=n.evaluate(t);return r}],"-":{type:U,overloads:[[[U,U],(t,[e,r])=>e.evaluate(t)-r.evaluate(t)],[[U],(t,[e])=>-e.evaluate(t)]]},"/":[U,[U,U],(t,[e,r])=>e.evaluate(t)/r.evaluate(t)],"%":[U,[U,U],(t,[e,r])=>e.evaluate(t)%r.evaluate(t)],ln2:[U,[],()=>Math.LN2],pi:[U,[],()=>Math.PI],e:[U,[],()=>Math.E],"^":[U,[U,U],(t,[e,r])=>Math.pow(e.evaluate(t),r.evaluate(t))],sqrt:[U,[U],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[U,[U],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[U,[U],(t,[e])=>Math.log(e.evaluate(t))],log2:[U,[U],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[U,[U],(t,[e])=>Math.sin(e.evaluate(t))],cos:[U,[U],(t,[e])=>Math.cos(e.evaluate(t))],tan:[U,[U],(t,[e])=>Math.tan(e.evaluate(t))],asin:[U,[U],(t,[e])=>Math.asin(e.evaluate(t))],acos:[U,[U],(t,[e])=>Math.acos(e.evaluate(t))],atan:[U,[U],(t,[e])=>Math.atan(e.evaluate(t))],min:[U,lr(U),(t,e)=>Math.min(...e.map((e=>e.evaluate(t))))],max:[U,lr(U),(t,e)=>Math.max(...e.map((e=>e.evaluate(t))))],abs:[U,[U],(t,[e])=>Math.abs(e.evaluate(t))],round:[U,[U],(t,[e])=>{const r=e.evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[U,[U],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[U,[U],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[F,[O,G],(t,[e,r])=>t.properties()[e.value]===r.value],"filter-id-==":[F,[G],(t,[e])=>t.id()===e.value],"filter-type-==":[F,[O],(t,[e])=>t.geometryType()===e.value],"filter-<":[F,[O,G],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n{const r=t.id(),n=e.value;return typeof r==typeof n&&r":[F,[O,G],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n>i}],"filter-id->":[F,[G],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r>n}],"filter-<=":[F,[O,G],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n<=i}],"filter-id-<=":[F,[G],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r<=n}],"filter->=":[F,[O,G],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n>=i}],"filter-id->=":[F,[G],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r>=n}],"filter-has":[F,[G],(t,[e])=>e.value in t.properties()],"filter-has-id":[F,[],t=>null!==t.id()&&void 0!==t.id()],"filter-type-in":[F,[j(O)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[F,[j(G)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[F,[O,j(G)],(t,[e,r])=>r.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[F,[O,j(G)],(t,[e,r])=>function(t,e,r,n){for(;r<=n;){const i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}(t.properties()[e.value],r.value,0,r.value.length-1)],all:{type:F,overloads:[[[F,F],(t,[e,r])=>e.evaluate(t)&&r.evaluate(t)],[lr(F),(t,e)=>{for(const r of e)if(!r.evaluate(t))return!1;return!0}]]},any:{type:F,overloads:[[[F,F],(t,[e,r])=>e.evaluate(t)||r.evaluate(t)],[lr(F),(t,e)=>{for(const r of e)if(r.evaluate(t))return!0;return!1}]]},"!":[F,[F],(t,[e])=>!e.evaluate(t)],"is-supported-script":[F,[O],(t,[e])=>{const r=t.globals&&t.globals.isSupportedScript;return!r||r(e.evaluate(t))}],upcase:[O,[O],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[O,[O],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[O,lr(G),(t,e)=>e.map((e=>dt(e.evaluate(t)))).join("")],"resolved-locale":[O,[Z],(t,[e])=>e.evaluate(t).resolvedLocale()]});var cr=ir;function ur(t){return{result:"success",value:t}}function hr(t){return{result:"error",value:t}}function fr(t){return!!t.expression&&t.expression.interpolated}function dr(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function pr(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function mr(t){return t}function Ar(t,e){const r="color"===e.type,n=t.stops&&"object"==typeof t.stops[0][0],i=n||void 0!==t.property,a=n||!i,o=t.type||(fr(e)?"exponential":"interval");if(r&&((t=R({},t)).stops&&(t.stops=t.stops.map((t=>[t[0],at.parse(t[1])]))),t.default?t.default=at.parse(t.default):t.default=at.parse(e.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!Ce[t.colorSpace])throw new Error(`Unknown color space: ${t.colorSpace}`);let s,l,c;if("exponential"===o)s=br;else if("interval"===o)s=yr;else if("categorical"===o){s=vr,l=Object.create(null);for(const e of t.stops)l[e[0]]=e[1];c=typeof t.stops[0][0]}else{if("identity"!==o)throw new Error(`Unknown function type "${o}"`);s=xr}if(n){const r={},n=[];for(let e=0;et[0])),evaluate:({zoom:r},n)=>br({stops:i,base:t.base},e,r).evaluate(r,n)}}if(a){const r="exponential"===o?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:r,interpolationFactor:Re.interpolationFactor.bind(void 0,r),zoomStops:t.stops.map((t=>t[0])),evaluate:({zoom:r})=>s(t,e,r,l,c)}}return{kind:"source",evaluate(r,n){const i=n&&n.properties?n.properties[t.property]:void 0;return void 0===i?gr(t.default,e.default):s(t,e,i,l,c)}}}function gr(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function vr(t,e,r,n,i){return gr(typeof r===i?n[r]:void 0,t.default,e.default)}function yr(t,e,r){if("number"!==dr(r))return gr(t.default,e.default);const n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];const i=ne(t.stops.map((t=>t[0])),r);return t.stops[i][1]}function br(t,e,r){const n=void 0!==t.base?t.base:1;if("number"!==dr(r))return gr(t.default,e.default);const i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];const a=ne(t.stops.map((t=>t[0])),r),o=function(t,e,r,n){const i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[a][0],t.stops[a+1][0]),s=t.stops[a][1],l=t.stops[a+1][1];let c=ce[e.type]||mr;if(t.colorSpace&&"rgb"!==t.colorSpace){const e=Ce[t.colorSpace];c=(t,r)=>e.reverse(e.interpolate(e.forward(t),e.forward(r),o))}return"function"==typeof s.evaluate?{evaluate(...t){const e=s.evaluate.apply(void 0,t),r=l.evaluate.apply(void 0,t);if(void 0!==e&&void 0!==r)return c(e,r,o)}}:c(s,l,o)}function xr(t,e,r){return"color"===e.type?r=at.parse(r):"formatted"===e.type?r=lt.fromString(r.toString()):"resolvedImage"===e.type?r=ct.fromString(r.toString()):dr(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),gr(r,t.default,e.default)}class wr{constructor(t,e){var r;this.expression=t,this._warningHistory={},this._evaluator=new St,this._defaultValue=e?"color"===(r=e).type&&(pr(r.default)||Array.isArray(r.default))?new at(0,0,0,0):"color"===r.type?at.parse(r.default)||null:void 0===r.default?null:r.default:null,this._enumValues=e&&"enum"===e.type?e.values:null}evaluateWithoutErrorHandling(t,e,r,n,i,a,o,s){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n||null,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this._evaluator.featureTileCoord=o||null,this._evaluator.featureDistanceData=s||null,this.expression.evaluate(this._evaluator)}evaluate(t,e,r,n,i,a,o,s){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n||null,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null,this._evaluator.featureTileCoord=o||null,this._evaluator.featureDistanceData=s||null;try{const t=this.expression.evaluate(this._evaluator);if(null==t||"number"==typeof t&&t!=t)return this._defaultValue;if(this._enumValues&&!(t in this._enumValues))throw new At(`Expected value to be one of ${Object.keys(this._enumValues).map((t=>JSON.stringify(t))).join(", ")}, but found ${JSON.stringify(t)} instead.`);return t}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}function _r(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in cr}function Er(t,e){const r=new ee(cr,[],e?function(t){const e={color:N,string:O,number:U,enum:O,boolean:F,formatted:V,resolvedImage:Q};return"array"===t.type?j(e[t.value]||G,t.length):e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?ur(new wr(n,e)):hr(r.errors)}class Mr{constructor(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Yt(e.expression)}evaluateWithoutErrorHandling(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)}evaluate(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)}}class Sr{constructor(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Yt(e.expression),this.interpolationType=n}evaluateWithoutErrorHandling(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)}evaluate(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)}interpolationFactor(t,e,r){return this.interpolationType?Re.interpolationFactor(this.interpolationType,t,e,r):0}}function Cr(t,e){if("error"===(t=Er(t,e)).result)return t;const r=t.value.expression,n=qt(r);if(!n&&"data-driven"!==e["property-type"])return hr([new k("","data expressions not supported")]);const i=Jt(r,["zoom","pitch","distance-from-center"]);if(!i&&!function(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}(e))return hr([new k("","zoom expressions not supported")]);const a=Ir(r);if(!a&&!i)return hr([new k("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(a instanceof k)return hr([a]);if(a instanceof Re&&!fr(e))return hr([new k("",'"interpolate" expressions cannot be used with this property')]);if(!a)return ur(new Mr(n?"constant":"source",t.value));const o=a instanceof Re?a.interpolation:void 0;return ur(new Sr(n?"camera":"composite",t.value,a.labels,o))}class Tr{constructor(t,e){this._parameters=t,this._specification=e,R(this,Ar(this._parameters,this._specification))}static deserialize(t){return new Tr(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function Ir(t){let e=null;if(t instanceof Pe)e=Ir(t.result);else if(t instanceof ke){for(const r of t.args)if(e=Ir(r),e)break}else(t instanceof ae||t instanceof Re)&&t.input instanceof Tt&&"zoom"===t.input.name&&(e=t);return e instanceof k||t.eachChild((t=>{const r=Ir(t);r instanceof k?e=r:!e&&r?e=new k("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&r&&e!==r&&(e=new k("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}function Rr(t){if(Array.isArray(t))return t.map(Rr);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const r in t)e[r]=Rr(t[r]);return e}return function(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}(t)}function Br(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!Br(e)&&"boolean"!=typeof e)return!1;return!0;default:return!0}}function kr(t,e="fill"){if(null==t)return{filter:()=>!0,needGeometry:!1,needFeature:!1};Br(t)||(t=Nr(t));const r=t;let i=!0;try{i=function(t){if(!Dr(t))return t;let e=Rr(t);return Pr(e),e=Lr(e),e}(r)}catch(t){console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(r,null,2)}\n `)}const a=n[`filter_${e}`],o=Er(i,a);let s=null;if("error"===o.result)throw new Error(o.value.map((t=>`${t.key}: ${t.message}`)).join(", "));s=(t,e,r)=>o.value.evaluate(t,e,{},r);let l=null,c=null;if(i!==r){const t=Er(r,a);if("error"===t.result)throw new Error(t.value.map((t=>`${t.key}: ${t.message}`)).join(", "));l=(e,r,n,i,a)=>t.value.evaluate(e,r,{},n,void 0,void 0,i,a),c=!qt(t.value.expression)}return{filter:s,dynamicFilter:l||void 0,needGeometry:Fr(i),needFeature:!!c}}function Lr(t){if(!Array.isArray(t))return t;const e=function(t){if(Ur.has(t[0]))for(let e=1;eLr(t)))}function Pr(t){let e=!1;const r=[];if("case"===t[0]){for(let n=1;n",">=","<","<=","to-boolean"]);function Or(t,e){return te?1:0}function Fr(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(let e=1;e"===e||"<="===e||">="===e?zr(t[1],t[2],e):"any"===e?(r=t.slice(1),["any"].concat(r.map(Nr))):"all"===e?["all"].concat(t.slice(1).map(Nr)):"none"===e?["all"].concat(t.slice(1).map(Nr).map(Vr)):"in"===e?Gr(t[1],t.slice(2)):"!in"===e?Vr(Gr(t[1],t.slice(2))):"has"===e?Zr(t[1]):"!has"===e?Vr(Zr(t[1])):"within"!==e||t;var r}function zr(t,e,r){switch(t){case"$type":return[`filter-type-${r}`,e];case"$id":return[`filter-id-${r}`,e];default:return[`filter-${r}`,t,e]}}function Gr(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((t=>typeof t!=typeof e[0]))?["filter-in-large",t,["literal",e.sort(Or)]]:["filter-in-small",t,["literal",e]]}}function Zr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Vr(t){return["!",t]}function Qr(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}!function(t){var e=function(){var t=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},e=[1,12],r=[1,13],n=[1,9],i=[1,10],a=[1,11],o=[1,14],s=[1,15],l=[14,18,22,24],c=[18,22],u=[22,24],h={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:this.$=new String(t.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b")),this.$.__line__=this._$.first_line;break;case 2:this.$=new Number(t),this.$.__line__=this._$.first_line;break;case 3:this.$=null;break;case 4:this.$=new Boolean(!0),this.$.__line__=this._$.first_line;break;case 5:this.$=new Boolean(!1),this.$.__line__=this._$.first_line;break;case 6:return this.$=a[s-1];case 13:this.$={},Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=a[s-1],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[a[s-2],a[s]];break;case 16:this.$={},this.$[a[s][0]]=a[s][1];break;case 17:this.$=a[s-2],a[s-2][a[s][0]]=a[s][1];break;case 18:this.$=[],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[a[s]];break;case 21:this.$=a[s-2],a[s-2].push(a[s])}},table:[{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:a,12:1,13:2,15:7,16:8,17:o,23:s},{1:[3]},{14:[1,16]},t(l,[2,7]),t(l,[2,8]),t(l,[2,9]),t(l,[2,10]),t(l,[2,11]),t(l,[2,12]),t(l,[2,3]),t(l,[2,4]),t(l,[2,5]),t([14,18,21,22,24],[2,1]),t(l,[2,2]),{3:20,4:e,18:[1,17],19:18,20:19},{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:a,13:23,15:7,16:8,17:o,23:s,24:[1,21],25:22},{1:[2,6]},t(l,[2,13]),{18:[1,24],22:[1,25]},t(c,[2,16]),{21:[1,26]},t(l,[2,18]),{22:[1,28],24:[1,27]},t(u,[2,20]),t(l,[2,14]),{3:20,4:e,20:29},{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:a,13:30,15:7,16:8,17:o,23:s},t(l,[2,19]),{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:a,13:31,15:7,16:8,17:o,23:s},t(c,[2,17]),t(c,[2,15]),t(u,[2,21])],defaultActions:{16:[2,6]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var e=[0],r=[null],n=[],i=this.table,a="",o=0,s=0,l=n.slice.call(arguments,1),c=Object.create(this.lexer),u={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(u.yy[h]=this.yy[h]);c.setInput(t,u.yy),u.yy.lexer=c,u.yy.parser=this,void 0===c.yylloc&&(c.yylloc={});var f=c.yylloc;n.push(f);var d=c.options&&c.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var p,m,A,g,v,y,b,x,w,_={};;){if(m=e[e.length-1],this.defaultActions[m]?A=this.defaultActions[m]:(null==p&&(w=void 0,"number"!=typeof(w=c.lex()||1)&&(w=this.symbols_[w]||w),p=w),A=i[m]&&i[m][p]),void 0===A||!A.length||!A[0]){var E;for(v in x=[],i[m])this.terminals_[v]&&v>2&&x.push("'"+this.terminals_[v]+"'");E=c.showPosition?"Parse error on line "+(o+1)+":\n"+c.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[p]||p)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(E,{text:c.match,token:this.terminals_[p]||p,line:c.yylineno,loc:f,expected:x})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+p);switch(A[0]){case 1:e.push(p),r.push(c.yytext),n.push(c.yylloc),e.push(A[1]),p=null,s=c.yyleng,a=c.yytext,o=c.yylineno,f=c.yylloc;break;case 2:if(y=this.productions_[A[1]][1],_.$=r[r.length-y],_._$={first_line:n[n.length-(y||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(y||1)].first_column,last_column:n[n.length-1].last_column},d&&(_._$.range=[n[n.length-(y||1)].range[0],n[n.length-1].range[1]]),void 0!==(g=this.performAction.apply(_,[a,s,o,u.yy,A[1],r,n].concat(l))))return g;y&&(e=e.slice(0,-1*y*2),r=r.slice(0,-1*y),n=n.slice(0,-1*y)),e.push(this.productions_[A[1]][0]),r.push(_.$),n.push(_._$),b=i[e[e.length-2]][e[e.length-1]],e.push(b);break;case 3:return!0}}return!0}},f={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,n){switch(r){case 0:break;case 1:return 6;case 2:return e.yytext=e.yytext.substr(1,e.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function d(){this.yy={}}return h.lexer=f,d.prototype=h,h.Parser=d,new d}();void 0!==Qr&&(t.parser=e,t.Parser=e.Parser,t.parse=function(){return e.parse.apply(e,arguments)})}({}),new Set(["vector","raster","raster-dem"]);const jr={StyleExpression:wr,isExpression:_r,isExpressionFilter:Br,createExpression:Er,createPropertyExpression:Cr,normalizePropertyExpression:function(t,e){if(pr(t))return new Tr(t,e);if(_r(t)){const r=Cr(t,e);if("error"===r.result)throw new Error(r.value.map((t=>`${t.key}: ${t.message}`)).join(", "));return r.value}{let r=t;return"string"==typeof t&&"color"===e.type&&(r=at.parse(t)),{kind:"constant",evaluate:()=>r}}},ZoomConstantExpression:Mr,ZoomDependentExpression:Sr,StylePropertyFunction:Tr}},75153:(t,e,r)=>{"use strict";function n(t,e){return Array.from(t.getElementsByTagName(e))}function i(t){return"#"===t[0]?t:`#${t}`}function a(t){return t?.normalize(),t&&t.textContent||""}function o(t,e,r){const n=t.getElementsByTagName(e),i=n.length?n[0]:null;return i&&r&&r(i),i}function s(t,e,r){const n={};if(!t)return n;const i=t.getElementsByTagName(e),a=i.length?i[0]:null;return a&&r?r(a,n):n}function l(t,e,r){const n=a(o(t,e));return n&&r&&r(n)||{}}function c(t,e,r){const n=parseFloat(a(o(t,e)));if(!isNaN(n))return n&&r&&r(n)||{}}function u(t,e,r){const n=parseFloat(a(o(t,e)));if(!isNaN(n))return r&&r(n),n}function h(t,e){const r={};for(const n of e)l(t,n,(t=>{r[n]=t}));return r}function f(t){return 1===t?.nodeType}function d(t){return s(t,"line",(t=>Object.assign({},l(t,"color",(t=>({stroke:`#${t}`}))),c(t,"opacity",(t=>({"stroke-opacity":t}))),c(t,"width",(t=>({"stroke-width":96*t/25.4}))))))}function p(t){let e=[];if(null===t)return e;for(const r of Array.from(t.childNodes)){if(!f(r))continue;const t=m(r.nodeName);if("gpxtpx:TrackPointExtension"===t)e=e.concat(p(r));else{const n=a(r);e.push([t,A(n)])}}return e}function m(t){return["heart","gpxtpx:hr","hr"].includes(t)?"heart":t}function A(t){const e=parseFloat(t);return isNaN(e)?t:e}function g(t){const e=[parseFloat(t.getAttribute("lon")||""),parseFloat(t.getAttribute("lat")||"")];if(isNaN(e[0])||isNaN(e[1]))return null;u(t,"ele",(t=>{e.push(t)}));const r=o(t,"time");return{coordinates:e,time:r?a(r):null,extendedValues:p(o(t,"extensions"))}}function v(t){const e=h(t,["name","cmt","desc","type","time","keywords"]),r=Array.from(t.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/GpxExtensions/v3","*"));for(const n of r)n.parentNode?.parentNode===t&&(e[n.tagName.replace(":","_")]=a(n));const i=n(t,"link");return i.length&&(e.links=i.map((t=>Object.assign({href:t.getAttribute("href")},h(t,["text","type"]))))),e}function y(t,e){const r=n(t,e),i=[],a=[],o={};for(let t=0;t1,l=Object.assign({_gpxType:"trk"},v(t),d(o(t,"extensions")),i.length?{coordinateProperties:{times:s?i:i[0]}}:{});for(const t of a){r.push(t.line),l.coordinateProperties||(l.coordinateProperties={});const e=l.coordinateProperties,n=Object.entries(t.extendedValues);for(let t=0;tnew Array(t.line.length).fill(null)))),e[r][t]=i):e[r]=i}}return{type:"Feature",properties:l,geometry:s?{type:"MultiLineString",coordinates:r}:{type:"LineString",coordinates:r[0]}}}function w(t){const e=Object.assign(v(t),h(t,["sym"])),r=g(t);return r?{type:"Feature",properties:e,geometry:{type:"Point",coordinates:r.coordinates}}:null}function*_(t){for(const e of n(t,"trk")){const t=x(e);t&&(yield t)}for(const e of n(t,"rte")){const t=b(e);t&&(yield t)}for(const e of n(t,"wpt")){const t=w(e);t&&(yield t)}}function E(t){return{type:"FeatureCollection",features:Array.from(_(t))}}function M(t,e){const r={},n="stroke"==e||"fill"===e?e:e+"-color";return"#"===t[0]&&(t=t.substring(1)),6===t.length||3===t.length?r[n]="#"+t:8===t.length&&(r[e+"-opacity"]=parseInt(t.substring(0,2),16)/255,r[n]="#"+t.substring(6,8)+t.substring(4,6)+t.substring(2,4)),r}function S(t,e,r){const n={};return u(t,e,(t=>{n[r]=t})),n}function C(t,e){return s(t,"color",(t=>M(a(t),e)))}function T(t){return s(t,"Icon",((t,e)=>(l(t,"href",(t=>{e.icon=t})),e)))}function I(t){return Object.assign({},function(t){return s(t,"PolyStyle",((t,e)=>Object.assign(e,s(t,"color",(t=>M(a(t),"fill"))),l(t,"fill",(t=>{if("0"===t)return{"fill-opacity":0}})),l(t,"outline",(t=>{if("0"===t)return{"stroke-opacity":0}})))))}(t),function(t){return s(t,"LineStyle",(t=>Object.assign(C(t,"stroke"),S(t,"width","stroke-width"))))}(t),function(t){return s(t,"LabelStyle",(t=>Object.assign(C(t,"label"),S(t,"scale","label-scale"))))}(t),function(t){return s(t,"IconStyle",(t=>Object.assign(C(t,"icon"),S(t,"scale","icon-scale"),S(t,"heading","icon-heading"),s(t,"hotSpot",(t=>{const e=parseFloat(t.getAttribute("x")||""),r=parseFloat(t.getAttribute("y")||""),n=t.getAttribute("xunits")||"",i=t.getAttribute("yunits")||"";return isNaN(e)||isNaN(r)?{}:{"icon-offset":[e,r],"icon-offset-units":[n,i]}})),T(t))))}(t))}r.d(e,{DS:()=>$,ng:()=>E});const R=t=>Number(t),B={string:t=>t,int:R,uint:R,short:R,ushort:R,float:R,double:R,bool:t=>Boolean(t)};function k(t,e){return s(t,"ExtendedData",((t,r)=>{for(const e of n(t,"Data"))r[e.getAttribute("name")||""]=a(o(e,"value"));for(const i of n(t,"SimpleData")){const t=i.getAttribute("name")||"",n=e[t]||B.string;r[t]=n(a(i))}return r}))}function L(t){const e=o(t,"description");for(const t of Array.from(e?.childNodes||[]))if(4===t.nodeType)return{description:{"@type":"html",value:a(t)}};return{}}function P(t){return s(t,"TimeSpan",(t=>({timespan:{begin:a(o(t,"begin")),end:a(o(t,"end"))}})))}function D(t){return s(t,"TimeStamp",(t=>({timestamp:a(o(t,"when"))})))}function U(t,e){return l(t,"styleUrl",(t=>(t=i(t),e[t]?Object.assign({styleUrl:t},e[t]):{styleUrl:t})))}const O=/\s*/g,F=/^\s*|\s*$/g,N=/\s+/;function z(t){return t.replace(O,"").split(",").map(parseFloat).filter((t=>!isNaN(t))).slice(0,3)}function G(t){return t.replace(F,"").split(N).map(z).filter((t=>t.length>=2))}function Z(t){let e=n(t,"coord");var r;0===e.length&&(r=t,"coord","*",e=Array.from(r.getElementsByTagNameNS("*","coord")));const i=e.map((t=>a(t).split(" ").map(parseFloat)));return 0===i.length?null:{geometry:i.length>2?{type:"LineString",coordinates:i}:{type:"Point",coordinates:i[0]},times:n(t,"when").map((t=>a(t)))}}function V(t){if(0===t.length)return t;const e=t[0],r=t[t.length-1];let n=!0;for(let t=0;t=2&&e.push({type:"Point",coordinates:t});break}case"LinearRing":case"LineString":{const t=G(Q(a));t.length>=2&&e.push({type:"LineString",coordinates:t});break}case"Polygon":{const t=[];for(const e of n(a,"LinearRing")){const r=V(G(Q(e)));r.length>=4&&t.push(r)}t.length&&e.push({type:"Polygon",coordinates:t});break}case"Track":case"gx:Track":{const t=Z(a);if(!t)break;const{times:n,geometry:i}=t;e.push(i),n.length&&r.push(n);break}}}return{geometries:e,coordTimes:r}}function W(t){return 0===t.length?null:1===t.length?t[0]:{type:"GeometryCollection",geometries:t}}function H(t,e,r){const{coordTimes:n,geometries:i}=j(t),a={type:"Feature",geometry:W(i),properties:Object.assign(h(t,["name","address","visibility","open","phoneNumber","description"]),L(t),U(t,e),I(t),k(t,r),P(t),D(t),n.length?{coordinateProperties:{times:1===n.length?n[0]:n}}:{})};void 0!==a.properties?.visibility&&(a.properties.visibility="0"!==a.properties.visibility);const o=t.getAttribute("id");return null!==o&&""!==o&&(a.id=o),a}function X(t){return o(t,"gx:LatLonQuad")?{type:"Polygon",coordinates:[V(G(Q(t)))]}:function(t){const e=o(t,"LatLonBox");if(e){const t=u(e,"north"),r=u(e,"west"),n=u(e,"east"),i=u(e,"south"),a=u(e,"rotation");if("number"==typeof t&&"number"==typeof i&&"number"==typeof r&&"number"==typeof n){let e=[[[r,t],[n,t],[n,i],[r,i],[r,t]]];return"number"==typeof a&&(e=function(t,e,r){const n=[(t[0]+t[2])/2,(t[1]+t[3])/2];return[e[0].map((t=>{const e=t[1]-n[1],i=t[0]-n[0],a=Math.sqrt(Math.pow(e,2)+Math.pow(i,2)),o=Math.atan2(e,i)-r*q;return[n[0]+Math.cos(o)*a,n[1]+Math.sin(o)*a]}))]}([r,i,n,t],e,a)),{type:"Polygon",coordinates:e}}}return null}(t)}const q=Math.PI/180;function Y(t,e,r){const n={type:"Feature",geometry:X(t),properties:Object.assign({"@geometry-type":"groundoverlay"},h(t,["name","address","visibility","open","phoneNumber","description"]),L(t),U(t,e),I(t),T(t),k(t,r),P(t),D(t))};void 0!==n.properties?.visibility&&(n.properties.visibility="0"!==n.properties.visibility);const i=t.getAttribute("id");return null!==i&&""!==i&&(n.id=i),n}function J(t){let e=t.getAttribute("id");const r=t.parentNode;return!e&&f(r)&&"CascadingStyle"===r.localName&&(e=r.getAttribute("kml:id")||r.getAttribute("id")),i(e||"")}function*K(t){const e=function(t){const e={};for(const r of n(t,"Style"))e[J(r)]=I(r);for(const r of n(t,"StyleMap")){const t=i(r.getAttribute("id")||"");l(r,"styleUrl",(r=>{r=i(r),e[r]&&(e[t]=e[r])}))}return e}(t),r=function(t){const e={};for(const r of n(t,"SimpleField"))e[r.getAttribute("name")||""]=B[r.getAttribute("type")||""]||B.string;return e}(t);for(const i of n(t,"Placemark")){const t=H(i,e,r);t&&(yield t)}for(const i of n(t,"GroundOverlay")){const t=Y(i,e,r);t&&(yield t)}}function $(t){return{type:"FeatureCollection",features:Array.from(K(t))}}},99477:(t,e,r)=>{"use strict";r.r(e),r.d(e,{ACESFilmicToneMapping:()=>et,AddEquation:()=>E,AddOperation:()=>Y,AdditiveAnimationBlendMode:()=>Re,AdditiveBlending:()=>b,AlphaFormat:()=>Lt,AlwaysCompare:()=>dr,AlwaysDepth:()=>G,AlwaysStencilFunc:()=>ar,AmbientLight:()=>Cf,AmbientLightProbe:()=>Qf,AnimationAction:()=>vd,AnimationClip:()=>Yh,AnimationLoader:()=>of,AnimationMixer:()=>bd,AnimationObjectGroup:()=>gd,AnimationUtils:()=>Oh,ArcCurve:()=>eu,ArrayCamera:()=>El,ArrowHelper:()=>hp,Audio:()=>rd,AudioAnalyser:()=>ld,AudioContext:()=>Gf,AudioListener:()=>ed,AudioLoader:()=>Zf,AxesHelper:()=>fp,BackSide:()=>m,BasicDepthPacking:()=>Ue,BasicShadowMap:()=>u,Bone:()=>Ac,BooleanKeyframeTrack:()=>Vh,Box2:()=>kd,Box3:()=>En,Box3Helper:()=>op,BoxGeometry:()=>Da,BoxHelper:()=>ap,BufferAttribute:()=>Ji,BufferGeometry:()=>ma,BufferGeometryLoader:()=>Pf,ByteType:()=>_t,Cache:()=>Kh,Camera:()=>Ga,CameraHelper:()=>rp,CanvasTexture:()=>Kc,CapsuleGeometry:()=>wu,CatmullRomCurve3:()=>su,CineonToneMapping:()=>tt,CircleGeometry:()=>_u,ClampToEdgeWrapping:()=>ut,Clock:()=>qf,Color:()=>Gi,ColorKeyframeTrack:()=>Qh,ColorManagement:()=>an,CompressedArrayTexture:()=>Jc,CompressedTexture:()=>Yc,CompressedTextureLoader:()=>sf,ConeGeometry:()=>Mu,CubeCamera:()=>Qa,CubeReflectionMapping:()=>it,CubeRefractionMapping:()=>at,CubeTexture:()=>ja,CubeTextureLoader:()=>cf,CubeUVReflectionMapping:()=>lt,CubicBezierCurve:()=>hu,CubicBezierCurve3:()=>fu,CubicInterpolant:()=>Nh,CullFaceBack:()=>s,CullFaceFront:()=>l,CullFaceFrontBack:()=>c,CullFaceNone:()=>o,Curve:()=>$c,CurvePath:()=>yu,CustomBlending:()=>_,CustomToneMapping:()=>rt,CylinderGeometry:()=>Eu,Cylindrical:()=>Rd,Data3DTexture:()=>gn,DataArrayTexture:()=>mn,DataTexture:()=>gc,DataTextureLoader:()=>uf,DataUtils:()=>Xi,DecrementStencilOp:()=>Xe,DecrementWrapStencilOp:()=>Ye,DefaultLoadingManager:()=>tf,DepthFormat:()=>Ot,DepthStencilFormat:()=>Ft,DepthTexture:()=>Tl,DirectionalLight:()=>Sf,DirectionalLightHelper:()=>$d,DiscreteInterpolant:()=>Gh,DisplayP3ColorSpace:()=>Ve,DodecahedronGeometry:()=>Cu,DoubleSide:()=>A,DstAlphaFactor:()=>D,DstColorFactor:()=>O,DynamicCopyUsage:()=>xr,DynamicDrawUsage:()=>mr,DynamicReadUsage:()=>vr,EdgesGeometry:()=>ku,EllipseCurve:()=>tu,EqualCompare:()=>lr,EqualDepth:()=>Q,EqualStencilFunc:()=>tr,EquirectangularReflectionMapping:()=>ot,EquirectangularRefractionMapping:()=>st,Euler:()=>si,EventDispatcher:()=>Tr,ExtrudeGeometry:()=>sh,FileLoader:()=>af,Float16BufferAttribute:()=>aa,Float32BufferAttribute:()=>oa,Float64BufferAttribute:()=>sa,FloatType:()=>Tt,Fog:()=>Ul,FogExp2:()=>Dl,FramebufferTexture:()=>qc,FrontSide:()=>p,Frustum:()=>$a,GLBufferAttribute:()=>Md,GLSL1:()=>_r,GLSL3:()=>Er,GreaterCompare:()=>ur,GreaterDepth:()=>W,GreaterEqualCompare:()=>fr,GreaterEqualDepth:()=>j,GreaterEqualStencilFunc:()=>ir,GreaterStencilFunc:()=>rr,GridHelper:()=>Xd,Group:()=>Ml,HalfFloatType:()=>It,HemisphereLight:()=>df,HemisphereLightHelper:()=>Hd,HemisphereLightProbe:()=>Vf,IcosahedronGeometry:()=>ch,ImageBitmapLoader:()=>Nf,ImageLoader:()=>lf,ImageUtils:()=>sn,IncrementStencilOp:()=>He,IncrementWrapStencilOp:()=>qe,InstancedBufferAttribute:()=>xc,InstancedBufferGeometry:()=>Lf,InstancedInterleavedBuffer:()=>Ed,InstancedMesh:()=>Ic,Int16BufferAttribute:()=>ea,Int32BufferAttribute:()=>na,Int8BufferAttribute:()=>Ki,IntType:()=>St,InterleavedBuffer:()=>Fl,InterleavedBufferAttribute:()=>zl,Interpolant:()=>Fh,InterpolateDiscrete:()=>_e,InterpolateLinear:()=>Ee,InterpolateSmooth:()=>Me,InvertStencilOp:()=>Je,KeepStencilOp:()=>je,KeyframeTrack:()=>Zh,LOD:()=>ac,LatheGeometry:()=>xu,Layers:()=>li,LessCompare:()=>sr,LessDepth:()=>Z,LessEqualCompare:()=>cr,LessEqualDepth:()=>V,LessEqualStencilFunc:()=>er,LessStencilFunc:()=>$e,Light:()=>ff,LightProbe:()=>Rf,Line:()=>Uc,Line3:()=>Dd,LineBasicMaterial:()=>Rc,LineCurve:()=>du,LineCurve3:()=>pu,LineDashedMaterial:()=>Rh,LineLoop:()=>zc,LineSegments:()=>Nc,LinearEncoding:()=>Pe,LinearFilter:()=>gt,LinearInterpolant:()=>zh,LinearMipMapLinearFilter:()=>xt,LinearMipMapNearestFilter:()=>yt,LinearMipmapLinearFilter:()=>bt,LinearMipmapNearestFilter:()=>vt,LinearSRGBColorSpace:()=>Ze,LinearToneMapping:()=>K,Loader:()=>ef,LoaderUtils:()=>kf,LoadingManager:()=>$h,LoopOnce:()=>be,LoopPingPong:()=>we,LoopRepeat:()=>xe,LuminanceAlphaFormat:()=>Ut,LuminanceFormat:()=>Dt,MOUSE:()=>i,Material:()=>Ui,MaterialLoader:()=>Bf,MathUtils:()=>Zr,Matrix3:()=>Qr,Matrix4:()=>Jn,MaxEquation:()=>T,Mesh:()=>La,MeshBasicMaterial:()=>Vi,MeshDepthMaterial:()=>vl,MeshDistanceMaterial:()=>yl,MeshLambertMaterial:()=>Th,MeshMatcapMaterial:()=>Ih,MeshNormalMaterial:()=>Ch,MeshPhongMaterial:()=>Mh,MeshPhysicalMaterial:()=>Eh,MeshStandardMaterial:()=>_h,MeshToonMaterial:()=>Sh,MinEquation:()=>C,MirroredRepeatWrapping:()=>ht,MixOperation:()=>q,MultiplyBlending:()=>w,MultiplyOperation:()=>X,NearestFilter:()=>ft,NearestMipMapLinearFilter:()=>At,NearestMipMapNearestFilter:()=>pt,NearestMipmapLinearFilter:()=>mt,NearestMipmapNearestFilter:()=>dt,NeverCompare:()=>or,NeverDepth:()=>z,NeverStencilFunc:()=>Ke,NoBlending:()=>v,NoColorSpace:()=>ze,NoToneMapping:()=>J,NormalAnimationBlendMode:()=>Ie,NormalBlending:()=>y,NotEqualCompare:()=>hr,NotEqualDepth:()=>H,NotEqualStencilFunc:()=>nr,NumberKeyframeTrack:()=>jh,Object3D:()=>wi,ObjectLoader:()=>Df,ObjectSpaceNormalMap:()=>Ne,OctahedronGeometry:()=>uh,OneFactor:()=>R,OneMinusDstAlphaFactor:()=>U,OneMinusDstColorFactor:()=>F,OneMinusSrcAlphaFactor:()=>P,OneMinusSrcColorFactor:()=>k,OrthographicCamera:()=>po,PCFShadowMap:()=>h,PCFSoftShadowMap:()=>f,PMREMGenerator:()=>wo,Path:()=>bu,PerspectiveCamera:()=>Za,Plane:()=>Ya,PlaneGeometry:()=>ro,PlaneHelper:()=>sp,PointLight:()=>Ef,PointLightHelper:()=>Vd,Points:()=>Wc,PointsMaterial:()=>Gc,PolarGridHelper:()=>qd,PolyhedronGeometry:()=>Su,PositionalAudio:()=>sd,PropertyBinding:()=>Ad,PropertyMixer:()=>cd,QuadraticBezierCurve:()=>mu,QuadraticBezierCurve3:()=>Au,Quaternion:()=>bn,QuaternionKeyframeTrack:()=>Hh,QuaternionLinearInterpolant:()=>Wh,RED_GREEN_RGTC2_Format:()=>ve,RED_RGTC1_Format:()=>Ae,REVISION:()=>n,RGBADepthPacking:()=>Oe,RGBAFormat:()=>Pt,RGBAIntegerFormat:()=>Vt,RGBA_ASTC_10x10_Format:()=>fe,RGBA_ASTC_10x5_Format:()=>ce,RGBA_ASTC_10x6_Format:()=>ue,RGBA_ASTC_10x8_Format:()=>he,RGBA_ASTC_12x10_Format:()=>de,RGBA_ASTC_12x12_Format:()=>pe,RGBA_ASTC_4x4_Format:()=>ee,RGBA_ASTC_5x4_Format:()=>re,RGBA_ASTC_5x5_Format:()=>ne,RGBA_ASTC_6x5_Format:()=>ie,RGBA_ASTC_6x6_Format:()=>ae,RGBA_ASTC_8x5_Format:()=>oe,RGBA_ASTC_8x6_Format:()=>se,RGBA_ASTC_8x8_Format:()=>le,RGBA_BPTC_Format:()=>me,RGBA_ETC2_EAC_Format:()=>te,RGBA_PVRTC_2BPPV1_Format:()=>Jt,RGBA_PVRTC_4BPPV1_Format:()=>Yt,RGBA_S3TC_DXT1_Format:()=>jt,RGBA_S3TC_DXT3_Format:()=>Wt,RGBA_S3TC_DXT5_Format:()=>Ht,RGB_ETC1_Format:()=>Kt,RGB_ETC2_Format:()=>$t,RGB_PVRTC_2BPPV1_Format:()=>qt,RGB_PVRTC_4BPPV1_Format:()=>Xt,RGB_S3TC_DXT1_Format:()=>Qt,RGFormat:()=>Gt,RGIntegerFormat:()=>Zt,RawShaderMaterial:()=>wh,Ray:()=>Yn,Raycaster:()=>Sd,RectAreaLight:()=>Tf,RedFormat:()=>Nt,RedIntegerFormat:()=>zt,ReinhardToneMapping:()=>$,RepeatWrapping:()=>ct,ReplaceStencilOp:()=>We,ReverseSubtractEquation:()=>S,RingGeometry:()=>hh,SIGNED_RED_GREEN_RGTC2_Format:()=>ye,SIGNED_RED_RGTC1_Format:()=>ge,SRGBColorSpace:()=>Ge,Scene:()=>Ol,ShaderChunk:()=>no,ShaderLib:()=>ao,ShaderMaterial:()=>za,ShadowMaterial:()=>xh,Shape:()=>Lu,ShapeGeometry:()=>fh,ShapePath:()=>dp,ShapeUtils:()=>ih,ShortType:()=>Et,Skeleton:()=>bc,SkeletonHelper:()=>Gd,SkinnedMesh:()=>mc,Source:()=>cn,Sphere:()=>Zn,SphereGeometry:()=>dh,Spherical:()=>Id,SphericalHarmonics3:()=>If,SplineCurve:()=>gu,SpotLight:()=>yf,SpotLightHelper:()=>Od,Sprite:()=>ec,SpriteMaterial:()=>Gl,SrcAlphaFactor:()=>L,SrcAlphaSaturateFactor:()=>N,SrcColorFactor:()=>B,StaticCopyUsage:()=>br,StaticDrawUsage:()=>pr,StaticReadUsage:()=>gr,StereoCamera:()=>Xf,StreamCopyUsage:()=>wr,StreamDrawUsage:()=>Ar,StreamReadUsage:()=>yr,StringKeyframeTrack:()=>Xh,SubtractEquation:()=>M,SubtractiveBlending:()=>x,TOUCH:()=>a,TangentSpaceNormalMap:()=>Fe,TetrahedronGeometry:()=>ph,Texture:()=>fn,TextureLoader:()=>hf,TorusGeometry:()=>mh,TorusKnotGeometry:()=>Ah,Triangle:()=>Pi,TriangleFanDrawMode:()=>Le,TriangleStripDrawMode:()=>ke,TrianglesDrawMode:()=>Be,TubeGeometry:()=>gh,TwoPassDoubleSide:()=>g,UVMapping:()=>nt,Uint16BufferAttribute:()=>ra,Uint32BufferAttribute:()=>ia,Uint8BufferAttribute:()=>$i,Uint8ClampedBufferAttribute:()=>ta,Uniform:()=>xd,UniformsGroup:()=>_d,UniformsLib:()=>io,UniformsUtils:()=>Na,UnsignedByteType:()=>wt,UnsignedInt248Type:()=>kt,UnsignedIntType:()=>Ct,UnsignedShort4444Type:()=>Rt,UnsignedShort5551Type:()=>Bt,UnsignedShortType:()=>Mt,VSMShadowMap:()=>d,Vector2:()=>Vr,Vector3:()=>xn,Vector4:()=>dn,VectorKeyframeTrack:()=>qh,VideoTexture:()=>Xc,WebGL1Renderer:()=>Pl,WebGL3DRenderTarget:()=>vn,WebGLArrayRenderTarget:()=>An,WebGLCoordinateSystem:()=>Sr,WebGLCubeRenderTarget:()=>Wa,WebGLMultipleRenderTargets:()=>yn,WebGLRenderTarget:()=>pn,WebGLRenderer:()=>Ll,WebGLUtils:()=>_l,WebGPUCoordinateSystem:()=>Cr,WireframeGeometry:()=>vh,WrapAroundEnding:()=>Te,ZeroCurvatureEnding:()=>Se,ZeroFactor:()=>I,ZeroSlopeEnding:()=>Ce,ZeroStencilOp:()=>Qe,_SRGBAFormat:()=>Mr,sRGBEncoding:()=>De});const n="154",i={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},a={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},o=0,s=1,l=2,c=3,u=0,h=1,f=2,d=3,p=0,m=1,A=2,g=2,v=0,y=1,b=2,x=3,w=4,_=5,E=100,M=101,S=102,C=103,T=104,I=200,R=201,B=202,k=203,L=204,P=205,D=206,U=207,O=208,F=209,N=210,z=0,G=1,Z=2,V=3,Q=4,j=5,W=6,H=7,X=0,q=1,Y=2,J=0,K=1,$=2,tt=3,et=4,rt=5,nt=300,it=301,at=302,ot=303,st=304,lt=306,ct=1e3,ut=1001,ht=1002,ft=1003,dt=1004,pt=1004,mt=1005,At=1005,gt=1006,vt=1007,yt=1007,bt=1008,xt=1008,wt=1009,_t=1010,Et=1011,Mt=1012,St=1013,Ct=1014,Tt=1015,It=1016,Rt=1017,Bt=1018,kt=1020,Lt=1021,Pt=1023,Dt=1024,Ut=1025,Ot=1026,Ft=1027,Nt=1028,zt=1029,Gt=1030,Zt=1031,Vt=1033,Qt=33776,jt=33777,Wt=33778,Ht=33779,Xt=35840,qt=35841,Yt=35842,Jt=35843,Kt=36196,$t=37492,te=37496,ee=37808,re=37809,ne=37810,ie=37811,ae=37812,oe=37813,se=37814,le=37815,ce=37816,ue=37817,he=37818,fe=37819,de=37820,pe=37821,me=36492,Ae=36283,ge=36284,ve=36285,ye=36286,be=2200,xe=2201,we=2202,_e=2300,Ee=2301,Me=2302,Se=2400,Ce=2401,Te=2402,Ie=2500,Re=2501,Be=0,ke=1,Le=2,Pe=3e3,De=3001,Ue=3200,Oe=3201,Fe=0,Ne=1,ze="",Ge="srgb",Ze="srgb-linear",Ve="display-p3",Qe=0,je=7680,We=7681,He=7682,Xe=7683,qe=34055,Ye=34056,Je=5386,Ke=512,$e=513,tr=514,er=515,rr=516,nr=517,ir=518,ar=519,or=512,sr=513,lr=514,cr=515,ur=516,hr=517,fr=518,dr=519,pr=35044,mr=35048,Ar=35040,gr=35045,vr=35049,yr=35041,br=35046,xr=35050,wr=35042,_r="100",Er="300 es",Mr=1035,Sr=2e3,Cr=2001;class Tr{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const r=this._listeners;void 0===r[t]&&(r[t]=[]),-1===r[t].indexOf(e)&&r[t].push(e)}hasEventListener(t,e){if(void 0===this._listeners)return!1;const r=this._listeners;return void 0!==r[t]&&-1!==r[t].indexOf(e)}removeEventListener(t,e){if(void 0===this._listeners)return;const r=this._listeners[t];if(void 0!==r){const t=r.indexOf(e);-1!==t&&r.splice(t,1)}}dispatchEvent(t){if(void 0===this._listeners)return;const e=this._listeners[t.type];if(void 0!==e){t.target=this;const r=e.slice(0);for(let e=0,n=r.length;e>8&255]+Ir[t>>16&255]+Ir[t>>24&255]+"-"+Ir[255&e]+Ir[e>>8&255]+"-"+Ir[e>>16&15|64]+Ir[e>>24&255]+"-"+Ir[63&r|128]+Ir[r>>8&255]+"-"+Ir[r>>16&255]+Ir[r>>24&255]+Ir[255&n]+Ir[n>>8&255]+Ir[n>>16&255]+Ir[n>>24&255]).toLowerCase()}function Pr(t,e,r){return Math.max(e,Math.min(r,t))}function Dr(t,e){return(t%e+e)%e}function Ur(t,e,r){return(1-r)*t+r*e}function Or(t){return 0==(t&t-1)&&0!==t}function Fr(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function Nr(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function zr(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function Gr(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(4294967295*t);case Uint16Array:return Math.round(65535*t);case Uint8Array:return Math.round(255*t);case Int32Array:return Math.round(2147483647*t);case Int16Array:return Math.round(32767*t);case Int8Array:return Math.round(127*t);default:throw new Error("Invalid component type.")}}const Zr={DEG2RAD:Br,RAD2DEG:kr,generateUUID:Lr,clamp:Pr,euclideanModulo:Dr,mapLinear:function(t,e,r,n,i){return n+(t-e)*(i-n)/(r-e)},inverseLerp:function(t,e,r){return t!==e?(r-t)/(e-t):0},lerp:Ur,damp:function(t,e,r,n){return Ur(t,e,1-Math.exp(-r*n))},pingpong:function(t,e=1){return e-Math.abs(Dr(t,2*e)-e)},smoothstep:function(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e))*t*(3-2*t)},smootherstep:function(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},seededRandom:function(t){void 0!==t&&(Rr=t);let e=Rr+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296},degToRad:function(t){return t*Br},radToDeg:function(t){return t*kr},isPowerOfTwo:Or,ceilPowerOfTwo:Fr,floorPowerOfTwo:Nr,setQuaternionFromProperEuler:function(t,e,r,n,i){const a=Math.cos,o=Math.sin,s=a(r/2),l=o(r/2),c=a((e+n)/2),u=o((e+n)/2),h=a((e-n)/2),f=o((e-n)/2),d=a((n-e)/2),p=o((n-e)/2);switch(i){case"XYX":t.set(s*u,l*h,l*f,s*c);break;case"YZY":t.set(l*f,s*u,l*h,s*c);break;case"ZXZ":t.set(l*h,l*f,s*u,s*c);break;case"XZX":t.set(s*u,l*p,l*d,s*c);break;case"YXY":t.set(l*d,s*u,l*p,s*c);break;case"ZYZ":t.set(l*p,l*d,s*u,s*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:Gr,denormalize:zr};class Vr{constructor(t=0,e=0){Vr.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,r=this.y,n=t.elements;return this.x=n[0]*e+n[3]*r+n[6],this.y=n[1]*e+n[4]*r+n[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(t,Math.min(e,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const r=this.dot(t)/e;return Math.acos(Pr(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y;return e*e+r*r}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const r=Math.cos(e),n=Math.sin(e),i=this.x-t.x,a=this.y-t.y;return this.x=i*r-a*n+t.x,this.y=i*n+a*r+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Qr{constructor(t,e,r,n,i,a,o,s,l){Qr.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==t&&this.set(t,e,r,n,i,a,o,s,l)}set(t,e,r,n,i,a,o,s,l){const c=this.elements;return c[0]=t,c[1]=n,c[2]=o,c[3]=e,c[4]=i,c[5]=s,c[6]=r,c[7]=a,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,r=t.elements;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],this}extractBasis(t,e,r){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const r=t.elements,n=e.elements,i=this.elements,a=r[0],o=r[3],s=r[6],l=r[1],c=r[4],u=r[7],h=r[2],f=r[5],d=r[8],p=n[0],m=n[3],A=n[6],g=n[1],v=n[4],y=n[7],b=n[2],x=n[5],w=n[8];return i[0]=a*p+o*g+s*b,i[3]=a*m+o*v+s*x,i[6]=a*A+o*y+s*w,i[1]=l*p+c*g+u*b,i[4]=l*m+c*v+u*x,i[7]=l*A+c*y+u*w,i[2]=h*p+f*g+d*b,i[5]=h*m+f*v+d*x,i[8]=h*A+f*y+d*w,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8];return e*a*c-e*o*l-r*i*c+r*o*s+n*i*l-n*a*s}invert(){const t=this.elements,e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=c*a-o*l,h=o*s-c*i,f=l*i-a*s,d=e*u+r*h+n*f;if(0===d)return this.set(0,0,0,0,0,0,0,0,0);const p=1/d;return t[0]=u*p,t[1]=(n*l-c*r)*p,t[2]=(o*r-n*a)*p,t[3]=h*p,t[4]=(c*e-n*s)*p,t[5]=(n*i-o*e)*p,t[6]=f*p,t[7]=(r*s-l*e)*p,t[8]=(a*e-r*i)*p,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,r,n,i,a,o){const s=Math.cos(i),l=Math.sin(i);return this.set(r*s,r*l,-r*(s*a+l*o)+a+t,-n*l,n*s,-n*(-l*a+s*o)+o+e,0,0,1),this}scale(t,e){return this.premultiply(jr.makeScale(t,e)),this}rotate(t){return this.premultiply(jr.makeRotation(-t)),this}translate(t,e){return this.premultiply(jr.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,-r,0,r,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,r=t.elements;for(let t=0;t<9;t++)if(e[t]!==r[t])return!1;return!0}fromArray(t,e=0){for(let r=0;r<9;r++)this.elements[r]=t[r+e];return this}toArray(t=[],e=0){const r=this.elements;return t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=r[3],t[e+4]=r[4],t[e+5]=r[5],t[e+6]=r[6],t[e+7]=r[7],t[e+8]=r[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}const jr=new Qr;function Wr(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const Hr={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Xr(t,e){return new Hr[t](e)}function qr(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}const Yr={};function Jr(t){t in Yr||(Yr[t]=!0,console.warn(t))}function Kr(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function $r(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}const tn=(new Qr).fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),en=(new Qr).fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]),rn={[Ze]:t=>t,[Ge]:t=>t.convertSRGBToLinear(),[Ve]:function(t){return t.convertSRGBToLinear().applyMatrix3(en)}},nn={[Ze]:t=>t,[Ge]:t=>t.convertLinearToSRGB(),[Ve]:function(t){return t.applyMatrix3(tn).convertLinearToSRGB()}},an={enabled:!0,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return Ze},set workingColorSpace(t){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(t,e,r){if(!1===this.enabled||e===r||!e||!r)return t;const n=rn[e],i=nn[r];if(void 0===n||void 0===i)throw new Error(`Unsupported color space conversion, "${e}" to "${r}".`);return i(n(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this.workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this.workingColorSpace)}};let on;class sn{static getDataURL(t){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===on&&(on=qr("canvas")),on.width=t.width,on.height=t.height;const r=on.getContext("2d");t instanceof ImageData?r.putImageData(t,0,0):r.drawImage(t,0,0,t.width,t.height),e=on}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const e=qr("canvas");e.width=t.width,e.height=t.height;const r=e.getContext("2d");r.drawImage(t,0,0,t.width,t.height);const n=r.getImageData(0,0,t.width,t.height),i=n.data;for(let t=0;t0&&(r.userData=this.userData),e||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==nt)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case ct:t.x=t.x-Math.floor(t.x);break;case ut:t.x=t.x<0?0:1;break;case ht:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case ct:t.y=t.y-Math.floor(t.y);break;case ut:t.y=t.y<0?0:1;break;case ht:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Jr("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Ge?De:Pe}set encoding(t){Jr("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=t===De?Ge:ze}}fn.DEFAULT_IMAGE=null,fn.DEFAULT_MAPPING=nt,fn.DEFAULT_ANISOTROPY=1;class dn{constructor(t=0,e=0,r=0,n=1){dn.prototype.isVector4=!0,this.x=t,this.y=e,this.z=r,this.w=n}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,r,n){return this.x=t,this.y=e,this.z=r,this.w=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){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: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,r=this.y,n=this.z,i=this.w,a=t.elements;return this.x=a[0]*e+a[4]*r+a[8]*n+a[12]*i,this.y=a[1]*e+a[5]*r+a[9]*n+a[13]*i,this.z=a[2]*e+a[6]*r+a[10]*n+a[14]*i,this.w=a[3]*e+a[7]*r+a[11]*n+a[15]*i,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,r,n,i;const a=.01,o=.1,s=t.elements,l=s[0],c=s[4],u=s[8],h=s[1],f=s[5],d=s[9],p=s[2],m=s[6],A=s[10];if(Math.abs(c-h)s&&t>g?tg?s=0?1:-1,n=1-e*e;if(n>Number.EPSILON){const i=Math.sqrt(n),a=Math.atan2(i,e*r);t=Math.sin(t*a)/i,o=Math.sin(o*a)/i}const i=o*r;if(s=s*t+h*i,l=l*t+f*i,c=c*t+d*i,u=u*t+p*i,t===1-o){const t=1/Math.sqrt(s*s+l*l+c*c+u*u);s*=t,l*=t,c*=t,u*=t}}t[e]=s,t[e+1]=l,t[e+2]=c,t[e+3]=u}static multiplyQuaternionsFlat(t,e,r,n,i,a){const o=r[n],s=r[n+1],l=r[n+2],c=r[n+3],u=i[a],h=i[a+1],f=i[a+2],d=i[a+3];return t[e]=o*d+c*u+s*f-l*h,t[e+1]=s*d+c*h+l*u-o*f,t[e+2]=l*d+c*f+o*h-s*u,t[e+3]=c*d-o*u-s*h-l*f,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,r,n){return this._x=t,this._y=e,this._z=r,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e){const r=t._x,n=t._y,i=t._z,a=t._order,o=Math.cos,s=Math.sin,l=o(r/2),c=o(n/2),u=o(i/2),h=s(r/2),f=s(n/2),d=s(i/2);switch(a){case"XYZ":this._x=h*c*u+l*f*d,this._y=l*f*u-h*c*d,this._z=l*c*d+h*f*u,this._w=l*c*u-h*f*d;break;case"YXZ":this._x=h*c*u+l*f*d,this._y=l*f*u-h*c*d,this._z=l*c*d-h*f*u,this._w=l*c*u+h*f*d;break;case"ZXY":this._x=h*c*u-l*f*d,this._y=l*f*u+h*c*d,this._z=l*c*d+h*f*u,this._w=l*c*u-h*f*d;break;case"ZYX":this._x=h*c*u-l*f*d,this._y=l*f*u+h*c*d,this._z=l*c*d-h*f*u,this._w=l*c*u+h*f*d;break;case"YZX":this._x=h*c*u+l*f*d,this._y=l*f*u+h*c*d,this._z=l*c*d-h*f*u,this._w=l*c*u-h*f*d;break;case"XZY":this._x=h*c*u-l*f*d,this._y=l*f*u-h*c*d,this._z=l*c*d+h*f*u,this._w=l*c*u+h*f*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!1!==e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const r=e/2,n=Math.sin(r);return this._x=t.x*n,this._y=t.y*n,this._z=t.z*n,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,r=e[0],n=e[4],i=e[8],a=e[1],o=e[5],s=e[9],l=e[2],c=e[6],u=e[10],h=r+o+u;if(h>0){const t=.5/Math.sqrt(h+1);this._w=.25/t,this._x=(c-s)*t,this._y=(i-l)*t,this._z=(a-n)*t}else if(r>o&&r>u){const t=2*Math.sqrt(1+r-o-u);this._w=(c-s)/t,this._x=.25*t,this._y=(n+a)/t,this._z=(i+l)/t}else if(o>u){const t=2*Math.sqrt(1+o-r-u);this._w=(i-l)/t,this._x=(n+a)/t,this._y=.25*t,this._z=(s+c)/t}else{const t=2*Math.sqrt(1+u-r-o);this._w=(a-n)/t,this._x=(i+l)/t,this._y=(s+c)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let r=t.dot(e)+1;return rMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=r):(this._x=0,this._y=-t.z,this._z=t.y,this._w=r)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=r),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Pr(this.dot(t),-1,1)))}rotateTowards(t,e){const r=this.angleTo(t);if(0===r)return this;const n=Math.min(1,e/r);return this.slerp(t,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const r=t._x,n=t._y,i=t._z,a=t._w,o=e._x,s=e._y,l=e._z,c=e._w;return this._x=r*c+a*o+n*l-i*s,this._y=n*c+a*s+i*o-r*l,this._z=i*c+a*l+r*s-n*o,this._w=a*c-r*o-n*s-i*l,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const r=this._x,n=this._y,i=this._z,a=this._w;let o=a*t._w+r*t._x+n*t._y+i*t._z;if(o<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,o=-o):this.copy(t),o>=1)return this._w=a,this._x=r,this._y=n,this._z=i,this;const s=1-o*o;if(s<=Number.EPSILON){const t=1-e;return this._w=t*a+e*this._w,this._x=t*r+e*this._x,this._y=t*n+e*this._y,this._z=t*i+e*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(s),c=Math.atan2(l,o),u=Math.sin((1-e)*c)/l,h=Math.sin(e*c)/l;return this._w=a*u+this._w*h,this._x=r*u+this._x*h,this._y=n*u+this._y*h,this._z=i*u+this._z*h,this._onChangeCallback(),this}slerpQuaternions(t,e,r){return this.copy(t).slerp(e,r)}random(){const t=Math.random(),e=Math.sqrt(1-t),r=Math.sqrt(t),n=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(e*Math.cos(n),r*Math.sin(i),r*Math.cos(i),e*Math.sin(n))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class xn{constructor(t=0,e=0,r=0){xn.prototype.isVector3=!0,this.x=t,this.y=e,this.z=r}set(t,e,r){return void 0===r&&(r=this.z),this.x=t,this.y=e,this.z=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(_n.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(_n.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,r=this.y,n=this.z,i=t.elements;return this.x=i[0]*e+i[3]*r+i[6]*n,this.y=i[1]*e+i[4]*r+i[7]*n,this.z=i[2]*e+i[5]*r+i[8]*n,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,r=this.y,n=this.z,i=t.elements,a=1/(i[3]*e+i[7]*r+i[11]*n+i[15]);return this.x=(i[0]*e+i[4]*r+i[8]*n+i[12])*a,this.y=(i[1]*e+i[5]*r+i[9]*n+i[13])*a,this.z=(i[2]*e+i[6]*r+i[10]*n+i[14])*a,this}applyQuaternion(t){const e=this.x,r=this.y,n=this.z,i=t.x,a=t.y,o=t.z,s=t.w,l=s*e+a*n-o*r,c=s*r+o*e-i*n,u=s*n+i*r-a*e,h=-i*e-a*r-o*n;return this.x=l*s+h*-i+c*-o-u*-a,this.y=c*s+h*-a+u*-i-l*-o,this.z=u*s+h*-o+l*-a-c*-i,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,r=this.y,n=this.z,i=t.elements;return this.x=i[0]*e+i[4]*r+i[8]*n,this.y=i[1]*e+i[5]*r+i[9]*n,this.z=i[2]*e+i[6]*r+i[10]*n,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(t,Math.min(e,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this.z=t.z+(e.z-t.z)*r,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const r=t.x,n=t.y,i=t.z,a=e.x,o=e.y,s=e.z;return this.x=n*s-i*o,this.y=i*a-r*s,this.z=r*o-n*a,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const r=t.dot(this)/e;return this.copy(t).multiplyScalar(r)}projectOnPlane(t){return wn.copy(this).projectOnVector(t),this.sub(wn)}reflect(t){return this.sub(wn.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const r=this.dot(t)/e;return Math.acos(Pr(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y,n=this.z-t.z;return e*e+r*r+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,r){const n=Math.sin(e)*t;return this.x=n*Math.sin(r),this.y=Math.cos(e)*t,this.z=n*Math.cos(r),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,r){return this.x=t*Math.sin(e),this.y=r,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),r=this.setFromMatrixColumn(t,1).length(),n=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=r,this.z=n,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=2*(Math.random()-.5),e=Math.random()*Math.PI*2,r=Math.sqrt(1-t**2);return this.x=r*Math.cos(e),this.y=r*Math.sin(e),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const wn=new xn,_n=new bn;class En{constructor(t=new xn(1/0,1/0,1/0),e=new xn(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,r=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,Sn),Sn.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,r;return t.normal.x>0?(e=t.normal.x*this.min.x,r=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,r=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,r+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,r+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,r+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,r+=t.normal.z*this.min.z),e<=-t.constant&&r>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Pn),Dn.subVectors(this.max,Pn),Tn.subVectors(t.a,Pn),In.subVectors(t.b,Pn),Rn.subVectors(t.c,Pn),Bn.subVectors(In,Tn),kn.subVectors(Rn,In),Ln.subVectors(Tn,Rn);let e=[0,-Bn.z,Bn.y,0,-kn.z,kn.y,0,-Ln.z,Ln.y,Bn.z,0,-Bn.x,kn.z,0,-kn.x,Ln.z,0,-Ln.x,-Bn.y,Bn.x,0,-kn.y,kn.x,0,-Ln.y,Ln.x,0];return!!Fn(e,Tn,In,Rn,Dn)&&(e=[1,0,0,0,1,0,0,0,1],!!Fn(e,Tn,In,Rn,Dn)&&(Un.crossVectors(Bn,kn),e=[Un.x,Un.y,Un.z],Fn(e,Tn,In,Rn,Dn)))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,Sn).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(Sn).length()),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(Mn[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Mn[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Mn[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Mn[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Mn[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Mn[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Mn[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Mn[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Mn)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const Mn=[new xn,new xn,new xn,new xn,new xn,new xn,new xn,new xn],Sn=new xn,Cn=new En,Tn=new xn,In=new xn,Rn=new xn,Bn=new xn,kn=new xn,Ln=new xn,Pn=new xn,Dn=new xn,Un=new xn,On=new xn;function Fn(t,e,r,n,i){for(let a=0,o=t.length-3;a<=o;a+=3){On.fromArray(t,a);const o=i.x*Math.abs(On.x)+i.y*Math.abs(On.y)+i.z*Math.abs(On.z),s=e.dot(On),l=r.dot(On),c=n.dot(On);if(Math.max(-Math.max(s,l,c),Math.min(s,l,c))>o)return!1}return!0}const Nn=new En,zn=new xn,Gn=new xn;class Zn{constructor(t=new xn,e=-1){this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const r=this.center;void 0!==e?r.copy(e):Nn.setFromPoints(t).getCenter(r);let n=0;for(let e=0,i=t.length;ethis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;zn.subVectors(t,this.center);const e=zn.lengthSq();if(e>this.radius*this.radius){const t=Math.sqrt(e),r=.5*(t-this.radius);this.center.addScaledVector(zn,r/t),this.radius+=r}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(!0===this.center.equals(t.center)?this.radius=Math.max(this.radius,t.radius):(Gn.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(zn.copy(t.center).add(Gn)),this.expandByPoint(zn.copy(t.center).sub(Gn))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Vn=new xn,Qn=new xn,jn=new xn,Wn=new xn,Hn=new xn,Xn=new xn,qn=new xn;class Yn{constructor(t=new xn,e=new xn(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Vn)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const r=e.dot(this.direction);return r<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=Vn.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Vn.copy(this.origin).addScaledVector(this.direction,e),Vn.distanceToSquared(t))}distanceSqToSegment(t,e,r,n){Qn.copy(t).add(e).multiplyScalar(.5),jn.copy(e).sub(t).normalize(),Wn.copy(this.origin).sub(Qn);const i=.5*t.distanceTo(e),a=-this.direction.dot(jn),o=Wn.dot(this.direction),s=-Wn.dot(jn),l=Wn.lengthSq(),c=Math.abs(1-a*a);let u,h,f,d;if(c>0)if(u=a*s-o,h=a*o-s,d=i*c,u>=0)if(h>=-d)if(h<=d){const t=1/c;u*=t,h*=t,f=u*(u+a*h+2*o)+h*(a*u+h+2*s)+l}else h=i,u=Math.max(0,-(a*h+o)),f=-u*u+h*(h+2*s)+l;else h=-i,u=Math.max(0,-(a*h+o)),f=-u*u+h*(h+2*s)+l;else h<=-d?(u=Math.max(0,-(-a*i+o)),h=u>0?-i:Math.min(Math.max(-i,-s),i),f=-u*u+h*(h+2*s)+l):h<=d?(u=0,h=Math.min(Math.max(-i,-s),i),f=h*(h+2*s)+l):(u=Math.max(0,-(a*i+o)),h=u>0?i:Math.min(Math.max(-i,-s),i),f=-u*u+h*(h+2*s)+l);else h=a>0?-i:i,u=Math.max(0,-(a*h+o)),f=-u*u+h*(h+2*s)+l;return r&&r.copy(this.origin).addScaledVector(this.direction,u),n&&n.copy(Qn).addScaledVector(jn,h),f}intersectSphere(t,e){Vn.subVectors(t.center,this.origin);const r=Vn.dot(this.direction),n=Vn.dot(Vn)-r*r,i=t.radius*t.radius;if(n>i)return null;const a=Math.sqrt(i-n),o=r-a,s=r+a;return s<0?null:o<0?this.at(s,e):this.at(o,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;const r=-(this.origin.dot(t.normal)+t.constant)/e;return r>=0?r:null}intersectPlane(t,e){const r=this.distanceToPlane(t);return null===r?null:this.at(r,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let r,n,i,a,o,s;const l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,h=this.origin;return l>=0?(r=(t.min.x-h.x)*l,n=(t.max.x-h.x)*l):(r=(t.max.x-h.x)*l,n=(t.min.x-h.x)*l),c>=0?(i=(t.min.y-h.y)*c,a=(t.max.y-h.y)*c):(i=(t.max.y-h.y)*c,a=(t.min.y-h.y)*c),r>a||i>n?null:((i>r||isNaN(r))&&(r=i),(a=0?(o=(t.min.z-h.z)*u,s=(t.max.z-h.z)*u):(o=(t.max.z-h.z)*u,s=(t.min.z-h.z)*u),r>s||o>n?null:((o>r||r!=r)&&(r=o),(s=0?r:n,e)))}intersectsBox(t){return null!==this.intersectBox(t,Vn)}intersectTriangle(t,e,r,n,i){Hn.subVectors(e,t),Xn.subVectors(r,t),qn.crossVectors(Hn,Xn);let a,o=this.direction.dot(qn);if(o>0){if(n)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Wn.subVectors(this.origin,t);const s=a*this.direction.dot(Xn.crossVectors(Wn,Xn));if(s<0)return null;const l=a*this.direction.dot(Hn.cross(Wn));if(l<0)return null;if(s+l>o)return null;const c=-a*Wn.dot(qn);return c<0?null:this.at(c/o,i)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Jn{constructor(t,e,r,n,i,a,o,s,l,c,u,h,f,d,p,m){Jn.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==t&&this.set(t,e,r,n,i,a,o,s,l,c,u,h,f,d,p,m)}set(t,e,r,n,i,a,o,s,l,c,u,h,f,d,p,m){const A=this.elements;return A[0]=t,A[4]=e,A[8]=r,A[12]=n,A[1]=i,A[5]=a,A[9]=o,A[13]=s,A[2]=l,A[6]=c,A[10]=u,A[14]=h,A[3]=f,A[7]=d,A[11]=p,A[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Jn).fromArray(this.elements)}copy(t){const e=this.elements,r=t.elements;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],this}copyPosition(t){const e=this.elements,r=t.elements;return e[12]=r[12],e[13]=r[13],e[14]=r[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,r){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(t,e,r){return this.set(t.x,e.x,r.x,0,t.y,e.y,r.y,0,t.z,e.z,r.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,r=t.elements,n=1/Kn.setFromMatrixColumn(t,0).length(),i=1/Kn.setFromMatrixColumn(t,1).length(),a=1/Kn.setFromMatrixColumn(t,2).length();return e[0]=r[0]*n,e[1]=r[1]*n,e[2]=r[2]*n,e[3]=0,e[4]=r[4]*i,e[5]=r[5]*i,e[6]=r[6]*i,e[7]=0,e[8]=r[8]*a,e[9]=r[9]*a,e[10]=r[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,r=t.x,n=t.y,i=t.z,a=Math.cos(r),o=Math.sin(r),s=Math.cos(n),l=Math.sin(n),c=Math.cos(i),u=Math.sin(i);if("XYZ"===t.order){const t=a*c,r=a*u,n=o*c,i=o*u;e[0]=s*c,e[4]=-s*u,e[8]=l,e[1]=r+n*l,e[5]=t-i*l,e[9]=-o*s,e[2]=i-t*l,e[6]=n+r*l,e[10]=a*s}else if("YXZ"===t.order){const t=s*c,r=s*u,n=l*c,i=l*u;e[0]=t+i*o,e[4]=n*o-r,e[8]=a*l,e[1]=a*u,e[5]=a*c,e[9]=-o,e[2]=r*o-n,e[6]=i+t*o,e[10]=a*s}else if("ZXY"===t.order){const t=s*c,r=s*u,n=l*c,i=l*u;e[0]=t-i*o,e[4]=-a*u,e[8]=n+r*o,e[1]=r+n*o,e[5]=a*c,e[9]=i-t*o,e[2]=-a*l,e[6]=o,e[10]=a*s}else if("ZYX"===t.order){const t=a*c,r=a*u,n=o*c,i=o*u;e[0]=s*c,e[4]=n*l-r,e[8]=t*l+i,e[1]=s*u,e[5]=i*l+t,e[9]=r*l-n,e[2]=-l,e[6]=o*s,e[10]=a*s}else if("YZX"===t.order){const t=a*s,r=a*l,n=o*s,i=o*l;e[0]=s*c,e[4]=i-t*u,e[8]=n*u+r,e[1]=u,e[5]=a*c,e[9]=-o*c,e[2]=-l*c,e[6]=r*u+n,e[10]=t-i*u}else if("XZY"===t.order){const t=a*s,r=a*l,n=o*s,i=o*l;e[0]=s*c,e[4]=-u,e[8]=l*c,e[1]=t*u+i,e[5]=a*c,e[9]=r*u-n,e[2]=n*u-r,e[6]=o*c,e[10]=i*u+t}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(ti,t,ei)}lookAt(t,e,r){const n=this.elements;return ii.subVectors(t,e),0===ii.lengthSq()&&(ii.z=1),ii.normalize(),ri.crossVectors(r,ii),0===ri.lengthSq()&&(1===Math.abs(r.z)?ii.x+=1e-4:ii.z+=1e-4,ii.normalize(),ri.crossVectors(r,ii)),ri.normalize(),ni.crossVectors(ii,ri),n[0]=ri.x,n[4]=ni.x,n[8]=ii.x,n[1]=ri.y,n[5]=ni.y,n[9]=ii.y,n[2]=ri.z,n[6]=ni.z,n[10]=ii.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const r=t.elements,n=e.elements,i=this.elements,a=r[0],o=r[4],s=r[8],l=r[12],c=r[1],u=r[5],h=r[9],f=r[13],d=r[2],p=r[6],m=r[10],A=r[14],g=r[3],v=r[7],y=r[11],b=r[15],x=n[0],w=n[4],_=n[8],E=n[12],M=n[1],S=n[5],C=n[9],T=n[13],I=n[2],R=n[6],B=n[10],k=n[14],L=n[3],P=n[7],D=n[11],U=n[15];return i[0]=a*x+o*M+s*I+l*L,i[4]=a*w+o*S+s*R+l*P,i[8]=a*_+o*C+s*B+l*D,i[12]=a*E+o*T+s*k+l*U,i[1]=c*x+u*M+h*I+f*L,i[5]=c*w+u*S+h*R+f*P,i[9]=c*_+u*C+h*B+f*D,i[13]=c*E+u*T+h*k+f*U,i[2]=d*x+p*M+m*I+A*L,i[6]=d*w+p*S+m*R+A*P,i[10]=d*_+p*C+m*B+A*D,i[14]=d*E+p*T+m*k+A*U,i[3]=g*x+v*M+y*I+b*L,i[7]=g*w+v*S+y*R+b*P,i[11]=g*_+v*C+y*B+b*D,i[15]=g*E+v*T+y*k+b*U,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],r=t[4],n=t[8],i=t[12],a=t[1],o=t[5],s=t[9],l=t[13],c=t[2],u=t[6],h=t[10],f=t[14];return t[3]*(+i*s*u-n*l*u-i*o*h+r*l*h+n*o*f-r*s*f)+t[7]*(+e*s*f-e*l*h+i*a*h-n*a*f+n*l*c-i*s*c)+t[11]*(+e*l*u-e*o*f-i*a*u+r*a*f+i*o*c-r*l*c)+t[15]*(-n*o*c-e*s*u+e*o*h+n*a*u-r*a*h+r*s*c)}transpose(){const t=this.elements;let e;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}setPosition(t,e,r){const n=this.elements;return t.isVector3?(n[12]=t.x,n[13]=t.y,n[14]=t.z):(n[12]=t,n[13]=e,n[14]=r),this}invert(){const t=this.elements,e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],m=t[14],A=t[15],g=u*m*l-p*h*l+p*s*f-o*m*f-u*s*A+o*h*A,v=d*h*l-c*m*l-d*s*f+a*m*f+c*s*A-a*h*A,y=c*p*l-d*u*l+d*o*f-a*p*f-c*o*A+a*u*A,b=d*u*s-c*p*s-d*o*h+a*p*h+c*o*m-a*u*m,x=e*g+r*v+n*y+i*b;if(0===x)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const w=1/x;return t[0]=g*w,t[1]=(p*h*i-u*m*i-p*n*f+r*m*f+u*n*A-r*h*A)*w,t[2]=(o*m*i-p*s*i+p*n*l-r*m*l-o*n*A+r*s*A)*w,t[3]=(u*s*i-o*h*i-u*n*l+r*h*l+o*n*f-r*s*f)*w,t[4]=v*w,t[5]=(c*m*i-d*h*i+d*n*f-e*m*f-c*n*A+e*h*A)*w,t[6]=(d*s*i-a*m*i-d*n*l+e*m*l+a*n*A-e*s*A)*w,t[7]=(a*h*i-c*s*i+c*n*l-e*h*l-a*n*f+e*s*f)*w,t[8]=y*w,t[9]=(d*u*i-c*p*i-d*r*f+e*p*f+c*r*A-e*u*A)*w,t[10]=(a*p*i-d*o*i+d*r*l-e*p*l-a*r*A+e*o*A)*w,t[11]=(c*o*i-a*u*i-c*r*l+e*u*l+a*r*f-e*o*f)*w,t[12]=b*w,t[13]=(c*p*n-d*u*n+d*r*h-e*p*h-c*r*m+e*u*m)*w,t[14]=(d*o*n-a*p*n-d*r*s+e*p*s+a*r*m-e*o*m)*w,t[15]=(a*u*n-c*o*n+c*r*s-e*u*s-a*r*h+e*o*h)*w,this}scale(t){const e=this.elements,r=t.x,n=t.y,i=t.z;return e[0]*=r,e[4]*=n,e[8]*=i,e[1]*=r,e[5]*=n,e[9]*=i,e[2]*=r,e[6]*=n,e[10]*=i,e[3]*=r,e[7]*=n,e[11]*=i,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,r,n))}makeTranslation(t,e,r){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,r,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),r=Math.sin(t);return this.set(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const r=Math.cos(e),n=Math.sin(e),i=1-r,a=t.x,o=t.y,s=t.z,l=i*a,c=i*o;return this.set(l*a+r,l*o-n*s,l*s+n*o,0,l*o+n*s,c*o+r,c*s-n*a,0,l*s-n*o,c*s+n*a,i*s*s+r,0,0,0,0,1),this}makeScale(t,e,r){return this.set(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1),this}makeShear(t,e,r,n,i,a){return this.set(1,r,i,0,t,1,a,0,e,n,1,0,0,0,0,1),this}compose(t,e,r){const n=this.elements,i=e._x,a=e._y,o=e._z,s=e._w,l=i+i,c=a+a,u=o+o,h=i*l,f=i*c,d=i*u,p=a*c,m=a*u,A=o*u,g=s*l,v=s*c,y=s*u,b=r.x,x=r.y,w=r.z;return n[0]=(1-(p+A))*b,n[1]=(f+y)*b,n[2]=(d-v)*b,n[3]=0,n[4]=(f-y)*x,n[5]=(1-(h+A))*x,n[6]=(m+g)*x,n[7]=0,n[8]=(d+v)*w,n[9]=(m-g)*w,n[10]=(1-(h+p))*w,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this}decompose(t,e,r){const n=this.elements;let i=Kn.set(n[0],n[1],n[2]).length();const a=Kn.set(n[4],n[5],n[6]).length(),o=Kn.set(n[8],n[9],n[10]).length();this.determinant()<0&&(i=-i),t.x=n[12],t.y=n[13],t.z=n[14],$n.copy(this);const s=1/i,l=1/a,c=1/o;return $n.elements[0]*=s,$n.elements[1]*=s,$n.elements[2]*=s,$n.elements[4]*=l,$n.elements[5]*=l,$n.elements[6]*=l,$n.elements[8]*=c,$n.elements[9]*=c,$n.elements[10]*=c,e.setFromRotationMatrix($n),r.x=i,r.y=a,r.z=o,this}makePerspective(t,e,r,n,i,a,o=Sr){const s=this.elements,l=2*i/(e-t),c=2*i/(r-n),u=(e+t)/(e-t),h=(r+n)/(r-n);let f,d;if(o===Sr)f=-(a+i)/(a-i),d=-2*a*i/(a-i);else{if(o!==Cr)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);f=-a/(a-i),d=-a*i/(a-i)}return s[0]=l,s[4]=0,s[8]=u,s[12]=0,s[1]=0,s[5]=c,s[9]=h,s[13]=0,s[2]=0,s[6]=0,s[10]=f,s[14]=d,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(t,e,r,n,i,a,o=Sr){const s=this.elements,l=1/(e-t),c=1/(r-n),u=1/(a-i),h=(e+t)*l,f=(r+n)*c;let d,p;if(o===Sr)d=(a+i)*u,p=-2*u;else{if(o!==Cr)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);d=i*u,p=-1*u}return s[0]=2*l,s[4]=0,s[8]=0,s[12]=-h,s[1]=0,s[5]=2*c,s[9]=0,s[13]=-f,s[2]=0,s[6]=0,s[10]=p,s[14]=-d,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(t){const e=this.elements,r=t.elements;for(let t=0;t<16;t++)if(e[t]!==r[t])return!1;return!0}fromArray(t,e=0){for(let r=0;r<16;r++)this.elements[r]=t[r+e];return this}toArray(t=[],e=0){const r=this.elements;return t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=r[3],t[e+4]=r[4],t[e+5]=r[5],t[e+6]=r[6],t[e+7]=r[7],t[e+8]=r[8],t[e+9]=r[9],t[e+10]=r[10],t[e+11]=r[11],t[e+12]=r[12],t[e+13]=r[13],t[e+14]=r[14],t[e+15]=r[15],t}}const Kn=new xn,$n=new Jn,ti=new xn(0,0,0),ei=new xn(1,1,1),ri=new xn,ni=new xn,ii=new xn,ai=new Jn,oi=new bn;class si{constructor(t=0,e=0,r=0,n=si.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=r,this._order=n}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,r,n=this._order){return this._x=t,this._y=e,this._z=r,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,r=!0){const n=t.elements,i=n[0],a=n[4],o=n[8],s=n[1],l=n[5],c=n[9],u=n[2],h=n[6],f=n[10];switch(e){case"XYZ":this._y=Math.asin(Pr(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,f),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-Pr(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(o,f),this._z=Math.atan2(s,l)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(Pr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-u,f),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(s,i));break;case"ZYX":this._y=Math.asin(-Pr(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(h,f),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(Pr(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(o,f));break;case"XZY":this._z=Math.asin(-Pr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,l),this._y=Math.atan2(o,i)):(this._x=Math.atan2(-c,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===r&&this._onChangeCallback(),this}setFromQuaternion(t,e,r){return ai.makeRotationFromQuaternion(t),this.setFromRotationMatrix(ai,e,r)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return oi.setFromEuler(this),this.setFromQuaternion(oi,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}si.DEFAULT_ORDER="XYZ";class li{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<1){for(let t=0;t1){for(let t=0;t0&&(r=r.concat(i))}return r}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(pi,t,mi),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(pi,Ai,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);const e=this.children;for(let r=0,n=e.length;r0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(n.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(n.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=i(t.geometries,this.geometry);const e=this.geometry.parameters;if(void 0!==e&&void 0!==e.shapes){const r=e.shapes;if(Array.isArray(r))for(let e=0,n=r.length;e0){n.children=[];for(let e=0;e0){n.animations=[];for(let e=0;e0&&(r.geometries=e),n.length>0&&(r.materials=n),i.length>0&&(r.textures=i),o.length>0&&(r.images=o),s.length>0&&(r.shapes=s),l.length>0&&(r.skeletons=l),c.length>0&&(r.animations=c),u.length>0&&(r.nodes=u)}return r.object=n,r;function a(t){const e=[];for(const r in t){const n=t[r];delete n.metadata,e.push(n)}return e}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e0?n.multiplyScalar(1/Math.sqrt(i)):n.set(0,0,0)}static getBarycoord(t,e,r,n,i){_i.subVectors(n,e),Ei.subVectors(r,e),Mi.subVectors(t,e);const a=_i.dot(_i),o=_i.dot(Ei),s=_i.dot(Mi),l=Ei.dot(Ei),c=Ei.dot(Mi),u=a*l-o*o;if(0===u)return i.set(-2,-1,-1);const h=1/u,f=(l*s-o*c)*h,d=(a*c-o*s)*h;return i.set(1-f-d,d,f)}static containsPoint(t,e,r,n){return this.getBarycoord(t,e,r,n,Si),Si.x>=0&&Si.y>=0&&Si.x+Si.y<=1}static getUV(t,e,r,n,i,a,o,s){return!1===Li&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Li=!0),this.getInterpolation(t,e,r,n,i,a,o,s)}static getInterpolation(t,e,r,n,i,a,o,s){return this.getBarycoord(t,e,r,n,Si),s.setScalar(0),s.addScaledVector(i,Si.x),s.addScaledVector(a,Si.y),s.addScaledVector(o,Si.z),s}static isFrontFacing(t,e,r,n){return _i.subVectors(r,e),Ei.subVectors(t,e),_i.cross(Ei).dot(n)<0}set(t,e,r){return this.a.copy(t),this.b.copy(e),this.c.copy(r),this}setFromPointsAndIndices(t,e,r,n){return this.a.copy(t[e]),this.b.copy(t[r]),this.c.copy(t[n]),this}setFromAttributeAndIndices(t,e,r,n){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,r),this.c.fromBufferAttribute(t,n),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return _i.subVectors(this.c,this.b),Ei.subVectors(this.a,this.b),.5*_i.cross(Ei).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Pi.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Pi.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,r,n,i){return!1===Li&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Li=!0),Pi.getInterpolation(t,this.a,this.b,this.c,e,r,n,i)}getInterpolation(t,e,r,n,i){return Pi.getInterpolation(t,this.a,this.b,this.c,e,r,n,i)}containsPoint(t){return Pi.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Pi.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const r=this.a,n=this.b,i=this.c;let a,o;Ci.subVectors(n,r),Ti.subVectors(i,r),Ri.subVectors(t,r);const s=Ci.dot(Ri),l=Ti.dot(Ri);if(s<=0&&l<=0)return e.copy(r);Bi.subVectors(t,n);const c=Ci.dot(Bi),u=Ti.dot(Bi);if(c>=0&&u<=c)return e.copy(n);const h=s*u-c*l;if(h<=0&&s>=0&&c<=0)return a=s/(s-c),e.copy(r).addScaledVector(Ci,a);ki.subVectors(t,i);const f=Ci.dot(ki),d=Ti.dot(ki);if(d>=0&&f<=d)return e.copy(i);const p=f*l-s*d;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),e.copy(r).addScaledVector(Ti,o);const m=c*d-f*u;if(m<=0&&u-c>=0&&f-d>=0)return Ii.subVectors(i,n),o=(u-c)/(u-c+(f-d)),e.copy(n).addScaledVector(Ii,o);const A=1/(m+p+h);return a=p*A,o=h*A,e.copy(r).addScaledVector(Ci,a).addScaledVector(Ti,o)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}let Di=0;class Ui extends Tr{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Di++}),this.uuid=Lr(),this.name="",this.type="Material",this.blending=y,this.side=p,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=L,this.blendDst=P,this.blendEquation=E,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=V,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=ar,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=je,this.stencilZFail=je,this.stencilZPass=je,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(const e in t){const r=t[e];if(void 0===r){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}const n=this[e];void 0!==n?n&&n.isColor?n.set(r):n&&n.isVector3&&r&&r.isVector3?n.copy(r):this[e]=r:console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`)}}toJSON(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});const r={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function n(t){const e=[];for(const r in t){const n=t[r];delete n.metadata,e.push(n)}return e}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),void 0!==this.roughness&&(r.roughness=this.roughness),void 0!==this.metalness&&(r.metalness=this.metalness),void 0!==this.sheen&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(r.shininess=this.shininess),void 0!==this.clearcoat&&(r.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(r.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(r.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),void 0!==this.anisotropy&&(r.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(t).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(t).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(t).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(t).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(t).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(r.combine=this.combine)),void 0!==this.envMapIntensity&&(r.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(r.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(r.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(r.size=this.size),null!==this.shadowSide&&(r.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==y&&(r.blending=this.blending),this.side!==p&&(r.side=this.side),this.vertexColors&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),!0===this.transparent&&(r.transparent=this.transparent),r.depthFunc=this.depthFunc,r.depthTest=this.depthTest,r.depthWrite=this.depthWrite,r.colorWrite=this.colorWrite,r.stencilWrite=this.stencilWrite,r.stencilWriteMask=this.stencilWriteMask,r.stencilFunc=this.stencilFunc,r.stencilRef=this.stencilRef,r.stencilFuncMask=this.stencilFuncMask,r.stencilFail=this.stencilFail,r.stencilZFail=this.stencilZFail,r.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(r.rotation=this.rotation),!0===this.polygonOffset&&(r.polygonOffset=!0),0!==this.polygonOffsetFactor&&(r.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(r.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(r.linewidth=this.linewidth),void 0!==this.dashSize&&(r.dashSize=this.dashSize),void 0!==this.gapSize&&(r.gapSize=this.gapSize),void 0!==this.scale&&(r.scale=this.scale),!0===this.dithering&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),!0===this.alphaHash&&(r.alphaHash=this.alphaHash),!0===this.alphaToCoverage&&(r.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(r.premultipliedAlpha=this.premultipliedAlpha),!0===this.forceSinglePass&&(r.forceSinglePass=this.forceSinglePass),!0===this.wireframe&&(r.wireframe=this.wireframe),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(r.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(r.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(r.flatShading=this.flatShading),!1===this.visible&&(r.visible=!1),!1===this.toneMapped&&(r.toneMapped=!1),!1===this.fog&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData),e){const e=n(t.textures),i=n(t.images);e.length>0&&(r.textures=e),i.length>0&&(r.images=i)}return r}clone(){return(new this.constructor).copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let r=null;if(null!==e){const t=e.length;r=new Array(t);for(let n=0;n!==t;++n)r[n]=e[n].clone()}return this.clippingPlanes=r,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}}const Oi={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},Fi={h:0,s:0,l:0},Ni={h:0,s:0,l:0};function zi(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+6*(e-t)*(2/3-r):t}class Gi{constructor(t,e,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,r)}set(t,e,r){if(void 0===e&&void 0===r){const e=t;e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e)}else this.setRGB(t,e,r);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=Ge){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,an.toWorkingColorSpace(this,e),this}setRGB(t,e,r,n=an.workingColorSpace){return this.r=t,this.g=e,this.b=r,an.toWorkingColorSpace(this,n),this}setHSL(t,e,r,n=an.workingColorSpace){if(t=Dr(t,1),e=Pr(e,0,1),r=Pr(r,0,1),0===e)this.r=this.g=this.b=r;else{const n=r<=.5?r*(1+e):r+e-r*e,i=2*r-n;this.r=zi(i,n,t+1/3),this.g=zi(i,n,t),this.b=zi(i,n,t-1/3)}return an.toWorkingColorSpace(this,n),this}setStyle(t,e=Ge){function r(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(t)){let i;const a=n[1],o=n[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,e);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,e);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(t)){const r=n[1],i=r.length;if(3===i)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,e);if(6===i)return this.setHex(parseInt(r,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=Ge){const r=Oi[t.toLowerCase()];return void 0!==r?this.setHex(r,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=Kr(t.r),this.g=Kr(t.g),this.b=Kr(t.b),this}copyLinearToSRGB(t){return this.r=$r(t.r),this.g=$r(t.g),this.b=$r(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Ge){return an.fromWorkingColorSpace(Zi.copy(this),t),65536*Math.round(Pr(255*Zi.r,0,255))+256*Math.round(Pr(255*Zi.g,0,255))+Math.round(Pr(255*Zi.b,0,255))}getHexString(t=Ge){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=an.workingColorSpace){an.fromWorkingColorSpace(Zi.copy(this),e);const r=Zi.r,n=Zi.g,i=Zi.b,a=Math.max(r,n,i),o=Math.min(r,n,i);let s,l;const c=(o+a)/2;if(o===a)s=0,l=0;else{const t=a-o;switch(l=c<=.5?t/(a+o):t/(2-a-o),a){case r:s=(n-i)/t+(n>-e-14,n[256|t]=1024>>-e-14|32768,i[t]=-e-1,i[256|t]=-e-1):e<=15?(n[t]=e+15<<10,n[256|t]=e+15<<10|32768,i[t]=13,i[256|t]=13):e<128?(n[t]=31744,n[256|t]=64512,i[t]=24,i[256|t]=24):(n[t]=31744,n[256|t]=64512,i[t]=13,i[256|t]=13)}const a=new Uint32Array(2048),o=new Uint32Array(64),s=new Uint32Array(64);for(let t=1;t<1024;++t){let e=t<<13,r=0;for(;0==(8388608&e);)e<<=1,r-=8388608;e&=-8388609,r+=947912704,a[t]=e|r}for(let t=1024;t<2048;++t)a[t]=939524096+(t-1024<<13);for(let t=1;t<31;++t)o[t]=t<<23;o[31]=1199570944,o[32]=2147483648;for(let t=33;t<63;++t)o[t]=2147483648+(t-32<<23);o[63]=3347054592;for(let t=1;t<64;++t)32!==t&&(s[t]=1024);return{floatView:e,uint32View:r,baseTable:n,shiftTable:i,mantissaTable:a,exponentTable:o,offsetTable:s}}function Wi(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Pr(t,-65504,65504),Qi.floatView[0]=t;const e=Qi.uint32View[0],r=e>>23&511;return Qi.baseTable[r]+((8388607&e)>>Qi.shiftTable[r])}function Hi(t){const e=t>>10;return Qi.uint32View[0]=Qi.mantissaTable[Qi.offsetTable[e]+(1023&t)]+Qi.exponentTable[e],Qi.floatView[0]}const Xi={toHalfFloat:Wi,fromHalfFloat:Hi},qi=new xn,Yi=new Vr;class Ji{constructor(t,e,r=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=r,this.usage=pr,this.updateRange={offset:0,count:-1},this.gpuType=Tt,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,r){t*=this.itemSize,r*=e.itemSize;for(let n=0,i=this.itemSize;n0&&(t.userData=this.userData),void 0!==this.parameters){const e=this.parameters;for(const r in e)void 0!==e[r]&&(t[r]=e[r]);return t}t.data={attributes:{}};const e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const r=this.attributes;for(const e in r){const n=r[e];t.data.attributes[e]=n.toJSON(t.data)}const n={};let i=!1;for(const e in this.morphAttributes){const r=this.morphAttributes[e],a=[];for(let e=0,n=r.length;e0&&(n[e]=a,i=!0)}i&&(t.data.morphAttributes=n,t.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(t.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return null!==o&&(t.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),t}clone(){return(new this.constructor).copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const r=t.index;null!==r&&this.setIndex(r.clone(e));const n=t.attributes;for(const t in n){const r=n[t];this.setAttribute(t,r.clone(e))}const i=t.morphAttributes;for(const t in i){const r=[],n=i[t];for(let t=0,i=n.length;t0){const r=t[e[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=r.length;t(t.far-t.near)**2)return}Aa.copy(i).invert(),ga.copy(t.ray).applyMatrix4(Aa),null!==r.boundingBox&&!1===ga.intersectsBox(r.boundingBox)||this._computeIntersections(t,e,ga)}}_computeIntersections(t,e,r){let n;const i=this.geometry,a=this.material,o=i.index,s=i.attributes.position,l=i.attributes.uv,c=i.attributes.uv1,u=i.attributes.normal,h=i.groups,f=i.drawRange;if(null!==o)if(Array.isArray(a))for(let i=0,s=h.length;ir.far?null:{distance:c,point:ka.clone(),object:t}}(t,e,r,n,ba,xa,wa,Ba);if(u){i&&(Ma.fromBufferAttribute(i,s),Sa.fromBufferAttribute(i,l),Ca.fromBufferAttribute(i,c),u.uv=Pi.getInterpolation(Ba,ba,xa,wa,Ma,Sa,Ca,new Vr)),a&&(Ma.fromBufferAttribute(a,s),Sa.fromBufferAttribute(a,l),Ca.fromBufferAttribute(a,c),u.uv1=Pi.getInterpolation(Ba,ba,xa,wa,Ma,Sa,Ca,new Vr),u.uv2=u.uv1),o&&(Ta.fromBufferAttribute(o,s),Ia.fromBufferAttribute(o,l),Ra.fromBufferAttribute(o,c),u.normal=Pi.getInterpolation(Ba,ba,xa,wa,Ta,Ia,Ra,new xn),u.normal.dot(n.direction)>0&&u.normal.multiplyScalar(-1));const t={a:s,b:l,c,normal:new xn,materialIndex:0};Pi.getNormal(ba,xa,wa,t.normal),u.face=t}return u}class Da extends ma{constructor(t=1,e=1,r=1,n=1,i=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:r,widthSegments:n,heightSegments:i,depthSegments:a};const o=this;n=Math.floor(n),i=Math.floor(i),a=Math.floor(a);const s=[],l=[],c=[],u=[];let h=0,f=0;function d(t,e,r,n,i,a,d,p,m,A,g){const v=a/m,y=d/A,b=a/2,x=d/2,w=p/2,_=m+1,E=A+1;let M=0,S=0;const C=new xn;for(let a=0;a0?1:-1,c.push(C.x,C.y,C.z),u.push(s/m),u.push(1-a/A),M+=1}}for(let t=0;t0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e.lights=this.lights,e.clipping=this.clipping;const r={};for(const t in this.extensions)!0===this.extensions[t]&&(r[t]=!0);return Object.keys(r).length>0&&(e.extensions=r),e}}class Ga extends wi{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Jn,this.projectionMatrix=new Jn,this.projectionMatrixInverse=new Jn,this.coordinateSystem=Sr}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class Za extends Ga{constructor(t=50,e=1,r=.1,n=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=r,this.far=n,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=2*kr*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Br*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*kr*Math.atan(Math.tan(.5*Br*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,r,n,i,a){this.aspect=t/e,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=t,this.view.fullHeight=e,this.view.offsetX=r,this.view.offsetY=n,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(.5*Br*this.fov)/this.zoom,r=2*e,n=this.aspect*r,i=-.5*n;const a=this.view;if(null!==this.view&&this.view.enabled){const t=a.fullWidth,o=a.fullHeight;i+=a.offsetX*n/t,e-=a.offsetY*r/o,n*=a.width/t,r*=a.height/o}const o=this.filmOffset;0!==o&&(i+=t*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+n,e,e-r,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}const Va=-90;class Qa extends wi{constructor(t,e,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null;const n=new Za(Va,1,t,e);n.layers=this.layers,this.add(n);const i=new Za(Va,1,t,e);i.layers=this.layers,this.add(i);const a=new Za(Va,1,t,e);a.layers=this.layers,this.add(a);const o=new Za(Va,1,t,e);o.layers=this.layers,this.add(o);const s=new Za(Va,1,t,e);s.layers=this.layers,this.add(s);const l=new Za(Va,1,t,e);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const t=this.coordinateSystem,e=this.children.concat(),[r,n,i,a,o,s]=e;for(const t of e)this.remove(t);if(t===Sr)r.up.set(0,1,0),r.lookAt(1,0,0),n.up.set(0,1,0),n.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),s.up.set(0,1,0),s.lookAt(0,0,-1);else{if(t!==Cr)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);r.up.set(0,-1,0),r.lookAt(-1,0,0),n.up.set(0,-1,0),n.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),s.up.set(0,-1,0),s.lookAt(0,0,-1)}for(const t of e)this.add(t),t.updateMatrixWorld()}update(t,e){null===this.parent&&this.updateMatrixWorld();const r=this.renderTarget;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[n,i,a,o,s,l]=this.children,c=t.getRenderTarget(),u=t.toneMapping,h=t.xr.enabled;t.toneMapping=J,t.xr.enabled=!1;const f=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,t.setRenderTarget(r,0),t.render(e,n),t.setRenderTarget(r,1),t.render(e,i),t.setRenderTarget(r,2),t.render(e,a),t.setRenderTarget(r,3),t.render(e,o),t.setRenderTarget(r,4),t.render(e,s),r.texture.generateMipmaps=f,t.setRenderTarget(r,5),t.render(e,l),t.setRenderTarget(c),t.toneMapping=u,t.xr.enabled=h,r.texture.needsPMREMUpdate=!0}}class ja extends fn{constructor(t,e,r,n,i,a,o,s,l,c){super(t=void 0!==t?t:[],e=void 0!==e?e:it,r,n,i,a,o,s,l,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class Wa extends pn{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const r={width:t,height:t,depth:1},n=[r,r,r,r,r,r];void 0!==e.encoding&&(Jr("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),e.colorSpace=e.encoding===De?Ge:ze),this.texture=new ja(n,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:gt}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.colorSpace=e.colorSpace,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const r={tEquirect:{value:null}},n="\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 \n\t\t\t\t\t#include \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 \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 Da(5,5,5),o=new za({name:"CubemapFromEquirect",uniforms:Ua(r),vertexShader:n,fragmentShader:i,side:m,blending:v});o.uniforms.tEquirect.value=e;const s=new La(a,o),l=e.minFilter;return e.minFilter===bt&&(e.minFilter=gt),new Qa(1,10,this).update(t,s),e.minFilter=l,s.geometry.dispose(),s.material.dispose(),this}clear(t,e,r,n){const i=t.getRenderTarget();for(let i=0;i<6;i++)t.setRenderTarget(this,i),t.clear(e,r,n);t.setRenderTarget(i)}}const Ha=new xn,Xa=new xn,qa=new Qr;class Ya{constructor(t=new xn(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,r,n){return this.normal.set(t,e,r),this.constant=n,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,r){const n=Ha.subVectors(r,e).cross(Xa.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(n,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const r=t.delta(Ha),n=this.normal.dot(r);if(0===n)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const i=-(t.start.dot(this.normal)+this.constant)/n;return i<0||i>1?null:e.copy(t.start).addScaledVector(r,i)}intersectsLine(t){const e=this.distanceToPoint(t.start),r=this.distanceToPoint(t.end);return e<0&&r>0||r<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const r=e||qa.getNormalMatrix(t),n=this.coplanarPoint(Ha).applyMatrix4(t),i=this.normal.applyMatrix3(r).normalize();return this.constant=-n.dot(i),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const Ja=new Zn,Ka=new xn;class $a{constructor(t=new Ya,e=new Ya,r=new Ya,n=new Ya,i=new Ya,a=new Ya){this.planes=[t,e,r,n,i,a]}set(t,e,r,n,i,a){const o=this.planes;return o[0].copy(t),o[1].copy(e),o[2].copy(r),o[3].copy(n),o[4].copy(i),o[5].copy(a),this}copy(t){const e=this.planes;for(let r=0;r<6;r++)e[r].copy(t.planes[r]);return this}setFromProjectionMatrix(t,e=Sr){const r=this.planes,n=t.elements,i=n[0],a=n[1],o=n[2],s=n[3],l=n[4],c=n[5],u=n[6],h=n[7],f=n[8],d=n[9],p=n[10],m=n[11],A=n[12],g=n[13],v=n[14],y=n[15];if(r[0].setComponents(s-i,h-l,m-f,y-A).normalize(),r[1].setComponents(s+i,h+l,m+f,y+A).normalize(),r[2].setComponents(s+a,h+c,m+d,y+g).normalize(),r[3].setComponents(s-a,h-c,m-d,y-g).normalize(),r[4].setComponents(s-o,h-u,m-p,y-v).normalize(),e===Sr)r[5].setComponents(s+o,h+u,m+p,y+v).normalize();else{if(e!==Cr)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);r[5].setComponents(o,u,p,v).normalize()}return this}intersectsObject(t){if(void 0!==t.boundingSphere)null===t.boundingSphere&&t.computeBoundingSphere(),Ja.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),Ja.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(Ja)}intersectsSprite(t){return Ja.center.set(0,0,0),Ja.radius=.7071067811865476,Ja.applyMatrix4(t.matrixWorld),this.intersectsSphere(Ja)}intersectsSphere(t){const e=this.planes,r=t.center,n=-t.radius;for(let t=0;t<6;t++)if(e[t].distanceToPoint(r)0?t.max.x:t.min.x,Ka.y=n.normal.y>0?t.max.y:t.min.y,Ka.z=n.normal.z>0?t.max.z:t.min.z,n.distanceToPoint(Ka)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let r=0;r<6;r++)if(e[r].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function to(){let t=null,e=!1,r=null,n=null;function i(e,a){r(e,a),n=t.requestAnimationFrame(i)}return{start:function(){!0!==e&&null!==r&&(n=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(t){r=t},setContext:function(e){t=e}}}function eo(t,e){const r=e.isWebGL2,n=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),n.get(t)},remove:function(e){e.isInterleavedBufferAttribute&&(e=e.data);const r=n.get(e);r&&(t.deleteBuffer(r.buffer),n.delete(e))},update:function(e,i){if(e.isGLBufferAttribute){const t=n.get(e);return void((!t||t.version 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};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\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}\nvec3 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} // validated",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, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_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:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef 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#ifdef 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\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\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, vLightMapUv );\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 ( LEGACY_LIGHTS )\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#else\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#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 USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\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, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).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, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).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_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tanisotropyV /= material.anisotropy;\n\tmaterial.anisotropy = saturate( material.anisotropy );\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x - tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x + tbn[ 0 ] * anisotropyV.y;\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\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\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}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\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 = F_Schlick( f0, f90, dotVH );\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\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.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\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\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\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_Clearcoat( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material );\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\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material );\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, vLightMapUv );\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\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometry.viewDir, geometry.normal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#endif\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\tdiffuseColor *= texture2D( map, vMapUv );\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\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\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_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\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, vMetalnessMapUv );\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 *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).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( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\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 USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.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 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\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, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\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",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\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 depth, const in float near, const in float far ) {\n\treturn depth * ( 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 depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - 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, vRoughnessMapUv );\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\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform 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\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying 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, vSpecularMapUv );\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 saturate( 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, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = 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, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.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\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\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 lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\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 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 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\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",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 \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 \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",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 \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \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 \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\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 \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#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 \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\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 \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \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 USE_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 USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\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_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \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 \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},io={common:{diffuse:{value:new Gi(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Qr},alphaMap:{value:null},alphaMapTransform:{value:new Qr},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Qr}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Qr}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Qr}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Qr},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Qr},normalScale:{value:new Vr(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Qr},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Qr}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Qr}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Qr}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Gi(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 Gi(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Qr},alphaTest:{value:0},uvTransform:{value:new Qr}},sprite:{diffuse:{value:new Gi(16777215)},opacity:{value:1},center:{value:new Vr(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Qr},alphaMap:{value:null},alphaMapTransform:{value:new Qr},alphaTest:{value:0}}},ao={basic:{uniforms:Oa([io.common,io.specularmap,io.envmap,io.aomap,io.lightmap,io.fog]),vertexShader:no.meshbasic_vert,fragmentShader:no.meshbasic_frag},lambert:{uniforms:Oa([io.common,io.specularmap,io.envmap,io.aomap,io.lightmap,io.emissivemap,io.bumpmap,io.normalmap,io.displacementmap,io.fog,io.lights,{emissive:{value:new Gi(0)}}]),vertexShader:no.meshlambert_vert,fragmentShader:no.meshlambert_frag},phong:{uniforms:Oa([io.common,io.specularmap,io.envmap,io.aomap,io.lightmap,io.emissivemap,io.bumpmap,io.normalmap,io.displacementmap,io.fog,io.lights,{emissive:{value:new Gi(0)},specular:{value:new Gi(1118481)},shininess:{value:30}}]),vertexShader:no.meshphong_vert,fragmentShader:no.meshphong_frag},standard:{uniforms:Oa([io.common,io.envmap,io.aomap,io.lightmap,io.emissivemap,io.bumpmap,io.normalmap,io.displacementmap,io.roughnessmap,io.metalnessmap,io.fog,io.lights,{emissive:{value:new Gi(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:no.meshphysical_vert,fragmentShader:no.meshphysical_frag},toon:{uniforms:Oa([io.common,io.aomap,io.lightmap,io.emissivemap,io.bumpmap,io.normalmap,io.displacementmap,io.gradientmap,io.fog,io.lights,{emissive:{value:new Gi(0)}}]),vertexShader:no.meshtoon_vert,fragmentShader:no.meshtoon_frag},matcap:{uniforms:Oa([io.common,io.bumpmap,io.normalmap,io.displacementmap,io.fog,{matcap:{value:null}}]),vertexShader:no.meshmatcap_vert,fragmentShader:no.meshmatcap_frag},points:{uniforms:Oa([io.points,io.fog]),vertexShader:no.points_vert,fragmentShader:no.points_frag},dashed:{uniforms:Oa([io.common,io.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:no.linedashed_vert,fragmentShader:no.linedashed_frag},depth:{uniforms:Oa([io.common,io.displacementmap]),vertexShader:no.depth_vert,fragmentShader:no.depth_frag},normal:{uniforms:Oa([io.common,io.bumpmap,io.normalmap,io.displacementmap,{opacity:{value:1}}]),vertexShader:no.meshnormal_vert,fragmentShader:no.meshnormal_frag},sprite:{uniforms:Oa([io.sprite,io.fog]),vertexShader:no.sprite_vert,fragmentShader:no.sprite_frag},background:{uniforms:{uvTransform:{value:new Qr},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:no.background_vert,fragmentShader:no.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:no.backgroundCube_vert,fragmentShader:no.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:no.cube_vert,fragmentShader:no.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:no.equirect_vert,fragmentShader:no.equirect_frag},distanceRGBA:{uniforms:Oa([io.common,io.displacementmap,{referencePosition:{value:new xn},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:no.distanceRGBA_vert,fragmentShader:no.distanceRGBA_frag},shadow:{uniforms:Oa([io.lights,io.fog,{color:{value:new Gi(0)},opacity:{value:1}}]),vertexShader:no.shadow_vert,fragmentShader:no.shadow_frag}};ao.physical={uniforms:Oa([ao.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Qr},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Qr},clearcoatNormalScale:{value:new Vr(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Qr},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Qr},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Qr},sheen:{value:0},sheenColor:{value:new Gi(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Qr},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Qr},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Qr},transmissionSamplerSize:{value:new Vr},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Qr},attenuationDistance:{value:0},attenuationColor:{value:new Gi(0)},specularColor:{value:new Gi(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Qr},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Qr},anisotropyVector:{value:new Vr},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Qr}}]),vertexShader:no.meshphysical_vert,fragmentShader:no.meshphysical_frag};const oo={r:0,b:0,g:0};function so(t,e,r,n,i,a,o){const s=new Gi(0);let l,c,u=!0===a?0:1,h=null,f=0,d=null;function A(e,r){e.getRGB(oo,Fa(t)),n.buffers.color.setClear(oo.r,oo.g,oo.b,r,o)}return{getClearColor:function(){return s},setClearColor:function(t,e=1){s.set(t),u=e,A(s,u)},getClearAlpha:function(){return u},setClearAlpha:function(t){u=t,A(s,u)},render:function(a,g){let v=!1,y=!0===g.isScene?g.background:null;switch(y&&y.isTexture&&(y=(g.backgroundBlurriness>0?r:e).get(y)),null===y?A(s,u):y&&y.isColor&&(A(y,1),v=!0),t.xr.getEnvironmentBlendMode()){case"opaque":v=!0;break;case"additive":n.buffers.color.setClear(0,0,0,1,o),v=!0;break;case"alpha-blend":n.buffers.color.setClear(0,0,0,0,o),v=!0}(t.autoClear||v)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),y&&(y.isCubeTexture||y.mapping===lt)?(void 0===c&&(c=new La(new Da(1,1,1),new za({name:"BackgroundCubeMaterial",uniforms:Ua(ao.backgroundCube.uniforms),vertexShader:ao.backgroundCube.vertexShader,fragmentShader:ao.backgroundCube.fragmentShader,side:m,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(t,e,r){this.matrixWorld.copyPosition(r.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(c)),c.material.uniforms.envMap.value=y,c.material.uniforms.flipEnvMap.value=y.isCubeTexture&&!1===y.isRenderTargetTexture?-1:1,c.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,c.material.toneMapped=y.colorSpace!==Ge,h===y&&f===y.version&&d===t.toneMapping||(c.material.needsUpdate=!0,h=y,f=y.version,d=t.toneMapping),c.layers.enableAll(),a.unshift(c,c.geometry,c.material,0,0,null)):y&&y.isTexture&&(void 0===l&&(l=new La(new ro(2,2),new za({name:"BackgroundMaterial",uniforms:Ua(ao.background.uniforms),vertexShader:ao.background.vertexShader,fragmentShader:ao.background.fragmentShader,side:p,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=y,l.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,l.material.toneMapped=y.colorSpace!==Ge,!0===y.matrixAutoUpdate&&y.updateMatrix(),l.material.uniforms.uvTransform.value.copy(y.matrix),h===y&&f===y.version&&d===t.toneMapping||(l.material.needsUpdate=!0,h=y,f=y.version,d=t.toneMapping),l.layers.enableAll(),a.unshift(l,l.geometry,l.material,0,0,null))}}}function lo(t,e,r,n){const i=t.getParameter(t.MAX_VERTEX_ATTRIBS),a=n.isWebGL2?null:e.get("OES_vertex_array_object"),o=n.isWebGL2||null!==a,s={},l=d(null);let c=l,u=!1;function h(e){return n.isWebGL2?t.bindVertexArray(e):a.bindVertexArrayOES(e)}function f(e){return n.isWebGL2?t.deleteVertexArray(e):a.deleteVertexArrayOES(e)}function d(t){const e=[],r=[],n=[];for(let t=0;t=0){const r=i[e];let n=a[e];if(void 0===n&&("instanceMatrix"===e&&t.instanceMatrix&&(n=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(n=t.instanceColor)),void 0===r)return!0;if(r.attribute!==n)return!0;if(n&&r.data!==n.data)return!0;o++}return c.attributesNum!==o||c.index!==n}(i,y,f,b),x&&function(t,e,r,n){const i={},a=e.attributes;let o=0;const s=r.getAttributes();for(const e in s)if(s[e].location>=0){let r=a[e];void 0===r&&("instanceMatrix"===e&&t.instanceMatrix&&(r=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(r=t.instanceColor));const n={};n.attribute=r,r&&r.data&&(n.data=r.data),i[e]=n,o++}c.attributes=i,c.attributesNum=o,c.index=n}(i,y,f,b)}else{const t=!0===l.wireframe;c.geometry===y.id&&c.program===f.id&&c.wireframe===t||(c.geometry=y.id,c.program=f.id,c.wireframe=t,x=!0)}null!==b&&r.update(b,t.ELEMENT_ARRAY_BUFFER),(x||u)&&(u=!1,function(i,a,o,s){if(!1===n.isWebGL2&&(i.isInstancedMesh||s.isInstancedBufferGeometry)&&null===e.get("ANGLE_instanced_arrays"))return;p();const l=s.attributes,c=o.getAttributes(),u=a.defaultAttributeValues;for(const e in c){const a=c[e];if(a.location>=0){let o=l[e];if(void 0===o&&("instanceMatrix"===e&&i.instanceMatrix&&(o=i.instanceMatrix),"instanceColor"===e&&i.instanceColor&&(o=i.instanceColor)),void 0!==o){const e=o.normalized,l=o.itemSize,c=r.get(o);if(void 0===c)continue;const u=c.buffer,h=c.type,f=c.bytesPerElement,d=!0===n.isWebGL2&&(h===t.INT||h===t.UNSIGNED_INT||o.gpuType===St);if(o.isInterleavedBufferAttribute){const r=o.data,n=r.stride,c=o.offset;if(r.isInstancedInterleavedBuffer){for(let t=0;t0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const a="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===t.constructor.name;let o=void 0!==r.precision?r.precision:"highp";const s=i(o);s!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",s,"instead."),o=s);const l=a||e.has("WEBGL_draw_buffers"),c=!0===r.logarithmicDepthBuffer,u=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),f=t.getParameter(t.MAX_TEXTURE_SIZE),d=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),m=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),A=t.getParameter(t.MAX_VARYING_VECTORS),g=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=h>0,y=a||e.has("OES_texture_float");return{isWebGL2:a,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==n)return n;if(!0===e.has("EXT_texture_filter_anisotropic")){const r=e.get("EXT_texture_filter_anisotropic");n=t.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else n=0;return n},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:h,maxTextureSize:f,maxCubemapSize:d,maxAttributes:p,maxVertexUniforms:m,maxVaryings:A,maxFragmentUniforms:g,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:a?t.getParameter(t.MAX_SAMPLES):0}}function ho(t){const e=this;let r=null,n=0,i=!1,a=!1;const o=new Ya,s=new Qr,l={value:null,needsUpdate:!1};function c(t,r,n,i){const a=null!==t?t.length:0;let c=null;if(0!==a){if(c=l.value,!0!==i||null===c){const e=n+4*a,i=r.matrixWorldInverse;s.getNormalMatrix(i),(null===c||c.length0),e.numPlanes=n,e.numIntersection=0);else{const t=a?0:n,e=4*t;let i=p.clippingState||null;l.value=i,i=c(h,s,e,u);for(let t=0;t!==e;++t)i[t]=r[t];p.clippingState=i,this.numIntersection=f?this.numPlanes:0,this.numPlanes+=t}}}function fo(t){let e=new WeakMap;function r(t,e){return e===ot?t.mapping=it:e===st&&(t.mapping=at),t}function n(t){const r=t.target;r.removeEventListener("dispose",n);const i=e.get(r);void 0!==i&&(e.delete(r),i.dispose())}return{get:function(i){if(i&&i.isTexture&&!1===i.isRenderTargetTexture){const a=i.mapping;if(a===ot||a===st){if(e.has(i))return r(e.get(i).texture,i.mapping);{const a=i.image;if(a&&a.height>0){const o=new Wa(a.height/2);return o.fromEquirectangularTexture(t,i),e.set(i,o),i.addEventListener("dispose",n),r(o.texture,i.mapping)}return null}}}return i},dispose:function(){e=new WeakMap}}}class po extends Ga{constructor(t=-1,e=1,r=1,n=-1,i=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=r,this.bottom=n,this.near=i,this.far=a,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this}setViewOffset(t,e,r,n,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=t,this.view.fullHeight=e,this.view.offsetX=r,this.view.offsetY=n,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,n=(this.top+this.bottom)/2;let i=r-t,a=r+t,o=n+e,s=n-e;if(null!==this.view&&this.view.enabled){const t=(this.right-this.left)/this.view.fullWidth/this.zoom,e=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=t*this.view.offsetX,a=i+t*this.view.width,o-=e*this.view.offsetY,s=o-e*this.view.height}this.projectionMatrix.makeOrthographic(i,a,o,s,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}const mo=[.125,.215,.35,.446,.526,.582],Ao=new po,go=new Gi;let vo=null;const yo=(1+Math.sqrt(5))/2,bo=1/yo,xo=[new xn(1,1,1),new xn(-1,1,1),new xn(1,1,-1),new xn(-1,1,-1),new xn(0,yo,bo),new xn(0,yo,-bo),new xn(bo,0,yo),new xn(-bo,0,yo),new xn(yo,bo,0),new xn(-yo,bo,0)];class wo{constructor(t){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)}fromScene(t,e=0,r=.1,n=100){vo=this._renderer.getRenderTarget(),this._setSize(256);const i=this._allocateTargets();return i.depthBuffer=!0,this._sceneToCubeUV(t,r,n,i),e>0&&this._blur(i,0,0,e),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=So(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=Mo(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let t=0;tt-4?s=mo[o-t+4-1]:0===o&&(s=0),n.push(s);const l=1/(a-2),c=-l,u=1+l,h=[c,c,u,c,u,u,c,c,u,u,c,u],f=6,d=6,p=3,m=2,A=1,g=new Float32Array(p*d*f),v=new Float32Array(m*d*f),y=new Float32Array(A*d*f);for(let t=0;t2?0:-1,n=[e,r,0,e+2/3,r,0,e+2/3,r+1,0,e,r,0,e+2/3,r+1,0,e,r+1,0];g.set(n,p*d*t),v.set(h,m*d*t);const i=[t,t,t,t,t,t];y.set(i,A*d*t)}const b=new ma;b.setAttribute("position",new Ji(g,p)),b.setAttribute("uv",new Ji(v,m)),b.setAttribute("faceIndex",new Ji(y,A)),e.push(b),i>4&&i--}return{lodPlanes:e,sizeLods:r,sigmas:n}}(n)),this._blurMaterial=function(t,e,r){const n=new Float32Array(20),i=new xn(0,1,0);return new za({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/r,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},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 \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:v,depthTest:!1,depthWrite:!1})}(n,t,e)}return n}_compileMaterial(t){const e=new La(this._lodPlanes[0],t);this._renderer.compile(e,Ao)}_sceneToCubeUV(t,e,r,n){const i=new Za(90,1,e,r),a=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],s=this._renderer,l=s.autoClear,c=s.toneMapping;s.getClearColor(go),s.toneMapping=J,s.autoClear=!1;const u=new Vi({name:"PMREM.Background",side:m,depthWrite:!1,depthTest:!1}),h=new La(new Da,u);let f=!1;const d=t.background;d?d.isColor&&(u.color.copy(d),t.background=null,f=!0):(u.color.copy(go),f=!0);for(let e=0;e<6;e++){const r=e%3;0===r?(i.up.set(0,a[e],0),i.lookAt(o[e],0,0)):1===r?(i.up.set(0,0,a[e]),i.lookAt(0,o[e],0)):(i.up.set(0,a[e],0),i.lookAt(0,0,o[e]));const l=this._cubeSize;Eo(n,r*l,e>2?l:0,l,l),s.setRenderTarget(n),f&&s.render(h,i),s.render(t,i)}h.geometry.dispose(),h.material.dispose(),s.toneMapping=c,s.autoClear=l,t.background=d}_textureToCubeUV(t,e){const r=this._renderer,n=t.mapping===it||t.mapping===at;n?(null===this._cubemapMaterial&&(this._cubemapMaterial=So()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=Mo());const i=n?this._cubemapMaterial:this._equirectMaterial,a=new La(this._lodPlanes[0],i);i.uniforms.envMap.value=t;const o=this._cubeSize;Eo(e,0,0,3*o,2*o),r.setRenderTarget(e),r.render(a,Ao)}_applyPMREM(t){const e=this._renderer,r=e.autoClear;e.autoClear=!1;for(let e=1;e20&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${p} samples when the maximum is set to 20`);const m=[];let A=0;for(let t=0;t<20;++t){const e=t/d,r=Math.exp(-e*e/2);m.push(r),0===t?A+=r:tg-4?n-g+4:0),4*(this._cubeSize-v),3*v,2*v),s.setRenderTarget(e),s.render(c,Ao)}}function _o(t,e,r){const n=new pn(t,e,r);return n.texture.mapping=lt,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function Eo(t,e,r,n,i){t.viewport.set(e,r,n,i),t.scissor.set(e,r,n,i)}function Mo(){return new za({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 \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:v,depthTest:!1,depthWrite:!1})}function So(){return new za({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:v,depthTest:!1,depthWrite:!1})}function Co(t){let e=new WeakMap,r=null;function n(t){const r=t.target;r.removeEventListener("dispose",n);const i=e.get(r);void 0!==i&&(e.delete(r),i.dispose())}return{get:function(i){if(i&&i.isTexture){const a=i.mapping,o=a===ot||a===st,s=a===it||a===at;if(o||s){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;let n=e.get(i);return null===r&&(r=new wo(t)),n=o?r.fromEquirectangular(i,n):r.fromCubemap(i,n),e.set(i,n),n.texture}if(e.has(i))return e.get(i).texture;{const a=i.image;if(o&&a&&a.height>0||s&&a&&function(t){let e=0;for(let r=0;r<6;r++)void 0!==t[r]&&e++;return 6===e}(a)){null===r&&(r=new wo(t));const a=o?r.fromEquirectangular(i):r.fromCubemap(i);return e.set(i,a),i.addEventListener("dispose",n),a.texture}return null}}}return i},dispose:function(){e=new WeakMap,null!==r&&(r.dispose(),r=null)}}}function To(t){const e={};function r(r){if(void 0!==e[r])return e[r];let n;switch(r){case"WEBGL_depth_texture":n=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=t.getExtension(r)}return e[r]=n,n}return{has:function(t){return null!==r(t)},init:function(t){t.isWebGL2?r("EXT_color_buffer_float"):(r("WEBGL_depth_texture"),r("OES_texture_float"),r("OES_texture_half_float"),r("OES_texture_half_float_linear"),r("OES_standard_derivatives"),r("OES_element_index_uint"),r("OES_vertex_array_object"),r("ANGLE_instanced_arrays")),r("OES_texture_float_linear"),r("EXT_color_buffer_half_float"),r("WEBGL_multisampled_render_to_texture")},get:function(t){const e=r(t);return null===e&&console.warn("THREE.WebGLRenderer: "+t+" extension not supported."),e}}}function Io(t,e,r,n){const i={},a=new WeakMap;function o(t){const s=t.target;null!==s.index&&e.remove(s.index);for(const t in s.attributes)e.remove(s.attributes[t]);for(const t in s.morphAttributes){const r=s.morphAttributes[t];for(let t=0,n=r.length;te.maxTextureSize&&(M=Math.ceil(E/e.maxTextureSize),E=e.maxTextureSize);const S=new Float32Array(E*M*4*d),C=new mn(S,E,M,d);C.type=Tt,C.needsUpdate=!0;const T=4*_;for(let R=0;R0)return t;const i=e*r;let a=zo[i];if(void 0===a&&(a=new Float32Array(i),zo[i]=a),0!==e){n.toArray(a,0);for(let n=1,i=0;n!==e;++n)i+=r,t[n].toArray(a,i)}return a}function Wo(t,e){if(t.length!==e.length)return!1;for(let r=0,n=t.length;r":" "} ${i}: ${r[t]}`)}return n.join("\n")}(t.getShaderSource(e),n)}return i}function Vs(t,e){const r=function(t){switch(t){case Ze:return["Linear","( value )"];case Ge:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),["Linear","( value )"]}}(e);return"vec4 "+t+"( vec4 value ) { return LinearTo"+r[0]+r[1]+"; }"}function Qs(t,e){let r;switch(e){case K:r="Linear";break;case $:r="Reinhard";break;case tt:r="OptimizedCineon";break;case et:r="ACESFilmic";break;case rt:r="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),r="Linear"}return"vec3 "+t+"( vec3 color ) { return "+r+"ToneMapping( color ); }"}function js(t){return""!==t}function Ws(t,e){const r=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,r).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function Hs(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const Xs=/^[ \t]*#include +<([\w\d./]+)>/gm;function qs(t){return t.replace(Xs,Js)}const Ys=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function Js(t,e){let r=no[e];if(void 0===r){const t=Ys.get(e);if(void 0===t)throw new Error("Can not resolve #include <"+e+">");r=no[t],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,t)}return qs(r)}const Ks=/#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 $s(t){return t.replace(Ks,tl)}function tl(t,e,r,n){let i="";for(let t=parseInt(e);t0&&(y+="\n"),b=[A,"#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,g].filter(js).join("\n"),b.length>0&&(b+="\n")):(y=[el(r),"#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,g,r.instancing?"#define USE_INSTANCING":"",r.instancingColor?"#define USE_INSTANCING_COLOR":"",r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+u:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",r.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",r.displacementMap?"#define USE_DISPLACEMENTMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.anisotropyMap?"#define USE_ANISOTROPYMAP":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",r.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",r.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.alphaHash?"#define USE_ALPHAHASH":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",r.mapUv?"#define MAP_UV "+r.mapUv:"",r.alphaMapUv?"#define ALPHAMAP_UV "+r.alphaMapUv:"",r.lightMapUv?"#define LIGHTMAP_UV "+r.lightMapUv:"",r.aoMapUv?"#define AOMAP_UV "+r.aoMapUv:"",r.emissiveMapUv?"#define EMISSIVEMAP_UV "+r.emissiveMapUv:"",r.bumpMapUv?"#define BUMPMAP_UV "+r.bumpMapUv:"",r.normalMapUv?"#define NORMALMAP_UV "+r.normalMapUv:"",r.displacementMapUv?"#define DISPLACEMENTMAP_UV "+r.displacementMapUv:"",r.metalnessMapUv?"#define METALNESSMAP_UV "+r.metalnessMapUv:"",r.roughnessMapUv?"#define ROUGHNESSMAP_UV "+r.roughnessMapUv:"",r.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+r.anisotropyMapUv:"",r.clearcoatMapUv?"#define CLEARCOATMAP_UV "+r.clearcoatMapUv:"",r.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+r.clearcoatNormalMapUv:"",r.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+r.clearcoatRoughnessMapUv:"",r.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+r.iridescenceMapUv:"",r.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+r.iridescenceThicknessMapUv:"",r.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+r.sheenColorMapUv:"",r.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+r.sheenRoughnessMapUv:"",r.specularMapUv?"#define SPECULARMAP_UV "+r.specularMapUv:"",r.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+r.specularColorMapUv:"",r.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+r.specularIntensityMapUv:"",r.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+r.transmissionMapUv:"",r.thicknessMapUv?"#define THICKNESSMAP_UV "+r.thicknessMapUv:"",r.vertexTangents&&!1===r.flatShading?"#define USE_TANGENT":"",r.vertexColors?"#define USE_COLOR":"",r.vertexAlphas?"#define USE_COLOR_ALPHA":"",r.vertexUv1s?"#define USE_UV1":"",r.vertexUv2s?"#define USE_UV2":"",r.vertexUv3s?"#define USE_UV3":"",r.pointsUvs?"#define USE_POINTS_UV":"",r.flatShading?"#define FLAT_SHADED":"",r.skinning?"#define USE_SKINNING":"",r.morphTargets?"#define USE_MORPHTARGETS":"",r.morphNormals&&!1===r.flatShading?"#define USE_MORPHNORMALS":"",r.morphColors&&r.isWebGL2?"#define USE_MORPHCOLORS":"",r.morphTargetsCount>0&&r.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",r.morphTargetsCount>0&&r.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+r.morphTextureStride:"",r.morphTargetsCount>0&&r.isWebGL2?"#define MORPHTARGETS_COUNT "+r.morphTargetsCount:"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+l:"",r.sizeAttenuation?"#define USE_SIZEATTENUATION":"",r.useLegacyLights?"#define LEGACY_LIGHTS":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&r.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_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#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(js).join("\n"),b=[A,el(r),"#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,g,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.matcap?"#define USE_MATCAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+c:"",r.envMap?"#define "+u:"",r.envMap?"#define "+p:"",m?"#define CUBEUV_TEXEL_WIDTH "+m.texelWidth:"",m?"#define CUBEUV_TEXEL_HEIGHT "+m.texelHeight:"",m?"#define CUBEUV_MAX_MIP "+m.maxMip+".0":"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",r.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.anisotropy?"#define USE_ANISOTROPY":"",r.anisotropyMap?"#define USE_ANISOTROPYMAP":"",r.clearcoat?"#define USE_CLEARCOAT":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.iridescence?"#define USE_IRIDESCENCE":"",r.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",r.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",r.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.alphaTest?"#define USE_ALPHATEST":"",r.alphaHash?"#define USE_ALPHAHASH":"",r.sheen?"#define USE_SHEEN":"",r.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.vertexTangents&&!1===r.flatShading?"#define USE_TANGENT":"",r.vertexColors||r.instancingColor?"#define USE_COLOR":"",r.vertexAlphas?"#define USE_COLOR_ALPHA":"",r.vertexUv1s?"#define USE_UV1":"",r.vertexUv2s?"#define USE_UV2":"",r.vertexUv3s?"#define USE_UV3":"",r.pointsUvs?"#define USE_POINTS_UV":"",r.gradientMap?"#define USE_GRADIENTMAP":"",r.flatShading?"#define FLAT_SHADED":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+l:"",r.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",r.useLegacyLights?"#define LEGACY_LIGHTS":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&r.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",r.toneMapping!==J?"#define TONE_MAPPING":"",r.toneMapping!==J?no.tonemapping_pars_fragment:"",r.toneMapping!==J?Qs("toneMapping",r.toneMapping):"",r.dithering?"#define DITHERING":"",r.opaque?"#define OPAQUE":"",no.colorspace_pars_fragment,Vs("linearToOutputTexel",r.outputColorSpace),r.useDepthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(js).join("\n")),o=qs(o),o=Ws(o,r),o=Hs(o,r),s=qs(s),s=Ws(s,r),s=Hs(s,r),o=$s(o),s=$s(s),r.isWebGL2&&!0!==r.isRawShaderMaterial&&(x="#version 300 es\n",y=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+y,b=["#define varying in",r.glslVersion===Er?"":"layout(location = 0) out highp vec4 pc_fragColor;",r.glslVersion===Er?"":"#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"+b);const w=x+y+o,_=x+b+s,E=zs(i,i.VERTEX_SHADER,w),M=zs(i,i.FRAGMENT_SHADER,_);if(i.attachShader(v,E),i.attachShader(v,M),void 0!==r.index0AttributeName?i.bindAttribLocation(v,0,r.index0AttributeName):!0===r.morphTargets&&i.bindAttribLocation(v,0,"position"),i.linkProgram(v),t.debug.checkShaderErrors){const e=i.getProgramInfoLog(v).trim(),r=i.getShaderInfoLog(E).trim(),n=i.getShaderInfoLog(M).trim();let a=!0,o=!0;if(!1===i.getProgramParameter(v,i.LINK_STATUS))if(a=!1,"function"==typeof t.debug.onShaderError)t.debug.onShaderError(i,v,E,M);else{const t=Zs(i,E,"vertex"),r=Zs(i,M,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(v,i.VALIDATE_STATUS)+"\n\nProgram Info Log: "+e+"\n"+t+"\n"+r)}else""!==e?console.warn("THREE.WebGLProgram: Program Info Log:",e):""!==r&&""!==n||(o=!1);o&&(this.diagnostics={runnable:a,programLog:e,vertexShader:{log:r,prefix:y},fragmentShader:{log:n,prefix:b}})}let S,C;return i.deleteShader(E),i.deleteShader(M),this.getUniforms=function(){return void 0===S&&(S=new Ns(i,v)),S},this.getAttributes=function(){return void 0===C&&(C=function(t,e){const r={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i0,X=a.clearcoat>0,q=a.iridescence>0,Y=a.sheen>0,K=a.transmission>0,$=H&&!!a.anisotropyMap,tt=X&&!!a.clearcoatMap,et=X&&!!a.clearcoatNormalMap,rt=X&&!!a.clearcoatRoughnessMap,nt=q&&!!a.iridescenceMap,it=q&&!!a.iridescenceThicknessMap,at=Y&&!!a.sheenColorMap,ot=Y&&!!a.sheenRoughnessMap,st=!!a.specularMap,ct=!!a.specularColorMap,ut=!!a.specularIntensityMap,ht=K&&!!a.transmissionMap,ft=K&&!!a.thicknessMap,dt=!!a.gradientMap,pt=!!a.alphaMap,mt=a.alphaTest>0,At=!!a.alphaHash,gt=!!a.extensions,vt=!!w.attributes.uv1,yt=!!w.attributes.uv2,bt=!!w.attributes.uv3;return{isWebGL2:u,shaderID:S,shaderType:a.type,shaderName:a.name,vertexShader:I,fragmentShader:R,defines:a.defines,customVertexShaderID:B,customFragmentShaderID:k,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:d,instancing:D,instancingColor:D&&null!==b.instanceColor,supportsVertexTextures:f,outputColorSpace:null===P?t.outputColorSpace:!0===P.isXRRenderTarget?P.texture.colorSpace:Ze,map:U,matcap:O,envMap:F,envMapMode:F&&E.mapping,envMapCubeUVHeight:M,aoMap:N,lightMap:z,bumpMap:G,normalMap:Z,displacementMap:f&&V,emissiveMap:Q,normalMapObjectSpace:Z&&a.normalMapType===Ne,normalMapTangentSpace:Z&&a.normalMapType===Fe,metalnessMap:j,roughnessMap:W,anisotropy:H,anisotropyMap:$,clearcoat:X,clearcoatMap:tt,clearcoatNormalMap:et,clearcoatRoughnessMap:rt,iridescence:q,iridescenceMap:nt,iridescenceThicknessMap:it,sheen:Y,sheenColorMap:at,sheenRoughnessMap:ot,specularMap:st,specularColorMap:ct,specularIntensityMap:ut,transmission:K,transmissionMap:ht,thicknessMap:ft,gradientMap:dt,opaque:!1===a.transparent&&a.blending===y,alphaMap:pt,alphaTest:mt,alphaHash:At,combine:a.combine,mapUv:U&&g(a.map.channel),aoMapUv:N&&g(a.aoMap.channel),lightMapUv:z&&g(a.lightMap.channel),bumpMapUv:G&&g(a.bumpMap.channel),normalMapUv:Z&&g(a.normalMap.channel),displacementMapUv:V&&g(a.displacementMap.channel),emissiveMapUv:Q&&g(a.emissiveMap.channel),metalnessMapUv:j&&g(a.metalnessMap.channel),roughnessMapUv:W&&g(a.roughnessMap.channel),anisotropyMapUv:$&&g(a.anisotropyMap.channel),clearcoatMapUv:tt&&g(a.clearcoatMap.channel),clearcoatNormalMapUv:et&&g(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:rt&&g(a.clearcoatRoughnessMap.channel),iridescenceMapUv:nt&&g(a.iridescenceMap.channel),iridescenceThicknessMapUv:it&&g(a.iridescenceThicknessMap.channel),sheenColorMapUv:at&&g(a.sheenColorMap.channel),sheenRoughnessMapUv:ot&&g(a.sheenRoughnessMap.channel),specularMapUv:st&&g(a.specularMap.channel),specularColorMapUv:ct&&g(a.specularColorMap.channel),specularIntensityMapUv:ut&&g(a.specularIntensityMap.channel),transmissionMapUv:ht&&g(a.transmissionMap.channel),thicknessMapUv:ft&&g(a.thicknessMap.channel),alphaMapUv:pt&&g(a.alphaMap.channel),vertexTangents:!!w.attributes.tangent&&(Z||H),vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!w.attributes.color&&4===w.attributes.color.itemSize,vertexUv1s:vt,vertexUv2s:yt,vertexUv3s:bt,pointsUvs:!0===b.isPoints&&!!w.attributes.uv&&(U||pt),fog:!!x,useFog:!0===a.fog,fogExp2:x&&x.isFogExp2,flatShading:!0===a.flatShading,sizeAttenuation:!0===a.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===b.isSkinnedMesh,morphTargets:void 0!==w.morphAttributes.position,morphNormals:void 0!==w.morphAttributes.normal,morphColors:void 0!==w.morphAttributes.color,morphTargetsCount:T,morphTextureStride:L,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numSpotLightMaps:s.spotLightMap.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numSpotLightShadowsWithMaps:s.numSpotLightShadowsWithMaps,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:a.dithering,shadowMapEnabled:t.shadowMap.enabled&&c.length>0,shadowMapType:t.shadowMap.type,toneMapping:a.toneMapped?t.toneMapping:J,useLegacyLights:t.useLegacyLights,premultipliedAlpha:a.premultipliedAlpha,doubleSided:a.side===A,flipSided:a.side===m,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionDerivatives:gt&&!0===a.extensions.derivatives,extensionFragDepth:gt&&!0===a.extensions.fragDepth,extensionDrawBuffers:gt&&!0===a.extensions.drawBuffers,extensionShaderTextureLOD:gt&&!0===a.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||n.has("EXT_shader_texture_lod"),customProgramCacheKey:a.customProgramCacheKey()}},getProgramCacheKey:function(e){const r=[];if(e.shaderID?r.push(e.shaderID):(r.push(e.customVertexShaderID),r.push(e.customFragmentShaderID)),void 0!==e.defines)for(const t in e.defines)r.push(t),r.push(e.defines[t]);return!1===e.isRawShaderMaterial&&(function(t,e){t.push(e.precision),t.push(e.outputColorSpace),t.push(e.envMapMode),t.push(e.envMapCubeUVHeight),t.push(e.mapUv),t.push(e.alphaMapUv),t.push(e.lightMapUv),t.push(e.aoMapUv),t.push(e.bumpMapUv),t.push(e.normalMapUv),t.push(e.displacementMapUv),t.push(e.emissiveMapUv),t.push(e.metalnessMapUv),t.push(e.roughnessMapUv),t.push(e.anisotropyMapUv),t.push(e.clearcoatMapUv),t.push(e.clearcoatNormalMapUv),t.push(e.clearcoatRoughnessMapUv),t.push(e.iridescenceMapUv),t.push(e.iridescenceThicknessMapUv),t.push(e.sheenColorMapUv),t.push(e.sheenRoughnessMapUv),t.push(e.specularMapUv),t.push(e.specularColorMapUv),t.push(e.specularIntensityMapUv),t.push(e.transmissionMapUv),t.push(e.thicknessMapUv),t.push(e.combine),t.push(e.fogExp2),t.push(e.sizeAttenuation),t.push(e.morphTargetsCount),t.push(e.morphAttributeCount),t.push(e.numDirLights),t.push(e.numPointLights),t.push(e.numSpotLights),t.push(e.numSpotLightMaps),t.push(e.numHemiLights),t.push(e.numRectAreaLights),t.push(e.numDirLightShadows),t.push(e.numPointLightShadows),t.push(e.numSpotLightShadows),t.push(e.numSpotLightShadowsWithMaps),t.push(e.shadowMapType),t.push(e.toneMapping),t.push(e.numClippingPlanes),t.push(e.numClipIntersection),t.push(e.depthPacking)}(r,e),function(t,e){s.disableAll(),e.isWebGL2&&s.enable(0),e.supportsVertexTextures&&s.enable(1),e.instancing&&s.enable(2),e.instancingColor&&s.enable(3),e.matcap&&s.enable(4),e.envMap&&s.enable(5),e.normalMapObjectSpace&&s.enable(6),e.normalMapTangentSpace&&s.enable(7),e.clearcoat&&s.enable(8),e.iridescence&&s.enable(9),e.alphaTest&&s.enable(10),e.vertexColors&&s.enable(11),e.vertexAlphas&&s.enable(12),e.vertexUv1s&&s.enable(13),e.vertexUv2s&&s.enable(14),e.vertexUv3s&&s.enable(15),e.vertexTangents&&s.enable(16),e.anisotropy&&s.enable(17),t.push(s.mask),s.disableAll(),e.fog&&s.enable(0),e.useFog&&s.enable(1),e.flatShading&&s.enable(2),e.logarithmicDepthBuffer&&s.enable(3),e.skinning&&s.enable(4),e.morphTargets&&s.enable(5),e.morphNormals&&s.enable(6),e.morphColors&&s.enable(7),e.premultipliedAlpha&&s.enable(8),e.shadowMapEnabled&&s.enable(9),e.useLegacyLights&&s.enable(10),e.doubleSided&&s.enable(11),e.flipSided&&s.enable(12),e.useDepthPacking&&s.enable(13),e.dithering&&s.enable(14),e.transmission&&s.enable(15),e.sheen&&s.enable(16),e.opaque&&s.enable(17),e.pointsUvs&&s.enable(18),t.push(s.mask)}(r,e),r.push(t.outputColorSpace)),r.push(e.customProgramCacheKey),r.join()},getUniforms:function(t){const e=p[t.type];let r;if(e){const t=ao[e];r=Na.clone(t.uniforms)}else r=t.uniforms;return r},acquireProgram:function(e,r){let n;for(let t=0,e=c.length;t0?n.push(u):!0===o.transparent?i.push(u):r.push(u)},unshift:function(t,e,o,s,l,c){const u=a(t,e,o,s,l,c);o.transmission>0?n.unshift(u):!0===o.transparent?i.unshift(u):r.unshift(u)},finish:function(){for(let r=e,n=t.length;r1&&r.sort(t||ll),n.length>1&&n.sort(e||cl),i.length>1&&i.sort(e||cl)}}}function hl(){let t=new WeakMap;return{get:function(e,r){const n=t.get(e);let i;return void 0===n?(i=new ul,t.set(e,[i])):r>=n.length?(i=new ul,n.push(i)):i=n[r],i},dispose:function(){t=new WeakMap}}}function fl(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let r;switch(e.type){case"DirectionalLight":r={direction:new xn,color:new Gi};break;case"SpotLight":r={position:new xn,direction:new xn,color:new Gi,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":r={position:new xn,color:new Gi,distance:0,decay:0};break;case"HemisphereLight":r={direction:new xn,skyColor:new Gi,groundColor:new Gi};break;case"RectAreaLight":r={color:new Gi,position:new xn,halfWidth:new xn,halfHeight:new xn}}return t[e.id]=r,r}}}let dl=0;function pl(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function ml(t,e){const r=new fl,n=function(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let r;switch(e.type){case"DirectionalLight":case"SpotLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vr};break;case"PointLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vr,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=r,r}}}(),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};for(let t=0;t<9;t++)i.probe.push(new xn);const a=new xn,o=new Jn,s=new Jn;return{setup:function(a,o){let s=0,l=0,c=0;for(let t=0;t<9;t++)i.probe[t].set(0,0,0);let u=0,h=0,f=0,d=0,p=0,m=0,A=0,g=0,v=0,y=0;a.sort(pl);const b=!0===o?Math.PI:1;for(let t=0,e=a.length;t0&&(e.isWebGL2||!0===t.has("OES_texture_float_linear")?(i.rectAreaLTC1=io.LTC_FLOAT_1,i.rectAreaLTC2=io.LTC_FLOAT_2):!0===t.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=io.LTC_HALF_1,i.rectAreaLTC2=io.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=s,i.ambient[1]=l,i.ambient[2]=c;const x=i.hash;x.directionalLength===u&&x.pointLength===h&&x.spotLength===f&&x.rectAreaLength===d&&x.hemiLength===p&&x.numDirectionalShadows===m&&x.numPointShadows===A&&x.numSpotShadows===g&&x.numSpotMaps===v||(i.directional.length=u,i.spot.length=f,i.rectArea.length=d,i.point.length=h,i.hemi.length=p,i.directionalShadow.length=m,i.directionalShadowMap.length=m,i.pointShadow.length=A,i.pointShadowMap.length=A,i.spotShadow.length=g,i.spotShadowMap.length=g,i.directionalShadowMatrix.length=m,i.pointShadowMatrix.length=A,i.spotLightMatrix.length=g+v-y,i.spotLightMap.length=v,i.numSpotLightShadowsWithMaps=y,x.directionalLength=u,x.pointLength=h,x.spotLength=f,x.rectAreaLength=d,x.hemiLength=p,x.numDirectionalShadows=m,x.numPointShadows=A,x.numSpotShadows=g,x.numSpotMaps=v,i.version=dl++)},setupView:function(t,e){let r=0,n=0,l=0,c=0,u=0;const h=e.matrixWorldInverse;for(let e=0,f=t.length;e=a.length?(o=new Al(t,e),a.push(o)):o=a[i],o},dispose:function(){r=new WeakMap}}}class vl extends Ui{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Ue,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class yl extends Ui{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}function bl(t,e,r){let n=new $a;const i=new Vr,a=new Vr,o=new dn,s=new vl({depthPacking:Oe}),l=new yl,c={},u=r.maxTextureSize,f={[p]:m,[m]:p,[A]:A},g=new za({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Vr},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \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}"}),y=g.clone();y.defines.HORIZONTAL_PASS=1;const b=new ma;b.setAttribute("position",new Ji(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new La(b,g),w=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=h;let _=this.type;function E(r,n){const a=e.update(x);g.defines.VSM_SAMPLES!==r.blurSamples&&(g.defines.VSM_SAMPLES=r.blurSamples,y.defines.VSM_SAMPLES=r.blurSamples,g.needsUpdate=!0,y.needsUpdate=!0),null===r.mapPass&&(r.mapPass=new pn(i.x,i.y)),g.uniforms.shadow_pass.value=r.map.texture,g.uniforms.resolution.value=r.mapSize,g.uniforms.radius.value=r.radius,t.setRenderTarget(r.mapPass),t.clear(),t.renderBufferDirect(n,null,a,g,x,null),y.uniforms.shadow_pass.value=r.mapPass.texture,y.uniforms.resolution.value=r.mapSize,y.uniforms.radius.value=r.radius,t.setRenderTarget(r.map),t.clear(),t.renderBufferDirect(n,null,a,y,x,null)}function M(e,r,n,i){let a=null;const o=!0===n.isPointLight?e.customDistanceMaterial:e.customDepthMaterial;if(void 0!==o)a=o;else if(a=!0===n.isPointLight?l:s,t.localClippingEnabled&&!0===r.clipShadows&&Array.isArray(r.clippingPlanes)&&0!==r.clippingPlanes.length||r.displacementMap&&0!==r.displacementScale||r.alphaMap&&r.alphaTest>0||r.map&&r.alphaTest>0){const t=a.uuid,e=r.uuid;let n=c[t];void 0===n&&(n={},c[t]=n);let i=n[e];void 0===i&&(i=a.clone(),n[e]=i),a=i}return a.visible=r.visible,a.wireframe=r.wireframe,a.side=i===d?null!==r.shadowSide?r.shadowSide:r.side:null!==r.shadowSide?r.shadowSide:f[r.side],a.alphaMap=r.alphaMap,a.alphaTest=r.alphaTest,a.map=r.map,a.clipShadows=r.clipShadows,a.clippingPlanes=r.clippingPlanes,a.clipIntersection=r.clipIntersection,a.displacementMap=r.displacementMap,a.displacementScale=r.displacementScale,a.displacementBias=r.displacementBias,a.wireframeLinewidth=r.wireframeLinewidth,a.linewidth=r.linewidth,!0===n.isPointLight&&!0===a.isMeshDistanceMaterial&&(t.properties.get(a).light=n),a}function S(r,i,a,o,s){if(!1===r.visible)return;if(r.layers.test(i.layers)&&(r.isMesh||r.isLine||r.isPoints)&&(r.castShadow||r.receiveShadow&&s===d)&&(!r.frustumCulled||n.intersectsObject(r))){r.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,r.matrixWorld);const n=e.update(r),i=r.material;if(Array.isArray(i)){const e=n.groups;for(let l=0,c=e.length;lu||i.y>u)&&(i.x>u&&(a.x=Math.floor(u/A.x),i.x=a.x*A.x,h.mapSize.x=a.x),i.y>u&&(a.y=Math.floor(u/A.y),i.y=a.y*A.y,h.mapSize.y=a.y)),null===h.map||!0===p||!0===m){const t=this.type!==d?{minFilter:ft,magFilter:ft}:{};null!==h.map&&h.map.dispose(),h.map=new pn(i.x,i.y,t),h.map.texture.name=c.name+".shadowMap",h.camera.updateProjectionMatrix()}t.setRenderTarget(h.map),t.clear();const g=h.getViewportCount();for(let t=0;t=1):-1!==ft.indexOf("OpenGL ES")&&(ht=parseFloat(/^OpenGL ES (\d)/.exec(ft)[1]),ut=ht>=2);let dt=null,pt={};const mt=t.getParameter(t.SCISSOR_BOX),At=t.getParameter(t.VIEWPORT),gt=(new dn).fromArray(mt),vt=(new dn).fromArray(At);function yt(e,r,i,a){const o=new Uint8Array(4),s=t.createTexture();t.bindTexture(e,s),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let s=0;sn||t.height>n)&&(i=n/Math.max(t.width,t.height)),i<1||!0===e){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const n=e?Nr:Math.floor,a=n(i*t.width),o=n(i*t.height);void 0===m&&(m=v(a,o));const s=r?v(a,o):m;return s.width=a,s.height=o,s.getContext("2d").drawImage(t,0,0,a,o),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+t.width+"x"+t.height+") to ("+a+"x"+o+")."),s}return"data"in t&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+t.width+"x"+t.height+")."),t}return t}function b(t){return Or(t.width)&&Or(t.height)}function x(t,e){return t.generateMipmaps&&e&&t.minFilter!==ft&&t.minFilter!==gt}function w(e){t.generateMipmap(e)}function _(r,n,i,a,o=!1){if(!1===s)return n;if(null!==r){if(void 0!==t[r])return t[r];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+r+"'")}let l=n;return n===t.RED&&(i===t.FLOAT&&(l=t.R32F),i===t.HALF_FLOAT&&(l=t.R16F),i===t.UNSIGNED_BYTE&&(l=t.R8)),n===t.RG&&(i===t.FLOAT&&(l=t.RG32F),i===t.HALF_FLOAT&&(l=t.RG16F),i===t.UNSIGNED_BYTE&&(l=t.RG8)),n===t.RGBA&&(i===t.FLOAT&&(l=t.RGBA32F),i===t.HALF_FLOAT&&(l=t.RGBA16F),i===t.UNSIGNED_BYTE&&(l=a===Ge&&!1===o?t.SRGB8_ALPHA8:t.RGBA8),i===t.UNSIGNED_SHORT_4_4_4_4&&(l=t.RGBA4),i===t.UNSIGNED_SHORT_5_5_5_1&&(l=t.RGB5_A1)),l!==t.R16F&&l!==t.R32F&&l!==t.RG16F&&l!==t.RG32F&&l!==t.RGBA16F&&l!==t.RGBA32F||e.get("EXT_color_buffer_float"),l}function E(t,e,r){return!0===x(t,r)||t.isFramebufferTexture&&t.minFilter!==ft&&t.minFilter!==gt?Math.log2(Math.max(e.width,e.height))+1:void 0!==t.mipmaps&&t.mipmaps.length>0?t.mipmaps.length:t.isCompressedTexture&&Array.isArray(t.image)?e.mipmaps.length:1}function M(e){return e===ft||e===dt||e===mt?t.NEAREST:t.LINEAR}function S(t){const e=t.target;e.removeEventListener("dispose",S),function(t){const e=n.get(t);if(void 0===e.__webglInit)return;const r=t.source,i=A.get(r);if(i){const n=i[e.__cacheKey];n.usedTimes--,0===n.usedTimes&&T(t),0===Object.keys(i).length&&A.delete(r)}n.remove(t)}(e),e.isVideoTexture&&p.delete(e)}function C(e){const r=e.target;r.removeEventListener("dispose",C),function(e){const r=e.texture,i=n.get(e),a=n.get(r);if(void 0!==a.__webglTexture&&(t.deleteTexture(a.__webglTexture),o.memory.textures--),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLCubeRenderTarget)for(let e=0;e<6;e++)t.deleteFramebuffer(i.__webglFramebuffer[e]),i.__webglDepthbuffer&&t.deleteRenderbuffer(i.__webglDepthbuffer[e]);else{if(t.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&t.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&t.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer)for(let e=0;e0&&a.__version!==e.version){const t=e.image;if(null===t)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==t.complete)return void U(a,e,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}r.bindTexture(t.TEXTURE_2D,a.__webglTexture,t.TEXTURE0+i)}const B={[ct]:t.REPEAT,[ut]:t.CLAMP_TO_EDGE,[ht]:t.MIRRORED_REPEAT},k={[ft]:t.NEAREST,[dt]:t.NEAREST_MIPMAP_NEAREST,[mt]:t.NEAREST_MIPMAP_LINEAR,[gt]:t.LINEAR,[vt]:t.LINEAR_MIPMAP_NEAREST,[bt]:t.LINEAR_MIPMAP_LINEAR},L={[or]:t.NEVER,[dr]:t.ALWAYS,[sr]:t.LESS,[cr]:t.LEQUAL,[lr]:t.EQUAL,[fr]:t.GEQUAL,[ur]:t.GREATER,[hr]:t.NOTEQUAL};function P(r,a,o){if(o?(t.texParameteri(r,t.TEXTURE_WRAP_S,B[a.wrapS]),t.texParameteri(r,t.TEXTURE_WRAP_T,B[a.wrapT]),r!==t.TEXTURE_3D&&r!==t.TEXTURE_2D_ARRAY||t.texParameteri(r,t.TEXTURE_WRAP_R,B[a.wrapR]),t.texParameteri(r,t.TEXTURE_MAG_FILTER,k[a.magFilter]),t.texParameteri(r,t.TEXTURE_MIN_FILTER,k[a.minFilter])):(t.texParameteri(r,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(r,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),r!==t.TEXTURE_3D&&r!==t.TEXTURE_2D_ARRAY||t.texParameteri(r,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),a.wrapS===ut&&a.wrapT===ut||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(r,t.TEXTURE_MAG_FILTER,M(a.magFilter)),t.texParameteri(r,t.TEXTURE_MIN_FILTER,M(a.minFilter)),a.minFilter!==ft&&a.minFilter!==gt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),a.compareFunction&&(t.texParameteri(r,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(r,t.TEXTURE_COMPARE_FUNC,L[a.compareFunction])),!0===e.has("EXT_texture_filter_anisotropic")){const o=e.get("EXT_texture_filter_anisotropic");if(a.magFilter===ft)return;if(a.minFilter!==mt&&a.minFilter!==bt)return;if(a.type===Tt&&!1===e.has("OES_texture_float_linear"))return;if(!1===s&&a.type===It&&!1===e.has("OES_texture_half_float_linear"))return;(a.anisotropy>1||n.get(a).__currentAnisotropy)&&(t.texParameterf(r,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),n.get(a).__currentAnisotropy=a.anisotropy)}}function D(e,r){let n=!1;void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",S));const i=r.source;let a=A.get(i);void 0===a&&(a={},A.set(i,a));const s=function(t){const e=[];return e.push(t.wrapS),e.push(t.wrapT),e.push(t.wrapR||0),e.push(t.magFilter),e.push(t.minFilter),e.push(t.anisotropy),e.push(t.internalFormat),e.push(t.format),e.push(t.type),e.push(t.generateMipmaps),e.push(t.premultiplyAlpha),e.push(t.flipY),e.push(t.unpackAlignment),e.push(t.colorSpace),e.join()}(r);if(s!==e.__cacheKey){void 0===a[s]&&(a[s]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,n=!0),a[s].usedTimes++;const i=a[e.__cacheKey];void 0!==i&&(a[e.__cacheKey].usedTimes--,0===i.usedTimes&&T(r)),e.__cacheKey=s,e.__webglTexture=a[s].texture}return n}function U(e,i,o){let l=t.TEXTURE_2D;(i.isDataArrayTexture||i.isCompressedArrayTexture)&&(l=t.TEXTURE_2D_ARRAY),i.isData3DTexture&&(l=t.TEXTURE_3D);const c=D(e,i),h=i.source;r.bindTexture(l,e.__webglTexture,t.TEXTURE0+o);const f=n.get(h);if(h.version!==f.__version||!0===c){r.activeTexture(t.TEXTURE0+o),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,i.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,i.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,t.NONE);const e=function(t){return!s&&(t.wrapS!==ut||t.wrapT!==ut||t.minFilter!==ft&&t.minFilter!==gt)}(i)&&!1===b(i.image);let n=y(i.image,e,!1,u);n=Z(i,n);const d=b(n)||s,p=a.convert(i.format,i.colorSpace);let m,A=a.convert(i.type),g=_(i.internalFormat,p,A,i.colorSpace);P(l,i,d);const v=i.mipmaps,M=s&&!0!==i.isVideoTexture,S=void 0===f.__version||!0===c,C=E(i,n,d);if(i.isDepthTexture)g=t.DEPTH_COMPONENT,s?g=i.type===Tt?t.DEPTH_COMPONENT32F:i.type===Ct?t.DEPTH_COMPONENT24:i.type===kt?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT16:i.type===Tt&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===Ot&&g===t.DEPTH_COMPONENT&&i.type!==Mt&&i.type!==Ct&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=Ct,A=a.convert(i.type)),i.format===Ft&&g===t.DEPTH_COMPONENT&&(g=t.DEPTH_STENCIL,i.type!==kt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=kt,A=a.convert(i.type))),S&&(M?r.texStorage2D(t.TEXTURE_2D,1,g,n.width,n.height):r.texImage2D(t.TEXTURE_2D,0,g,n.width,n.height,0,p,A,null));else if(i.isDataTexture)if(v.length>0&&d){M&&S&&r.texStorage2D(t.TEXTURE_2D,C,g,v[0].width,v[0].height);for(let e=0,n=v.length;e>=1,i>>=1}}else if(v.length>0&&d){M&&S&&r.texStorage2D(t.TEXTURE_2D,C,g,v[0].width,v[0].height);for(let e=0,n=v.length;e=t.TEXTURE_CUBE_MAP_POSITIVE_X&&l<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,s,l,n.get(o).__webglTexture,0),r.bindFramebuffer(t.FRAMEBUFFER,null)}function F(e,r,n){if(t.bindRenderbuffer(t.RENDERBUFFER,e),r.depthBuffer&&!r.stencilBuffer){let i=t.DEPTH_COMPONENT16;if(n||G(r)){const e=r.depthTexture;e&&e.isDepthTexture&&(e.type===Tt?i=t.DEPTH_COMPONENT32F:e.type===Ct&&(i=t.DEPTH_COMPONENT24));const n=z(r);G(r)?f.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,n,i,r.width,r.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,n,i,r.width,r.height)}else t.renderbufferStorage(t.RENDERBUFFER,i,r.width,r.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)}else if(r.depthBuffer&&r.stencilBuffer){const i=z(r);n&&!1===G(r)?t.renderbufferStorageMultisample(t.RENDERBUFFER,i,t.DEPTH24_STENCIL8,r.width,r.height):G(r)?f.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,i,t.DEPTH24_STENCIL8,r.width,r.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,r.width,r.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)}else{const e=!0===r.isWebGLMultipleRenderTargets?r.texture:[r.texture];for(let i=0;i0&&!0===e.has("WEBGL_multisampled_render_to_texture")&&!1!==r.__useRenderToTexture}function Z(t,r){const n=t.colorSpace,i=t.format,a=t.type;return!0===t.isCompressedTexture||t.format===Mr||n!==Ze&&n!==ze&&(n===Ge?!1===s?!0===e.has("EXT_sRGB")&&i===Pt?(t.format=Mr,t.minFilter=gt,t.generateMipmaps=!1):r=sn.sRGBToLinear(r):i===Pt&&a===wt||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",n)),r}this.allocateTextureUnit=function(){const t=I;return t>=l&&console.warn("THREE.WebGLTextures: Trying to use "+t+" texture units while this GPU supports only "+l),I+=1,t},this.resetTextureUnits=function(){I=0},this.setTexture2D=R,this.setTexture2DArray=function(e,i){const a=n.get(e);e.version>0&&a.__version!==e.version?U(a,e,i):r.bindTexture(t.TEXTURE_2D_ARRAY,a.__webglTexture,t.TEXTURE0+i)},this.setTexture3D=function(e,i){const a=n.get(e);e.version>0&&a.__version!==e.version?U(a,e,i):r.bindTexture(t.TEXTURE_3D,a.__webglTexture,t.TEXTURE0+i)},this.setTextureCube=function(e,i){const o=n.get(e);e.version>0&&o.__version!==e.version?function(e,i,o){if(6!==i.image.length)return;const l=D(e,i),u=i.source;r.bindTexture(t.TEXTURE_CUBE_MAP,e.__webglTexture,t.TEXTURE0+o);const h=n.get(u);if(u.version!==h.__version||!0===l){r.activeTexture(t.TEXTURE0+o),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,i.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,i.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,t.NONE);const e=i.isCompressedTexture||i.image[0].isCompressedTexture,n=i.image[0]&&i.image[0].isDataTexture,f=[];for(let t=0;t<6;t++)f[t]=e||n?n?i.image[t].image:i.image[t]:y(i.image[t],!1,!0,c),f[t]=Z(i,f[t]);const d=f[0],p=b(d)||s,m=a.convert(i.format,i.colorSpace),A=a.convert(i.type),g=_(i.internalFormat,m,A,i.colorSpace),v=s&&!0!==i.isVideoTexture,M=void 0===h.__version||!0===l;let S,C=E(i,d,p);if(P(t.TEXTURE_CUBE_MAP,i,p),e){v&&M&&r.texStorage2D(t.TEXTURE_CUBE_MAP,C,g,d.width,d.height);for(let e=0;e<6;e++){S=f[e].mipmaps;for(let n=0;n0&&C++,r.texStorage2D(t.TEXTURE_CUBE_MAP,C,g,f[0].width,f[0].height));for(let e=0;e<6;e++)if(n){v?r.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,0,0,f[e].width,f[e].height,m,A,f[e].data):r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,g,f[e].width,f[e].height,0,m,A,f[e].data);for(let n=0;n0&&!1===G(e)){const n=f?l:[l];c.__webglMultisampledFramebuffer=t.createFramebuffer(),c.__webglColorRenderbuffer=[],r.bindFramebuffer(t.FRAMEBUFFER,c.__webglMultisampledFramebuffer);for(let r=0;r0&&!1===G(e)){const i=e.isWebGLMultipleRenderTargets?e.texture:[e.texture],a=e.width,o=e.height;let s=t.COLOR_BUFFER_BIT;const l=[],c=e.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,u=n.get(e),h=!0===e.isWebGLMultipleRenderTargets;if(h)for(let e=0;es+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!l.inputState.pinching&&o<=s-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==s&&t.gripSpace&&(i=e.getPose(t.gripSpace,r),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));null!==o&&(n=e.getPose(t.targetRaySpace,r),null===n&&null!==i&&(n=i),null!==n&&(o.matrix.fromArray(n.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,n.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(n.linearVelocity)):o.hasLinearVelocity=!1,n.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(n.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(Sl)))}return null!==o&&(o.visible=null!==n),null!==s&&(s.visible=null!==i),null!==l&&(l.visible=null!==a),this}_getHandJoint(t,e){if(void 0===t.joints[e.jointName]){const r=new Ml;r.matrixAutoUpdate=!1,r.visible=!1,t.joints[e.jointName]=r,t.add(r)}return t.joints[e.jointName]}}class Tl extends fn{constructor(t,e,r,n,i,a,o,s,l,c){if((c=void 0!==c?c:Ot)!==Ot&&c!==Ft)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===r&&c===Ot&&(r=Ct),void 0===r&&c===Ft&&(r=kt),super(null,n,i,a,o,s,c,r,l),this.isDepthTexture=!0,this.image={width:t,height:e},this.magFilter=void 0!==o?o:ft,this.minFilter=void 0!==s?s:ft,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(t){return super.copy(t),this.compareFunction=t.compareFunction,this}toJSON(t){const e=super.toJSON(t);return null!==this.compareFunction&&(e.compareFunction=this.compareFunction),e}}class Il extends Tr{constructor(t,e){super();const r=this;let n=null,i=1,a=null,o="local-floor",s=1,l=null,c=null,u=null,h=null,f=null,d=null;const p=e.getContextAttributes();let m=null,A=null;const g=[],v=[],y=new Za;y.layers.enable(1),y.viewport=new dn;const b=new Za;b.layers.enable(2),b.viewport=new dn;const x=[y,b],w=new El;w.layers.enable(1),w.layers.enable(2);let _=null,E=null;function M(t){const e=v.indexOf(t.inputSource);if(-1===e)return;const r=g[e];void 0!==r&&(r.update(t.inputSource,t.frame,l||a),r.dispatchEvent({type:t.type,data:t.inputSource}))}function S(){n.removeEventListener("select",M),n.removeEventListener("selectstart",M),n.removeEventListener("selectend",M),n.removeEventListener("squeeze",M),n.removeEventListener("squeezestart",M),n.removeEventListener("squeezeend",M),n.removeEventListener("end",S),n.removeEventListener("inputsourceschange",C);for(let t=0;t=0&&(v[n]=null,g[n].disconnect(r))}for(let e=0;e=v.length){v.push(r),n=t;break}if(null===v[t]){v[t]=r,n=t;break}}if(-1===n)break}const i=g[n];i&&i.connect(r)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(t){let e=g[t];return void 0===e&&(e=new Cl,g[t]=e),e.getTargetRaySpace()},this.getControllerGrip=function(t){let e=g[t];return void 0===e&&(e=new Cl,g[t]=e),e.getGripSpace()},this.getHand=function(t){let e=g[t];return void 0===e&&(e=new Cl,g[t]=e),e.getHandSpace()},this.setFramebufferScaleFactor=function(t){i=t,!0===r.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(t){o=t,!0===r.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||a},this.setReferenceSpace=function(t){l=t},this.getBaseLayer=function(){return null!==h?h:f},this.getBinding=function(){return u},this.getFrame=function(){return d},this.getSession=function(){return n},this.setSession=async function(c){if(n=c,null!==n){if(m=t.getRenderTarget(),n.addEventListener("select",M),n.addEventListener("selectstart",M),n.addEventListener("selectend",M),n.addEventListener("squeeze",M),n.addEventListener("squeezestart",M),n.addEventListener("squeezeend",M),n.addEventListener("end",S),n.addEventListener("inputsourceschange",C),!0!==p.xrCompatible&&await e.makeXRCompatible(),void 0===n.renderState.layers||!1===t.capabilities.isWebGL2){const r={antialias:void 0!==n.renderState.layers||p.antialias,alpha:!0,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:i};f=new XRWebGLLayer(n,e,r),n.updateRenderState({baseLayer:f}),A=new pn(f.framebufferWidth,f.framebufferHeight,{format:Pt,type:wt,colorSpace:t.outputColorSpace,stencilBuffer:p.stencil})}else{let r=null,a=null,o=null;p.depth&&(o=p.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,r=p.stencil?Ft:Ot,a=p.stencil?kt:Ct);const s={colorFormat:e.RGBA8,depthFormat:o,scaleFactor:i};u=new XRWebGLBinding(n,e),h=u.createProjectionLayer(s),n.updateRenderState({layers:[h]}),A=new pn(h.textureWidth,h.textureHeight,{format:Pt,type:wt,depthTexture:new Tl(h.textureWidth,h.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,r),stencilBuffer:p.stencil,colorSpace:t.outputColorSpace,samples:p.antialias?4:0}),t.properties.get(A).__ignoreDepthValues=h.ignoreDepthValues}A.isXRRenderTarget=!0,this.setFoveation(s),l=null,a=await n.requestReferenceSpace(o),k.setContext(n),k.start(),r.isPresenting=!0,r.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==n)return n.environmentBlendMode};const T=new xn,I=new xn;function R(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.copy(t.matrixWorld).invert()}this.updateCamera=function(t){if(null===n)return;w.near=b.near=y.near=t.near,w.far=b.far=y.far=t.far,_===w.near&&E===w.far||(n.updateRenderState({depthNear:w.near,depthFar:w.far}),_=w.near,E=w.far);const e=t.parent,r=w.cameras;R(w,e);for(let t=0;t0&&(n.alphaTest.value=i.alphaTest);const a=e.get(i).envMap;if(a&&(n.envMap.value=a,n.flipEnvMap.value=a.isCubeTexture&&!1===a.isRenderTargetTexture?-1:1,n.reflectivity.value=i.reflectivity,n.ior.value=i.ior,n.refractionRatio.value=i.refractionRatio),i.lightMap){n.lightMap.value=i.lightMap;const e=!0===t.useLegacyLights?Math.PI:1;n.lightMapIntensity.value=i.lightMapIntensity*e,r(i.lightMap,n.lightMapTransform)}i.aoMap&&(n.aoMap.value=i.aoMap,n.aoMapIntensity.value=i.aoMapIntensity,r(i.aoMap,n.aoMapTransform))}return{refreshFogUniforms:function(e,r){r.color.getRGB(e.fogColor.value,Fa(t)),r.isFog?(e.fogNear.value=r.near,e.fogFar.value=r.far):r.isFogExp2&&(e.fogDensity.value=r.density)},refreshMaterialUniforms:function(t,i,a,o,s){i.isMeshBasicMaterial||i.isMeshLambertMaterial?n(t,i):i.isMeshToonMaterial?(n(t,i),function(t,e){e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(t,i)):i.isMeshPhongMaterial?(n(t,i),function(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4)}(t,i)):i.isMeshStandardMaterial?(n(t,i),function(t,n){t.metalness.value=n.metalness,n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap,r(n.metalnessMap,t.metalnessMapTransform)),t.roughness.value=n.roughness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap,r(n.roughnessMap,t.roughnessMapTransform));e.get(n).envMap&&(t.envMapIntensity.value=n.envMapIntensity)}(t,i),i.isMeshPhysicalMaterial&&function(t,e,n){t.ior.value=e.ior,e.sheen>0&&(t.sheenColor.value.copy(e.sheenColor).multiplyScalar(e.sheen),t.sheenRoughness.value=e.sheenRoughness,e.sheenColorMap&&(t.sheenColorMap.value=e.sheenColorMap,r(e.sheenColorMap,t.sheenColorMapTransform)),e.sheenRoughnessMap&&(t.sheenRoughnessMap.value=e.sheenRoughnessMap,r(e.sheenRoughnessMap,t.sheenRoughnessMapTransform))),e.clearcoat>0&&(t.clearcoat.value=e.clearcoat,t.clearcoatRoughness.value=e.clearcoatRoughness,e.clearcoatMap&&(t.clearcoatMap.value=e.clearcoatMap,r(e.clearcoatMap,t.clearcoatMapTransform)),e.clearcoatRoughnessMap&&(t.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap,r(e.clearcoatRoughnessMap,t.clearcoatRoughnessMapTransform)),e.clearcoatNormalMap&&(t.clearcoatNormalMap.value=e.clearcoatNormalMap,r(e.clearcoatNormalMap,t.clearcoatNormalMapTransform),t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),e.side===m&&t.clearcoatNormalScale.value.negate())),e.iridescence>0&&(t.iridescence.value=e.iridescence,t.iridescenceIOR.value=e.iridescenceIOR,t.iridescenceThicknessMinimum.value=e.iridescenceThicknessRange[0],t.iridescenceThicknessMaximum.value=e.iridescenceThicknessRange[1],e.iridescenceMap&&(t.iridescenceMap.value=e.iridescenceMap,r(e.iridescenceMap,t.iridescenceMapTransform)),e.iridescenceThicknessMap&&(t.iridescenceThicknessMap.value=e.iridescenceThicknessMap,r(e.iridescenceThicknessMap,t.iridescenceThicknessMapTransform))),e.transmission>0&&(t.transmission.value=e.transmission,t.transmissionSamplerMap.value=n.texture,t.transmissionSamplerSize.value.set(n.width,n.height),e.transmissionMap&&(t.transmissionMap.value=e.transmissionMap,r(e.transmissionMap,t.transmissionMapTransform)),t.thickness.value=e.thickness,e.thicknessMap&&(t.thicknessMap.value=e.thicknessMap,r(e.thicknessMap,t.thicknessMapTransform)),t.attenuationDistance.value=e.attenuationDistance,t.attenuationColor.value.copy(e.attenuationColor)),e.anisotropy>0&&(t.anisotropyVector.value.set(e.anisotropy*Math.cos(e.anisotropyRotation),e.anisotropy*Math.sin(e.anisotropyRotation)),e.anisotropyMap&&(t.anisotropyMap.value=e.anisotropyMap,r(e.anisotropyMap,t.anisotropyMapTransform))),t.specularIntensity.value=e.specularIntensity,t.specularColor.value.copy(e.specularColor),e.specularColorMap&&(t.specularColorMap.value=e.specularColorMap,r(e.specularColorMap,t.specularColorMapTransform)),e.specularIntensityMap&&(t.specularIntensityMap.value=e.specularIntensityMap,r(e.specularIntensityMap,t.specularIntensityMapTransform))}(t,i,s)):i.isMeshMatcapMaterial?(n(t,i),function(t,e){e.matcap&&(t.matcap.value=e.matcap)}(t,i)):i.isMeshDepthMaterial?n(t,i):i.isMeshDistanceMaterial?(n(t,i),function(t,r){const n=e.get(r).light;t.referencePosition.value.setFromMatrixPosition(n.matrixWorld),t.nearDistance.value=n.shadow.camera.near,t.farDistance.value=n.shadow.camera.far}(t,i)):i.isMeshNormalMaterial?n(t,i):i.isLineBasicMaterial?(function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,e.map&&(t.map.value=e.map,r(e.map,t.mapTransform))}(t,i),i.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(t,i)):i.isPointsMaterial?function(t,e,n,i){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.size.value=e.size*n,t.scale.value=.5*i,e.map&&(t.map.value=e.map,r(e.map,t.uvTransform)),e.alphaMap&&(t.alphaMap.value=e.alphaMap,r(e.alphaMap,t.alphaMapTransform)),e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,i,a,o):i.isSpriteMaterial?function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.rotation.value=e.rotation,e.map&&(t.map.value=e.map,r(e.map,t.mapTransform)),e.alphaMap&&(t.alphaMap.value=e.alphaMap,r(e.alphaMap,t.alphaMapTransform)),e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,i):i.isShadowMaterial?(t.color.value.copy(i.color),t.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function Bl(t,e,r,n){let i={},a={},o=[];const s=r.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(t,e,r){const n=t.value;if(void 0===r[e]){if("number"==typeof n)r[e]=n;else{const t=Array.isArray(n)?n:[n],i=[];for(let e=0;e0&&(n=r%16,0!==n&&16-n-a.boundary<0&&(r+=16-n,i.__offset=r)),r+=a.storage}n=r%16,n>0&&(r+=16-n),t.__size=r,t.__cache={}}(r),f=function(e){const r=function(){for(let t=0;t0),h=!!r.morphAttributes.position,f=!!r.morphAttributes.normal,d=!!r.morphAttributes.color,p=n.toneMapped?w.toneMapping:J,m=r.morphAttributes.position||r.morphAttributes.normal||r.morphAttributes.color,A=void 0!==m?m.length:0,g=rt.get(n),v=y.state.lights;if(!0===V&&(!0===Q||t!==T)){const e=t===T&&n.id===C;dt.setState(n,t,e)}let b=!1;n.version===g.__version?g.needsLights&&g.lightsStateVersion!==v.state.version||g.outputColorSpace!==s||i.isInstancedMesh&&!1===g.instancing?b=!0:i.isInstancedMesh||!0!==g.instancing?i.isSkinnedMesh&&!1===g.skinning?b=!0:i.isSkinnedMesh||!0!==g.skinning?g.envMap!==l||!0===n.fog&&g.fog!==a?b=!0:void 0===g.numClippingPlanes||g.numClippingPlanes===dt.numPlanes&&g.numIntersection===dt.numIntersection?(g.vertexAlphas!==c||g.vertexTangents!==u||g.morphTargets!==h||g.morphNormals!==f||g.morphColors!==d||g.toneMapping!==p||!0===$.isWebGL2&&g.morphTargetsCount!==A)&&(b=!0):b=!0:b=!0:b=!0:(b=!0,g.__version=n.version);let x=g.currentProgram;!0===b&&(x=Jt(n,e,i));let _=!1,E=!1,M=!1;const I=x.getUniforms(),R=g.uniforms;if(tt.useProgram(x.program)&&(_=!0,E=!0,M=!0),n.id!==C&&(C=n.id,E=!0),_||T!==t){if(I.setValue(Et,"projectionMatrix",t.projectionMatrix),$.logarithmicDepthBuffer&&I.setValue(Et,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),T!==t&&(T=t,E=!0,M=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){const e=I.map.cameraPosition;void 0!==e&&e.setValue(Et,X.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&I.setValue(Et,"isOrthographic",!0===t.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.isShadowMaterial||i.isSkinnedMesh)&&I.setValue(Et,"viewMatrix",t.matrixWorldInverse)}if(i.isSkinnedMesh){I.setOptional(Et,i,"bindMatrix"),I.setOptional(Et,i,"bindMatrixInverse");const t=i.skeleton;t&&($.floatVertexTextures?(null===t.boneTexture&&t.computeBoneTexture(),I.setValue(Et,"boneTexture",t.boneTexture,nt),I.setValue(Et,"boneTextureSize",t.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."))}const B=r.morphAttributes;var k,L;if((void 0!==B.position||void 0!==B.normal||void 0!==B.color&&!0===$.isWebGL2)&&At.update(i,r,x),(E||g.receiveShadow!==i.receiveShadow)&&(g.receiveShadow=i.receiveShadow,I.setValue(Et,"receiveShadow",i.receiveShadow)),n.isMeshGouraudMaterial&&null!==n.envMap&&(R.envMap.value=l,R.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1),E&&(I.setValue(Et,"toneMappingExposure",w.toneMappingExposure),g.needsLights&&(L=M,(k=R).ambientLightColor.needsUpdate=L,k.lightProbe.needsUpdate=L,k.directionalLights.needsUpdate=L,k.directionalLightShadows.needsUpdate=L,k.pointLights.needsUpdate=L,k.pointLightShadows.needsUpdate=L,k.spotLights.needsUpdate=L,k.spotLightShadows.needsUpdate=L,k.rectAreaLights.needsUpdate=L,k.hemisphereLights.needsUpdate=L),a&&!0===n.fog&&ut.refreshFogUniforms(R,a),ut.refreshMaterialUniforms(R,n,U,D,j),Ns.upload(Et,g.uniformsList,R,nt)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(Ns.upload(Et,g.uniformsList,R,nt),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&I.setValue(Et,"center",i.center),I.setValue(Et,"modelViewMatrix",i.modelViewMatrix),I.setValue(Et,"normalMatrix",i.normalMatrix),I.setValue(Et,"modelMatrix",i.matrixWorld),n.isShaderMaterial||n.isRawShaderMaterial){const t=n.uniformsGroups;for(let e=0,r=t.length;e0&&function(t,e,r,n){const i=$.isWebGL2;null===j&&(j=new pn(1,1,{generateMipmaps:!0,type:K.has("EXT_color_buffer_half_float")?It:wt,minFilter:bt,samples:i?4:0})),w.getDrawingBufferSize(H),i?j.setSize(H.x,H.y):j.setSize(Nr(H.x),Nr(H.y));const a=w.getRenderTarget();w.setRenderTarget(j),w.getClearColor(k),L=w.getClearAlpha(),L<1&&w.setClearColor(16777215,.5),w.clear();const o=w.toneMapping;w.toneMapping=J,qt(t,r,n),nt.updateMultisampleRenderTarget(j),nt.updateRenderTargetMipmap(j);let s=!1;for(let t=0,i=e.length;t0&&qt(i,e,r),a.length>0&&qt(a,e,r),o.length>0&&qt(o,e,r),tt.buffers.depth.setTest(!0),tt.buffers.depth.setMask(!0),tt.buffers.color.setMask(!0),tt.setPolygonOffset(!1)}function qt(t,e,r){const n=!0===e.isScene?e.overrideMaterial:null;for(let i=0,a=t.length;i0?x[x.length-1]:null,b.pop(),v=b.length>0?b[b.length-1]:null},this.getActiveCubeFace=function(){return E},this.getActiveMipmapLevel=function(){return M},this.getRenderTarget=function(){return S},this.setRenderTargetTextures=function(t,e,r){rt.get(t.texture).__webglTexture=e,rt.get(t.depthTexture).__webglTexture=r;const n=rt.get(t);n.__hasExternalTextures=!0,n.__hasExternalTextures&&(n.__autoAllocateDepthBuffer=void 0===r,n.__autoAllocateDepthBuffer||!0===K.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),n.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(t,e){const r=rt.get(t);r.__webglFramebuffer=e,r.__useDefaultFramebuffer=void 0===e},this.setRenderTarget=function(t,e=0,r=0){S=t,E=e,M=r;let n=!0,i=null,a=!1,o=!1;if(t){const r=rt.get(t);void 0!==r.__useDefaultFramebuffer?(tt.bindFramebuffer(Et.FRAMEBUFFER,null),n=!1):void 0===r.__webglFramebuffer?nt.setupRenderTarget(t):r.__hasExternalTextures&&nt.rebindTextures(t,rt.get(t.texture).__webglTexture,rt.get(t.depthTexture).__webglTexture);const s=t.texture;(s.isData3DTexture||s.isDataArrayTexture||s.isCompressedArrayTexture)&&(o=!0);const l=rt.get(t).__webglFramebuffer;t.isWebGLCubeRenderTarget?(i=l[e],a=!0):i=$.isWebGL2&&t.samples>0&&!1===nt.useMultisampledRTT(t)?rt.get(t).__webglMultisampledFramebuffer:l,I.copy(t.viewport),R.copy(t.scissor),B=t.scissorTest}else I.copy(N).multiplyScalar(U).floor(),R.copy(z).multiplyScalar(U).floor(),B=G;if(tt.bindFramebuffer(Et.FRAMEBUFFER,i)&&$.drawBuffers&&n&&tt.drawBuffers(t,i),tt.viewport(I),tt.scissor(R),tt.setScissorTest(B),a){const n=rt.get(t.texture);Et.framebufferTexture2D(Et.FRAMEBUFFER,Et.COLOR_ATTACHMENT0,Et.TEXTURE_CUBE_MAP_POSITIVE_X+e,n.__webglTexture,r)}else if(o){const n=rt.get(t.texture),i=e||0;Et.framebufferTextureLayer(Et.FRAMEBUFFER,Et.COLOR_ATTACHMENT0,n.__webglTexture,r||0,i)}C=-1},this.readRenderTargetPixels=function(t,e,r,n,i,a,o){if(!t||!t.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let s=rt.get(t).__webglFramebuffer;if(t.isWebGLCubeRenderTarget&&void 0!==o&&(s=s[o]),s){tt.bindFramebuffer(Et.FRAMEBUFFER,s);try{const o=t.texture,s=o.format,l=o.type;if(s!==Pt&&yt.convert(s)!==Et.getParameter(Et.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=l===It&&(K.has("EXT_color_buffer_half_float")||$.isWebGL2&&K.has("EXT_color_buffer_float"));if(!(l===wt||yt.convert(l)===Et.getParameter(Et.IMPLEMENTATION_COLOR_READ_TYPE)||l===Tt&&($.isWebGL2||K.has("OES_texture_float")||K.has("WEBGL_color_buffer_float"))||c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");e>=0&&e<=t.width-n&&r>=0&&r<=t.height-i&&Et.readPixels(e,r,n,i,yt.convert(s),yt.convert(l),a)}finally{const t=null!==S?rt.get(S).__webglFramebuffer:null;tt.bindFramebuffer(Et.FRAMEBUFFER,t)}}},this.copyFramebufferToTexture=function(t,e,r=0){const n=Math.pow(2,-r),i=Math.floor(e.image.width*n),a=Math.floor(e.image.height*n);nt.setTexture2D(e,0),Et.copyTexSubImage2D(Et.TEXTURE_2D,r,0,0,t.x,t.y,i,a),tt.unbindTexture()},this.copyTextureToTexture=function(t,e,r,n=0){const i=e.image.width,a=e.image.height,o=yt.convert(r.format),s=yt.convert(r.type);nt.setTexture2D(r,0),Et.pixelStorei(Et.UNPACK_FLIP_Y_WEBGL,r.flipY),Et.pixelStorei(Et.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),Et.pixelStorei(Et.UNPACK_ALIGNMENT,r.unpackAlignment),e.isDataTexture?Et.texSubImage2D(Et.TEXTURE_2D,n,t.x,t.y,i,a,o,s,e.image.data):e.isCompressedTexture?Et.compressedTexSubImage2D(Et.TEXTURE_2D,n,t.x,t.y,e.mipmaps[0].width,e.mipmaps[0].height,o,e.mipmaps[0].data):Et.texSubImage2D(Et.TEXTURE_2D,n,t.x,t.y,o,s,e.image),0===n&&r.generateMipmaps&&Et.generateMipmap(Et.TEXTURE_2D),tt.unbindTexture()},this.copyTextureToTexture3D=function(t,e,r,n,i=0){if(w.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const a=t.max.x-t.min.x+1,o=t.max.y-t.min.y+1,s=t.max.z-t.min.z+1,l=yt.convert(n.format),c=yt.convert(n.type);let u;if(n.isData3DTexture)nt.setTexture3D(n,0),u=Et.TEXTURE_3D;else{if(!n.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");nt.setTexture2DArray(n,0),u=Et.TEXTURE_2D_ARRAY}Et.pixelStorei(Et.UNPACK_FLIP_Y_WEBGL,n.flipY),Et.pixelStorei(Et.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),Et.pixelStorei(Et.UNPACK_ALIGNMENT,n.unpackAlignment);const h=Et.getParameter(Et.UNPACK_ROW_LENGTH),f=Et.getParameter(Et.UNPACK_IMAGE_HEIGHT),d=Et.getParameter(Et.UNPACK_SKIP_PIXELS),p=Et.getParameter(Et.UNPACK_SKIP_ROWS),m=Et.getParameter(Et.UNPACK_SKIP_IMAGES),A=r.isCompressedTexture?r.mipmaps[0]:r.image;Et.pixelStorei(Et.UNPACK_ROW_LENGTH,A.width),Et.pixelStorei(Et.UNPACK_IMAGE_HEIGHT,A.height),Et.pixelStorei(Et.UNPACK_SKIP_PIXELS,t.min.x),Et.pixelStorei(Et.UNPACK_SKIP_ROWS,t.min.y),Et.pixelStorei(Et.UNPACK_SKIP_IMAGES,t.min.z),r.isDataTexture||r.isData3DTexture?Et.texSubImage3D(u,i,e.x,e.y,e.z,a,o,s,l,c,A.data):r.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Et.compressedTexSubImage3D(u,i,e.x,e.y,e.z,a,o,s,l,A.data)):Et.texSubImage3D(u,i,e.x,e.y,e.z,a,o,s,l,c,A),Et.pixelStorei(Et.UNPACK_ROW_LENGTH,h),Et.pixelStorei(Et.UNPACK_IMAGE_HEIGHT,f),Et.pixelStorei(Et.UNPACK_SKIP_PIXELS,d),Et.pixelStorei(Et.UNPACK_SKIP_ROWS,p),Et.pixelStorei(Et.UNPACK_SKIP_IMAGES,m),0===i&&n.generateMipmaps&&Et.generateMipmap(u),tt.unbindTexture()},this.initTexture=function(t){t.isCubeTexture?nt.setTextureCube(t,0):t.isData3DTexture?nt.setTexture3D(t,0):t.isDataArrayTexture||t.isCompressedArrayTexture?nt.setTexture2DArray(t,0):nt.setTexture2D(t,0),tt.unbindTexture()},this.resetState=function(){E=0,M=0,S=null,tt.reset(),xt.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Sr}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(t){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!t}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Ge?De:Pe}set outputEncoding(t){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=t===De?Ge:Ze}}class Pl extends Ll{}Pl.prototype.isWebGL1Renderer=!0;class Dl{constructor(t,e=25e-5){this.isFogExp2=!0,this.name="",this.color=new Gi(t),this.density=e}clone(){return new Dl(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class Ul{constructor(t,e=1,r=1e3){this.isFog=!0,this.name="",this.color=new Gi(t),this.near=e,this.far=r}clone(){return new Ul(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class Ol extends wi{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return null!==this.fog&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(e.object.backgroundIntensity=this.backgroundIntensity),e}}class Fl{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=pr,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Lr()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,r){t*=this.stride,r*=e.stride;for(let n=0,i=this.stride;nt.far||e.push({distance:s,point:Vl.clone(),uv:Pi.getInterpolation(Vl,ql,Yl,Jl,Kl,$l,tc,new Vr),face:null,object:this})}copy(t,e){return super.copy(t,e),void 0!==t.center&&this.center.copy(t.center),this.material=t.material,this}}function rc(t,e,r,n,i,a){Wl.subVectors(t,r).addScalar(.5).multiply(n),void 0!==i?(Hl.x=a*Wl.x-i*Wl.y,Hl.y=i*Wl.x+a*Wl.y):Hl.copy(Wl),t.copy(e),t.x+=Hl.x,t.y+=Hl.y,t.applyMatrix4(Xl)}const nc=new xn,ic=new xn;class ac extends wi{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);const e=t.levels;for(let t=0,r=e.length;t0){let r,n;for(r=1,n=e.length;r0){nc.setFromMatrixPosition(this.matrixWorld);const r=t.ray.origin.distanceTo(nc);this.getObjectForDistance(r).raycast(t,e)}}update(t){const e=this.levels;if(e.length>1){nc.setFromMatrixPosition(t.matrixWorld),ic.setFromMatrixPosition(this.matrixWorld);const r=nc.distanceTo(ic)/t.zoom;let n,i;for(e[0].object.visible=!0,n=1,i=e.length;n=t))break;e[n-1].object.visible=!1,e[n].object.visible=!0}for(this._currentLevel=n-1;ns)continue;h.applyMatrix4(this.matrixWorld);const a=t.ray.origin.distanceTo(h);at.far||e.push({distance:a,point:u.clone().applyMatrix4(this.matrixWorld),index:r,face:null,faceIndex:null,object:this})}else for(let r=Math.max(0,a.start),n=Math.min(p.count,a.start+a.count)-1;rs)continue;h.applyMatrix4(this.matrixWorld);const n=t.ray.origin.distanceTo(h);nt.far||e.push({distance:n,point:u.clone().applyMatrix4(this.matrixWorld),index:r,face:null,faceIndex:null,object:this})}}updateMorphTargets(){const t=this.geometry.morphAttributes,e=Object.keys(t);if(e.length>0){const r=t[e[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=r.length;t0){const r=t[e[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=r.length;ti.far)return;a.push({distance:l,distanceToRay:Math.sqrt(s),point:r,index:e,face:null,object:o})}}class Xc extends fn{constructor(t,e,r,n,i,a,o,s,l){super(t,e,r,n,i,a,o,s,l),this.isVideoTexture=!0,this.minFilter=void 0!==a?a:gt,this.magFilter=void 0!==i?i:gt,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback((function e(){c.needsUpdate=!0,t.requestVideoFrameCallback(e)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;!1=="requestVideoFrameCallback"in t&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class qc extends fn{constructor(t,e){super({width:t,height:e}),this.isFramebufferTexture=!0,this.magFilter=ft,this.minFilter=ft,this.generateMipmaps=!1,this.needsUpdate=!0}}class Yc extends fn{constructor(t,e,r,n,i,a,o,s,l,c,u,h){super(null,a,o,s,l,c,n,i,u,h),this.isCompressedTexture=!0,this.image={width:e,height:r},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class Jc extends Yc{constructor(t,e,r,n,i,a){super(t,e,r,i,a),this.isCompressedArrayTexture=!0,this.image.depth=n,this.wrapR=ut}}class Kc extends fn{constructor(t,e,r,n,i,a,o,s,l){super(t,e,r,n,i,a,o,s,l),this.isCanvasTexture=!0,this.needsUpdate=!0}}class $c{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,e){const r=this.getUtoTmapping(t);return this.getPoint(r,e)}getPoints(t=5){const e=[];for(let r=0;r<=t;r++)e.push(this.getPoint(r/t));return e}getSpacedPoints(t=5){const e=[];for(let r=0;r<=t;r++)e.push(this.getPointAt(r/t));return e}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const e=[];let r,n=this.getPoint(0),i=0;e.push(0);for(let a=1;a<=t;a++)r=this.getPoint(a/t),i+=r.distanceTo(n),e.push(i),n=r;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,e){const r=this.getLengths();let n=0;const i=r.length;let a;a=e||t*r[i-1];let o,s=0,l=i-1;for(;s<=l;)if(n=Math.floor(s+(l-s)/2),o=r[n]-a,o<0)s=n+1;else{if(!(o>0)){l=n;break}l=n-1}if(n=l,r[n]===a)return n/(i-1);const c=r[n];return(n+(a-c)/(r[n+1]-c))/(i-1)}getTangent(t,e){const r=1e-4;let n=t-r,i=t+r;n<0&&(n=0),i>1&&(i=1);const a=this.getPoint(n),o=this.getPoint(i),s=e||(a.isVector2?new Vr:new xn);return s.copy(o).sub(a).normalize(),s}getTangentAt(t,e){const r=this.getUtoTmapping(t);return this.getTangent(r,e)}computeFrenetFrames(t,e){const r=new xn,n=[],i=[],a=[],o=new xn,s=new Jn;for(let e=0;e<=t;e++){const r=e/t;n[e]=this.getTangentAt(r,new xn)}i[0]=new xn,a[0]=new xn;let l=Number.MAX_VALUE;const c=Math.abs(n[0].x),u=Math.abs(n[0].y),h=Math.abs(n[0].z);c<=l&&(l=c,r.set(1,0,0)),u<=l&&(l=u,r.set(0,1,0)),h<=l&&r.set(0,0,1),o.crossVectors(n[0],r).normalize(),i[0].crossVectors(n[0],o),a[0].crossVectors(n[0],i[0]);for(let e=1;e<=t;e++){if(i[e]=i[e-1].clone(),a[e]=a[e-1].clone(),o.crossVectors(n[e-1],n[e]),o.length()>Number.EPSILON){o.normalize();const t=Math.acos(Pr(n[e-1].dot(n[e]),-1,1));i[e].applyMatrix4(s.makeRotationAxis(o,t))}a[e].crossVectors(n[e],i[e])}if(!0===e){let e=Math.acos(Pr(i[0].dot(i[t]),-1,1));e/=t,n[0].dot(o.crossVectors(i[0],i[t]))>0&&(e=-e);for(let r=1;r<=t;r++)i[r].applyMatrix4(s.makeRotationAxis(n[r],e*r)),a[r].crossVectors(n[r],i[r])}return{tangents:n,normals:i,binormals:a}}clone(){return(new this.constructor).copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class tu extends $c{constructor(t=0,e=0,r=1,n=1,i=0,a=2*Math.PI,o=!1,s=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=r,this.yRadius=n,this.aStartAngle=i,this.aEndAngle=a,this.aClockwise=o,this.aRotation=s}getPoint(t,e){const r=e||new Vr,n=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const a=Math.abs(i)n;)i-=n;i0?0:(Math.floor(Math.abs(l)/i)+1)*i:0===c&&l===i-1&&(l=i-2,c=1),this.closed||l>0?o=n[(l-1)%i]:(nu.subVectors(n[0],n[1]).add(n[0]),o=nu);const u=n[l%i],h=n[(l+1)%i];if(this.closed||l+2n.length-2?n.length-1:a+1],u=n[a>n.length-3?n.length-1:a+2];return r.set(lu(o,s.x,l.x,c.x,u.x),lu(o,s.y,l.y,c.y,u.y)),r}copy(t){super.copy(t),this.points=[];for(let e=0,r=t.points.length;e=r){const t=n[i]-r,a=this.curves[i],o=a.getLength(),s=0===o?0:1-t/o;return a.getPointAt(s,e)}i++}return null}getLength(){const t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let e=0;for(let r=0,n=this.curves.length;r1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(t){super.copy(t),this.curves=[];for(let e=0,r=t.curves.length;e0){const t=l.getPoint(0);t.equals(this.currentPoint)||this.lineTo(t.x,t.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class xu extends ma{constructor(t=[new Vr(0,-.5),new Vr(.5,0),new Vr(0,.5)],e=12,r=0,n=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:r,phiLength:n},e=Math.floor(e),n=Pr(n,0,2*Math.PI);const i=[],a=[],o=[],s=[],l=[],c=1/e,u=new xn,h=new Vr,f=new xn,d=new xn,p=new xn;let m=0,A=0;for(let e=0;e<=t.length-1;e++)switch(e){case 0:m=t[e+1].x-t[e].x,A=t[e+1].y-t[e].y,f.x=1*A,f.y=-m,f.z=0*A,p.copy(f),f.normalize(),s.push(f.x,f.y,f.z);break;case t.length-1:s.push(p.x,p.y,p.z);break;default:m=t[e+1].x-t[e].x,A=t[e+1].y-t[e].y,f.x=1*A,f.y=-m,f.z=0*A,d.copy(f),f.x+=p.x,f.y+=p.y,f.z+=p.z,f.normalize(),s.push(f.x,f.y,f.z),p.copy(d)}for(let i=0;i<=e;i++){const f=r+i*c*n,d=Math.sin(f),p=Math.cos(f);for(let r=0;r<=t.length-1;r++){u.x=t[r].x*d,u.y=t[r].y,u.z=t[r].x*p,a.push(u.x,u.y,u.z),h.x=i/e,h.y=r/(t.length-1),o.push(h.x,h.y);const n=s[3*r+0]*d,c=s[3*r+1],f=s[3*r+0]*p;l.push(n,c,f)}}for(let r=0;r0&&g(!0),e>0&&g(!1)),this.setIndex(c),this.setAttribute("position",new oa(u,3)),this.setAttribute("normal",new oa(h,3)),this.setAttribute("uv",new oa(f,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Eu(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Mu extends Eu{constructor(t=1,e=1,r=32,n=1,i=!1,a=0,o=2*Math.PI){super(0,t,e,r,n,i,a,o),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:r,heightSegments:n,openEnded:i,thetaStart:a,thetaLength:o}}static fromJSON(t){return new Mu(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Su extends ma{constructor(t=[],e=[],r=1,n=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:r,detail:n};const i=[],a=[];function o(t,e,r,n){const i=n+1,a=[];for(let n=0;n<=i;n++){a[n]=[];const o=t.clone().lerp(r,n/i),s=e.clone().lerp(r,n/i),l=i-n;for(let t=0;t<=l;t++)a[n][t]=0===t&&n===i?o:o.clone().lerp(s,t/l)}for(let t=0;t.9&&o<.1&&(e<.2&&(a[t+0]+=1),r<.2&&(a[t+2]+=1),n<.2&&(a[t+4]+=1))}}()}(),this.setAttribute("position",new oa(i,3)),this.setAttribute("normal",new oa(i.slice(),3)),this.setAttribute("uv",new oa(a,2)),0===n?this.computeVertexNormals():this.normalizeNormals()}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Su(t.vertices,t.indices,t.radius,t.details)}}class Cu extends Su{constructor(t=1,e=0){const r=(1+Math.sqrt(5))/2,n=1/r;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-n,-r,0,-n,r,0,n,-r,0,n,r,-n,-r,0,-n,r,0,n,-r,0,n,r,0,-r,0,-n,r,0,-n,-r,0,n,r,0,n],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new Cu(t.radius,t.detail)}}const Tu=new xn,Iu=new xn,Ru=new xn,Bu=new Pi;class ku extends ma{constructor(t=null,e=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:t,thresholdAngle:e},null!==t){const r=4,n=Math.pow(10,r),i=Math.cos(Br*e),a=t.getIndex(),o=t.getAttribute("position"),s=a?a.count:o.count,l=[0,0,0],c=["a","b","c"],u=new Array(3),h={},f=[];for(let t=0;t0)for(a=e;a=e;a-=n)o=eh(a,t[a],t[a+1],o);return o&&qu(o,o.next)&&(rh(o),o=o.next),o}function Du(t,e){if(!t)return t;e||(e=t);let r,n=t;do{if(r=!1,n.steiner||!qu(n,n.next)&&0!==Xu(n.prev,n,n.next))n=n.next;else{if(rh(n),n=e=n.prev,n===n.next)break;r=!0}}while(r||n!==e);return e}function Uu(t,e,r,n,i,a,o){if(!t)return;!o&&a&&function(t,e,r,n){let i=t;do{0===i.z&&(i.z=Qu(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){let e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(t,n,i,a);let s,l,c=t;for(;t.prev!==t.next;)if(s=t.prev,l=t.next,a?Fu(t,n,i,a):Ou(t))e.push(s.i/r|0),e.push(t.i/r|0),e.push(l.i/r|0),rh(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?Uu(t=Nu(Du(t),e,r),e,r,n,i,a,2):2===o&&zu(t,e,r,n,i,a):Uu(Du(t),e,r,n,i,a,1);break}}function Ou(t){const e=t.prev,r=t,n=t.next;if(Xu(e,r,n)>=0)return!1;const i=e.x,a=r.x,o=n.x,s=e.y,l=r.y,c=n.y,u=ia?i>o?i:o:a>o?a:o,d=s>l?s>c?s:c:l>c?l:c;let p=n.next;for(;p!==e;){if(p.x>=u&&p.x<=f&&p.y>=h&&p.y<=d&&Wu(i,s,a,l,o,c,p.x,p.y)&&Xu(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function Fu(t,e,r,n){const i=t.prev,a=t,o=t.next;if(Xu(i,a,o)>=0)return!1;const s=i.x,l=a.x,c=o.x,u=i.y,h=a.y,f=o.y,d=sl?s>c?s:c:l>c?l:c,A=u>h?u>f?u:f:h>f?h:f,g=Qu(d,p,e,r,n),v=Qu(m,A,e,r,n);let y=t.prevZ,b=t.nextZ;for(;y&&y.z>=g&&b&&b.z<=v;){if(y.x>=d&&y.x<=m&&y.y>=p&&y.y<=A&&y!==i&&y!==o&&Wu(s,u,l,h,c,f,y.x,y.y)&&Xu(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,b.x>=d&&b.x<=m&&b.y>=p&&b.y<=A&&b!==i&&b!==o&&Wu(s,u,l,h,c,f,b.x,b.y)&&Xu(b.prev,b,b.next)>=0)return!1;b=b.nextZ}for(;y&&y.z>=g;){if(y.x>=d&&y.x<=m&&y.y>=p&&y.y<=A&&y!==i&&y!==o&&Wu(s,u,l,h,c,f,y.x,y.y)&&Xu(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;b&&b.z<=v;){if(b.x>=d&&b.x<=m&&b.y>=p&&b.y<=A&&b!==i&&b!==o&&Wu(s,u,l,h,c,f,b.x,b.y)&&Xu(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Nu(t,e,r){let n=t;do{const i=n.prev,a=n.next.next;!qu(i,a)&&Yu(i,n,n.next,a)&&$u(i,a)&&$u(a,i)&&(e.push(i.i/r|0),e.push(n.i/r|0),e.push(a.i/r|0),rh(n),rh(n.next),n=t=a),n=n.next}while(n!==t);return Du(n)}function zu(t,e,r,n,i,a){let o=t;do{let t=o.next.next;for(;t!==o.prev;){if(o.i!==t.i&&Hu(o,t)){let s=th(o,t);return o=Du(o,o.next),s=Du(s,s.next),Uu(o,e,r,n,i,a,0),void Uu(s,e,r,n,i,a,0)}t=t.next}o=o.next}while(o!==t)}function Gu(t,e){return t.x-e.x}function Zu(t,e){const r=function(t,e){let r,n=e,i=-1/0;const a=t.x,o=t.y;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){const t=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=a&&t>i&&(i=t,r=n.x=n.x&&n.x>=l&&a!==n.x&&Wu(or.x||n.x===r.x&&Vu(r,n)))&&(r=n,h=u)),n=n.next}while(n!==s);return r}(t,e);if(!r)return e;const n=th(r,t);return Du(n,n.next),Du(r,r.next)}function Vu(t,e){return Xu(t.prev,t,e.prev)<0&&Xu(e.next,t,t.next)<0}function Qu(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function ju(t){let e=t,r=t;do{(e.x=(t-o)*(a-s)&&(t-o)*(n-s)>=(r-o)*(e-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function Hu(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&Yu(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&($u(t,e)&&$u(e,t)&&function(t,e){let r=t,n=!1;const i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(Xu(t.prev,t,e.prev)||Xu(t,e.prev,e))||qu(t,e)&&Xu(t.prev,t,t.next)>0&&Xu(e.prev,e,e.next)>0)}function Xu(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function qu(t,e){return t.x===e.x&&t.y===e.y}function Yu(t,e,r,n){const i=Ku(Xu(t,e,r)),a=Ku(Xu(t,e,n)),o=Ku(Xu(r,n,t)),s=Ku(Xu(r,n,e));return i!==a&&o!==s||!(0!==i||!Ju(t,r,e))||!(0!==a||!Ju(t,n,e))||!(0!==o||!Ju(r,t,n))||!(0!==s||!Ju(r,e,n))}function Ju(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function Ku(t){return t>0?1:t<0?-1:0}function $u(t,e){return Xu(t.prev,t,t.next)<0?Xu(t,e,t.next)>=0&&Xu(t,t.prev,e)>=0:Xu(t,e,t.prev)<0||Xu(t,t.next,e)<0}function th(t,e){const r=new nh(t.i,t.x,t.y),n=new nh(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function eh(t,e,r,n){const i=new nh(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function rh(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function nh(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class ih{static area(t){const e=t.length;let r=0;for(let n=e-1,i=0;i80*r){s=c=t[0],l=u=t[1];for(let e=r;ec&&(c=h),f>u&&(u=f);d=Math.max(c-s,u-l),d=0!==d?32767/d:0}return Uu(a,o,r,s,l,d,0),o}(r,n);for(let t=0;t2&&t[e-1].equals(t[0])&&t.pop()}function oh(t,e){for(let r=0;rNumber.EPSILON){const h=Math.sqrt(u),f=Math.sqrt(l*l+c*c),d=e.x-s/h,p=e.y+o/h,m=((r.x-c/f-d)*c-(r.y+l/f-p)*l)/(o*c-s*l);n=d+o*m-t.x,i=p+s*m-t.y;const A=n*n+i*i;if(A<=2)return new Vr(n,i);a=Math.sqrt(A/2)}else{let t=!1;o>Number.EPSILON?l>Number.EPSILON&&(t=!0):o<-Number.EPSILON?l<-Number.EPSILON&&(t=!0):Math.sign(s)===Math.sign(c)&&(t=!0),t?(n=-s,i=o,a=Math.sqrt(u)):(n=o,i=s,a=Math.sqrt(u/2))}return new Vr(n/a,i/a)}const B=[];for(let t=0,e=S.length,r=e-1,n=t+1;t=0;t--){const e=t/d,r=u*Math.cos(e*Math.PI/2),n=h*Math.sin(e*Math.PI/2)+f;for(let t=0,e=S.length;t=0;){const n=r;let i=r-1;i<0&&(i=t.length-1);for(let t=0,r=s+2*d;t0)&&f.push(e,i,l),(t!==r-1||s0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class Mh extends Ui{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Gi(16777215),this.specular=new Gi(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Gi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Fe,this.normalScale=new Vr(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class Sh extends Ui{constructor(t){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Gi(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Gi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Fe,this.normalScale=new Vr(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}class Ch extends Ui{constructor(t){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Fe,this.normalScale=new Vr(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}class Th extends Ui{constructor(t){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Gi(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Gi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Fe,this.normalScale=new Vr(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class Ih extends Ui{constructor(t){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Gi(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Fe,this.normalScale=new Vr(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this.fog=t.fog,this}}class Rh extends Rc{constructor(t){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}function Bh(t,e,r){return Lh(t)?new t.constructor(t.subarray(e,void 0!==r?r:t.length)):t.slice(e,r)}function kh(t,e,r){return!t||!r&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)}function Lh(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Ph(t){const e=t.length,r=new Array(e);for(let t=0;t!==e;++t)r[t]=t;return r.sort((function(e,r){return t[e]-t[r]})),r}function Dh(t,e,r){const n=t.length,i=new t.constructor(n);for(let a=0,o=0;o!==n;++a){const n=r[a]*e;for(let r=0;r!==e;++r)i[o++]=t[n+r]}return i}function Uh(t,e,r,n){let i=1,a=t[0];for(;void 0!==a&&void 0===a[n];)a=t[i++];if(void 0===a)return;let o=a[n];if(void 0!==o)if(Array.isArray(o))do{o=a[n],void 0!==o&&(e.push(a.time),r.push.apply(r,o)),a=t[i++]}while(void 0!==a);else if(void 0!==o.toArray)do{o=a[n],void 0!==o&&(e.push(a.time),o.toArray(r,r.length)),a=t[i++]}while(void 0!==a);else do{o=a[n],void 0!==o&&(e.push(a.time),r.push(o)),a=t[i++]}while(void 0!==a)}const Oh={arraySlice:Bh,convertArray:kh,isTypedArray:Lh,getKeyframeOrder:Ph,sortedArray:Dh,flattenJSON:Uh,subclip:function(t,e,r,n,i=30){const a=t.clone();a.name=e;const o=[];for(let t=0;t=n)){l.push(e.times[t]);for(let r=0;ra.tracks[t].times[0]&&(s=a.tracks[t].times[0]);for(let t=0;t=n.times[h]){const t=h*l+s,e=t+l-s;f=Bh(n.values,t,e)}else{const t=n.createInterpolant(),e=s,r=l-s;t.evaluate(a),f=Bh(t.resultBuffer,e,r)}"quaternion"===i&&(new bn).fromArray(f).normalize().conjugate().toArray(f);const d=o.times.length;for(let t=0;t=i)break t;{const o=e[1];t=i)break e}a=r,r=0}}for(;r>>1;te;)--a;if(++a,0!==i||a!==n){i>=a&&(a=Math.max(a,1),i=a-1);const t=this.getValueSize();this.times=Bh(r,i,a),this.values=Bh(this.values,i*t,a*t)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const r=this.times,n=this.values,i=r.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let a=null;for(let e=0;e!==i;e++){const n=r[e];if("number"==typeof n&&isNaN(n)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,e,n),t=!1;break}if(null!==a&&a>n){console.error("THREE.KeyframeTrack: Out of order keys.",this,e,n,a),t=!1;break}a=n}if(void 0!==n&&Lh(n))for(let e=0,r=n.length;e!==r;++e){const r=n[e];if(isNaN(r)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,e,r),t=!1;break}}return t}optimize(){const t=Bh(this.times),e=Bh(this.values),r=this.getValueSize(),n=this.getInterpolation()===Me,i=t.length-1;let a=1;for(let o=1;o0){t[a]=t[i];for(let t=i*r,n=a*r,o=0;o!==r;++o)e[n+o]=e[t+o];++a}return a!==t.length?(this.times=Bh(t,0,a),this.values=Bh(e,0,a*r)):(this.times=t,this.values=e),this}clone(){const t=Bh(this.times,0),e=Bh(this.values,0),r=new(0,this.constructor)(this.name,t,e);return r.createInterpolant=this.createInterpolant,r}}Zh.prototype.TimeBufferType=Float32Array,Zh.prototype.ValueBufferType=Float32Array,Zh.prototype.DefaultInterpolation=Ee;class Vh extends Zh{}Vh.prototype.ValueTypeName="bool",Vh.prototype.ValueBufferType=Array,Vh.prototype.DefaultInterpolation=_e,Vh.prototype.InterpolantFactoryMethodLinear=void 0,Vh.prototype.InterpolantFactoryMethodSmooth=void 0;class Qh extends Zh{}Qh.prototype.ValueTypeName="color";class jh extends Zh{}jh.prototype.ValueTypeName="number";class Wh extends Fh{constructor(t,e,r,n){super(t,e,r,n)}interpolate_(t,e,r,n){const i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(r-e)/(n-e);let l=t*o;for(let t=l+o;l!==t;l+=4)bn.slerpFlat(i,0,a,l-o,a,l,s);return i}}class Hh extends Zh{InterpolantFactoryMethodLinear(t){return new Wh(this.times,this.values,this.getValueSize(),t)}}Hh.prototype.ValueTypeName="quaternion",Hh.prototype.DefaultInterpolation=Ee,Hh.prototype.InterpolantFactoryMethodSmooth=void 0;class Xh extends Zh{}Xh.prototype.ValueTypeName="string",Xh.prototype.ValueBufferType=Array,Xh.prototype.DefaultInterpolation=_e,Xh.prototype.InterpolantFactoryMethodLinear=void 0,Xh.prototype.InterpolantFactoryMethodSmooth=void 0;class qh extends Zh{}qh.prototype.ValueTypeName="vector";class Yh{constructor(t,e=-1,r,n=Ie){this.name=t,this.tracks=r,this.duration=e,this.blendMode=n,this.uuid=Lr(),this.duration<0&&this.resetDuration()}static parse(t){const e=[],r=t.tracks,n=1/(t.fps||1);for(let t=0,i=r.length;t!==i;++t)e.push(Jh(r[t]).scale(n));const i=new this(t.name,t.duration,e,t.blendMode);return i.uuid=t.uuid,i}static toJSON(t){const e=[],r=t.tracks,n={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let t=0,n=r.length;t!==n;++t)e.push(Zh.toJSON(r[t]));return n}static CreateFromMorphTargetSequence(t,e,r,n){const i=e.length,a=[];for(let t=0;t1){const t=a[1];let e=n[t];e||(n[t]=e=[]),e.push(r)}}const a=[];for(const t in n)a.push(this.CreateFromMorphTargetSequence(t,n[t],e,r));return a}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(t,e,r,n,i){if(0!==r.length){const a=[],o=[];Uh(r,a,o,n),0!==a.length&&i.push(new t(e,a,o))}},n=[],i=t.name||"default",a=t.fps||30,o=t.blendMode;let s=t.length||-1;const l=t.hierarchy||[];for(let t=0;t{e&&e(i),this.manager.itemEnd(t)}),0),i;if(void 0!==rf[t])return void rf[t].push({onLoad:e,onProgress:r,onError:n});rf[t]=[],rf[t].push({onLoad:e,onProgress:r,onError:n});const a=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),o=this.mimeType,s=this.responseType;fetch(a).then((e=>{if(200===e.status||0===e.status){if(0===e.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===e.body||void 0===e.body.getReader)return e;const r=rf[t],n=e.body.getReader(),i=e.headers.get("Content-Length")||e.headers.get("X-File-Size"),a=i?parseInt(i):0,o=0!==a;let s=0;const l=new ReadableStream({start(t){!function e(){n.read().then((({done:n,value:i})=>{if(n)t.close();else{s+=i.byteLength;const n=new ProgressEvent("progress",{lengthComputable:o,loaded:s,total:a});for(let t=0,e=r.length;t{switch(s){case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"document":return t.text().then((t=>(new DOMParser).parseFromString(t,o)));case"json":return t.json();default:if(void 0===o)return t.text();{const e=/charset="?([^;"\s]*)"?/i.exec(o),r=e&&e[1]?e[1].toLowerCase():void 0,n=new TextDecoder(r);return t.arrayBuffer().then((t=>n.decode(t)))}}})).then((e=>{Kh.add(t,e);const r=rf[t];delete rf[t];for(let t=0,n=r.length;t{const r=rf[t];if(void 0===r)throw this.manager.itemError(t),e;delete rf[t];for(let t=0,n=r.length;t{this.manager.itemEnd(t)})),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class of extends ef{constructor(t){super(t)}load(t,e,r,n){const i=this,a=new af(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,(function(r){try{e(i.parse(JSON.parse(r)))}catch(e){n?n(e):console.error(e),i.manager.itemError(t)}}),r,n)}parse(t){const e=[];for(let r=0;r0:n.vertexColors=t.vertexColors),void 0!==t.uniforms)for(const e in t.uniforms){const i=t.uniforms[e];switch(n.uniforms[e]={},i.type){case"t":n.uniforms[e].value=r(i.value);break;case"c":n.uniforms[e].value=(new Gi).setHex(i.value);break;case"v2":n.uniforms[e].value=(new Vr).fromArray(i.value);break;case"v3":n.uniforms[e].value=(new xn).fromArray(i.value);break;case"v4":n.uniforms[e].value=(new dn).fromArray(i.value);break;case"m3":n.uniforms[e].value=(new Qr).fromArray(i.value);break;case"m4":n.uniforms[e].value=(new Jn).fromArray(i.value);break;default:n.uniforms[e].value=i.value}}if(void 0!==t.defines&&(n.defines=t.defines),void 0!==t.vertexShader&&(n.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(n.fragmentShader=t.fragmentShader),void 0!==t.glslVersion&&(n.glslVersion=t.glslVersion),void 0!==t.extensions)for(const e in t.extensions)n.extensions[e]=t.extensions[e];if(void 0!==t.lights&&(n.lights=t.lights),void 0!==t.clipping&&(n.clipping=t.clipping),void 0!==t.size&&(n.size=t.size),void 0!==t.sizeAttenuation&&(n.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(n.map=r(t.map)),void 0!==t.matcap&&(n.matcap=r(t.matcap)),void 0!==t.alphaMap&&(n.alphaMap=r(t.alphaMap)),void 0!==t.bumpMap&&(n.bumpMap=r(t.bumpMap)),void 0!==t.bumpScale&&(n.bumpScale=t.bumpScale),void 0!==t.normalMap&&(n.normalMap=r(t.normalMap)),void 0!==t.normalMapType&&(n.normalMapType=t.normalMapType),void 0!==t.normalScale){let e=t.normalScale;!1===Array.isArray(e)&&(e=[e,e]),n.normalScale=(new Vr).fromArray(e)}return void 0!==t.displacementMap&&(n.displacementMap=r(t.displacementMap)),void 0!==t.displacementScale&&(n.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(n.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(n.roughnessMap=r(t.roughnessMap)),void 0!==t.metalnessMap&&(n.metalnessMap=r(t.metalnessMap)),void 0!==t.emissiveMap&&(n.emissiveMap=r(t.emissiveMap)),void 0!==t.emissiveIntensity&&(n.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(n.specularMap=r(t.specularMap)),void 0!==t.specularIntensityMap&&(n.specularIntensityMap=r(t.specularIntensityMap)),void 0!==t.specularColorMap&&(n.specularColorMap=r(t.specularColorMap)),void 0!==t.envMap&&(n.envMap=r(t.envMap)),void 0!==t.envMapIntensity&&(n.envMapIntensity=t.envMapIntensity),void 0!==t.reflectivity&&(n.reflectivity=t.reflectivity),void 0!==t.refractionRatio&&(n.refractionRatio=t.refractionRatio),void 0!==t.lightMap&&(n.lightMap=r(t.lightMap)),void 0!==t.lightMapIntensity&&(n.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(n.aoMap=r(t.aoMap)),void 0!==t.aoMapIntensity&&(n.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(n.gradientMap=r(t.gradientMap)),void 0!==t.clearcoatMap&&(n.clearcoatMap=r(t.clearcoatMap)),void 0!==t.clearcoatRoughnessMap&&(n.clearcoatRoughnessMap=r(t.clearcoatRoughnessMap)),void 0!==t.clearcoatNormalMap&&(n.clearcoatNormalMap=r(t.clearcoatNormalMap)),void 0!==t.clearcoatNormalScale&&(n.clearcoatNormalScale=(new Vr).fromArray(t.clearcoatNormalScale)),void 0!==t.iridescenceMap&&(n.iridescenceMap=r(t.iridescenceMap)),void 0!==t.iridescenceThicknessMap&&(n.iridescenceThicknessMap=r(t.iridescenceThicknessMap)),void 0!==t.transmissionMap&&(n.transmissionMap=r(t.transmissionMap)),void 0!==t.thicknessMap&&(n.thicknessMap=r(t.thicknessMap)),void 0!==t.anisotropyMap&&(n.anisotropyMap=r(t.anisotropyMap)),void 0!==t.sheenColorMap&&(n.sheenColorMap=r(t.sheenColorMap)),void 0!==t.sheenRoughnessMap&&(n.sheenRoughnessMap=r(t.sheenRoughnessMap)),n}setTextures(t){return this.textures=t,this}static createMaterialFromType(t){return new{ShadowMaterial:xh,SpriteMaterial:Gl,RawShaderMaterial:wh,ShaderMaterial:za,PointsMaterial:Gc,MeshPhysicalMaterial:Eh,MeshStandardMaterial:_h,MeshPhongMaterial:Mh,MeshToonMaterial:Sh,MeshNormalMaterial:Ch,MeshLambertMaterial:Th,MeshDepthMaterial:vl,MeshDistanceMaterial:yl,MeshBasicMaterial:Vi,MeshMatcapMaterial:Ih,LineDashedMaterial:Rh,LineBasicMaterial:Rc,Material:Ui}[t]}}class kf{static decodeText(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);let e="";for(let r=0,n=t.length;r0){const r=new $h(e);i=new lf(r),i.setCrossOrigin(this.crossOrigin);for(let e=0,r=t.length;e0){n=new lf(this.manager),n.setCrossOrigin(this.crossOrigin);for(let e=0,n=t.length;e0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t0&&this._mixBufferRegionAdditive(r,n,this._addIndex*e,1,e);for(let t=e,i=e+e;t!==i;++t)if(r[t]!==r[t+e]){o.setValue(r,n);break}}saveOriginalState(){const t=this.binding,e=this.buffer,r=this.valueSize,n=r*this._origIndex;t.getValue(e,n);for(let t=r,i=n;t!==i;++t)e[t]=e[n+t%r];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=3*this.valueSize;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let r=t;r=.5)for(let n=0;n!==i;++n)t[e+n]=t[r+n]}_slerp(t,e,r,n){bn.slerpFlat(t,e,t,e,t,r,n)}_slerpAdditive(t,e,r,n,i){const a=this._workIndex*i;bn.multiplyQuaternionsFlat(t,a,t,e,t,r),bn.slerpFlat(t,e,t,e,t,a,n)}_lerp(t,e,r,n,i){const a=1-n;for(let o=0;o!==i;++o){const i=e+o;t[i]=t[i]*a+t[r+o]*n}}_lerpAdditive(t,e,r,n,i){for(let a=0;a!==i;++a){const i=e+a;t[i]=t[i]+t[r+a]*n}}}const ud="\\[\\]\\.:\\/",hd=new RegExp("["+ud+"]","g"),fd="[^"+ud+"]",dd="[^"+ud.replace("\\.","")+"]",pd=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",fd)+/(WCOD+)?/.source.replace("WCOD",dd)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",fd)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",fd)+"$"),md=["material","materials","bones","map"];class Ad{constructor(t,e,r){this.path=e,this.parsedPath=r||Ad.parseTrackName(e),this.node=Ad.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,r){return t&&t.isAnimationObjectGroup?new Ad.Composite(t,e,r):new Ad(t,e,r)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(hd,"")}static parseTrackName(t){const e=pd.exec(t);if(null===e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const r={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},n=r.nodeName&&r.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){const t=r.nodeName.substring(n+1);-1!==md.indexOf(t)&&(r.nodeName=r.nodeName.substring(0,n),r.objectName=t)}if(null===r.propertyName||0===r.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return r}static findNode(t,e){if(void 0===e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){const r=t.skeleton.getBoneByName(e);if(void 0!==r)return r}if(t.children){const r=function(t){for(let n=0;n=i){const a=i++,c=t[a];e[c.uuid]=l,t[l]=c,e[s]=a,t[a]=o;for(let t=0,e=n;t!==e;++t){const e=r[t],n=e[a],i=e[l];e[l]=n,e[a]=i}}}this.nCachedObjects_=i}uncache(){const t=this._objects,e=this._indicesByUUID,r=this._bindings,n=r.length;let i=this.nCachedObjects_,a=t.length;for(let o=0,s=arguments.length;o!==s;++o){const s=arguments[o].uuid,l=e[s];if(void 0!==l)if(delete e[s],l0&&(e[o.uuid]=l),t[l]=o,t.pop();for(let t=0,e=n;t!==e;++t){const e=r[t];e[l]=e[i],e.pop()}}}this.nCachedObjects_=i}subscribe_(t,e){const r=this._bindingsIndicesByPath;let n=r[t];const i=this._bindings;if(void 0!==n)return i[n];const a=this._paths,o=this._parsedPaths,s=this._objects,l=s.length,c=this.nCachedObjects_,u=new Array(l);n=i.length,r[t]=n,a.push(t),o.push(e),i.push(u);for(let r=c,n=s.length;r!==n;++r){const n=s[r];u[r]=new Ad(n,t,e)}return u}unsubscribe_(t){const e=this._bindingsIndicesByPath,r=e[t];if(void 0!==r){const n=this._paths,i=this._parsedPaths,a=this._bindings,o=a.length-1,s=a[o];e[t[o]]=r,a[r]=s,a.pop(),i[r]=i[o],i.pop(),n[r]=n[o],n.pop()}}}class vd{constructor(t,e,r=null,n=e.blendMode){this._mixer=t,this._clip=e,this._localRoot=r,this.blendMode=n;const i=e.tracks,a=i.length,o=new Array(a),s={endingStart:Se,endingEnd:Se};for(let t=0;t!==a;++t){const e=i[t].createInterpolant(null);o[t]=e,e.settings=s}this._interpolantSettings=s,this._interpolants=o,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=xe,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,e){return this.loop=t,this.repetitions=e,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,e,r){if(t.fadeOut(e),this.fadeIn(e),r){const r=this._clip.duration,n=t._clip.duration,i=n/r,a=r/n;t.warp(1,i,e),this.warp(a,1,e)}return this}crossFadeTo(t,e,r){return t.crossFadeFrom(this,e,r)}stopFading(){const t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,e,r){const n=this._mixer,i=n.time,a=this.timeScale;let o=this._timeScaleInterpolant;null===o&&(o=n._lendControlInterpolant(),this._timeScaleInterpolant=o);const s=o.parameterPositions,l=o.sampleValues;return s[0]=i,s[1]=i+r,l[0]=t/a,l[1]=e/a,this}stopWarping(){const t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,e,r,n){if(!this.enabled)return void this._updateWeight(t);const i=this._startTime;if(null!==i){const n=(t-i)*r;n<0||0===r?e=0:(this._startTime=null,e=r*n)}e*=this._updateTimeScale(t);const a=this._updateTime(e),o=this._updateWeight(t);if(o>0){const t=this._interpolants,e=this._propertyBindings;if(this.blendMode===Re)for(let r=0,n=t.length;r!==n;++r)t[r].evaluate(a),e[r].accumulateAdditive(o);else for(let r=0,i=t.length;r!==i;++r)t[r].evaluate(a),e[r].accumulate(n,o)}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;const r=this._weightInterpolant;if(null!==r){const n=r.evaluate(t)[0];e*=n,t>r.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;const r=this._timeScaleInterpolant;null!==r&&(e*=r.evaluate(t)[0],t>r.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e))}return this._effectiveTimeScale=e,e}_updateTime(t){const e=this._clip.duration,r=this.loop;let n=this.time+t,i=this._loopCount;const a=r===we;if(0===t)return-1===i?n:a&&1==(1&i)?e-n:n;if(r===be){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(n>=e)n=e;else{if(!(n<0)){this.time=n;break t}n=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),n>=e||n<0){const r=Math.floor(n/e);n-=e*r,i+=Math.abs(r);const o=this.repetitions-i;if(o<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,n=t>0?e:0,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===o){const e=t<0;this._setEndings(e,!e,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:r})}}else this.time=n;if(a&&1==(1&i))return e-n}return n}_setEndings(t,e,r){const n=this._interpolantSettings;r?(n.endingStart=Ce,n.endingEnd=Ce):(n.endingStart=t?this.zeroSlopeAtStart?Ce:Se:Te,n.endingEnd=e?this.zeroSlopeAtEnd?Ce:Se:Te)}_scheduleFading(t,e,r){const n=this._mixer,i=n.time;let a=this._weightInterpolant;null===a&&(a=n._lendControlInterpolant(),this._weightInterpolant=a);const o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=e,o[1]=i+t,s[1]=r,this}}const yd=new Float32Array(1);class bd extends Tr{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,e){const r=t._localRoot||this._root,n=t._clip.tracks,i=n.length,a=t._propertyBindings,o=t._interpolants,s=r.uuid,l=this._bindingsByRootAndName;let c=l[s];void 0===c&&(c={},l[s]=c);for(let t=0;t!==i;++t){const i=n[t],l=i.name;let u=c[l];if(void 0!==u)++u.referenceCount,a[t]=u;else{if(u=a[t],void 0!==u){null===u._cacheIndex&&(++u.referenceCount,this._addInactiveBinding(u,s,l));continue}const n=e&&e._propertyBindings[t].binding.parsedPath;u=new cd(Ad.create(r,l,n),i.ValueTypeName,i.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,s,l),a[t]=u}o[t].resultBuffer=u.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){const e=(t._localRoot||this._root).uuid,r=t._clip.uuid,n=this._actionsByClip[r];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,r,e)}const e=t._propertyBindings;for(let t=0,r=e.length;t!==r;++t){const r=e[t];0==r.useCount++&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const e=t._propertyBindings;for(let t=0,r=e.length;t!==r;++t){const r=e[t];0==--r.useCount&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const e=t._cacheIndex;return null!==e&&e=0;--e)t[e].stop();return this}update(t){t*=this.timeScale;const e=this._actions,r=this._nActiveActions,n=this.time+=t,i=Math.sign(t),a=this._accuIndex^=1;for(let o=0;o!==r;++o)e[o]._update(n,t,i,a);const o=this._bindings,s=this._nActiveBindings;for(let t=0;t!==s;++t)o[t].apply(a);return this}setTime(t){this.time=0;for(let t=0;tthis.max.x||t.ythis.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,Bd).distanceTo(t)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const Ld=new xn,Pd=new xn;class Dd{constructor(t=new xn,e=new xn){this.start=t,this.end=e}set(t,e){return this.start.copy(t),this.end.copy(e),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,e){return this.delta(e).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,e){Ld.subVectors(t,this.start),Pd.subVectors(this.end,this.start);const r=Pd.dot(Pd);let n=Pd.dot(Ld)/r;return e&&(n=Pr(n,0,1)),n}closestPointToPoint(t,e,r){const n=this.closestPointToPointParameter(t,e);return this.delta(r).multiplyScalar(n).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}const Ud=new xn;class Od extends wi{constructor(t,e){super(),this.light=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,this.type="SpotLightHelper";const r=new ma,n=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let t=0,e=1,r=32;t1)for(let r=0;r.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{lp.set(t.z,0,-t.x).normalize();const e=Math.acos(t.y);this.quaternion.setFromAxisAngle(lp,e)}}setLength(t,e=.2*t,r=.2*e){this.line.scale.set(1,Math.max(1e-4,t-e),1),this.line.updateMatrix(),this.cone.scale.set(r,e,r),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class fp extends Nc{constructor(t=1){const e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],r=new ma;r.setAttribute("position",new oa(e,3)),r.setAttribute("color",new oa([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(r,new Rc({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(t,e,r){const n=new Gi,i=this.geometry.attributes.color.array;return n.set(t),n.toArray(i,0),n.toArray(i,3),n.set(e),n.toArray(i,6),n.toArray(i,9),n.set(r),n.toArray(i,12),n.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class dp{constructor(){this.type="ShapePath",this.color=new Gi,this.subPaths=[],this.currentPath=null}moveTo(t,e){return this.currentPath=new bu,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e),this}lineTo(t,e){return this.currentPath.lineTo(t,e),this}quadraticCurveTo(t,e,r,n){return this.currentPath.quadraticCurveTo(t,e,r,n),this}bezierCurveTo(t,e,r,n,i,a){return this.currentPath.bezierCurveTo(t,e,r,n,i,a),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t){function e(t,e){const r=e.length;let n=!1;for(let i=r-1,a=0;aNumber.EPSILON){if(l<0&&(r=e[a],s=-s,o=e[i],l=-l),t.yo.y)continue;if(t.y===r.y){if(t.x===r.x)return!0}else{const e=l*(t.x-r.x)-s*(t.y-r.y);if(0===e)return!0;if(e<0)continue;n=!n}}else{if(t.y!==r.y)continue;if(o.x<=t.x&&t.x<=r.x||r.x<=t.x&&t.x<=o.x)return!0}}return n}const r=ih.isClockWise,n=this.subPaths;if(0===n.length)return[];let i,a,o;const s=[];if(1===n.length)return a=n[0],o=new Lu,o.curves=a.curves,s.push(o),s;let l=!r(n[0].getPoints());l=t?!l:l;const c=[],u=[];let h,f,d=[],p=0;u[p]=void 0,d[p]=[];for(let e=0,o=n.length;e1){let t=!1,r=0;for(let t=0,e=u.length;t0&&!1===t&&(d=c)}for(let t=0,e=u.length;t{if(!r){var o=1/0;for(u=0;u=a)&&Object.keys(n.O).every((t=>n.O[t](r[l])))?r.splice(l--,1):(s=!1,a0&&t[u-1][2]>a;u--)t[u]=t[u-1];t[u]=[r,i,a]},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={764:0};n.O.j=e=>0===t[e];var e=(e,r)=>{var i,a,[o,s,l]=r,c=0;if(o.some((e=>0!==t[e]))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(l)var u=l(n)}for(e&&e(r);c(()=>{var t,e={75550:t=>{"use strict";function e(t,e){this.x=t,this.y=e}t.exports=e,e.prototype={clone:function(){return new e(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),a=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},e.convert=function(t){return t instanceof e?t:Array.isArray(t)?new e(t[0],t[1]):t}},38929:(t,e,r)=>{t.exports.VectorTile=r(22779),r(66024),r(59701)},22779:(t,e,r)=>{"use strict";var n=r(59701);function i(t,e,r){if(3===t){var i=new n(r,r.readVarint()+r.pos);i.length&&(e[i.name]=i)}}t.exports=function(t,e){this.layers=t.readFields(i,{},e)}},66024:(t,e,r)=>{"use strict";var n=r(75550);function i(t,e,r,n,i){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=i,t.readFields(a,this,e)}function a(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){for(var r=t.readVarint()+t.pos;t.pos>3}if(a--,1===i||2===i)o+=t.readSVarint(),s+=t.readSVarint(),1===i&&(e&&c.push(e),e=[]),e.push(new n(o,s));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&c.push(e),c},i.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,c=1/0,l=-1/0;t.pos>3}if(n--,1===r||2===r)(i+=t.readSVarint())s&&(s=i),(a+=t.readSVarint())l&&(l=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,c,s,l]},i.prototype.toGeoJSON=function(t,e,r){var n,a,s=this.extent*Math.pow(2,r),c=this.extent*t,l=this.extent*e,u=this.loadGeometry(),h=i.types[this.type];function f(t){for(var e=0;e{"use strict";var n=r(66024);function i(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(a,this,e),this.length=this._features.length}function a(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){for(var e=null,r=t.readVarint()+t.pos;t.pos>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(r))}t.exports=i,i.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new n(this._pbf,e,this.extent,this._keys,this._values)}},36194:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>v});var n,i={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-i.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*i.Bounce.In(2*t):.5*i.Bounce.Out(2*t-1)+.5}}},a="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},o=function(){function t(){this._tweens={},this._tweensAddedDuringUpdate={}}return t.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map((function(e){return t._tweens[e]}))},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},t.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},t.prototype.update=function(t,e){void 0===t&&(t=a()),void 0===e&&(e=!1);var r=Object.keys(this._tweens);if(0===r.length)return!1;for(;r.length>0;){this._tweensAddedDuringUpdate={};for(var n=0;n1?a(t[r],t[r-1],r-n):a(t[i],t[i+1>r?r:i+1],n-i)},Bezier:function(t,e){for(var r=0,n=t.length-1,i=Math.pow,a=s.Utils.Bernstein,o=0;o<=n;o++)r+=i(1-e,n-o)*i(e,o)*t[o]*a(n,o);return r},CatmullRom:function(t,e){var r=t.length-1,n=r*e,i=Math.floor(n),a=s.Utils.CatmullRom;return t[0]===t[r]?(e<0&&(i=Math.floor(n=r*(1+e))),a(t[(i-1+r)%r],t[i],t[(i+1)%r],t[(i+2)%r],n-i)):e<0?t[0]-(a(t[0],t[0],t[1],t[1],-n)-t[0]):e>1?t[r]-(a(t[r],t[r],t[r-1],t[r-1],n-r)-t[r]):a(t[i?i-1:0],t[i],t[r1;r--)e*=r;return n[t]=e,e}),CatmullRom:function(t,e,r,n,i){var a=.5*(r-t),o=.5*(n-e),s=i*i;return(2*e-2*r+a+o)*(i*s)+(-3*e+3*r-2*a-o)*s+a*i+e}}},c=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),l=new o,u=function(){function t(t,e){void 0===e&&(e=l),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=i.Linear.None,this._interpolationFunction=s.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=c.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.to=function(t,e){return this._valuesEnd=Object.create(t),void 0!==e&&(this._duration=e),this},t.prototype.duration=function(t){return this._duration=t,this},t.prototype.start=function(t){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var e in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==t?"string"==typeof t?a()+parseFloat(t):t:a(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},t.prototype._setupProperties=function(t,e,r,n){for(var i in r){var a=t[i],o=Array.isArray(a),s=o?"array":typeof a,c=!o&&Array.isArray(r[i]);if("undefined"!==s&&"function"!==s){if(c){var l=r[i];if(0===l.length)continue;l=l.map(this._handleRelativeValue.bind(this,a)),r[i]=[a].concat(l)}if("object"!==s&&!o||!a||c)void 0===e[i]&&(e[i]=a),o||(e[i]*=1),n[i]=c?r[i].slice().reverse():e[i]||0;else{for(var u in e[i]=o?[]:{},a)e[i][u]=a[u];n[i]=o?[]:{},this._setupProperties(a,e[i],r[i],n[i])}}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},t.prototype.pause=function(t){return void 0===t&&(t=a()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this)),this},t.prototype.resume=function(t){return void 0===t&&(t=a()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},t.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;ti)return!1;e&&this.start(t)}if(this._goToEnd=!1,t1?1:n;var o=this._easingFunction(n);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,n),1===n){if(this._repeat>0){for(r in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[r]||(this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(this._valuesEnd[r])),this._yoyo&&this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var s=0,c=this._chainedTweens.length;s{"use strict";r.d(e,{Q:()=>rt,Z:()=>pt});var n=r(15671),i=r(43144),a=r(97326),o=r(79340),s=r(82963),c=r(61120),l=r(99477);var u=1e3/60,h=function(t){t.id&&(clearInterval(t.id),t.id=void 0),t.waitTimer&&(clearInterval(t.waitTimer),t.waitTimer=void 0),t.keyframe=0},f=function(t){h(t),t.isEnded()&&t.dispatchEvent({type:"animation-ended"}),t.dispatchEvent({type:"animation-stopped"}),t.duration=0};const d=function(t){(0,o.Z)(l,t);var e,r,a=(e=l,r=function(){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(t){return!1}}(),function(){var t,n=(0,c.Z)(e);if(r){var i=(0,c.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,s.Z)(this,t)});function l(){var t;return(0,n.Z)(this,l),(t=a.call(this)).id=null,t.keyframe=0,t.duration=0,t.state=0,t.waitTimer=null,t.callback=function(){},t}return(0,i.Z)(l,[{key:"isPlaying",value:function(){return 1===this.state}},{key:"isStopped",value:function(){return 0===this.state}},{key:"isEnded",value:function(){return 2===this.state}},{key:"setCallback",value:function(t){this.callback=t}},{key:"play",value:function(t){this.duration=t,this.dispatchEvent({type:"animation-started"}),this.state=1,h(this),this.id=setInterval(this.frame.bind(this),u)}},{key:"playLater",value:function(t,e){var r=Math.floor(u*e);window.clearInterval(this.waitTimer);var n=this;this.waitTimer=window.setTimeout((function(){n.play(t)}),r)}},{key:"stop",value:function(){this.state=0,f(this)}},{key:"frame",value:function(){this.keyframe1&&void 0!==arguments[1]?arguments[1]:{};(0,n.Z)(this,h),(e=u.call(this))._view=t,e._domElement=t.domElement;var i=!0;Object.defineProperty((0,a.Z)(e),"enabled",{get:function(){return i},set:function(t){t||(e.onKeyUp(),e.onPointerUp()),i=t}});var o=!0;Object.defineProperty((0,a.Z)(e),"enableKeys",{get:function(){return o},set:function(t){t||e.onKeyUp(),o=t}}),e.NONE={};var s=e.NONE;return Object.defineProperty((0,a.Z)(e),"currentState",{get:function(){return s},set:function(t){if(s!==t){var r=s;s=t,e.dispatchEvent({type:"state-changed",viewCoords:v,previous:r})}}}),e._clickTimeStamp=0,e._lastMousePressed={viewCoords:new l.Vector2},e._currentMousePressed=void 0,e._currentKeyPressed=void 0,e._onPointerDown=e.onPointerDown.bind((0,a.Z)(e)),e._onPointerMove=e.onPointerMove.bind((0,a.Z)(e)),e._onPointerUp=e.onPointerUp.bind((0,a.Z)(e)),e._onMouseWheel=e.onMouseWheel.bind((0,a.Z)(e)),e._onKeyDown=e.onKeyDown.bind((0,a.Z)(e)),e._onKeyUp=e.onKeyUp.bind((0,a.Z)(e)),e._onBlur=e.onBlur.bind((0,a.Z)(e)),e._onContextMenu=e.onContextMenu.bind((0,a.Z)(e)),e._domElement.addEventListener("pointerdown",e._onPointerDown,!1),e._domElement.addEventListener("wheel",e._onMouseWheel,!1),e._domElement.addEventListener("keydown",e._onKeyDown,!1),e._domElement.addEventListener("keyup",e._onKeyUp,!1),e._domElement.addEventListener("blur",e._onBlur),e._domElement.addEventListener("contextmenu",e._onContextMenu,!1),e.setFromOptions(r),e}return(0,i.Z)(h,[{key:"inputToState",value:function(t,e){for(var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=0,i=Object.keys(A);nt.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:{};return(0,n.Z)(this,h),(o=u.call(this)).player=new d,o.view=t,o.camera=t.camera3D,o.states=new b(o.view),Object.defineProperty((0,a.Z)(o),"enabled",{get:function(){return o.states.enabled},set:function(t){console.warn("GlobeControls.enabled property is deprecated. Use StateControl.enabled instead - which you can access with GlobeControls.states.enabled."),o.states.enabled=t}}),s.zoomSpeed&&(console.warn("Controls zoomSpeed parameter is deprecated. Use zoomFactor instead."),s.zoomFactor=s.zoomFactor||s.zoomSpeed),o.zoomFactor=s.zoomFactor||1.25,o.minDistance=s.minDistance||250,o.maxDistance=s.maxDistance||8*m.c.x,o.minZoom=s.minZoom||0,o.maxZoom=s.maxZoom||1/0,o.rotateSpeed=s.rotateSpeed||.25,o.keyPanSpeed=s.keyPanSpeed||7,o.minPolarAngle=l.MathUtils.degToRad(null!==(r=s.minPolarAngle)&&void 0!==r?r:.5),o.maxPolarAngle=l.MathUtils.degToRad(null!==(i=s.minPolarAngle)&&void 0!==i?i:86),o.minAzimuthAngle=s.minAzimuthAngle?l.MathUtils.degToRad(s.minAzimuthAngle):-1/0,o.maxAzimuthAngle=s.maxAzimuthAngle?l.MathUtils.degToRad(s.maxAzimuthAngle):1/0,o.handleCollision=void 0===s.handleCollision||s.handleCollision,o.minDistanceCollision=60,Object.defineProperty((0,a.Z)(o),"enableKeys",{get:function(){return o.states.enableKeys},set:function(t){console.warn("GlobeControls.enableKeys property is deprecated. Use StateControl.enableKeys instead - which you can access with GlobeControls.states.enableKeys."),o.states.enableKeys=t}}),o.enableDamping=!1!==s.enableDamping,o.dampingMoveFactor=null!=s.dampingMoveFactor?s.dampingMoveFactor:.25,o.startEvent={type:"start"},o.endEvent={type:"end"},o.updateHelper=function(){},o._onEndingMove=null,o._onTravel=o.travel.bind((0,a.Z)(o)),o._onTouchStart=o.onTouchStart.bind((0,a.Z)(o)),o._onTouchEnd=o.onTouchEnd.bind((0,a.Z)(o)),o._onTouchMove=o.onTouchMove.bind((0,a.Z)(o)),o._onStateChange=o.onStateChange.bind((0,a.Z)(o)),o._onRotation=o.handleRotation.bind((0,a.Z)(o)),o._onDrag=o.handleDrag.bind((0,a.Z)(o)),o._onDolly=o.handleDolly.bind((0,a.Z)(o)),o._onPan=o.handlePan.bind((0,a.Z)(o)),o._onPanoramic=o.handlePanoramic.bind((0,a.Z)(o)),o._onZoom=o.handleZoom.bind((0,a.Z)(o)),o.states.addEventListener("state-changed",o._onStateChange,!1),o.states.addEventListener(o.states.ORBIT._event,o._onRotation,!1),o.states.addEventListener(o.states.MOVE_GLOBE._event,o._onDrag,!1),o.states.addEventListener(o.states.DOLLY._event,o._onDolly,!1),o.states.addEventListener(o.states.PAN._event,o._onPan,!1),o.states.addEventListener(o.states.PANORAMIC._event,o._onPanoramic,!1),o.states.addEventListener("zoom",o._onZoom,!1),o.view.domElement.addEventListener("touchstart",o._onTouchStart,!1),o.view.domElement.addEventListener("touchend",o._onTouchEnd,!1),o.view.domElement.addEventListener("touchmove",o._onTouchMove,!1),o.states.addEventListener(o.states.TRAVEL_IN._event,o._onTravel,!1),o.states.addEventListener(o.states.TRAVEL_OUT._event,o._onTravel,!1),t.scene.add(z),e.isExtent?e.center().as("EPSG:4978",Z):(e.coord.as("EPSG:4978",Z),e.tilt=e.tilt||89.5,e.heading=e.heading||0),Q(Z,z),o.lookAtCoordinate(e,!1),G.crs=o.view.referenceCrs,o}return(0,i.Z)(h,[{key:"dollyInScale",get:function(){return this.zoomFactor}},{key:"dollyOutScale",get:function(){return 1/this.zoomFactor}},{key:"isPaused",get:function(){return this.states.currentState===this.states.NONE&&!this.player.isPlaying()}},{key:"onEndingMove",value:function(t){this._onEndingMove&&(this.player.removeEventListener("animation-stopped",this._onEndingMove),this._onEndingMove=null),this.handlingEvent(t)}},{key:"rotateLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;R.theta-=t}},{key:"rotateUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;R.phi-=t}},{key:"panLeft",value:function(t){var e=this.camera.matrix.elements;D.fromArray(e),D.multiplyScalar(-t),q.add(D)}},{key:"panUp",value:function(t){var e=this.camera.matrix.elements;D.fromArray(e,4),D.multiplyScalar(t),q.add(D)}},{key:"mouseToPan",value:function(t,e){var r=this.view.mainLoop.gfxEngine;if(this.camera.isPerspectiveCamera){var n=this.camera.position.distanceTo(this.getCameraTargetPosition());n*=2*Math.tan(l.MathUtils.degToRad(.5*this.camera.fov)),this.panLeft(t*n/r.width*this.camera.aspect),this.panUp(e*n/r.height)}else this.camera.isOrthographicCamera&&(this.panLeft(t*(this.camera.right-this.camera.left)/r.width),this.panUp(e*(this.camera.top-this.camera.bottom)/r.height))}},{key:"dolly",value:function(t){0!==t&&(_=t>0?this.dollyInScale:this.dollyOutScale,this.camera.isPerspectiveCamera?B/=_:this.camera.isOrthographicCamera&&(this.camera.zoom=l.MathUtils.clamp(this.camera.zoom*_,this.minZoom,this.maxZoom),this.camera.updateProjectionMatrix(),this.view.notifyChange(this.camera)))}},{key:"getMinDistanceCameraBoundingSphereObbsUp",value:function(t){if(t.level>10&&1==t.children.length&&t.geometry){var e=t.obb;ft.center.copy(this.camera.position),ft.radius=this.minDistanceCollision,e.isSphereAboveXYBox(ft)&&(ot=Math.min(ft.center.z-e.box3D.max.z,ot))}}},{key:"update",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.states.currentState;if(ot=1/0,this.handleCollision&&this.view.tileLayer){var r,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return w(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(this.view.tileLayer.level0Nodes);try{for(n.s();!(r=n.n()).done;)r.value.traverse(this.getMinDistanceCameraBoundingSphereObbsUp.bind(this))}catch(t){n.e(t)}finally{n.f()}}switch(e){case this.states.MOVE_GLOBE:if(ot<0)z.translateY(-ot),this.camera.position.setLength(this.camera.position.length()-ot);else if(otc&&R.phi>0){var u=s-c,h=1-(u-(ot-c))/u;R.phi*=h*h}else if(ot-c&&R.phi>-.01){var f=-Math.asin(.25*(c-ot)/I.radius);f=l.MathUtils.clamp(f,-.01,0);var d=1-(c-ot)/(2*c);R.phi=l.MathUtils.lerp(R.phi,f,d),ot-=Math.sin(R.phi)*I.radius}I.theta+=R.theta,I.phi+=R.phi,I.theta=Math.max(this.minAzimuthAngle,Math.min(this.maxAzimuthAngle,I.theta)),I.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,I.phi)),I.radius=this.camera.position.length()*B,I.makeSafe(),I.radius=Math.max(this.minDistance,Math.min(this.maxDistance,I.radius)),this.camera.position.setFromSpherical(I),ot<0&&(this.camera.position.y-=ot,I.setFromVector3(this.camera.position),R.phi=0),z.localToWorld(this.camera.position)}this.camera.up.copy(z.position).normalize(),this.camera.lookAt(z.position),this.enableDamping?(R.theta*=.75,R.phi*=.75,N.slerp(X,.2*this.dampingMoveFactor)):(R.theta=0,R.phi=0,N.set(0,0,0,1)),B=1,q.set(0,0,0),(Y.distanceToSquared(this.camera.position)>E||8*(1-J.dot(this.camera.quaternion))>E)&&(this.view.notifyChange(this.camera),Y.copy(this.camera.position),J.copy(this.camera.quaternion)),this.enableDamping&&e===this.states.ORBIT&&this.player.isStopped()&&(R.theta>E||R.phi>E)&&(this.player.setCallback((function(){t.update(t.states.ORBIT)})),this.player.playLater(60,2)),this.view.dispatchEvent({type:x.b.CAMERA_MOVED,coord:G.setFromVector3(z.position),range:I.radius,heading:-l.MathUtils.radToDeg(I.theta),tilt:90-l.MathUtils.radToDeg(I.phi)})}},{key:"onStateChange",value:function(t){this.states.currentState!==this.states.NONE?(g.ZP.stop(this.view,this.camera),this.onEndingMove(),this.player.stop(),this.updateTarget(),j=g.ZP.getTransformCameraLookingAtTarget(this.view,this.camera,ht),S.copy(t.viewCoords),this.view.getPickingPositionFromDepth(t.viewCoords,$)&&(K.radius=$.length(),st.copy($).normalize(),this.updateHelper($,et.picking)),U.copy(t.viewCoords),k.copy(t.viewCoords)):this.handleEndMovement(t)}},{key:"handleRotation",value:function(t){this.player.stop(),this.handlePanoramic(t)}},{key:"handleDrag",value:function(t){var e=this.view.viewToNormalizedCoords(t.viewCoords);this.camera.updateMatrixWorld(),lt.setFromCamera(e,this.camera),lt.ray.intersectSphere(K,tt)?(ct.copy(tt).normalize(),N.setFromUnitVectors(ct,st),W=Date.now(),this.update()):this.states.onPointerUp()}},{key:"handleDolly",value:function(t){O.copy(t.viewCoords),F.subVectors(O,U),this.dolly(-F.y),U.copy(O),this.update()}},{key:"handlePan",value:function(t){t.viewCoords?(L.copy(t.viewCoords),P.subVectors(L,k),k.copy(L)):t.direction&&P.copy(M[t.direction]).multiplyScalar(this.keyPanSpeed),this.mouseToPan(P.x,P.y),this.update(this.states.PAN)}},{key:"handlePanoramic",value:function(t){C.copy(t.viewCoords),T.subVectors(C,S);var e=this.view.mainLoop.gfxEngine;R.theta-=2*Math.PI*T.x/e.width*this.rotateSpeed,R.phi-=2*Math.PI*T.y/e.height*this.rotateSpeed,S.copy(C),this.update()}},{key:"handleEndMovement",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.dispatchEvent(this.endEvent),this.player.stop(),this.enableDamping?e.previous===this.states.ORBIT&&(R.theta>E||R.phi>E)?(this.player.setCallback((function(){t.update(t.states.ORBIT)})),this.player.play(60),this._onEndingMove=function(){return t.onEndingMove()},this.player.addEventListener("animation-stopped",this._onEndingMove)):e.previous===this.states.MOVE_GLOBE&&Date.now()-W<50?(this.player.setCallback((function(){t.update(t.states.MOVE_GLOBE)})),this.player.play(120),this._onEndingMove=function(){return t.onEndingMove()},this.player.addEventListener("animation-stopped",this._onEndingMove)):this.onEndingMove():this.onEndingMove()}},{key:"updateTarget",value:function(){if(this.view.getPickingPositionFromDepth(null,ht)){var t=isNaN(ht.x)?100:this.camera.position.distanceTo(ht);ut.set(0,0,-t),this.camera.localToWorld(ut),Q(ut,z),z.matrixWorldInverse.copy(z.matrixWorld).invert(),ut.copy(this.camera.position),ut.applyMatrix4(z.matrixWorldInverse),I.setFromVector3(ut)}}},{key:"handlingEvent",value:function(t){t=t||g.ZP.getTransformCameraLookingAtTarget(this.view,this.camera);var e=g.ZP.getDiffParams(j,t);if(e&&(e.range&&this.dispatchEvent({type:rt.RANGE_CHANGED,previous:e.range.previous,new:e.range.new}),e.coord&&this.dispatchEvent({type:rt.CAMERA_TARGET_CHANGED,previous:e.coord.previous,new:e.coord.new}),e.tilt||e.heading)){var r={type:rt.ORIENTATION_CHANGED};e.tilt&&(r.previous={tilt:e.tilt.previous},r.new={tilt:e.tilt.new}),e.heading&&(r.previous=r.previous||{},r.new=r.new||{},r.new.heading=e.heading.new,r.previous.heading=e.heading.previous),this.dispatchEvent(r)}}},{key:"travel",value:function(t){this.player.stop();var e=this.view.getPickingPositionFromDepth(t.viewCoords),r=this.getRange(e);if(e&&r>this.minDistance)return this.lookAtCoordinate({coord:new p.Z("EPSG:4978",e),range:r*("out"===t.direction?1/.6:.6),time:1500})}},{key:"handleZoom",value:function(t){this.player.stop(),g.ZP.stop(this.view,this.camera),this.updateTarget();var e=-t.delta;this.dolly(e);var r=this.getRange(ht);this.update();var n=this.getRange(ht);Math.abs(n-r)/r>.001&&this.dispatchEvent({type:rt.RANGE_CHANGED,previous:r,new:n}),this.dispatchEvent(this.startEvent),this.dispatchEvent(this.endEvent)}},{key:"onTouchStart",value:function(t){if(this.player.stop(),!1!==this.states.enabled&&(this.state=this.states.touchToState(t.touches.length),this.updateTarget(),this.state!==this.states.NONE)){switch(this.state){case this.states.MOVE_GLOBE:var e=this.view.eventToViewCoords(t);this.view.getPickingPositionFromDepth(e,$)?(K.radius=$.length(),st.copy($).normalize(),this.updateHelper($,et.picking)):this.state=this.states.NONE;break;case this.states.ORBIT:case this.states.DOLLY:var r=t.touches[0].pageX,n=t.touches[0].pageY,i=r-t.touches[1].pageX,a=n-t.touches[1].pageY,o=Math.sqrt(i*i+a*a);U.set(0,o),S.set(r,n);break;case this.states.PAN:k.set(t.touches[0].pageX,t.touches[0].pageY)}this.dispatchEvent(this.startEvent)}}},{key:"onTouchMove",value:function(t){if(this.player.isPlaying()&&this.player.stop(),!1!==this.states.enabled){switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case this.states.MOVE_GLOBE.finger:var e=this.view.eventToViewCoords(t),r=this.view.viewToNormalizedCoords(e);this.camera.updateMatrixWorld(),lt.setFromCamera(r,this.camera),lt.ray.intersectSphere(K,tt)?(ct.copy(tt).normalize(),N.setFromUnitVectors(ct,st),W=Date.now()):this.onTouchEnd();break;case this.states.ORBIT.finger:case this.states.DOLLY.finger:var n=this.view.mainLoop.gfxEngine;C.set(t.touches[0].pageX,t.touches[0].pageY),T.subVectors(C,S),this.rotateLeft(2*Math.PI*T.x/n.width*this.rotateSpeed),this.rotateUp(2*Math.PI*T.y/n.height*this.rotateSpeed),S.copy(C);var i=t.touches[0].pageX-t.touches[1].pageX,a=t.touches[0].pageY-t.touches[1].pageY,o=Math.sqrt(i*i+a*a);O.set(0,o),F.subVectors(O,U),this.dolly(F.y),U.copy(O);break;case this.states.PAN.finger:L.set(t.touches[0].pageX,t.touches[0].pageY),P.subVectors(L,k),this.mouseToPan(P.x,P.y),k.copy(L);break;default:this.state=this.states.NONE}this.state!==this.states.NONE&&this.update(this.state)}}},{key:"onTouchEnd",value:function(){this.handleEndMovement({previous:this.state}),this.state=this.states.NONE}},{key:"dispose",value:function(){this.view.domElement.removeEventListener("touchstart",this._onTouchStart,!1),this.view.domElement.removeEventListener("touchend",this._onTouchEnd,!1),this.view.domElement.removeEventListener("touchmove",this._onTouchMove,!1),this.states.dispose(),this.states.removeEventListener("state-changed",this._onStateChange,!1),this.states.removeEventListener(this.states.ORBIT._event,this._onRotation,!1),this.states.removeEventListener(this.states.MOVE_GLOBE._event,this._onDrag,!1),this.states.removeEventListener(this.states.DOLLY._event,this._onDolly,!1),this.states.removeEventListener(this.states.PAN._event,this._onPan,!1),this.states.removeEventListener(this.states.PANORAMIC._event,this._onPanoramic,!1),this.states.removeEventListener("zoom",this._onZoom,!1),this.states.removeEventListener(this.states.TRAVEL_IN._event,this._onTravel,!1),this.states.removeEventListener(this.states.TRAVEL_OUT._event,this._onTravel,!1),this.dispatchEvent({type:"dispose"})}},{key:"setTilt",value:function(t,e){return this.lookAtCoordinate({tilt:t},e)}},{key:"setHeading",value:function(t,e){return this.lookAtCoordinate({heading:t},e)}},{key:"setRange",value:function(t,e){return this.lookAtCoordinate({range:t},e)}},{key:"getCameraTargetPosition",value:function(){return z.position}},{key:"getRange",value:function(t){return g.ZP.getTransformCameraLookingAtTarget(this.view,this.camera,t).range}},{key:"getTilt",value:function(t){return g.ZP.getTransformCameraLookingAtTarget(this.view,this.camera,t).tilt}},{key:"getHeading",value:function(t){return g.ZP.getTransformCameraLookingAtTarget(this.view,this.camera,t).heading}},{key:"pan",value:function(t){return this.mouseToPan(t.x,t.y),this.update(this.states.PAN),Promise.resolve()}},{key:"getCameraOrientation",value:function(){return this.view.getPickingPositionFromDepth(null,ht),[this.getTilt(ht),this.getHeading(ht)]}},{key:"getCameraCoordinate",value:function(){return new p.Z("EPSG:4978",this.camera.position).as("EPSG:4326")}},{key:"getLookAtCoordinate",value:function(){return g.ZP.getTransformCameraLookingAtTarget(this.view,this.camera).coord}},{key:"setAnimationEnabled",value:function(t){H=t}},{key:"isAnimationEnabled",value:function(){return H}},{key:"getZoom",value:function(){return this.view.tileLayer.computeTileZoomFromDistanceCamera(this.getRange(),this.view.camera)}},{key:"setZoom",value:function(t,e){return this.lookAtCoordinate({zoom:t},e)}},{key:"getScale",value:function(t){return console.warn("Deprecated, use View#getScale instead."),this.view.getScale(t)}},{key:"pixelsToMeters",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.28;return console.warn("Deprecated use View#getPixelsToMeters instead."),t*e/this.getScale(e)/1e3}},{key:"pixelsToDegrees",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.28;console.warn("Deprecated, use View#getPixelsToMeters and GlobeControls#getMetersToDegrees instead.");var r=this.pixelsToMeters(t,e);return l.MathUtils.radToDeg(2*Math.asin(r/(2*m.c.x)))}},{key:"metersToPixels",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.28;return console.warn("Deprecated, use View#getMetersToPixels instead."),t*this.getScale(e)/(e/1e3)}},{key:"setScale",value:function(t,e,r){return this.lookAtCoordinate({scale:t,pitch:e},r)}},{key:"lookAtCoordinate",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.isAnimationEnabled();if(this.player.stop(),!e.isExtent&&(e.zoom?e.range=this.view.tileLayer.computeDistanceCameraFromTileZoom(e.zoom,this.view.camera):e.scale&&(e.range=this.view.getScaleFromDistance(e.pitch,e.scale),(e.rangethis.maxDistance)&&(console.warn("This scale ".concat(e.scale," can not be reached")),e.range=l.MathUtils.clamp(e.range,this.minDistance,this.maxDistance))),void 0!==e.tilt)){var n=90-l.MathUtils.radToDeg(this.maxPolarAngle),i=90-l.MathUtils.radToDeg(this.minPolarAngle);(e.tilti)&&(e.tilt=l.MathUtils.clamp(e.tilt,n,i),console.warn("Tilt was clamped to ",e.tilt," the interval is between ".concat(n," and ").concat(i," degree")))}return j=g.ZP.getTransformCameraLookingAtTarget(this.view,this.camera),r?(e.callback=function(t){return z.position.copy(t.targetWorldPosition)},this.dispatchEvent({type:"animation-started"}),g.ZP.animateCameraToLookAtTarget(this.view,this.camera,e).then((function(e){return t.dispatchEvent({type:"animation-ended"}),t.handlingEvent(e),e}))):g.ZP.transformCameraToLookAtTarget(this.view,this.camera,e).then((function(e){return z.position.copy(e.targetWorldPosition),t.handlingEvent(e),e}))}},{key:"pickGeoPosition",value:function(t){var e=this.view.getPickingPositionFromDepth(t);if(e)return new p.Z("EPSG:4978",e).as("EPSG:4326")}}]),h}(l.EventDispatcher);const pt=dt},44450:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>H,uZ:()=>W});var n=r(15671),i=r(43144),a=r(97326),o=r(79340),s=r(82963),c=r(61120),l=r(99477),u=r(49469);var h,f=l.MOUSE.LEFT,d=l.MOUSE.MIDDLE,p=l.MOUSE.RIGHT,m=new l.Vector3,g=new l.Quaternion,A=0,v=new l.Vector3,y=-1,b={default:"auto",drag:"move",pan:"cell",travel:"wait",rotate:"move",ortho_zoom:"wait"},x=new l.Vector3,w=new l.Vector2,_=new l.Vector2,E=new l.Vector2(0,0),M=new l.Vector3,S=new l.Vector3,C=new l.Vector3,T=new l.Vector3(0,0,0),I=0,R=new l.Vector3,B=new l.Quaternion,k=new l.Vector2,L=new l.Vector3,P=new l.Vector3,D=new l.Quaternion,U=new l.Quaternion,O=0,F=0,N=!1,z=!1,G=0,Z=0,V=new l.Raycaster,Q=new l.Plane(new l.Vector3(0,0,-1)),j={enabled:!0,enableRotation:!0,rotateSpeed:2,minPanSpeed:.05,maxPanSpeed:15,zoomTravelTime:.2,zoomFactor:2,maxResolution:0,minResolution:1/0,maxAltitude:5e7,groundLevel:200,autoTravelTimeMin:1.5,autoTravelTimeMax:4,autoTravelTimeDist:5e4,smartTravelHeightMin:75,smartTravelHeightMax:500,instantTravel:!1,minZenithAngle:0,maxZenithAngle:82.5,handleCollision:!0,minDistanceCollision:30,enableSmartTravel:!0,enablePan:!0},W={MOVED:"moved"};const H=function(t){(0,o.Z)(X,t);var e,r,H=(e=X,r=function(){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(t){return!1}}(),function(){var t,n=(0,c.Z)(e);if(r){var i=(0,c.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,s.Z)(this,t)});function X(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.Z)(this,X),(e=H.call(this)).view=t,e.camera=t.camera3D,e.enabled="boolean"==typeof r.enabled?r.enabled:j.enabled,e.camera.isOrthographicCamera?(A=e.camera.zoom,e.enableRotation=!1,e.enablePan=!1,e.maxAltitude=1/0,e.zoomTravelTime="number"==typeof r.zoomTravelTime?r.zoomTravelTime:j.zoomTravelTime):(e.enableRotation=void 0===r.enableRotation?j.enableRotation:r.enableRotation,e.rotateSpeed=r.rotateSpeed||j.rotateSpeed,e.enablePan=void 0===r.enablePan?j.enablePan:r.enablePan,e.minPanSpeed=r.minPanSpeed||j.minPanSpeed,e.maxPanSpeed=r.maxPanSpeed||j.maxPanSpeed,e.maxAltitude=r.maxAltitude||j.maxAltitude,e.zoomTravelTime=r.zoomTravelTime||j.zoomTravelTime),r.zoomInFactor&&(console.warn("Controls zoomInFactor parameter is deprecated. Use zoomFactor instead."),r.zoomFactor=r.zoomFactor||r.zoomInFactor),r.zoomOutFactor&&(console.warn("Controls zoomOutFactor parameter is deprecated. Use zoomFactor instead."),r.zoomFactor=r.zoomFactor||r.zoomInFactor||1/r.zoomOutFactor),0===r.zoomFactor&&(console.warn("Controls zoomFactor parameter can not be equal to 0. Its value will be set to default."),r.zoomFactor=j.zoomFactor),e.zoomInFactor=r.zoomFactor||j.zoomFactor,e.zoomOutFactor=1/(r.zoomFactor||j.zoomFactor),e.maxResolution=r.maxResolution||j.maxResolution,e.minResolution=r.minResolution||j.minResolution,e.groundLevel=r.groundLevel||j.groundLevel,e.autoTravelTimeMin=r.autoTravelTimeMin||j.autoTravelTimeMin,e.autoTravelTimeMax=r.autoTravelTimeMax||j.autoTravelTimeMax,e.autoTravelTimeDist=r.autoTravelTimeDist||j.autoTravelTimeDist,r.smartZoomHeightMin&&(console.warn("Controls smartZoomHeightMin parameter is deprecated. Use smartTravelHeightMin instead."),r.smartTravelHeightMin=r.smartTravelHeightMin||r.smartZoomHeightMin),r.smartZoomHeightMax&&(console.warn("Controls smartZoomHeightMax parameter is deprecated. Use smartTravelHeightMax instead."),r.smartTravelHeightMax=r.smartTravelHeightMax||r.smartZoomHeightMax),e.smartTravelHeightMin=r.smartTravelHeightMin||j.smartTravelHeightMin,e.smartTravelHeightMax=r.smartTravelHeightMax||j.smartTravelHeightMax,e.instantTravel=r.instantTravel||j.instantTravel,e.minZenithAngle=(r.minZenithAngle||j.minZenithAngle)*Math.PI/180,e.maxZenithAngle=(r.maxZenithAngle||j.maxZenithAngle)*Math.PI/180,r.focusOnMouseOver&&console.warn("Planar controls 'focusOnMouseOver' optional parameter has been removed."),r.focusOnMouseClick&&console.warn("Planar controls 'focusOnMouseClick' optional parameter has been removed."),e.handleCollision=void 0===r.handleCollision?j.handleCollision:r.handleCollision,e.minDistanceCollision=j.minDistanceCollision,e.enableSmartTravel=void 0===r.enableSmartTravel?j.enableSmartTravel:r.enableSmartTravel,m.copy(e.camera.position),g.copy(e.camera.quaternion),e.state=y,e.cursor=b,e.view.controls&&(console.warn("Deprecated use of PlanarControls. See examples to correct PlanarControls implementation."),e.view.controls.dispose()),e.view.controls=(0,a.Z)(e),e._handlerOnKeyDown=e.onKeyDown.bind((0,a.Z)(e)),e._handlerOnMouseDown=e.onMouseDown.bind((0,a.Z)(e)),e._handlerOnMouseUp=e.onMouseUp.bind((0,a.Z)(e)),e._handlerOnMouseMove=e.onMouseMove.bind((0,a.Z)(e)),e._handlerOnMouseWheel=e.onMouseWheel.bind((0,a.Z)(e)),e._handlerContextMenu=e.onContextMenu.bind((0,a.Z)(e)),e._handlerUpdate=e.update.bind((0,a.Z)(e)),e.view.addFrameRequester(u.Ao.AFTER_CAMERA_UPDATE,e._handlerUpdate),e.addInputListeners(),e}return(0,i.Z)(X,[{key:"dispose",value:function(){this.removeInputListeners(),this.view.removeFrameRequester(u.Ao.AFTER_CAMERA_UPDATE,this._handlerUpdate)}},{key:"update",value:function(t,e){e&&(t=16);var r=this.state!==y;switch(this.state){case 3:this.handleTravel(t),this.view.notifyChange(this.camera);break;case 4:this.handleZoomOrtho(t),this.view.notifyChange(this.camera);break;case 0:this.handleDragMovement(),this.view.notifyChange(this.camera);break;case 2:this.handleRotation(),this.view.notifyChange(this.camera);break;case 1:this.handlePanMovement(),this.view.notifyChange(this.camera)}this.handleCollision&&this.view.camera.adjustAltitudeToAvoidCollisionWithLayer(this.view,this.view.tileLayer,this.minDistanceCollision),r&&this.view.dispatchEvent({type:W.MOVED}),E.set(0,0)}},{key:"initiateDrag",value:function(){this.state=0,M.copy(this.getWorldPointAtScreenXY(w)),C.set(0,0,0)}},{key:"handleDragMovement",value:function(){this.getWorldPointFromMathPlaneAtScreenXY(w,M.z,S),C.subVectors(M,S),this.camera.position.add(C),C.set(0,0,0)}},{key:"initiatePan",value:function(){this.state=1}},{key:"handlePanMovement",value:function(){R.set(-E.x,E.y,0),this.camera.localToWorld(R),this.camera.position.copy(R)}},{key:"initiateRotation",value:function(){this.state=2,T.copy(this.getWorldPointAtScreenXY(new l.Vector2(.5*this.view.mainLoop.gfxEngine.width,.5*this.view.mainLoop.gfxEngine.height)));var t=this.camera.position.distanceTo(T);I=Math.acos((this.camera.position.z-T.z)/t)}},{key:"handleRotation",value:function(){var t=-this.rotateSpeed*E.x/this.view.mainLoop.gfxEngine.width,e=-this.rotateSpeed*E.y/this.view.mainLoop.gfxEngine.height,r=this.camera.position.clone().sub(T);0===t&&0===e||(I+e>=this.minZenithAngle&&I+e<=this.maxZenithAngle&&0!==e&&(I+=e,R.set(0,0,1),B.setFromUnitVectors(this.camera.up,R),r.applyQuaternion(B),R.setFromMatrixColumn(this.camera.matrix,0),B.setFromAxisAngle(R,e),r.applyQuaternion(B),R.set(0,0,1),B.setFromUnitVectors(this.camera.up,R).invert(),r.applyQuaternion(B)),0!==t&&(R.set(0,0,1),B.setFromAxisAngle(R,t),r.applyQuaternion(B))),this.camera.position.copy(r),this.camera.lookAt(x),this.camera.position.add(T),this.camera.updateMatrixWorld()}},{key:"initiateZoom",value:function(t){var e=-t.deltaY;v.copy(this.getWorldPointAtScreenXY(w));var r=new l.Vector3;if(e>0||e<0&&this.maxAltitude>this.camera.position.z){var n=e>0?this.zoomInFactor:this.zoomOutFactor,i=this.view.getPixelsToMeters()/n;if(this.maxResolution>i||i>this.minResolution)return;this.camera.isOrthographicCamera?(this.state=4,this.view.notifyChange(this.camera),G=this.camera.zoom,Z=G*n,v.z=this.camera.position.z,O=0,F=this.zoomTravelTime,this.updateMouseCursorType()):(r.lerpVectors(this.camera.position,v,1-1/n),this.initiateTravel(r,this.zoomTravelTime,null,!1))}}},{key:"handleZoomOrtho",value:function(t){O=Math.min(O+t/1e3/F,1);var e=G+O*(Z-G);this.camera.zoom!==e&&(this.camera.zoom=e,this.camera.updateProjectionMatrix(),this.view.viewToNormalizedCoords(w,R),R.z=0,R.unproject(this.camera),this.camera.position.x+=v.x-R.x,this.camera.position.y+=v.y-R.y,this.camera.updateMatrixWorld(!0)),this.testAnimationEnd()}},{key:"initiateSmartTravel",value:function(){var t=this.getWorldPointAtScreenXY(w),e=new l.Vector3;e.copy(t).sub(this.camera.position),e.z=0,e.normalize();var r=this.camera.position.distanceTo(t),n=l.MathUtils.lerp(this.smartTravelHeightMin,this.smartTravelHeightMax,Math.min(r/5e3,1)),i=new l.Vector3;i.copy(t),this.enableRotation&&i.add(e.multiplyScalar(2*-n)),i.z=t.z+n,this.camera.isOrthographicCamera&&(G=this.camera.zoom,Z=G*(1+Math.min(r/5e3,1)),i.z=this.camera.position.z),this.initiateTravel(i,"auto",t,!0)}},{key:"initiateTravel",value:function(t,e,r,n){if(this.state=3,this.view.notifyChange(this.camera),O=0,this.updateMouseCursorType(),N=this.enableRotation&&r&&(r.isQuaternion||r.isVector3),z=n,P.copy(this.camera.position),D.copy(this.camera.quaternion),N&&(r.isQuaternion?U.copy(r):r.isVector3&&(t===r?(this.camera.lookAt(r),U.copy(this.camera.quaternion),this.camera.quaternion.copy(D)):(this.camera.position.copy(t),this.camera.lookAt(r),U.copy(this.camera.quaternion),this.camera.quaternion.copy(D),this.camera.position.copy(P)))),L.copy(t),this.instantTravel)F=0;else if("auto"===e){var i=Math.min(1,t.distanceTo(this.camera.position)/this.autoTravelTimeDist);if(F=l.MathUtils.lerp(this.autoTravelTimeMin,this.autoTravelTimeMax,i),N){var a=.5-.5*U.normalize().dot(this.camera.quaternion.normalize());F*=1+2*a,F=Math.min(F,this.autoTravelTimeMax)}}else F=e}},{key:"handleTravel",value:function(t){O=Math.min(O+t/1e3/F,1);var e=z?this.smooth(O):O;this.camera.position.lerpVectors(P,L,e);var r=G+e*(Z-G);this.camera.isOrthographicCamera&&this.camera.zoom!==r&&(this.camera.zoom=r,this.camera.updateProjectionMatrix()),!0===N&&this.camera.quaternion.slerpQuaternions(D,U,e),this.testAnimationEnd()}},{key:"testAnimationEnd",value:function(){1===O&&(this.state=y,this.updateMouseCursorType())}},{key:"goToTopView",value:function(){var t=new l.Vector3,e=new l.Quaternion;t.copy(this.getWorldPointAtScreenXY(new l.Vector2(.5*this.view.mainLoop.gfxEngine.width,.5*this.view.mainLoop.gfxEngine.height))),t.z+=Math.min(this.maxAltitude,this.camera.position.distanceTo(t)),e.setFromAxisAngle(new l.Vector3(1,0,0),0),this.initiateTravel(t,"auto",e,!0)}},{key:"goToStartView",value:function(){this.camera.isOrthographicCamera&&(G=this.camera.zoom,Z=A),this.initiateTravel(m,"auto",g,!0)}},{key:"getWorldPointFromMathPlaneAtScreenXY",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new l.Vector3;return k.copy(this.view.viewToNormalizedCoords(t)),V.setFromCamera(k,this.camera),Q.constant=e,V.ray.intersectPlane(Q,r),r}},{key:"getWorldPointAtScreenXY",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new l.Vector3;return this.view.getPickingPositionFromDepth(t,e)||this.getWorldPointFromMathPlaneAtScreenXY(t,this.groundLevel,e),e}},{key:"addInputListeners",value:function(){this.view.domElement.addEventListener("keydown",this._handlerOnKeyDown,!1),this.view.domElement.addEventListener("mousedown",this._handlerOnMouseDown,!1),this.view.domElement.addEventListener("mouseup",this._handlerOnMouseUp,!1),this.view.domElement.addEventListener("mouseleave",this._handlerOnMouseUp,!1),this.view.domElement.addEventListener("mousemove",this._handlerOnMouseMove,!1),this.view.domElement.addEventListener("wheel",this._handlerOnMouseWheel,!1),this.view.domElement.addEventListener("contextmenu",this._handlerContextMenu,!1)}},{key:"removeInputListeners",value:function(){this.view.domElement.removeEventListener("keydown",this._handlerOnKeyDown,!0),this.view.domElement.removeEventListener("mousedown",this._handlerOnMouseDown,!1),this.view.domElement.removeEventListener("mouseup",this._handlerOnMouseUp,!1),this.view.domElement.removeEventListener("mouseleave",this._handlerOnMouseUp,!1),this.view.domElement.removeEventListener("mousemove",this._handlerOnMouseMove,!1),this.view.domElement.removeEventListener("wheel",this._handlerOnMouseWheel,!1),this.view.domElement.removeEventListener("contextmenu",this._handlerContextMenu,!1)}},{key:"updateMouseCursorType",value:function(){switch(this.state){case y:this.view.domElement.style.cursor=this.cursor.default;break;case 0:this.view.domElement.style.cursor=this.cursor.drag;break;case 1:this.view.domElement.style.cursor=this.cursor.pan;break;case 3:this.view.domElement.style.cursor=this.cursor.travel;break;case 4:this.view.domElement.style.cursor=this.cursor.ortho_zoom;break;case 2:this.view.domElement.style.cursor=this.cursor.rotate}}},{key:"updateMousePositionAndDelta",value:function(t){this.view.eventToViewCoords(t,w),E.copy(w).sub(_),_.copy(w)}},{key:"setCursor",value:function(t,e){this.cursor[t]=e,this.updateMouseCursorType()}},{key:"onMouseDown",value:function(t){if(this.enabled&&(t.preventDefault(),this.view.domElement.focus(),y===this.state)){if(h=t.button,this.updateMousePositionAndDelta(t),f===t.button)if(t.ctrlKey){if(!this.enableRotation)return;this.initiateRotation()}else this.initiateDrag();else if(d===t.button){if(!this.enableSmartTravel)return;this.initiateSmartTravel()}else if(p===t.button){if(!this.enablePan)return;this.initiatePan()}this.updateMouseCursorType()}}},{key:"onMouseUp",value:function(t){t.preventDefault(),3!==this.state&&4!==this.state&&h===t.button&&(this.state=y),this.updateMouseCursorType()}},{key:"onMouseMove",value:function(t){this.enabled&&(t.preventDefault(),this.updateMousePositionAndDelta(t),y!==this.state&&this.view.notifyChange())}},{key:"onKeyDown",value:function(t){if(y===this.state&&this.enabled)switch(t.keyCode){case 84:this.camera.isOrthographicCamera||this.goToTopView();break;case 89:this.goToStartView();break;case 32:this.enableSmartTravel&&this.initiateSmartTravel(t)}}},{key:"onMouseWheel",value:function(t){this.enabled&&(t.preventDefault(),t.stopPropagation(),y===this.state&&this.initiateZoom(t))}},{key:"onContextMenu",value:function(t){t.preventDefault()}},{key:"smooth",value:function(t){return Math.pow(Math.pow(t,2)*(3-2*t),1.2)}}]),X}(l.EventDispatcher)},16916:(t,e,r)=>{"use strict";r.d(e,{Z:()=>p});var n=r(71002),i=r(15671),a=r(43144),o=r(30633),s=r(99477),c={BYTE:1,UNSIGNED_BYTE:1,SHORT:2,UNSIGNED_SHORT:2,INT:4,UNSIGNED_INT:4,FLOAT:4,DOUBLE:8},l={BYTE:Int8Array,UNSIGNED_BYTE:Uint8Array,SHORT:Int16Array,UNSIGNED_SHORT:Uint16Array,INT:Int32Array,UNSIGNED_INT:Uint32Array,FLOAT:Float32Array,DOUBLE:Float64Array},u={SCALAR:1,VEC2:2,VEC3:3,VEC4:4},h={VEC2:s.Vector2,VEC3:s.Vector3,VEC4:s.Vector4};const f=function(t,e,r,n,i){if(!t)throw new Error("Buffer is mandatory to parse binary property.");if(null==e)throw new Error("batchLength is mandatory to parse binary property.");if(null==r)throw new Error("byteOffset is mandatory to parse binary property.");if(!c[n])throw new Error("Uknown component type: ".concat(n,". Cannot access binary property."));if(!u[i])throw new Error("Uknown type: ".concat(i,". Cannot access binary property."));var a=u[i],o=new l[n](t,r,e*a);if("SCALAR"===i)return Array.from(o);for(var s=[],f=0;f<=o.length-a;f+=a){var d=new h[i];d.fromArray(o,f),s.push(d)}return s};var d=r(24147);const p=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ArrayBuffer,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,c=arguments.length>4?arguments[4]:void 0;(0,i.Z)(this,t),4!==arguments.length||"object"!==(0,n.Z)(s)||Array.isArray(s)||null===s||console.warn("You most likely used a deprecated constructor of C3DTBatchTable."),r+a!==e.byteLength&&console.error("3DTiles batch table json length and binary length are not consistent with total buffer length. The batch table may be wrong."),this.type=d.h.batchtable,this.batchLength=s;var l=e.slice(0,r),u=o.Z.decode(new Uint8Array(l)),h=""===u?null:JSON.parse(u);if(a>0){var p=e.slice(r,r+a);for(var m in h)if(Object.prototype.hasOwnProperty.call(h,m)){var g=h[m];Array.isArray(g)||(void 0!==(null==g?void 0:g.byteOffset)&&void 0!==(null==g?void 0:g.componentType)&&void 0!==(null==g?void 0:g.type)?h[m]=f(p,this.batchLength,g.byteOffset,g.componentType,g.type):console.error("Invalid 3D Tiles batch table property that is neither a JSON array nor a valid accessor to a binary body"))}}h&&h.extensions&&(this.extensions=c.parseExtensions(h.extensions,this.type),delete h.extensions),this.content=h}return(0,a.Z)(t,[{key:"getInfoById",value:function(t){if(t<0&&t{"use strict";r.d(e,{Z:()=>v});var n=r(15671),i=r(43144),a=r(99477),o=r(16828),s=r(60145),c=r(24147),l=new o.Z,u=new a.Vector3,h=new a.Vector3,f=new s.Z("EPSG:4326"),d=new a.Vector3,p=new s.Z("EPSG:4326"),m=new a.Vector3,g=new a.Vector3,A=new a.Vector3;const v=function(){function t(e,r,i){if((0,n.Z)(this,t),this.type=c.h.boundingVolume,e.region)this.initialVolumeType=c.D.region,this.volume=function(t,e){var r=t[2],n=t[0],i=t[1],o=t[3],s=t[4],c=t[5],u=a.MathUtils.radToDeg(r),h=a.MathUtils.radToDeg(n),A=a.MathUtils.radToDeg(i),v=a.MathUtils.radToDeg(o);p.setFromValues(h,v,s),l.cartographicToCartesian(p,m),f.setFromValues(u,A,c),l.cartographicToCartesian(f,d);var y=new a.Vector3;y.lerpVectors(m,d,.5);var b=g.subVectors(m,d).length()/2,x=new a.Sphere(y,b);return x.applyMatrix4(e),x}(e.region,r);else if(e.box)this.initialVolumeType=c.D.box,this.volume=function(t){h.set(t[0],t[1],t[2]),u.set(t[3],t[7],t[11]).multiplyScalar(2);var e=new a.Box3;return e.setFromCenterAndSize(h,u),e}(e.box);else{if(!e.sphere)throw new Error("Unknown bounding volume type: ".concat(e,". 3D Tiles nodes must have a bounding volume of type\n region, box or sphere."));this.initialVolumeType=c.D.sphere,this.volume=(o=e.sphere,(s=new a.Vector3).set(o[0],o[1],o[2]),new a.Sphere(s,o[3]))}var o,s;e.extensions&&(this.extensions=i.parseExtensions(e.extensions,this.type))}return(0,i.Z)(t,[{key:"boundingVolumeCulling",value:function(t,e){if(this.initialVolumeType===c.D.box)return!t.isBox3Visible(this.volume,e);if(this.initialVolumeType===c.D.sphere||this.initialVolumeType===c.D.region)return!t.isSphereVisible(this.volume,e);throw new Error("Unknown bounding volume type.")}},{key:"viewerRequestVolumeCulling",value:function(t,e){return this.initialVolumeType===c.D.region?(console.warn("Region viewerRequestVolume not yet supported"),!0):this.initialVolumeType===c.D.box?(console.warn("Bounding box viewerRequestVolume not yet supported"),!0):this.initialVolumeType===c.D.sphere&&(A.copy(this.volume.center),A.applyMatrix4(e),!(t.camera3D.position.distanceTo(A)<=this.volume.radius))}}]),t}()},83500:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var n=r(15671),i=r(43144);const a=function(){function t(){(0,n.Z)(this,t)}return(0,i.Z)(t,[{key:"registerExtension",value:function(t,e){this[t]=e}},{key:"getExtension",value:function(t,e){if(this[t]&&this[t][e])return this[t][e];console.error("".concat("No extension manager registered for extension "," ").concat(t," and for class ").concat(e))}},{key:"isExtensionRegistered",value:function(t){return this[t]}},{key:"parseExtensions",value:function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=new(this.getExtension(n,e))(t[n]));return r}}]),t}()},97498:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var n=r(15671),i=r(43144),a=r(86033),o=r(13092),s=r(99477);var c=new WeakMap;const l=function(){function t(e,r,i,a,s,l){var u,h,f;(0,n.Z)(this,t),f={writable:!0,value:void 0},function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(u=this,h=c),h.set(u,f),l||console.error("BREAKING CHANGE: C3DTFeature constructor changed from (tileId, batchId, groups, info, userData) to (tileId, batchId, groups, info, userData, object3d)"),this.object3d=l,this.batchId=r,this.groups=i,this.userData=s,(0,o.Z)(this,c,a),this.tileId=e}return(0,i.Z)(t,[{key:"computeWorldBox3",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new s.Box3;return e.max.x=-1/0,e.max.y=-1/0,e.max.z=-1/0,e.min.x=1/0,e.min.y=1/0,e.min.z=1/0,this.groups.forEach((function(r){for(var n=3*r.start,i=3*(r.start+r.count),a=n;a{"use strict";r.d(e,{D:()=>i,h:()=>n});var n={tileset:"tileset",batchtable:"batchtable",boundingVolume:"boundingVolume"},i={region:"region",box:"box",sphere:"sphere"}},45571:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var n=r(15671),i=r(43144),a=r(99477),o=r(25655),s=r(24147);function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(t.children);try{for(s.s();!(i=s.n()).done;){var u=i.value;this.parseTiles(u,e,t,n)}}catch(t){s.e(t)}finally{s.f()}}}},{key:"extendTileset",value:function(t,e,r,n){this.parseTiles(t.root,r,this.tiles[e],n),this.tiles[e].children=[t.root],this.tiles[e].isTileset=!0}}]),t}()},86896:(t,e,r)=>{"use strict";r.d(e,{Dx:()=>s,S_:()=>i,_F:()=>a,ie:()=>o});var n=r(27240),i=function(t){return t.fx&&(console.warn("ColorLayer fx is deprecated, use ColorLayer.effect_type and ColorLayer.effect_parameter instead."),t.fx>2?(t.effect_parameter=t.fx,t.effect_type=n.pO.removeLightColor):t.fx>0&&(t.effect_parameter=t.fx,t.effect_type=n.pO.removeWhiteColor)),t},a=function(t){if(t.crsOut||t.crsIn){console.warn("Parsing options with crsIn and crsOut are deprecated, use { in, out } structure.");var e={in:{},out:{}};return e.in.crs=t.crsIn,e.in.isInverted=t.isInverted,e.in.styles=t.styles,e.in.layers=t.layers,e.in.filter=t.filter,e.out.crs=t.crsOut,e.out.mergeFeatures=t.mergeFeatures,t.withAltitude&&t.withNormal?(console.warn("Parsing options withAltitude and withNormal is deprecated, use out.structure: 2d or 3d."),e.out.structure="3d"):e.out.structure="2d",e.out.filteringExtent=t.filteringExtent,e.out.style=t.style,void 0!==t.crsOut.overrideAltitudeInToZero&&console.error("Parsing options out.overrideAltitudeInToZero is removed, use Style.xxx.base_altitude instead"),e.out.filter=t.filter,e}return t.out&&(void 0===t.out.withAltitude&&void 0===t.out.withNormal||(console.warn("Parsing options out.withAltitude and out.withNormal is deprecated, use out.structure: 2d or 3d."),t.out.withAltitude&&t.out.withNormal?t.out.structure="3d":t.out.structure="2d"),void 0!==t.out.overrideAltitudeInToZero&&console.error("Parsing options out.overrideAltitudeInToZero is removed, use Style.xxx.base_altitude instead")),t},o=function(t){t.color&&console.error("Color convert option is removed, use Style.xxx.color"),t.extrude&&console.error("extrude convert option is removed, use Style.fill.extrusion_height instead"),t.altitude&&console.error("altitude convert option is removed, use Style.xxx.base_altitude instead")},s=function(t){!1===t.isWebGL2&&console.warn("WebGL1 support (isWebGL2=false) is deprecated and will be removed in iTowns 2.43. This follows its deprecation by three.js. If you are impacted by this change, please discuss in the following issue: https://github.com/iTowns/itowns/issues/2152.")}},94596:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>T,iL:()=>E,t1:()=>U,tg:()=>w});var n=r(97326),i=r(88301),a=r(79340),o=r(82963),s=r(61120),c=r(86033),l=r(13092),u=r(43144),h=r(15671),f=r(99477),d=r(99128),p=r(60145),m=r(82150),g=r(48891);function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r-1?this.indices[r].offset+this.indices[r].count:e.vertices.length/this.size;this.indices.push({offset:i,count:t,extent:n}),(0,l.Z)(this,_,n),function(t,e){t.vertices.length+=e*t.size,t.normals&&(t.normals.length=t.vertices.length)}(e,t)}},{key:"closeSubGeometry",value:function(t,e){var r=this.indices.length-1,n=r>-1?this.indices[r].offset+this.indices[r].count:e.vertices.length/this.size-t;this.indices.push({offset:n,count:t,extent:(0,c.Z)(this,_)}),this.extent&&(this.extent.union((0,c.Z)(this,_)),(0,l.Z)(this,_,y(this.extent.crs)))}},{key:"getLastSubGeometry",value:function(){var t=this.indices.length-1;return this.indices[t]}},{key:"pushCoordinates",value:function(t,e){if(t.isCoordinates)return console.warn("Deprecated: change in arguments order, use pushCoordinates(feature, coordIn) instead"),void this.pushCoordinates(e,t);e.as(t.crs,x),t.transformToLocalSystem(x),b(t,x),(0,c.Z)(this,_)&&(0,c.Z)(this,_).expandByCoordinates(t.useCrsOut?x:e)}},{key:"pushCoordinatesValues",value:function(t,e,r){if((arguments.length<=3?0:arguments.length-3)>0)return console.warn("Deprecated: change in arguments, use pushCoordinatesValues(feature, {x: long, y: lat, normal}, coordProj) instead"),void this.pushCoordinatesValues(t,{x:e,y:r,normal:arguments.length<=3?void 0:arguments[3]},arguments.length<=4?void 0:arguments[4]);b(t,e),(0,c.Z)(this,_)&&(0,c.Z)(this,_).expandByValuesCoordinates(e.x,e.y)}},{key:"updateExtent",value:function(){if(this.extent){var t=this.indices[this.indices.length-1];t&&this.extent.union(t.extent)}}}]),t}();function M(t,e){this.vertices[this._pos++]=t,this.vertices[this._pos++]=e}function S(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.vertices[this._pos++]=t,this.vertices[this._pos++]=e,this.vertices[this._pos++]=r}var C=function(){function t(e,r){if((0,h.Z)(this,t),!Object.keys(w).find((function(t){return w[t]===e})))throw new Error("Unsupported Feature type: ".concat(e));this.type=e,this.geometries=[],this.vertices=[],this.crs=r.crs,this.size=r.size,this.normals="EPSG:4978"==r.crs?[]:void 0,this.hasRawElevationData=!1,this.transformToLocalSystem=r.transformToLocalSystem.bind(r),r.extent&&(this.extent=y(r.extent.crs),this.useCrsOut=this.extent.crs==this.crs),this._pos=0,this._pushValues=(3===this.size?S:M).bind(this),this.style=g.ZP.setFromProperties}return(0,u.Z)(t,[{key:"bindNewGeometry",value:function(){var t=new E(this);return this.geometries.push(t),t}},{key:"updateExtent",value:function(t){this.extent&&this.extent.union(t.extent)}},{key:"geometryCount",get:function(){return this.geometries.length}}]),t}();const T=C;var I=function(){},R=function(t,e){return t.geodesicNormal.applyNormalMatrix(e.normalMatrixInverse),t.applyMatrix4(e.matrixWorldInverse)},B=function(t,e){return t.applyMatrix4(e.matrixWorldInverse)},k=new f.Vector3(0,0,1),L=new f.Quaternion,P=new WeakMap,D=new WeakMap,U=function(t){(0,a.Z)(g,t);var e,r,d=(e=g,r=function(){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(t){return!1}}(),function(){var t,n=(0,s.Z)(e);if(r){var i=(0,s.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,o.Z)(this,t)});function g(t){var e,r;return(0,h.Z)(this,g),r=d.call(this),v((0,n.Z)(r),P,{writable:!0,value:B}),v((0,n.Z)(r),D,{writable:!0,value:I}),r.isFeatureCollection=!0,r.crs=m.Z.formatToEPSG(t.accurate||null===(e=t.source)||void 0===e||!e.crs?t.crs:t.source.crs),r.features=[],r.mergeFeatures=void 0===t.mergeFeatures||t.mergeFeatures,r.size="3d"==t.structure?3:2,r.filterExtent=t.filterExtent,r.style=t.style,r.isInverted=!1,r.matrixWorldInverse=new f.Matrix4,r.center=new p.Z("EPSG:4326",0,0),2==r.size?(r.extent=!1===t.buildExtent?void 0:y(t.forcedExtentCrs||r.crs),(0,l.Z)((0,n.Z)(r),D,(function(t){t.as(r.crs,r.center),r.position.copy(t),r.updateMatrixWorld(),(0,l.Z)((0,n.Z)(r),D,I)}))):(r.extent=t.buildExtent?y(t.forcedExtentCrs||r.crs):void 0,(0,l.Z)((0,n.Z)(r),D,(function(t){t.as("EPSG:4326",r.center),"EPSG:4978"==r.crs&&(r.quaternion.setFromUnitVectors(k,t.geodesicNormal),L.setFromAxisAngle(k,f.MathUtils.degToRad(90+r.center.longitude)),r.quaternion.multiply(L)),r.position.copy(t),r.updateMatrixWorld(),r.normalMatrix.getNormalMatrix(r.matrix),r.normalMatrixInverse=(new f.Matrix3).copy(r.normalMatrix).invert(),(0,l.Z)((0,n.Z)(r),D,I)})),(0,l.Z)((0,n.Z)(r),P,R)),r}return(0,u.Z)(g,[{key:"transformToLocalSystem",value:function(t){return(0,c.Z)(this,D).call(this,t),(0,c.Z)(this,P).call(this,t,this)}},{key:"updateExtent",value:function(t){if(this.extent){var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return A(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(t?[t]:this.features.map((function(t){return t.extent})));try{for(r.s();!(e=r.n()).done;){var n=e.value;this.extent.union(n)}}catch(t){r.e(t)}finally{r.f()}}}},{key:"updateMatrixWorld",value:function(t){(0,i.Z)((0,s.Z)(g.prototype),"updateMatrixWorld",this).call(this,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}},{key:"removeEmptyFeature",value:function(){this.features=this.features.filter((function(t){return t.geometries.length}))}},{key:"pushFeature",value:function(t){this.features.push(t),this.updateExtent(t.extent)}},{key:"requestFeature",value:function(t,e){var r=this.features.find(e);if(r&&this.mergeFeatures)return r;var n=new C(t,this);return this.features.push(n),n}},{key:"requestFeatureByType",value:function(t){return this.requestFeature(t,(function(e){return e.type===t}))}},{key:"requestFeatureById",value:function(t,e){return this.requestFeature(e,(function(e){return e.id===t}))}},{key:"newFeatureByReference",value:function(t){var e=new C(t.type,this);return e.extent=t.extent,e.geometries=t.geometries,e.normals=t.normals,e.size=t.size,e.vertices=t.vertices,e._pos=t._pos,this.features.push(e),e}}]),g}(f.Object3D)},60145:(t,e,r)=>{"use strict";r.d(e,{Z:()=>g});var n=r(15671),i=r(43144),a=r(99477),o=r(24472),s=r(82150),c=r(16828);o.default.defs("EPSG:4978","+proj=geocent +datum=WGS84 +units=m +no_defs");var l,u,h=new c.Z,f={},d=new a.Vector3,p=new a.Vector3,m=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;(0,n.Z)(this,t),this.isCoordinates=!0,s.Z.isValid(e),this.crs=e,this.x=0,this.y=0,this.z=0,this._normal=new a.Vector3,r.length>0?this.setFromArray(r):r.isVector3||r.isCoordinates?this.setFromVector3(r):this.setFromValues(r,i,o),this._normalNeedsUpdate=!0}return(0,i.Z)(t,[{key:"setCrs",value:function(t){s.Z.isValid(t),this.crs=t}},{key:"setFromValues",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.x=null==t?0:t,this.y=null==e?0:e,this.z=null==r?0:r,this._normalNeedsUpdate=!0,this}},{key:"setFromArray",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.setFromValues(t[e],t[e+1],t[e+2])}},{key:"setFromVector3",value:function(t){return this.setFromValues(t.x,t.y,t.z)}},{key:"clone",value:function(){return new t(this.crs,this)}},{key:"copy",value:function(t){return this.crs=t.crs,this.setFromVector3(t)}},{key:"longitude",get:function(){return this.x}},{key:"latitude",get:function(){return this.y}},{key:"altitude",get:function(){return this.z},set:function(t){this.z=t}},{key:"geodesicNormal",get:function(){return this._normalNeedsUpdate&&(this._normalNeedsUpdate=!1,s.Z.is4326(this.crs)?h.geodeticSurfaceNormalCartographic(this,this._normal):"EPSG:4978"==this.crs?h.geodeticSurfaceNormal(this,this._normal):this._normal.set(0,0,1)),this._normal}},{key:"toVector3",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:new a.Vector3).copy(this)}},{key:"toArray",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return a.Vector3.prototype.toArray.call(this,t,e)}},{key:"planarDistanceTo",value:function(t){return this.toVector3(d).setZ(0),t.toVector3(p).setZ(0),d.distanceTo(p)}},{key:"geodeticDistanceTo",value:function(t){return this.as("EPSG:4326",l),t.as("EPSG:4326",u),h.geodesicDistance(l,u)}},{key:"spatialEuclideanDistanceTo",value:function(t){return this.as("EPSG:4978",l).toVector3(d),t.as("EPSG:4978",u).toVector3(p),d.distanceTo(p)}},{key:"applyMatrix4",value:function(t){return a.Vector3.prototype.applyMatrix4.call(this,t)}},{key:"as",value:function(e){var r,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new t(e);return this.crs==e?i.copy(this):(s.Z.is4326(this.crs)&&"EPSG:3857"==e&&(this.y=a.MathUtils.clamp(this.y,-89.999999,89.999999)),i.setFromArray((r=this.crs,n=e,f[r]||(f[r]={}),f[r][n]||(f[r][n]=(0,o.default)(r,n)),f[r][n]).forward([this.x,this.y,this.z]))),i.crs=e,i}}]),t}();l=new m("EPSG:4326",0,0,0),u=new m("EPSG:4326",0,0,0);const g=m},82150:(t,e,r)=>{"use strict";r.d(e,{Z:()=>d});var n=r(24472);function i(t){return"string"==typeof t||t instanceof String}function a(t){if(!i(t))throw new Error("Crs parameter value must be a string: '".concat(t,"'"))}function o(t){return i(t)&&t.startsWith("TMS")}function s(t){return i(t)&&t.startsWith("EPSG")}function c(t){return a(t),s(t)?t:"EPSG:".concat(t.match(/\d+/)[0])}n.default.defs("EPSG:4978","+proj=geocent +datum=WGS84 +units=m +no_defs");var l={DEGREE:1,METER:2};function u(t){return"EPSG:4326"===t}function h(t){switch(a(t),t){case"EPSG:4326":return l.DEGREE;case"EPSG:4978":return l.METER;default:var e=n.default.defs(c(t));if(!e)return;return"degrees"===(r=e.units)?l.DEGREE:"m"===r?l.METER:void 0}var r}function f(t){a(t);var e=h(t);if(void 0===e)throw new Error("No unit found for crs: '".concat(t,"'"));return e}const d={UNIT:l,isValid:function(t){f(t)},isGeographic:function(t){return f(t)==l.DEGREE},isMetricUnit:function(t){return h(t)==l.METER},toUnit:h,is4326:u,isGeocentric:function(t){a(t);var e=n.default.defs(t);return!!e&&"geocent"==e.projName},reasonnableEpsilon:function(t){return u(t)?.01:.001},formatToEPSG:c,formatToTms:function(t){return a(t),o(t)?t:"TMS:".concat(t.match(/\d+/)[0])},isTms:o,isEpsg:s,tms_3857:"TMS:3857",tms_4326:"TMS:4326",defs:function(t,e){return n.default.defs(t,e)}}},99128:(t,e,r)=>{"use strict";r.d(e,{Mh:()=>C,ZP:()=>L,dS:()=>T});var n,i,a=r(15671),o=r(43144),s=r(99477),c=r(60145),l=r(82150),u=new s.Vector2,h=new s.Vector2,f=new s.Vector2,d=new s.Box3,p=new s.Vector2,m=new s.Vector2,g=new s.Vector2(2,2),A={row:0,col:0,invDiff:0},v=new c.Z("EPSG:4326",0,0,0),y=new c.Z("EPSG:4326",0,0,0),b=new c.Z("EPSG:4326",0,0,0),x=new s.Vector3,w=new s.Vector3;function _(t,e){var r=t.zoom-e,n=Math.pow(2,r);return A.invDiff=1/n,A.row=(t.row-t.row%n)*A.invDiff,A.col=(t.col-t.col%n)*A.invDiff,A}for(var E=new Array(8),M=E.length-1;M>=0;M--)E[M]=new c.Z("EPSG:4326",0,0,0,0);var S=new c.Z("EPSG:4326",0,0),C=new Map,T=new Map;function I(t){var e=l.Z.formatToEPSG(t),r=C.get(e),n=r.planarDimensions(h),i=l.Z.formatToTms(t);return{epsg:e,globalExtent:r,globalDimension:n,sTs:T.get(i)||T.get("default"),isInverted:!i.includes(":NI")}}function R(t,e){var r=T.get(l.Z.formatToTms(t))||T.get("default"),n=Math.pow(2,e);return f.set(n,n).multiply(r),f}var B=function(){function t(e,r,n,i,o){if((0,a.Z)(this,t),l.Z.isGeocentric(e))throw new Error("".concat(e," is a geocentric projection, it doesn't make sense with a geographical extent"));this.isExtent=!0,this.crs=e,this.zoom=0,l.Z.isTms(this.crs)?(this.row=0,this.col=0):(this.west=0,this.east=0,this.south=0,this.north=0),this.set(r,n,i,o)}return(0,o.Z)(t,[{key:"clone",value:function(){return l.Z.isTms(this.crs)?new t(this.crs,this.zoom,this.row,this.col):new t(this.crs,this.west,this.east,this.south,this.north)}},{key:"tiledCovering",value:function(e){if("EPSG:4326"==this.crs&&e==l.Z.tms_3857){var r=[],a=n.copy(this).as(l.Z.formatToEPSG(e),i),o=I(l.Z.formatToEPSG(e)),s=o.globalExtent,c=o.globalDimension,u=o.sTs;a.clampByExtent(s),a.planarDimensions(m);var h=this.zoom+1||Math.floor(Math.log2(Math.round(c.x/(m.x*u.x)))),f=R(e,h),d=a.center(S);p.x=d.x-s.west,p.y=s.north-a.north,p.divide(c).multiply(f).floor();for(var g=Math.ceil((s.north-a.south)/c.x*f.y)-1;g>=p.y;g--)r.push(new t(e,h,g,p.x));return r}var A=new t(e,0,0,0),v=I(this.crs),y=v.globalExtent,b=v.globalDimension,x=v.sTs,w=v.isInverted,_=this.center(S);this.planarDimensions(m);var E=Math.floor(Math.log2(Math.round(b.x/(m.x*x.x)))),M=R(e,E);return p.x=_.x-y.west,p.y=w?y.north-_.y:_.y-y.south,p.divide(b).multiply(M).floor(),A.set(E,p.y,p.x),[A]}},{key:"as",value:function(e,r){if(l.Z.isValid(e),r=r||new t("EPSG:4326",[0,0,0,0]),l.Z.isTms(this.crs)){var n=I(this.crs),i=n.epsg,a=n.globalExtent,o=n.globalDimension,s=R(this.crs,this.zoom);return m.set(1,1).divide(s).multiply(o),r.west=a.west+(o.x-m.x*(s.x-this.col)),r.east=r.west+m.x,r.south=a.south+m.y*(s.y-this.row-1),r.north=r.south+m.y,r.crs=i,r.zoom=this.zoom,e==i?r:r.as(e,r)}if(l.Z.isEpsg(e)){if(this.crs!=e){var c=this.center(S);E[0].setFromValues(this.west,this.north),E[1].setFromValues(c.x,this.north),E[2].setFromValues(this.east,this.north),E[3].setFromValues(this.east,c.y),E[4].setFromValues(this.east,this.south),E[5].setFromValues(c.x,this.south),E[6].setFromValues(this.west,this.south),E[7].setFromValues(this.west,c.y),r.set(1/0,-1/0,1/0,-1/0);for(var u=0;u0&&void 0!==arguments[0]?arguments[0]:new c.Z(this.crs);if(l.Z.isTms(this.crs))throw new Error("Invalid operation for WMTS bbox");return this.planarDimensions(u),t.crs=this.crs,t.setFromValues(this.west+.5*u.x,this.south+.5*u.y),t}},{key:"dimensions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new s.Vector2;return console.warn("Extent.dimensions is deprecated, use planarDimensions, geodeticDimensions or spatialEuclideanDimensions"),t.x=Math.abs(this.east-this.west),t.y=Math.abs(this.north-this.south),t}},{key:"planarDimensions",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:new s.Vector2).set(Math.abs(this.east-this.west),Math.abs(this.north-this.south))}},{key:"geodeticDimensions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new s.Vector2;return v.crs=this.crs,y.crs=this.crs,b.crs=this.crs,v.setFromValues(this.west,this.north,0),y.setFromValues(this.west,this.south,0),b.setFromValues(this.east,this.north,0),t.set(v.geodeticDistanceTo(b),v.geodeticDistanceTo(y))}},{key:"spatialEuclideanDimensions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new s.Vector2;return v.crs=this.crs,y.crs=this.crs,b.crs=this.crs,v.setFromValues(this.west,this.north,0),y.setFromValues(this.west,this.south,0),b.setFromValues(this.east,this.north,0),t.set(v.spatialEuclideanDistanceTo(b),v.spatialEuclideanDistanceTo(y))}},{key:"isPointInside",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.crs==t.crs?S.copy(t):t.as(this.crs,S),S.x<=this.east+e&&S.x>=this.west-e&&S.y<=this.north+e&&S.y>=this.south-e}},{key:"isInside",value:function(t,e){return l.Z.isTms(this.crs)?this.zoom==t.zoom?this.row==t.row&&this.col==t.col:!(this.zoom1&&void 0!==arguments[1]?arguments[1]:new s.Vector4;if(this.crs!=t.crs)throw new Error("unsupported mix");if(l.Z.isTms(this.crs))return _(this,t.zoom),e.set(this.col*A.invDiff-A.col,this.row*A.invDiff-A.row,A.invDiff,A.invDiff);t.planarDimensions(u),this.planarDimensions(h);var r=(this.west-t.west)/u.x,n=(t.north-this.north)/u.y,i=h.x/u.x,a=h.y/u.y;return e.set(r,n,i,a)}},{key:"tiledExtentParent",value:function(e){return e&&ethis.east&&(this.east=r);var n=t.south;nthis.north&&(this.north=i)}}},{key:"expandByCoordinates",value:function(t){var e=t.crs==this.crs?t:t.as(this.crs,S);this.expandByValuesCoordinates(e.x,e.y)}},{key:"expandByValuesCoordinates",value:function(t,e){tthis.east&&(this.east=t),ethis.north&&(this.north=e)}},{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return l.Z.isTms(this.crs)?"".concat(this.zoom).concat(t).concat(this.row).concat(t).concat(this.col):"".concat(this.east).concat(t).concat(this.north).concat(t).concat(this.west).concat(t).concat(this.south)}},{key:"subdivision",value:function(){return this.subdivisionByScheme()}},{key:"subdivisionByScheme",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,r=[],n=this.planarDimensions(u).divide(e),i=e.x-1;i>=0;i--)for(var a=e.y-1;a>=0;a--){var o=this.west+i*n.x,s=this.south+a*n.y;r.push(new t(this.crs,o,o+n.x,s,s+n.y))}return r}},{key:"applyMatrix4",value:function(t){if(!l.Z.isTms(this.crs)){if(x.set(this.west,this.south,0).applyMatrix4(t),w.set(this.east,this.north,0).applyMatrix4(t),this.west=x.x,this.east=w.x,this.south=x.y,this.north=w.y,this.west>this.east){var e=this.west;this.west=this.east,this.east=e}if(this.south>this.north){var r=this.south;this.south=this.north,this.north=r}return this}}},{key:"clampSouthNorth",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.south,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.north;return this.south=Math.max(this.south,t),this.north=Math.min(this.north,e),this}},{key:"clampWestEast",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.west,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.east;return this.west=Math.max(this.west,t),this.east=Math.min(this.east,e),this}},{key:"clampByExtent",value:function(t){return this.clampSouthNorth(t.south,t.north),this.clampWestEast(t.west,t.east)}}],[{key:"intersectsExtent",value:function(t,e){var r=e.crs==t.crs?e:e.as(t.crs,n);return!(t.west>=r.east||t.east<=r.west||t.south>=r.north||t.north<=r.south)}},{key:"fromBox3",value:function(e,r){return l.Z.isGeocentric(e)&&(e="EPSG:4326",r=d.copy(r),y.crs=e,y.setFromVector3(r.min).as(e,y).toVector3(r.min),b.crs=e,b.setFromVector3(r.max).as(e,b).toVector3(r.max)),new t(e,{west:r.min.x,east:r.max.x,south:r.min.y,north:r.max.y})}}]),t}();n=new B("EPSG:4326",[0,0,0,0]),i=new B("EPSG:4326",[0,0,0,0]),C.set("EPSG:4326",new B("EPSG:4326",-180,180,-90,90));var k=C.get("EPSG:4326").as("EPSG:3857");k.clampSouthNorth(k.west,k.east),C.set("EPSG:3857",k),T.set("default",new s.Vector2(1,1)),T.set(l.Z.tms_3857,T.get("default")),T.set(l.Z.tms_4326,new s.Vector2(2,1));const L=B},67503:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var n=r(15671),i=r(43144),a=r(99477),o=r(60145),s=r(82150),c=new o.Z("EPSG:4326"),l=new a.Vector2;const u=function(){function t(e,r,i){(0,n.Z)(this,t),s.Z.isGeographic(e.crs),this.extent=e,this.step=new a.Vector2(r.x,r.y||r.x),this.dimensions=this.extent.planarDimensions(),this.dataSize=(new a.Vector2).addVectors(this.step,this.dimensions).divide(this.step).round(),this.getData=i}return(0,i.Z)(t,[{key:"getHeightAtCoordinates",value:function(t){return t.as(this.extent.crs,c),l.set((this.dataSize.x-1)*(c.x-this.extent.west)/this.dimensions.x,(this.dataSize.y-1)*(c.y-this.extent.south)/this.dimensions.y),l.x<0||l.x>=this.dataSize.x-1||l.y<0||l.y>=this.dataSize.y-1?0:function(t,e){var r=Math.floor(t.x),n=Math.floor(t.y),i=t.x-r,a=t.y-n;return(1-i)*((1-a)*e(n,r)+a*e(n+1,r))+i*((1-a)*e(n,r+1)+a*e(n+1,r+1))}(l,this.getData)}}]),t}()},57918:(t,e,r)=>{"use strict";r.d(e,{Z:()=>p});var n=r(15671),i=r(43144),a=r(97326),o=r(79340),s=r(82963),c=r(61120),l=r(99477),u=r(79295);var h,f,d=new(r(60145).Z)("EPSG:4326");f=void 0!==document.documentElement.style.transform?"transform":void 0!==document.documentElement.style.webkitTransform?"webkitTransform":void 0!==document.documentElement.style.mozTransform?"mozTransform":void 0!==document.documentElement.style.oTransform?"oTransform":"transform";const p=function(t){(0,o.Z)(p,t);var e,r,l=(e=p,r=function(){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(t){return!1}}(),function(){var t,n=(0,c.Z)(e);if(r){var i=(0,c.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,s.Z)(this,t)});function p(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if((0,n.Z)(this,p),null==r)throw new Error("coordinates are mandatory to add a Label");arguments.length>3&&console.warn("Deprecated argument sprites in Label constructor. Sprites must be configured in style argument.");var o=(t=l.call(this)).visible;return Object.defineProperty((0,a.Z)(t),"visible",{set:function(t){t!=o&&(o=t,this.content.style.display=t?"block":"none")},get:function(){return o}}),t.isLabel=!0,t.coordinates=r,t.projectedPosition={x:0,y:0},t.boundaries={left:0,right:0,top:0,bottom:0},"string"==typeof e?(t.content=document.createElement("div"),t.content.textContent=i.text.field):t.content=e.cloneNode(!0),t.content.classList.add("itowns-label"),t.content.style.userSelect="none",t.content.style.position="absolute",i.isStyle?(t.anchor=i.getTextAnchorPosition(),t.styleOffset=i.text.offset,"string"==typeof e&&(i.text.haloWidth>0&&t.content.classList.add("itowns-stroke-single"),i.applyToHTML(t.content).then((function(e){e&&(t.icon=e)})))):(t.anchor=[0,0],t.styleOffset=[0,0]),t.iconOffset={left:0,right:0,top:0,bottom:0},t.zoom={min:i.zoom&&null!=i.zoom.min?i.zoom.min:2,max:i.zoom&&null!=i.zoom.max?i.zoom.max:24},t.order=i.order||0,t.padding=2,t}return(0,i.Z)(p,[{key:"updateProjectedPosition",value:function(t,e){var r=Math.round(t),n=Math.round(e);r==this.projectedPosition.x&&n==this.projectedPosition.y||(this.projectedPosition.x=r,this.projectedPosition.y=n,this.boundaries.left=t+this.offset.left-this.padding,this.boundaries.right=t+this.offset.right+this.padding,this.boundaries.top=e+this.offset.top-this.padding,this.boundaries.bottom=e+this.offset.bottom+this.padding,0===this.iconOffset.left&&0===this.iconOffset.right&&0===this.iconOffset.top&&0===this.iconOffset.bottom||(this.boundaries.left=Math.min(this.boundaries.left,t+this.iconOffset.left),this.boundaries.right=Math.max(this.boundaries.right,t+this.iconOffset.right),this.boundaries.top=Math.min(this.boundaries.top,e+this.iconOffset.top),this.boundaries.bottom=Math.max(this.boundaries.bottom,e+this.iconOffset.bottom)))}},{key:"updateCSSPosition",value:function(){this.content.style[f]="translate(".concat(this.projectedPosition.x+this.offset.left,"px, ").concat(this.projectedPosition.y+this.offset.top,"px)"),this.icon&&(this.icon.style[f]="translate(".concat(-this.offset.left,"px, ").concat(-this.offset.top,"px)"))}},{key:"initDimensions",value:function(){if(!this.offset){h=this.content.getBoundingClientRect();var t=Math.round(h.width),e=Math.round(h.height);this.offset={left:t*this.anchor[0]+this.styleOffset[0],top:e*this.anchor[1]+this.styleOffset[1]},this.offset.right=this.offset.left+t,this.offset.bottom=this.offset.top+e,this.icon&&(h=this.icon.getBoundingClientRect(),this.iconOffset={left:Math.floor(h.x),top:Math.floor(h.y),right:Math.ceil(h.x+h.width),bottom:Math.ceil(h.y+h.height)})}}},{key:"update3dPosition",value:function(t){this.coordinates.as(t,d).toVector3(this.position),this.updateMatrixWorld()}},{key:"updateElevationFromLayer",value:function(t,e){if(0!=t.attachedLayers.filter((function(t){return t.isElevationLayer})).length){var r=Math.max(0,u.Z.getElevationValueAt(t,this.coordinates,u.Z.FAST_READ_Z,e));isNaN(r)&&(r=Math.max(0,u.Z.getElevationValueAt(t,this.coordinates,u.Z.FAST_READ_Z))),isNaN(r)||r==this.coordinates.z||(this.coordinates.z=r)}}},{key:"updateHorizonCullingPoint",value:function(){this.horizonCullingPoint&&this.getWorldPosition(this.horizonCullingPoint)}}]),p}(l.Object3D)},49469:(t,e,r)=>{"use strict";r.d(e,{Ao:()=>y,HR:()=>v,ZP:()=>I});var n=r(15671),i=r(43144),a=r(97326),o=r(79340),s=r(82963),c=r(61120),l=r(13092),u=r(86033),h=r(99477);function f(t,e){p(t,e),e.add(t)}function d(t,e,r){p(t,e),e.set(t,r)}function p(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(t,e,r){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return r}function g(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return A(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0){var c,l=g(o.attachedLayers);try{for(l.s();!(c=l.n()).done;){var h=c.value;h.ready&&h.preUpdate&&h.preUpdate(n,s)}}catch(t){l.e(t)}finally{l.f()}var f=o.preUpdate(n,s);b(n,o,f),o.postUpdate(n,o,e)}o.cache.flush(),t.execFrameRequesters(y.AFTER_LAYER_UPDATE,r,(0,u.Z)(this,_),o)}}}catch(t){a.e(t)}finally{a.f()}}function T(t,e){t.execFrameRequesters(y.BEFORE_RENDER,e,(0,u.Z)(this,_)),t.render?t.render():this.gfxEngine.renderView(t),t.execFrameRequesters(y.AFTER_RENDER,e,(0,u.Z)(this,_))}const I=function(t){(0,o.Z)(p,t);var e,r,h=(e=p,r=function(){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(t){return!1}}(),function(){var t,n=(0,c.Z)(e);if(r){var i=(0,c.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,s.Z)(this,t)});function p(t,e){var r;return(0,n.Z)(this,p),r=h.call(this),f((0,a.Z)(r),S),f((0,a.Z)(r),M),d((0,a.Z)(r),w,{writable:!0,value:!1}),d((0,a.Z)(r),_,{writable:!0,value:!0}),d((0,a.Z)(r),E,{writable:!0,value:0}),r.renderingState=v,r.scheduler=t,r.gfxEngine=e,r}return(0,i.Z)(p,[{key:"scheduleViewUpdate",value:function(t,e){var r=this;(0,l.Z)(this,w,(0,u.Z)(this,w)|e),1!==this.renderingState&&(this.renderingState=1,this.gfxEngine.renderer.xr.isPresenting||requestAnimationFrame((function(e){r.step(t,e)})))}},{key:"step",value:function(t,e){var r=e-(0,u.Z)(this,E);t._executeFrameRequestersRemovals(),t.execFrameRequesters(y.UPDATE_START,r,(0,u.Z)(this,_));var n=(0,u.Z)(this,w);(0,l.Z)(this,E,e),(0,l.Z)(this,w,!1),this.renderingState=v;var i=new Set(t._changeSources);t._changeSources.clear();var a=this.gfxEngine.getWindowSize();t.execFrameRequesters(y.BEFORE_CAMERA_UPDATE,r,(0,u.Z)(this,_)),t.camera.update(a.x,a.y),t.execFrameRequesters(y.AFTER_CAMERA_UPDATE,r,(0,u.Z)(this,_));var o=t.camera3D.matrixAutoUpdate;t.camera3D.matrixAutoUpdate=!1,m(this,M,C).call(this,t,i,r),0==this.scheduler.commandsWaitingExecutionCount()&&this.dispatchEvent({type:"command-queue-empty"}),n&&m(this,S,T).call(this,t,r),(0,l.Z)(this,_,this.renderingState===v),t.camera3D.matrixAutoUpdate=o,t.execFrameRequesters(y.UPDATE_END,r,(0,u.Z)(this,_))}}]),p}(h.EventDispatcher)},16828:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u,c:()=>c});var n=r(15671),i=r(43144),a=r(99477),o=r(24472),s=r(60145),c=new a.Vector3(o.default.WGS84.a,o.default.WGS84.a,o.default.WGS84.b),l=new a.Vector3;const u=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;(0,n.Z)(this,t),this.size=new a.Vector3,this._radiiSquared=new a.Vector3,this._invRadiiSquared=new a.Vector3,this.eccentricity=0,this.setSize(e)}return(0,i.Z)(t,[{key:"geodeticSurfaceNormal",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new a.Vector3;return t.toVector3(e).multiply(this._invRadiiSquared).normalize()}},{key:"geodeticSurfaceNormalCartographic",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new a.Vector3,r=a.MathUtils.degToRad(t.longitude),n=a.MathUtils.degToRad(t.latitude),i=Math.cos(n);return e.set(i*Math.cos(r),i*Math.sin(r),Math.sin(n))}},{key:"setSize",value:function(t){this.size.set(t.x,t.y,t.z),this._radiiSquared.multiplyVectors(t,t),this._invRadiiSquared.x=0==t.x?0:1/this._radiiSquared.x,this._invRadiiSquared.y=0==t.y?0:1/this._radiiSquared.y,this._invRadiiSquared.z=0==t.z?0:1/this._radiiSquared.z,this.eccentricity=Math.sqrt(this._radiiSquared.x-this._radiiSquared.z)/this.size.x}},{key:"cartographicToCartesian",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new a.Vector3;l.copy(t.geodesicNormal),e.multiplyVectors(this._radiiSquared,l);var r=Math.sqrt(l.dot(e));return e.divideScalar(r),l.multiplyScalar(t.altitude),e.add(l)}},{key:"cartesianToCartographic",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new s.Z("EPSG:4326",0,0,0),r=Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z),n=this.size.x,i=this.size.z,o=Math.abs((n*n-i*i)/(n*n)),c=1-Math.sqrt(1-o),l=Math.sqrt(t.x*t.x+t.y*t.y),u=Math.atan2(t.y,t.x),h=Math.atan(t.z/l*(1-c+o*n/r)),f=Math.sin(h),d=Math.cos(h),p=Math.atan((t.z*(1-c)+o*n*f*f*f)/((1-c)*(l-o*n*d*d*d))),m=l*Math.cos(p)+t.z*Math.sin(p)-n*Math.sqrt(1-o*Math.sin(p)*Math.sin(p));return e.setFromValues(a.MathUtils.radToDeg(u),a.MathUtils.radToDeg(p),m)}},{key:"cartographicToCartesianArray",value:function(t){for(var e=[],r=0;r{"use strict";r.d(e,{Z:()=>v});var n=r(99477),i=r(32475),a=r(27240),o=r(60145);function s(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);ri||c<=r||!1!==e(a,s)))return}r=i}}function h(t){return t.layer?t.layer:t.parent?h(t.parent):void 0}var f=new n.Raycaster,d=new n.Vector2,p=new n.Vector3,m=new o.Z("EPSG:4978"),g=new n.Vector3,A=new o.Z("EPSG:4978");const v={pickTilesAt:function(t,e,r,o){var c,h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],f=function(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=t.mainLoop.gfxEngine.getWindowSize();r=r||new n.Vector2(Math.floor(s.x/2),Math.floor(s.y/2));var c=e.level0Nodes.map((function(t){return i.Z.push(t,i.Z.MODES.ID)})),h=t.mainLoop.gfxEngine.renderViewToBuffer({camera:t.camera,scene:e.object3d},{x:r.x-o,y:r.y-o,width:1+2*o,height:1+2*o});c.forEach((function(t){return t()}));var f=[];return u(o,(function(t,e){var r=4*(2*e*o+t),n=h.slice(r,r+4||void 0);l.fromArray(n).divideScalar(255);var i=(0,a.On)(l,Math.pow(256,3)),s=Math.round(i);f.includes(s)||f.push(s)})),f}(t,o,e,r),d=function(t){f.includes(t.id)&&t.isTileMesh&&h.push({object:t,layer:o})},p=s(o.level0Nodes);try{for(p.s();!(c=p.n()).done;)c.value.traverse(d)}catch(t){p.e(t)}finally{p.f()}return h},pickPointsAt:function(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(n.root){n.object3d.traverse((function(t){t.isPoints&&t.baseId&&t.material.enablePicking(!0)}));var a=t.mainLoop.gfxEngine.renderViewToBuffer({camera:t.camera,scene:n.object3d},{x:e.x-r,y:e.y-r,width:1+2*r,height:1+2*r}),o=[];return u(r,(function(t,e){for(var n=4*(2*e*r+t),i=a.slice(n,n+4),s={objId:i[0]<<8|i[1],index:i[2]<<8|i[3]},c=0;c4&&void 0!==arguments[4]?arguments[4]:[];if(t.viewToNormalizedCoords(e,d),r<0){f.setFromCamera(d,t.camera3D);var o,c=s(f.intersectObject(i,!0));try{for(c.s();!(o=c.n()).done;){var l=o.value;l.layer=h(l.object),a.push(l)}}catch(t){c.e(t)}finally{c.f()}return a}var p={x:e.x-r,y:e.y-r,width:1+2*r,height:1+2*r},m=t.mainLoop.gfxEngine.renderViewToBuffer({scene:i,camera:t.camera},p),g=new n.Color;t.mainLoop.gfxEngine.renderer.getClearColor(g);var A=Math.round(255*g.r),v=Math.round(255*g.g),y=Math.round(255*g.b),b=d.clone();return u(r,(function(e,n){var o=4*((n+r)*(2*r+1)+(e+r)),c=m[o],l=m[o+1],u=m[o+2];if(!(Math.abs(A-c)<=1&&Math.abs(v-l)<=1&&Math.abs(y-u)<=1)){b.setX(d.x+e/t.camera.width).setY(d.y+n/t.camera.height),f.setFromCamera(b,t.camera3D);var p,g=s(f.intersectObject(i,!0));try{for(g.s();!(p=g.n()).done;){var x=p.value;x.layer=h(x.object),a.push(x)}}catch(t){g.e(t)}finally{g.f()}return 0==a.length}})),a}}},56564:(t,e,r)=>{"use strict";r.d(e,{Z:()=>g});var n=r(15671),i=r(43144),a=r(99477),o=r(60145),s=r(99128),c=Math.PI/4,l=1/(2*Math.PI),u=new a.Vector3(0,0,1),h=new a.Vector3(0,1,0),f=new a.Quaternion,d=new a.Quaternion,p=new a.Quaternion;function m(t){return 1-(.5-Math.log(Math.tan(c+.5*a.MathUtils.degToRad(t)))*l)}const g=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.Z)(this,t),this.tmp={coords:[new o.Z("EPSG:4326",0,0),new o.Z("EPSG:4326",0,0)],position:new a.Vector3,dimension:new a.Vector2},this.crs=e.crs,this.uvCount=e.uvCount,this.computeUvs=[function(){},function(t){var e=m(t.projected.latitude)*t.nbRow;return(isFinite(e)?e:0)-t.deltaUV1}]}return(0,i.Z)(t,[{key:"prepare",value:function(t){t.nbRow=Math.pow(2,t.level+1);var e=m(t.extent.south);isFinite(e)||(e=0);var r=e%(1/t.nbRow);t.deltaUV1=(e-r)*t.nbRow,t.quatNormalToZ=p.setFromAxisAngle(h,-(.5*Math.PI-a.MathUtils.degToRad(t.extent.center().latitude))),t.projected={longitude:0,latitude:0},t.extent.planarDimensions(this.tmp.dimension)}},{key:"center",value:function(t){return t.center(this.tmp.coords[0]).as(this.crs,this.tmp.coords[1]).toVector3()}},{key:"vertexPosition",value:function(t){return this.tmp.coords[0].setFromValues(t.projected.longitude,t.projected.latitude),this.tmp.coords[0].as(this.crs,this.tmp.coords[1]).toVector3(this.tmp.position),this.tmp.position}},{key:"vertexNormal",value:function(){return this.tmp.coords[1].geodesicNormal}},{key:"uProjecte",value:function(t,e){e.projected.longitude=e.extent.west+t*this.tmp.dimension.x}},{key:"vProjecte",value:function(t,e){e.projected.latitude=e.extent.south+t*this.tmp.dimension.y}},{key:"computeSharableExtent",value:function(t){var e=Math.abs(t.west-t.east)/2,r=new s.ZP(t.crs,-e,e,t.south,t.north),n=a.MathUtils.degToRad(t.west-r.west),i=a.MathUtils.degToRad(90-t.center(this.tmp.coords[0]).latitude);return f.setFromAxisAngle(u,n),d.setFromAxisAngle(h,i),f.multiply(d),{sharableExtent:r,quaternion:f.clone(),position:this.center(t)}}}]),t}()},10268:(t,e,r)=>{"use strict";r.d(e,{Z:()=>b});var n=r(15671),i=r(43144),a=r(88301),o=r(79340),s=r(82963),c=r(61120),l=r(99477),u=r(62968),h=r(16828),f=r(99128),d=r(56564),p=r(75963),m=r(82150);var g=new l.Matrix4,A=new l.Vector3,v=0,y=new l.Vector3;const b=function(t){(0,o.Z)(b,t);var e,r,u=(e=b,r=function(){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(t){return!1}}(),function(){var t,n=(0,c.Z)(e);if(r){var i=(0,c.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,s.Z)(this,t)});function b(t,e){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,n.Z)(this,b);var a=f.dS.get(m.Z.tms_4326),o=f.Mh.get("EPSG:4326").subdivisionByScheme(a);i.tileMatrixSets=[m.Z.tms_4326,m.Z.tms_3857];var s=i.tileMatrixSets.length,c=new d.Z({crs:"EPSG:4978",uvCount:s});(r=u.call(this,t,e||new l.Group,o,c,i)).isGlobeLayer=!0,r.options.defaultPickingRadius=5,r.minSubdivisionLevel=null==r.minSubdivisionLevel?2:r.minSubdivisionLevel,r.maxSubdivisionLevel=null==r.maxSubdivisionLevel?19:r.maxSubdivisionLevel,r.maxDeltaElevationLevel=r.maxDeltaElevationLevel||4,r.extent=r.schemeTile[0].clone();for(var p=1;p0:v{"use strict";r.d(e,{b:()=>D,Z:()=>U});var n=r(15671),i=r(43144),a=r(97326),o=r(88301),s=r(79340),c=r(82963),l=r(61120),u=r(99477),h=r(36873),f=r(11925),d=r(60145),p=r(10268),m=r(20193),g=r(16828),A={getSunPosition:function(){var t=Math,e=t.PI,r=t.sin,n=t.cos,i=t.tan,a=t.asin,o=t.atan2,s=e/180,c=23.4397*s;function l(t,e,a){return o(r(t),n(t)*r(e)-i(a)*n(e))}function u(t,e,i){return a(r(e)*r(i)+n(e)*n(i)*n(t))}return function(t,h,f){var d,p=s*h,m=function(t){return function(t){return t.valueOf()/864e5-.5+2440588}(t)-2451545}(t),g=function(t){return s*(357.5291+.98560028*t)}(m),A=function(t){return s*(1.9148*r(t)+.02*r(2*t)+3e-4*r(3*t))}(g),v=function(t,r){return t+r+102.9372*s+e}(g,A),y=(d=v,a(r(0)*n(c)+n(0)*r(c)*r(d))),b=function(t,e){return o(r(t)*n(c)-i(0)*r(c),n(t))}(v),x=function(t,e){return s*(280.16+360.9856235*t)-e}(m,s*-f),w=x-b;return{EclipticLongitude:v,declinaison:y,ascension:b,H:w,SiderealTime:x,altitude:u(w,p,y),azimuth:l(w,p,y)+e/2}}},getSunPositionInScene:function(t,e,r){var n=864e5,i=A.getSunPosition()(t,e,r).ascension+t%n/n*-360+180;return new d.Z("EPSG:4326",i,e,5e7).as("EPSG:4978").toVector3()}};const v=A;var y={uniforms:{luminance:{type:"f",value:1},turbidity:{type:"f",value:2},reileigh:{type:"f",value:1},mieCoefficient:{type:"f",value:.005},mieDirectionalG:{type:"f",value:.8},v3LightPosition:{type:"v3",value:new u.Vector3},up:{type:"v3",value:new u.Vector3(0,1,0)}},vertexShader:["varying vec3 vWorldPosition;","void main() {","vec4 worldPosition = modelMatrix * vec4( cameraPosition + position, 1.0 );","vWorldPosition = worldPosition.xyz;","gl_Position = projectionMatrix * modelViewMatrix * vec4( cameraPosition + position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D skySampler;","uniform vec3 v3LightPosition;","uniform vec3 up;","varying vec3 vWorldPosition;","// uniform sampler2D sDiffuse;","// const float turbidity = 10.0; //","// const float reileigh = 2.; //","// const float luminance = 1.0; //","// const float mieCoefficient = 0.005;","// const float mieDirectionalG = 0.8;","uniform float luminance;","uniform float turbidity;","uniform float reileigh;","uniform float mieCoefficient;","uniform float mieDirectionalG;","// constants for atmospheric scattering","const float e = 2.71828182845904523536028747135266249775724709369995957;","const float pi = 3.141592653589793238462643383279502884197169;","const float n = 1.0003; // refractive index of air","const float N = 2.545E25; // number of molecules per unit volume for air at","// 288.15K and 1013mb (sea level -45 celsius)","const float pn = 0.035; // depolatization factor for standard air","// wavelength of used primaries, according to preetham","const vec3 lambda = vec3(680E-9, 550E-9, 450E-9);","// mie stuff","// K coefficient for the primaries","const vec3 K = vec3(0.686, 0.678, 0.666);","const float v = 4.0;","// optical length at zenith for molecules","const float rayleighZenithLength = 8.4E3;","const float mieZenithLength = 1.25E3;","const float EE = 1000.0;","const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;","// 66 arc seconds -> degrees, and the cosine of that","// earth shadow hack","const float cutoffAngle = pi/1.95;","const float steepness = 1.5;","vec3 totalRayleigh(vec3 lambda)","{","return (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn));","}","// A simplied version of the total Reayleigh scattering to works on browsers that use ANGLE","vec3 simplifiedRayleigh()","{","return 0.0005 / vec3(94, 40, 18);","}","float rayleighPhase(float cosTheta)","{ ","return (3.0 / (16.0*pi)) * (1.0 + pow(cosTheta, 2.0));","// return (1.0 / (3.0*pi)) * (1.0 + pow(cosTheta, 2.0));","// return (3.0 / 4.0) * (1.0 + pow(cosTheta, 2.0));","}","vec3 totalMie(vec3 lambda, vec3 K, float T)","{","float c = (0.2 * T ) * 10E-18;","return 0.434 * c * pi * pow((2.0 * pi) / lambda, vec3(v - 2.0)) * K;","}","float hgPhase(float cosTheta, float g)","{","return (1.0 / (4.0*pi)) * ((1.0 - pow(g, 2.0)) / pow(1.0 - 2.0*g*cosTheta + pow(g, 2.0), 1.5));","}","float sunIntensity(float zenithAngleCos)","{","return EE * max(0.0, 1.0 - exp(-((cutoffAngle - acos(zenithAngleCos))/steepness)));","}","// float logLuminance(vec3 c)","// {","// return log(c.r * 0.2126 + c.g * 0.7152 + c.b * 0.0722);","// }","// Filmic ToneMapping http://filmicgames.com/archives/75","float A = 0.15;","float B = 0.50;","float C = 0.10;","float D = 0.20;","float E = 0.02;","float F = 0.30;","float W = 1000.0;","vec3 Uncharted2Tonemap(vec3 x)","{","return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;","}","void main() ","{","vec3 up2 = normalize(cameraPosition.xyz);","float sunfade = 1.0-clamp(1.0-exp((v3LightPosition.y/450000.0)),0.0,1.0);","float reileighCoefficient = reileigh - (1.0* (1.0-sunfade));","vec3 sunDirection = normalize(v3LightPosition);","float sunE = sunIntensity(dot(sunDirection, up2));","// extinction (absorbtion + out scattering) ","// rayleigh coefficients","vec3 betaR = simplifiedRayleigh() * reileighCoefficient;","// mie coefficients","vec3 betaM = totalMie(lambda, K, turbidity) * mieCoefficient;","// optical length","// cutoff angle at 90 to avoid singularity in next formula.","float zenithAngle = acos(max(0.0, dot(up2, normalize(vWorldPosition - cameraPosition))));","float sR = rayleighZenithLength / (cos(zenithAngle) + 0.15 * pow(93.885 - ((zenithAngle * 180.0) / pi), -1.253));","float sM = mieZenithLength / (cos(zenithAngle) + 0.15 * pow(93.885 - ((zenithAngle * 180.0) / pi), -1.253));","// combined extinction factor","vec3 Fex = exp(-(betaR * sR + betaM * sM));","// in scattering","float cosTheta = dot(normalize(vWorldPosition - cameraPosition), sunDirection);","float rPhase = rayleighPhase(cosTheta*0.5+0.5);","vec3 betaRTheta = betaR * rPhase;","float mPhase = hgPhase(cosTheta, mieDirectionalG);","vec3 betaMTheta = betaM * mPhase;","vec3 Lin = pow(sunE * ((betaRTheta + betaMTheta) / (betaR + betaM)) * (1.0 - Fex),vec3(1.5));","Lin *= mix(vec3(1.0),pow(sunE * ((betaRTheta + betaMTheta) / (betaR + betaM)) * Fex,vec3(1.0/2.0)),clamp(pow(1.0-dot(up2, sunDirection),5.0),0.0,1.0));","//nightsky","vec3 direction = normalize(vWorldPosition - cameraPosition);","float theta = acos(direction.y); // elevation --\x3e y-axis, [-pi/2, pi/2]","float phi = atan(direction.z, direction.x); // azimuth --\x3e x-axis [-pi/2, pi/2]","vec2 uv = vec2(phi, theta) / vec2(2.0*pi, pi) + vec2(0.5, 0.0);","// vec3 L0 = texture2D(skySampler, uv).rgb+0.1 * Fex;","vec3 L0 = vec3(0.1) * Fex;","// composition + solar disc","//if (cosTheta > sunAngularDiameterCos)","float sundisk = smoothstep(sunAngularDiameterCos,sunAngularDiameterCos+0.00002,cosTheta);","// if (normalize(vWorldPosition - cameraPosition).y>0.0)","L0 += (sunE * 19000.0 * Fex)*sundisk;","vec3 whiteScale = 1.0/Uncharted2Tonemap(vec3(W));","vec3 texColor = (Lin+L0); ","texColor *= 0.04 ;","texColor += vec3(0.0,0.001,0.0025)*0.3;","float g_fMaxLuminance = 1.0;","float fLumScaled = 0.1 / luminance; ","float fLumCompressed = (fLumScaled * (1.0 + (fLumScaled / (g_fMaxLuminance * g_fMaxLuminance)))) / (1.0 + fLumScaled); ","float ExposureBias = fLumCompressed;","vec3 curr = Uncharted2Tonemap((log2(2.0/pow(luminance,4.0)))*texColor);","vec3 color = curr*whiteScale;","vec3 retColor = pow(color,vec3(1.0/(1.2+(1.2*sunfade))));","gl_FragColor.rgb = retColor;","gl_FragColor.a = 1. - ( (length(cameraPosition) - 6400000.) / 1000.);","}"].join("\n")};const b=function(t){(0,s.Z)(o,t);var e,r,a=(e=o,r=function(){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(t){return!1}}(),function(){var t,n=(0,l.Z)(e);if(r){var i=(0,l.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,c.Z)(this,t)});function o(){(0,n.Z)(this,o);var t=u.UniformsUtils.clone(y.uniforms),e=new u.ShaderMaterial({fragmentShader:y.fragmentShader,vertexShader:y.vertexShader,uniforms:t,side:u.BackSide,transparent:!0,depthWrite:!1}),r=new u.SphereGeometry(4e4,32,15);return a.call(this,r,e)}return(0,i.Z)(o)}(u.Mesh);var x="#include \n\nuniform int atmoIN;\nvarying float intensity;\n\nvec4 glowColor = vec4(0.45, 0.74, 1. ,1.0);\n\nvoid main() {\n #include \n gl_FragColor = glowColor * intensity;\n}\n\n",w="#include \n#include \n\nuniform int atmoIN;\nvarying float intensity;\n\nvoid main()\n{\n vec3 normalES = normalize( normalMatrix * normal );\n vec3 normalCAMES = normalize( normalMatrix * cameraPosition );\n\n if(atmoIN == 0) {\n intensity = pow(0.666 - dot(normalES, normalCAMES), 4. );\n } else {\n intensity = pow( 1. - dot(normalES, normalCAMES), 0.8 );\n }\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n #include \n}\n\n\n",_=new u.Vector3(1,0,0),E=new u.Vector3,M=new d.Z("EPSG:4326"),S=new d.Z("EPSG:4326"),C=new u.Color(9688568),T=new u.Color,I=new u.Color(197896),R=6e5,B=160*g.c.x;const k=function(t){(0,s.Z)(o,t);var e,r,a=(e=o,r=function(){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(t){return!1}}(),function(){var t,n=(0,l.Z)(e);if(r){var i=(0,l.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,c.Z)(this,t)});function o(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"atmosphere",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.Z)(this,o),r.source=!1,(t=a.call(this,e,new u.Object3D,r)).isAtmosphere=!0;var i=new u.ShaderMaterial({uniforms:{atmoIN:{type:"i",value:0},screenSize:{type:"v2",value:new u.Vector2(window.innerWidth,window.innerHeight)}},vertexShader:w,fragmentShader:x,side:u.BackSide,blending:u.AdditiveBlending,transparent:!0,wireframe:!1}),s=new u.SphereGeometry(1,64,64),c=new u.Mesh(s,i);c.scale.copy(g.c).multiplyScalar(1.14),t.basicAtmosphere=new u.Object3D,t.realisticAtmosphere=new u.Object3D,t.realisticAtmosphere.visible=!1,t.object3d.add(t.basicAtmosphere),t.object3d.add(t.realisticAtmosphere),t.basicAtmosphere.add(c);var l=new u.ShaderMaterial({uniforms:{atmoIN:{type:"i",value:1},screenSize:{type:"v2",value:new u.Vector2(window.innerWidth,window.innerHeight)}},vertexShader:w,fragmentShader:x,side:u.FrontSide,blending:u.AdditiveBlending,transparent:!0,depthWrite:!1}),h=new u.Mesh(s,l);return h.scale.copy(g.c).multiplyScalar(1.002),t.basicAtmosphere.add(h),t.realisticLightingPosition={x:-.5,y:0,z:1},t.fog={enable:!0,distance:B},t.realisticAtmosphereInitParams=r.Kr?r:{Kr:.0025,Km:.0015,ESun:20,g:-.95,innerRadius:64e5,outerRadius:67e5,wavelength:[.65,.57,.475],scaleDepth:.25},t.object3d.updateMatrixWorld(),t}return(0,i.Z)(o,[{key:"update",value:function(t,e,r){r.material.fogDistance=this.fog.distance,r.material.lightingEnabled=this.realisticAtmosphere.visible,r.material.lightPosition=this.realisticLightingPosition}},{key:"preUpdate",value:function(t){var e=t.view.camera3D.position;if(this.fog.enable){E.setFromMatrixPosition(t.view.tileLayer.object3d.matrixWorld);var r=E.distanceTo(e);this.fog.distance=B*Math.pow(.25*(r-.99*g.c.x)/g.c.x,1.5)}else this.fog.distance=1e11;var n=t.view.mainLoop.gfxEngine.renderer;M.crs=t.view.referenceCrs,M.setFromVector3(e).as("EPSG:4326",S);var i=S.altitude;i1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,n.Z)(this,m),u.Object3D.DEFAULT_UP.set(0,0,1),(e=h.call(this,"EPSG:4978",t,i)).isGlobeView=!0,e.camera3D.near=Math.max(15,2352e-9*g.c.x),e.camera3D.far=10*g.c.x;var o=new p.Z("globe",i.object3d,i);e.mainLoop.gfxEngine.label2dRenderer.infoTileLayer=o.info;var s=new u.DirectionalLight;return s.position.set(-.5,0,1),s.updateMatrixWorld(!0),e.scene.add(s),e.addLayer(o),e.tileLayer=o,r.isExtent||(r.coord=r.coord||new d.Z("EPSG:4326",0,0),r.tilt=r.tilt||89.5,r.heading=r.heading||0,r.range=r.range||2*g.c.x),i.noControls?L.ZP.transformCameraToLookAtTarget((0,a.Z)(e),e.camera3D,r):(e.controls=new f.Z((0,a.Z)(e),r,i.controls),e.controls.handleCollision=void 0===i.handleCollision||i.handleCollision),e.addLayer(new k("atmosphere",i.atmosphere)),e.camera.resize(t.clientWidth,t.clientHeight),e}return(0,i.Z)(m,[{key:"addLayer",value:function(t){if(!t||!t.isLayer)return Promise.reject(new Error("Add Layer type object"));if(t.isColorLayer){if(!this.tileLayer.tileMatrixSets.includes(P.Z.formatToTms(t.source.crs)))return t._reject("Only ".concat(this.tileLayer.tileMatrixSets," tileMatrixSet are currently supported for color layers"))}else if(t.isElevationLayer&&P.Z.formatToTms(t.source.crs)!==this.tileLayer.tileMatrixSets[0])return t._reject("Only ".concat(this.tileLayer.tileMatrixSets[0]," tileMatrixSet is currently supported for elevation layers"));return(0,o.Z)((0,l.Z)(m.prototype),"addLayer",this).call(this,t,this.tileLayer)}},{key:"getPixelsToDegrees",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1?arguments[1]:void 0;return this.getMetersToDegrees(this.getPixelsToMeters(t,e))}},{key:"getPixelsToDegreesFromDistance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.getMetersToDegrees(this.getPixelsToMetersFromDistance(t,e))}},{key:"getMetersToDegrees",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return u.MathUtils.radToDeg(2*Math.asin(t/(2*g.c.x)))}}]),m}(h.Z)},64561:(t,e,r)=>{"use strict";r.d(e,{Z:()=>g});var n=r(43144),i=r(15671),a=r(79340),o=r(82963),s=r(61120),c=r(99477),l=r(62968),u=r(99128),h=r(82150),f=r(60145),d=new c.Quaternion,p=new c.Vector3;const m=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,i.Z)(this,t),e.projection&&(console.warn("PlanarTileBuilder projection parameter is deprecated, use crs instead."),e.crs=e.crs||e.projection),!e.crs)throw new Error("options.crs is mandatory for PlanarTileBuilder");this.crs=e.crs,this.tmp={coords:new f.Z("EPSG:4326",0,0),position:new c.Vector3,normal:new c.Vector3(0,0,1)},this.uvCount=e.uvCount||1}return(0,n.Z)(t,[{key:"prepare",value:function(t){t.nbRow=Math.pow(2,t.zoom+1),t.projected=new c.Vector3}},{key:"center",value:function(t){return t.center(this.tmp.coords),p.set(this.tmp.coords.x,this.tmp.coords.y,0),p}},{key:"vertexPosition",value:function(t){return this.tmp.position.set(t.projected.x,t.projected.y,0),this.tmp.position}},{key:"vertexNormal",value:function(){return this.tmp.normal}},{key:"uProjecte",value:function(t,e){e.projected.x=e.extent.west+t*(e.extent.east-e.extent.west)}},{key:"vProjecte",value:function(t,e){e.projected.y=e.extent.south+t*(e.extent.north-e.extent.south)}},{key:"computeSharableExtent",value:function(t){return{sharableExtent:new u.ZP(t.crs,0,Math.abs(t.west-t.east),0,Math.abs(t.north-t.south)),quaternion:d,position:this.center(t).clone()}}}]),t}();const g=function(t){(0,a.Z)(f,t);var e,r,l=(e=f,r=function(){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(t){return!1}}(),function(){var t,n=(0,s.Z)(e);if(r){var i=(0,s.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,o.Z)(this,t)});function f(t,e,r){var n,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};(0,i.Z)(this,f);var o=h.Z.formatToTms(e.crs);return u.Mh.get(e.crs)||u.Mh.set(e.crs,e),a.tileMatrixSets=[o],(n=l.call(this,t,r||new c.Group,[e],new m({crs:e.crs}),a)).isPlanarLayer=!0,n.extent=e,n.minSubdivisionLevel=null==n.minSubdivisionLevel?0:n.minSubdivisionLevel,n.maxSubdivisionLevel=null==n.maxSubdivisionLevel?5:n.maxSubdivisionLevel,n.maxDeltaElevationLevel=n.maxDeltaElevationLevel||4,n}return(0,n.Z)(f)}(l.Z)},48682:(t,e,r)=>{"use strict";r.d(e,{Z:()=>m});var n=r(15671),i=r(43144),a=r(97326),o=r(88301),s=r(79340),c=r(82963),l=r(61120),u=r(99477),h=r(36873),f=r(4596),d=r(44450),p=r(64561);const m=function(t){(0,s.Z)(m,t);var e,r,h=(e=m,r=function(){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(t){return!1}}(),function(){var t,n=(0,l.Z)(e);if(r){var i=(0,l.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,c.Z)(this,t)});function m(t,e){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,n.Z)(this,m),u.Object3D.DEFAULT_UP.set(0,0,1),(r=h.call(this,e.crs,t,i)).isPlanarView=!0;var o=e.planarDimensions(),s=Math.max(o.x,o.y);r.camera3D.near=.1,r.camera3D.far=r.camera3D.isOrthographicCamera?2e3:2*s,r.camera3D.updateProjectionMatrix();var c=new p.Z("planar",e,i.object3d,i);r.mainLoop.gfxEngine.label2dRenderer.infoTileLayer=c.info,r.addLayer(c);var l=i.placement||{};return l.isExtent||(l.coord=l.coord||e.center(),l.tilt=l.tilt||90,l.heading=l.heading||0,l.range=l.range||s),f.ZP.transformCameraToLookAtTarget((0,a.Z)(r),r.camera3D,l),i.noControls||(r.controls=new d.ZP((0,a.Z)(r),i.controls)),r.tileLayer=c,r}return(0,i.Z)(m,[{key:"addLayer",value:function(t){return(0,o.Z)((0,l.Z)(m.prototype),"addLayer",this).call(this,t,this.tileLayer)}}]),m}(h.Z)},9417:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(99477);function i(t){var e={index:null,position:null,normal:null,uvs:[]},r=[],i=t.builder,a=t.segment||8,o=(a+1)*(a+1)+(t.disableSkirt?0:4*a);if(o>Math.pow(2,32))throw new Error("Tile segments count is too big");var s=a*a*2+(t.disableSkirt?0:4*a*2);e.position=new Float32Array(3*o),e.normal=new Float32Array(3*o);var c=t.builder.uvCount;c>1&&(e.uvs[1]=new Float32Array(o)),r[0]=function(){},t.buildIndexAndUv_0&&(o1){var o=i.computeUvs[1](t);r[1]=function(t){e.uvs[1][t]=o}}for(var s=0;s<=l;s++){var m=s/l,A=3*h;i.uProjecte(m,t);var v=i.vertexPosition(t,t.projected),y=i.vertexNormal(t);v.sub(t.center),t.quatNormalToZ&&(v.applyQuaternion(t.quatNormalToZ),y.applyQuaternion(t.quatNormalToZ)),v.toArray(e.position,A),y.toArray(e.normal,A);for(var b=0,x=r;b1&&(e.uvs[1][h]=e.uvs[1][R]);var L=(I+1)%d.length;v=C(v,R,h,0===L?M:h+1,d[L]),h++}}return e}},1537:(t,e,r)=>{"use strict";r.d(e,{D:()=>o,Z:()=>s});var n,i=r(15671),a=r(43144),o={INFINITE:1/0,TEXTURE:9e5,GEOMETRY:9e5};const s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.INFINITE;(0,i.Z)(this,t),this.lifeTime=e,this.lastTimeFlush=Date.now(),this.data=new Map}return(0,a.Z)(t,[{key:"getByArray",value:function(t){return this.get(t[0],t[1],t[2])}},{key:"setByArray",value:function(t,e){return this.set(t,e[0],e[1],e[2])}},{key:"get",value:function(t,e,r){var i=this.data.get(t);if(null!=i){if(null!=i.lastTimeUsed)n=i;else{var a=i.get(e);if(null==a)return;if(null!=a.lastTimeUsed)n=a;else{var o=a.get(r);if(null==o)return;n=o}}return n.value?(n.lastTimeUsed=Date.now(),n.value):void 0}}},{key:"set",value:function(t,e,r,i){if(n={value:t,lastTimeUsed:Date.now()},null==r)return this.data.set(e,n),t;this.data.get(e)||this.data.set(e,new Map);var a=this.data.get(e);return null==i?(a.set(r,n),t):(a.get(r)||a.set(r,new Map),a.get(r).set(i,n),t)}},{key:"delete",value:function(t,e,r){var n=this.data.get(t);if(void 0!==n)if(null!=n.lastTimeUsed)this.data.get(t),this.data.delete(t);else{var i=n.get(e);if(void 0===i)return;if(null!=i.lastTimeUsed)n.get(e),n.delete(e),0==n.size&&this.data.delete(t);else{if(void 0===i.get(r))return;i.get(r),i.delete(r),0==i.size&&(n.delete(e),0==n.size&&this.data.delete(t))}}}},{key:"clear",value:function(){this.data.clear()}},{key:"flush",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this.lifeTime==o.INFINITE||this.lifeTime>e-this.lastTimeFlush||!this.data.size||(this.lastTimeFlush=1/0,this.data.forEach((function(r,n){t.lifeTime{"use strict";r.d(e,{uP:()=>z,ZP:()=>j,Lu:()=>S});var n=r(4942),i=r(15671),a=r(43144),o=r(86033),s=r(13092),c=r(15861),l=r(64687),u=r.n(l),h=r(94596),f=r(1537),d=r(33347),p=r(92294),m=r(99477);function g(t){var e,r,n,i=t.r||t[0]/255,a=t.g||t[1]/255,o=t.b||t[2]/255;return r=(.2126*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.7152*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)+.0722*(o=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92))/1,n=(.0193*i+.1192*a+.9505*o)/1.08883,e=(e=(.4124*i+.3576*a+.1805*o)/.95047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(e-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]}function A(t,e){var r=g(t),n=g(e),i=r[0]-n[0],a=r[1]-n[1],o=r[2]-n[2],s=Math.sqrt(r[1]*r[1]+r[2]*r[2]),c=s-Math.sqrt(n[1]*n[1]+n[2]*n[2]),l=a*a+o*o-c*c,u=i/1,h=c/(1+.045*s),f=(l=l<0?0:Math.sqrt(l))/(1+.015*s),d=u*u+h*h+f*f;return d<0?0:Math.sqrt(d)}var v=r(60145);function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function b(t){for(var e=1;e=0;r--){var n=t.stops[r];if(e.zoom>=n[0])return n[1]}return t.stops[0][1]}return("string"==typeof t||t instanceof String)&&(t=t.replace(/\{(.+?)\}/g,(function(t,r){return e.properties[r]||""})).trim()),t instanceof Function?t(e.properties,e):t}}function C(t){if(!t)return{};if(t.stops||t.expression)return{color:t};if("string"==typeof t){var e=t.match(/(?:((hsl|rgb)a? *\(([\d.%]+(?:deg|g?rad|turn)?)[ ,]*([\d.%]+)[ ,]*([\d.%]+)[ ,/]*([\d.%]*)\))|(#((?:[\d\w]{3}){1,2})([\d\w]{1,2})?))/i);if(!e)return{color:t,opacity:1};if(e[7]){var r=1;return e[9]&&(r=.00392156862745098*parseInt(1==e[9].length?"".concat(e[9]).concat(e[9]):e[9],16)),{color:"#".concat(e[8]),opacity:r}}if(e[0])return{color:"".concat(e[2],"(").concat(e[3],",").concat(e[4],",").concat(e[5],")"),opacity:Number(e[6])||1}}}function T(t,e){if(null!=t)return p.th.isExpression(t)?p.th.createExpression(t,e).value:t}function I(){return R.apply(this,arguments)}function R(){return(R=(0,c.Z)(u().mark((function t(e){var r;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=w.get(e,"null"))||(r=d.Z.texture(e,{crossOrigin:"anonymous"}),w.set(r,e,"null")),t.next=4,r;case 4:return t.abrupt("return",t.sent.image);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function B(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{width:t.naturalWidth,height:t.naturalHeight};E.width=e.width,E.height=e.height;var r=E.getContext("2d",{willReadFrequently:!0});return r.drawImage(t,e.x||0,e.y||0,e.width,e.height,0,0,e.width,e.height),r.getImageData(0,0,e.width,e.height)}function k(t,e,r){if(!e)return t;var n=w.get(r,e);if(!n){for(var i=t.data,a=new m.Color(e),o=new m.Color("white"),s=0,c=i.length;s0&&void 0!==arguments[0]?arguments[0]:{};(0,i.Z)(this,t),this.isStyle=!0,this.context=new z,this.order=e.order||0,e.zoom=e.zoom||{},e.fill=e.fill||{},e.stroke=e.stroke||{},e.point=e.point||{},e.text=e.text||{},e.icon=e.icon||{},this.zoom={},P(this,"zoom","min",e.zoom.min),P(this,"zoom","max",e.zoom.max),this.fill={},P(this,"fill","color",e.fill.color),P(this,"fill","opacity",e.fill.opacity,1),P(this,"fill","pattern",e.fill.pattern),P(this,"fill","base_altitude",e.fill.base_altitude,M),e.fill.extrusion_height&&P(this,"fill","extrusion_height",e.fill.extrusion_height),this.stroke={},P(this,"stroke","color",e.stroke.color),P(this,"stroke","opacity",e.stroke.opacity,1),P(this,"stroke","width",e.stroke.width,1),P(this,"stroke","dasharray",e.stroke.dasharray,[]),P(this,"stroke","base_altitude",e.stroke.base_altitude,M),this.point={},P(this,"point","color",e.point.color),P(this,"point","line",e.point.line),P(this,"point","opacity",e.point.opacity,1),P(this,"point","radius",e.point.radius,2),P(this,"point","width",e.point.width,0),P(this,"point","base_altitude",e.point.base_altitude,M),e.point.model&&P(this,"point","model",e.point.model),this.text={},P(this,"text","field",e.text.field),P(this,"text","zOrder",e.text.zOrder,"auto"),P(this,"text","color",e.text.color,"#000000"),P(this,"text","anchor",e.text.anchor,"center"),P(this,"text","offset",e.text.offset,[0,0]),P(this,"text","padding",e.text.padding,2),P(this,"text","size",e.text.size,16),P(this,"text","placement",e.text.placement,"point"),P(this,"text","rotation",e.text.rotation,"auto"),P(this,"text","wrap",e.text.wrap,10),P(this,"text","spacing",e.text.spacing,0),P(this,"text","transform",e.text.transform,"none"),P(this,"text","justify",e.text.justify,"center"),P(this,"text","opacity",e.text.opacity,1),P(this,"text","font",e.text.font,["Open Sans Regular","Arial Unicode MS Regular","sans-serif"]),P(this,"text","haloColor",e.text.haloColor,"#000000"),P(this,"text","haloWidth",e.text.haloWidth,0),P(this,"text","haloBlur",e.text.haloBlur,0),this.icon={},P(this,"icon","source",e.icon.source),e.icon.key&&(console.warn("'icon.key' is deprecated: use 'icon.id' instead"),e.icon.id=e.icon.key),P(this,"icon","id",e.icon.id),P(this,"icon","cropValues",e.icon.cropValues),P(this,"icon","anchor",e.icon.anchor,"center"),P(this,"icon","size",e.icon.size,1),P(this,"icon","color",e.icon.color),P(this,"icon","opacity",e.icon.opacity,1)}var e,r;return(0,a.Z)(t,[{key:"copy",value:function(t){return Object.assign(this.fill,t.fill),Object.assign(this.stroke,t.stroke),Object.assign(this.point,t.point),Object.assign(this.text,t.text),Object.assign(this.icon,t.icon),this}},{key:"clone",value:function(){return(new t).copy(this)}},{key:"setContext",value:function(t){this.context=t}},{key:"applyToCanvasPolygon",value:function(t,e,r,n){var i=this.context;this.stroke&&this._applyStrokeToPolygon(t,r,e,i),n&&this.fill&&this._applyFillToPolygon(t,r,e,i)}},{key:"_applyStrokeToPolygon",value:function(t,e,r){t.strokeStyle!==this.stroke.color&&(t.strokeStyle=this.stroke.color);var n=(this.stroke.width||2)*e;t.lineWidth!==n&&(t.lineWidth=n);var i=null==this.stroke.opacity?1:this.stroke.opacity;i!==t.globalAlpha&&"number"==typeof i&&(t.globalAlpha=i),t.lineCap!==this.stroke.lineCap&&(t.lineCap=this.stroke.lineCap),t.setLineDash(this.stroke.dasharray.map((function(t){return t*e*2}))),t.stroke(r)}},{key:"_applyFillToPolygon",value:(r=(0,c.Z)(u().mark((function t(e,r,n){var i,a;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.fill.pattern){t.next=12;break}if(i=this.fill.pattern,a=this.fill.pattern.cropValues,!this.fill.pattern.source){t.next=7;break}return t.next=6,I(this.fill.pattern.source);case 6:i=t.sent;case 7:B(i,a),e.fillStyle=e.createPattern(E,"repeat"),e.fillStyle.setTransform?e.fillStyle.setTransform(_.scale(r)):console.warn("Raster pattern isn't completely supported on Ie and edge",e.fillStyle),t.next=13;break;case 12:e.fillStyle!==this.fill.color&&(e.fillStyle=this.fill.color);case 13:this.fill.opacity!==e.globalAlpha&&(e.globalAlpha=this.fill.opacity),e.fill(n);case 15:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"applyToHTML",value:(e=(0,c.Z)(u().mark((function t(e){var r,n,i,a,o,s,c,l,h=this,f=arguments;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(f.length>1&&console.warn("Deprecated argument sprites. Sprites must be configured in style."),e.style.padding="".concat(this.text.padding,"px"),e.style.maxWidth="".concat(this.text.wrap,"em"),e.style.color=this.text.color,this.text.size>0&&(e.style.fontSize="".concat(this.text.size,"px")),e.style.fontFamily=this.text.font.join(","),e.style.textTransform=this.text.transform,e.style.letterSpacing="".concat(this.text.spacing,"em"),e.style.textAlign=this.text.justify,e.style["white-space"]="pre-line",this.text.haloWidth>0&&(e.style.setProperty("--text_stroke_display","block"),e.style.setProperty("--text_stroke_width","".concat(this.text.haloWidth,"px")),e.style.setProperty("--text_stroke_color",this.text.haloColor),e.setAttribute("data-before",e.textContent)),this.icon.source){t.next=13;break}return t.abrupt("return");case 13:if(r=document.createElement("img"),n=new Promise((function(t,n){var i={size:h.icon.size,color:h.icon.color,opacity:h.icon.opacity,anchor:h.icon.anchor};r.onload=function(){return t(G(r,e,i))},r.onerror=function(t){return n(t)}})),this.icon.cropValues||this.icon.color){t.next=19;break}r.src=this.icon.source,t.next=29;break;case 19:return i=this.icon.cropValues,a=this.icon.color,o=this.icon.id||this.icon.source,t.next=24,I(this.icon.source);case 24:s=t.sent,c=B(s,i),l=k(c,a,o),E.getContext("2d").putImageData(l,0,0),r.src=E.toDataURL("image/png");case 29:return t.abrupt("return",n);case 30:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getTextAnchorPosition",value:function(){return"string"==typeof this.text.anchor?Object.keys(L).includes(this.text.anchor)?L[this.text.anchor]:(console.error("".concat(this.text.anchor," is not a valid input for Style.text.anchor parameter.")),L.center):this.text.anchor}}],[{key:"setFromProperties",value:function(t,e){var r=e.type,n={};if(r===h.tg.POINT){var i=b(b(b(b({},void 0!==t.fill&&{color:t.fill}),void 0!==t["fill-opacity"]&&{opacity:t["fill-opacity"]}),void 0!==t.stroke&&{line:t.stroke}),void 0!==t.radius&&{radius:t.radius});Object.keys(i).length&&(n.point=i);var a=b(b(b({},void 0!==t["label-color"]&&{color:t["label-color"]}),void 0!==t["label-opacity"]&&{opacity:t["label-opacity"]}),void 0!==t["label-size"]&&{size:t["label-size"]});Object.keys(i).length&&(n.text=a);var o=b(b(b(b({},void 0!==t.icon&&{source:t.icon}),void 0!==t["icon-scale"]&&{size:t["icon-scale"]}),void 0!==t["icon-opacity"]&&{opacity:t["icon-opacity"]}),void 0!==t["icon-color"]&&{color:t["icon-color"]});Object.keys(o).length&&(n.icon=o)}else{var s=b(b(b({},void 0!==t.stroke&&{color:t.stroke}),void 0!==t["stroke-width"]&&{width:t["stroke-width"]}),void 0!==t["stroke-opacity"]&&{opacity:t["stroke-opacity"]});if(Object.keys(s).length&&(n.stroke=s),r!==h.tg.LINE){var c=b(b({},void 0!==t.fill&&{color:t.fill}),void 0!==t["fill-opacity"]&&{opacity:t["fill-opacity"]});Object.keys(c).length&&(n.fill=c)}}return n}},{key:"setFromVectorTileLayer",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i={fill:{},stroke:{},point:{},text:{},icon:{}};if(t.layout=t.layout||{},t.paint=t.paint||{},i.order=r,"fill"===t.type){var a=C(T(t.paint["fill-color"]||t.paint["fill-pattern"],{type:"color"})),o=a.color,s=a.opacity;if(i.fill.color=o,i.fill.opacity=T(t.paint["fill-opacity"])||s,t.paint["fill-pattern"])try{i.fill.pattern={id:t.paint["fill-pattern"],source:e.source,cropValues:e[t.paint["fill-pattern"]]}}catch(e){throw e.message="VTlayer '".concat(t.id,"': argument sprites must not be null when using layer.paint['fill-pattern']"),e}if(t.paint["fill-outline-color"]){var c=C(T(t.paint["fill-outline-color"],{type:"color"})),l=c.color,u=c.opacity;i.stroke.color=l,i.stroke.opacity=u,i.stroke.width=1,i.stroke.dasharray=[]}}else if("line"===t.type){var h=C(T(t.paint["line-color"],{type:"color"})),f=h.color,d=h.opacity;i.stroke.dasharray=T(t.paint["line-dasharray"]),i.stroke.color=f,i.stroke.lineCap=t.layout["line-cap"],i.stroke.width=T(t.paint["line-width"]),i.stroke.opacity=T(t.paint["line-opacity"])||d}else if("circle"===t.type||n){var p=C(T(t.paint["circle-color"],{type:"color"})),m=p.color,g=p.opacity;i.point.color=m,i.point.opacity=g,i.point.radius=T(t.paint["circle-radius"])}else if("symbol"===t.type){i.text.zOrder=T(t.layout["symbol-z-order"]),"auto"==i.text.zOrder?i.text.zOrder=T(t.layout["symbol-sort-key"])||"Y":"viewport-y"==i.text.zOrder?i.text.zOrder="Y":"source"==i.text.zOrder&&(i.text.zOrder=0),i.text.anchor=T(t.layout["text-anchor"]),i.text.offset=T(t.layout["text-offset"]),i.text.padding=T(t.layout["text-padding"]),i.text.size=T(t.layout["text-size"]),i.text.placement=T(t.layout["symbol-placement"]),i.text.rotation=T(t.layout["text-rotation-alignment"]),i.text.field=T(t.layout["text-field"]),i.text.wrap=T(t.layout["text-max-width"]),i.text.spacing=T(t.layout["text-letter-spacing"]),i.text.transform=T(t.layout["text-transform"]),i.text.justify=T(t.layout["text-justify"]);var A=C(T(t.paint["text-color"],{type:"color"})),v=A.color,y=A.opacity;i.text.color=v,i.text.opacity=T(t.paint["text-opacity"])||void 0!==y&&y,i.text.font=T(t.layout["text-font"]);var b=T(t.paint["text-halo-color"],{type:"color"});b&&(i.text.haloColor=b.color||b,i.text.haloWidth=T(t.paint["text-halo-width"]),i.text.haloBlur=T(t.paint["text-halo-blur"]));var x=T(t.layout["icon-image"]);if(x)try{i.icon.id=x,i.icon.source=e.source,i.icon.cropValues=e[x],i.icon.size=T(t.layout["icon-size"])||1;var w=C(T(t.paint["icon-color"],{type:"color"})),_=w.color,E=w.opacity;i.icon.color=_,i.icon.opacity=T(t.paint["icon-opacity"])||void 0!==E&&E}catch(e){throw e.message="VTlayer '".concat(t.id,"': argument sprites must not be null when using layer.layout['icon-image']"),e}}return i.zoom={min:t.minzoom||0,max:t.maxzoom||24},i}}]),t}(),V={itowns_stroke_single_before:".itowns-stroke-single:before {\n display: var(--text_stroke_display);\n content: attr(data-before);\n opacity: 1;\n position: absolute;\n -webkit-text-stroke-width: var(--text_stroke_width);\n -webkit-text-stroke-color: var(--text_stroke_color);\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: -1;\n white-space: inherit;\n overflow-wrap: inherit;\n letter-spacing: inherit;\n text-align: inherit;\n padding: inherit;\n font-family: inherit;\n text-transform: inherit;\n max-width: inherit;\n font-size: inherit;\n}\n"},Q="undefined"!=typeof document?document.createElement("style"):{};Q.type="text/css",Object.keys(V).forEach((function(t){Q.innerHTML+="".concat(V[t],"\n\n")})),"undefined"!=typeof document&&document.getElementsByTagName("head")[0].appendChild(Q);const j=Z},47052:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var n=!1,i=8,a=4096;function o(t,e,r){var n=t.getContext(),i=n.createShader(e);return n.shaderSource(i,r),n.compileShader(i),i}function s(){return navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes("firefox")}const c={isLogDepthBufferSupported:function(){return n},isFirefox:s,isInternetExplorer:function(){return!!document.documentMode},getMaxTextureUnitsCount:function(){return i},getMaxTextureSize:function(){return a},updateCapabilities:function(t){var e=t.getContext();i=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),a=e.getParameter(e.MAX_TEXTURE_SIZE);var r=e.createProgram(),c=o(t,e.VERTEX_SHADER,"void main() {\n gl_Position = vec4( 0.0, 0.0, 0.0, 1.0 );\n}"),l="#define SAMPLE ".concat(i,"\n");l+="uniform sampler2D uni[SAMPLE];\nvoid main() {\n gl_FragColor += texture2D(uni[SAMPLE-1], vec2(0));\n}";var u=o(t,e.FRAGMENT_SHADER,l);if(e.attachShader(r,c),e.attachShader(r,u),e.linkProgram(r),!1===e.getProgramParameter(r,e.LINK_STATUS)){if(!(i>16))throw new Error("The GPU capabilities could not be determined accurately.\n Impossible to link a shader with the Maximum texture units ".concat(i));var h=e.getProgramInfoLog(r);console.warn("".concat(h,": using a maximum of 16 texture units instead of the reported value (").concat(i,")")),s()&&console.warn("It can come from a Mesa/Firefox bug;\n the shader compiles to an error when using more than 16 sampler uniforms,\n see https://bugzilla.mozilla.org/show_bug.cgi?id=777028"),i=16}e.deleteProgram(r),e.deleteShader(c),e.deleteShader(u),n=t.capabilities.logarithmicDepthBuffer}}},3590:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var n=r(43144),i=r(15671),a=r(79340),o=r(82963),s=r(61120),c=r(99477),l=r(9417);const u=function(t){(0,a.Z)(h,t);var e,r,u=(e=h,r=function(){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(t){return!1}}(),function(){var t,n=(0,s.Z)(e);if(r){var i=(0,s.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,o.Z)(this,t)});function h(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){t.buildIndexAndUv_0=!0,t.center=t.builder.center(t.extent).clone();var e=(0,l.Z)(t);e.index=new c.BufferAttribute(e.index,1),e.uvs[0]=new c.BufferAttribute(e.uvs[0],2),e.position=new c.BufferAttribute(e.position,3),e.normal=new c.BufferAttribute(e.normal,3);for(var r=1;r{"use strict";r.d(e,{b:()=>ut,Z:()=>wt});var n=r(42982),i=r(15671),a=r(43144),o=r(97326),s=r(79340),c=r(82963),l=r(61120),u=r(86033),h=r(13092),f=r(99477),d=r(800),p=r(15861),m=r(64687),g=r.n(m);function A(){return(A=(0,p.Z)(g().mark((function t(e){return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=3;break}return t.next=3,e.end();case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var v=r(49469),y=r(47052),b=r(12276),x=r(27240);const w=function(){function t(){(0,i.Z)(this,t)}return(0,a.Z)(t,null,[{key:"isWebGLAvailable",value:function(){try{var t=document.createElement("canvas");return!(!window.WebGLRenderingContext||!t.getContext("webgl")&&!t.getContext("experimental-webgl"))}catch(t){return!1}}},{key:"isWebGL2Available",value:function(){try{var t=document.createElement("canvas");return!(!window.WebGL2RenderingContext||!t.getContext("webgl2"))}catch(t){return!1}}},{key:"isColorSpaceAvailable",value:function(t){try{var e=document.createElement("canvas"),r=window.WebGL2RenderingContext&&e.getContext("webgl2");return r.drawingBufferColorSpace=t,r.drawingBufferColorSpace===t}catch(t){return!1}}},{key:"getWebGLErrorMessage",value:function(){return this.getErrorMessage(1)}},{key:"getWebGL2ErrorMessage",value:function(){return this.getErrorMessage(2)}},{key:"getErrorMessage",value:function(t){var e={1:window.WebGLRenderingContext,2:window.WebGL2RenderingContext},r='Your $0 does not seem to support $1',n=document.createElement("div");return n.id="webglmessage",n.style.fontFamily="monospace",n.style.fontSize="13px",n.style.fontWeight="normal",n.style.textAlign="center",n.style.background="#fff",n.style.color="#000",n.style.padding="1.5em",n.style.width="400px",n.style.margin="5em auto 0",r=(r=e[t]?r.replace("$0","graphics card"):r.replace("$0","browser")).replace("$1",{1:"WebGL",2:"WebGL 2"}[t]),n.innerHTML=r,n}}]),t}();var _=r(6755),E=r(86896),M=new f.Vector4;const S=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.Z)(this,t),(0,E.Dx)(r);var n,a,o=!y.Z.isInternetExplorer();void 0===r.antialias&&(r.antialias=!0),void 0===r.alpha&&(r.alpha=!0),void 0===r.logarithmicDepthBuffer&&(r.logarithmicDepthBuffer=this.gLDebug||o),void 0===r.isWebGL2&&(r.isWebGL2=!0),a=e.domElement?(n=e).domElement instanceof HTMLDivElement?n.domElement:n.domElement.parentElement:e,this.width=a.clientWidth,this.height=a.clientHeight,this.positionBuffer=null,this._nextThreejsLayer=1,this.fullSizeRenderTarget=new f.WebGLRenderTarget(this.width,this.height),this.fullSizeRenderTarget.texture.minFilter=f.LinearFilter,this.fullSizeRenderTarget.texture.magFilter=f.NearestFilter,this.fullSizeRenderTarget.depthBuffer=!0,this.fullSizeRenderTarget.depthTexture=new f.DepthTexture,this.fullSizeRenderTarget.depthTexture.type=f.UnsignedShortType,this.renderView=function(t){this.renderer.clear(),this.renderer.render(t.scene,t.camera3D),t.tileLayer&&this.label2dRenderer.render(t.tileLayer.object3d,t.camera3D)}.bind(this),this.onWindowResize=function(t,e){this.width=t,this.height=e,this.fullSizeRenderTarget.setSize(this.width,this.height),this.renderer.setSize(this.width,this.height),this.label2dRenderer.setSize(this.width,this.height)}.bind(this);try{this.label2dRenderer=new _.Z,this.label2dRenderer.setSize(this.width,this.height),a.appendChild(this.label2dRenderer.domElement),this.renderer=n||new(r.isWebGL2?f.WebGLRenderer:f.WebGL1Renderer)({canvas:document.createElement("canvas"),antialias:r.antialias,alpha:r.alpha,logarithmicDepthBuffer:r.logarithmicDepthBuffer}),this.renderer.domElement.style.position="relative",this.renderer.domElement.style.zIndex=0,this.renderer.domElement.style.top=0}catch(t){var s=r.isWebGL2?"2":"1";console.error("Failed to create WebGLRenderer webGL ".concat(s,".")),this.renderer=null}if(!this.renderer)throw w.isWebGLAvailable()?w.isWebGL2Available()||a.appendChild(w.getErrorMessage(2)):a.appendChild(w.getErrorMessage(1)),new Error("WebGL unsupported");!n&&r.logarithmicDepthBuffer&&(this.renderer.capabilities.isWebGL2||this.renderer.extensions.get("EXT_frag_depth")||(this.renderer.dispose(),this.renderer=new(r.isWebGL2?f.WebGLRenderer:f.WebGL1Renderer)({canvas:document.createElement("canvas"),antialias:r.antialias,alpha:r.alpha,logarithmicDepthBuffer:!1}))),-1===this.renderer.domElement.tabIndex&&(this.renderer.domElement.tabIndex=-1),y.Z.updateCapabilities(this.renderer),this.renderer.setClearColor(197896),this.renderer.autoClear=!1,this.renderer.sortObjects=!0,this.renderer.debug.checkShaderErrors=!1,n||(this.renderer.setPixelRatio(a.devicePixelRatio),this.renderer.setSize(a.clientWidth,a.clientHeight),a.appendChild(this.renderer.domElement))}return(0,a.Z)(t,[{key:"getWindowSize",value:function(){return new f.Vector2(this.width,this.height)}},{key:"getRenderer",value:function(){return this.renderer}},{key:"renderViewToBuffer",value:function(t,e){return e||(e={x:0,y:0,width:this.width,height:this.height}),e.buffer=e.buffer||new Uint8Array(4*e.width*e.height),this.renderViewToRenderTarget(t,this.fullSizeRenderTarget,e),this.renderer.readRenderTargetPixels(this.fullSizeRenderTarget,e.x,this.height-(e.y+e.height),e.width,e.height,e.buffer),e.buffer}},{key:"renderViewToRenderTarget",value:function(t,e,r){e||(e=this.fullSizeRenderTarget);var n=this.renderer.getRenderTarget();return r&&(this.fullSizeRenderTarget.scissor.set(r.x,e.height-(r.y+r.height),r.width,r.height),this.fullSizeRenderTarget.scissorTest=!0),this.renderer.setRenderTarget(e),this.renderer.clear(!0,!0,!1),this.renderer.render(t.scene,t.camera.camera3D),this.renderer.setRenderTarget(n),this.fullSizeRenderTarget.scissorTest=!1,e}},{key:"bufferToImage",value:function(t,e,r){var n=document.createElement("canvas"),i=n.getContext("2d",{willReadFrequently:!0});n.width=e,n.height=r;var a=i.getImageData(0,0,e,r);a.data.set(t),i.putImageData(a,0,0);var o=new Image;return o.src=n.toDataURL(),o}},{key:"depthBufferRGBAValueToOrthoZ",value:function(t,e){if(M.fromArray(t).divideScalar(255),y.Z.isLogDepthBufferSupported()&&"PerspectiveCamera"==e.type){var r=(0,x.On)(M),n=2/(Math.log(e.far+1)/Math.LN2);return Math.pow(2,2*r/n)}var i=(0,x.On)(M);return 2*i-1}}]),t}();var C=r(32475),T=r(82150),I=r(60145),R=r(39683),B=r(95307),k=r.n(B);const L={executeCommand:function(t){var e=t.layer,r=t.extentsSource,n=t.extentsDestination||r;return Promise.all(r.map((function(t,r){return e.getData(t,n[r])})))}},P=function(){function t(e){(0,i.Z)(this,t),this.command=e,this.isCancelledCommandException=!0}return(0,a.Z)(t,[{key:"toString",value:function(){return"Cancelled command ".concat(this.command.requester.id,"/").concat(this.command.layer.id)}}]),t}();function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(i);try{for(o.s();!(a=o.n()).done;){var s=a.value;e.push(r.convert(n,s))}}catch(t){o.e(t)}finally{o.f()}return Promise.all(e)}};var O=r(82853),F=r(30633),N=r(16916);const z=function(t,e){if(!t)throw new Error("No array buffer provided.");var r=new DataView(t),n=0,i={},a={},o={};if(i.magic=F.Z.decode(new Uint8Array(t,n,4)),n+=4,i.magic){i.version=r.getUint32(n,!0),n+=Uint32Array.BYTES_PER_ELEMENT,i.byteLength=r.getUint32(n,!0),n+=Uint32Array.BYTES_PER_ELEMENT,i.FTJSONLength=r.getUint32(n,!0),n+=Uint32Array.BYTES_PER_ELEMENT,i.FTBinaryLength=r.getUint32(n,!0),n+=Uint32Array.BYTES_PER_ELEMENT,i.BTJSONLength=r.getUint32(n,!0),n+=Uint32Array.BYTES_PER_ELEMENT,i.BTBinaryLength=r.getUint32(n,!0),n+=Uint32Array.BYTES_PER_ELEMENT;var s={};if(i.FTJSONLength>0){var c=n,l=t.slice(c,i.FTJSONLength+c),u=F.Z.decode(new Uint8Array(l));s=JSON.parse(u)}if(i.FTBinaryLength>0&&(o=function(t,e,r){var n,i=new f.BufferGeometry,a=F.Z.decode(new Uint8Array(t,e,r)),o=JSON.parse(a);if(o.POINTS_LENGTH&&(n=o.POINTS_LENGTH),o.POSITION){var s=o.POSITION.byteOffset+a.length+e,c=new Float32Array(t,s,3*n);i.setAttribute("position",new f.BufferAttribute(c,3))}if(o.RGB){var l=o.RGB.byteOffset+a.length+e,u=new Uint8Array(t,l,3*n);i.setAttribute("color",new f.BufferAttribute(u,3,!0))}if(o.POSITION_QUANTIZED)throw new Error("For pnts loader, POSITION_QUANTIZED: not yet managed");if(o.RGBA)throw new Error("For pnts loader, RGBA: not yet managed");if(o.RGB565)throw new Error("For pnts loader, RGB565: not yet managed");if(o.NORMAL)throw new Error("For pnts loader, NORMAL: not yet managed");if(o.NORMAL_OCT16P)throw new Error("For pnts loader, NORMAL_OCT16P: not yet managed");if(o.BATCH_ID)throw new Error("For pnts loader, BATCH_ID: not yet managed");return{geometry:i,offset:o.RTC_CENTER?(new f.Vector3).fromArray(o.RTC_CENTER):void 0}}(t,n,i.FTJSONLength)),i.BTJSONLength>0){var h=n+i.FTJSONLength+i.FTBinaryLength,d=t.slice(h,i.BTJSONLength+i.BTBinaryLength+h);o=function(t,e){if(t.geometry)return e.content&&e.content.Classification&&t.geometry.setAttribute("classification",new f.BufferAttribute(new Uint8Array(e.content.Classification),1,!0)),t}(o,a=new N.Z(d,i.BTJSONLength,i.BTBinaryLength,s.BATCH_ID&&s.BATCH_LENGTH?s.BATCH_LENGTH:s.POINTS_LENGTH,e))}var p={point:o,batchTable:a};return Promise.resolve(p)}throw new Error("Invalid pnts file.")};var G=r(33347),Z=r(52521),V=r(32204);function Q(t,e,r){var n=f.LoaderUtils.extractUrlBase(r),i={gltfUpAxis:e.tileset.asset.gltfUpAxis,urlBase:n,overrideMaterials:e.overrideMaterials,doNotPatchMaterial:e.doNotPatchMaterial,opacity:e.opacity,registeredExtensions:e.registeredExtensions,layer:e};return O.ZP.parse(t,i).then((function(t){return{batchTable:t.batchTable,object3d:t.gltf.scene}}))}function j(t,e){return z(t,e.registeredExtensions).then((function(t){var r=e.material?e.material.clone():new V.ZP({size:.05,mode:e.pntsMode,shape:e.pntsShape,classification:e.classification,sizeMode:e.pntsSizeMode,minAttenuatedSize:e.pntsMinAttenuatedSize,maxAttenuatedSize:e.pntsMaxAttenuatedSize});(0,Z.Z)(r,e);var n=new f.Points(t.point.geometry,r);return t.point.offset&&n.position.copy(t.point.offset),{object3d:n,batchTable:t.batchTable}}))}const W={executeCommand:function(t){var e=t.layer,r=t.metadata,n=new f.Object3D;!function(t,e,r,n){t.frustumCulled=!1,t.layer=e,r.transform&&t.applyMatrix4(r.transform),t.geometricError=r.geometricError,t.tileId=r.tileId,r.refine?t.additiveRefinement="ADD"===r.refine.toUpperCase():t.additiveRefinement=!!n&&n.additiveRefinement,t.viewerRequestVolume=r.viewerRequestVolume,t.boundingVolume=r.boundingVolume,t.updateMatrixWorld()}(n,e,r,t.requester);var i=r.content&&(r.content.url||r.content.uri),a=function(t){t.userData.metadata=r,t.layer=e};if(i){var o=i.startsWith("http")?i:r.baseURL+i,s={b3dm:Q,pnts:j};return G.Z.arrayBuffer(o,e.source.networkOptions).then((function(t){if(void 0!==t){var i,c=F.Z.decode(new Uint8Array(t,0,4));if("{"===c[0]){t=JSON.parse(F.Z.decode(new Uint8Array(t)));var l=o.slice(0,o.lastIndexOf("/")+1);e.tileset.extendTileset(t,r.tileId,l,e.registeredExtensions)}else if("b3dm"==c)i=s.b3dm;else{if("pnts"!=c)return Promise.reject("Unsupported magic code ".concat(c));i=s.pnts}if(i)return i(t,e,o).then((function(t){return n.content=t.object3d,t.batchTable&&(n.batchTable=t.batchTable),n.add(t.object3d),n.traverse(a),n}))}return n.traverse(a),n}))}return n.traverse(a),Promise.resolve(n)}};var H=r(99128),X=1;const q={executeCommand:function(t){var e=t.layer,r=t.requester;return r.load().then((function(n){var i=new f.Points(n,e.material);return function(t){var e=t.geometry.attributes.position.count,r=new Uint8Array(4*e),n=X++;if(e>65535||n>65535)return console.warn("Currently picking is limited to Points with less than 65535 elements and less than 65535 Points instances"),t;for(var i=0;i>24,r[4*i+1]=(16711680&a)>>16,r[4*i+2]=(65280&a)>>8,r[4*i+3]=(255&a)>>0}t.baseId=n,t.geometry.setAttribute("unique_id",new f.BufferAttribute(r,4,!0))}(i),i.frustumCulled=!1,i.matrixAutoUpdate=!1,e.isEntwinePointTileLayer||(i.position.copy(r.bbox.min),i.scale.copy(e.scale)),i.updateMatrix(),i.tightbbox=n.boundingBox.applyMatrix4(i.matrix),i.layer=e,i.extent=H.ZP.fromBox3(t.view.referenceCrs,r.bbox),i.userData.node=r,i}))}};var Y=r(13012);function J(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return K(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&(i+=o.priority,o.accumulator+=o.priority,(!e||o.accumulator>r)&&(e=o,r=o.accumulator))}}catch(t){a.e(t)}finally{a.f()}if(e)return e.accumulator-=i,e.q}(t.storages);e&&e.length>0;){var r=e.dequeue();if(!r.earlyDropFunction||!r.earlyDropFunction(r))return r;t.counters.pending--,t.counters.cancelled++,r.reject(new P(r))}};const rt=et;var nt=r(73773),it=r(85299),at=r(1857);function ot(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return st(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?st(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function st(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:{};if((0,i.Z)(this,m),!e)throw new Error("Invalid viewerDiv parameter (must non be null/undefined)");r=p.call(this),ct((0,o.Z)(r),yt,{writable:!0,value:[]}),ct((0,o.Z)(r),bt,{writable:!0,value:new Uint8Array(4)}),ct((0,o.Z)(r),xt,{writable:!0,value:void 0}),r.domElement=e,r.referenceCrs=t,n=a.renderer&&a.renderer.domElement?new S(a.renderer):new S(e,a.renderer),r.mainLoop=a.mainLoop||new v.ZP(new rt,n),r.scene=a.scene3D||new f.Scene,a.scene3D||(r.scene.matrixWorldAutoUpdate=!1),r.camera=new d.Z(r.referenceCrs,r.mainLoop.gfxEngine.getWindowSize().x,r.mainLoop.gfxEngine.getWindowSize().y,a.camera),r._frameRequesters={},r._resizeListener=function(){return r.resize()},window.addEventListener("resize",r._resizeListener,!1),r._changeSources=new Set,r._delayedFrameRequesterRemoval=[],r._allLayersAreReadyCallback=function(){r.getLayers().every((function(t){return t.ready}))&&0==r.mainLoop.scheduler.commandsWaitingExecutionCount()&&r.mainLoop.renderingState==v.HR&&(r.dispatchEvent({type:ut.LAYERS_INITIALIZED}),r.removeFrameRequester(v.Ao.UPDATE_END,r._allLayersAreReadyCallback))},r.camera.resize(r.domElement.clientWidth,r.domElement.clientHeight);var s,c=function(){r.removeEventListener(ut.LAYERS_INITIALIZED,c),r.dispatchEvent({type:ut.INITIALIZED})};return r.addEventListener(ut.LAYERS_INITIALIZED,c),(0,h.Z)((0,o.Z)(r),xt,new Uint8Array(4*r.camera.width*r.camera.height)),r.domElement.tabIndex=-1,a.disableFocusOnStart||r.domElement.focus(),r.domElement.addEventListener("mouseup",(function(t){2===t.button&&(s&&t.timeStamp-s<500&&r.domElement.dispatchEvent(new MouseEvent("dblclick-right",t)),s=t.timeStamp)})),vt.push((0,o.Z)(r)),a.webXR&&function(t,e){var r=e.scale||1,n=t.mainLoop.gfxEngine.renderer.xr;n.addEventListener("sessionstart",(function(){var e=t.camera.camera3D,i=function(a){"Escape"===a.key&&(document.removeEventListener("keydown",i),n.enabled=!1,t.camera.camera3D=e,t.scene.scale.multiplyScalar(1/r),t.scene.updateMatrixWorld(),function(){A.apply(this,arguments)}(n.getSession()),t.notifyChange(t.camera.camera3D,!0))};t.scene.scale.multiplyScalar(r),t.scene.updateMatrixWorld(),n.enabled=!0,n.getReferenceSpace("local");var a=t.camera.position(),o=(new f.Quaternion).setFromUnitVectors(new f.Vector3(0,0,1),a.geodesicNormal).invert(),s=new f.Quaternion(-1,0,0,1).normalize().multiply(o),c=e.position.clone().multiplyScalar(-r).applyQuaternion(s),l=new XRRigidTransform(c,s),u=n.getReferenceSpace().getOffsetReferenceSpace(l);n.setReferenceSpace(u),t.camera.camera3D=n.getCamera(),t.camera.resize(t.camera.width,t.camera.height),document.addEventListener("keydown",i,!1),n.setAnimationLoop((function(e){n.isPresenting&&t.camera.camera3D.cameras[0]&&(t.camera.camera3D.updateMatrix(),t.camera.camera3D.updateMatrixWorld(!0),t.notifyChange(t.camera.camera3D,!0)),t.mainLoop.step(t,e)}))}))}((0,o.Z)(r),a.webXR),r}return(0,a.Z)(m,[{key:"renderer",get:function(){var t,e;return null===(t=this.mainLoop)||void 0===t||null===(e=t.gfxEngine)||void 0===e?void 0:e.getRenderer()}},{key:"camera3D",get:function(){var t;return null===(t=this.camera)||void 0===t?void 0:t.camera3D}},{key:"dispose",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=vt.indexOf(this);if(-1!=e){window.removeEventListener("resize",this._resizeListener),this.controls&&("function"==typeof this.controls.dispose&&this.controls.dispose(),delete this.controls),this.removeAllFrameRequesters(),this.removeAllEvents();var r,n=ot(this.getLayers((function(t){return!t.isTiledGeometryLayer&&!t.isAtmosphere})));try{for(n.s();!(r=n.n()).done;){var i=r.value;this.removeLayer(i.id,t)}}catch(t){n.e(t)}finally{n.f()}var a,o=ot(this.getLayers((function(t){return t.isAtmosphere})));try{for(o.s();!(a=o.n()).done;){var s=a.value;this.removeLayer(s.id,t)}}catch(t){o.e(t)}finally{o.f()}var c,l=ot(this.getLayers((function(t){return t.isTiledGeometryLayer})));try{for(l.s();!(c=l.n()).done;){var u=c.value;this.removeLayer(u.id,t)}}catch(t){l.e(t)}finally{l.f()}vt.splice(e,1),this.scene.traverse(at.Z.cleanup)}else console.warn("View already disposed")}},{key:"addLayer",value:function(t,e){var r=this;if(!t||!t.isLayer)return Promise.reject(new Error("Add Layer type object"));if(this.getLayerById(t.id))return t._reject(new Error("Invalid id '".concat(t.id,"': id already used")));if(t=function(t,e,r){var n=e.source;if(r&&!e.extent&&(e.extent=r.extent,n&&!n.extent&&(n.extent=r.extent)),e.isGeometryLayer&&!e.isLabelLayer?e.crs=t.referenceCrs:e.crs||(r&&r.tileMatrixSets&&r.tileMatrixSets.includes(T.Z.formatToTms(n.crs))?e.crs=n.crs:e.crs=r&&r.extent.crs),e.isLabelLayer)t.mainLoop.gfxEngine.label2dRenderer.registerLayer(e);else if(e.labelEnabled||e.addLabelLayer){e.labelEnabled&&console.info("layer.labelEnabled is deprecated use addLabelLayer, instead of"),e.buildExtent=!0,e.structure="3d";var i=new it.Z("".concat(e.id,"-label"),{source:n,style:e.style,zoom:e.zoom,performance:e.addLabelLayer.performance,crs:n.crs,visible:e.visible,margin:15,forceClampToTerrain:e.addLabelLayer.forceClampToTerrain});e.addEventListener("visible-property-changed",(function(){i.visible=e.visible}));var a=function(r){r.layerId===e.id&&t.removeLayer(i.id),t.removeEventListener(ut.LAYER_REMOVED,a)};t.addEventListener(ut.LAYER_REMOVED,a),e.whenReady=e.whenReady.then((function(){return t.addLayer(i),e}))}return e}(this,t,e),e)if(t.isColorLayer){var i=this.getLayers((function(t){return t.isColorLayer}));if(t.sequence=i.length,!(e.countColorLayersTextures.apply(e,(0,n.Z)(i).concat([t]))<=(0,x.dn)()))return t._reject(new Error("Cant add color layer ".concat(t.id,": the maximum layer is reached")));e.attach(t)}else if(t.isElevationLayer&&"image/x-bil;bits=32"==t.source.format){var a,o;t.source.networkOptions.isWebGL2=null===(a=this.renderer)||void 0===a||null===(o=a.capabilities)||void 0===o?void 0:o.isWebGL2,e.attach(t)}else e.attach(t);else{if("function"!=typeof t.update)return t._reject(new Error("Cant add GeometryLayer: missing a update function"));if("function"!=typeof t.preUpdate)return t._reject(new Error("Cant add GeometryLayer: missing a preUpdate function"));(0,u.Z)(this,yt).push(t)}return t.object3d&&!t.object3d.parent&&t.object3d!==this.scene&&this.scene.add(t.object3d),Promise.all(t._promises).then((function(){t._resolve(),r.notifyChange(e||t,!1),r._frameRequesters[v.Ao.UPDATE_END]&&r._frameRequesters[v.Ao.UPDATE_END].includes(r._allLayersAreReadyCallback)||r.addFrameRequester(v.Ao.UPDATE_END,r._allLayersAreReadyCallback),r.dispatchEvent({type:ut.LAYER_ADDED,layerId:t.id})}),t._reject),t.whenReady}},{key:"removeLayer",value:function(t,e){var r=this.getLayerById(t);if(r){var n=r.parent;if(r.delete(e),n&&!n.detach(r))throw new Error("Error to detach ".concat(t," from ").concat(n.id));if(null==n&&(0,u.Z)(this,yt).splice((0,u.Z)(this,yt).findIndex((function(e){return e.id==t})),1),r.isColorLayer){var i,a=ot(this.getLayers((function(t){return t.isColorLayer})));try{for(a.s();!(i=a.n()).done;){var o=i.value;o.sequence>r.sequence&&o.sequence--}}catch(t){a.e(t)}finally{a.f()}}for(var s=0,c=0,l=vt;c0&&void 0!==arguments[0]?arguments[0]:void 0,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t&&(this._changeSources.add(t),this.mainLoop.gfxEngine.renderer.xr.isPresenting||!t.isTileMesh&&!t.isCamera||((0,u.Z)(this,xt).needsUpdate=!0)),this.mainLoop.scheduleViewUpdate(this,e)}},{key:"getLayers",value:function(t){var e,r=[],n=ot((0,u.Z)(this,yt));try{for(n.s();!(e=n.n()).done;){var i=e.value;if(t&&!t(i)||r.push(i),i.attachedLayers){var a,o=ot(i.attachedLayers);try{for(o.s();!(a=o.n()).done;){var s=a.value;t&&!t(s,i)||r.push(s)}}catch(t){o.e(t)}finally{o.f()}}}}catch(t){n.e(t)}finally{n.f()}return r}},{key:"getLayerById",value:function(t){return this.getLayers((function(e){return e.id===t}))[0]}},{key:"addFrameRequester",value:function(t,e){if("function"!=typeof e)throw new Error("frameRequester must be a function");this._frameRequesters[t]?this._frameRequesters[t].push(e):this._frameRequesters[t]=[e]}},{key:"removeFrameRequester",value:function(t,e){this._frameRequesters[t].includes(e)?this._delayedFrameRequesterRemoval.push({when:t,frameRequester:e}):console.error("Invalid call to removeFrameRequester: frameRequester isn't registered")}},{key:"removeAllFrameRequesters",value:function(){for(var t in this._frameRequesters)if(Object.prototype.hasOwnProperty.call(this._frameRequesters,t)){var e,r=ot(this._frameRequesters[t]);try{for(r.s();!(e=r.n()).done;){var n=e.value;this.removeFrameRequester(t,n)}}catch(t){r.e(t)}finally{r.f()}}this._executeFrameRequestersRemovals()}},{key:"removeAllEvents",value:function(){if(void 0!==this._listeners){for(var t in this._listeners)Object.prototype.hasOwnProperty.call(this._listeners,t)&&delete this._listeners[t];this._listeners=void 0}}},{key:"_executeFrameRequestersRemovals",value:function(){var t,e=ot(this._delayedFrameRequesterRemoval);try{for(e.s();!(t=e.n()).done;){var r=t.value,n=this._frameRequesters[r.when].indexOf(r.frameRequester);n>=0?this._frameRequesters[r.when].splice(n,1):console.warn("FrameReq has already been removed")}}catch(t){e.e(t)}finally{e.f()}this._delayedFrameRequesterRemoval.length=0}},{key:"execFrameRequesters",value:function(t,e,r){if(this._frameRequesters[t]){this._delayedFrameRequesterRemoval.length>0&&this._executeFrameRequestersRemovals();for(var n=arguments.length,i=new Array(n>3?n-3:0),a=3;a1&&void 0!==arguments[1]?arguments[1]:ht,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=this.domElement.getBoundingClientRect();if(t.touches&&t.touches.length)return e.set(t.touches[r].clientX-n.x,t.touches[r].clientY-n.y);if(void 0!==t.offsetX&&void 0!==t.offsetY){var i=t.target.getBoundingClientRect();return e.set(i.x+t.offsetX-n.x,i.y+t.offsetY-n.y)}}},{key:"eventToNormalizedCoords",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.viewToNormalizedCoords(this.eventToViewCoords(t,ht,e))}},{key:"viewToNormalizedCoords",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ht;return e.x=t.x/this.camera.width*2-1,e.y=t.y/this.camera.height*-2+1,e}},{key:"normalizedToViewCoords",value:function(t){return ht.x=.5*(t.x+1)*this.camera.width,ht.y=-.5*(t.y-1)*this.camera.height,ht}},{key:"pickObjectsAt",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,i=[];if(n&&0!==n.length||(n=this.getLayers((function(t){return t.isGeometryLayer}))),Array.isArray(n)||(n=[n]),n.forEach((function(t){"string"==typeof t&&(t=e.getLayerById(t)),t&&(t.isGeometryLayer||t.isObject3D)&&i.push(t)})),0==i.length)return[];for(var a=[],o=t instanceof Event?this.eventToViewCoords(t):t,s=0,c=i;s0&&void 0!==arguments[0]?arguments[0]:.28;return this.camera3D.isOrthographicCamera?.001*t/this.getPixelsToMeters():this.getScaleFromDistance(t,this.getDistanceFromCamera())}},{key:"getScaleFromDistance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.28,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;t/=1e3;var r=f.MathUtils.degToRad(this.camera3D.fov);return t*(this.camera.height/(2*e*Math.tan(.5*r)))}},{key:"getDistanceFromCamera",value:function(t){return this.getPickingPositionFromDepth(t,gt),this.camera3D.position.distanceTo(gt)}},{key:"getPixelsToMeters",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1?arguments[1]:void 0;return this.camera3D.isOrthographicCamera?t*(lt=(this.camera3D.right-this.camera3D.left)/this.camera3D.zoom)/this.camera.width:this.getPixelsToMetersFromDistance(t,this.getDistanceFromCamera(e))}},{key:"getPixelsToMetersFromDistance",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1)/this.camera._preSSE}},{key:"getMetersToPixels",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1?arguments[1]:void 0;return this.camera3D.isOrthographicCamera?(lt=(this.camera3D.right-this.camera3D.left)/this.camera3D.zoom,t*this.camera.width/lt):this.getMetersToPixelsFromDistance(t,this.getDistanceFromCamera(e))}},{key:"getMetersToPixelsFromDistance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.camera._preSSE*t/e}},{key:"pickFeaturesAt",value:function(t){for(var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,i=arguments.length,a=new Array(i>2?i-2:0),o=2;o0&&h.forEach((function(t){return c[t.layer.id].push(t)})),0==s.length)return c;this.getPickingPositionFromDepth(u,gt),At.crs=this.referenceCrs,At.setFromVector3(gt);var f={M:this.getPixelsToMeters(r,u),D:.001*r};this.isPlanarView?f.D=f.M:this.getPixelsToDegrees&&(f.D=this.getMetersToDegrees(f.M));var d,p=ot(nt.Z.pickTilesAt(this,u,r,this.tileLayer));try{for(p.s();!(d=p.n()).done;){var m=d.value;if(m.object.material){var g,A=ot(m.object.material.getLayers(s));try{var v=function(){var t,e=g.value,r=ot(e.textures);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.features&&(l=T.Z.isMetricUnit(n.features.crs)?f.M:f.D,R.Z.filterFeaturesUnderCoordinate(At,n.features,l).forEach((function(t){c[e.id].find((function(e){return e.geometry===t.geometry}))||c[e.id].push(t)})))}}catch(t){r.e(t)}finally{r.f()}};for(A.s();!(g=A.n()).done;)v()}catch(t){A.e(t)}finally{A.f()}}}}catch(t){p.e(t)}finally{p.f()}return c}},{key:"readDepthBuffer",value:function(t,e,r,n,i){var a=this.mainLoop.gfxEngine,o=this.tileLayer.wireframe,s=this.tileLayer.opacity,c=this.tileLayer.visible;o&&(this.tileLayer.wireframe=!1),s<1&&(this.tileLayer.opacity=1),c||(this.tileLayer.visible=!0);var l=this.tileLayer.level0Nodes.map((function(t){return C.Z.push(t,C.Z.MODES.DEPTH)}));return i=a.renderViewToBuffer({camera:this.camera,scene:this.tileLayer.object3d},{x:t,y:e,width:r,height:n,buffer:i}),l.forEach((function(t){return t()})),this.tileLayer.wireframe!==o&&(this.tileLayer.wireframe=o),this.tileLayer.opacity!==s&&(this.tileLayer.opacity=s),this.tileLayer.visible!==c&&(this.tileLayer.visible=c),i}},{key:"getPickingPositionFromDepth",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new f.Vector3;if(this.tileLayer&&0!=this.tileLayer.level0Nodes.length&&this.tileLayer.level0Nodes[0]){var r,n=this.mainLoop,i=0==n.scheduler.commandsWaitingExecutionCount()&&n.renderingState==v.HR,a=n.gfxEngine,o=a.getWindowSize();if((t=t||o.clone().multiplyScalar(.5)).x=Math.floor(t.x),t.y=Math.floor(t.y),i){(0,u.Z)(this,xt).needsUpdate&&(this.readDepthBuffer(0,0,o.x,o.y,(0,u.Z)(this,xt)),(0,u.Z)(this,xt).needsUpdate=!1);var s=4*((o.y-t.y-1)*o.x+t.x);r=(0,u.Z)(this,xt).slice(s,s+4)}else r=this.readDepthBuffer(t.x,t.y,1,1,(0,u.Z)(this,bt));if(dt.x=t.x/o.x*2-1,dt.y=-t.y/o.y*2+1,y.Z.isLogDepthBufferSupported()&&"PerspectiveCamera"==this.camera3D.type){pt.origin.copy(this.camera3D.position),pt.direction.set(dt.x,dt.y,.5),ft.multiplyMatrices(this.camera3D.matrixWorld,ft.copy(this.camera3D.projectionMatrix).invert()),pt.direction.applyMatrix4(ft),pt.direction.sub(pt.origin),mt.set(0,0,1),mt.applyMatrix4(ft),mt.sub(pt.origin);var c=mt.angleTo(pt.direction),l=a.depthBufferRGBAValueToOrthoZ(r,this.camera3D)/Math.cos(c);e.addVectors(this.camera3D.position,pt.direction.setLength(l))}else{var h=a.depthBufferRGBAValueToOrthoZ(r,this.camera3D);e.set(dt.x,dt.y,h),e.unproject(this.camera3D)}if(!(e.length()>1e7))return e}else e=void 0}},{key:"pickTerrainCoordinates",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new I.Z(this.referenceCrs);return t instanceof Event?this.eventToViewCoords(t):t&&void 0!==t.x&&void 0!==t.y?ht.copy(t):ht.set(this.mainLoop.gfxEngine.width/2,this.mainLoop.gfxEngine.height/2),this.getPickingPositionFromDepth(ht,gt),At.crs=this.referenceCrs,At.setFromVector3(gt),At.as(e.crs,e),e}},{key:"pickCoordinates",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new I.Z(this.referenceCrs);return console.warn("Deprecated, use View#pickTerrainCoordinates instead."),this.pickTerrainCoordinates(t,e)}},{key:"resize",value:function(t,e){t<0||e<0?console.warn("Trying to resize the View with negative height (".concat(e,") or width (").concat(t,"). Skipping resize.")):(null==t&&(t=this.domElement.clientWidth),null==e&&(e=this.domElement.clientHeight),(0,h.Z)(this,xt,new Uint8Array(4*t*e)),this.mainLoop.gfxEngine.onWindowResize(t,e),0!==t&&0!==e&&(this.camera.resize(t,e),this.notifyChange(this.camera3D)))}}]),m}(f.EventDispatcher)},24266:(t,e,r)=>{"use strict";r.d(e,{Z:()=>C,y:()=>w});var n=r(70885),i=r(15671),a=r(43144),o=r(97326),s=r(79340),c=r(82963),l=r(61120),u=r(86033),h=r(13092),f=r(99477),d=r(20193),p=r(77474),m=r(45571),g=r(83500),A=r(32204),v=(r(48891),r(97498)),y=r(12306);function b(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return x(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=i.position.array.length&&c()}}}))}},{key:"updateStyle",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!this._style)return!1;if(!this.object3d)return!1;var r=[],i=new Map;this.object3d.traverse((function(t){if(M(t)){var r=E(t);if(e&&!e.includes(r))return;i.has(r)||i.set(r,[]),i.get(r).push(t)}}));var a,o=b(i);try{var s=function(){var e=(0,n.Z)(a.value,2),i=e[0],o=e[1],s=t.tilesC3DTileFeatures.get(i);o.forEach((function(e){e.geometry.clearGroups(),e.material=[];var i,a=b(s);try{var o=function(){var r=(0,n.Z)(i.value,2)[1];if(r.object3d!=e)return"continue";var a=null;a="function"==typeof t._style.fill.color?new f.Color(t._style.fill.color(r)):new f.Color(t._style.fill.color);var o;o="function"==typeof t._style.fill.opacity?t._style.fill.opacity(r):t._style.fill.opacity;var s=a.getHexString()+o,c=null;(0,u.Z)(t,S).has(s)?c=(0,u.Z)(t,S).get(s):(c=new f.MeshStandardMaterial({color:a,opacity:o,transparent:o<1,alphaTest:.09}),(0,u.Z)(t,S).set(s,c));for(var l=-1,h=0;h{"use strict";r.d(e,{Z:()=>h,c:()=>u});var n=r(15671),i=r(43144),a=r(79340),o=r(82963),s=r(61120),c=r(66165),l=r(52872);function u(t){var e;return null==t||null===(e=t.attachedLayers.filter((function(t){return t.isGeoidLayer}))[0])||void 0===e?void 0:e.visible}const h=function(t){(0,a.Z)(u,t);var e,r,c=(e=u,r=function(){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(t){return!1}}(),function(){var t,n=(0,s.Z)(e);if(r){var i=(0,s.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,o.Z)(this,t)});function u(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.Z)(this,u),(e=c.call(this,t,r)).isGeoidLayer=!0,e.defineLayerProperty("visible",!0),e}return(0,i.Z)(u,[{key:"updateNodeZ",value:function(t){t.material.geoidHeight=this.visible?t.geoidHeight:0,t.obb.updateZ({geoidHeight:t.material.geoidHeight})}},{key:"update",value:function(t,e,r,n){var i=this;if(n&&r.material){var a=r.getExtentsByProjection(e.crs),o=a[0].zoom;if(!(o>e.zoom.max||o{"use strict";r.d(e,{Z:()=>d});var n=r(15671),i=r(43144),a=r(97326),o=r(79340),s=r(82963),c=r(61120),l=r(66165),u=r(73773),h=r(1537),f=r(1857);const d=function(t){(0,o.Z)(d,t);var e,r,l=(e=d,r=function(){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(t){return!1}}(),function(){var t,n=(0,c.Z)(e);if(r){var i=(0,c.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,s.Z)(this,t)});function d(t,e){var r,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,n.Z)(this,d),o.cacheLifeTime=null!==(r=o.cacheLifeTime)&&void 0!==r?r:h.D.GEOMETRY;var s=o.visible;if(delete o.visible,(i=l.call(this,t,o)).isGeometryLayer=!0,!e||!e.isObject3D)throw new Error("Missing/Invalid object3d parameter (must be a\n three.js Object3D instance)");return"Group"===e.type&&""===e.name&&(e.name=t),Object.defineProperty((0,a.Z)(i),"object3d",{value:e,writable:!1,configurable:!0}),i.opacity=1,i.wireframe=!1,i.attachedLayers=[],i.visible=null==s||s,Object.defineProperty(i.zoom,"max",{value:1/0,writable:!1}),i.filteringExtent=!i.source.isFileSource,i.structure="3d",i}return(0,i.Z)(d,[{key:"visible",get:function(){return this.object3d.visible},set:function(t){if(this.object3d.visible!==t){var e={type:"visible-property-changed",previous:{},new:{}};e.previous.visible=this.object3d.visible,e.new.visible=t,this.dispatchEvent(e),this.object3d.visible=t}}},{key:"getObjectToUpdateForAttachedLayers",value:function(t){if(t.parent&&t.material)return{element:t,parent:t.parent}}},{key:"postUpdate",value:function(){}},{key:"culling",value:function(){return!0}},{key:"attach",value:function(t){if(!t.update)throw new Error("Missing 'update' function -> can't attach layer\n ".concat(t.id));this.attachedLayers.push(t),t.parent=this}},{key:"detach",value:function(t){var e=this.attachedLayers.length;return this.attachedLayers=this.attachedLayers.filter((function(e){return e.id!=t.id})),t.parent=void 0,this.attachedLayers.length2&&void 0!==arguments[2]?arguments[2]:this.options.defaultPickingRadius,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return u.Z.pickObjectsAt(t,e,r,this.object3d,n)}}]),d}(l.Z)},63133:(t,e,r)=>{"use strict";r.d(e,{$:()=>h,Z:()=>u});var n=r(42982),i=r(79340),a=r(82963),o=r(61120),s=r(15671),c=r(43144),l=r(99128);var u=function(){function t(e){(0,s.Z)(this,t),this.layer=e}return(0,c.Z)(t,[{key:"clear",value:function(){}},{key:"update",value:function(){}}]),t}(),h=function(t){(0,i.Z)(h,t);var e,r,u=(e=h,r=function(){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(t){return!1}}(),function(){var t,n=(0,o.Z)(e);if(r){var i=(0,o.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,a.Z)(this,t)});function h(t){var e;return(0,s.Z)(this,h),(e=u.call(this,t)).displayed={tiles:new Set},Object.defineProperty(e.displayed,"layers",{get:function(){var t=[];return e.displayed.tiles.forEach((function(e){var r=e.material;t=(0,n.Z)(new Set([].concat((0,n.Z)(t),(0,n.Z)(r.colorLayerIds.filter((function(t){return r.getLayer(t)}))),(0,n.Z)(r.elevationLayerIds))))})),e.layer.attachedLayers.filter((function(e){return t.includes(e.id)}))}}),Object.defineProperty(e.displayed,"extent",{get:function(){var t=new l.ZP(e.layer.extent.crs,1/0,-1/0,1/0,-1/0);return t.min=1/0,t.max=-1/0,e.displayed.tiles.forEach((function(e){t.union(e.extent),t.min=Math.min(e.obb.z.min,t.min),t.max=Math.max(e.obb.z.max,t.max)})),t}}),e}return(0,c.Z)(h,[{key:"clear",value:function(){this.displayed.tiles.clear()}},{key:"update",value:function(t){t.material.visible?this.displayed.tiles.add(t):this.displayed.tiles.delete(t)}}]),h}(u)},85299:(t,e,r)=>{"use strict";r.d(e,{Z:()=>Y});var n=r(97326),i=r(18415),a=r(4942);function o(t,e,r,n){return o="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,r,n){var o,s=(0,i.Z)(t,e);if(s){if((o=Object.getOwnPropertyDescriptor(s,e)).set)return o.set.call(n,r),!0;if(!o.writable)return!1}if(o=Object.getOwnPropertyDescriptor(n,e)){if(!o.writable)return!1;o.value=r,Object.defineProperty(n,e,o)}else(0,a.Z)(n,e,r);return!0},o(t,e,r,n)}var s=r(88301),c=r(79340),l=r(82963),u=r(61120),h=r(15671),f=r(43144),d=r(13092),p=r(86033),m=r(99477),g=r(52872),A=r(1857),v=r(20193),y=r(60145),b=r(99128),x=r(57918),w=r(94596),_=r(48891),E=r(6755);function M(t,e){I(t,e),e.add(t)}function S(t,e,r){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return r}function C(t){var e=function(){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(t){return!1}}();return function(){var r,n=(0,u.Z)(t);if(e){var i=(0,u.Z)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,l.Z)(this,r)}}function T(t,e,r){I(t,e),e.set(t,r)}function I(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}var R=new _.uP,B=new y.Z("EPSG:4326",0,0,0),k=new b.ZP("EPSG:4326",0,0,0,0),L=new m.Vector2,P=new m.Vector2,D=new m.Vector2,U=new WeakMap,O=function(){function t(){(0,h.Z)(this,t),T(this,U,{writable:!0,value:!1}),this.dom=document.createElement("div"),this.dom.style.display="none",this.visible=!0}return(0,f.Z)(t,[{key:"visible",get:function(){return(0,p.Z)(this,U)},set:function(t){t!==(0,p.Z)(this,U)&&((0,d.Z)(this,U,t),this.dom.style.display=t?"block":"none")}},{key:"hide",value:function(){this.visible=!1}},{key:"show",value:function(){this.visible=!0}},{key:"add",value:function(t){this.dom.append(t.dom)}}]),t}(),F=function(t){(0,c.Z)(r,t);var e=C(r);function r(t){var n;return(0,h.Z)(this,r),(n=e.call(this)).nodeParent=t,n.needsUpdate=!0,n}return(0,f.Z)(r,[{key:"initializeDom",value:function(){this.domElements=new O,this.domElements.labels=new O,this.domElements.add(this.domElements.labels),this.domElements.labels.dom.style.opacity="0"}},{key:"addLabel",value:function(t){this.add(t),this.domElements.labels.dom.append(t.content),t.initDimensions(),this.nodeParent.layer.isGlobeLayer&&this.nodeParent.level<4&&(t.horizonCullingPoint=new m.Vector3)}},{key:"removeLabel",value:function(t){this.remove(t),this.domElements.labels.dom.removeChild(t.content)}},{key:"updatePosition",value:function(t){this.needsUpdate&&(this.needsAltitude&&t.updateElevationFromLayer(this.nodeParent.layer,[this.nodeParent]),t.update3dPosition(this.nodeParent.layer.crs),t.updateHorizonCullingPoint())}},{key:"count",value:function(){return this.children.length}},{key:"labels",get:function(){return this.children}}]),r}(m.Group),N=new WeakMap,z=new WeakSet,G=new WeakSet,Z=new WeakSet,V=new WeakSet,Q=new WeakSet;function j(t){this.object3d.add(t)}function W(t){this.toHide.add(t)}function H(t){var e,r;return null!==(e=t.parent)&&void 0!==e&&e.isTileMesh?(null===(r=t.parent.link[this.id])||void 0===r?void 0:r.domElements)||S(this,Z,H).call(this,t.parent):this.domElement}function X(t){var e=this;return t.children.every((function(t){var r;return t.layerUpdateState&&(null===(r=t.layerUpdateState[e.id])||void 0===r?void 0:r.hasFinished())}))}function q(t){var e=this,r=t.children.slice();(0,p.Z)(this,N).reset(),r.sort((function(t,e){return e.order-t.order})),r.forEach((function(r){t.nodeParent.extent.planarDimensions(L),B.crs=t.nodeParent.extent.crs,B.setFromValues(t.nodeParent.extent.west,t.nodeParent.extent.north,0).toVector3(P),B.copy(r.coordinates).as(t.nodeParent.extent.crs,B).toVector3(D),D.sub(P),D.y+=L.y,D.divide(L).multiplyScalar((0,p.Z)(e,N).width),r.updateProjectedPosition(D.x,D.y),(0,p.Z)(e,N).insert(r)||t.removeLabel(r)}))}const Y=function(t){(0,c.Z)(r,t);var e=C(r);function r(t){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,h.Z)(this,r);var o=a.domElement;return delete a.domElement,i=e.call(this,t,a.object3d||new m.Group,a),M((0,n.Z)(i),Q),M((0,n.Z)(i),V),M((0,n.Z)(i),Z),M((0,n.Z)(i),G),M((0,n.Z)(i),z),T((0,n.Z)(i),N,{writable:!0,value:new E.R}),i.isLabelLayer=!0,i.domElement=new O,i.domElement.show(),i.domElement.dom.id="itowns-label-".concat(i.id),i.buildExtent=!0,i.crs=a.source.crs,i.performance=a.performance||!0,i.forceClampToTerrain=a.forceClampToTerrain||!1,i.toHide=new m.Group,i.labelDomelement=o,i.margin=a.margin,i}return(0,f.Z)(r,[{key:"visible",get:function(){return(0,s.Z)((0,u.Z)(r.prototype),"visible",this)},set:function(t){var e,n;(function(t,e,r,n,i){if(!o(t,e,r,n||t)&&i)throw new TypeError("failed to set property")})((0,u.Z)(r.prototype),"visible",t,this,!0),t?null===(e=this.domElement)||void 0===e||e.show():null===(n=this.domElement)||void 0===n||n.hide()}},{key:"submittedLabelNodes",get:function(){return this.object3d.children}},{key:"convert",value:function(t,e){var r=this,n=[];return e.as(t.crs,k),B.crs=t.crs,R.setZoom(e.zoom),t.features.forEach((function(e){var i,a,o,s;if(e.type===w.tg.POINT){R.setFeature(e);var c=null===(i=e.style)||void 0===i||null===(a=i.text)||void 0===a?void 0:a.field,l=null===(o=e.style)||void 0===o||null===(s=o.point)||void 0===s?void 0:s.base_altitude,u=l instanceof Function&&"baseAltitudeDefault"==l.name;n.needsAltitude=n.needsAltitude||!0===r.forceClampToTerrain||u&&!e.hasRawElevationData,e.geometries.forEach((function(i){if(B.setFromArray(e.vertices,i.size*i.indices[0].offset),B.applyMatrix4(t.matrixWorld),k.isPointInside(B)){var a,o=i.properties.style&&i.properties.style.text&&i.properties.style.text.field;R.setGeometry(i),r.style.setContext(R);var s=r.style.text&&r.style.text.field;if(r.labelDomelement)a=(0,_.Lu)(r.labelDomelement,R);else if(!(o||c||s||i.properties.style&&(i.properties.style.icon.source||i.properties.style.icon.key)||e.style&&e.style.icon&&(e.style.icon.source||e.style.icon.key)||r.style.icon&&(r.style.icon.source||r.style.icon.key)))return;var l=new x.Z(a,B.clone(),r.style);l.layerId=r.id,l.padding=r.margin||l.padding,n.push(l)}}))}})),n}},{key:"preUpdate",value:function(t,e){e.has(this.parent)&&(this.object3d.clear(),(0,p.Z)(this,N).width=.5*this.parent.maxScreenSizeNode,(0,p.Z)(this,N).height=.5*this.parent.maxScreenSizeNode,(0,p.Z)(this,N).resize())}},{key:"update",value:function(t,e,r,n){var i=this;if(n||!r.link[e.id]){var a=r.link[e.id]||new F(r);if(r.link[e.id]=a,!this.frozen&&r.visible&&this.visible){if(!r.material.visible&&S(this,V,X).call(this,r))return S(this,G,W).call(this,a);var o=r.getExtentsByProjection(this.source.crs)||[r.extent],s=o[0].zoom;if(se.zoom.max)return S(this,G,W).call(this,a);if(void 0===r.layerUpdateState[this.id]&&(r.layerUpdateState[this.id]=new g.Z),this.source.extentInsideLimit(r.extent,s)){if(S(this,V,X).call(this,r.parent))return r.material.visible||(a.needsUpdate=!0),void S(this,z,j).call(this,a);if(r.layerUpdateState[this.id].canTryUpdate()){r.layerUpdateState[this.id].newTry();var c={layer:this,extentsSource:o,view:t.view,requester:r};return t.scheduler.execute(c).then((function(e){if(e){var n=t.view.mainLoop.gfxEngine.label2dRenderer;a.initializeDom(),S(i,Z,H).call(i,r).add(a.domElements),e.forEach((function(t){r.parent?(a.needsAltitude=a.needsAltitude||t.needsAltitude,t.forEach((function(t){r.extent.isPointInside(t.coordinates)&&a.addLabel(t)}))):t.forEach((function(t){A.Z.removeChildrenAndCleanupRecursively(i,t),n.removeLabelDOM(t)}))})),a.count()&&(a.domElements.labels.hide(),a.domElements.labels.dom.style.opacity="1.0",r.addEventListener("show",(function(){return a.domElements.labels.show()})),r.addEventListener("hidden",(function(){return S(i,G,W).call(i,a)})),r.addEventListener("removed",(function(){return i.removeNodeDomElement(r)})),a.needsAltitude&&r.material.getElevationLayer()&&r.material.getElevationLayer().addEventListener("rasterElevationLevelChanged",(function(){a.needsUpdate=!0})),i.performance&&S(i,Q,q).call(i,a)),r.layerUpdateState[i.id].noMoreUpdatePossible()}}))}}else r.layerUpdateState[this.id].noMoreUpdatePossible()}}else A.Z.removeChildrenAndCleanupRecursively(this,r)}},{key:"removeLabelsFromNodeRecursive",value:function(t){var e=this;t.children.forEach((function(t){t.link[e.id]&&delete t.link[e.id],e.removeLabelsFromNodeRecursive(t)})),this.removeNodeDomElement(t)}},{key:"removeNodeDomElement",value:function(t){var e;if(null!==(e=t.link[this.id])&&void 0!==e&&e.domElements){var r=t.link[this.id].domElements.dom;r.parentElement.removeChild(r),delete t.link[this.id].domElements}}},{key:"delete",value:function(t){var e=this;t&&this.cache.clear(),this.domElement.dom.parentElement.removeChild(this.domElement.dom),this.parent.level0Nodes.forEach((function(t){return e.removeLabelsFromNodeRecursive(t)}))}}]),r}(v.Z)},66165:(t,e,r)=>{"use strict";r.d(e,{M:()=>A,Z:()=>g});var n=r(15671),i=r(43144),a=r(97326),o=r(79340),s=r(82963),c=r(61120),l=r(99477),u=r(54919),h=r(63133),f=r(51123),d=r(1537),p=r(48891);function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{};if((0,n.Z)(this,m),i.projection&&(console.warn("Layer projection parameter is deprecated, use crs instead."),i.crs=i.crs||i.projection),void 0===i.source||!0===i.source)throw new Error("Layer ".concat(t," needs Source"));return(e=l.call(this)).isLayer=!0,!i.style||i.style instanceof p.ZP||("string"==typeof(null===(r=i.style.fill)||void 0===r?void 0:r.pattern)&&(console.warn("Using style.fill.pattern = { source: Img|url } is adviced"),i.style.fill.pattern={source:i.style.fill.pattern}),i.style=new p.ZP(i.style)),e.style=i.style||new p.ZP,Object.assign((0,a.Z)(e),i),Object.defineProperty((0,a.Z)(e),"id",{value:t,writable:!1}),e.options=i.options||{},e.updateStrategy||(e.updateStrategy={type:u.R3,options:{}}),e.defineLayerProperty("frozen",!1),i.zoom?(e.zoom={max:i.zoom.max,min:i.zoom.min||0},null==e.zoom.max&&(e.zoom.max=1/0)):e.zoom={max:1/0,min:0},e.info=new h.Z((0,a.Z)(e)),e.source=e.source||new f.ZP({url:"none"}),e.ready=!1,e._promises=[],e.whenReady=new Promise((function(t,r){e._resolve=t,e._reject=r})).then((function(){return e.ready=!0,e.source.onLayerAdded({out:(0,a.Z)(e)}),(0,a.Z)(e)})),e._promises.push(e.source.whenReady),e.cache=new d.Z(i.cacheLifeTime),e.mergeFeatures=void 0===e.mergeFeatures||i.mergeFeatures,e.filter=e.filter||e.source.filter,e}return(0,i.Z)(m,[{key:"addInitializationStep",value:function(){var t;return this._promises.push(new Promise((function(e){t=e}))),t}},{key:"defineLayerProperty",value:function(t,e,r){var n=this,i=Object.getOwnPropertyDescriptor(this,t);if(!i||!i.set){var a=null==this[t]?e:this[t];Object.defineProperty(this,t,{get:function(){return a},set:function(e){if(a!==e){var i={type:"".concat(t,"-property-changed"),previous:{},new:{}};i.previous[t]=a,i.new[t]=e,a=e,r&&r(n,t),n.dispatchEvent(i)}}})}}},{key:"convert",value:function(t){return t}},{key:"getData",value:function(t,e){var r=this,n=this.source.requestToKey(this.source.isVectorSource?e:t),i=this.cache.getByArray(n);return i||(i=this.source.loadData(t,this).then((function(t){return r.convert(t,e)}),(function(t){throw t})),this.cache.setByArray(i,n)),i}},{key:"isValidData",value:function(){}},{key:"delete",value:function(){console.warn("Function delete doesn't exist for this layer")}}]),m}(l.EventDispatcher);var A={moveLayerToIndex:function(t,e,r){e=Math.min(e,r.length-1),e=Math.max(e,0);var n,i=t.sequence,a=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(r);try{for(a.s();!(n=a.n()).done;){var o=n.value;o.id===t.id?o.sequence=e:o.sequence>i&&o.sequence<=e?o.sequence--:o.sequence>=e&&o.sequence0&&this.moveLayerToIndex(t,t.sequence-1,e)},moveLayerUp:function(t,e){var r=e.length-1;t.sequence{"use strict";r.d(e,{Z:()=>o});var n=r(15671),i=r(43144),a=[1,3,7,60];const o=function(){function t(){(0,n.Z)(this,t),this.state=0,this.lastErrorTimestamp=0,this.errorCount=0,this.failureParams={lowestLevelError:1/0}}return(0,i.Z)(t,[{key:"hasFinished",value:function(){return 4==this.state}},{key:"canTryUpdate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();switch(this.state){case 0:return!0;case 3:case 1:case 4:return!1;default:return 1e3*this.secondsUntilNextTry()<=t-this.lastErrorTimestamp}}},{key:"secondsUntilNextTry",value:function(){if(2!==this.state)return 0;var t=Math.max(0,Math.min(this.errorCount,a.length)-1);return a[t]}},{key:"newTry",value:function(){this.state=1}},{key:"success",value:function(){this.lastErrorTimestamp=0,this.state=0}},{key:"noMoreUpdatePossible",value:function(){this.state=4}},{key:"noData",value:function(t){this.state=0,this.failureParams.lowestLevelError=Math.min(t.targetLevel,this.failureParams.lowestLevelError)}},{key:"failure",value:function(t,e,r){r&&null!=r.targetLevel&&(this.failureParams.lowestLevelError=Math.min(r.targetLevel,this.failureParams.lowestLevelError)),this.lastErrorTimestamp=t,this.state=e?3:2,this.errorCount++}},{key:"inError",value:function(){return 3==this.state||2==this.state}}]),t}()},54919:(t,e,r)=>{"use strict";r.d(e,{AE:()=>a,ET:()=>s,R3:()=>i,c:()=>o,k5:()=>u});var n=r(79736),i=0,a=1,o=2,s=3;function c(t,e){var r=e.groups.filter((function(e){return e<=t}));return r.length?r[r.length-1]:e.groups[0]}function l(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e==n.pL?r.zoom?r.zoom.min:0:Math.min(t,Math.ceil((e+t)/2))}function u(t,e){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.level,i=arguments.length>3?arguments[3]:void 0,u=arguments.length>4?arguments[4]:void 0,h=arguments.length>5?arguments[5]:void 0,f=u.source.zoom?u.source.zoom.max:1/0;if(h.lowestLevelError!=1/0)r=l(h.lowestLevelError,i,u.source),r=h.lowestLevelError==r?r-1:r,t==a&&(r=c(r,u.updateStrategy.options));else{switch(t){case a:r=c(n,u.updateStrategy.options);break;case o:r=function(t,e,r){return Math.min(t,e+(r.increment||1))}(n,i,u.updateStrategy.options);break;case s:r=l(n,i,u.source);break;default:r=function(t,e,r,n){return t.pendingSubdivision&&!n.isVectorTileSource?r:e}(e,n,i,u.source)}r=Math.min(r,f)}return r}},52521:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=function(t,e){if(e&&e.isGeometryLayer){var r=t.transparent;t.layer=e,t.uniforms&&null!=t.uniforms.opacity?Object.defineProperty(t.uniforms.opacity,"value",{get:function(){return t.layer.opacity}}):null!=t.opacity&&Object.defineProperty(t,"opacity",{get:function(){return t.layer.opacity}}),t.uniforms&&null!=t.uniforms.mode&&Object.defineProperty(t.uniforms.mode,"value",{get:function(){return t.layer.pntsMode}}),t.uniforms&&null!=t.uniforms.shape&&Object.defineProperty(t.uniforms.shape,"value",{get:function(){return t.layer.pntsShape}}),t.uniforms&&null!=t.uniforms.sizeMode&&Object.defineProperty(t.uniforms.sizeMode,"value",{get:function(){return t.layer.pntsSizeMode}}),t.uniforms&&null!=t.uniforms.minAttenuatedSize&&Object.defineProperty(t.uniforms.minAttenuatedSize,"value",{get:function(){return t.layer.pntsMinAttenuatedSize}}),t.uniforms&&null!=t.uniforms.maxAttenuatedSize&&Object.defineProperty(t.uniforms.maxAttenuatedSize,"value",{get:function(){return t.layer.pntsMaxAttenuatedSize}}),Object.defineProperty(t,"wireframe",{get:function(){return t.layer.wireframe}}),Object.defineProperty(t,"transparent",{get:function(){return r!=t.layer.opacity<1&&(t.needsUpdate=!0,r=t.layer.opacity<1),r}})}return t}},62968:(t,e,r)=>{"use strict";r.d(e,{Z:()=>N});var n=r(42982),i=r(15671),a=r(43144),o=r(97326),s=r(79340),c=r(82963),l=r(61120),u=r(99477),h=r(20193),f=r(63133),d=r(73773),p=r(13092),m=r(86033),g=r(82150),A=r(27313);function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r4&&void 0!==arguments[4]?arguments[4]:0;if((0,i.Z)(this,h),s=n.call(this,t,e),y((0,o.Z)(s),b,{writable:!0,value:new Map}),y((0,o.Z)(s),x,{writable:!0,value:!0}),!a)throw new Error("extent is mandatory to build a TileMesh");s.layer=r,s.extent=a,s.extent.zoom=c,s.level=c,s.material.objectId=s.id,s.obb=s.geometry.OBB.clone(),s.boundingSphere=new u.Sphere,s.obb.box3D.getBoundingSphere(s.boundingSphere);var l,f=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return v(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(r.tileMatrixSets);try{for(f.s();!(l=f.n()).done;){var d=l.value;(0,m.Z)((0,o.Z)(s),b).set(d,s.extent.tiledCovering(d))}}catch(t){f.e(t)}finally{f.f()}return s.frustumCulled=!1,s.matrixAutoUpdate=!1,s.rotationAutoUpdate=!1,s.layerUpdateState={},s.isTileMesh=!0,s.geoidHeight=0,s.link={},Object.defineProperty((0,o.Z)(s),"visible",{get:function(){return(0,m.Z)(this,x)},set:function(t){(0,m.Z)(this,x)!=t&&((0,p.Z)(this,x,t),this.dispatchEvent({type:t?"shown":"hidden"}))}}),s}return(0,a.Z)(h,[{key:"setBBoxZ",value:function(t){t.geoidHeight=(0,A.c)(this.layer)?this.geoidHeight:0,this.obb.updateZ(t),this.horizonCullingPointElevationScaled&&this.horizonCullingPointElevationScaled.setLength(this.obb.z.delta+this.horizonCullingPoint.length()),this.obb.box3D.getBoundingSphere(this.boundingSphere)}},{key:"getExtentsByProjection",value:function(t){return(0,m.Z)(this,b).get(g.Z.formatToTms(t))}},{key:"findCommonAncestor",value:function(t){if(t)return t.level==this.level?t.id==this.id?t:0!=t.level?this.parent.findCommonAncestor(t.parent):void 0:t.level=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:this.options.defaultPickingRadius,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return d.Z.pickTilesAt(t,e,r,this,n)}},{key:"preUpdate",value:function(t,e){var r=this;if(e.has(void 0)||0==e.size)return this.level0Nodes;t.colorLayers=t.view.getLayers((function(t,e){return e&&e.id==r.id&&t.isColorLayer})),t.elevationLayers=t.view.getLayers((function(t,e){return e&&e.id==r.id&&t.isElevationLayer})),t.maxElevationLevel=-1;var n,i,a=D(t.elevationLayers);try{for(a.s();!(n=a.n()).done;){var o=n.value;t.maxElevationLevel=Math.max(o.source.zoom.max,t.maxElevationLevel)}}catch(t){a.e(t)}finally{a.f()}-1==t.maxElevationLevel&&(t.maxElevationLevel=1/0),this.colorLayersOrder=P.M.getColorLayersIdOrderedBySequence(t.colorLayers);var s,c=D(e.values());try{for(c.s();!(s=c.n()).done;){var l=s.value;if(l.isCamera)return this.level0Nodes;if(l.layer===this){if(i){if(!(i=l.findCommonAncestor(i)))return this.level0Nodes}else i=l;null==i.material&&(i=void 0)}}}catch(t){c.e(t)}finally{c.f()}return i?[i]:this.level0Nodes}},{key:"update",value:function(t,e,r){var n=this;if(!r.parent)return k.Z.removeChildrenAndCleanup(this,r);if(r.parent.pendingSubdivision)return r.visible=!1,r.material.visible=!1,void this.info.update(r);if(r.visible=!this.culling(r,t.camera),r.visible){var i=!1;return r.material.visible=!0,this.info.update(r),(r.pendingSubdivision||p.hasEnoughTexturesToSubdivide(t,r)&&this.subdivision(t,this,r))&&(this.subdivideNode(t,r),r.material.visible=r.pendingSubdivision,this.info.update(r),i=!0),r.material.visible&&!i?k.Z.removeChildren(this,r):i?r.children.filter((function(t){return t.layer==n})):void 0}return r.material.visible=!1,this.info.update(r),k.Z.removeChildren(this,r)}},{key:"convert",value:function(t,e){return function(t,e,r){var n=r.builder,i=t,a=void 0!==i?i.level+1:0,o={extent:e,level:a,segment:r.segments||16,disableSkirt:r.disableSkirt};return function(t,e){var r=t.computeSharableExtent(e.extent),n=r.sharableExtent,i=r.quaternion,a=r.position,o=n.south.toFixed(6),s="".concat(t.crs,"_").concat(e.disableSkirt?0:1,"_").concat(e.segment),c=I.get(o,e.level,s);if(!c){var l;c=new Promise((function(t){l=t})),I.set(c,o,e.level,s),e.extent=n,e.center=t.center(e.extent).clone();var h,f=T.get(s);e.buildIndexAndUv_0=!f,e.builder=t;try{h=(0,S.Z)(e)}catch(t){return Promise.reject(t)}f||((f={}).index=new u.BufferAttribute(h.index,1),f.uv=new u.BufferAttribute(h.uvs[0],2),T.set(s,f)),h.index=f.index,h.uvs[0]=f.uv,h.position=new u.BufferAttribute(h.position,3),h.normal=new u.BufferAttribute(h.normal,3),e.builder.uvCount>1&&(h.uvs[1]=new u.BufferAttribute(h.uvs[1],1));var d=new E.Z(e,h);return d.OBB=new C.Z(d.boundingBox.min,d.boundingBox.max),d._count=0,d.dispose=function(){d._count--,d._count<=0&&(d.index=null,delete d.attributes.uv_0,u.BufferGeometry.prototype.dispose.call(d),I.delete(o,e.level,s))},l(d),Promise.resolve({geometry:d,quaternion:i,position:a})}return c.then((function(t){return{geometry:t,quaternion:i,position:a}}))}(n,o).then((function(t){t.geometry._count++;var o=r.tileMatrixSets.length,s=new _.ZP(r.materialOptions,o);(0,R.Z)(s,r);var c=new w(t.geometry,s,r,e,a);if(i&&i.isTileMesh){var l=n.computeSharableExtent(i.extent);t.position.sub(l.position).applyQuaternion(l.quaternion.invert()),t.quaternion.premultiply(l.quaternion)}if(c.position.copy(t.position),c.quaternion.copy(t.quaternion),c.visible=!1,c.updateMatrix(),function(t,e){if(e.diffuse&&(t.material.diffuse=e.diffuse),e.isGlobeLayer){t.horizonCullingPoint=t.extent.center().as("EPSG:4978").toVector3(),t.extent.planarDimensions(B).multiplyScalar(u.MathUtils.DEG2RAD);var r=B.length(),n=Math.abs(1/Math.cos(.5*r));t.horizonCullingPoint.setLength(n*t.horizonCullingPoint.length()),t.horizonCullingPointElevationScaled=t.horizonCullingPoint.clone()}}(c,r),i){c.geoidHeight=i.geoidHeight;var h=(0,A.c)(r)?c.geoidHeight:0;c.setBBoxZ({min:i.obb.z.min,max:i.obb.z.max,geoidHeight:h}),c.material.geoidHeight=h}return c}))}(t,e,this)}},{key:"countColorLayersTextures",value:function(){return arguments.length}},{key:"culling",value:function(t,e){return!e.isBox3Visible(t.obb.box3D,t.matrixWorld)}},{key:"subdivideNode",value:function(t,e){var r=this;if(!e.pendingSubdivision&&!e.children.some((function(t){return t.layer==r}))){var n=e.extent.subdivision();e.pendingSubdivision=!0;var i={view:t.view,requester:e,layer:this,priority:1e4,extentsSource:n,redraw:!1};return t.scheduler.execute(i).then((function(r){var n,i=D(r);try{for(i.s();!(n=i.n()).done;){var a=n.value;e.add(a),a.updateMatrixWorld(!0)}}catch(t){i.e(t)}finally{i.f()}e.pendingSubdivision=!1,t.view.notifyChange(e,!1)}),(function(t){if(e.pendingSubdivision=!1,!t.isCancelledCommandException)throw new Error(t)}))}}},{key:"subdivision",value:function(t,e,r){if(r.levelo.zoom.max||su.zoom.max||h{"use strict";r.r(e),r.d(e,{$3dTilesCulling:()=>vi.y,$3dTilesSubdivisionControl:()=>vi.Y0,C3DTBatchTable:()=>di.Z,C3DTBatchTableHierarchyExtension:()=>Ai,C3DTBoundingVolume:()=>fi.Z,C3DTExtensions:()=>pi.Z,C3DTFeature:()=>ui.Z,C3DTILES_LAYER_EVENTS:()=>vr.y,C3DTilesBoundingVolumeTypes:()=>mi.D,C3DTilesIonSource:()=>Un,C3DTilesLayer:()=>vr.Z,C3DTilesSource:()=>Dn,C3DTilesTypes:()=>mi.h,C3DTileset:()=>hi.Z,CAMERA_TYPE:()=>be.P,CONTROL_EVENTS:()=>P.Q,CRS:()=>c.Z,CameraCalibrationParser:()=>Rr,CameraUtils:()=>pe.ZP,Capabilities:()=>ye.Z,ClassificationScheme:()=>L.wy,ColorLayer:()=>qe,ColorLayersOrdering:()=>Fr.Z,Coordinates:()=>o.Z,DEMUtils:()=>de.Z,ElevationLayer:()=>Je,Ellipsoid:()=>l.Z,EntwinePointTileLayer:()=>Yr,EntwinePointTileSource:()=>ti,Extent:()=>a.ZP,FEATURE_TYPES:()=>xt.tg,Feature:()=>xt.ZP,Feature2Mesh:()=>he,FeatureCollection:()=>xt.t1,FeatureGeometry:()=>xt.iL,FeatureGeometryLayer:()=>$e,FeatureProcessing:()=>b,FeaturesUtils:()=>fe.Z,Fetcher:()=>f.Z,FileSource:()=>$r,FirstPersonControls:()=>rt,FlyControls:()=>j,GDFParser:()=>si.Z,GLOBE_VIEW_EVENTS:()=>u.b,GTXParser:()=>ci.ZP,GeoJsonParser:()=>Cr.Z,GeoidGrid:()=>s.Z,GeoidLayer:()=>v.Z,GeometryLayer:()=>Ke.Z,GlobeControls:()=>P.Z,GlobeLayer:()=>Nr.Z,GlobeView:()=>u.Z,GpxParser:()=>ei.Z,ISGParser:()=>oi.Z,ImageryLayers:()=>we.M,KMLParser:()=>ri.Z,LASParser:()=>Kn,Label:()=>xe.Z,LabelLayer:()=>Gr.Z,Layer:()=>we.Z,MAIN_LOOP_EVENTS:()=>d.Ao,OrientationUtils:()=>Lt,OrientedImageCamera:()=>k,OrientedImageLayer:()=>Ur,OrientedImageSource:()=>Mn,PLANAR_CONTROL_EVENT:()=>mt.uZ,PNTS_MODE:()=>L.vj,PNTS_SHAPE:()=>L.Uz,PNTS_SIZE_MODE:()=>L.E7,PlanarControls:()=>mt.ZP,PlanarLayer:()=>zr.Z,PlanarView:()=>h.Z,PointCloudLayer:()=>ur,PointsMaterial:()=>L.ZP,PotreeLayer:()=>Ar,PotreeSource:()=>Pn,REVISION:()=>yi,STRATEGY_DICHOTOMY:()=>Or.ET,STRATEGY_GROUP:()=>Or.AE,STRATEGY_MIN_NETWORK_TRAFFIC:()=>Or.R3,STRATEGY_PROGRESSIVE:()=>Or.c,ShaderChunk:()=>Ae,ShapefileParser:()=>ai,Source:()=>Jr.ZP,StreetControls:()=>pt,Style:()=>Pt.ZP,THREE:()=>n,TMSSource:()=>nn,TiledGeometryLayer:()=>yr.Z,VIEW_EVENTS:()=>p.b,VectorTilesSource:()=>En,View:()=>p.Z,WFSSource:()=>on,WMSSource:()=>cn,WMTSSource:()=>ln,colorLayerEffects:()=>ve.pO,ellipsoidSizes:()=>l.c,enableDracoLoader:()=>li.qw,enableKtx2Loader:()=>li.hu,getMaxColorSamplerUnitsCount:()=>ve.dn,glTFLoader:()=>li.zL,legacyGLTFLoader:()=>li.mp,process3dTilesNode:()=>vi.Ti,proj4:()=>i.default,updateLayeredMaterialNodeElevation:()=>x.pN,updateLayeredMaterialNodeImagery:()=>x.XP});var n=r(99477),i=r(24472),a=r(99128),o=r(60145),s=r(67503),c=r(82150),l=r(16828),u=r(91742),h=r(48682),f=r(33347),d=r(49469),p=r(36873),m=r(52872),g=r(1857),A=r(13324),v=r(27313),y=new o.Z("EPSG:4326",0,0,0);const b={update:function(t,e,r){if(r.parent||!r.children.length){if(r.visible){if(void 0===r.layerUpdateState[e.id])r.layerUpdateState[e.id]=new m.Z;else if(!r.layerUpdateState[e.id].canTryUpdate()){var n;return void(null===(n=r.link[e.id])||void 0===n||n.forEach((function(t){t.layer.object3d.add(t),t.meshes.position.z=(0,v.c)(e.parent)?r.geoidHeight:0,t.meshes.updateMatrixWorld()})))}var i=r.getExtentsByProjection(e.source.crs)||[r.extent],a=i[0].zoom;if(a==e.zoom.min&&this.source.extentInsideLimit(r.extent,a)&&(!e.source.isFileSource||r.extent.isPointInside(e.source.extent.center(y)))){r.layerUpdateState[e.id].newTry();var o={layer:e,extentsSource:i,view:t.view,requester:r};return t.scheduler.execute(o).then((function(n){r.layerUpdateState[e.id].noMoreUpdatePossible(),n.forEach((function(n){n?(r.link[e.id]=r.link[e.id]||[],n.as(t.view.referenceCrs),n.meshes.position.z=(0,v.c)(e.parent)?r.geoidHeight:0,n.updateMatrixWorld(),e.onMeshCreated&&e.onMeshCreated(n,t),r.parent?(e.object3d.add(n),r.link[e.id].push(n)):g.Z.removeChildrenAndCleanupRecursively(e,n),n.layer=e):r.layerUpdateState[e.id].failure(1,!0)}))}),(function(n){return(0,A.Z)(n,r,e,r.level,t.view)}))}r.layerUpdateState[e.id].noMoreUpdatePossible()}}else g.Z.removeChildrenAndCleanupRecursively(e,r)}};var x=r(75963),w=r(97326),_=r(88301),E=r(79340),M=r(82963),S=r(61120),C=r(15671),T=r(43144);var I=function(){function t(e){(0,C.Z)(this,t),this.size=e,this.pps=null,this.polynom=null,this.l1l2=null}return(0,T.Z)(t,[{key:"setFromMicmacCalibration",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.pps=(new n.Vector2).fromArray(t.pps),this.polynom=(new n.Vector4).fromArray(t.poly357),this.l1l2=new n.Vector3,this.pps.y=e?this.size.y-this.pps.y:this.pps.y,this.polynom.w=Math.pow(t.limit,2),t.l1l2&&(this.l1l2.fromArray(t.l1l2),this.l1l2.z=t.etats)}},{key:"clone",value:function(){var e=new t(this.size.clone());return e.pps=this.pps.clone(),e.polynom=this.polynom.clone(),e.l1l2=this.l1l2.clone(),e}}]),t}(),R=new n.Vector3,B=function(t){(0,E.Z)(a,t);var e,r,i=(e=a,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function a(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1024,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.1,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1e4,l=arguments.length>5?arguments[5]:void 0,u=arguments.length>6?arguments[6]:void 0;return(0,C.Z)(this,a),e=e.isVector2?e:new n.Vector2(e,e),u=u||e.x/e.y,(t=i.call(this,void 0,u,s,c)).size=e,t.focal=r.isVector2?r:new n.Vector2(r,r),t.center=o||e.clone().multiplyScalar(.5),t.skew=l||0,t.textureMatrixWorldInverse=new n.Matrix4,Object.defineProperty((0,w.Z)(t),"fov",{get:function(){return 2*n.MathUtils.radToDeg(Math.atan2(t.size.y,2*t.focal.y))},set:function(e){var r=.5*t.size.y/Math.tan(n.MathUtils.degToRad(.5*e));t.focal.x=r,t.focal.y=r}}),t.distortion=new I(t.size),t.maskPath=void 0,t.mask=void 0,t.updateProjectionMatrix(),t}return(0,T.Z)(a,[{key:"updateProjectionMatrix",value:function(){if(this.focal){var t=this.near,e=t/this.focal.x,r=t/this.focal.y,n=-e*this.center.x,i=-r*this.center.y,a=n+e*this.size.x,o=i+r*this.size.y;this.projectionMatrix.makePerspective(n,a,o,i,t,this.far),this.projectionMatrix.elements[4]=2*this.skew/this.size.x;var s=this.size.x/this.size.y,c=this.aspect/s;R.set(this.zoom,this.zoom,1),c>1?R.x/=c:R.y*=c,this.projectionMatrix.scale(R)}}},{key:"copy",value:function(t,e){return(0,_.Z)((0,S.Z)(a.prototype),"copy",this).call(this,t,e),this.size=t.size.clone(),this.focal=t.focal.clone(),this.center=t.center.clone(),this.distortion=t.distortion.clone(),this.textureMatrixWorldInverse=t.textureMatrixWorldInverse.clone(),this.skew=t.skew,this.maskPath=t.maskPath,this.mask=t.mask,this}}]),a}(n.PerspectiveCamera);const k=B;var L=r(32204),P=r(11925);function D(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return U(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?U(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{};(0,C.Z)(this,i),(e=n.call(this)).view=t,e.options=r,e._camera3D=t.camera3D,e.moves=new Set,e.moveSpeed=10,e._onMouseDownMouseX=0,e._onMouseDownMouseY=0,e._isMouseDown=!1,t.domElement.addEventListener("mousedown",F.bind((0,w.Z)(e)),!1),t.domElement.addEventListener("touchstart",N.bind((0,w.Z)(e)),!1);var a=z.bind((0,w.Z)(e));return t.domElement.addEventListener("mousemove",a,!1),t.domElement.addEventListener("touchmove",a,!1),t.domElement.addEventListener("mouseup",G.bind((0,w.Z)(e)),!1),t.domElement.addEventListener("touchend",G.bind((0,w.Z)(e)),!1),t.domElement.addEventListener("wheel",Q.bind((0,w.Z)(e)),!1),t.domElement.addEventListener("keyup",Z.bind((0,w.Z)(e)),!0),t.domElement.addEventListener("keydown",V.bind((0,w.Z)(e)),!0),e.view.addFrameRequester(d.Ao.AFTER_CAMERA_UPDATE,e.update.bind((0,w.Z)(e))),r.focusOnMouseOver&&t.domElement.addEventListener("mouseover",(function(){return t.domElement.focus()})),r.focusOnClick&&t.domElement.addEventListener("click",(function(){return t.domElement.focus()})),e}return(0,T.Z)(i,[{key:"isUserInteracting",value:function(){return 0!==this.moves.size||this._isMouseDown}},{key:"update",value:function(t,e){e&&(t=16);var r,n=D(this.moves);try{for(n.s();!(r=n.n()).done;){var i=r.value;this._camera3D[i.method](i.sign*(i.noSpeed?1:this.moveSpeed)*t/1e3)}}catch(t){n.e(t)}finally{n.f()}if(this.moves.size>0||this._isMouseDown){this.view.notifyChange(this._camera3D);var a,o=D(this.moves);try{for(o.s();!(a=o.n()).done;){var s=a.value;s.oneshot&&this.moves.delete(s)}}catch(t){o.e(t)}finally{o.f()}}}}]),i}(n.EventDispatcher);function W(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{};if((0,C.Z)(this,a),(e=i.call(this)).isFirstPersonControls=!0,e.camera=t.camera3D,e.view=t,e.moves=new Set,r.panoramaRatio){var o=200*r.panoramaRatio/(2*Math.PI);r.verticalFOV=2==r.panoramaRatio?180:n.MathUtils.radToDeg(2*Math.atan(200/(2*o)))}return r.verticalFOV=r.verticalFOV||180,r.moveSpeed=void 0===r.moveSpeed?10:r.moveSpeed,e.options=r,e._isMouseDown=!1,e._onMouseDownMouseX=0,e._onMouseDownMouseY=0,e._state={rotateX:0,rotateY:0,snapshot:function(){return{rotateX:this.rotateX,rotateY:this.rotateY}}},e.reset(),e.eventListeners=r.disableEventListeners,r.disableEventListeners||(e._onMouseDown=e.onMouseDown.bind((0,w.Z)(e)),e._onMouseMove=e.onMouseMove.bind((0,w.Z)(e)),e._onMouseUp=e.onMouseUp.bind((0,w.Z)(e)),e._onMouseWheel=e.onMouseWheel.bind((0,w.Z)(e)),e._onKeyUp=e.onKeyUp.bind((0,w.Z)(e)),e._onKeyDown=e.onKeyDown.bind((0,w.Z)(e)),e._onContextMenu=e.onContextMenu.bind((0,w.Z)(e)),t.domElement.addEventListener("mousedown",e._onMouseDown,!1),t.domElement.addEventListener("touchstart",e._onMouseDown,!1),t.domElement.addEventListener("mousemove",e._onMouseMove,!1),t.domElement.addEventListener("touchmove",e._onMouseMove,!1),t.domElement.addEventListener("mouseup",e._onMouseUp,!1),t.domElement.addEventListener("touchend",e._onMouseUp,!1),t.domElement.addEventListener("wheel",e._onMouseWheel,!1),t.domElement.addEventListener("contextmenu",e._onContextMenu,!1),document.addEventListener("keydown",e._onKeyDown,!1),document.addEventListener("keyup",e._onKeyUp,!1)),e.view.addFrameRequester(d.Ao.AFTER_CAMERA_UPDATE,e.update.bind((0,w.Z)(e))),e._onFocus=function(){return t.domElement.focus()},e.focusOnMouseOver=r.focusOnMouseOver,r.focusOnMouseOver&&t.domElement.addEventListener("mouseover",e._onFocus),e.focusOnClick=r.focusOnClick,r.focusOnClick&&t.domElement.addEventListener("click",e._onFocus),"EPSG:4978"==t.referenceCrs?e.moveCameraVertical=et:e.moveCameraVertical=J,e}return(0,T.Z)(a,[{key:"isUserInteracting",value:function(){return 0!==this.moves.size&&!this._isMouseDown}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];$.setFromUnitVectors(X,this.camera.up),$.invert(),$.multiply(this.camera.quaternion),tt.setFromQuaternion($),t||(this._state.rotateX=tt.x),this._state.rotateY=tt.y}},{key:"update",value:function(t,e,r){if(0!=this.enabled){e&&(t=16);var n,i=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return W(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?W(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(this.moves);try{for(i.s();!(n=i.n()).done;){var a=n.value;"translateY"===a.method?this.moveCameraVertical(a.sign*this.options.moveSpeed*t/1e3):this.camera[a.method](a.sign*this.options.moveSpeed*t/1e3)}}catch(t){i.e(t)}finally{i.f()}!0!==this._isMouseDown&&!0!==r||q(this.view,this.camera,this._state),this.moves.size&&this.view.notifyChange(this.camera)}}},{key:"onMouseDown",value:function(t){if(0!=this.enabled){this._isMouseDown=!0;var e=this.view.eventToViewCoords(t);this._onMouseDownMouseX=e.x,this._onMouseDownMouseY=e.y,this._stateOnMouseDown=this._state.snapshot()}}},{key:"onMouseUp",value:function(){0!=this.enabled&&(this._isMouseDown=!1)}},{key:"onMouseMove",value:function(t){if(0!=this.enabled&&!0===this._isMouseDown){var e=n.MathUtils.degToRad(this.camera.fov)/this.view.mainLoop.gfxEngine.height,r=this.view.eventToViewCoords(t);this._state.rotateY=(r.x-this._onMouseDownMouseX)*e+this._stateOnMouseDown.rotateY,this._state.rotateX=H(this.camera,(r.y-this._onMouseDownMouseY)*e+this._stateOnMouseDown.rotateX,this.options.verticalFOV),q(this.view,this.camera,this._state)}}},{key:"onMouseWheel",value:function(t){if(0!=this.enabled){var e=t.deltaY;this.camera.fov=n.MathUtils.clamp(this.camera.fov+Math.sign(e),10,Math.min(100,this.options.verticalFOV)),this.camera.updateProjectionMatrix(),this._state.rotateX=H(this.camera,this._state.rotateX,this.options.verticalFOV),q(this.view,this.camera,this._state)}}},{key:"onKeyUp",value:function(t){if(0!=this.enabled){var e=Y[t.keyCode];e&&(this.moves.delete(e),this.view.notifyChange(void 0,!1),t.preventDefault())}}},{key:"onKeyDown",value:function(t){if(0!=this.enabled){var e=Y[t.keyCode];e&&(this.moves.add(e),this.view.notifyChange(void 0,!1),t.preventDefault())}}},{key:"onContextMenu",value:function(t){t.preventDefault()}},{key:"dispose",value:function(){this.eventListeners||(this.view.domElement.removeEventListener("mousedown",this._onMouseDown,!1),this.view.domElement.removeEventListener("touchstart",this._onMouseDown,!1),this.view.domElement.removeEventListener("mousemove",this._onMouseMove,!1),this.view.domElement.removeEventListener("touchmove",this._onMouseMove,!1),this.view.domElement.removeEventListener("mouseup",this._onMouseUp,!1),this.view.domElement.removeEventListener("touchend",this._onMouseUp,!1),this.view.domElement.removeEventListener("wheel",this._onMouseWheel,!1),this.view.domElement.removeEventListener("contextmenu",this._onContextMenu,!1),document.removeEventListener("keydown",this._onKeyDown,!1),document.removeEventListener("keyup",this._onKeyUp,!1)),this.focusOnMouseOver&&this.view.domElement.removeEventListener("mouseover",this._onFocus),this.focusOnClick&&this.view.domElement.removeEventListener("click",this._onFocus),this.dispatchEvent({type:"dispose"})}}]),a}(n.EventDispatcher);var nt=r(36194);var it=new n.MeshBasicMaterial({color:16777215,depthTest:!1,transparent:!0,opacity:.5});function at(t,e,r){t.position.copy(e),t.up.copy(e).normalize(),t.lookAt(r),t.updateMatrixWorld(!0)}var ot=new n.Vector3,st=new n.Vector3,ct=new n.Matrix3,lt=new n.Vector3,ut=new n.Quaternion;function ht(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){};e.getPickingPositionFromDepth(e.eventToViewCoords(t),ot);var o=e.camera3D.position.distanceTo(ot),s=r?e.pickObjectsAt(t,-1,r):[];s.length&&s[0].distance1&&void 0!==arguments[1]?arguments[1]:{};return(0,C.Z)(this,a),(r=i.call(this,t,l)).isStreetControls=!0,r._onMouseOut=(0,_.Z)((e=(0,w.Z)(r),(0,S.Z)(a.prototype)),"onMouseUp",e).bind((0,w.Z)(r)),t.domElement.addEventListener("mouseout",r._onMouseOut),r.previousPosition=void 0,r.currentPosition=void 0,r.nextPosition=void 0,r.keyGoToNextPosition=90,r.keyGoToPreviousPosition=83,r.keySetCameraToCurrentPositionAndLookAtNext=65,r.keySetCameraToCurrentPositionAndLookAtPrevious=81,r.tweenGroup=new nt.ZP.Group,r.surfaceGround=l.surfaceGround||(o=new n.CircleGeometry(1,32),new n.Mesh(o,it)),r.surfaceWall=l.surfaceWall||(s=new n.PlaneGeometry(4,2,1),(c=new n.Mesh(s,it)).rotateX(.5*-Math.PI),c),r.surfaces=new n.Object3D,r.surfaces.add(r.surfaceGround),r.surfaces.add(r.surfaceWall),r.view.scene.add(r.surfaces),r.wallMaxDistance=l.wallMaxDistance||1e3,r.animationDurationWall=l.animationDurationWall||200,r.buildingsLayer=l.buildingsLayer,r.computeTime=l.computeTime||ft,r.offset=l.offset||4,r.transformationPositionPickOnTheGround=l.transformationPositionPickOnTheGround||function(t){return t},r.end=r.camera.clone(),r}return(0,T.Z)(a,[{key:"setCurrentPosition",value:function(t){this.currentPosition=t}},{key:"setNextPosition",value:function(t){this.nextPosition=t}},{key:"setPreviousPosition",value:function(t){this.previousPosition=t}},{key:"onMouseUp",value:function(t){0!=this.enabled&&((0,_.Z)((0,S.Z)(a.prototype),"onMouseUp",this).call(this),this._stateOnMouseDrag?this._stateOnMouseDrag=!1:ht(t,this.view,this.buildingsLayer,this.onClickOnGround.bind(this),this.onClickOnWall.bind(this)))}},{key:"onMouseMove",value:function(t){var e=this;0!=this.enabled&&((0,_.Z)((0,S.Z)(a.prototype),"onMouseMove",this).call(this,t),this._isMouseDown?(this._stateOnMouseDrag=!0,this.stopAnimations()):this.tween||(ht(t,this.view,this.buildingsLayer,(function(t,r){at(e.surfaces,t,r),e.surfaceGround.visible=!0,e.surfaceWall.visible=!1}),(function(t,r){at(e.surfaces,t,r),e.surfaceWall.visible=!0,e.surfaceGround.visible=!1})),this.view.notifyChange(this.surfaces)))}},{key:"setCameraToCurrentPosition",value:function(t){t?this.setCameraOnPosition(this.currentPosition,this.previousPosition):this.setCameraOnPosition(this.currentPosition,this.nextPosition)}},{key:"setCameraOnPosition",value:function(t,e){t&&e&&(this.camera.position.copy(t),this.view.tileLayer&&this.view.tileLayer.isGlobeLayer?this.camera.up.copy(t).normalize():this.camera.up.set(0,0,1),this.camera.lookAt(e),this.camera.updateMatrixWorld(),this.reset())}},{key:"onClickOnGround",value:function(t){t=this.transformationPositionPickOnTheGround(t),this.view.tileLayer&&this.view.tileLayer.isGlobeLayer?lt.copy(t).normalize():lt.set(0,0,1),t.add(lt.multiplyScalar(this.offset));var e=this.camera.position.distanceTo(t),r=this.computeTime(e);this.moveCameraTo(t,r)}},{key:"onClickOnWall",value:function(t){this.camera.position.distanceTo(t)1&&void 0!==arguments[1]?arguments[1]:50;if(!t)return Promise.resolve();var i=new Promise((function(t){e=t}));return this.stopAnimations(),this.tween=new nt.ZP.Tween(this.camera.position,this.tweenGroup).to(t.clone(),n).easing(nt.ZP.Easing.Quadratic.Out).onComplete((function(){r.stopAnimations(),e()})).start(),this.animationFrameRequester=function(){r.tweenGroup.update(),r.view.notifyChange(r.camera)},this.view.addFrameRequester(d.Ao.BEFORE_RENDER,this.animationFrameRequester),this.view.notifyChange(this.camera),i}},{key:"stopAnimations",value:function(){this.tween&&(this.tween.stop(),this.tween=void 0),this.animationFrameRequester&&(this.view.removeFrameRequester(d.Ao.BEFORE_RENDER,this.animationFrameRequester),this.animationFrameRequester=null)}},{key:"moveCameraToCurrentPosition",value:function(){this.moveCameraTo(this.currentPosition)}},{key:"onKeyDown",value:function(t){0!=this.enabled&&((0,_.Z)((0,S.Z)(a.prototype),"onKeyDown",this).call(this,t),t.keyCode==this.keyGoToNextPosition&&this.moveCameraTo(this.nextPosition),t.keyCode==this.keyGoToPreviousPosition&&this.moveCameraTo(this.previousPosition),t.keyCode==this.keySetCameraToCurrentPositionAndLookAtNext&&(this.setCameraToCurrentPosition(),this.view.notifyChange(this.view.camera3D)),t.keyCode==this.keySetCameraToCurrentPositionAndLookAtPrevious&&(this.setCameraToCurrentPosition(!0),this.view.notifyChange(this.view.camera3D)))}},{key:"dispose",value:function(){this.view.domElement.removeEventListener("mouseout",this._onMouseOut,!1),(0,_.Z)((0,S.Z)(a.prototype),"dispose",this).call(this)}}]),a}(rt);const pt=dt;var mt=r(44450),gt=r(42982),At=r(86033),vt=r(13092),yt=r(9187),bt=r.n(yt),xt=r(94596),wt=r(52521),_t=r(86896),Et=n.MathUtils.DEG2RAD,Mt=new n.Matrix4,St=new n.Vector3,Ct=new n.Vector3,Tt=(new n.Vector3).set(0,0,1),It=new o.Z("EPSG:4326",0,0,0),Rt=new n.Euler,Bt=new n.Quaternion;function kt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;return t?e.set(0,0,0,1):kt}const Lt={quaternionFromRollPitchHeading:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=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]:new n.Quaternion;return t*=Et,e*=Et,r*=Et,i.setFromEuler(Rt.set(-e,-t,-r,"YXZ"))},quaternionFromOmegaPhiKappa:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=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]:new n.Quaternion;return t*=Et,e*=Et,r*=Et,i.setFromEuler(Rt.set(t,e,r,"XYZ")),i.set(i.w,i.z,-i.y,-i.x),i},quaternionFromAttitude:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;return void 0!==t.roll||void 0!==t.pitch||void 0!==t.heading?this.quaternionFromRollPitchHeading(t.roll,t.pitch,t.heading,e):void 0!==t.omega||void 0!==t.phi||void 0!==t.kappa?this.quaternionFromOmegaPhiKappa(t.omega,t.phi,t.kappa,e):e.set(0,0,0,1)},quaternionFromEnuToGeocent:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;return t?this.quaternionFromEnuToGeocent()(t,e):function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion,r=t.geodesicNormal;return 0==r.x&&0==r.y?e.set(0,0,0,1):(Ct.set(-r.y,r.x,0).normalize(),St.crossVectors(r,Ct),Mt.makeBasis(Ct,St,r),e.setFromRotationMatrix(Mt))}},quaternionFromGeocentToEnu:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;if(t)return this.quaternionFromGeocentToEnu()(t,e);var r=this.quaternionFromEnuToGeocent();return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;return r(t,e).conjugate()}},quaternionFromLCCToEnu:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.Quaternion;if(e)return this.quaternionFromLCCToEnu(t)(e,r);var i=Math.sin(t.lat0);return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion,a=e.as(It.crs,It).longitude*Et;return r.setFromAxisAngle(Tt,i*(t.long0-a))}},quaternionFromEnuToLCC:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.Quaternion;if(e)return this.quaternionFromEnuToLCC(t)(e,r);var i=this.quaternionFromLCCToEnu(t);return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;return i(t,e).conjugate()}},quaternionFromTMercToEnu:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.Quaternion;if(e)return this.quaternionFromTMercToEnu(t)(e,r);var i=t.a*t.a,a=t.b*t.b,o=t.e*t.e,s=t.e?o/(1-o):i/a-1;return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;e.as(It.crs,It);var i=It.longitude*Et,a=It.latitude*Et,o=t.long0-i,c=Math.cos(a),l=Math.sin(a),u=c*c,h=o*o*u,f=s*u;return r.setFromAxisAngle(Tt,o*l*(1+h/3*(1+3*f+2*f*f)+h*h*(2-l/c)/15))}},quaternionFromEnuToTMerc:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.Quaternion;if(e)return this.quaternionFromEnuToTMerc(t)(e,r);var i=this.quaternionFromTMercToEnu(t);return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;return i(t,e).conjugate()}},quaternionFromLongLatToEnu:function(t){return kt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion)},quaternionFromEnuToLongLat:function(t){return kt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion)},quaternionUnimplemented:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.Quaternion;return console.warn("This quaternion function is not implemented for projections of type",t.projName),kt(e,r)},quaternionFromEnuToCRS:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.Quaternion;if(e)return this.quaternionFromEnuToCRS(t)(e,r);var a=t.projName?t:i.default.defs(t);switch(a.projName){case"geocent":return this.quaternionFromEnuToGeocent();case"lcc":return this.quaternionFromEnuToLCC(a);case"tmerc":return this.quaternionFromEnuToTMerc(a);case"longlat":return this.quaternionFromEnuToLongLat();default:return this.quaternionUnimplemented(a)}},quaternionFromCRSToEnu:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.Quaternion;if(e)return this.quaternionFromCRSToEnu(t)(e,r);var a=t.projName?t:i.default.defs(t);switch(a.projName){case"geocent":return this.quaternionFromGeocentToEnu();case"lcc":return this.quaternionFromLCCToEnu(a);case"tmerc":return this.quaternionFromTMercToEnu(a);case"longlat":return this.quaternionFromLongLatToEnu();default:return this.quaternionUnimplemented(a)}},quaternionFromCRSToCRS:function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new n.Quaternion;if(r)return this.quaternionFromCRSToCRS(t,e)(r,i);if(t==e)return function(){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion).set(0,0,0,1)};var a=this.quaternionFromCRSToEnu(t),o=this.quaternionFromEnuToCRS(e);return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.Quaternion;return o(t,e).multiply(a(t,Bt))}}};var Pt=r(48891);function Dt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Ut(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ut(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&console.warn("Too many differents point.radius, only the first one will be used"),new n.Points(w,e.pointMaterial)}function le(t,e,r){for(var i=new n.InstancedMesh(t.geometry,t.material,e),a=0,o=0;o<3*e;o+=3){var s=new n.Matrix4;s.setPosition(r[o],r[o+1],r[o+2]),i.setMatrixAt(a,s),a++}return i.instanceMatrix.needsUpdate=!0,i}function ue(t,e){var r,i;if(t.vertices){var a;switch(t.type){case xt.tg.POINT:if(null!==(r=Ft.point)&&void 0!==r&&null!==(i=r.model)&&void 0!==i&&i.object)try{(a=function(t){var e,r,i=t.vertices,a=t.geometries.length,o=Ft.point.model.object;if(o instanceof n.Mesh)return le(o,a,i);if(o instanceof n.Object3D){var s=new n.Group;return(e=o,r=[],e.updateMatrixWorld(),e.traverse((function(t){t instanceof n.Mesh&&(t.updateMatrixWorld(),t.geometry.applyMatrix4(t.matrixWorld),r.push(t))})),r).forEach((function(t){return s.add(le(t,a,i))})),s}throw new Error("The format of the model object provided in the style (layer.style.point.model.object) is not supported. Only THREE.Mesh or THREE.Object3D are supported.")}(t)).isInstancedMesh=!0}catch(r){a=ce(t,e)}else a=ce(t,e);break;case xt.tg.LINE:a=function(t,e){var r=t.vertices,i=new Uint8Array(r.length),a=r.length/3,o=new Uint32Array(a),s=e.batchId||function(t,e){return e},c=0,l=new Float32Array(r.length),u=new n.BufferGeometry;u.setAttribute("position",new n.BufferAttribute(l,3));var h=[];zt.setFeature(t);var f=oe(2*(a-t.geometries.length),a),d=0;Ht.setFromMatrixScale(zt.collection.matrixWorldInverse),Qt.set(0,0,1).multiply(Ht);var p,m=Dt(t.geometries);try{for(m.s();!(p=m.n()).done;){var g=p.value;zt.setGeometry(g);var A=s(g.properties,c),v=g.indices[0].offset;if(v>65535){console.warn("Feature to Line: integer overflow, too many points in lines");break}for(var y=v+g.indices[0].count,b=3*v,x=v;x1&&console.warn("Too many differents stroke.width, only the first one will be used"),u.setAttribute("color",new n.BufferAttribute(i,3,!0)),u.setAttribute("batchId",new n.BufferAttribute(o,1)),u.setIndex(new n.BufferAttribute(f,1)),new n.LineSegments(u,e.lineMaterial)}(t,e);break;case xt.tg.POLYGON:a=Ft.fill&&Object.keys(Ft.fill).includes("extrusion_height")?function(t,e){var r=t.vertices,i=new Float32Array(2*r.length),a=r.length/3,o=new Uint8Array(2*r.length),s=[],c=new Uint32Array(i.length/3),l=e.batchId||function(t,e){return e},u=0;zt.setFeature(t),Ht.setFromMatrixScale(zt.collection.matrixWorldInverse),Qt.set(0,0,1).multiply(Ht),Nt.setCrs(zt.collection.crs);var h,f=Dt(t.geometries);try{var d=function(){var e,n=h.value;zt.setGeometry(n);for(var f=n.indices[0].offset,d=n.indices.slice(-1)[0],p=d.offset+d.count,m=p-f,g=null!==(e=n.indices[0].ccw)&&void 0!==e?e:function(t,e,r){for(var n=(e*=3)+3*r,i=0,a=n-3,o=e;oKt)return console.warn("Feature to Polygon: integer overflow, too many points in polygons"),"break";zt.setGeometry(e);for(var u=e.indices.slice(-1)[0],h=u.offset+u.count,f=3*n,d=f+3*(h-n),p=s(e.properties,l),m=f,g=n;m0&&void 0!==arguments[0]?arguments[0]:{};return(0,_t.ie)(t),function(e){var r=this;if(e){t.pointMaterial||(t.pointMaterial=(0,wt.Z)(new n.PointsMaterial,this),t.lineMaterial=(0,wt.Z)(new n.LineBasicMaterial,this),t.polygonMaterial=(0,wt.Z)(new n.MeshBasicMaterial,this)),Ft=(null==this?void 0:this.style)||(t.style?new Pt.ZP(t.style):Gt),zt.setCollection(e);var i=e.features;if(i&&0!=i.length){var a=i.map((function(e){var n=ue(e,t);return n.layer=r,n}));return new ie(a,e)}}}}};var fe=r(39683),de=r(79295),pe=r(4596),me={color_layers_pars_fragment:"struct Layer {\n int textureOffset;\n int crs;\n int effect_type;\n float effect_parameter;\n float opacity;\n bool transparent;\n};\n\n#include \n\nuniform sampler2D colorTextures[NUM_FS_TEXTURES];\nuniform vec4 colorOffsetScales[NUM_FS_TEXTURES];\nuniform Layer colorLayers[NUM_FS_TEXTURES];\nuniform int colorTextureCount;\n\nvec3 uvs[NUM_CRS];\n\nfloat getBorderDistance(vec2 uv) {\n vec2 p2 = min(uv, 1. -uv);\n return min(p2.x, p2.y);\n}\n\nfloat tolerance = 0.99;\n\nvec4 applyWhiteToInvisibleEffect(vec4 color) {\n float a = dot(color.rgb, vec3(0.333333333));\n if (a >= tolerance) {\n color.a = 0.0;\n }\n return color;\n}\n\nvec4 applyLightColorToInvisibleEffect(vec4 color, float intensity) {\n float a = max(0.05,1. - length(color.xyz - 1.));\n color.a *= 1.0 - pow(abs(a), intensity);\n color.rgb *= color.rgb * color.rgb;\n return color;\n}\n\n#if defined(DEBUG)\nuniform bool showOutline;\nuniform vec3 outlineColors[NUM_CRS];\nuniform float outlineWidth;\n\nvec4 getOutlineColor(vec3 outlineColor, vec2 uv) {\n float alpha = 1. - clamp(getBorderDistance(uv) / outlineWidth, 0., 1.);\n return vec4(outlineColor, alpha);\n}\n#endif\n\nuniform float minBorderDistance;\nvec4 getLayerColor(int textureOffset, sampler2D tex, vec4 offsetScale, Layer layer) {\n if ( textureOffset >= colorTextureCount ) return vec4(0);\n\n vec3 uv;\n // #pragma unroll_loop\n for ( int i = 0; i < NUM_CRS; i ++ ) {\n if ( i == layer.crs ) uv = uvs[ i ];\n }\n\n float borderDistance = getBorderDistance(uv.xy);\n if (textureOffset != layer.textureOffset + int(uv.z) || borderDistance < minBorderDistance ) return vec4(0);\n vec4 color = texture2D(tex, pitUV(uv.xy, offsetScale));\n if (layer.effect_type == 3) {\n #include \n } else {\n if (layer.transparent && color.a != 0.0) {\n color.rgb /= color.a;\n }\n\n if (layer.effect_type == 1) {\n color = applyLightColorToInvisibleEffect(color, layer.effect_parameter);\n } else if (layer.effect_type == 2) {\n color = applyWhiteToInvisibleEffect(color);\n }\n }\n color.a *= layer.opacity;\n return color;\n}\n",custom_body_colorLayer:"// no custom body",custom_header_colorLayer:"// no custom header",elevation_pars_vertex:"#if NUM_VS_TEXTURES > 0\n struct Layer {\n float scale;\n float bias;\n int mode;\n float zmin;\n float zmax;\n };\n\n uniform Layer elevationLayers[NUM_VS_TEXTURES];\n uniform sampler2D elevationTextures[NUM_VS_TEXTURES];\n uniform vec4 elevationOffsetScales[NUM_VS_TEXTURES];\n uniform int elevationTextureCount;\n uniform float geoidHeight;\n\n highp float decode32(highp vec4 rgba) {\n highp float Sign = 1.0 - step(128.0,rgba[0])*2.0;\n highp float Exponent = 2.0 * mod(rgba[0],128.0) + step(128.0,rgba[1]) - 127.0;\n highp float Mantissa = mod(rgba[1],128.0)*65536.0 + rgba[2]*256.0 +rgba[3] + float(0x800000);\n highp float Result = Sign * exp2(Exponent) * (Mantissa * exp2(-23.0 ));\n return Result;\n }\n\n float getElevationMode(vec2 uv, sampler2D tex, int mode) {\n if (mode == ELEVATION_RGBA)\n return decode32(texture2D( tex, uv ).abgr * 255.0);\n if (mode == ELEVATION_DATA || mode == ELEVATION_COLOR)\n #if defined(WEBGL2)\n return texture2D( tex, uv ).r;\n #else\n return texture2D( tex, uv ).w;\n #endif\n return 0.;\n }\n\n float getElevation(vec2 uv, sampler2D tex, vec4 offsetScale, Layer layer) {\n uv = uv * offsetScale.zw + offsetScale.xy;\n float d = clamp(getElevationMode(uv, tex, layer.mode), layer.zmin, layer.zmax);\n return d * layer.scale + layer.bias;\n }\n#endif\n",elevation_vertex:"#if NUM_VS_TEXTURES > 0\n if(elevationTextureCount > 0) {\n float elevation = getElevation(uv, elevationTextures[0], elevationOffsetScales[0], elevationLayers[0]);\n transformed += elevation * normal;\n }\n#endif\n",geoid_vertex:"transformed += geoidHeight * normal;\n",fog_fragment:"#if defined(USE_FOG)\n float fogFactor = 1. - min( exp(-vFogDepth / fogDistance), 1.);\n gl_FragColor.rgb = mix(gl_FragColor.rgb, fogColor, fogFactor);\n#endif\n",fog_pars_fragment:"#if defined(USE_FOG)\nuniform vec3 fogColor;\nuniform float fogDistance;\nvarying float vFogDepth;\n#endif\n",lighting_fragment:"if (lightingEnabled) {\n float light = min(2. * dot(vNormal, lightPosition), 1.);\n gl_FragColor.rgb *= light;\n}\n",lighting_pars_fragment:"uniform bool lightingEnabled;\nuniform vec3 lightPosition;\nvarying vec3 vNormal;\n",mode_depth_fragment:"#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\ngl_FragColor = packDepthToRGBA(gl_FragDepthEXT);\n#else\nfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\ngl_FragColor = packDepthToRGBA(fragCoordZ);\n#endif",mode_id_fragment:"// 16777216.0 == 256.0 * 256.0 * 256.0\ngl_FragColor = packDepthToRGBA(float(objectId) / 16777216.0);\n",mode_pars_fragment:"#if MODE == MODE_ID || MODE == MODE_DEPTH\n#include \n#endif\n\n#if MODE == MODE_ID\nuniform int objectId;\n#endif\n",overlay_fragment:"gl_FragColor.rgb = mix(gl_FragColor.rgb, overlayColor, overlayAlpha);\n",overlay_pars_fragment:"uniform vec3 overlayColor;\nuniform float overlayAlpha;\n",pitUV:"vec2 pitUV(vec2 uv, vec4 pit)\n{\n return uv * pit.zw + vec2(pit.x, 1.0 - pit.w - pit.y);\n}\n\n",precision_qualifier:"precision highp float;\nprecision highp int;\n",projective_texturing_vertex:"for(int i = 0; i < ORIENTED_IMAGES_COUNT; ++i)\n projectiveTextureCoords[i] = projectiveTextureMatrix[i] * mvPosition;\n",projective_texturing_pars_vertex:"uniform mat4 projectiveTextureMatrix[ORIENTED_IMAGES_COUNT];\nvarying vec4 projectiveTextureCoords[ORIENTED_IMAGES_COUNT];\n",projective_texturing_pars_fragment:"uniform sampler2D projectiveTexture[ORIENTED_IMAGES_COUNT];\nuniform sampler2D mask[ORIENTED_IMAGES_COUNT];\nvarying vec4 projectiveTextureCoords[ORIENTED_IMAGES_COUNT];\nuniform float projectiveTextureAlphaBorder;\nuniform float opacity;\nuniform bool boostLight;\n\nstruct Distortion {\n vec2 size;\n#if USE_DISTORTION\n vec2 pps;\n vec4 polynom;\n vec3 l1l2;\n#endif\n};\n\nuniform Distortion projectiveTextureDistortion[ORIENTED_IMAGES_COUNT];\n\nfloat getAlphaBorder(vec2 p)\n{\n vec2 d = clamp(projectiveTextureAlphaBorder * min(p, 1. - p), 0., 1.);\n return min(d.x, d.y);\n}\n\n#if USE_DISTORTION\nvoid distort(inout vec2 p, vec4 polynom, vec2 pps)\n{\n vec2 v = p - pps;\n float v2 = dot(v, v);\n if (v2 > polynom.w) {\n p = vec2(-1.);\n }\n else {\n p += (v2 * (polynom.x + v2 * (polynom.y + v2 * polynom.z) ) ) * v;\n }\n}\n\nvoid distort(inout vec2 p, vec4 polynom, vec3 l1l2, vec2 pps)\n{\n if ((l1l2.x == 0.) && (l1l2.y == 0.)) {\n distort(p, polynom, pps);\n } else {\n vec2 AB = (p - pps) / l1l2.z;\n float R = length(AB);\n float lambda = atan(R) / R;\n vec2 ab = lambda * AB;\n float rho2 = dot(ab, ab);\n float r357 = 1. + rho2* (polynom.x + rho2* (polynom.y + rho2 * polynom.z));\n p = pps + l1l2.z * (r357 * ab + vec2(dot(l1l2.xy, ab), l1l2.y * ab.x));\n }\n}\n#endif\n\nvec4 mixBaseColor(vec4 aColor, vec4 baseColor) {\n #ifdef USE_BASE_MATERIAL\n baseColor.rgb = aColor.a == 1.0 ? aColor.rgb : mix(baseColor, aColor, aColor.a).rgb;\n baseColor.a = min(1.0, aColor.a + baseColor.a);\n #else\n baseColor.rgb += aColor.rgb * aColor.a;\n baseColor.a += aColor.a;\n #endif\n return baseColor;\n}\n\nvec4 projectiveTextureColor(vec4 coords, Distortion distortion, sampler2D tex, sampler2D mask, vec4 baseColor) {\n vec3 p = coords.xyz / coords.w;\n if(p.z * p.z < 1.) {\n#if USE_DISTORTION\n p.xy *= distortion.size;\n distort(p.xy, distortion.polynom, distortion.l1l2, distortion.pps);\n p.xy /= distortion.size;\n#endif\n\n float d = getAlphaBorder(p.xy) * texture2D(mask, p.xy).r;\n\n if(d > 0.) {\n\n#if DEBUG_ALPHA_BORDER\n vec3 r = texture2D(tex, p.xy).rgb;\n return mixBaseColor(vec4( r.r * d, r.g, r.b, 1.0), baseColor);\n#else\n vec4 color = texture2D(tex, p.xy);\n color.a *= d;\n if (boostLight) {\n return mixBaseColor(vec4(sqrt(color.rgb), color.a), baseColor);\n } else {\n return mixBaseColor(color, baseColor);\n }\n#endif\n\n }\n }\n return mixBaseColor(vec4(0.), baseColor);\n}\n",project_pars_vertex:"attribute vec3 position;\nuniform mat4 projectionMatrix;\nuniform mat4 modelViewMatrix;\n",WebGL2_pars_vertex:"// Copy from GLSL 3.0 conversion for built-in materials and ShaderMaterial in THREE.WebGLProgram\n// https://github.com/mrdoob/three.js/blob/696d7836d1fc56c4702a475e6991c4adef7357f4/src/renderers/webgl/WebGLProgram.js#L682\n#if defined(WEBGL2)\n#define attribute in\n#define varying out\n#define texture2D texture\n#endif\n",WebGL2_pars_fragment:"// Copy from GLSL 3.0 conversion for built-in materials and ShaderMaterial in THREE.WebGLProgram\n// https://github.com/mrdoob/three.js/blob/696d7836d1fc56c4702a475e6991c4adef7357f4/src/renderers/webgl/WebGLProgram.js#L682\n#if defined(WEBGL2)\n#define varying in\nout highp vec4 pc_fragColor;\n#define gl_FragColor pc_fragColor\n#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n#define texture2DLodEXT textureLod\n#define texture2DProjLodEXT textureProjLod\n#define textureCubeLodEXT textureLod\n#define texture2DGradEXT textureGrad\n#define texture2DProjGradEXT textureProjGrad\n#define textureCubeGradEXT textureGrad\n#endif\n"},ge=function(){function t(e,r){(0,C.Z)(this,t),this.path=r,this.target=e,this.install()}return(0,T.Z)(t,[{key:"customHeaderColorLayer",value:function(t){me.custom_header_colorLayer=t,this.target["".concat(this.path,"custom_header_colorLayer")]=t}},{key:"customBodyColorLayer",value:function(t){me.custom_body_colorLayer=t,this.target["".concat(this.path,"custom_body_colorLayer")]=t}},{key:"install",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.target,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:me,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.path;return Object.keys(r).forEach((function(i){Object.defineProperty(t,i,{get:function(){return r[i]}}),e[n+i]=r[i]})),e}}]),t}();const Ae=new ge(n.ShaderChunk,"itowns/");var ve=r(27240),ye=r(47052),be=r(800),xe=r(57918),we=r(66165);function _e(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Ee(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ee(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Ee(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:[{offset:0,count:1}],n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0;if(0!==e.length){var c,l=new Path2D,u=_e(r);try{for(u.s();!(c=u.n()).done;){var h=c.value;if(h.extent&&a.ZP.intersectsExtent(h.extent,i)){var f=h.offset*n,d=f+h.count*n;l.moveTo(e[f],e[f+1]);for(var p=f+n;pt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(this.parent.level0Nodes);try{for(r.s();!(e=r.n()).done;)e.value.traverse((0,x.U8)(this.id))}catch(t){r.e(t)}finally{r.f()}}}]),i}(we.Z);const We=je;var He=r(79736);var Xe=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e,r,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,C.Z)(this,i),(0,_t.S_)(o),(a=n.call(this,t,o)).isColorLayer=!0,a.defineLayerProperty("visible",!0),a.defineLayerProperty("opacity",1),a.defineLayerProperty("sequence",0),a.transparent=o.transparent||a.opacity<1,a.noTextureParentOutsideLimit=!!o.source&&o.source.isFileSource,a.effect_type=null!==(e=o.effect_type)&&void 0!==e?e:0,a.effect_parameter=null!==(r=o.effect_parameter)&&void 0!==r?r:1,a.buildExtent=!0,a.structure="2d",a}return(0,T.Z)(i,[{key:"setupRasterNode",value:function(t){var e=new He.AN(t.material,this);return t.material.addLayer(e),t.material.setSequence(this.parent.colorLayersOrder),e}},{key:"update",value:function(t,e,r,n){return(0,x.XP)(t,this,r,n)}}]),i}(We);const qe=Xe;var Ye=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e,r,a,o,s,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,C.Z)(this,i),s=n.call(this,t,c),(c.zmin||c.zmax)&&console.warn("Config using zmin and zmax are deprecated, use {clampValues: {min, max}} structure."),s.zmin=null!==(e=null===(r=c.clampValues)||void 0===r?void 0:r.min)&&void 0!==e?e:c.zmin,s.zmax=null!==(a=null===(o=c.clampValues)||void 0===o?void 0:o.max)&&void 0!==a?a:c.zmax,s.isElevationLayer=!0,s.defineLayerProperty("scale",s.scale||1),s}return(0,T.Z)(i,[{key:"setupRasterNode",value:function(t){var e=this,r=new He.NO(t.material,this);t.material.addLayer(r),t.material.setSequenceElevation(this.id);var n=function(){return t.setBBoxZ({min:r.min,max:r.max,scale:e.scale})};return n(),r.addEventListener("rasterElevationLevelChanged",n),this.addEventListener("scale-property-changed",n),t.addEventListener("dispose",(function(){e.removeEventListener("scale-property-changed",n)})),r}},{key:"update",value:function(t,e,r,n){return(0,x.pN)(t,this,r,n)}}]),i}(We);const Je=Ye;var Ke=r(20193);const $e=function(t){(0,E.Z)(a,t);var e,r,i=(e=a,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function a(t){var e,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,C.Z)(this,a),o.update=b.update,o.convert=he.convert({batchId:o.batchId}),(r=i.call(this,t,o.object3d||new n.Group,o)).isFeatureGeometryLayer=!0,r.accurate=null===(e=o.accurate)||void 0===e||e,r.buildExtent=!r.accurate,r}return(0,T.Z)(a,[{key:"preUpdate",value:function(t,e){e.has(this.parent)&&this.object3d.clear()}}]),a}(Ke.Z);var tr=r(73773);function er(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return rr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function rr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{};return(0,C.Z)(this,a),(e=i.call(this,t,new n.Group,r)).isPointCloudLayer=!0,e.protocol="pointcloud",e.group=r.group||new n.Group,e.object3d.add(e.group),e.bboxes=r.bboxes||new n.Group,e.bboxes.visible=!1,e.object3d.add(e.bboxes),e.group.updateMatrixWorld(),e.octreeDepthLimit=r.octreeDepthLimit||-1,e.pointBudget=r.pointBudget||2e6,e.pointSize=0!==r.pointSize&&isNaN(r.pointSize)?4:r.pointSize,e.sseThreshold=r.sseThreshold||2,e.defineLayerProperty("minIntensityRange",r.minIntensityRange||0,cr),e.defineLayerProperty("maxIntensityRange",r.maxIntensityRange||1,cr),e.material=r.material||{},e.material.isMaterial||(r.material=r.material||{},r.material.intensityRange=new n.Vector2(e.minIntensityRange,e.maxIntensityRange),e.material=new L.ZP(r.material)),e.material.defines=e.material.defines||{},e.mode=r.mode||L.vj.COLOR,e}return(0,T.Z)(a,[{key:"preUpdate",value:function(t,e){var r;t.camera.preSSE=t.camera.height/(2*Math.tan(.5*n.MathUtils.degToRad(t.camera.camera3D.fov))),this.material&&(this.material.visible=this.visible,this.material.opacity=this.opacity,this.material.transparent=this.opacity<1,this.material.size=this.pointSize,this.material.scale=t.camera.preSSE,this.material.updateUniforms&&this.material.updateUniforms());var i,a=er(e.values());try{for(a.s();!(i=a.n()).done;){var o=i.value;if(o.isCamera||o==this)return[this.root];if(void 0!==o.obj&&o.obj.isPoints&&o.obj.layer==this)if(r){if(!(r=o.findCommonAncestor(r)))return[this.root]}else r=o}}catch(t){a.e(t)}finally{a.f()}return r?[r]:[this.root]}},{key:"update",value:function(t,e,r){var n=this;if(r.visible=!1,this.octreeDepthLimit>=0&&this.octreeDepthLimit=1)return r.children;var c,l=er(r.children);try{for(l.s();!(c=l.n()).done;)sr(c.value)}catch(t){l.e(t)}finally{l.f()}}}else sr(r)}}},{key:"postUpdate",value:function(){this.displayedCount=0;var t,e=er(this.group.children);try{for(e.s();!(t=e.n()).done;){var r=t.value;if(r.visible){var n=r.geometry.attributes.position.count;r.geometry.setDrawRange(0,n),this.displayedCount+=n}}}catch(t){e.e(t)}finally{e.f()}if(this.displayedCount>this.pointBudget)if(this.supportsProgressiveDisplay){var i,a=this.pointBudget/this.displayedCount,o=er(this.group.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s.visible){var c=Math.floor(s.geometry.drawRange.count*a);c>0?s.geometry.setDrawRange(0,c):s.visible=!1}}}catch(t){o.e(t)}finally{o.f()}this.displayedCount*=a}else{this.group.children.sort((function(t,e){return e.userData.node.sse-t.userData.node.sse}));var l=!1;this.displayedCount=0;var u,h=er(this.group.children);try{for(h.s();!(u=h.n()).done;){var f=u.value,d=f.geometry.attributes.position.count;l||this.displayedCount+d>this.pointBudget?(f.visible=!1,l=!0):this.displayedCount+=d}}catch(t){h.e(t)}finally{h.f()}}for(var p=Date.now(),m=this.group.children.length-1;m>=0;m--){var g=this.group.children[m];!g.visible&&p-g.userData.node.notVisibleSince>1e4&&(this.group.children.splice(m,1),g.geometry.dispose(),g.material=null,g.geometry=null,g.userData.node.obj=null)}}},{key:"pickObjectsAt",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return tr.Z.pickPointsAt(t,e,r,this,n)}},{key:"getObjectToUpdateForAttachedLayers",value:function(t){if(t.obj){var e=t.parent;return e&&e.obj?{element:t.obj,parent:e.obj}:{element:t.obj}}}}]),a}(Ke.Z);const ur=lr;const hr=function(t){(0,E.Z)(a,t);var e,r,i=(e=a,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function a(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0;return(0,C.Z)(this,a),(t=i.call(this)).numPoints=e,t.layer=r,t.children=[],t.bbox=new n.Box3,t.sse=-1,t}return(0,T.Z)(a,[{key:"add",value:function(t,e){this.children.push(t),t.parent=this,this.createChildAABB(t,e)}},{key:"load",value:function(){var t=this;return this.octreeIsLoaded||this.loadOctree(),this.layer.source.fetcher(this.url,this.layer.source.networkOptions).then((function(e){return t.layer.source.parse(e,{out:t.layer,in:t.layer.source})}))}},{key:"findCommonAncestor",value:function(t){return t.depth!=this.depth?t.depth0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2?arguments[2]:void 0;return(0,C.Z)(this,i),(t=n.call(this,e,a)).childrenBitField=r,t.id="",t.depth=0,t.baseurl=a.source.baseurl,t}return(0,T.Z)(i,[{key:"add",value:function(t,e,r){(0,_.Z)((0,S.Z)(i.prototype),"add",this).call(this,t,e),t.id=this.id+e,t.depth=t.id.length,t.id.length%this.layer.hierarchyStepSize==0?t.baseurl="".concat(r.baseurl,"/").concat(t.id.substr(r.id.length)):t.baseurl=r.baseurl}},{key:"createChildAABB",value:function(t,e){t.bbox.copy(this.bbox),this.bbox.getCenter(t.bbox.max),fr.copy(t.bbox.max).sub(this.bbox.min),1===e?(t.bbox.min.z+=fr.z,t.bbox.max.z+=fr.z):3===e?(t.bbox.min.z+=fr.z,t.bbox.max.z+=fr.z,t.bbox.min.y+=fr.y,t.bbox.max.y+=fr.y):0===e||(2===e?(t.bbox.min.y+=fr.y,t.bbox.max.y+=fr.y):5===e?(t.bbox.min.z+=fr.z,t.bbox.max.z+=fr.z,t.bbox.min.x+=fr.x,t.bbox.max.x+=fr.x):7===e?(t.bbox.min.add(fr),t.bbox.max.add(fr)):4===e?(t.bbox.min.x+=fr.x,t.bbox.max.x+=fr.x):6===e&&(t.bbox.min.y+=fr.y,t.bbox.max.y+=fr.y,t.bbox.min.x+=fr.x,t.bbox.max.x+=fr.x))}},{key:"octreeIsLoaded",get:function(){return!(this.childrenBitField&&0===this.children.length)}},{key:"url",get:function(){return"".concat(this.baseurl,"/r").concat(this.id,".").concat(this.layer.source.extension)}},{key:"loadOctree",value:function(){var t=this,e="".concat(this.baseurl,"/r").concat(this.id,".").concat(this.layer.source.extensionOctree);return this.layer.source.fetcher(e,this.layer.source.networkOptions).then((function(e){var r=new DataView(e),n=[],a=0;for(t.childrenBitField=r.getUint8(0),a+=1,t.numPoints=r.getUint32(1,!0),a+=4,n.push(t);n.length&&a1&&void 0!==arguments[1]?arguments[1]:{};(0,C.Z)(this,a),l.side=null!==(e=l.side)&&void 0!==e?e:n.DoubleSide,l.transparent=null===(r=l.transparent)||void 0===r||r,l.opacity=null!==(o=l.opacity)&&void 0!==o?o:1;var u={};for(var h in l)Object.prototype.hasOwnProperty.call(l,h)&&void 0!==Er[h]&&(u[h]=l[h]);(c=i.call(this,u)).defines.ORIENTED_IMAGES_COUNT=null!==(s=l.OrientedImagesCount)&&void 0!==s?s:t.length;var f=ye.Z.getMaxTextureUnitsCount();c.defines.ORIENTED_IMAGES_COUNT>f&&(console.warn("OrientedImageMaterial: Can't project ".concat(t.length," textures, because it's more than GPU capabilities maximum texture units (").concat(f,")")),c.defines.ORIENTED_IMAGES_COUNT=f-1,console.warn("OrientedImageMaterial: We'll use only the first ".concat(c.defines.ORIENTED_IMAGES_COUNT," cameras."))),l.useBaseMaterial&&(c.defines.USE_BASE_MATERIAL=!0),c.defines.USE_DISTORTION=Number(t.some((function(t){return null!==t.distortion.pps}))),c.alphaBorder=20|l.alphaBorder,c.defines.DEBUG_ALPHA_BORDER=0|l.debugAlphaBorder,c.cameras=t;var d=[],p=[],m=[],g=[];c.group=new n.Group;for(var A=0;A\n#include \n#include \n#include \n#include \n#include \n\nvarying vec3 vNormal;\nattribute vec3 normal;\n\nvoid main() {\n #include \n #include \n vNormal = normal;\n #include \n #include \n}\n",c.fragmentShader=br.Z.unrollLoops("#include \n#include \n#include \n#include \nvarying vec3 vNormal;\n\n#ifdef USE_BASE_MATERIAL\nstruct noPT {\n vec3 lightDirection;\n vec3 ambient;\n float opacity;\n};\n\nuniform noPT noProjectiveMaterial;\n#endif\n\nvoid main(void)\n{\n #include \n #ifdef USE_BASE_MATERIAL\n float nDotVP = (max(0.1, dot(vNormal, normalize(noProjectiveMaterial.lightDirection))));\n vec4 color = vec4(noProjectiveMaterial.ambient + nDotVP, 0.0);\n #else\n vec4 color = vec4(0.0);\n #endif\n\n #pragma unroll_loop\n for (int i = 0; i < ORIENTED_IMAGES_COUNT; i++) {\n color = projectiveTextureColor(projectiveTextureCoords[ ORIENTED_IMAGES_COUNT - 1 - i ], projectiveTextureDistortion[ ORIENTED_IMAGES_COUNT - 1 - i ], projectiveTexture[ ORIENTED_IMAGES_COUNT - 1 - i ], mask[ORIENTED_IMAGES_COUNT - 1 - i], color);\n }\n\n #ifdef USE_BASE_MATERIAL\n color.a = color.a < 1.0 ? max(noProjectiveMaterial.opacity, color.a) : 1.0 ;\n gl_FragColor = vec4(color.rgb, color.a * opacity);\n #else\n gl_FragColor = vec4(color.rgb / color.a, opacity);\n #endif\n\n}\n",c.defines),c}return(0,T.Z)(a,[{key:"onBeforeCompile",value:function(t,e){e.capabilities.isWebGL2&&(this.defines.WEBGL2=!0,t.glslVersion="300 es")}},{key:"setTextures",value:function(t,e,r){var n=this;if(t){this.group.position.copy(e.position),this.group.quaternion.copy(e.quaternion);for(var i=function(e){if(n.uniforms.projectiveTexture.value[e].dispose(),n.uniforms.projectiveTexture.value[e]=t[e],r){var i=n.group.children[e];if(r[e]!=i.name){var a=n.cameras.find((function(t){return t.name===r[e]}));n.uniforms.mask.value[e]=a.maskTexture||wr,n.uniforms.mask.value[e].needsUpdate=!0,n.uniforms.projectiveTextureDistortion.value[e]=a.distortion,n.group.children[e]=a,a.parent=n.group}}n.group.children[e].needsUpdate=!0},a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=JSON.parse(t)),Promise.all(t.map((function(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null==e.useMask||e.useMask,i=null==e.imageYDown||e.imageYDown,a=t.projection,o=(new n.Vector2).fromArray(t.size),s=new n.Vector2(a[0],a[4]),c=new n.Vector2(a[2],i?o.y-a[5]:a[5]),l=a[1],u=new k(o,s,c,e.near,e.far,l);u.position.fromArray(t.position);var h,f=Ir.fromArray(t.rotation);u.matrix.setFromMatrix3(f),u.quaternion.setFromRotationMatrix(u.matrix),u.rotateX(Math.PI),t.distortion&&u.distortion.setFromMicmacCalibration(t.distortion,i),u.maskPath=t.mask,u.name=t.id;var d=new Promise((function(t){h=t}));return r&&u.maskPath?Tr.load(u.maskPath,(function(t){u.maskTexture=t,h(u)})):h(u),d}(t,e)})))}};function Br(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return kr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function kr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{};(0,C.Z)(this,a),s.projection&&(console.warn("OrientedImageLayer projection parameter is deprecated, use crs instead."),s.crs=s.crs||s.projection),(e=i.call(this,t,new n.Group,s)).isOrientedImageLayer=!0,e.background=s.background||function(t){if(t&&!(t<=0)){var e=new n.SphereGeometry(t,32,32),r=new n.MeshPhongMaterial({color:7829503,side:n.DoubleSide,transparent:!0,opacity:.5,wireframe:!0}),i=new n.Mesh(e,r);return i.visible=!0,i.name="OrientedImageBackground",i}}(s.backgroundDistance),e.background&&(e.background.layer=null!==(r=e.background.layer)&&void 0!==r?r:{},e.background.layer.id=null!==(o=e.background.layer.id)&&void 0!==o?o:t,e.object3d.add(e.background)),e.currentPano=void 0,e.onPanoChanged=s.onPanoChanged||function(){},e.getCamerasNameFromFeature=s.getCamerasNameFromFeature||function(){};var c=e.addInitializationStep();e.mergeFeatures=!1,e.filteringExtent=!1,e.accurate=!0;var l={out:(0,w.Z)(e)};return e.source.whenReady.then((function(t){return Cr.Z.parse(s.orientation||t.orientation,l).then((function(t){e.panos=t.features;var r,i=l.in.crs,a=s.crs,o=Lt.quaternionFromCRSToCRS(i,a),c=new n.Quaternion,u=0,h=Br(e.panos);try{for(h.s();!(r=h.n()).done;){var f=r.value;Lr.crs=f.crs,Lr.setFromArray(f.vertices).applyMatrix4(t.matrix),f.position=Lr.toVector3(),o(Lr,c),f.quaternion=Lt.quaternionFromAttitude(f.geometries[0].properties).premultiply(c),f.id=f.geometries[0].properties.id,f.index=u++}}catch(t){h.e(t)}finally{h.f()}})).then((function(){Rr.parse(s.calibration||t.calibration,s).then((function(t){e.cameras=t,e.material=new Sr(e.cameras,s),c()}))}))})),e}return(0,T.Z)(a,[{key:"update",value:function(){}},{key:"boostLight",get:function(){return this.material.uniforms.boostLight.value},set:function(t){this.material.uniforms.boostLight.value=t}},{key:"preUpdate",value:function(t){var e;!function(t,e,r){var n=r.mostNearPano(e.position),i=r.currentPano?r.currentPano.id:void 0;if(n&&i!=n.id){r.currentPano=n,r.onPanoChanged({previousPanoPosition:r.getPreviousPano()?r.getPreviousPano().position:void 0,currentPanoPosition:r.getCurrentPano().position,nextPanoPosition:r.getNextPano().position});var a=n.geometries[0].properties.idSensors,o=r.cameras.map((function(t){return{cameraId:t.name,panoId:n.id,as:function(){}}})).filter((function(t){return!a||a.includes(t.cameraId)})),s={layer:r,extentsSource:o,view:t.view,requester:n,earlyDropFunction:Pr};t.scheduler.execute(s).then((function(e){n.id===r.currentPano.id&&(r.material.setTextures(e,n,r.getCamerasNameFromFeature(n)),r.material.updateUniforms(t.camera.camera3D),t.view.notifyChange(r,!0))}),(function(){}))}}(t,t.camera.camera3D,this),this.material.updateUniforms(t.camera.camera3D),(e=this).background&&e.currentPano&&(e.background.position.copy(e.currentPano.position),e.background.updateMatrixWorld(),e.background.material=e.material||e.background.material)}},{key:"getNextPano",value:function(){var t=(this.currentPano.index+1)%this.panos.length;return this.panos[t]}},{key:"getCurrentPano",value:function(){return this.currentPano}},{key:"getPreviousPano",value:function(){var t=(this.currentPano.index-1)%this.panos.length;return this.panos[t]}},{key:"delete",value:function(t){this.background&&(0,_.Z)((0,S.Z)(a.prototype),"delete",this).call(this),t&&this.cache.clear(),this.material.visible=!1,console.warn("You need to replace OrientedImageLayer.material applied on each object. This issue will be fixed when OrientedImageLayer will be a ColorLayer. the material visibility is set to false. To follow issue see https://github.com/iTowns/itowns/issues/1018")}},{key:"mostNearPano",value:function(t){var e,r,n=1/0,i=Br(this.panos);try{for(i.s();!(r=i.n()).done;){var a=r.value,o=t.distanceTo(a.position);o5&&void 0!==arguments[5]?arguments[5]:0;return(0,C.Z)(this,i),(s=n.call(this,c,o)).isEntwinePointTileNode=!0,s.depth=t,s.x=e,s.y=r,s.z=a,s.id=jr(t,e,r,a),s.url="".concat(s.layer.source.url,"/ept-data/").concat(s.id,".").concat(s.layer.source.extension),s}return(0,T.Z)(i,[{key:"createChildAABB",value:function(t){var e=Math.pow(2,t.depth-this.depth);this.bbox.getSize(Zr).divideScalar(e),t.bbox.min.copy(this.bbox.min),Vr.copy(this).multiplyScalar(e),Qr.subVectors(t,Vr).multiply(Zr),t.bbox.min.add(Qr),t.bbox.max.copy(t.bbox.min).add(Zr)}},{key:"octreeIsLoaded",get:function(){return this.numPoints>=0}},{key:"loadOctree",value:function(){var t=this;return f.Z.json("".concat(this.layer.source.url,"/ept-hierarchy/").concat(this.id,".json"),this.layer.source.networkOptions).then((function(e){t.numPoints=e[t.id];var r=[];for(r.push(t);r.length;){var n=r.shift(),i=n.depth+1,a=2*n.x,o=2*n.y,s=2*n.z;n.findAndCreateChild(i,a,o,s,e,r),n.findAndCreateChild(i,a+1,o,s,e,r),n.findAndCreateChild(i,a,o+1,s,e,r),n.findAndCreateChild(i,a+1,o+1,s,e,r),n.findAndCreateChild(i,a,o,s+1,e,r),n.findAndCreateChild(i,a+1,o,s+1,e,r),n.findAndCreateChild(i,a,o+1,s+1,e,r),n.findAndCreateChild(i,a+1,o+1,s+1,e,r)}}))}},{key:"findAndCreateChild",value:function(t,e,r,n,a,o){var s=a[jr(t,e,r,n)];if("number"==typeof s){var c=new i(t,e,r,n,this.layer,s);this.add(c),o.push(c)}}}]),i}(hr);var Hr=new n.Mesh,Xr=new n.Box3;Hr.geometry.boundingBox=Xr;var qr=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t,e){var r;(0,C.Z)(this,i),(r=n.call(this,t,e)).isEntwinePointTileLayer=!0;var o=r.addInitializationStep();return r.whenReady=r.source.whenReady.then((function(){return r.root=new Wr(0,0,0,0,(0,w.Z)(r),-1),r.root.bbox.min.fromArray(r.source.boundsConforming,0),r.root.bbox.max.fromArray(r.source.boundsConforming,3),r.extent=a.ZP.fromBox3(e.crs||"EPSG:4326",r.root.bbox),r.root.loadOctree().then(o)})),r}return(0,T.Z)(i,[{key:"spacing",get:function(){return this.source.spacing}}]),i}(ur);const Yr=qr;var Jr=r(51123);var Kr=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e;if((0,C.Z)(this,i),t.parsedData&&(console.warn("FileSource parsedData parameter is deprecated, use features instead of."),t.features=t.features||t.parsedData),t.projection&&(console.warn("FileSource projection parameter is deprecated, use crs instead."),t.crs=t.crs||t.projection),!t.crs){if(!t.features||!t.features.crs)throw new Error("source.crs is required in FileSource");t.crs=t.features.crs}if(!t.url&&!t.fetchedData&&!t.features)throw new Error("url, fetchedData and features are not set in\n FileSource; at least one needs to be present");return t.url=t.url||"fake-file-url",(e=n.call(this,t)).isFileSource=!0,e.fetchedData=t.fetchedData,e.fetchedData||t.features?t.features&&(e._featuresCaches[t.features.crs]=new Ve.Z,e._featuresCaches[t.features.crs].setByArray(Promise.resolve(t.features),[0])):e.whenReady=e.fetcher(e.urlFromExtent(),e.networkOptions).then((function(t){e.fetchedData=t})),e.whenReady.then((function(){return e.fetchedData})),e.zoom={min:0,max:1/0},e}return(0,T.Z)(i,[{key:"urlFromExtent",value:function(){return this.url}},{key:"onLayerAdded",value:function(t){var e=this;t.in=this,(0,_.Z)((0,S.Z)(i.prototype),"onLayerAdded",this).call(this,t);var r=this._featuresCaches[t.out.crs].getByArray([0]);r||(t.out.buildExtent="EPSG:4978"!=this.crs,t.out.buildExtent&&(t.out.forcedExtentCrs="EPSG:4978"!=t.out.crs?t.out.crs:c.Z.formatToEPSG(this.crs)),r=this.parser(this.fetchedData,t),this._featuresCaches[t.out.crs].setByArray(r,[0])),r.then((function(t){t.extent&&(e.extent=t.extent.clone(),e.extent.crs==t.crs&&e.extent.applyMatrix4(t.matrixWorld))}))}},{key:"loadData",value:function(t,e){return this._featuresCaches[e.crs].getByArray([0])}},{key:"extentInsideLimit",value:function(t){return this.extent.intersectsExtent(t)}}]),i}(Jr.ZP);const $r=Kr;var tn=r(13012);var en=new a.ZP(c.Z.tms_4326,0,0,0),rn=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e;if((0,C.Z)(this,i),t.format=t.format||"image/png",e=n.call(this,t),!t.crs)throw new Error("New TMSSource/WMTSSource: crs is required");if(e.isTMSSource=!0,t.extent||(e.extent=a.Mh.get(t.crs)),e.zoom=t.zoom,e.isInverted=t.isInverted||!1,e.url=t.url,e.crs=c.Z.formatToTms(t.crs),e.tileMatrixSetLimits=t.tileMatrixSetLimits,e.extentSetlimits={},e.tileMatrixCallback=t.tileMatrixCallback||function(t){return t},!e.zoom)if(e.tileMatrixSetLimits){var r=Object.keys(e.tileMatrixSetLimits),o=r.length,s=Number(r[o-1]);e.zoom={min:s-o+1,max:s}}else e.zoom={min:0,max:1/0};return e}return(0,T.Z)(i,[{key:"urlFromExtent",value:function(t){return tn.Z.xyz(t,this)}},{key:"onLayerAdded",value:function(t){(0,_.Z)((0,S.Z)(i.prototype),"onLayerAdded",this).call(this,t);var e=t.out.parent,r=e?e.extent.crs:t.out.crs;if(this.tileMatrixSetLimits&&!this.extentSetlimits[r]){this.extentSetlimits[r]={},en.crs=this.crs;for(var n=this.zoom.max;n>=this.zoom.min;n--){var o=this.tileMatrixSetLimits[n],s=en.set(n,o.minTileRow,o.minTileCol).as(r),c=s.west,l=s.north,u=en.set(n,o.maxTileRow,o.maxTileCol).as(r),h=u.east,f=u.south;this.extentSetlimits[r][n]=new a.ZP(r,c,h,f,l)}}}},{key:"extentInsideLimit",value:function(t,e){return e>=this.zoom.min&&e<=this.zoom.max&&(null==this.extentSetlimits[t.crs]||this.extentSetlimits[t.crs][e].intersectsExtent(t))}}]),i}(Jr.ZP);const nn=rn;var an=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e;if((0,C.Z)(this,i),t.projection&&(console.warn("WFSSource projection parameter is deprecated, use crs instead."),t.crs=t.crs||t.projection),!t.typeName)throw new Error("source.typeName is required in wfs source.");if(!t.crs)throw new Error("source.crs is required in wfs source");for(var r in t.format=t.format||"application/json",(e=n.call(this,t)).isWFSSource=!0,e.typeName=t.typeName,e.version=t.version||"2.0.2",e.url.endsWith("?")||(e.url="".concat(e.url,"?")),e.url="".concat(t.url,"SERVICE=WFS&REQUEST=GetFeature&typeName=").concat(e.typeName,"&VERSION=").concat(e.version,"&SRSNAME=").concat(e.crs,"&outputFormat=").concat(e.format,"&BBOX=%bbox,").concat(e.crs),e.zoom={min:0,max:1/0},e.vendorSpecific=t.vendorSpecific,e.vendorSpecific)Object.prototype.hasOwnProperty.call(e.vendorSpecific,r)&&(e.url="".concat(e.url,"&").concat(r,"=").concat(e.vendorSpecific[r]));return e}return(0,T.Z)(i,[{key:"handlingError",value:function(t){var e=this;return t.response&&400==t.response.status?t.response.text().then((function(r){var n="".concat(e.url,"SERVICE=WFS&REQUEST=GetCapabilities&VERSION=").concat(e.version),i=(new DOMParser).parseFromString(r,"application/xml").querySelector("Exception"),a=i.getAttribute("exceptionCode"),o=i.querySelector("ExceptionText").textContent;console.error("Source ".concat(e.typeName,': bad request when fetching data. Server says: "').concat(a,": ").concat(o,'". \nReviewing ').concat(n," may help."),t)})):(0,_.Z)((0,S.Z)(i.prototype),"handlingError",this).call(this,t)}},{key:"requestToKey",value:function(t){return c.Z.isTms(t.crs)?(0,_.Z)((0,S.Z)(i.prototype),"requestToKey",this).call(this,t):[t.zoom,t.south,t.west]}},{key:"urlFromExtent",value:function(t){return tn.Z.bbox(t,this)}},{key:"extentInsideLimit",value:function(t){return this.extent.intersectsExtent(t)}}]),i}(Jr.ZP);const on=an;var sn=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e;if((0,C.Z)(this,i),!t.name)throw new Error("source.name is required.");if(!t.extent)throw new Error("source.extent is required");if(!t.crs&&!t.projection)throw new Error("source.crs is required");t.format=t.format||"image/png",(e=n.call(this,t)).isWMSSource=!0,e.name=t.name,e.zoom={min:0,max:1/0},e.style=t.style||"",e.width=t.width||t.height||256,e.height=t.height||t.width||256,e.version=t.version||"1.3.0",e.transparent=t.transparent||!1,t.axisOrder||("EPSG:4326"==e.crs?e.axisOrder="1.1.0"===e.version?"wsen":"swne":e.axisOrder="wsen");var r="1.3.0"===e.version?"CRS":"SRS";for(var a in e.url.endsWith("?")||(e.url="".concat(e.url,"?")),e.url="".concat(e.url,"SERVICE=WMS&REQUEST=GetMap&LAYERS=").concat(e.name,"&VERSION=").concat(e.version,"&STYLES=").concat(e.style,"&FORMAT=").concat(e.format,"&TRANSPARENT=").concat(e.transparent,"&BBOX=%bbox&").concat(r,"=").concat(e.crs,"&WIDTH=").concat(e.width,"&HEIGHT=").concat(e.height),e.vendorSpecific=t.vendorSpecific,e.vendorSpecific)Object.prototype.hasOwnProperty.call(e.vendorSpecific,a)&&(e.url="".concat(e.url,"&").concat(a,"=").concat(e.vendorSpecific[a]));return e}return(0,T.Z)(i,[{key:"urlFromExtent",value:function(t){return tn.Z.bbox(t,this)}},{key:"extentInsideLimit",value:function(t){return this.extent.intersectsExtent(t)}}]),i}(Jr.ZP);const cn=sn;const ln=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e;if((0,C.Z)(this,i),!t.name)throw new Error("New WMTSSource: name is required");for(var r in(e=n.call(this,t)).isWMTSSource=!0,e.url.endsWith("?")||(e.url="".concat(e.url,"?")),e.url="".concat(e.url)+"LAYER=".concat(t.name)+"&FORMAT=".concat(e.format)+"&SERVICE=WMTS"+"&VERSION=".concat(t.version||"1.0.0")+"&REQUEST=GetTile"+"&STYLE=".concat(t.style||"normal")+"&TILEMATRIXSET=".concat(t.tileMatrixSet)+"&TILEMATRIX=%TILEMATRIX&TILEROW=%ROW&TILECOL=%COL",e.vendorSpecific=t.vendorSpecific,e.vendorSpecific)Object.prototype.hasOwnProperty.call(e.vendorSpecific,r)&&(e.url="".concat(e.url,"&").concat(r,"=").concat(e.vendorSpecific[r]));return e}return(0,T.Z)(i)}(nn);var un=r(92294),hn=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/,fn="https://api.mapbox.com",dn=!0,pn=null;function mn(t){var e=t.params.length?"?".concat(t.params.join("&")):"";return"".concat(t.protocol,"://").concat(t.authority).concat(t.path).concat(e)}function gn(t,e){var r=vn(fn);if(t.protocol=r.protocol,t.authority=r.authority,"http"===t.protocol){var n=t.params.indexOf("secure");n>=0&&t.params.splice(n,1)}if("/"!==r.path&&(t.path="".concat(r.path).concat(t.path)),!dn)return mn(t);if(!(e=e||pn))throw new Error("An API access token is required");if("s"===e[0])throw new Error("Use a public access token (pk.*), not a secret access token (sk.*).");return t.params=t.params.filter((function(t){return-1===t.indexOf("access_token")})),t.params.push("access_token=".concat(e)),mn(t)}function An(t){return 0===t.indexOf("mapbox:")}function vn(t){var e=t.match(hn);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}const yn=function(t,e){if(!An(t))return t;var r=vn(t);return r.path="/styles/v1".concat(r.path),gn(r,e)},bn=function(t,e){if(!An(t))return t;var r=vn(t);return r.path="/v4/".concat(r.authority,".json"),r.params.push("secure"),gn(r,e)},xn=function(t,e,r,n){var i=vn(t);return An(t)?(i.path="/styles/v1".concat(i.path,"/sprite").concat(e).concat(r),gn(i,n)):(i.path+="".concat(e).concat(r),mn(i))};function wn(t){return t.replace(/\{/g,"${")}var _n=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e;(0,C.Z)(this,i),t.format="application/x-protobuf;type=mapbox-vector",t.crs="EPSG:3857",t.isInverted=!0,t.url=t.url||".",e=n.call(this,t);var r,a=t.filter||function(){return!0};if(e.layers={},e.styles={},e.isVectorTileSource=!0,e.accessToken=t.accessToken,!t.style)throw new Error("New VectorTilesSource: style is required");if("string"==typeof t.style){var o=yn(t.style,e.accessToken);r=f.Z.json(o,e.networkOptions)}else r=Promise.resolve(t.style);return e.whenReady=r.then((function(r){e.jsonStyle=r;var n=t.sprite||r.sprite;if(n){var i=xn(n,"",".json",e.accessToken);return f.Z.json(i,e.networkOptions).then((function(t){e.sprites=t;var i=xn(n,"",".png",e.accessToken);return e.sprites.source=i,r}))}return r})).then((function(t){var r=Object.keys(t.sources)[0],n=t.sources[r];if(t.layers.forEach((function(t,r){if(t.sourceUid=e.uid,"background"===t.type)e.backgroundLayer=t;else if(a(t)){var n=Pt.ZP.setFromVectorTileLayer(t,e.sprites,r,e.symbolToCircle);e.styles[t.id]=n,e.layers[t["source-layer"]]||(e.layers[t["source-layer"]]=[]),e.layers[t["source-layer"]].push({id:t.id,order:r,filterExpression:(0,un.TE)(t.filter),zoom:{min:t.minzoom||0,max:t.maxzoom||24}})}})),"."==e.url){if(n.url){var i=bn(n.url,e.accessToken);return f.Z.json(i,e.networkOptions).then((function(t){t.tiles[0]&&(e.url=wn(t.tiles[0]))}))}n.tiles[0]&&(e.url=wn(n.tiles[0]))}})),e}return(0,T.Z)(i,[{key:"onLayerAdded",value:function(t){(0,_.Z)((0,S.Z)(i.prototype),"onLayerAdded",this).call(this,t),t.out.style&&t.out.isFeatureGeometryLayer&&t.out.accurate&&(console.warn("With VectorTilesSource and FeatureGeometryLayer, the accurate option is always false"),t.out.accurate=!1)}}]),i}(nn);const En=_n;const Mn=function(t){(0,E.Z)(i,t);var e,r,n=(e=i,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function i(t){var e;(0,C.Z)(this,i),t.format=t.format||"json",(e=n.call(this,t)).isOrientedImageSource=!0;var r=[];return r.push(t.orientationsUrl?f.Z.json(t.orientationsUrl,e.networkOptions):Promise.resolve()),r.push(t.calibrationUrl?f.Z.json(t.calibrationUrl,e.networkOptions):Promise.resolve()),e.whenReady=Promise.all(r).then((function(t){return{orientation:t[0],calibration:t[1]}})),e}return(0,T.Z)(i,[{key:"urlFromExtent",value:function(t){return this.imageUrl(t.cameraId,t.panoId)}},{key:"requestToKey",value:function(t){return[t.cameraId,t.panoId]}},{key:"imageUrl",value:function(t,e){return this.url.replace("{cameraId}",t).replace("{panoId}",e)}}]),i}(Jr.ZP);function Sn(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Cn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Cn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Cn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);ri?c:i,a=l>a?l:a,o=u>o?u:o}return[[e,r,n],[i,a,o]]}function Nn(){var t,e=void 0!==e?e:{},r={};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);var n,i,a,o,s=[];n="object"==typeof window,i="function"==typeof importScripts,o="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,a=!n&&!o&&!i;var c,l,u,h,f,d="";if(o){if(i)d=require("path").dirname(d)+"/";else{d=("undefined"!=typeof __dirname?__dirname:"")+"/"}c=function(t,e){var r=te(t);return r?e?r:r.toString():(h||(h=require("fs")),f||(f=require("path")),t=f.normalize(t),h.readFileSync(t,e?null:"utf8"))},u=function(t){var e=c(t,!0);return e.buffer||(e=new Uint8Array(e)),v(e.buffer),e},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),s=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=e),process.on("uncaughtException",(function(t){if(!(t instanceof me))throw t})),process.on("unhandledRejection",W),e.inspect=function(){return"[Emscripten Module object]"}}else a?("undefined"!=typeof read&&(c=function(t){var e=te(t);return e?Kt(e):read(t)}),u=function(t){var e;return(e=te(t))?e:"function"==typeof readbuffer?new Uint8Array(readbuffer(t)):(v("object"==typeof(e=read(t,"binary"))),e)},"undefined"!=typeof scriptArgs?s=scriptArgs:void 0!==arguments&&(s=arguments),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(n||i)&&(i?d=self.location.href:document.currentScript&&(d=document.currentScript.src),d=0!==d.indexOf("blob:")?d.substr(0,d.lastIndexOf("/")+1):"",c=function(t){try{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText}catch(e){var r=te(t);if(r)return Kt(r);throw e}},i&&(u=function(t){try{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}catch(e){var r=te(t);if(r)return r;throw e}}),l=function(t,e,r){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){if(200==n.status||0==n.status&&n.response)e(n.response);else{var i=te(t);i?e(i.buffer):r()}},n.onerror=r,n.send(null)});var p=e.print||console.log.bind(console),m=e.printErr||console.warn.bind(console);for(t in r)r.hasOwnProperty(t)&&(e[t]=r[t]);r=null,e.arguments&&(s=e.arguments),e.thisProgram&&e.thisProgram,e.quit&&e.quit,new Array(0);var g=0;e.wasmBinary&&e.wasmBinary,e.noExitRuntime&&e.noExitRuntime;var A=!1;function v(t,e){t||W("Assertion failed: "+e)}var y="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;var b,x,w,_,E,M,S,C,T,I="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function R(t,e){for(var r=t,n=r>>1,i=n+e/2;!(n>=i)&&E[n];)++n;if((r=n<<1)-t>32&&I)return I.decode(w.subarray(t,r));for(var a=0,o="";;){var s=_[t+2*a>>1];if(0==s||a==e/2)return o;++a,o+=String.fromCharCode(s)}}function B(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,i=(r-=2)<2*t.length?r/2:t.length,a=0;a>1]=o,e+=2}return _[e>>1]=0,e-n}function k(t){return 2*t.length}function L(t,e){for(var r=0,n="";!(r>=e/4);){var i=M[t+4*r>>2];if(0==i)break;if(++r,i>=65536){var a=i-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(i)}return n}function P(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,i=n+r-4,a=0;a=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&t.charCodeAt(++a)),M[e>>2]=o,(e+=4)+4>i)break}return M[e>>2]=0,e-n}function D(t){for(var e=0,r=0;r=55296&&n<=57343&&++r,e+=4}return e}var U,O=e.INITIAL_MEMORY||167772160;function F(t){for(;t.length>0;){var r=t.shift();if("function"!=typeof r){var n=r.func;"number"==typeof n?void 0===r.arg?e.dynCall_v(n):e.dynCall_vi(n,r.arg):n(void 0===r.arg?null:r.arg)}else r(e)}}O=(b=e.buffer?e.buffer:new ArrayBuffer(O)).byteLength,b=U=b,e.HEAP8=x=new Int8Array(U),e.HEAP16=_=new Int16Array(U),e.HEAP32=M=new Int32Array(U),e.HEAPU8=w=new Uint8Array(U),e.HEAPU16=E=new Uint16Array(U),e.HEAPU32=S=new Uint32Array(U),e.HEAPF32=C=new Float32Array(U),e.HEAPF64=T=new Float64Array(U),M[5544]=5265264;var N=[],z=[],G=[],Z=[];Math.abs,Math.ceil,Math.floor,Math.min;var V=0,Q=null,j=null;function W(t){throw e.onAbort&&e.onAbort(t),p(t+=""),m(t),A=!0,"abort("+t+"). Build with -s ASSERTIONS=1 for more info."}e.preloadedImages={},e.preloadedAudios={};var H=null,X="data:application/octet-stream;base64,";function q(t){return e=t,r=X,String.prototype.startsWith?e.startsWith(r):0===e.indexOf(r);var e,r}z.push({func:function(){le()}}),H="data:application/octet-stream;base64,AAAAAAAAAAAPDg0MCwoJCA4AAQMGCgoJDQECBAcLCwoMAwQFCAwMCwsGBwgJDQ0MCgoLDA0ODg0JCgsMDQ4PDggJCgsMDQ4PAAECAwQFBgcBAAECAwQFBgIBAAECAwQFAwIBAAECAwQEAwIBAAECAwUEAwIBAAECBgUEAwIBAAEHBgUEAwIBAMgPAAAoDQAAEBAAACAQAADIDwAAUA0AABAQAAAgEAAAEQAKABEREQAAAAAFAAAAAAAACQAAAAALAAAAAAAAAAARAA8KERERAwoHAAEACQsLAAAJBgsAAAsABhEAAAAREREAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAAAEQAKChEREQAKAAACAAkLAAAACQALAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAADAAAAAAJDAAAAAAADAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAANAAAABA0AAAAACQ4AAAAAAA4AAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAADwAAAAAPAAAAAAkQAAAAAAAQAAAQAAASAAAAEhISAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAASEhIAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAAKAAAAAAoAAAAACQsAAAAAAAsAAAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAMAAAAAAkMAAAAAAAMAAAMAAAwMTIzNDU2Nzg5QUJDREVGGRJEOwI/LEcUPTMwChsGRktFNw9JDo4XA0AdPGkrNh9KLRwBICUpIQgMFRYiLhA4Pgs0MRhkdHV2L0EJfzkRI0MyQomKiwUEJignDSoeNYwHGkiTE5SVAAAAAAAAAAAASWxsZWdhbCBieXRlIHNlcXVlbmNlAERvbWFpbiBlcnJvcgBSZXN1bHQgbm90IHJlcHJlc2VudGFibGUATm90IGEgdHR5AFBlcm1pc3Npb24gZGVuaWVkAE9wZXJhdGlvbiBub3QgcGVybWl0dGVkAE5vIHN1Y2ggZmlsZSBvciBkaXJlY3RvcnkATm8gc3VjaCBwcm9jZXNzAEZpbGUgZXhpc3RzAFZhbHVlIHRvbyBsYXJnZSBmb3IgZGF0YSB0eXBlAE5vIHNwYWNlIGxlZnQgb24gZGV2aWNlAE91dCBvZiBtZW1vcnkAUmVzb3VyY2UgYnVzeQBJbnRlcnJ1cHRlZCBzeXN0ZW0gY2FsbABSZXNvdXJjZSB0ZW1wb3JhcmlseSB1bmF2YWlsYWJsZQBJbnZhbGlkIHNlZWsAQ3Jvc3MtZGV2aWNlIGxpbmsAUmVhZC1vbmx5IGZpbGUgc3lzdGVtAERpcmVjdG9yeSBub3QgZW1wdHkAQ29ubmVjdGlvbiByZXNldCBieSBwZWVyAE9wZXJhdGlvbiB0aW1lZCBvdXQAQ29ubmVjdGlvbiByZWZ1c2VkAEhvc3QgaXMgZG93bgBIb3N0IGlzIHVucmVhY2hhYmxlAEFkZHJlc3MgaW4gdXNlAEJyb2tlbiBwaXBlAEkvTyBlcnJvcgBObyBzdWNoIGRldmljZSBvciBhZGRyZXNzAEJsb2NrIGRldmljZSByZXF1aXJlZABObyBzdWNoIGRldmljZQBOb3QgYSBkaXJlY3RvcnkASXMgYSBkaXJlY3RvcnkAVGV4dCBmaWxlIGJ1c3kARXhlYyBmb3JtYXQgZXJyb3IASW52YWxpZCBhcmd1bWVudABBcmd1bWVudCBsaXN0IHRvbyBsb25nAFN5bWJvbGljIGxpbmsgbG9vcABGaWxlbmFtZSB0b28gbG9uZwBUb28gbWFueSBvcGVuIGZpbGVzIGluIHN5c3RlbQBObyBmaWxlIGRlc2NyaXB0b3JzIGF2YWlsYWJsZQBCYWQgZmlsZSBkZXNjcmlwdG9yAE5vIGNoaWxkIHByb2Nlc3MAQmFkIGFkZHJlc3MARmlsZSB0b28gbGFyZ2UAVG9vIG1hbnkgbGlua3MATm8gbG9ja3MgYXZhaWxhYmxlAFJlc291cmNlIGRlYWRsb2NrIHdvdWxkIG9jY3VyAFN0YXRlIG5vdCByZWNvdmVyYWJsZQBQcmV2aW91cyBvd25lciBkaWVkAE9wZXJhdGlvbiBjYW5jZWxlZABGdW5jdGlvbiBub3QgaW1wbGVtZW50ZWQATm8gbWVzc2FnZSBvZiBkZXNpcmVkIHR5cGUASWRlbnRpZmllciByZW1vdmVkAERldmljZSBub3QgYSBzdHJlYW0ATm8gZGF0YSBhdmFpbGFibGUARGV2aWNlIHRpbWVvdXQAT3V0IG9mIHN0cmVhbXMgcmVzb3VyY2VzAExpbmsgaGFzIGJlZW4gc2V2ZXJlZABQcm90b2NvbCBlcnJvcgBCYWQgbWVzc2FnZQBGaWxlIGRlc2NyaXB0b3IgaW4gYmFkIHN0YXRlAE5vdCBhIHNvY2tldABEZXN0aW5hdGlvbiBhZGRyZXNzIHJlcXVpcmVkAE1lc3NhZ2UgdG9vIGxhcmdlAFByb3RvY29sIHdyb25nIHR5cGUgZm9yIHNvY2tldABQcm90b2NvbCBub3QgYXZhaWxhYmxlAFByb3RvY29sIG5vdCBzdXBwb3J0ZWQAU29ja2V0IHR5cGUgbm90IHN1cHBvcnRlZABOb3Qgc3VwcG9ydGVkAFByb3RvY29sIGZhbWlseSBub3Qgc3VwcG9ydGVkAEFkZHJlc3MgZmFtaWx5IG5vdCBzdXBwb3J0ZWQgYnkgcHJvdG9jb2wAQWRkcmVzcyBub3QgYXZhaWxhYmxlAE5ldHdvcmsgaXMgZG93bgBOZXR3b3JrIHVucmVhY2hhYmxlAENvbm5lY3Rpb24gcmVzZXQgYnkgbmV0d29yawBDb25uZWN0aW9uIGFib3J0ZWQATm8gYnVmZmVyIHNwYWNlIGF2YWlsYWJsZQBTb2NrZXQgaXMgY29ubmVjdGVkAFNvY2tldCBub3QgY29ubmVjdGVkAENhbm5vdCBzZW5kIGFmdGVyIHNvY2tldCBzaHV0ZG93bgBPcGVyYXRpb24gYWxyZWFkeSBpbiBwcm9ncmVzcwBPcGVyYXRpb24gaW4gcHJvZ3Jlc3MAU3RhbGUgZmlsZSBoYW5kbGUAUmVtb3RlIEkvTyBlcnJvcgBRdW90YSBleGNlZWRlZABObyBtZWRpdW0gZm91bmQAV3JvbmcgbWVkaXVtIHR5cGUATm8gZXJyb3IgaW5mb3JtYXRpb24AAAAAAADgFgAAmRgAAGAQAAAAAAAA4BYAAEIZAABgEAAAAAAAAOAWAAAqGgAASA8AAAAAAAC4FgAANBsAAOAWAACfGgAAMAoAAAAAAADgFgAAaRsAAEgPAAAAAAAA4BYAAIobAABIDwAAAAAAALgWAAAPHAAA4BYAAHwcAABIDwAAAAAAAOAWAACVHAAASA8AAAAAAADgFgAAHh0AAEgPAAAAAAAA4BYAAHcdAABIDwAAAAAAAOAWAACQHQAASA8AAAAAAADgFgAAQh4AAEgPAAAAAAAA4BYAAIceAABgEAAAAAAAAOAWAACkHwAASA8AAAAAAAC4FgAAZyAAAOAWAADkHwAA8AoAAAAAAADgFgAAjyAAAGAQAAAAAAAAuBYAAMMiAADgFgAAAiIAABgLAAAAAAAA4BYAAOEiAABgEAAAAAAAAOAWAADQJAAAGAsAAAAAAADgFgAAkSUAAGAQAAAAAAAA4BYAAIAnAAAYCwAAAAAAAOAWAAA9KAAAYBAAAAAAAADgFgAAJCoAABgLAAAAAAAA4BYAAOkqAABgEAAAAAAAAOAWAADgLAAA8AoAAAAAAADgFgAAui0AAGAQAAAAAAAA4BYAANsvAADwCgAAAAAAAOAWAADTMAAAYBAAAAAAAADgFgAAMDMAAPAKAAAAAAAA4BYAACQ0AABgEAAAAAAAAOAWAAB5NgAA8AoAAAAAAADgFgAAizcAAGAQAAAAAAAA4BYAABw6AABgEAAAAAAAAOAWAACdOgAAYBAAAAAAAADgFgAAXjsAAPAKAAAAAAAA4BYAALU7AABgEAAAAAAAAOAWAADMPAAAGAsAAAAAAADgFgAATz0AAGAQAAAAAAAA4BYAAL4+AAAYCwAAAAAAAOAWAABBPwAAYBAAAAAAAADgFgAAsEAAABgLAAAAAAAA4BYAADNBAABgEAAAAAAAAOAWAACiQgAAGAsAAAAAAADgFgAAJUMAAGAQAAAAAAAA4BYAAJREAAAYCwAAAAAAAOAWAAAXRQAAYBAAAAAAAADgFgAAhkYAABgLAAAAAAAA4BYAAAlHAABgEAAAAAAAALgWAAB4SAAAiBcAAIBIAAAAAAAAIA0AAIgXAACJSAAAAQAAACANAAC4FgAAqkgAAIgXAAC6SAAAAAAAAEgNAACIFwAAy0gAAAEAAABIDQAAuBYAABhMAAC4FgAAN0wAALgWAABWTAAAuBYAAHVMAAC4FgAAlEwAALgWAACzTAAAuBYAANJMAAC4FgAA8UwAALgWAAAQTQAAuBYAAC9NAAC4FgAATk0AALgWAABtTQAAuBYAAIxNAACkFwAAn00AAAAAAAABAAAA8A0AAAAAAAC4FgAA4U0AAKQXAAAHTgAAAAAAAAEAAADwDQAAAAAAAKQXAABJTgAAAAAAAAEAAADwDQAAAAAAAKQXAACITgAAAAAAAAEAAADwDQAAAAAAAKQXAADHTgAAAAAAAAEAAADwDQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALgWAADNTwAA4BYAAC1QAAAADwAAAAAAAOAWAADaTwAAEA8AAAAAAAC4FgAA+08AAOAWAAAIUAAA8A4AAAAAAADgFgAAhlAAAOgOAAAAAAAA4BYAAJNQAADoDgAAAAAAAOAWAACjUAAA6A4AAAAAAADgFgAAtVAAADgPAAAAAAAA4BYAAMZQAAA4DwAAAAAAAOAWAADXUAAAAA8AAAAAAADgFgAA+VAAAHgPAAAAAAAA4BYAAB1RAAAADwAAAAAAAOAWAABCUQAAeA8AAAAAAADgFgAAjlEAAAAPAAAAAAAAbBcAALZRAABsFwAAuFEAAGwXAAC7UQAAbBcAAL1RAABsFwAAv1EAAGwXAADBUQAAbBcAAMNRAABsFwAAxVEAAGwXAADHUQAAbBcAAMlRAABsFwAAy1EAAGwXAADNUQAAbBcAAM9RAABsFwAA0VEAAOAWAADTUQAA8A4AAAAAAADgFgAARlIAAOgOAAAAAAAAuBYAAGJSAACkFwAAe1IAAAAAAAABAAAAWBAAAAAAAADgFgAA9FIAAIgQAAAAAAAA4BYAABdTAACYEAAAAAAAALgWAAAuUwAA4BYAAHBTAACIEAAAAAAAAOAWAACSUwAASA8AAAAAAAAAAAAAAAoAAAEAAAACAAAAAwAAAAEAAAAEAAAAAAAAABAKAAABAAAABQAAAAYAAAACAAAABwAAAAAAAAAgCgAACAAAAAkAAAABAAAAAAAAADgKAAAKAAAACwAAAAIAAAABAAAADAAAAA0AAAACAAAAAwAAAAMAAAAAAAAASAoAAAgAAAAOAAAAAQAAAAAAAABYCgAACAAAAA8AAAABAAAAAAAAAIAKAAAIAAAAEAAAAAEAAAAAAAAAcAoAAAgAAAARAAAAAQAAAAAAAACQCgAACAAAABIAAAABAAAAAAAAAKAKAAAIAAAAEwAAAAEAAAAAAAAAsAoAAAgAAAAUAAAAAQAAAAAAAADACgAACAAAABUAAAABAAAAAAAAANAKAAABAAAAFgAAABcAAAAEAAAAGAAAAAAAAADgCgAACAAAABkAAAABAAAAAAAAAPgKAAAFAAAAGgAAABsAAAAAAAAA8AoAAAEAAAAcAAAAHQAAAAAAAAAICwAAAQAAAB4AAAAfAAAABgAAACAAAAAAAAAAIAsAACEAAAAiAAAABwAAAAgAAAAAAAAAGAsAACMAAAAkAAAABwAAAAkAAAAAAAAAMAsAAAEAAAAlAAAAJgAAAAoAAAAnAAAAAAAAAEALAAAoAAAAKQAAAAcAAAALAAAAAAAAAFALAAABAAAAKgAAACsAAAAMAAAALAAAAAAAAABgCwAALQAAAC4AAAAHAAAADQAAAAAAAABwCwAAAQAAAC8AAAAwAAAADgAAADEAAAAAAAAAgAsAADIAAAAzAAAABwAAAA8AAAAAAAAAkAsAAAEAAAA0AAAANQAAABAAAAA2AAAAAAAAAKALAAARAAAANwAAADgAAAAAAAAAsAsAAAEAAAA5AAAAOgAAABIAAAA7AAAAAAAAAMALAAATAAAAPAAAAD0AAAAAAAAA0AsAAAEAAAA+AAAAPwAAABQAAABAAAAAAAAAAOALAAAVAAAAQQAAAEIAAAAAAAAA8AsAAAEAAABDAAAARAAAABYAAABFAAAAAAAAAAAMAAAXAAAARgAAAEcAAAAAAAAAEAwAAAEAAABIAAAASQAAABgAAABKAAAAAAAAACAMAAABAAAASwAAAEwAAAAZAAAATQAAAAAAAAAwDAAAAQAAAE4AAABPAAAAGgAAAFAAAAAAAAAAQAwAABsAAABRAAAAUgAAAAAAAABQDAAAAQAAAFMAAABUAAAAHAAAAFUAAAAAAAAAYAwAAFYAAABXAAAABwAAAB0AAAAAAAAAcAwAAAEAAABYAAAAWQAAAB4AAABaAAAAAAAAAIAMAABbAAAAXAAAAAcAAAAfAAAAAAAAAJAMAAABAAAAXQAAAF4AAAAgAAAAXwAAAAAAAACgDAAAYAAAAGEAAAAHAAAAIQAAAAAAAACwDAAAAQAAAGIAAABjAAAAIgAAAGQAAAAAAAAAwAwAAGUAAABmAAAABwAAACMAAAAAAAAA0AwAAAEAAABnAAAAaAAAACQAAABpAAAAAAAAAOAMAABqAAAAawAAAAcAAAAlAAAAAAAAAPAMAAABAAAAbAAAAG0AAAAmAAAAbgAAAAAAAAAADQAAbwAAAHAAAAAHAAAAJwAAAAAAAAAQDQAAAQAAAHEAAAByAAAAKAAAAHMAAAAoDQAAyA8AACgNAAAIEAAAEBAAACgNAABQDQAAyA8AAFANAAAgEAAAyA8AAFANAAAIEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwDgAAdAAAAHUAAAB2AAAAdwAAAAIAAAABAAAAAQAAAAEAAAAAAAAAGA8AAHQAAAB4AAAAdgAAAHcAAAACAAAAAgAAAAIAAAACAAAAAAAAACgPAAB5AAAAegAAAAQAAAAAAAAAOA8AAHsAAAB8AAAABQAAAAAAAABIDwAACAAAAH0AAAABAAAAAAAAAFgPAAB7AAAAfgAAAAUAAAAAAAAAaA8AAHsAAAB/AAAABQAAAAAAAAC4DwAAdAAAAIAAAAB2AAAAdwAAAAMAAAAAAAAAiA8AAHQAAACBAAAAdgAAAHcAAAAEAAAAAAAAADgQAAB0AAAAggAAAHYAAAB3AAAAAgAAAAMAAAADAAAAAwAAAAAAAABIEAAAgwAAAIQAAAAGAAAAAAAAAHgQAACFAAAAhgAAAAcAAAABAAAABQAAAAYAAAACAAAAAAAAAKAQAACFAAAAhwAAAAgAAAADAAAABQAAAAYAAAAEAAAA4BcAAAQYAAAAAAAAsBAAAIgAAACJAAAAAQAAAExBU1ppcABvcGVuAGdldFBvaW50AGdldENvdW50AER5bmFtaWNMQVNaaXAAYWRkRmllbGRGbG9hdGluZwBhZGRGaWVsZFNpZ25lZABhZGRGaWVsZFVuc2lnbmVkAE5TdDNfXzIyMF9fc2hhcmVkX3B0cl9wb2ludGVySVBONmxhc3ppcDdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRU5TXzE0ZGVmYXVsdF9kZWxldGVJUzNfRUVOU185YWxsb2NhdG9ySVMzX0VFRUUATlN0M19fMjE0ZGVmYXVsdF9kZWxldGVJTjZsYXN6aXA3c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRQBOU3QzX18yMjBfX3NoYXJlZF9wdHJfcG9pbnRlcklQTjZsYXN6aXAyaW82cmVhZGVyMTBiYXNpY19maWxlSU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRU5TXzE0ZGVmYXVsdF9kZWxldGVJUzdfRUVOU185YWxsb2NhdG9ySVM3X0VFRUUATlN0M19fMjE0ZGVmYXVsdF9kZWxldGVJTjZsYXN6aXAyaW82cmVhZGVyMTBiYXNpY19maWxlSU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFAExBU0YATjZsYXN6aXAxM2ludmFsaWRfbWFnaWNFAGFsbG9jYXRvcjxUPjo6YWxsb2NhdGUoc2l6ZV90IG4pICduJyBleGNlZWRzIG1heGltdW0gc3VwcG9ydGVkIHNpemUARmlsZSBtYWdpYyBpcyBub3QgdmFsaWQATlN0M19fMjEwX19mdW5jdGlvbjZfX2Z1bmNJWk42bGFzemlwMmlvNnJlYWRlcjEwYmFzaWNfZmlsZUlOUzJfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRTExX3ZhbGlkYXRvcnNFdkVVbFJOUzNfNmhlYWRlckVFX05TXzlhbGxvY2F0b3JJU0JfRUVGdlNBX0VFRQBOU3QzX18yMTBfX2Z1bmN0aW9uNl9fYmFzZUlGdlJONmxhc3ppcDJpbzZoZWFkZXJFRUVFAE42bGFzemlwMjFvbGRfc3R5bGVfY29tcHJlc3Npb25FAE42bGFzemlwMTRub3RfY29tcHJlc3NlZEUAVGhlIGZpbGUgc2VlbXMgdG8gaGF2ZSBvbGQgc3R5bGUgY29tcHJlc3Npb24gd2hpY2ggaXMgbm90IHN1cHBvcnRlZABUaGUgZmlsZSBkb2Vzbid0IHNlZW0gdG8gYmUgY29tcHJlc3NlZABaTjZsYXN6aXAyaW82cmVhZGVyMTBiYXNpY19maWxlSU5TXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUUxMV92YWxpZGF0b3JzRXZFVWxSTlMwXzZoZWFkZXJFRV8AbGFzemlwIGVuY29kZWQATjZsYXN6aXAxM25vX2xhc3ppcF92bHJFAE42bGFzemlwMjVsYXN6aXBfZm9ybWF0X3Vuc3VwcG9ydGVkRQBPbmx5IExBU3ppcCBQT0lOVFdJU0UgQ0hVTktFRCBkZWNvbXByZXNzb3IgaXMgc3VwcG9ydGVkAE5vIExBU3ppcCBWTFIgd2FzIGZvdW5kIGluIHRoZSBWTFJzIHNlY3Rpb24ATjZsYXN6aXAyMmNodW5rX3RhYmxlX3JlYWRfZXJyb3JFAENodW5rIHRhYmxlIG9mZnNldCA9PSAtMSBpcyBub3Qgc3VwcG9ydGVkIGF0IHRoaXMgdGltZQBONmxhc3ppcDEzbm90X3N1cHBvcnRlZEUATjZsYXN6aXAyNnVua25vd25fY2h1bmtfdGFibGVfZm9ybWF0RQBjaHVua19zaXplID09IHVpbnQubWF4IGlzIG5vdCBzdXBwb3J0ZWQgYXQgdGhpcyB0aW1lLgBUaGVyZSB3YXMgYSBwcm9ibGVtIHJlYWRpbmcgdGhlIGNodW5rIHRhYmxlAFRoZSBjaHVuayB0YWJsZSB2ZXJzaW9uIG51bWJlciBpcyB1bmtub3duAE42bGFzemlwMTFlbmRfb2ZfZmlsZUUAUmVhY2hlZCBFbmQgb2YgZmlsZQBJbnZhbGlkIG51bWJlciBvZiBzeW1ib2xzAE5TdDNfXzIyMF9fc2hhcmVkX3B0cl9wb2ludGVySVBONmxhc3ppcDhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOU18xNGRlZmF1bHRfZGVsZXRlSVM5X0VFTlNfOWFsbG9jYXRvcklTOV9FRUVFAE5TdDNfXzIxNGRlZmF1bHRfZGVsZXRlSU42bGFzemlwOGRlY29kZXJzMTBhcml0aG1ldGljSU5TMV8yaW8xOF9faWZzdHJlYW1fd3JhcHBlcklOUzFfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRUVFRUVFAE42bGFzemlwMTl1bmtub3duX3NjaGVtYV90eXBlRQBUaGUgTEFaIHNjaGVtYSBpcyBub3QgcmVjb2duaXplZABONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2ZpZWxkX2RlY29tcHJlc3NvcklOU184ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlNfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlNfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyMGR5bmFtaWNfZGVjb21wcmVzc29yRQBOU3QzX18yMjBfX3NoYXJlZF9wdHJfcG9pbnRlcklQTjZsYXN6aXA3Zm9ybWF0czI2ZHluYW1pY19maWVsZF9kZWNvbXByZXNzb3JJTlMxXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVFRU5TXzE0ZGVmYXVsdF9kZWxldGVJU0NfRUVOU185YWxsb2NhdG9ySVNDX0VFRUUATlN0M19fMjE0ZGVmYXVsdF9kZWxldGVJTjZsYXN6aXA3Zm9ybWF0czI2ZHluYW1pY19maWVsZF9kZWNvbXByZXNzb3JJTlMxXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOU18yaW8xOF9faWZzdHJlYW1fd3JhcHBlcklOU183c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMwXzVmaWVsZElOUzBfM2xhczdwb2ludDEwRU5TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNDX0VFRUVFRQBONmxhc3ppcDdmb3JtYXRzMTBiYXNlX2ZpZWxkRQBOU3QzX18yMjBfX3NoYXJlZF9wdHJfcG9pbnRlcklQTjZsYXN6aXA3Zm9ybWF0czI2ZHluYW1pY19kZWNvbXByZXNzb3JfZmllbGRJTlMxXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzJfNWZpZWxkSU5TMl8zbGFzN3BvaW50MTBFTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0VfRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTSV9FRU5TXzlhbGxvY2F0b3JJU0lfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSU5TMV8yaW8xOF9faWZzdHJlYW1fd3JhcHBlcklOUzFfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRUVFRU5TMl81ZmllbGRJTlMyXzNsYXM3cG9pbnQxMEVOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTRV9FRUVFRUVFRQBONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOU184ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlNfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlNfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRUVFRU5TMF81ZmllbGRJTlMwXzNsYXM3Z3BzdGltZUVOUzBfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTQ19FRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzVmaWVsZElOUzJfM2xhczdncHN0aW1lRU5TMl8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNFX0VFRUVFRU5TXzE0ZGVmYXVsdF9kZWxldGVJU0lfRUVOU185YWxsb2NhdG9ySVNJX0VFRUUATlN0M19fMjE0ZGVmYXVsdF9kZWxldGVJTjZsYXN6aXA3Zm9ybWF0czI2ZHluYW1pY19kZWNvbXByZXNzb3JfZmllbGRJTlMxXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzJfNWZpZWxkSU5TMl8zbGFzN2dwc3RpbWVFTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0VfRUVFRUVFRUUATjZsYXN6aXA3Zm9ybWF0czI2ZHluYW1pY19kZWNvbXByZXNzb3JfZmllbGRJTlNfOGRlY29kZXJzMTBhcml0aG1ldGljSU5TXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzBfNWZpZWxkSU5TMF8zbGFzM3JnYkVOUzBfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTQ19FRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzVmaWVsZElOUzJfM2xhczNyZ2JFTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0VfRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTSV9FRU5TXzlhbGxvY2F0b3JJU0lfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSU5TMV8yaW8xOF9faWZzdHJlYW1fd3JhcHBlcklOUzFfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRUVFRU5TMl81ZmllbGRJTlMyXzNsYXMzcmdiRU5TMl8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNFX0VFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOU18yaW8xOF9faWZzdHJlYW1fd3JhcHBlcklOU183c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMwXzVmaWVsZElOUzBfM2xhczEwZXh0cmFieXRlc0VOUzBfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTQ19FRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzVmaWVsZElOUzJfM2xhczEwZXh0cmFieXRlc0VOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTRV9FRUVFRUVOU18xNGRlZmF1bHRfZGVsZXRlSVNJX0VFTlNfOWFsbG9jYXRvcklTSV9FRUVFAE5TdDNfXzIxNGRlZmF1bHRfZGVsZXRlSU42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzVmaWVsZElOUzJfM2xhczEwZXh0cmFieXRlc0VOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTRV9FRUVFRUVFRQBONmxhc3ppcDdmb3JtYXRzMjFkeW5hbWljX2RlY29tcHJlc3NvcjFJTlNfOGRlY29kZXJzMTBhcml0aG1ldGljSU5TXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzBfMTlyZWNvcmRfZGVjb21wcmVzc29ySUpOUzBfNWZpZWxkSU5TMF8zbGFzN3BvaW50MTBFTlMwXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0RfRUVFRUVFRUVFAE5TdDNfXzIyMF9fc2hhcmVkX3B0cl9wb2ludGVySVBONmxhc3ppcDdmb3JtYXRzMjFkeW5hbWljX2RlY29tcHJlc3NvcjFJTlMxXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzJfMTlyZWNvcmRfZGVjb21wcmVzc29ySUpOUzJfNWZpZWxkSU5TMl8zbGFzN3BvaW50MTBFTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0ZfRUVFRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTS19FRU5TXzlhbGxvY2F0b3JJU0tfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjFkeW5hbWljX2RlY29tcHJlc3NvcjFJTlMxXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzJfMTlyZWNvcmRfZGVjb21wcmVzc29ySUpOUzJfNWZpZWxkSU5TMl8zbGFzN3BvaW50MTBFTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0ZfRUVFRUVFRUVFRUUATjZsYXN6aXA3Zm9ybWF0czIxZHluYW1pY19kZWNvbXByZXNzb3IxSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOU18yaW8xOF9faWZzdHJlYW1fd3JhcHBlcklOU183c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMwXzE5cmVjb3JkX2RlY29tcHJlc3NvcklKTlMwXzVmaWVsZElOUzBfM2xhczdwb2ludDEwRU5TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNEX0VFRUVOU0JfSU5TQ183Z3BzdGltZUVOU0VfSVNIX0VFRUVFRUVFRQBOU3QzX18yMjBfX3NoYXJlZF9wdHJfcG9pbnRlcklQTjZsYXN6aXA3Zm9ybWF0czIxZHluYW1pY19kZWNvbXByZXNzb3IxSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzE5cmVjb3JkX2RlY29tcHJlc3NvcklKTlMyXzVmaWVsZElOUzJfM2xhczdwb2ludDEwRU5TMl8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNGX0VFRUVOU0RfSU5TRV83Z3BzdGltZUVOU0dfSVNKX0VFRUVFRUVFRU5TXzE0ZGVmYXVsdF9kZWxldGVJU05fRUVOU185YWxsb2NhdG9ySVNOX0VFRUUATlN0M19fMjE0ZGVmYXVsdF9kZWxldGVJTjZsYXN6aXA3Zm9ybWF0czIxZHluYW1pY19kZWNvbXByZXNzb3IxSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzE5cmVjb3JkX2RlY29tcHJlc3NvcklKTlMyXzVmaWVsZElOUzJfM2xhczdwb2ludDEwRU5TMl8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNGX0VFRUVOU0RfSU5TRV83Z3BzdGltZUVOU0dfSVNKX0VFRUVFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyMWR5bmFtaWNfZGVjb21wcmVzc29yMUlOU184ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlNfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlNfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRUVFRU5TMF8xOXJlY29yZF9kZWNvbXByZXNzb3JJSk5TMF81ZmllbGRJTlMwXzNsYXM3cG9pbnQxMEVOUzBfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTRF9FRUVFTlNCX0lOU0NfM3JnYkVOU0VfSVNIX0VFRUVFRUVFRQBOU3QzX18yMjBfX3NoYXJlZF9wdHJfcG9pbnRlcklQTjZsYXN6aXA3Zm9ybWF0czIxZHluYW1pY19kZWNvbXByZXNzb3IxSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzE5cmVjb3JkX2RlY29tcHJlc3NvcklKTlMyXzVmaWVsZElOUzJfM2xhczdwb2ludDEwRU5TMl8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNGX0VFRUVOU0RfSU5TRV8zcmdiRU5TR19JU0pfRUVFRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTTl9FRU5TXzlhbGxvY2F0b3JJU05fRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjFkeW5hbWljX2RlY29tcHJlc3NvcjFJTlMxXzhkZWNvZGVyczEwYXJpdGhtZXRpY0lOUzFfMmlvMThfX2lmc3RyZWFtX3dyYXBwZXJJTlMxXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzJfMTlyZWNvcmRfZGVjb21wcmVzc29ySUpOUzJfNWZpZWxkSU5TMl8zbGFzN3BvaW50MTBFTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0ZfRUVFRU5TRF9JTlNFXzNyZ2JFTlNHX0lTSl9FRUVFRUVFRUVFRQBONmxhc3ppcDdmb3JtYXRzMjFkeW5hbWljX2RlY29tcHJlc3NvcjFJTlNfOGRlY29kZXJzMTBhcml0aG1ldGljSU5TXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TXzdzdHJlYW1zMTNtZW1vcnlfc3RyZWFtRUVFRUVOUzBfMTlyZWNvcmRfZGVjb21wcmVzc29ySUpOUzBfNWZpZWxkSU5TMF8zbGFzN3BvaW50MTBFTlMwXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJU0RfRUVFRU5TQl9JTlNDXzdncHN0aW1lRU5TRV9JU0hfRUVFRU5TQl9JTlNDXzNyZ2JFTlNFX0lTS19FRUVFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyMWR5bmFtaWNfZGVjb21wcmVzc29yMUlOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSU5TMV8yaW8xOF9faWZzdHJlYW1fd3JhcHBlcklOUzFfN3N0cmVhbXMxM21lbW9yeV9zdHJlYW1FRUVFRU5TMl8xOXJlY29yZF9kZWNvbXByZXNzb3JJSk5TMl81ZmllbGRJTlMyXzNsYXM3cG9pbnQxMEVOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElTRl9FRUVFTlNEX0lOU0VfN2dwc3RpbWVFTlNHX0lTSl9FRUVFTlNEX0lOU0VfM3JnYkVOU0dfSVNNX0VFRUVFRUVFRU5TXzE0ZGVmYXVsdF9kZWxldGVJU1FfRUVOU185YWxsb2NhdG9ySVNRX0VFRUUATlN0M19fMjE0ZGVmYXVsdF9kZWxldGVJTjZsYXN6aXA3Zm9ybWF0czIxZHluYW1pY19kZWNvbXByZXNzb3IxSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJTlMxXzJpbzE4X19pZnN0cmVhbV93cmFwcGVySU5TMV83c3RyZWFtczEzbWVtb3J5X3N0cmVhbUVFRUVFTlMyXzE5cmVjb3JkX2RlY29tcHJlc3NvcklKTlMyXzVmaWVsZElOUzJfM2xhczdwb2ludDEwRU5TMl8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSVNGX0VFRUVOU0RfSU5TRV83Z3BzdGltZUVOU0dfSVNKX0VFRUVOU0RfSU5TRV8zcmdiRU5TR19JU01fRUVFRUVFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUDEwYnVmX3N0cmVhbU5TXzE0ZGVmYXVsdF9kZWxldGVJUzFfRUVOU185YWxsb2NhdG9ySVMxX0VFRUUATlN0M19fMjE0ZGVmYXVsdF9kZWxldGVJMTBidWZfc3RyZWFtRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTNV9FRU5TXzlhbGxvY2F0b3JJUzVfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZmllbGRfZGVjb21wcmVzc29ySU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRUVFAE5TdDNfXzIyMF9fc2hhcmVkX3B0cl9wb2ludGVySVBONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2ZpZWxkX2RlY29tcHJlc3NvcklOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFRUVOU18xNGRlZmF1bHRfZGVsZXRlSVM4X0VFTlNfOWFsbG9jYXRvcklTOF9FRUVFAE5TdDNfXzIxNGRlZmF1bHRfZGVsZXRlSU42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZmllbGRfZGVjb21wcmVzc29ySU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJMTBidWZfc3RyZWFtRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRU5TMF81ZmllbGRJaU5TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSWlFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJMTBidWZfc3RyZWFtRUVOUzJfNWZpZWxkSWlOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElpRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTQ19FRU5TXzlhbGxvY2F0b3JJU0NfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFTlMyXzVmaWVsZElpTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJaUVFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRU5TMF81ZmllbGRJak5TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSWpFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJMTBidWZfc3RyZWFtRUVOUzJfNWZpZWxkSWpOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElqRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTQ19FRU5TXzlhbGxvY2F0b3JJU0NfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFTlMyXzVmaWVsZElqTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJakVFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRU5TMF81ZmllbGRJYU5TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSWFFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJMTBidWZfc3RyZWFtRUVOUzJfNWZpZWxkSWFOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElhRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTQ19FRU5TXzlhbGxvY2F0b3JJU0NfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFTlMyXzVmaWVsZElhTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJYUVFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRU5TMF81ZmllbGRJc05TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSXNFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJMTBidWZfc3RyZWFtRUVOUzJfNWZpZWxkSXNOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZElzRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTQ19FRU5TXzlhbGxvY2F0b3JJU0NfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFTlMyXzVmaWVsZElzTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJc0VFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRU5TMF81ZmllbGRJaE5TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSWhFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJMTBidWZfc3RyZWFtRUVOUzJfNWZpZWxkSWhOUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZEloRUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTQ19FRU5TXzlhbGxvY2F0b3JJU0NfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFTlMyXzVmaWVsZEloTlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJaEVFRUVFRUVFAE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TXzhkZWNvZGVyczEwYXJpdGhtZXRpY0kxMGJ1Zl9zdHJlYW1FRU5TMF81ZmllbGRJdE5TMF8yMHN0YW5kYXJkX2RpZmZfbWV0aG9kSXRFRUVFRUUATlN0M19fMjIwX19zaGFyZWRfcHRyX3BvaW50ZXJJUE42bGFzemlwN2Zvcm1hdHMyNmR5bmFtaWNfZGVjb21wcmVzc29yX2ZpZWxkSU5TMV84ZGVjb2RlcnMxMGFyaXRobWV0aWNJMTBidWZfc3RyZWFtRUVOUzJfNWZpZWxkSXROUzJfMjBzdGFuZGFyZF9kaWZmX21ldGhvZEl0RUVFRUVFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTQ19FRU5TXzlhbGxvY2F0b3JJU0NfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlONmxhc3ppcDdmb3JtYXRzMjZkeW5hbWljX2RlY29tcHJlc3Nvcl9maWVsZElOUzFfOGRlY29kZXJzMTBhcml0aG1ldGljSTEwYnVmX3N0cmVhbUVFTlMyXzVmaWVsZEl0TlMyXzIwc3RhbmRhcmRfZGlmZl9tZXRob2RJdEVFRUVFRUVFADZMQVNaaXAAUDZMQVNaaXAAUEs2TEFTWmlwAGlpAHYAdmkAdmlpaWkAdmlpaQBpaWkAMTNEeW5hbWljTEFTWmlwAFAxM0R5bmFtaWNMQVNaaXAAUEsxM0R5bmFtaWNMQVNaaXAAdm9pZABib29sAGNoYXIAc2lnbmVkIGNoYXIAdW5zaWduZWQgY2hhcgBzaG9ydAB1bnNpZ25lZCBzaG9ydABpbnQAdW5zaWduZWQgaW50AGxvbmcAdW5zaWduZWQgbG9uZwBmbG9hdABkb3VibGUAc3RkOjpzdHJpbmcAc3RkOjpiYXNpY19zdHJpbmc8dW5zaWduZWQgY2hhcj4Ac3RkOjp3c3RyaW5nAHN0ZDo6dTE2c3RyaW5nAHN0ZDo6dTMyc3RyaW5nAGVtc2NyaXB0ZW46OnZhbABlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxjaGFyPgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxzaWduZWQgY2hhcj4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8dW5zaWduZWQgY2hhcj4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8c2hvcnQ+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PHVuc2lnbmVkIHNob3J0PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxpbnQ+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PHVuc2lnbmVkIGludD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8bG9uZz4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8dW5zaWduZWQgbG9uZz4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8aW50OF90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1aW50OF90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxpbnQxNl90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1aW50MTZfdD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8aW50MzJfdD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8dWludDMyX3Q+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PGZsb2F0PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxkb3VibGU+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PGxvbmcgZG91YmxlPgBOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0llRUUATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJZEVFAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SWZFRQBOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0ltRUUATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJbEVFAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SWpFRQBOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0lpRUUATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJdEVFAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SXNFRQBOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0loRUUATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJYUVFAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SWNFRQBOMTBlbXNjcmlwdGVuM3ZhbEUATlN0M19fMjEyYmFzaWNfc3RyaW5nSURpTlNfMTFjaGFyX3RyYWl0c0lEaUVFTlNfOWFsbG9jYXRvcklEaUVFRUUATlN0M19fMjIxX19iYXNpY19zdHJpbmdfY29tbW9uSUxiMUVFRQBOU3QzX18yMTJiYXNpY19zdHJpbmdJRHNOU18xMWNoYXJfdHJhaXRzSURzRUVOU185YWxsb2NhdG9ySURzRUVFRQBOU3QzX18yMTJiYXNpY19zdHJpbmdJd05TXzExY2hhcl90cmFpdHNJd0VFTlNfOWFsbG9jYXRvckl3RUVFRQBOU3QzX18yMTJiYXNpY19zdHJpbmdJaE5TXzExY2hhcl90cmFpdHNJaEVFTlNfOWFsbG9jYXRvckloRUVFRQBOU3QzX18yMTJiYXNpY19zdHJpbmdJY05TXzExY2hhcl90cmFpdHNJY0VFTlNfOWFsbG9jYXRvckljRUVFRQAtKyAgIDBYMHgAKG51bGwpAC0wWCswWCAwWC0weCsweCAweABpbmYASU5GAG5hbgBOQU4ALgB0ZXJtaW5hdGluZyB3aXRoICVzIGV4Y2VwdGlvbiBvZiB0eXBlICVzOiAlcwB0ZXJtaW5hdGluZyB3aXRoICVzIGV4Y2VwdGlvbiBvZiB0eXBlICVzAHRlcm1pbmF0aW5nIHdpdGggJXMgZm9yZWlnbiBleGNlcHRpb24AdGVybWluYXRpbmcAdW5jYXVnaHQAU3Q5ZXhjZXB0aW9uAE4xMF9fY3h4YWJpdjExNl9fc2hpbV90eXBlX2luZm9FAFN0OXR5cGVfaW5mbwBOMTBfX2N4eGFiaXYxMjBfX3NpX2NsYXNzX3R5cGVfaW5mb0UATjEwX19jeHhhYml2MTE3X19jbGFzc190eXBlX2luZm9FAHRlcm1pbmF0ZV9oYW5kbGVyIHVuZXhwZWN0ZWRseSByZXR1cm5lZABzdGQ6OmJhZF9hbGxvYwBTdDliYWRfYWxsb2MAU3QxMWxvZ2ljX2Vycm9yAFN0MTNydW50aW1lX2Vycm9yAFN0MTJsZW5ndGhfZXJyb3IAU3QxMm91dF9vZl9yYW5nZQBOMTBfX2N4eGFiaXYxMTdfX3BiYXNlX3R5cGVfaW5mb0UATjEwX19jeHhhYml2MTE5X19wb2ludGVyX3R5cGVfaW5mb0UATjEwX19jeHhhYml2MTIwX19mdW5jdGlvbl90eXBlX2luZm9FAE4xMF9fY3h4YWJpdjEyOV9fcG9pbnRlcl90b19tZW1iZXJfdHlwZV9pbmZvRQBQdXJlIHZpcnR1YWwgZnVuY3Rpb24gY2FsbGVkIQBOMTBfX2N4eGFiaXYxMjNfX2Z1bmRhbWVudGFsX3R5cGVfaW5mb0UAdgBEbgBiAGMAaABhAHMAdABpAGoAbABtAGYAZABOMTBfX2N4eGFiaXYxMjFfX3ZtaV9jbGFzc190eXBlX2luZm9FAF9fY3hhX2d1YXJkX2FjcXVpcmUgZGV0ZWN0ZWQgcmVjdXJzaXZlIGluaXRpYWxpemF0aW9uAHN0ZDo6YmFkX2Z1bmN0aW9uX2NhbGwATlN0M19fMjE3YmFkX2Z1bmN0aW9uX2NhbGxFAE5TdDNfXzIxNF9fc2hhcmVkX2NvdW50RQBOU3QzX18yMTlfX3NoYXJlZF93ZWFrX2NvdW50RQBtdXRleCBsb2NrIGZhaWxlZABiYXNpY19zdHJpbmcAdW5zcGVjaWZpZWQgZ2VuZXJpY19jYXRlZ29yeSBlcnJvcgBVbmtub3duIGVycm9yICVkAGdlbmVyaWMATlN0M19fMjI0X19nZW5lcmljX2Vycm9yX2NhdGVnb3J5RQBOU3QzX18yMTJfX2RvX21lc3NhZ2VFAE5TdDNfXzIxNGVycm9yX2NhdGVnb3J5RQB1bnNwZWNpZmllZCBzeXN0ZW1fY2F0ZWdvcnkgZXJyb3IAc3lzdGVtAE5TdDNfXzIyM19fc3lzdGVtX2Vycm9yX2NhdGVnb3J5RQBOU3QzX18yMTJzeXN0ZW1fZXJyb3JFADogAHZlY3Rvcg==";var Y={},J=[];function K(t){t&&Y[t].refcount++}function $(t){if(!t||Y[t])return t;for(var e in Y)for(var r=+e,n=Y[r].adjusted,i=n.length,a=0;a=ot&&e<=st?"_"+t:t}function lt(t,e){return t=ct(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function ut(t,e){var r=lt(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ht=void 0;function ft(t){throw new ht(t)}var dt=void 0;function pt(t){throw new dt(t)}function mt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&pt("Mismatched type converter count");for(var i=0;i>2])}function Pt(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=Pt(t,e,r.baseClass);return null===n?null:r.downcast(n)}var Dt={};function Ut(t,e){return e.ptrType&&e.ptr||pt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&pt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},xt(Object.create(t,{$$:{value:e}}))}function Ot(t,e,r,n,i,a,o,s,c,l,u){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=a,this.sharingPolicy=o,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=l,this.rawDestructor=u,i||void 0!==e.baseClass?this.toWireType=Bt:n?(this.toWireType=Rt,this.destructorFunction=null):(this.toWireType=kt,this.destructorFunction=null)}function Ft(t,r){t=rt(t);var n=function(e){for(var n=[],i=1;i>2)+n]);return r}function Vt(t){for(;t.length;){var e=t.pop();t.pop()(e)}}var Qt=[],jt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Wt(t){t>4&&0==--jt[t].refcount&&(jt[t]=void 0,Qt.push(t))}function Ht(t){switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=Qt.length?Qt.pop():jt.length;return jt[e]={refcount:1,value:t},e}}function Xt(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function qt(t,e){switch(e){case 2:return function(t){return this.fromWireType(C[t>>2])};case 3:return function(t){return this.fromWireType(T[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function Yt(t,e,r){switch(e){case 0:return r?function(t){return x[t]}:function(t){return w[t]};case 1:return r?function(t){return _[t>>1]}:function(t){return E[t>>1]};case 2:return r?function(t){return M[t>>2]}:function(t){return S[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}!function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);et=t}(),ht=e.BindingError=ut(Error,"BindingError"),dt=e.InternalError=ut(Error,"InternalError"),Mt.prototype.isAliasOf=function(t){if(!(this instanceof Mt))return!1;if(!(t instanceof Mt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,i=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return e===n&&r===i},Mt.prototype.clone=function(){if(this.$$.ptr||At(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=xt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},Mt.prototype.delete=function(){this.$$.ptr||At(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ft("Object already scheduled for deletion"),yt(this),bt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},Mt.prototype.isDeleted=function(){return!this.$$.ptr},Mt.prototype.deleteLater=function(){return this.$$.ptr||At(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ft("Object already scheduled for deletion"),_t.push(this),1===_t.length&&wt&&wt(Et),this.$$.deleteScheduled=!0,this},Ot.prototype.getPointee=function(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},Ot.prototype.destructor=function(t){this.rawDestructor&&this.rawDestructor(t)},Ot.prototype.argPackAdvance=8,Ot.prototype.readValueFromPointer=Lt,Ot.prototype.deleteObject=function(t){null!==t&&t.delete()},Ot.prototype.fromWireType=function(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=function(t,e){return e=function(t,e){for(void 0===e&&ft("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Dt[e]}(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function i(){return this.isSmartPointer?Ut(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ut(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var a,o=this.registeredClass.getActualType(e),s=St[o];if(!s)return i.call(this);a=this.isConst?s.constPointerType:s.pointerType;var c=Pt(e,this.registeredClass,a.registeredClass);return null===c?i.call(this):this.isSmartPointer?Ut(a.registeredClass.instancePrototype,{ptrType:a,ptr:c,smartPtrType:this,smartPtr:t}):Ut(a.registeredClass.instancePrototype,{ptrType:a,ptr:c})},e.getInheritedInstanceCount=function(){return Object.keys(Dt).length},e.getLiveInheritedInstances=function(){var t=[];for(var e in Dt)Dt.hasOwnProperty(e)&&t.push(Dt[e]);return t},e.flushPendingDeletes=Et,e.setDelayFunction=function(t){wt=t,_t.length&&wt&&wt(Et)},Nt=e.UnboundTypeError=ut(Error,"UnboundTypeError"),e.count_emval_handles=function(){for(var t=0,e=5;e255&&(Jt&&v(!1,"Character code "+n+" ("+String.fromCharCode(n)+") at offset "+r+" not in 0x00-0xFF."),n&=255),e.push(String.fromCharCode(n))}return e.join("")}var $t="function"==typeof atob?atob:function(t){var e,r,n,i,a,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",l=0;t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{e=s.indexOf(t.charAt(l++))<<2|(i=s.indexOf(t.charAt(l++)))>>4,r=(15&i)<<4|(a=s.indexOf(t.charAt(l++)))>>2,n=(3&a)<<6|(o=s.indexOf(t.charAt(l++))),c+=String.fromCharCode(e),64!==a&&(c+=String.fromCharCode(r)),64!==o&&(c+=String.fromCharCode(n))}while(l>a])},destructorFunction:null})},l:function(t,r,n,i,a,o,s,c,l,u,h,f,d){h=rt(h),o=Ft(a,o),c&&(c=Ft(s,c)),u&&(u=Ft(l,u)),d=Ft(f,d);var p=ct(h);!function(t,r,n){e.hasOwnProperty(t)?(ft("Cannot register public name '"+t+"' twice"),Ct(e,t,t),e.hasOwnProperty(n)&&ft("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),e[t].overloadTable[void 0]=r):e[t]=r}(p,(function(){Gt("Cannot construct "+h+" due to unbound types",[i])})),mt([t,r,n],i?[i]:[],(function(r){var n,a;r=r[0],a=i?(n=r.registeredClass).instancePrototype:Mt.prototype;var s=lt(p,(function(){if(Object.getPrototypeOf(this)!==l)throw new ht("Use 'new' to construct "+h);if(void 0===f.constructor_body)throw new ht(h+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new ht("Tried to invoke ctor of "+h+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),l=Object.create(a,{constructor:{value:s}});s.prototype=l;var f=new Tt(h,s,l,d,n,o,c,u),m=new Ot(h,f,!0,!1,!1),g=new Ot(h+"*",f,!1,!1,!1),A=new Ot(h+" const*",f,!1,!0,!1);return St[t]={pointerType:g,constPointerType:A},function(t,r,n){e.hasOwnProperty(t)||pt("Replacing nonexistant public symbol"),e[t].overloadTable,e[t]=r,e[t].argCount=n}(p,s),[m,g,A]}))},m:function(t,e,r,n,i,a){v(e>0);var o=Zt(e,r);i=Ft(n,i);var s=[a],c=[];mt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new ht("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=function(){Gt("Cannot construct "+t.name+" due to unbound types",o)},mt([],o,(function(n){return t.registeredClass.constructor_body[e-1]=function(){arguments.length!==e-1&&ft(r+" called with "+arguments.length+" arguments, expected "+(e-1)),c.length=0,s.length=e;for(var t=1;t0?", ":"")+h),f+=(l?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",s)f+="runDestructors(destructors);\n";else for(c=o?1:2;c>>s}}var c=-1!=e.indexOf("unsigned");gt(t,{name:e,fromWireType:o,toWireType:function(t,r){if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError('Cannot convert "'+Xt(r)+'" to '+this.name);if(ri)throw new TypeError('Passing a number "'+Xt(r)+'" from JS side to C/C++ side to an argument of type "'+e+'", which is outside the valid range ['+n+", "+i+"]!");return c?r>>>0:0|r},argPackAdvance:8,readValueFromPointer:Yt(e,a,0!==n),destructorFunction:null})},r:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function i(t){var e=S,r=e[t>>=2],i=e[t+1];return new n(b,i,r)}gt(t,{name:r=rt(r),fromWireType:i,argPackAdvance:8,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},s:function(t,e){var r="std::string"===(e=rt(e));gt(t,{name:e,fromWireType:function(t){var e,n,i,a=S[t>>2];if(r)for(var o=t+4,s=0;s<=a;++s){var c=t+4+s;if(0==w[c]||s==a){var l=(i=c-o,(n=o)?function(t,e,r){for(var n=e+r,i=e;t[i]&&!(i>=n);)++i;if(i-e>16&&t.subarray&&y)return y.decode(t.subarray(e,i));for(var a="";e>10,56320|1023&l)}}else a+=String.fromCharCode((31&o)<<6|s)}else a+=String.fromCharCode(o)}return a}(w,n,i):"");void 0===e?e=l:(e+=String.fromCharCode(0),e+=l),o=c+1}}else{var u=new Array(a);for(s=0;s=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&t.charCodeAt(++r)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}(e)}:function(){return e.length};var a=n(),o=ce(4+a+1);if(S[o>>2]=a,r&&i)(function(t,e,r,n){if(!(n>0))return 0;for(var i=r,a=r+n-1,o=0;o=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++o)),s<=127){if(r>=a)break;e[r++]=s}else if(s<=2047){if(r+1>=a)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=a)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=a)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}e[r]=0})(e,w,o+4,a+1);else if(i)for(var s=0;s255&&(se(o),ft("String has UTF-16 code units that do not fit in 8 bits")),w[o+4+s]=c}else for(s=0;s>2],o=a(),c=t+4,l=0;l<=i;++l){var u=t+4+l*e;if(0==o[u>>s]||l==i){var h=n(c,u-c);void 0===r?r=h:(r+=String.fromCharCode(0),r+=h),c=u+e}}return se(t),r},toWireType:function(t,n){"string"!=typeof n&&ft("Cannot pass non-string to C++ string type "+r);var a=o(n),c=ce(4+a+e);return S[c>>2]=a>>s,i(n,c+4,a+e),null!==t&&t.push(se,c),c},argPackAdvance:8,readValueFromPointer:Lt,destructorFunction:function(t){se(t)}})},u:function(t,e){gt(t,{isVoid:!0,name:e=rt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},v:Wt,w:Ht,x:function(){W()},y:Xt,z:function(){return w.length}},ie=function(t,e,r){"use asm";var n=new t.Int8Array(r),i=new t.Int16Array(r),a=new t.Int32Array(r),o=new t.Uint8Array(r),s=new t.Uint16Array(r),c=new t.Float32Array(r),l=new t.Float64Array(r),u=e.D|0,h=0,f=0,d=0,p=0,m=0,g=0,A=0,v=0.0,y=t.Math.imul,b=t.Math.clz32,x=e.a,w=e.b,_=e.c,E=e.d,M=e.e,S=e.f,C=e.g,T=e.h,I=e.i,R=e.j,B=e.k,k=e.l,L=e.m,P=e.n,D=e.o,U=e.p,O=e.q,F=e.r,N=e.s,z=e.t,G=e.u,Z=e.v,V=e.w,Q=e.x,j=e.y,W=e.z,H=e.A,X=e.B,q=e.C,Y=22384,J=5265264,K=0.0;function $(){Yh();Jh()}function tt(){et(0);return}function et(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0,f=0;t=Y;Y=Y+16|0;e=t+8|0;r=t;du();f=mu()|0;o=gu()|0;i=vu()|0;s=yu()|0;c=bu()|0;l=xu()|0;u=Cu()|0;h=Tu()|0;n=Tu()|0;k(i|0,s|0,c|0,l|0,u|0,9,h|0,f|0,n|0,o|0,6204,Iu()|0,138);Bu(1);a[r>>2]=5;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];Fu(6211,e);a[r>>2]=3;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];Xu(6216,e);a[r>>2]=10;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];rh(6225,e);uh();o=fh()|0;n=dh()|0;f=mh()|0;h=gh()|0;u=Ah()|0;l=xu()|0;c=Cu()|0;s=Tu()|0;i=Tu()|0;k(f|0,h|0,u|0,l|0,c|0,11,s|0,o|0,i|0,n|0,6234,Iu()|0,139);Eh(2);a[r>>2]=6;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];Bh(6211,e);a[r>>2]=4;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];Fh(6248,e);a[r>>2]=5;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];Fh(6265,e);a[r>>2]=6;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];Fh(6280,e);a[r>>2]=7;a[r+4>>2]=0;a[e>>2]=a[r>>2];a[e+4>>2]=a[r+4>>2];Qh(6216,e);Y=t;return}function rt(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0,c=0;n=Y;Y=Y+32|0;s=n+16|0;i=n+8|0;c=n;o=qm(20)|0;ut(o,e,r);a[c>>2]=0;a[s>>2]=a[c>>2];ft(i,o,s);e=a[i>>2]|0;a[i>>2]=a[t>>2];a[t>>2]=e;e=i+4|0;r=t+4|0;o=a[e>>2]|0;a[e>>2]=a[r>>2];a[r>>2]=o;dt(i);r=qm(352)|0;ht(r,a[t>>2]|0);o=t+8|0;a[c>>2]=0;a[s>>2]=a[c>>2];wt(i,r,s);r=a[i>>2]|0;a[i>>2]=a[o>>2];a[o>>2]=r;o=i+4|0;r=t+12|0;e=a[o>>2]|0;a[o>>2]=a[r>>2];a[r>>2]=e;_t(i);Y=n;return}function nt(t,e){t=t|0;e=e|0;Xr(a[t+8>>2]|0,e);return}function it(t){t=t|0;t=(Ps(a[t+8>>2]|0)|0)+107|0;return o[t>>0]|o[t+1>>0]<<8|o[t+2>>0]<<16|o[t+3>>0]<<24|0}function at(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0,c=0;n=Y;Y=Y+32|0;o=n+16|0;i=n+8|0;s=n;c=qm(12)|0;Ds(c,e,r);a[s>>2]=0;a[o>>2]=a[s>>2];Ns(i,c,o);c=a[i>>2]|0;a[i>>2]=a[t>>2];a[t>>2]=c;c=i+4|0;r=t+4|0;e=a[c>>2]|0;a[c>>2]=a[r>>2];a[r>>2]=e;zs(i);r=t+8|0;e=qm(12)|0;Us(e,a[t>>2]|0);a[s>>2]=0;a[o>>2]=a[s>>2];Ws(i,e,o);e=a[i>>2]|0;a[i>>2]=a[r>>2];a[r>>2]=e;e=i+4|0;s=t+12|0;c=a[e>>2]|0;a[e>>2]=a[s>>2];a[s>>2]=c;Hs(i);Os(i,a[r>>2]|0);r=t+16|0;s=a[i>>2]|0;c=i+4|0;e=a[c>>2]|0;a[i>>2]=0;a[c>>2]=0;a[o>>2]=a[r>>2];a[r>>2]=s;r=t+20|0;a[o+4>>2]=a[r>>2];a[r>>2]=e;Fs(o);Fs(i);Y=n;return}function ot(t,e){t=t|0;e=e|0;var r=0;t=t+16|0;r=a[t>>2]|0;t:do{if(r|0)switch(e|0){case 4:{fc(r);break t}case 8:{dc(r);dc(a[t>>2]|0);break t}default:break t}}while(0);return}function st(t,e){t=t|0;e=e|0;var r=0;r=t+16|0;t=a[r>>2]|0;t:do{if(t|0){switch(e|0){case 1:{$c(t);break t}case 2:{tl(t);break t}case 8:{fc(t);t=a[r>>2]|0;break}case 4:break;default:break t}fc(t)}}while(0);return}function ct(t,e){t=t|0;e=e|0;var r=0;r=t+16|0;t=a[r>>2]|0;t:do{if(t|0){switch(e|0){case 1:{Dl(t);break t}case 2:{Ul(t);break t}case 8:{dc(t);t=a[r>>2]|0;break}case 4:break;default:break t}dc(t)}}while(0);return}function lt(t,e){t=t|0;e=e|0;t=a[t+16>>2]|0;if(t|0)GA[a[a[t>>2]>>2]&63](t,e)|0;return}function ut(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;a[t+4>>2]=r;a[t+8>>2]=0;n[t+12>>0]=0;n[t+13>>0]=0;a[t+16>>2]=0;return}function ht(t,e){t=t|0;e=e|0;a[t>>2]=e;Ft(t+4|0,e);Nt(t+247|0);a[t+288>>2]=0;a[t+292>>2]=0;a[t+296>>2]=0;zt(t+300|0);e=t+312|0;a[e>>2]=0;a[e+4>>2]=0;a[e+8>>2]=0;a[e+12>>2]=0;Gt(t+328|0);Zt(t);return}function ft(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4296;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;pt(t,n);Y=r;return}function dt(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){QA[a[(a[t>>2]|0)+8>>2]&255](t);sg(t)}return}function pt(t,e){t=t|0;e=e|0;return}function mt(t){t=t|0;M(t|0)|0;rm()}function gt(t){t=t|0;og(t);tm(t);return}function At(t){t=t|0;t=a[t+12>>2]|0;if(t|0)tm(t);return}function vt(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==6407?t+12|0:0)|0}function yt(t){t=t|0;bt(t,16);return}function bt(t,e){t=t|0;e=e|0;xt(t);return}function xt(t){t=t|0;tm(t);return}function wt(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4324;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Et(t,n);Y=r;return}function _t(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){QA[a[(a[t>>2]|0)+8>>2]&255](t);sg(t)}return}function Et(t,e){t=t|0;e=e|0;return}function Mt(t){t=t|0;og(t);tm(t);return}function St(t){t=t|0;t=a[t+12>>2]|0;if(t|0){It(t);tm(t)}return}function Ct(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==6605?t+12|0:0)|0}function Tt(t){t=t|0;bt(t,16);return}function It(t){t=t|0;Rt(t+320|0);Bt(t+312|0);kt(t+300|0);Ut(t+288|0);Lt(t+247|0);Pt(t+4|0);return}function Rt(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){QA[a[(a[t>>2]|0)+8>>2]&255](t);sg(t)}return}function Bt(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){QA[a[(a[t>>2]|0)+8>>2]&255](t);sg(t)}return}function kt(t){t=t|0;Dt(t);return}function Lt(t){t=t|0;t=t+34|0;t=o[t>>0]|o[t+1>>0]<<8|o[t+2>>0]<<16|o[t+3>>0]<<24;if(t|0)Jm(t);return}function Pt(t){t=t|0;Ot(a[t+12>>2]|0);return}function Dt(t){t=t|0;var e=0,r=0;e=a[t>>2]|0;r=e;if(e|0){a[t+4>>2]=r;bt(e,(a[t+8>>2]|0)-r|0)}return}function Ut(t){t=t|0;var e=0,r=0;e=a[t>>2]|0;r=e;if(e|0){a[t+4>>2]=r;bt(e,(a[t+8>>2]|0)-r|0)}return}function Ot(t){t=t|0;qg(a[t+-4>>2]|0);return}function Ft(t,e){t=t|0;e=e|0;a[t>>2]=e;a[t+4>>2]=0;a[t+8>>2]=0;a[t+12>>2]=Vt(1048576)|0;return}function Nt(t){t=t|0;var e=0;e=t+32|0;n[e>>0]=0;n[e+1>>0]=0;t=t+34|0;n[t>>0]=0;n[t+1>>0]=0;n[t+2>>0]=0;n[t+3>>0]=0;return}function zt(t){t=t|0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;return}function Gt(t){t=t|0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;a[t+12>>2]=0;t=t+16|0;a[t>>2]=-1;a[t+4>>2]=-1;return}function Zt(t){t=t|0;var e=0,r=0,i=0,o=0,s=0,c=0;c=Y;Y=Y+64|0;o=c+32|0;r=c+56|0;e=c+16|0;s=c;Qt(a[t>>2]|0,r,4);ne(o,r,r+4|0);r=re(6693)|0;i=n[o+11>>0]|0;if((r|0)==((i<<24>>24<0?a[o+4>>2]|0:i&255)|0)){i=(Eg(o,0,-1,6693,r)|0)==0;yg(o);if(i){r=a[t>>2]|0;a[e>>2]=0;a[e+4>>2]=0;a[e+8>>2]=0;a[e+12>>2]=0;a[o>>2]=a[e>>2];a[o+4>>2]=a[e+4>>2];a[o+8>>2]=a[e+8>>2];a[o+12>>2]=a[e+12>>2];Wt(r,o);r=t+20|0;Qt(a[t>>2]|0,r,227);Ht(t,r);i=Xt()|0;e=a[i>>2]|0;i=a[i+4>>2]|0;if((e|0)!=(i|0))do{qt(o,e);Yt(o,r);Jt(o);e=e+24|0}while((e|0)!=(i|0));Kt(t);$t(t);te(a[t>>2]|0);i=a[t>>2]|0;e=(a[t+116>>2]|0)+8|0;r=s;a[r>>2]=0;a[r+4>>2]=0;r=s+8|0;a[r>>2]=e;a[r+4>>2]=0;a[o>>2]=a[s>>2];a[o+4>>2]=a[s+4>>2];a[o+8>>2]=a[s+8>>2];a[o+12>>2]=a[s+12>>2];Wt(i,o);ee(t+4|0);Y=c;return}}else yg(o);c=E(8)|0;jt(c);S(c|0,2592,8)}function Vt(t){t=t|0;var e=0;e=Xg(t+68|0)|0;t=e+68&-64;a[t+-4>>2]=e;return t|0}function Qt(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,c=0,l=0,u=0;c=t+13|0;if(!(n[c>>0]|0)){s=t+4|0;i=a[s>>2]|0;l=t+8|0;o=a[l>>2]|0;u=i-o|0;r=(u|0)<(r|0)?u:r;if(r){fA(e|0,(a[t>>2]|0)+o|0,r|0)|0;o=a[l>>2]|0;i=a[s>>2]|0}u=o+r|0;a[l>>2]=u;a[t+16>>2]=r;if((u|0)>=(i|0))n[c>>0]=1}else n[t+12>>0]=1;return}function jt(t){t=t|0;pg(t,6791);a[t>>2]=4352;return}function Wt(t,e){t=t|0;e=e|0;var r=0,i=0,o=0;o=e+8|0;e=a[o>>2]|0;o=a[o+4>>2]|0;r=a[t+4>>2]|0;i=((r|0)<0)<<31>>31;if((o|0)<(i|0)|(o|0)==(i|0)&e>>>0>>0)a[t+8>>2]=e;else n[t+12>>0]=1;return}function Ht(t,e){t=t|0;e=e|0;var r=0.0,i=0.0,a=0,o=0.0,s=0,c=0.0,h=0,f=0.0,d=0,p=0.0;d=e+179|0;n[u>>0]=n[d>>0];n[u+1>>0]=n[d+1>>0];n[u+2>>0]=n[d+2>>0];n[u+3>>0]=n[d+3>>0];n[u+4>>0]=n[d+4>>0];n[u+5>>0]=n[d+5>>0];n[u+6>>0]=n[d+6>>0];n[u+7>>0]=n[d+7>>0];f=+l[u>>3];s=e+187|0;n[u>>0]=n[s>>0];n[u+1>>0]=n[s+1>>0];n[u+2>>0]=n[s+2>>0];n[u+3>>0]=n[s+3>>0];n[u+4>>0]=n[s+4>>0];n[u+5>>0]=n[s+5>>0];n[u+6>>0]=n[s+6>>0];n[u+7>>0]=n[s+7>>0];p=+l[u>>3];t=e+195|0;n[u>>0]=n[t>>0];n[u+1>>0]=n[t+1>>0];n[u+2>>0]=n[t+2>>0];n[u+3>>0]=n[t+3>>0];n[u+4>>0]=n[t+4>>0];n[u+5>>0]=n[t+5>>0];n[u+6>>0]=n[t+6>>0];n[u+7>>0]=n[t+7>>0];o=+l[u>>3];h=e+203|0;n[u>>0]=n[h>>0];n[u+1>>0]=n[h+1>>0];n[u+2>>0]=n[h+2>>0];n[u+3>>0]=n[h+3>>0];n[u+4>>0]=n[h+4>>0];n[u+5>>0]=n[h+5>>0];n[u+6>>0]=n[h+6>>0];n[u+7>>0]=n[h+7>>0];c=+l[u>>3];a=e+211|0;n[u>>0]=n[a>>0];n[u+1>>0]=n[a+1>>0];n[u+2>>0]=n[a+2>>0];n[u+3>>0]=n[a+3>>0];n[u+4>>0]=n[a+4>>0];n[u+5>>0]=n[a+5>>0];n[u+6>>0]=n[a+6>>0];n[u+7>>0]=n[a+7>>0];r=+l[u>>3];e=e+219|0;n[u>>0]=n[e>>0];n[u+1>>0]=n[e+1>>0];n[u+2>>0]=n[e+2>>0];n[u+3>>0]=n[e+3>>0];n[u+4>>0]=n[e+4>>0];n[u+5>>0]=n[e+5>>0];n[u+6>>0]=n[e+6>>0];n[u+7>>0]=n[e+7>>0];i=+l[u>>3];l[u>>3]=p;n[d>>0]=n[u>>0];n[d+1>>0]=n[u+1>>0];n[d+2>>0]=n[u+2>>0];n[d+3>>0]=n[u+3>>0];n[d+4>>0]=n[u+4>>0];n[d+5>>0]=n[u+5>>0];n[d+6>>0]=n[u+6>>0];n[d+7>>0]=n[u+7>>0];l[u>>3]=f;n[h>>0]=n[u>>0];n[h+1>>0]=n[u+1>>0];n[h+2>>0]=n[u+2>>0];n[h+3>>0]=n[u+3>>0];n[h+4>>0]=n[u+4>>0];n[h+5>>0]=n[u+5>>0];n[h+6>>0]=n[u+6>>0];n[h+7>>0]=n[u+7>>0];l[u>>3]=c;n[s>>0]=n[u>>0];n[s+1>>0]=n[u+1>>0];n[s+2>>0]=n[u+2>>0];n[s+3>>0]=n[u+3>>0];n[s+4>>0]=n[u+4>>0];n[s+5>>0]=n[u+5>>0];n[s+6>>0]=n[u+6>>0];n[s+7>>0]=n[u+7>>0];l[u>>3]=o;n[a>>0]=n[u>>0];n[a+1>>0]=n[u+1>>0];n[a+2>>0]=n[u+2>>0];n[a+3>>0]=n[u+3>>0];n[a+4>>0]=n[u+4>>0];n[a+5>>0]=n[u+5>>0];n[a+6>>0]=n[u+6>>0];n[a+7>>0]=n[u+7>>0];l[u>>3]=i;n[t>>0]=n[u>>0];n[t+1>>0]=n[u+1>>0];n[t+2>>0]=n[u+2>>0];n[t+3>>0]=n[u+3>>0];n[t+4>>0]=n[u+4>>0];n[t+5>>0]=n[u+5>>0];n[t+6>>0]=n[u+6>>0];n[t+7>>0]=n[u+7>>0];l[u>>3]=r;n[e>>0]=n[u>>0];n[e+1>>0]=n[u+1>>0];n[e+2>>0]=n[u+2>>0];n[e+3>>0]=n[u+3>>0];n[e+4>>0]=n[u+4>>0];n[e+5>>0]=n[u+5>>0];n[e+6>>0]=n[u+6>>0];n[e+7>>0]=n[u+7>>0];return}function Xt(){var t=0,e=0,r=0,i=0,o=0,s=0,c=0,l=0;o=Y;Y=Y+48|0;r=o+24|0;i=o;t=o+44|0;if((n[21440]|0)==0?Um(21440)|0:0){a[5374]=0;a[5375]=0;a[5376]=0;Qm(21440)}if((n[21448]|0)==0?Um(21448)|0:0)Qm(21448);if((a[5374]|0)==(a[5375]|0)){cg(21508);if((a[5374]|0)==(a[5375]|0)){n[r>>0]=n[t>>0]|0;oe(i,r);t=a[5375]|0;do{if(t>>>0>=(a[5376]|0)>>>0){t=((t-(a[5374]|0)|0)/24|0)+1|0;e=pe(21496)|0;if(e>>>0>>0)Hg(21496);else{s=a[5374]|0;l=((a[5376]|0)-s|0)/24|0;c=l<<1;he(r,l>>>0>>1>>>0?c>>>0>>0?t:c:e,((a[5375]|0)-s|0)/24|0,21504);e=r+8|0;le(a[e>>2]|0,i);a[e>>2]=(a[e>>2]|0)+24;fe(21496,r);de(r);break}}else{se(r,21496,1);l=r+4|0;le(a[l>>2]|0,i);a[l>>2]=(a[l>>2]|0)+24;ce(r)}}while(0);Jt(i)}lg(21508)}Y=o;return 21496}function qt(t,e){t=t|0;e=e|0;var r=0,n=0;r=e+16|0;n=a[r>>2]|0;do{if(n){if((e|0)==(n|0)){n=ue(t)|0;a[t+16>>2]=n;r=a[r>>2]|0;jA[a[(a[r>>2]|0)+12>>2]&15](r,n);break}else{a[t+16>>2]=NA[a[(a[n>>2]|0)+8>>2]&15](n)|0;break}}else a[t+16>>2]=0}while(0);return}function Yt(t,e){t=t|0;e=e|0;t=a[t+16>>2]|0;if(!t){e=E(4)|0;a[e>>2]=0;Re(e);S(e|0,4168,131)}else{jA[a[(a[t>>2]|0)+24>>2]&15](t,e);return}}function Jt(t){t=t|0;var e=0;e=a[t+16>>2]|0;if((t|0)!=(e|0)){if(e|0)QA[a[(a[e>>2]|0)+20>>2]&255](e)}else QA[a[(a[e>>2]|0)+16>>2]&255](e);return}function Kt(t){t=t|0;var e=0,r=0,i=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0,g=0;g=Y;Y=Y+96|0;c=g+16|0;p=g;h=g+72|0;l=a[t>>2]|0;f=s[t+114>>1]|0;d=p;a[d>>2]=0;a[d+4>>2]=0;d=p+8|0;a[d>>2]=f;a[d+4>>2]=0;a[c>>2]=a[p>>2];a[c+4>>2]=a[p+4>>2];a[c+8>>2]=a[p+8>>2];a[c+12>>2]=a[p+12>>2];Wt(l,c);l=t+120|0;t:do{if(a[l>>2]|0){u=c+2|0;f=c+16|0;d=c+20|0;p=c+18|0;r=0;while(1){if(!(Be(a[t>>2]|0)|0))break t;if(ke(a[t>>2]|0)|0)break t;Qt(a[t>>2]|0,c,54);e=7277;i=u;while(1){if((n[i>>0]|0)!=(n[e>>0]|0))break;i=i+1|0;if((i|0)==(f|0)){m=8;break}else e=e+1|0}if((m|0)==8?(m=0,(o[p>>0]|o[p+1>>0]<<8)<<16>>16==22204):0)break;Pe(a[t>>2]|0,(o[d>>0]|o[d+1>>0]<<8)&65535,0,1);r=r+1|0;if(r>>>0>=(a[l>>2]|0)>>>0)break t}p=(o[d>>0]|o[d+1>>0]<<8)&65535;m=Ym(p)|0;Qt(a[t>>2]|0,m,p);Le(t,m);tm(m);m=t+125|0;Ue(h,t+247|0,(o[m>>0]|o[m+1>>0]<<8)&65535);Oe(t+300|0,h)|0;kt(h);Y=g;return}}while(0);g=E(8)|0;De(g);S(g|0,2672,8)}function $t(t){t=t|0;var e=0,r=0,n=0,i=0,s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0;d=Y;Y=Y+176|0;i=d+40|0;s=d+24|0;e=d+16|0;n=d;u=d+152|0;h=d+136|0;f=d+56|0;l=a[t>>2]|0;c=t+116|0;p=a[c>>2]|0;r=s;a[r>>2]=0;a[r+4>>2]=0;r=s+8|0;a[r>>2]=p;a[r+4>>2]=0;a[i>>2]=a[s>>2];a[i+4>>2]=a[s+4>>2];a[i+8>>2]=a[s+8>>2];a[i+12>>2]=a[s+12>>2];Wt(l,i);l=e;a[l>>2]=0;a[l+4>>2]=0;Qt(a[t>>2]|0,e,8);if(!(Be(a[t>>2]|0)|0)){p=E(8)|0;Ke(p);S(p|0,2704,8)}r=e;e=a[r>>2]|0;r=a[r+4>>2]|0;if((e|0)==-1&(r|0)==-1){p=E(8)|0;$e(p,7488);S(p|0,2720,8)}p=a[t>>2]|0;l=n;a[l>>2]=0;a[l+4>>2]=0;l=n+8|0;a[l>>2]=e;a[l+4>>2]=r;a[i>>2]=a[n>>2];a[i+4>>2]=a[n+4>>2];a[i+8>>2]=a[n+8>>2];a[i+12>>2]=a[n+12>>2];Wt(p,i);if(!(Be(a[t>>2]|0)|0)){p=E(8)|0;Ke(p);S(p|0,2704,8)}Qt(a[t>>2]|0,i,8);if(!(Be(a[t>>2]|0)|0)){p=E(8)|0;Ke(p);S(p|0,2704,8)}if(a[i>>2]|0){p=E(8)|0;tr(p);S(p|0,2736,8)}s=t+288|0;l=t+292|0;a[l>>2]=a[s>>2];p=t+259|0;if((o[p>>0]|o[p+1>>0]<<8|o[p+2>>0]<<16|o[p+3>>0]<<24|0)==-1){p=E(8)|0;$e(p,7606);S(p|0,2720,8)}n=i+4|0;er(s,(a[n>>2]|0)+1|0);p=a[s>>2]|0;a[p>>2]=(a[c>>2]|0)+8;a[p+4>>2]=0;if((a[n>>2]|0)>>>0>1){Ft(u,a[t>>2]|0);rr(h,u);nr(f,32,2,8,0);ir(h);ar(f);if(!(a[n>>2]|0)){s=a[s>>2]|0;r=s}else{r=1;do{if(r>>>0>1)e=a[(a[s>>2]|0)+(r+-1<<3)>>2]|0;else e=0;c=or(f,h,e,1)|0;e=a[s>>2]|0;p=e+(r<<3)|0;a[p>>2]=c;a[p+4>>2]=((c|0)<0)<<31>>31;r=r+1|0}while(r>>>0<=(a[n>>2]|0)>>>0);r=e;s=e}e=a[l>>2]|0;if(e-r>>3>>>0>1){i=e-s>>3;n=s;e=1;r=a[n>>2]|0;n=a[n+4>>2]|0;do{p=s+(e<<3)|0;l=p;r=rA(a[l>>2]|0,a[l+4>>2]|0,r|0,n|0)|0;n=_()|0;a[p>>2]=r;a[p+4>>2]=n;e=e+1|0}while(e>>>0>>0)}sr(f);cr(h);Pt(u)}Y=d;return}function te(t){t=t|0;n[t+12>>0]=0;n[t+13>>0]=0;return}function ee(t){t=t|0;a[t+8>>2]=0;a[t+4>>2]=0;return}function re(t){t=t|0;return Yd(t)|0}function ne(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,c=0,l=0,u=0;c=Y;Y=Y+16|0;o=e;s=c;i=r-o|0;if(i>>>0>4294967279)mg(t);if(i>>>0<11)n[t+11>>0]=i;else{u=i+16&-16;l=qm(u)|0;a[t>>2]=l;a[t+8>>2]=u|-2147483648;a[t+4>>2]=i;t=l}if((e|0)!=(r|0)){o=r-o|0;i=t;while(1){ie(i,e);e=e+1|0;if((e|0)==(r|0))break;else i=i+1|0}t=t+o|0}n[s>>0]=0;ie(t,s);Y=c;return}function ie(t,e){t=t|0;e=e|0;n[t>>0]=n[e>>0]|0;return}function ae(t){t=t|0;mm(t);tm(t);return}function oe(t,e){t=t|0;e=e|0;a[t>>2]=4372;a[t+16>>2]=t;return}function se(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;e=a[e+4>>2]|0;a[t+4>>2]=e;a[t+8>>2]=e+(r*24|0);return}function ce(t){t=t|0;a[(a[t>>2]|0)+4>>2]=a[t+4>>2];return}function le(t,e){t=t|0;e=e|0;var r=0,n=0;r=e+16|0;n=a[r>>2]|0;do{if(n){if((e|0)==(n|0)){n=ue(t)|0;a[t+16>>2]=n;r=a[r>>2]|0;jA[a[(a[r>>2]|0)+12>>2]&15](r,n);break}else{a[t+16>>2]=n;a[r>>2]=0;break}}else a[t+16>>2]=0}while(0);return}function ue(t){t=t|0;return t|0}function he(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0;i=t+12|0;a[i>>2]=0;a[t+16>>2]=n;do{if(e){if(e>>>0>178956970){i=E(8)|0;fg(i,6723);a[i>>2]=5956;S(i|0,3928,123)}else{n=qm(e*24|0)|0;break}}else n=0}while(0);a[t>>2]=n;r=n+(r*24|0)|0;a[t+8>>2]=r;a[t+4>>2]=r;a[i>>2]=n+(e*24|0);return}function fe(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,c=0,l=0;c=a[t>>2]|0;l=t+4|0;r=a[l>>2]|0;s=e+4|0;if((r|0)==(c|0)){i=s;o=t;n=a[s>>2]|0;r=c}else{n=a[s>>2]|0;do{r=r+-24|0;le(n+-24|0,r);n=(a[s>>2]|0)+-24|0;a[s>>2]=n}while((r|0)!=(c|0));i=s;o=t;r=a[t>>2]|0}a[o>>2]=n;a[i>>2]=r;c=e+8|0;s=a[l>>2]|0;a[l>>2]=a[c>>2];a[c>>2]=s;c=t+8|0;l=e+12|0;t=a[c>>2]|0;a[c>>2]=a[l>>2];a[l>>2]=t;a[e>>2]=a[i>>2];return}function de(t){t=t|0;var e=0,r=0,n=0,i=0;r=a[t+4>>2]|0;n=t+8|0;e=a[n>>2]|0;if((e|0)!=(r|0))do{i=e+-24|0;a[n>>2]=i;Jt(i);e=a[n>>2]|0}while((e|0)!=(r|0));e=a[t>>2]|0;if(e|0)bt(e,(a[t+12>>2]|0)-e|0);return}function pe(t){t=t|0;return 178956970}function me(t){t=t|0;tm(t);return}function ge(t){t=t|0;t=qm(8)|0;a[t>>2]=4372;return t|0}function Ae(t,e){t=t|0;e=e|0;a[e>>2]=4372;return}function ve(t){t=t|0;return}function ye(t){t=t|0;bt(t,8);return}function be(t,e){t=t|0;e=e|0;Ee(t+4|0,e);return}function xe(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==7183?t+4|0:0)|0}function we(t){t=t|0;return 2664}function _e(t){t=t|0;return}function Ee(t,e){t=t|0;e=e|0;Me(t,e);return}function Me(t,e){t=t|0;e=e|0;var r=0,i=0;t=e+104|0;e=o[t>>0]|0;r=e>>>7;i=e>>>6&1;if((r|0)==1&(i|0)!=0){i=E(8)|0;Se(i);S(i|0,2632,8)}if((r|0)==(i|0)){i=E(8)|0;Ce(i);S(i|0,2648,8)}else{n[t>>0]=e&63;return}}function Se(t){t=t|0;pg(t,7076);a[t>>2]=4416;return}function Ce(t){t=t|0;pg(t,7144);a[t>>2]=4436;return}function Te(t){t=t|0;mm(t);tm(t);return}function Ie(t){t=t|0;mm(t);tm(t);return}function Re(t){t=t|0;a[t>>2]=6092;return}function Be(t){t=t|0;var e=0;e=t+12|0;t=(n[e>>0]|0)==0;n[e>>0]=0;return t|0}function ke(t){t=t|0;return(n[t+13>>0]|0)!=0|0}function Le(t,e){t=t|0;e=e|0;t=t+247|0;Fe(t,e);if((o[t>>0]|o[t+1>>0]<<8)<<16>>16==2)return;else{e=E(8)|0;Ne(e);S(e|0,2688,8)}}function Pe(t,e,r,i){t=t|0;e=e|0;r=r|0;i=i|0;var o=0,s=0;switch(i|0){case 0:break;case 2:{i=a[t+4>>2]|0;e=rA(rA(e|0,r|0,-1,-1)|0,_()|0,i|0,((i|0)<0)<<31>>31|0)|0;r=_()|0;break}case 1:{i=a[t+8>>2]|0;e=rA(i|0,((i|0)<0)<<31>>31|0,e|0,r|0)|0;r=_()|0;break}default:{r=0;e=0}}o=a[t+4>>2]|0;s=((o|0)<0)<<31>>31;i=t+12|0;if((r|0)<0|((r|0)>(s|0)|(r|0)==(s|0)&e>>>0>=o>>>0))n[i>>0]=1;else{n[i>>0]=0;a[t+8>>2]=e}return}function De(t){t=t|0;pg(t,7410);a[t>>2]=4476;return}function Ue(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,a=0,s=0,c=0,l=0,u=0;s=Y;Y=Y+16|0;a=s;zt(t);i=e+32|0;if((o[i>>0]|o[i+1>>0]<<8)<<16>>16){n=e+34|0;e=0;do{l=o[n>>0]|o[n+1>>0]<<8|o[n+2>>0]<<16|o[n+3>>0]<<24;u=l+(e*6|0)|0;c=l+(e*6|0)+2|0;l=l+(e*6|0)+4|0;Ve(a,(o[u>>0]|o[u+1>>0]<<8)&65535,(o[c>>0]|o[c+1>>0]<<8)&65535,(o[l>>0]|o[l+1>>0]<<8)&65535);Ze(t,a);r=r-((o[c>>0]|o[c+1>>0]<<8)&65535)|0;e=e+1|0}while(e>>>0<((o[i>>0]|o[i+1>>0]<<8)&65535)>>>0)}if((r|0)<0){u=E(8)|0;Ne(u);S(u|0,2688,8)}if(r|0){Ve(a,0,r,2);Ze(t,a)}Y=s;return}function Oe(t,e){t=t|0;e=e|0;var r=0,i=0;r=Y;Y=Y+16|0;i=r+1|0;n[i>>0]=n[r>>0]|0;Ye(t,e,i);Y=r;return t|0}function Fe(t,e){t=t|0;e=e|0;var r=0,i=0,a=0,s=0,c=0,l=0,u=0;i=e+2|0;s=o[e>>0]|o[e+1>>0]<<8;n[t>>0]=s;n[t+1>>0]=s>>8;s=t+2|0;i=o[i>>0]|o[i+1>>0]<<8;n[s>>0]=i;n[s+1>>0]=i>>8;n[t+4>>0]=n[e+4>>0]|0;s=e+6|0;n[t+5>>0]=n[e+5>>0]|0;i=e+8|0;r=t+6|0;s=o[s>>0]|o[s+1>>0]<<8;n[r>>0]=s;n[r+1>>0]=s>>8;r=e+12|0;s=t+8|0;i=o[i>>0]|o[i+1>>0]<<8|o[i+2>>0]<<16|o[i+3>>0]<<24;n[s>>0]=i;n[s+1>>0]=i>>8;n[s+2>>0]=i>>16;n[s+3>>0]=i>>24;s=t+12|0;r=o[r>>0]|o[r+1>>0]<<8|o[r+2>>0]<<16|o[r+3>>0]<<24;n[s>>0]=r;n[s+1>>0]=r>>8;n[s+2>>0]=r>>16;n[s+3>>0]=r>>24;s=e+16|0;r=s;r=o[r>>0]|o[r+1>>0]<<8|o[r+2>>0]<<16|o[r+3>>0]<<24;s=s+4|0;s=o[s>>0]|o[s+1>>0]<<8|o[s+2>>0]<<16|o[s+3>>0]<<24;i=t+16|0;c=i;n[c>>0]=r;n[c+1>>0]=r>>8;n[c+2>>0]=r>>16;n[c+3>>0]=r>>24;i=i+4|0;n[i>>0]=s;n[i+1>>0]=s>>8;n[i+2>>0]=s>>16;n[i+3>>0]=s>>24;i=e+32|0;s=e+24|0;c=s;c=o[c>>0]|o[c+1>>0]<<8|o[c+2>>0]<<16|o[c+3>>0]<<24;s=s+4|0;s=o[s>>0]|o[s+1>>0]<<8|o[s+2>>0]<<16|o[s+3>>0]<<24;r=t+24|0;a=r;n[a>>0]=c;n[a+1>>0]=c>>8;n[a+2>>0]=c>>16;n[a+3>>0]=c>>24;r=r+4|0;n[r>>0]=s;n[r+1>>0]=s>>8;n[r+2>>0]=s>>16;n[r+3>>0]=s>>24;r=e+34|0;s=t+32|0;i=o[i>>0]|o[i+1>>0]<<8;n[s>>0]=i;n[s+1>>0]=i>>8;a=t+34|0;t=o[a>>0]|o[a+1>>0]<<8|o[a+2>>0]<<16|o[a+3>>0]<<24;if(!t)t=i;else{Jm(t);t=o[s>>0]|o[s+1>>0]<<8}i=Ym((t&65535)*6|0)|0;n[a>>0]=i;n[a+1>>0]=i>>8;n[a+2>>0]=i>>16;n[a+3>>0]=i>>24;if(t<<16>>16?(t=e+36|0,c=o[r>>0]|o[r+1>>0]<<8,n[i>>0]=c,n[i+1>>0]=c>>8,e=e+38|0,c=i+2|0,t=o[t>>0]|o[t+1>>0]<<8,n[c>>0]=t,n[c+1>>0]=t>>8,c=i+4|0,e=o[e>>0]|o[e+1>>0]<<8,n[c>>0]=e,n[c+1>>0]=e>>8,((o[s>>0]|o[s+1>>0]<<8)&65535)>1):0){t=1;do{e=r;r=r+6|0;c=o[a>>0]|o[a+1>>0]<<8|o[a+2>>0]<<16|o[a+3>>0]<<24;l=e+8|0;i=c+(t*6|0)|0;u=o[r>>0]|o[r+1>>0]<<8;n[i>>0]=u;n[i+1>>0]=u>>8;e=e+10|0;i=c+(t*6|0)+2|0;l=o[l>>0]|o[l+1>>0]<<8;n[i>>0]=l;n[i+1>>0]=l>>8;c=c+(t*6|0)+4|0;e=o[e>>0]|o[e+1>>0]<<8;n[c>>0]=e;n[c+1>>0]=e>>8;t=t+1|0}while(t>>>0<((o[s>>0]|o[s+1>>0]<<8)&65535)>>>0)}return}function Ne(t){t=t|0;pg(t,7354);a[t>>2]=4456;return}function ze(t){t=t|0;mm(t);tm(t);return}function Ge(t){t=t|0;mm(t);tm(t);return}function Ze(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0;c=Y;Y=Y+32|0;i=c;o=t+4|0;r=a[o>>2]|0;s=t+8|0;do{if((r|0)==(a[s>>2]|0)){r=((r-(a[t>>2]|0)|0)/12|0)+1|0;n=qe(t)|0;if(n>>>0>>0)Hg(t);else{l=a[t>>2]|0;u=((a[s>>2]|0)-l|0)/12|0;s=u<<1;We(i,u>>>0>>1>>>0?s>>>0>>0?r:s:n,((a[o>>2]|0)-l|0)/12|0,t+8|0);s=i+8|0;o=a[s>>2]|0;a[o>>2]=a[e>>2];a[o+4>>2]=a[e+4>>2];a[o+8>>2]=a[e+8>>2];a[s>>2]=(a[s>>2]|0)+12;He(t,i);Xe(i);break}}else{Qe(i,t,1);u=i+4|0;l=a[u>>2]|0;a[l>>2]=a[e>>2];a[l+4>>2]=a[e+4>>2];a[l+8>>2]=a[e+8>>2];a[u>>2]=(a[u>>2]|0)+12;je(i)}}while(0);Y=c;return}function Ve(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;a[t>>2]=e;a[t+4>>2]=r;a[t+8>>2]=n;return}function Qe(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;e=a[e+4>>2]|0;a[t+4>>2]=e;a[t+8>>2]=e+(r*12|0);return}function je(t){t=t|0;a[(a[t>>2]|0)+4>>2]=a[t+4>>2];return}function We(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0;i=t+12|0;a[i>>2]=0;a[t+16>>2]=n;do{if(e){if(e>>>0>357913941){i=E(8)|0;fg(i,6723);a[i>>2]=5956;S(i|0,3928,123)}else{n=qm(e*12|0)|0;break}}else n=0}while(0);a[t>>2]=n;r=n+(r*12|0)|0;a[t+8>>2]=r;a[t+4>>2]=r;a[i>>2]=n+(e*12|0);return}function He(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;n=a[t>>2]|0;s=t+4|0;o=e+4|0;i=(a[s>>2]|0)-n|0;r=(a[o>>2]|0)+(((i|0)/-12|0)*12|0)|0;a[o>>2]=r;if((i|0)>0){hA(r|0,n|0,i|0)|0;n=o;r=a[o>>2]|0}else n=o;o=a[t>>2]|0;a[t>>2]=r;a[n>>2]=o;o=e+8|0;i=a[s>>2]|0;a[s>>2]=a[o>>2];a[o>>2]=i;o=t+8|0;s=e+12|0;t=a[o>>2]|0;a[o>>2]=a[s>>2];a[s>>2]=t;a[e>>2]=a[n>>2];return}function Xe(t){t=t|0;var e=0,r=0,n=0;e=a[t+4>>2]|0;r=t+8|0;n=a[r>>2]|0;if((n|0)!=(e|0))a[r>>2]=n+(~(((n+-12-e|0)>>>0)/12|0)*12|0);e=a[t>>2]|0;if(e|0)bt(e,(a[t+12>>2]|0)-e|0);return}function qe(t){t=t|0;return 357913941}function Ye(t,e,r){t=t|0;e=e|0;r=r|0;var n=0;Je(t);a[t>>2]=a[e>>2];r=e+4|0;a[t+4>>2]=a[r>>2];n=e+8|0;a[t+8>>2]=a[n>>2];a[n>>2]=0;a[r>>2]=0;a[e>>2]=0;return}function Je(t){t=t|0;var e=0,r=0,n=0,i=0;e=a[t>>2]|0;r=e;if(e|0){n=t+4|0;a[n>>2]=r;i=t+8|0;bt(e,(a[i>>2]|0)-r|0);a[i>>2]=0;a[n>>2]=0;a[t>>2]=0}return}function Ke(t){t=t|0;pg(t,7660);a[t>>2]=4496;return}function $e(t,e){t=t|0;e=e|0;pg(t,e);a[t>>2]=4516;return}function tr(t){t=t|0;pg(t,7704);a[t>>2]=4536;return}function er(t,e){t=t|0;e=e|0;var r=0,n=0,i=0;r=t+4|0;i=a[t>>2]|0;n=(a[r>>2]|0)-i>>3;if(n>>>0>=e>>>0){if(n>>>0>e>>>0)a[r>>2]=i+(e<<3)}else fr(t,e-n|0);return}function rr(t,e){t=t|0;e=e|0;a[t>>2]=e;a[t+4>>2]=0;a[t+8>>2]=-1;return}function nr(t,e,r,n,i){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;var o=0;a[t+4>>2]=e;a[t+8>>2]=r;a[t+12>>2]=n;a[t+16>>2]=i;a[t+36>>2]=0;a[t+40>>2]=0;a[t+44>>2]=0;_r(t+48|0);a[t+68>>2]=0;a[t+72>>2]=0;a[t+76>>2]=0;do{if(!i){r=t+20|0;if((e+-1|0)>>>0<31){a[r>>2]=e;i=1<>2]=i;r=i>>>1;a[t+28>>2]=0-r;r=i+-1-r|0;break}else{a[r>>2]=32;a[t+24>>2]=0;a[t+28>>2]=-2147483648;r=2147483647;break}}else{n=t+20|0;a[n>>2]=0;a[t+24>>2]=i;r=i;o=0;while(1){r=r>>>1;e=o+1|0;if(!r)break;else o=e}a[n>>2]=(1<>>1;a[t+28>>2]=0-r;r=i+-1-r|0}}while(0);a[t+32>>2]=r;a[t>>2]=0;return}function ir(t){t=t|0;var e=0;e=((Sr(a[t>>2]|0)|0)&255)<<24;e=((Sr(a[t>>2]|0)|0)&255)<<16|e;e=e|((Sr(a[t>>2]|0)|0)&255)<<8;a[t+4>>2]=e|(Sr(a[t>>2]|0)|0)&255;return}function ar(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0,g=0,A=0,v=0,y=0;g=Y;Y=Y+64|0;p=g+44|0;m=g;u=t+36|0;h=t+40|0;t:do{if((a[u>>2]|0)==(a[h>>2]|0)){f=t+8|0;e:do{if(!(a[f>>2]|0))d=t+20|0;else{i=t+20|0;o=t+44|0;s=p+4|0;c=t+44|0;l=p+8|0;n=0;while(1){Br(m,(a[i>>2]|0)+1|0,0,0);e=a[h>>2]|0;if(e>>>0<(a[o>>2]|0)>>>0){kr(p,u,1);Pr(a[s>>2]|0,m);a[s>>2]=(a[s>>2]|0)+44;Lr(p)}else{e=((e-(a[u>>2]|0)|0)/44|0)+1|0;r=Fr(u)|0;if(r>>>0>>0)break;A=a[u>>2]|0;y=((a[o>>2]|0)-A|0)/44|0;v=y<<1;Dr(p,y>>>0>>1>>>0?v>>>0>>0?e:v:r,((a[h>>2]|0)-A|0)/44|0,c);Pr(a[l>>2]|0,m);a[l>>2]=(a[l>>2]|0)+44;Ur(u,p);Or(p)}Mr(m);n=n+1|0;if(n>>>0>=(a[f>>2]|0)>>>0){d=i;break e}}Hg(u)}}while(0);if(a[d>>2]|0){s=t+12|0;c=t+68|0;l=t+72|0;u=t+76|0;h=p+4|0;i=t+76|0;o=p+8|0;n=1;while(1){e=a[s>>2]|0;Br(m,1<<(n>>>0>e>>>0?e:n),0,0);e=a[l>>2]|0;if(e>>>0<(a[u>>2]|0)>>>0){kr(p,c,1);Pr(a[h>>2]|0,m);a[h>>2]=(a[h>>2]|0)+44;Lr(p)}else{e=((e-(a[c>>2]|0)|0)/44|0)+1|0;r=Fr(c)|0;if(r>>>0>>0)break;y=a[c>>2]|0;A=((a[u>>2]|0)-y|0)/44|0;v=A<<1;Dr(p,A>>>0>>1>>>0?v>>>0>>0?e:v:r,((a[l>>2]|0)-y|0)/44|0,i);Pr(a[o>>2]|0,m);a[o>>2]=(a[o>>2]|0)+44;Ur(c,p);Or(p)}Mr(m);n=n+1|0;if(n>>>0>(a[d>>2]|0)>>>0)break t}Hg(c)}}}while(0);Y=g;return}function or(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;r=(Gr(t,e,(a[t+36>>2]|0)+(n*44|0)|0)|0)+r|0;e=a[t+24>>2]|0;if((r|0)<0)return r+e|0;else return r-(r>>>0>>0?0:e)|0;return 0}function sr(t){t=t|0;Er(t+68|0);Er(t+36|0);return}function cr(t){t=t|0;return}function lr(t){t=t|0;mm(t);tm(t);return}function ur(t){t=t|0;mm(t);tm(t);return}function hr(t){t=t|0;mm(t);tm(t);return}function fr(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0;c=Y;Y=Y+32|0;i=c;o=t+8|0;s=t+4|0;r=a[s>>2]|0;do{if((a[o>>2]|0)-r>>3>>>0>>0){r=(r-(a[t>>2]|0)>>3)+e|0;n=br(t)|0;if(n>>>0>>0)Hg(t);else{l=a[t>>2]|0;u=(a[o>>2]|0)-l|0;o=u>>2;pr(i,u>>3>>>0>>1>>>0?o>>>0>>0?r:o:n,(a[s>>2]|0)-l>>3,t+8|0);mr(i,e);gr(t,i);Ar(i);break}}else dr(t,e)}while(0);Y=c;return}function dr(t,e){t=t|0;e=e|0;var r=0,n=0,i=0;i=Y;Y=Y+16|0;n=i;vr(n,t,e);t=n+4|0;e=a[t>>2]|0;r=a[n+8>>2]|0;if((e|0)!=(r|0)){r=r+-8-e|0;dA(e|0,0,r+8&-8|0)|0;a[t>>2]=e+((r>>>3)+1<<3)}yr(n);Y=i;return}function pr(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0;i=t+12|0;a[i>>2]=0;a[t+16>>2]=n;do{if(e){if(e>>>0>536870911){i=E(8)|0;fg(i,6723);a[i>>2]=5956;S(i|0,3928,123)}else{n=qm(e<<3)|0;break}}else n=0}while(0);a[t>>2]=n;r=n+(r<<3)|0;a[t+8>>2]=r;a[t+4>>2]=r;a[i>>2]=n+(e<<3);return}function mr(t,e){t=t|0;e=e|0;var r=0,n=0;n=Y;Y=Y+16|0;r=n;xr(r,t+8|0,e);t=a[r>>2]|0;e=a[r+4>>2]|0;if((t|0)!=(e|0)){e=e+-8-t|0;dA(t|0,0,e+8&-8|0)|0;a[r>>2]=t+((e>>>3)+1<<3)}wr(r);Y=n;return}function gr(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;n=a[t>>2]|0;s=t+4|0;o=e+4|0;i=(a[s>>2]|0)-n|0;r=(a[o>>2]|0)+(0-(i>>3)<<3)|0;a[o>>2]=r;if((i|0)>0){hA(r|0,n|0,i|0)|0;n=o;r=a[o>>2]|0}else n=o;o=a[t>>2]|0;a[t>>2]=r;a[n>>2]=o;o=e+8|0;i=a[s>>2]|0;a[s>>2]=a[o>>2];a[o>>2]=i;o=t+8|0;s=e+12|0;t=a[o>>2]|0;a[o>>2]=a[s>>2];a[s>>2]=t;a[e>>2]=a[n>>2];return}function Ar(t){t=t|0;var e=0,r=0,n=0;e=a[t+4>>2]|0;r=t+8|0;n=a[r>>2]|0;if((n|0)!=(e|0))a[r>>2]=n+(~((n+-8-e|0)>>>3)<<3);e=a[t>>2]|0;if(e|0)bt(e,(a[t+12>>2]|0)-e|0);return}function vr(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;e=a[e+4>>2]|0;a[t+4>>2]=e;a[t+8>>2]=e+(r<<3);return}function yr(t){t=t|0;a[(a[t>>2]|0)+4>>2]=a[t+4>>2];return}function br(t){t=t|0;return 536870911}function xr(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=a[e>>2];a[t+4>>2]=(a[e>>2]|0)+(r<<3);a[t+8>>2]=e;return}function wr(t){t=t|0;a[a[t+8>>2]>>2]=a[t>>2];return}function _r(t){t=t|0;a[t+12>>2]=1;a[t+16>>2]=2;a[t+8>>2]=4096;a[t+4>>2]=4;a[t>>2]=4;return}function Er(t){t=t|0;var e=0,r=0,n=0;r=a[t>>2]|0;if(r|0){n=t+4|0;e=a[n>>2]|0;if((e|0)==(r|0))e=r;else{do{e=e+-44|0;Mr(e)}while((e|0)!=(r|0));e=a[t>>2]|0}a[n>>2]=r;bt(e,(a[t+8>>2]|0)-e|0)}return}function Mr(t){t=t|0;var e=0;e=a[t+8>>2]|0;if(e|0)Ot(e);e=a[t+12>>2]|0;if(e|0)Ot(e);e=a[t+16>>2]|0;if(e|0)Ot(e);return}function Sr(t){t=t|0;var e=0,r=0;r=t+4|0;e=a[r>>2]|0;if((e|0)>=(a[t+8>>2]|0)){Cr(t);e=a[r>>2]|0}t=a[t+12>>2]|0;a[r>>2]=e+1;return n[t+e>>0]|0}function Cr(t){t=t|0;var e=0;a[t+4>>2]=0;Qt(a[t>>2]|0,a[t+12>>2]|0,1048576);e=Tr(a[t>>2]|0)|0;a[t+8>>2]=e;if(!e){e=E(8)|0;Ir(e);S(e|0,2752,8)}else return}function Tr(t){t=t|0;return a[t+16>>2]|0}function Ir(t){t=t|0;pg(t,7769);a[t>>2]=4556;return}function Rr(t){t=t|0;mm(t);tm(t);return}function Br(t,e,r,i){t=t|0;e=e|0;r=r|0;i=i|0;var o=0,s=0,c=0;a[t>>2]=e;n[t+4>>0]=r&1;s=t+8|0;a[s>>2]=0;c=t+12|0;a[c>>2]=0;o=t+16|0;a[o>>2]=0;if((e+-2|0)>>>0>2046){t=E(8)|0;pg(t,7789);S(t|0,3912,8)}a[t+32>>2]=e+-1;if(e>>>0>16&(r^1)){r=3;while(1)if(1<>>0>>0)r=r+1|0;else break;e=1<>2]=e;a[t+40>>2]=15-r;a[o>>2]=Vt((e<<2)+8|0)|0;e=a[t>>2]|0}else{a[o>>2]=0;a[t+40>>2]=0;a[t+36>>2]=0}a[s>>2]=Vt(e<<2)|0;o=Vt(a[t>>2]<<2)|0;a[c>>2]=o;a[t+20>>2]=0;e=a[t>>2]|0;r=t+24|0;a[r>>2]=e;e=(e|0)!=0;if(!i){if(e){e=0;do{a[o+(e<<2)>>2]=1;e=e+1|0}while(e>>>0<(a[t>>2]|0)>>>0)}}else if(e){e=0;do{a[o+(e<<2)>>2]=a[i+(e<<2)>>2];e=e+1|0}while(e>>>0<(a[t>>2]|0)>>>0)}zr(t);i=((a[t>>2]|0)+6|0)>>>1;a[r>>2]=i;a[t+28>>2]=i;return}function kr(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;e=a[e+4>>2]|0;a[t+4>>2]=e;a[t+8>>2]=e+(r*44|0);return}function Lr(t){t=t|0;a[(a[t>>2]|0)+4>>2]=a[t+4>>2];return}function Pr(t,e){t=t|0;e=e|0;var r=0;a[t>>2]=a[e>>2];n[t+4>>0]=n[e+4>>0]|0;r=e+8|0;a[t+8>>2]=a[r>>2];a[t+12>>2]=a[e+12>>2];a[t+16>>2]=a[e+16>>2];a[t+20>>2]=a[e+20>>2];a[t+24>>2]=a[e+24>>2];a[t+28>>2]=a[e+28>>2];a[t+32>>2]=a[e+32>>2];a[t+36>>2]=a[e+36>>2];a[t+40>>2]=a[e+40>>2];a[r>>2]=0;a[r+4>>2]=0;a[r+8>>2]=0;return}function Dr(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0;i=t+12|0;a[i>>2]=0;a[t+16>>2]=n;do{if(e){if(e>>>0>97612893){i=E(8)|0;fg(i,6723);a[i>>2]=5956;S(i|0,3928,123)}else{n=qm(e*44|0)|0;break}}else n=0}while(0);a[t>>2]=n;r=n+(r*44|0)|0;a[t+8>>2]=r;a[t+4>>2]=r;a[i>>2]=n+(e*44|0);return}function Ur(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,c=0,l=0;c=a[t>>2]|0;l=t+4|0;r=a[l>>2]|0;s=e+4|0;if((r|0)==(c|0)){i=s;o=t;n=a[s>>2]|0;r=c}else{n=a[s>>2]|0;do{r=r+-44|0;Nr(n+-44|0,r);n=(a[s>>2]|0)+-44|0;a[s>>2]=n}while((r|0)!=(c|0));i=s;o=t;r=a[t>>2]|0}a[o>>2]=n;a[i>>2]=r;c=e+8|0;s=a[l>>2]|0;a[l>>2]=a[c>>2];a[c>>2]=s;c=t+8|0;l=e+12|0;t=a[c>>2]|0;a[c>>2]=a[l>>2];a[l>>2]=t;a[e>>2]=a[i>>2];return}function Or(t){t=t|0;var e=0,r=0,n=0,i=0;r=a[t+4>>2]|0;n=t+8|0;e=a[n>>2]|0;if((e|0)!=(r|0))do{i=e+-44|0;a[n>>2]=i;Mr(i);e=a[n>>2]|0}while((e|0)!=(r|0));e=a[t>>2]|0;if(e|0)bt(e,(a[t+12>>2]|0)-e|0);return}function Fr(t){t=t|0;return 97612893}function Nr(t,e){t=t|0;e=e|0;var r=0,i=0,o=0,s=0;r=a[e>>2]|0;a[t>>2]=r;n[t+4>>0]=n[e+4>>0]|0;a[t+20>>2]=a[e+20>>2];a[t+24>>2]=a[e+24>>2];a[t+28>>2]=a[e+28>>2];a[t+32>>2]=a[e+32>>2];s=t+36|0;a[s>>2]=a[e+36>>2];a[t+40>>2]=a[e+40>>2];r=r<<2;i=Vt(r)|0;a[t+8>>2]=i;o=a[t>>2]|0;if(o|0)fA(i|0,a[e+8>>2]|0,o<<2|0)|0;r=Vt(r)|0;a[t+12>>2]=r;i=a[t>>2]|0;if(i|0)fA(r|0,a[e+12>>2]|0,i<<2|0)|0;r=a[s>>2]|0;if(r){i=Vt((r<<2)+8|0)|0;a[t+16>>2]=i;r=(a[s>>2]<<2)+8|0;if(r|0)fA(i|0,a[e+16>>2]|0,r|0)|0}else a[t+16>>2]=0;return}function zr(t){t=t|0;var e=0,r=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0,g=0;g=t+24|0;o=t+20|0;e=(a[o>>2]|0)+(a[g>>2]|0)|0;a[o>>2]=e;if(e>>>0>32768){a[o>>2]=0;if(!(a[t>>2]|0))e=0;else{i=a[t+12>>2]|0;r=0;do{d=i+(r<<2)|0;e=((a[d>>2]|0)+1|0)>>>1;a[d>>2]=e;e=(a[o>>2]|0)+e|0;a[o>>2]=e;r=r+1|0}while(r>>>0<(a[t>>2]|0)>>>0)}}d=2147483648/(e>>>0)|0;do{if((n[t+4>>0]|0)==0?(p=t+36|0,(a[p>>2]|0)!=0):0){if(a[t>>2]|0){l=a[t+8>>2]|0;u=a[t+12>>2]|0;h=t+40|0;f=t+16|0;e=0;s=0;c=0;do{r=(y(s,d)|0)>>>16;a[l+(c<<2)>>2]=r;s=(a[u+(c<<2)>>2]|0)+s|0;r=r>>>(a[h>>2]|0);if(e>>>0>>0){i=c+-1|0;o=a[f>>2]|0;do{e=e+1|0;a[o+(e<<2)>>2]=i}while((e|0)!=(r|0));e=r}c=c+1|0}while(c>>>0<(a[t>>2]|0)>>>0);r=a[f>>2]|0;a[r>>2]=0;if(e>>>0>(a[p>>2]|0)>>>0){e=t;break}}else{r=a[t+16>>2]|0;a[r>>2]=0;e=0}do{e=e+1|0;a[r+(e<<2)>>2]=(a[t>>2]|0)+-1}while(e>>>0<=(a[p>>2]|0)>>>0);e=t}else m=7}while(0);if((m|0)==7)if(!(a[t>>2]|0))e=t;else{i=a[t+8>>2]|0;o=a[t+12>>2]|0;e=0;r=0;do{a[i+(e<<2)>>2]=(y(r,d)|0)>>>16;r=(a[o+(e<<2)>>2]|0)+r|0;e=e+1|0}while(e>>>0<(a[t>>2]|0)>>>0);e=t}m=((a[g>>2]|0)*5|0)>>>2;p=(a[e>>2]<<3)+48|0;m=m>>>0>p>>>0?p:m;a[g>>2]=m;a[t+28>>2]=m;return}function Gr(t,e,r){t=t|0;e=e|0;r=r|0;var n=0;r=Zr(e,r)|0;a[t>>2]=r;do{if(r){if(r>>>0>=32){r=a[t+28>>2]|0;break}n=a[t+12>>2]|0;if(r>>>0>n>>>0){n=r-n|0;r=Zr(e,(a[t+68>>2]|0)+((r+-1|0)*44|0)|0)|0;n=r<>2]|0)+((r+-1|0)*44|0)|0)|0;r=a[t>>2]|0;if((n|0)<(1<>2]|0;i=a[e+16>>2]|0;if(i){n=t+4|0;r=a[n>>2]|0;h=f>>>15;a[d>>2]=h;l=(r>>>0)/(h>>>0)|0;c=l>>>(a[e+40>>2]|0);o=a[i+(c<<2)>>2]|0;c=(a[i+(c+1<<2)>>2]|0)+1|0;s=o+1|0;u=a[e+8>>2]|0;if(c>>>0>s>>>0){i=o;o=c;do{s=(o+i|0)>>>1;c=(a[u+(s<<2)>>2]|0)>>>0>l>>>0;i=c?i:s;o=c?s:o;s=i+1|0}while(o>>>0>s>>>0);o=i}i=y(a[u+(o<<2)>>2]|0,h)|0;if((o|0)==(a[e+32>>2]|0))s=f;else s=y(a[u+(s<<2)>>2]|0,h)|0}else{u=f>>>15;a[d>>2]=u;c=a[e>>2]|0;h=a[e+8>>2]|0;n=t+4|0;r=a[n>>2]|0;l=c>>>1;i=0;s=f;o=0;do{p=y(a[h+(l<<2)>>2]|0,u)|0;f=p>>>0>r>>>0;s=f?p:s;i=f?i:p;o=f?o:l;c=f?l:c;l=(o+c|0)>>>1}while((l|0)!=(o|0))}a[n>>2]=r-i;p=s-i|0;a[d>>2]=p;if(p>>>0<16777216)jr(t);d=(a[e+12>>2]|0)+(o<<2)|0;a[d>>2]=(a[d>>2]|0)+1;d=e+28|0;p=(a[d>>2]|0)+-1|0;a[d>>2]=p;if(!p)zr(e);return o|0}function Vr(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;if(e>>>0>19){r=(Wr(t)|0)&65535;return(Vr(t,e+-16|0)|0)<<16|r|0}n=t+4|0;i=a[n>>2]|0;o=t+8|0;r=(a[o>>2]|0)>>>e;a[o>>2]=r;e=(i>>>0)/(r>>>0)|0;a[n>>2]=i-(y(e,r)|0);if(r>>>0<16777216)jr(t);return e|0}function Qr(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,c=0;n=t+8|0;i=a[n>>2]|0;r=y(i>>>13,a[e+8>>2]|0)|0;o=t+4|0;s=a[o>>2]|0;c=s>>>0>=r>>>0;if(c){a[o>>2]=s-r;r=i-r|0;a[n>>2]=r}else{a[n>>2]=r;s=e+12|0;a[s>>2]=(a[s>>2]|0)+1}if(r>>>0<16777216)jr(t);s=e+4|0;t=(a[s>>2]|0)+-1|0;a[s>>2]=t;if(!t)Hr(e);return c&1|0}function jr(t){t=t|0;var e=0,r=0,n=0,i=0;e=t+4|0;r=t+8|0;n=a[e>>2]|0;do{n=n<<8|(Sr(a[t>>2]|0)|0)&255;a[e>>2]=n;i=a[r>>2]<<8;a[r>>2]=i}while(i>>>0<16777216);return}function Wr(t){t=t|0;var e=0,r=0,n=0,i=0;r=t+4|0;i=a[r>>2]|0;e=t+8|0;n=(a[e>>2]|0)>>>16;a[e>>2]=n;e=(i>>>0)/(n>>>0)|0;a[r>>2]=i-(y(e,n)|0);jr(t);return e&65535|0}function Hr(t){t=t|0;var e=0,r=0,n=0,i=0,o=0;i=a[t>>2]|0;r=t+16|0;e=(a[r>>2]|0)+i|0;a[r>>2]=e;if(e>>>0>8192){n=(e+1|0)>>>1;a[r>>2]=n;o=t+12|0;e=((a[o>>2]|0)+1|0)>>>1;a[o>>2]=e;if((e|0)==(n|0)){e=n+1|0;a[r>>2]=e;r=e;e=n}else r=n}else{r=e;e=a[t+12>>2]|0}a[t+8>>2]=(y(e,2147483648/(r>>>0)|0)|0)>>>18;o=i*5|0;o=o>>>0>259?64:o>>>2;a[t>>2]=o;a[t+4>>2]=o;return}function Xr(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0;f=Y;Y=Y+32|0;s=f+16|0;c=f+8|0;l=f;u=t+336|0;n=u;i=t+259|0;if(!((a[n+4>>2]|0)==0?(a[n>>2]|0)==(o[i>>0]|o[i+1>>0]<<8|o[i+2>>0]<<16|o[i+3>>0]<<24|0):0)){n=t+320|0;r=a[n>>2]|0;i=r;if(!((r|0)!=0?(a[t+312>>2]|0)!=0:0)){r=i;h=5}}else{n=t+320|0;r=a[t+320>>2]|0;h=5}if((h|0)==5){h=t+320|0;a[s>>2]=r;a[h>>2]=0;r=t+324|0;a[s+4>>2]=a[r>>2];a[r>>2]=0;Rt(s);i=t+312|0;a[s>>2]=a[i>>2];a[i>>2]=0;d=t+316|0;a[s+4>>2]=a[d>>2];a[d>>2]=0;Bt(s);p=qm(12)|0;rr(p,t+4|0);a[l>>2]=0;a[s>>2]=a[l>>2];Yr(c,p,s);p=a[c>>2]|0;a[c>>2]=a[i>>2];a[i>>2]=p;p=c+4|0;l=a[p>>2]|0;a[p>>2]=a[d>>2];a[d>>2]=l;Bt(c);qr(c,a[i>>2]|0,t+300|0);i=a[c>>2]|0;d=c+4|0;l=a[d>>2]|0;a[c>>2]=0;a[d>>2]=0;a[s>>2]=a[h>>2];a[h>>2]=i;a[s+4>>2]=a[r>>2];a[r>>2]=l;Rt(s);Rt(c);r=t+328|0;l=r;l=rA(a[l>>2]|0,a[l+4>>2]|0,1,0)|0;h=_()|0;a[r>>2]=l;a[r+4>>2]=h;r=u;a[r>>2]=0;a[r+4>>2]=0;r=a[n>>2]|0}GA[a[a[r>>2]>>2]&63](r,e)|0;h=u;h=rA(a[h>>2]|0,a[h+4>>2]|0,1,0)|0;d=_()|0;p=u;a[p>>2]=h;a[p+4>>2]=d;Y=f;return}function qr(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0;s=Y;Y=Y+64|0;n=s+56|0;i=s;o=rn(r)|0;if((o|0)==-1){s=E(8)|0;nn(s);S(s|0,2784,8)}r=an(r)|0;t:do{if(!r)switch(o|0){case 0:{o=qm(4788)|0;mn(o);pn(t,e,o);break t}case 1:{o=qm(5116)|0;An(o);gn(t,e,o);break t}case 2:{o=qm(5104)|0;yn(o);vn(t,e,o);break t}case 3:{o=qm(5432)|0;xn(o);bn(t,e,o);break t}default:{a[t>>2]=0;a[t+4>>2]=0;break t}}else{on(n,e);sn(a[n>>2]|0);if((o|2|0)==3)cn(a[n>>2]|0);if((o|1|0)==3)ln(a[n>>2]|0);o=a[n>>2]|0;hn(i,r);un(o,i);fn(i);a[t>>2]=a[n>>2];o=n+4|0;a[t+4>>2]=a[o>>2];a[n>>2]=0;a[o>>2]=0;dn(n)}}while(0);Y=s;return}function Yr(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4576;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Jr(t,n);Y=r;return}function Jr(t,e){t=t|0;e=e|0;return}function Kr(t){t=t|0;og(t);tm(t);return}function $r(t){t=t|0;t=a[t+12>>2]|0;if(t|0){cr(t);tm(t)}return}function tn(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==7983?t+12|0:0)|0}function en(t){t=t|0;bt(t,16);return}function rn(t){t=t|0;var e=0,r=0;e=(a[t+4>>2]|0)-(a[t>>2]|0)|0;t:do{if(((e|0)!=0?(r=((e|0)/12|0)+(((an(t)|0)!=0)<<31>>31)|0,(r|0)!=0):0)?(e=a[t>>2]|0,!(wn(e,_n()|0)|0)):0){switch(r|0){case 1:{t=0;break t}case 2:{if(En((a[t>>2]|0)+12|0,Mn()|0)|0){t=1;break t}if(En((a[t>>2]|0)+12|0,Sn()|0)|0){t=2;break t}break}case 3:{if(En((a[t>>2]|0)+12|0,Mn()|0)|0?(r=(a[t>>2]|0)+24|0,En(r,Sn()|0)|0):0){t=3;break t}break}default:{}}t=-1}else t=-1}while(0);return t|0}function nn(t){t=t|0;pg(t,8131);a[t>>2]=4604;return}function an(t){t=t|0;var e=0,r=0;e=a[t+4>>2]|0;if(((e|0)!=(a[t>>2]|0)?(r=e,(a[r+-12>>2]|0)==0):0)?(a[r+-4>>2]|0)==2:0)t=a[r+-8>>2]|0;else t=0;return t|0}function on(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;r=Y;Y=Y+16|0;n=r+4|0;o=r;i=qm(24)|0;Tn(i,e);a[o>>2]=0;a[n>>2]=a[o>>2];In(t,i,n);Y=r;return}function sn(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0;l=Y;Y=Y+32|0;n=l+12|0;i=l;e=l+8|0;s=qm(4792)|0;Vn(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];Qn(i,s,n);s=t+12|0;e=a[s>>2]|0;c=t+16|0;do{if(e>>>0>=(a[c>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)Hg(o);else{u=a[o>>2]|0;h=(a[c>>2]|0)-u|0;c=h>>2;Hn(n,h>>3>>>0>>1>>>0?c>>>0>>0?e:c:r,(a[s>>2]|0)-u>>3,t+16|0);c=n+8|0;s=a[c>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[c>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];c=i+4|0;a[u+4>>2]=a[c>>2];a[i>>2]=0;a[c>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=l;return}function cn(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0;l=Y;Y=Y+32|0;n=l+12|0;i=l;e=l+8|0;s=qm(336)|0;Wi(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];Hi(i,s,n);s=t+12|0;e=a[s>>2]|0;c=t+16|0;do{if(e>>>0>=(a[c>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)Hg(o);else{u=a[o>>2]|0;h=(a[c>>2]|0)-u|0;c=h>>2;Hn(n,h>>3>>>0>>1>>>0?c>>>0>>0?e:c:r,(a[s>>2]|0)-u>>3,t+16|0);c=n+8|0;s=a[c>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[c>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];c=i+4|0;a[u+4>>2]=a[c>>2];a[i>>2]=0;a[c>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=l;return}function ln(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0;l=Y;Y=Y+32|0;n=l+12|0;i=l;e=l+8|0;s=qm(324)|0;Aa(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];va(i,s,n);s=t+12|0;e=a[s>>2]|0;c=t+16|0;do{if(e>>>0>=(a[c>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)Hg(o);else{u=a[o>>2]|0;h=(a[c>>2]|0)-u|0;c=h>>2;Hn(n,h>>3>>>0>>1>>>0?c>>>0>>0?e:c:r,(a[s>>2]|0)-u>>3,t+16|0);c=n+8|0;s=a[c>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[c>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];c=i+4|0;a[u+4>>2]=a[c>>2];a[i>>2]=0;a[c>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=l;return}function un(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0;l=Y;Y=Y+32|0;s=l+12|0;c=l;n=l+8|0;o=qm(64)|0;La(o,a[t+4>>2]|0,e);i=t+8|0;a[n>>2]=0;a[s>>2]=a[n>>2];Pa(c,o,s);o=t+12|0;e=a[o>>2]|0;n=t+16|0;do{if(e>>>0>=(a[n>>2]|0)>>>0){e=(e-(a[i>>2]|0)>>3)+1|0;r=Yn(i)|0;if(r>>>0>>0)Hg(i);else{u=a[i>>2]|0;h=(a[n>>2]|0)-u|0;n=h>>2;Hn(s,h>>3>>>0>>1>>>0?n>>>0>>0?e:n:r,(a[o>>2]|0)-u>>3,t+16|0);t=s+8|0;o=a[t>>2]|0;a[o>>2]=a[c>>2];n=c+4|0;a[o+4>>2]=a[n>>2];a[c>>2]=0;a[n>>2]=0;a[t>>2]=o+8;Xn(i,s);qn(s);break}}else{jn(s,i,1);h=s+4|0;u=a[h>>2]|0;a[u>>2]=a[c>>2];t=c+4|0;a[u+4>>2]=a[t>>2];a[c>>2]=0;a[t>>2]=0;a[h>>2]=u+8;Wn(s)}}while(0);Un(c);Y=l;return}function hn(t,e){t=t|0;e=e|0;var r=0,i=0;r=Y;Y=Y+48|0;i=r;a[t>>2]=e;n[t+4>>0]=0;Co(t+8|0,e);Co(t+20|0,e);Br(i,256,0,0);To(t+32|0,e,i);Mr(i);Y=r;return}function fn(t){t=t|0;Bo(t+32|0);Va(t+20|0);Va(t+8|0);return}function dn(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){QA[a[(a[t>>2]|0)+8>>2]&255](t);sg(t)}return}function pn(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0;n=Y;Y=Y+16|0;i=n+4|0;s=n;o=qm(12)|0;ko(o,e,r);a[s>>2]=0;a[i>>2]=a[s>>2];Lo(t,o,i);Y=n;return}function mn(t){t=t|0;Kn(t);jo(t+4784|0);return}function gn(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0;n=Y;Y=Y+16|0;i=n+4|0;s=n;o=qm(12)|0;Wo(o,e,r);a[s>>2]=0;a[i>>2]=a[s>>2];Ho(t,o,i);Y=n;return}function An(t){t=t|0;Kn(t);as(t+4784|0);return}function vn(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0;n=Y;Y=Y+16|0;i=n+4|0;s=n;o=qm(12)|0;os(o,e,r);a[s>>2]=0;a[i>>2]=a[s>>2];ss(t,o,i);Y=n;return}function yn(t){t=t|0;Kn(t);ys(t+4784|0);return}function bn(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0;n=Y;Y=Y+16|0;i=n+4|0;s=n;o=qm(12)|0;bs(o,e,r);a[s>>2]=0;a[i>>2]=a[s>>2];xs(t,o,i);Y=n;return}function xn(t){t=t|0;Kn(t);Ls(t+4784|0);return}function wn(t,e){t=t|0;e=e|0;return(En(t,e)|0)^1|0}function _n(){if((n[21456]|0)==0?Um(21456)|0:0){Ve(21536,6,20,2);Qm(21456)}return 21536}function En(t,e){t=t|0;e=e|0;if((a[t>>2]|0)==(a[e>>2]|0)?(a[t+8>>2]|0)==(a[e+8>>2]|0):0)t=(a[t+4>>2]|0)==(a[e+4>>2]|0);else t=0;return t|0}function Mn(){if((n[21464]|0)==0?Um(21464)|0:0){Ve(21548,7,8,2);Qm(21464)}return 21548}function Sn(){if((n[21472]|0)==0?Um(21472)|0:0){Ve(21560,8,6,2);Qm(21472)}return 21560}function Cn(t){t=t|0;mm(t);tm(t);return}function Tn(t,e){t=t|0;e=e|0;Rn(t);a[t>>2]=4624;a[t+4>>2]=e;a[t+8>>2]=0;a[t+12>>2]=0;a[t+16>>2]=0;n[t+20>>0]=1;return}function In(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4664;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Fn(t,n);Y=r;return}function Rn(t){t=t|0;a[t>>2]=4644;return}function Bn(t,e){t=t|0;e=e|0;var r=0,i=0,o=0,s=0,c=0,l=0,u=0;u=Y;Y=Y+16|0;s=u;r=a[t+8>>2]|0;c=a[t+12>>2]|0;if((r|0)!=(c|0)){l=s+4|0;do{i=a[r>>2]|0;a[s>>2]=i;o=a[r+4>>2]|0;a[l>>2]=o;if(o|0){o=o+4|0;a[o>>2]=(a[o>>2]|0)+1}e=GA[a[(a[i>>2]|0)+12>>2]&63](i,e)|0;Un(s);r=r+8|0}while((r|0)!=(c|0))}r=t+20|0;if(n[r>>0]|0){n[r>>0]=0;ir(a[t+4>>2]|0)}Y=u;return e|0}function kn(t){t=t|0;a[t>>2]=4624;On(t+8|0);Pn(t);return}function Ln(t){t=t|0;kn(t);tm(t);return}function Pn(t){t=t|0;return}function Dn(t){t=t|0;q()}function Un(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){QA[a[(a[t>>2]|0)+8>>2]&255](t);sg(t)}return}function On(t){t=t|0;var e=0,r=0,n=0;r=a[t>>2]|0;if(r|0){n=t+4|0;e=a[n>>2]|0;if((e|0)==(r|0))e=r;else{do{e=e+-8|0;Un(e)}while((e|0)!=(r|0));e=a[t>>2]|0}a[n>>2]=r;bt(e,(a[t+8>>2]|0)-e|0)}return}function Fn(t,e){t=t|0;e=e|0;return}function Nn(t){t=t|0;og(t);tm(t);return}function zn(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+8>>2]&255](t);return}function Gn(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==8546?t+12|0:0)|0}function Zn(t){t=t|0;bt(t,16);return}function Vn(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=4692;a[t+4>>2]=e;Kn(t+8|0);return}function Qn(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4740;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function jn(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;e=a[e+4>>2]|0;a[t+4>>2]=e;a[t+8>>2]=e+(r<<3);return}function Wn(t){t=t|0;a[(a[t>>2]|0)+4>>2]=a[t+4>>2];return}function Hn(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0;i=t+12|0;a[i>>2]=0;a[t+16>>2]=n;do{if(e){if(e>>>0>536870911){i=E(8)|0;fg(i,6723);a[i>>2]=5956;S(i|0,3928,123)}else{n=qm(e<<3)|0;break}}else n=0}while(0);a[t>>2]=n;r=n+(r<<3)|0;a[t+8>>2]=r;a[t+4>>2]=r;a[i>>2]=n+(e<<3);return}function Xn(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,c=0,l=0;c=a[t>>2]|0;l=t+4|0;r=a[l>>2]|0;s=e+4|0;if((r|0)==(c|0)){i=s;o=t;n=a[s>>2]|0;r=c}else{n=a[s>>2]|0;do{o=r;r=r+-8|0;a[n+-8>>2]=a[r>>2];o=o+-4|0;a[n+-4>>2]=a[o>>2];a[r>>2]=0;a[o>>2]=0;n=(a[s>>2]|0)+-8|0;a[s>>2]=n}while((r|0)!=(c|0));i=s;o=t;r=a[t>>2]|0}a[o>>2]=n;a[i>>2]=r;c=e+8|0;s=a[l>>2]|0;a[l>>2]=a[c>>2];a[c>>2]=s;c=t+8|0;l=e+12|0;t=a[c>>2]|0;a[c>>2]=a[l>>2];a[l>>2]=t;a[e>>2]=a[i>>2];return}function qn(t){t=t|0;var e=0,r=0,n=0,i=0;r=a[t+4>>2]|0;n=t+8|0;e=a[n>>2]|0;if((e|0)!=(r|0))do{i=e+-8|0;a[n>>2]=i;Un(i);e=a[n>>2]|0}while((e|0)!=(r|0));e=a[t>>2]|0;if(e|0)bt(e,(a[t+12>>2]|0)-e|0);return}function Yn(t){t=t|0;return 536870911}function Jn(t){t=t|0;a[t>>2]=4716;return}function Kn(t){t=t|0;oi(t);si(t+3980|0);ci(t+4380|0);n[t+4780>>0]=0;n[t+4781>>0]=0;return}function $n(t){t=t|0;a[t>>2]=4692;Ai(t+8|0);ni(t);return}function ti(t){t=t|0;$n(t);tm(t);return}function ei(t,e){t=t|0;e=e|0;return e|0}function ri(t,e){t=t|0;e=e|0;return yi(t+8|0,a[t+4>>2]|0,e)|0}function ni(t){t=t|0;return}function ii(t){t=t|0;ni(t);tm(t);return}function ai(t,e){t=t|0;e=e|0;return e|0}function oi(t){t=t|0;var e=0,r=0;hi(t);fi(t+52|0);fi(t+436|0);Br(t+852|0,64,0,0);n[t+3976>>0]=0;e=t+20|0;r=e+32|0;do{i[e>>1]=0;e=e+2|0}while((e|0)<(r|0));e=qm(44)|0;Br(e,256,0,0);a[t+896>>2]=e;e=qm(44)|0;Br(e,256,0,0);a[t+900>>2]=e;e=t+820|0;a[e>>2]=0;a[e+4>>2]=0;a[e+8>>2]=0;a[e+12>>2]=0;a[e+16>>2]=0;a[e+20>>2]=0;a[e+24>>2]=0;a[e+28>>2]=0;e=0;do{r=qm(44)|0;Br(r,256,0,0);a[t+904+(e<<2)>>2]=r;r=qm(44)|0;Br(r,256,0,0);a[t+1928+(e<<2)>>2]=r;r=qm(44)|0;Br(r,256,0,0);a[t+2952+(e<<2)>>2]=r;e=e+1|0}while(e>>>0<256);return}function si(t){t=t|0;mi(t,16,4,8,0);mi(t+80|0,16,1,8,0);mi(t+160|0,32,2,8,0);mi(t+240|0,32,22,8,0);mi(t+320|0,32,20,8,0);return}function ci(t){t=t|0;nr(t,16,4,8,0);nr(t+80|0,16,1,8,0);nr(t+160|0,32,2,8,0);nr(t+240|0,32,22,8,0);nr(t+320|0,32,20,8,0);return}function li(t){t=t|0;gi(t+320|0);gi(t+240|0);gi(t+160|0);gi(t+80|0);gi(t);return}function ui(t){t=t|0;var e=0,r=0;e=a[t+896>>2]|0;if(e|0){Mr(e);tm(e)}e=a[t+900>>2]|0;if(e|0){Mr(e);tm(e)}r=0;do{e=a[t+904+(r<<2)>>2]|0;if(e|0){Mr(e);tm(e)}e=a[t+1928+(r<<2)>>2]|0;if(e|0){Mr(e);tm(e)}e=a[t+2952+(r<<2)>>2]|0;if(e|0){Mr(e);tm(e)}r=r+1|0}while((r|0)!=256);Mr(t+852|0);return}function hi(t){t=t|0;var e=0;n[t>>0]=0;n[t+1>>0]=0;n[t+2>>0]=0;n[t+3>>0]=0;e=t+4|0;n[e>>0]=0;n[e+1>>0]=0;n[e+2>>0]=0;n[e+3>>0]=0;t=t+12|0;e=t;n[e>>0]=0;n[e+1>>0]=0;n[e+2>>0]=0;n[e+3>>0]=0;t=t+4|0;n[t>>0]=0;n[t+1>>0]=0;n[t+2>>0]=0;n[t+3>>0]=0;return}function fi(t){t=t|0;var e=0;e=t+384|0;do{di(t);t=t+24|0}while((t|0)!=(e|0));return}function di(t){t=t|0;pi(t);return}function pi(t){t=t|0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;a[t+12>>2]=0;a[t+16>>2]=0;n[t+20>>0]=1;return}function mi(t,e,r,n,i){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;var o=0;a[t+4>>2]=e;a[t+8>>2]=r;a[t+12>>2]=n;a[t+16>>2]=i;a[t+36>>2]=0;a[t+40>>2]=0;a[t+44>>2]=0;_r(t+48|0);a[t+68>>2]=0;a[t+72>>2]=0;a[t+76>>2]=0;do{if(!i){r=t+20|0;if((e+-1|0)>>>0<31){a[r>>2]=e;i=1<>2]=i;r=i>>>1;a[t+28>>2]=0-r;r=i+-1-r|0;break}else{a[r>>2]=32;a[t+24>>2]=0;a[t+28>>2]=-2147483648;r=2147483647;break}}else{n=t+20|0;a[n>>2]=0;a[t+24>>2]=i;r=i;o=0;while(1){r=r>>>1;e=o+1|0;if(!r)break;else o=e}a[n>>2]=(1<>>1;a[t+28>>2]=0-r;r=i+-1-r|0}}while(0);a[t+32>>2]=r;a[t>>2]=0;return}function gi(t){t=t|0;var e=0,r=0,n=0,i=0,o=0;o=t+36|0;r=a[o>>2]|0;n=t+40|0;e=a[n>>2]|0;if((e|0)!=(r|0))do{e=e+-44|0;Mr(e)}while((e|0)!=(r|0));a[n>>2]=r;n=t+68|0;i=a[n>>2]|0;r=t+72|0;e=a[r>>2]|0;if((e|0)!=(i|0))do{e=e+-44|0;Mr(e)}while((e|0)!=(i|0));a[r>>2]=i;Er(n);Er(o);return}function Ai(t){t=t|0;vi(t+4380|0);li(t+3980|0);ui(t);return}function vi(t){t=t|0;sr(t+320|0);sr(t+240|0);sr(t+160|0);sr(t+80|0);sr(t);return}function yi(t,e,r){t=t|0;e=e|0;r=r|0;var c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0,g=0;m=Y;Y=Y+32|0;p=m;c=t+4781|0;if(!(n[c>>0]|0)){bi(t+4380|0);n[c>>0]=1}c=t+3976|0;if(!(n[c>>0]|0)){n[c>>0]=1;wi(xi(e)|0,r,20);_i(p,r);u=t;c=p;l=u+20|0;do{n[u>>0]=n[c>>0]|0;u=u+1|0;c=c+1|0}while((u|0)<(l|0));i[t+12>>1]=0}else{f=Zr(e,t+852|0)|0;if(f){if(f&32|0)Mi((Zr(e,a[t+904+(((Ei(t)|0)&255)<<2)>>2]|0)|0)&255,t);d=t+14|0;u=n[d>>0]|0;c=u&7;u=(u&255)>>>3&7;l=o[16+(u<<3)+c>>0]|0;c=o[80+(u<<3)+c>>0]|0;if(!(f&16))h=i[t+20+(l<<1)>>1]|0;else{g=t+20+(l<<1)|0;h=(or(t+4380|0,e,s[g>>1]|0,l>>>0<3?l:3)|0)&65535;i[g>>1]=h}i[t+12>>1]=h;if(f&8|0){g=t+15|0;n[g>>0]=Zr(e,a[t+1928+(o[g>>0]<<2)>>2]|0)|0}if(f&4|0){d=Zr(e,a[t+896+(((o[d>>0]|0)>>>6&1)<<2)>>2]|0)|0;g=t+16|0;n[g>>0]=Si(d+(n[g>>0]|0)|0)|0}if(f&2|0){g=t+17|0;n[g>>0]=Zr(e,a[t+2952+(o[g>>0]<<2)>>2]|0)|0}if(f&1){g=t+18|0;i[g>>1]=or(t+4460|0,e,s[g>>1]|0,0)|0}}else{g=n[t+14>>0]|0;c=g&7;g=(g&255)>>>3&7;u=g;l=o[16+(g<<3)+c>>0]|0;c=o[80+(g<<3)+c>>0]|0}h=t+52+(l*24|0)|0;f=t+4540|0;d=(u|0)==1&1;u=or(f,e,Ci(h)|0,d)|0;a[p>>2]=u;a[t>>2]=(a[t>>2]|0)+u;Ti(h,p);h=t+436+(l*24|0)|0;u=Ci(h)|0;l=Ii(f)|0;g=t+4620|0;l=or(g,e,u,(l>>>0<20?l&-2:20)|d)|0;a[p>>2]=l;u=t+4|0;a[u>>2]=(a[u>>2]|0)+l;Ti(h,p);p=Ii(f)|0;p=(Ii(g)|0)+p|0;g=t+820+(c<<2)|0;p=or(t+4700|0,e,a[g>>2]|0,(p>>>0<36?p>>>1&2147483646:18)|d)|0;a[t+8>>2]=p;a[g>>2]=p;Ri(t,r)}Y=m;return r+20|0}function bi(t){t=t|0;ar(t);ar(t+80|0);ar(t+160|0);ar(t+240|0);ar(t+320|0);return}function xi(t){t=t|0;return a[t>>2]|0}function wi(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,c=0,l=0,u=0;u=t+4|0;i=a[u>>2]|0;l=(a[t+8>>2]|0)-i|0;l=l>>>0>r>>>0?r:l;c=t+12|0;o=(a[c>>2]|0)+i|0;s=o+l|0;if(l){i=o;o=e;while(1){n[o>>0]=n[i>>0]|0;i=i+1|0;if((i|0)==(s|0))break;else o=o+1|0}i=a[u>>2]|0}a[u>>2]=i+l;r=r-l|0;if(r|0){Cr(t);o=(a[c>>2]|0)+(a[u>>2]|0)|0;s=o+r|0;i=e+l|0;while(1){n[i>>0]=n[o>>0]|0;o=o+1|0;if((o|0)==(s|0))break;else i=i+1|0}a[u>>2]=(a[u>>2]|0)+r}return}function _i(t,e){t=t|0;e=e|0;hi(t);a[t>>2]=Bi(e)|0;a[t+4>>2]=Bi(e+4|0)|0;a[t+8>>2]=Bi(e+8|0)|0;i[t+12>>1]=ki(e+12|0)|0;Mi(Li(e+14|0)|0,t);n[t+15>>0]=Li(e+15|0)|0;n[t+16>>0]=Pi(e+16|0)|0;n[t+17>>0]=Pi(e+17|0)|0;i[t+18>>1]=ki(e+18|0)|0;return}function Ei(t){t=t|0;return n[t+14>>0]|0}function Mi(t,e){t=t|0;e=e|0;n[e+14>>0]=t;return}function Si(t){t=t|0;return t&255|0}function Ci(t){t=t|0;return a[t+8>>2]|0}function Ti(t,e){t=t|0;e=e|0;var r=0,i=0,o=0,s=0,c=0,l=0,u=0;u=t+20|0;do{if(!(n[u>>0]|0)){l=t+8|0;r=a[l>>2]|0;i=a[e>>2]|0;o=t+4|0;s=a[o>>2]|0;if((r|0)>=(i|0)){if((s|0)<(i|0)){a[t>>2]=s;a[o>>2]=a[e>>2]}else a[t>>2]=i;n[u>>0]=1;break}a[t>>2]=s;a[o>>2]=r;o=t+16|0;s=a[o>>2]|0;c=a[e>>2]|0;r=t+12|0;i=a[r>>2]|0;if((s|0)<(c|0)){a[l>>2]=i;a[r>>2]=s;a[o>>2]=a[e>>2];break}if((i|0)<(c|0)){a[l>>2]=i;a[r>>2]=a[e>>2];break}else{a[l>>2]=c;break}}else{o=a[e>>2]|0;c=t+8|0;r=a[c>>2]|0;s=t+12|0;i=a[s>>2]|0;if((o|0)>=(r|0)){r=t+16|0;if((o|0)<(i|0)){a[r>>2]=i;a[s>>2]=a[e>>2]}else a[r>>2]=o;n[u>>0]=0;break}a[t+16>>2]=i;a[s>>2]=r;r=a[e>>2]|0;i=a[t>>2]|0;o=t+4|0;s=a[o>>2]|0;if((r|0)<(i|0)){a[c>>2]=s;a[o>>2]=i;a[t>>2]=a[e>>2];break}if((r|0)<(s|0)){a[c>>2]=s;a[o>>2]=a[e>>2];break}else{a[c>>2]=r;break}}}while(0);return}function Ii(t){t=t|0;return a[t>>2]|0}function Ri(t,e){t=t|0;e=e|0;var r=0;Ui(o[t>>0]|o[t+1>>0]<<8|o[t+2>>0]<<16|o[t+3>>0]<<24,e);r=t+4|0;Ui(o[r>>0]|o[r+1>>0]<<8|o[r+2>>0]<<16|o[r+3>>0]<<24,e+4|0);r=t+8|0;Ui(o[r>>0]|o[r+1>>0]<<8|o[r+2>>0]<<16|o[r+3>>0]<<24,e+8|0);r=t+12|0;Oi(o[r>>0]|o[r+1>>0]<<8,e+12|0);Fi(Ei(t)|0,e+14|0);Fi(n[t+15>>0]|0,e+15|0);Ni(n[t+16>>0]|0,e+16|0);Ni(n[t+17>>0]|0,e+17|0);t=t+18|0;Oi(o[t>>0]|o[t+1>>0]<<8,e+18|0);return}function Bi(t){t=t|0;return Di(t)|0}function ki(t){t=t|0;return(n[t+1>>0]<<8|o[t>>0])&65535|0}function Li(t){t=t|0;return n[t>>0]|0}function Pi(t){t=t|0;return n[t>>0]|0}function Di(t){t=t|0;return(o[t+1>>0]|0)<<8|(o[t>>0]|0)|(o[t+2>>0]|0)<<16|(o[t+3>>0]|0)<<24|0}function Ui(t,e){t=t|0;e=e|0;zi(t,e);return}function Oi(t,e){t=t|0;e=e|0;n[e+1>>0]=(t&65535)>>>8;n[e>>0]=t;return}function Fi(t,e){t=t|0;e=e|0;n[e>>0]=t;return}function Ni(t,e){t=t|0;e=e|0;n[e>>0]=t;return}function zi(t,e){t=t|0;e=e|0;n[e+3>>0]=t>>>24;n[e+2>>0]=t>>>16;n[e+1>>0]=t>>>8;n[e>>0]=t;return}function Gi(t,e){t=t|0;e=e|0;return}function Zi(t){t=t|0;og(t);tm(t);return}function Vi(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+4>>2]&255](t);return}function Qi(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==9202?t+12|0:0)|0}function ji(t){t=t|0;bt(t,16);return}function Wi(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=4768;a[t+4>>2]=e;Xi(t+8|0);return}function Hi(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4792;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function Xi(t){t=t|0;Ki(t);$i(t+164|0);ta(t+244|0);n[t+324>>0]=0;n[t+325>>0]=0;return}function qi(t){t=t|0;a[t>>2]=4768;aa(t+8|0);ni(t);return}function Yi(t){t=t|0;qi(t);tm(t);return}function Ji(t,e){t=t|0;e=e|0;return sa(t+8|0,a[t+4>>2]|0,e)|0}function Ki(t){t=t|0;var e=0,r=0,i=0,o=0,s=0,c=0,l=0;s=Y;Y=Y+16|0;i=s;n[t>>0]=0;Br(t+4|0,516,0,0);Br(t+48|0,6,0,0);a[t+92>>2]=0;a[t+96>>2]=0;r=t+100|0;na(r);ia(i);o=a[i>>2]|0;i=a[i+4>>2]|0;e=4;while(1){c=r;l=c;n[l>>0]=o;n[l+1>>0]=o>>8;n[l+2>>0]=o>>16;n[l+3>>0]=o>>24;c=c+4|0;n[c>>0]=i;n[c+1>>0]=i>>8;n[c+2>>0]=i>>16;n[c+3>>0]=i>>24;e=e+-1|0;if(!e)break;else r=r+8|0}l=t+132|0;a[l>>2]=0;a[l+4>>2]=0;a[l+8>>2]=0;a[l+12>>2]=0;a[l+16>>2]=0;a[l+20>>2]=0;a[l+24>>2]=0;a[l+28>>2]=0;Y=s;return}function $i(t){t=t|0;mi(t,32,9,8,0);return}function ta(t){t=t|0;nr(t,32,9,8,0);return}function ea(t){t=t|0;gi(t);return}function ra(t){t=t|0;Mr(t+48|0);Mr(t+4|0);return}function na(t){t=t|0;var e=0;e=t+32|0;do{ia(t);t=t+8|0}while((t|0)!=(e|0));return}function ia(t){t=t|0;var e=0;e=t;n[e>>0]=0;n[e+1>>0]=0;n[e+2>>0]=0;n[e+3>>0]=0;t=t+4|0;n[t>>0]=0;n[t+1>>0]=0;n[t+2>>0]=0;n[t+3>>0]=0;return}function aa(t){t=t|0;oa(t+244|0);ea(t+164|0);ra(t);return}function oa(t){t=t|0;sr(t);return}function sa(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,s=0,c=0,l=0,u=0;i=t+325|0;if(!(n[i>>0]|0)){ca(t+244|0);n[i>>0]=1}if(!(n[t>>0]|0)){n[t>>0]=1;wi(xi(e)|0,r,8);c=la(r)|0;l=_()|0;t=t+100|0;e=t;n[e>>0]=c;n[e+1>>0]=c>>8;n[e+2>>0]=c>>16;n[e+3>>0]=c>>24;t=t+4|0;n[t>>0]=l;n[t+1>>0]=l>>8;n[t+2>>0]=l>>16;n[t+3>>0]=l>>24}else{l=t+92|0;t:do{if(!(a[t+132+(a[l>>2]<<2)>>2]|0)){i=Zr(e,t+48|0)|0;switch(i|0){case 1:{e=or(t+244|0,e,0,0)|0;a[t+132+(a[l>>2]<<2)>>2]=e;e=a[l>>2]|0;u=a[t+132+(e<<2)>>2]|0;c=t+100+(e<<3)|0;s=c;i=s;s=s+4|0;u=rA(o[i>>0]|o[i+1>>0]<<8|o[i+2>>0]<<16|o[i+3>>0]<<24|0,o[s>>0]|o[s+1>>0]<<8|o[s+2>>0]<<16|o[s+3>>0]<<24|0,u|0,((u|0)<0)<<31>>31|0)|0;s=_()|0;i=c;n[i>>0]=u;n[i+1>>0]=u>>8;n[i+2>>0]=u>>16;n[i+3>>0]=u>>24;c=c+4|0;n[c>>0]=s;n[c+1>>0]=s>>8;n[c+2>>0]=s>>16;n[c+3>>0]=s>>24;a[t+148+(e<<2)>>2]=0;break t}case 2:{u=t+96|0;a[u>>2]=(a[u>>2]|0)+1&3;c=t+100+(a[l>>2]<<3)+4|0;c=or(t+244|0,e,o[c>>0]|o[c+1>>0]<<8|o[c+2>>0]<<16|o[c+3>>0]<<24,8)|0;i=t+100+(a[u>>2]<<3)|0;s=i;n[s>>0]=0;n[s+1>>0]=0;n[s+2>>0]=0;n[s+3>>0]=0;i=i+4|0;n[i>>0]=c;n[i+1>>0]=c>>8;n[i+2>>0]=c>>16;n[i+3>>0]=c>>24;i=ua(e)|0;u=a[u>>2]|0;e=t+100+(u<<3)|0;c=e;s=c;c=c+4|0;c=o[c>>0]|o[c+1>>0]<<8|o[c+2>>0]<<16|o[c+3>>0]<<24;i=o[s>>0]|o[s+1>>0]<<8|o[s+2>>0]<<16|o[s+3>>0]<<24|i;s=e;n[s>>0]=i;n[s+1>>0]=i>>8;n[s+2>>0]=i>>16;n[s+3>>0]=i>>24;e=e+4|0;n[e>>0]=c;n[e+1>>0]=c>>8;n[e+2>>0]=c>>16;n[e+3>>0]=c>>24;a[l>>2]=u;a[t+132+(u<<2)>>2]=0;a[t+148+(a[l>>2]<<2)>>2]=0;break t}default:{if((i|0)<=2)break t;a[l>>2]=i+2+(a[l>>2]|0)&3;sa(t,e,r)|0;break t}}}else{c=Zr(e,t+4|0)|0;if((c|0)==1){i=or(t+244|0,e,a[t+132+(a[l>>2]<<2)>>2]|0,1)|0;u=a[l>>2]|0;e=t+100+(u<<3)|0;c=e;s=c;c=c+4|0;i=rA(o[s>>0]|o[s+1>>0]<<8|o[s+2>>0]<<16|o[s+3>>0]<<24|0,o[c>>0]|o[c+1>>0]<<8|o[c+2>>0]<<16|o[c+3>>0]<<24|0,i|0,((i|0)<0)<<31>>31|0)|0;c=_()|0;s=e;n[s>>0]=i;n[s+1>>0]=i>>8;n[s+2>>0]=i>>16;n[s+3>>0]=i>>24;e=e+4|0;n[e>>0]=c;n[e+1>>0]=c>>8;n[e+2>>0]=c>>16;n[e+3>>0]=c>>24;a[t+148+(u<<2)>>2]=0;break}if((c|0)>=511){if((c|0)==512){u=t+96|0;a[u>>2]=(a[u>>2]|0)+1&3;c=t+100+(a[l>>2]<<3)+4|0;c=or(t+244|0,e,o[c>>0]|o[c+1>>0]<<8|o[c+2>>0]<<16|o[c+3>>0]<<24,8)|0;i=t+100+(a[u>>2]<<3)|0;s=i;n[s>>0]=0;n[s+1>>0]=0;n[s+2>>0]=0;n[s+3>>0]=0;i=i+4|0;n[i>>0]=c;n[i+1>>0]=c>>8;n[i+2>>0]=c>>16;n[i+3>>0]=c>>24;i=ua(e)|0;u=a[u>>2]|0;e=t+100+(u<<3)|0;c=e;s=c;c=c+4|0;c=o[c>>0]|o[c+1>>0]<<8|o[c+2>>0]<<16|o[c+3>>0]<<24;i=o[s>>0]|o[s+1>>0]<<8|o[s+2>>0]<<16|o[s+3>>0]<<24|i;s=e;n[s>>0]=i;n[s+1>>0]=i>>8;n[s+2>>0]=i>>16;n[s+3>>0]=i>>24;e=e+4|0;n[e>>0]=c;n[e+1>>0]=c>>8;n[e+2>>0]=c>>16;n[e+3>>0]=c>>24;a[l>>2]=u;a[t+132+(u<<2)>>2]=0;a[t+148+(a[l>>2]<<2)>>2]=0;break}if((c|0)<=511)break;a[l>>2]=(a[l>>2]|0)+c&3;sa(t,e,r)|0;break}do{if(!c){i=or(t+244|0,e,0,7)|0;s=t+148+(a[l>>2]<<2)|0;a[s>>2]=(a[s>>2]|0)+1;s=a[l>>2]|0;if((a[t+148+(s<<2)>>2]|0)>3){a[t+132+(s<<2)>>2]=i;a[t+148+(a[l>>2]<<2)>>2]=0}}else{if((c|0)<500){i=t+244|0;s=y(a[t+132+(a[l>>2]<<2)>>2]|0,c)|0;if((c|0)<10){i=or(i,e,s,2)|0;break}else{i=or(i,e,s,3)|0;break}}if((c|0)==500){i=or(t+244|0,e,(a[t+132+(a[l>>2]<<2)>>2]|0)*500|0,4)|0;s=t+148+(a[l>>2]<<2)|0;a[s>>2]=(a[s>>2]|0)+1;s=a[l>>2]|0;if((a[t+148+(s<<2)>>2]|0)<=3)break;a[t+132+(s<<2)>>2]=i;a[t+148+(a[l>>2]<<2)>>2]=0;break}i=500-c|0;s=t+244|0;c=a[t+132+(a[l>>2]<<2)>>2]|0;if((i|0)>-10){i=or(s,e,y(c,i)|0,5)|0;break}i=or(s,e,y(c,-10)|0,6)|0;s=t+148+(a[l>>2]<<2)|0;a[s>>2]=(a[s>>2]|0)+1;s=a[l>>2]|0;if((a[t+148+(s<<2)>>2]|0)>3){a[t+132+(s<<2)>>2]=i;a[t+148+(a[l>>2]<<2)>>2]=0}}}while(0);u=t+100+(a[l>>2]<<3)|0;s=u;e=s;s=s+4|0;s=rA(o[e>>0]|o[e+1>>0]<<8|o[e+2>>0]<<16|o[e+3>>0]<<24|0,o[s>>0]|o[s+1>>0]<<8|o[s+2>>0]<<16|o[s+3>>0]<<24|0,i|0,((i|0)<0)<<31>>31|0)|0;e=_()|0;c=u;n[c>>0]=s;n[c+1>>0]=s>>8;n[c+2>>0]=s>>16;n[c+3>>0]=s>>24;u=u+4|0;n[u>>0]=e;n[u+1>>0]=e>>8;n[u+2>>0]=e>>16;n[u+3>>0]=e>>24}}while(0);ha(t+100+(a[l>>2]<<3)|0,r)}return r+8|0}function ca(t){t=t|0;ar(t);return}function la(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;n=Di(t)|0;fa(r,n,Di(t+4|0)|0);t=a[r>>2]|0;w(a[r+4>>2]|0);Y=e;return t|0}function ua(t){t=t|0;var e=0;e=(Wr(t)|0)&65535;return((Wr(t)|0)&65535)<<16|e|0}function ha(t,e){t=t|0;e=e|0;var r=0;r=t;zi(o[r>>0]|o[r+1>>0]<<8|o[r+2>>0]<<16|o[r+3>>0]<<24,e);t=t+4|0;zi(o[t>>0]|o[t+1>>0]<<8|o[t+2>>0]<<16|o[t+3>>0]<<24,e+4|0);return}function fa(t,e,r){t=t|0;e=e|0;r=r|0;var i=0;i=t;n[i>>0]=e;n[i+1>>0]=e>>8;n[i+2>>0]=e>>16;n[i+3>>0]=e>>24;e=t+4|0;n[e>>0]=r;n[e+1>>0]=r>>8;n[e+2>>0]=r>>16;n[e+3>>0]=r>>24;return}function da(t){t=t|0;og(t);tm(t);return}function pa(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+4>>2]&255](t);return}function ma(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==9890?t+12|0:0)|0}function ga(t){t=t|0;bt(t,16);return}function Aa(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=4820;a[t+4>>2]=e;ya(t+8|0);return}function va(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4844;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function ya(t){t=t|0;n[t>>0]=0;_a(t+1|0);Br(t+8|0,128,0,0);Br(t+52|0,256,0,0);Br(t+96|0,256,0,0);Br(t+140|0,256,0,0);Br(t+184|0,256,0,0);Br(t+228|0,256,0,0);Br(t+272|0,256,0,0);return}function ba(t){t=t|0;a[t>>2]=4820;Ea(t+8|0);ni(t);return}function xa(t){t=t|0;ba(t);tm(t);return}function wa(t,e){t=t|0;e=e|0;return Ma(t+8|0,a[t+4>>2]|0,e)|0}function _a(t){t=t|0;var e=0;n[t>>0]=0;n[t+1>>0]=0;e=t+2|0;n[e>>0]=0;n[e+1>>0]=0;t=t+4|0;n[t>>0]=0;n[t+1>>0]=0;return}function Ea(t){t=t|0;Mr(t+272|0);Mr(t+228|0);Mr(t+184|0);Mr(t+140|0);Mr(t+96|0);Mr(t+52|0);Mr(t+8|0);return}function Ma(t,e,r){t=t|0;e=e|0;r=r|0;var a=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0;p=Y;Y=Y+16|0;f=p;if(!(n[t>>0]|0)){n[t>>0]=1;wi(xi(e)|0,r,6);Sa(f,r);d=t+1|0;n[d>>0]=n[f>>0]|0;n[d+1>>0]=n[f+1>>0]|0;n[d+2>>0]=n[f+2>>0]|0;n[d+3>>0]=n[f+3>>0]|0;n[d+4>>0]=n[f+4>>0]|0;n[d+5>>0]=n[f+5>>0]|0}else{d=Zr(e,t+8|0)|0;_a(f);if(!(d&1)){a=t+1|0;a=(o[a>>0]|o[a+1>>0]<<8)&255}else{h=(Zr(e,t+52|0)|0)&255;a=t+1|0;a=(Si(h+((o[a>>0]|o[a+1>>0]<<8)&255)|0)|0)&255}i[f>>1]=a;if(!(d&2)){h=t+1|0;a=a|(o[h>>0]|o[h+1>>0]<<8)&-256}else{a=(Zr(e,t+96|0)|0)&255;h=t+1|0;a=((Si((((o[h>>0]|o[h+1>>0]<<8)&65535)>>>8)+a|0)|0)&255)<<8;a=(a|s[f>>1])&65535}i[f>>1]=a;do{if(d&64){u=t+1|0;c=(a&255)-((o[u>>0]|o[u+1>>0]<<8)&255)|0;if(!(d&4)){a=t+3|0;a=(o[a>>0]|o[a+1>>0]<<8)&255}else{a=(Zr(e,t+140|0)|0)&255;h=t+3|0;h=c+((o[h>>0]|o[h+1>>0]<<8)&255)|0;a=(Si(((h|0)<1?0:(h|0)>254?255:h&255)+a|0)|0)&255}h=f+2|0;i[h>>1]=a;if(!(d&16)){a=t+5|0;a=(o[a>>0]|o[a+1>>0]<<8)&255}else{a=Zr(e,t+228|0)|0;m=t+3|0;l=t+5|0;l=((c+(i[h>>1]&255)-((o[m>>0]|o[m+1>>0]<<8)&255)|0)/2|0)+((o[l>>0]|o[l+1>>0]<<8)&255)|0;a=(Si(((l|0)<1?0:(l|0)>254?255:l&255)+(a&255)|0)|0)&255}l=f+4|0;i[l>>1]=a;a=((s[f>>1]|0)>>>8)-(((o[u>>0]|o[u+1>>0]<<8)&65535)>>>8)|0;if(!(d&8)){c=t+3|0;c=i[h>>1]|(o[c>>0]|o[c+1>>0]<<8)&-256}else{c=(Zr(e,t+184|0)|0)&255;m=t+3|0;m=(((o[m>>0]|o[m+1>>0]<<8)&65535)>>>8)+a|0;c=((Si(((m|0)<1?0:(m|0)>254?255:m&255)+c|0)|0)&255)<<8;c=(c|s[h>>1])&65535}i[h>>1]=c;if(!(d&32)){m=t+5|0;i[l>>1]=i[l>>1]|(o[m>>0]|o[m+1>>0]<<8)&-256;break}else{m=Zr(e,t+272|0)|0;e=t+3|0;d=t+5|0;d=((((s[h>>1]|0)>>>8)+a-(((o[e>>0]|o[e+1>>0]<<8)&65535)>>>8)|0)/2|0)+(((o[d>>0]|o[d+1>>0]<<8)&65535)>>>8)|0;m=((Si(((d|0)<1?0:(d|0)>254?255:d&255)+(m&255)|0)|0)&255)<<8;i[l>>1]=m|s[l>>1];break}}else{i[f+2>>1]=a;i[f+4>>1]=a}}while(0);m=t+1|0;n[m>>0]=n[f>>0]|0;n[m+1>>0]=n[f+1>>0]|0;n[m+2>>0]=n[f+2>>0]|0;n[m+3>>0]=n[f+3>>0]|0;n[m+4>>0]=n[f+4>>0]|0;n[m+5>>0]=n[f+5>>0]|0;Ca(m,r)}Y=p;return r+6|0}function Sa(t,e){t=t|0;e=e|0;var r=0,n=0;n=ki(e)|0;r=ki(e+2|0)|0;Ta(t,n,r,ki(e+4|0)|0);return}function Ca(t,e){t=t|0;e=e|0;var r=0;Oi(o[t>>0]|o[t+1>>0]<<8,e);r=t+2|0;Oi(o[r>>0]|o[r+1>>0]<<8,e+2|0);t=t+4|0;Oi(o[t>>0]|o[t+1>>0]<<8,e+4|0);return}function Ta(t,e,r,i){t=t|0;e=e|0;r=r|0;i=i|0;n[t>>0]=e;n[t+1>>0]=e>>8;e=t+2|0;n[e>>0]=r;n[e+1>>0]=r>>8;r=t+4|0;n[r>>0]=i;n[r+1>>0]=i>>8;return}function Ia(t){t=t|0;og(t);tm(t);return}function Ra(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+4>>2]&255](t);return}function Ba(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==10570?t+12|0:0)|0}function ka(t){t=t|0;bt(t,16);return}function La(t,e,r){t=t|0;e=e|0;r=r|0;Jn(t);a[t>>2]=4872;a[t+4>>2]=e;Da(t+8|0,r);return}function Pa(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4896;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function Da(t,e){t=t|0;e=e|0;a[t>>2]=a[e>>2];n[t+4>>0]=n[e+4>>0]|0;Na(t+8|0,e+8|0);Na(t+20|0,e+20|0);za(t+32|0,e+32|0);return}function Ua(t){t=t|0;a[t>>2]=4872;fn(t+8|0);ni(t);return}function Oa(t){t=t|0;Ua(t);tm(t);return}function Fa(t,e){t=t|0;e=e|0;return xo(t+8|0,a[t+4>>2]|0,e)|0}function Na(t,e){t=t|0;e=e|0;var r=0,n=0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;r=e+4|0;n=(a[r>>2]|0)-(a[e>>2]|0)|0;if(n|0){Ga(t,n);Za(t,a[e>>2]|0,a[r>>2]|0,n)}return}function za(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;r=Y;Y=Y+32|0;n=r+24|0;i=r+16|0;s=r+8|0;o=r;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;a[t+12>>2]=0;a[t+16>>2]=0;a[t+20>>2]=0;Ao(s,e);vo(o,e);a[i>>2]=a[s>>2];a[i+4>>2]=a[s+4>>2];a[n>>2]=a[o>>2];a[n+4>>2]=a[o+4>>2];Ha(t,i,n,0);Y=r;return}function Ga(t,e){t=t|0;e=e|0;var r=0;if((Qa(t)|0)>>>0>>0)Hg(t);else{r=qm(e)|0;a[t+4>>2]=r;a[t>>2]=r;a[t+8>>2]=r+e;return}}function Za(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,o=0;o=Y;Y=Y+16|0;i=o;ja(i,t,n);n=i+4|0;t=r-e|0;if((t|0)>0){hA(a[n>>2]|0,e|0,t|0)|0;a[n>>2]=(a[n>>2]|0)+t}Wa(i);Y=o;return}function Va(t){t=t|0;var e=0,r=0;e=a[t>>2]|0;r=e;if(e|0){a[t+4>>2]=r;bt(e,(a[t+8>>2]|0)-r|0)}return}function Qa(t){t=t|0;return 2147483647}function ja(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;e=a[e+4>>2]|0;a[t+4>>2]=e;a[t+8>>2]=e+r;return}function Wa(t){t=t|0;a[(a[t>>2]|0)+4>>2]=a[t+4>>2];return}function Ha(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,o=0,s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0,g=0;g=Y;Y=Y+96|0;m=g+80|0;f=g+64|0;l=g+48|0;u=g+40|0;h=g+8|0;c=g;d=g+32|0;p=g+16|0;s=e;o=a[s>>2]|0;s=a[s+4>>2]|0;i=r;r=a[i>>2]|0;i=a[i+4>>2]|0;n=o;if((i|0)==(s|0))s=0;else s=((i-(a[r>>2]|0)|0)/44|0)+((r-o>>2)*93|0)+((s-(a[o>>2]|0)|0)/-44|0)|0;r=(a[t+8>>2]|0)-(a[t+4>>2]|0)|0;r=((r|0)==0?0:((r>>2)*93|0)+-1|0)-((a[t+20>>2]|0)+(a[t+16>>2]|0))|0;if(s>>>0>r>>>0)qa(t,s-r|0);Ya(u,t);Ya(c,t);i=c;r=a[i>>2]|0;i=a[i+4>>2]|0;o=h;a[o>>2]=r;a[o+4>>2]=i;o=r;if(s|0){r=((i-(a[r>>2]|0)|0)/44|0)+s|0;if((r|0)>0){c=(r>>>0)/93|0;s=o+(c<<2)|0;a[h>>2]=s;r=(a[s>>2]|0)+((r-(c*93|0)|0)*44|0)|0}else{r=92-r|0;c=o+(((r|0)/-93|0)<<2)|0;a[h>>2]=c;r=(a[c>>2]|0)+((92-((r|0)%93|0)|0)*44|0)|0}a[h+4>>2]=r}a[f>>2]=a[u>>2];a[f+4>>2]=a[u+4>>2];a[m>>2]=a[h>>2];a[m+4>>2]=a[h+4>>2];Ja(l,f,m);Ka(m,l);$a(f,l);if(to(m,f)|0){o=p+4|0;s=e+4|0;do{eo(d,m);ro(p,t,d);r=a[p>>2]|0;if((r|0)!=(a[o>>2]|0)){i=a[s>>2]|0;do{Nr(r,i);r=(a[p>>2]|0)+44|0;a[p>>2]=r;i=i+44|0;a[s>>2]=i;if((i-(a[n>>2]|0)|0)==4092){n=n+4|0;a[e>>2]=n;i=a[n>>2]|0;a[s>>2]=i}}while((r|0)!=(a[o>>2]|0))}no(p);io(m)|0}while(to(m,f)|0)}Y=g;return}function Xa(t){t=t|0;var e=0,r=0,n=0;e=a[t+4>>2]|0;r=t+8|0;n=a[r>>2]|0;if((n|0)!=(e|0))a[r>>2]=n+(~((n+-4-e|0)>>>2)<<2);e=a[t>>2]|0;if(e|0)bt(e,(a[t+12>>2]|0)-e|0);return}function qa(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0,g=0,A=0,v=0,b=0,x=0,w=0,_=0,E=0,M=0,S=0,C=0,T=0;C=Y;Y=Y+64|0;x=C+52|0;b=C+48|0;w=C+28|0;_=C+24|0;E=C+20|0;m=C;M=t+8|0;r=a[M>>2]|0;S=t+4|0;l=a[S>>2]|0;A=((r|0)==(l|0)&1)+e|0;s=(A>>>0)/93|0;s=s+((A-(s*93|0)|0)!=0&1)|0;A=t+16|0;n=a[A>>2]|0;c=(n>>>0)/93|0;g=s>>>0>>0?s:c;e=s-g|0;o=r;t:do{if(!e){a[A>>2]=(y(g,-93)|0)+n;if(g|0){c=t+12|0;u=t+12|0;h=w+4|0;f=w+8|0;d=w+12|0;e=g;n=l;while(1){s=a[n>>2]|0;o=n+4|0;a[S>>2]=o;v=a[c>>2]|0;n=v;do{if((r|0)==(v|0)){v=a[t>>2]|0;r=v;if(o>>>0<=v>>>0){r=n-r|0;r=(r|0)==0?1:r>>1;so(w,r,r>>>2,u);a[_>>2]=a[S>>2];a[E>>2]=a[M>>2];a[b>>2]=a[_>>2];a[x>>2]=a[E>>2];ho(w,b,x);r=a[t>>2]|0;a[t>>2]=a[w>>2];a[w>>2]=r;r=a[S>>2]|0;a[S>>2]=a[h>>2];a[h>>2]=r;r=a[M>>2]|0;a[M>>2]=a[f>>2];a[f>>2]=r;r=a[c>>2]|0;a[c>>2]=a[d>>2];a[d>>2]=r;uo(w);r=a[M>>2]|0;break}v=o;r=((v-r>>2)+1|0)/-2|0;i=o+(r<<2)|0;n=n-v|0;if(!n)r=i;else{fA(i|0,o|0,n|0)|0;r=(a[S>>2]|0)+(r<<2)|0}v=i+(n>>2<<2)|0;a[M>>2]=v;a[S>>2]=r;r=v}}while(0);a[r>>2]=s;r=(a[M>>2]|0)+4|0;a[M>>2]=r;e=e+-1|0;if(!e)break t;n=a[S>>2]|0}}}else{v=t+12|0;n=a[v>>2]|0;i=n-(a[t>>2]|0)|0;r=o-l>>2;if(e>>>0>((i>>2)-r|0)>>>0){p=i>>1;d=r+e|0;so(m,p>>>0>>0?d:p,r-g|0,t+12|0);do{a[x>>2]=qm(4092)|0;co(m,x);e=e+-1|0}while((e|0)!=0);if(!g)r=a[S>>2]|0;else{c=m+8|0;l=m+12|0;u=m+4|0;h=m+16|0;f=w+4|0;d=w+8|0;p=w+12|0;s=g;e=a[c>>2]|0;r=a[S>>2]|0;do{o=a[l>>2]|0;n=o;do{if((e|0)==(o|0)){i=a[u>>2]|0;o=a[m>>2]|0;e=o;if(i>>>0<=o>>>0){e=n-e|0;e=(e|0)==0?1:e>>1;so(w,e,e>>>2,a[h>>2]|0);a[_>>2]=a[u>>2];a[E>>2]=a[c>>2];a[b>>2]=a[_>>2];a[x>>2]=a[E>>2];ho(w,b,x);e=a[m>>2]|0;a[m>>2]=a[w>>2];a[w>>2]=e;e=a[u>>2]|0;a[u>>2]=a[f>>2];a[f>>2]=e;e=a[c>>2]|0;a[c>>2]=a[d>>2];a[d>>2]=e;e=a[l>>2]|0;a[l>>2]=a[p>>2];a[p>>2]=e;uo(w);e=a[c>>2]|0;break}T=i;e=((T-e>>2)+1|0)/-2|0;o=i+(e<<2)|0;n=n-T|0;if(!n)e=o;else{fA(o|0,i|0,n|0)|0;e=(a[u>>2]|0)+(e<<2)|0}T=o+(n>>2<<2)|0;a[c>>2]=T;a[u>>2]=e;e=T}}while(0);a[e>>2]=a[r>>2];e=(a[c>>2]|0)+4|0;a[c>>2]=e;r=(a[S>>2]|0)+4|0;a[S>>2]=r;s=s+-1|0}while((s|0)!=0)}e=a[M>>2]|0;if((e|0)!=(r|0)){do{e=e+-4|0;lo(m,e);r=a[S>>2]|0}while((e|0)!=(r|0));e=a[M>>2]|0}T=a[t>>2]|0;a[t>>2]=a[m>>2];a[m>>2]=T;T=m+4|0;a[S>>2]=a[T>>2];a[T>>2]=r;T=m+8|0;a[M>>2]=a[T>>2];a[T>>2]=e;T=m+12|0;S=a[v>>2]|0;a[v>>2]=a[T>>2];a[T>>2]=S;a[A>>2]=(a[A>>2]|0)+(y(g,-93)|0);uo(m);break}else{e:do{if((n|0)==(o|0))u=18;else{while(1){a[x>>2]=qm(4092)|0;ao(t,x);e=e+-1|0;if(!e)break;if((a[v>>2]|0)==(a[M>>2]|0)){u=18;break e}}r=g;e=a[A>>2]|0}}while(0);if((u|0)==18){n=~(s>>>0>c>>>0?c:s);r=e;do{a[x>>2]=qm(4092)|0;oo(t,x);r=r+-1|0;i=(((a[M>>2]|0)-(a[S>>2]|0)|0)==4?92:93)+(a[A>>2]|0)|0;a[A>>2]=i}while((r|0)!=0);r=e+-1-n|0;e=i}a[A>>2]=e+(y(r,-93)|0);if(!r)break;c=t+12|0;l=w+4|0;u=w+8|0;h=w+12|0;e=a[M>>2]|0;do{o=a[S>>2]|0;s=a[o>>2]|0;o=o+4|0;a[S>>2]=o;T=a[v>>2]|0;n=T;do{if((e|0)==(T|0)){T=a[t>>2]|0;e=T;if(o>>>0<=T>>>0){e=n-e|0;e=(e|0)==0?1:e>>1;so(w,e,e>>>2,c);a[_>>2]=a[S>>2];a[E>>2]=a[M>>2];a[b>>2]=a[_>>2];a[x>>2]=a[E>>2];ho(w,b,x);e=a[t>>2]|0;a[t>>2]=a[w>>2];a[w>>2]=e;e=a[S>>2]|0;a[S>>2]=a[l>>2];a[l>>2]=e;e=a[M>>2]|0;a[M>>2]=a[u>>2];a[u>>2]=e;e=a[v>>2]|0;a[v>>2]=a[h>>2];a[h>>2]=e;uo(w);e=a[M>>2]|0;break}T=o;e=((T-e>>2)+1|0)/-2|0;i=o+(e<<2)|0;n=n-T|0;if(!n)e=i;else{fA(i|0,o|0,n|0)|0;e=(a[S>>2]|0)+(e<<2)|0}T=i+(n>>2<<2)|0;a[M>>2]=T;a[S>>2]=e;e=T}}while(0);a[e>>2]=s;e=(a[M>>2]|0)+4|0;a[M>>2]=e;r=r+-1|0}while((r|0)!=0)}}}while(0);Y=C;return}function Ya(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;r=(a[e+16>>2]|0)+(a[e+20>>2]|0)|0;o=a[e+4>>2]|0;n=(r>>>0)/93|0;i=o+(n<<2)|0;if((a[e+8>>2]|0)==(o|0))e=0;else e=(a[i>>2]|0)+((r-(n*93|0)|0)*44|0)|0;a[t>>2]=i;a[t+4>>2]=e;return}function Ja(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;i=e;e=a[i+4>>2]|0;n=t;a[n>>2]=a[i>>2];a[n+4>>2]=e;n=r;e=a[n+4>>2]|0;r=t+8|0;a[r>>2]=a[n>>2];a[r+4>>2]=e;return}function Ka(t,e){t=t|0;e=e|0;a[t>>2]=a[e>>2];a[t+4>>2]=a[e+4>>2];a[t+8>>2]=a[e+8>>2];a[t+12>>2]=a[e+12>>2];return}function $a(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,c=0,l=0;r=Y;Y=Y+32|0;n=r+24|0;i=r+16|0;s=r+8|0;o=r;c=e+8|0;l=a[c>>2]|0;c=a[c+4>>2]|0;e=s;a[e>>2]=l;a[e+4>>2]=c;e=o;a[e>>2]=l;a[e+4>>2]=c;a[i>>2]=a[s>>2];a[i+4>>2]=a[s+4>>2];a[n>>2]=a[o>>2];a[n+4>>2]=a[o+4>>2];Ja(t,i,n);Y=r;return}function to(t,e){t=t|0;e=e|0;return(mo(t,e)|0)^1|0}function eo(t,e){t=t|0;e=e|0;var r=0,n=0;r=a[e>>2]|0;n=a[e+4>>2]|0;if((r|0)==(a[e+8>>2]|0))go(t,n,a[e+12>>2]|0);else go(t,n,(a[r>>2]|0)+4092|0);return}function ro(t,e,r){t=t|0;e=e|0;r=r|0;var n=0;n=a[r>>2]|0;a[t>>2]=n;a[t+4>>2]=a[r+4>>2];a[t+8>>2]=n;a[t+12>>2]=e;return}function no(t){t=t|0;var e=0;e=(a[t+12>>2]|0)+20|0;a[e>>2]=(a[e>>2]|0)+(((a[t>>2]|0)-(a[t+8>>2]|0)|0)/44|0);return}function io(t){t=t|0;var e=0,r=0,n=0;e=a[t>>2]|0;r=t+8|0;if((e|0)==(a[r>>2]|0)){n=r;e=a[n+4>>2]|0;r=t;a[r>>2]=a[n>>2];a[r+4>>2]=e}else{n=e+4|0;a[t>>2]=n;a[t+4>>2]=a[n>>2]}return t|0}function ao(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0,g=0;m=Y;Y=Y+48|0;i=m+32|0;n=m+28|0;c=m+8|0;l=m+4|0;u=m;p=t+8|0;r=a[p>>2]|0;h=t+12|0;d=a[h>>2]|0;o=d;do{if((r|0)==(d|0)){d=t+4|0;f=a[d>>2]|0;g=a[t>>2]|0;s=g;if(f>>>0<=g>>>0){r=o-s|0;r=(r|0)==0?1:r>>1;so(c,r,r>>>2,t+12|0);a[l>>2]=a[d>>2];a[u>>2]=a[p>>2];a[n>>2]=a[l>>2];a[i>>2]=a[u>>2];ho(c,n,i);r=a[t>>2]|0;a[t>>2]=a[c>>2];a[c>>2]=r;r=c+4|0;g=a[d>>2]|0;a[d>>2]=a[r>>2];a[r>>2]=g;r=c+8|0;g=a[p>>2]|0;a[p>>2]=a[r>>2];a[r>>2]=g;r=c+12|0;g=a[h>>2]|0;a[h>>2]=a[r>>2];a[r>>2]=g;uo(c);r=a[p>>2]|0;break}i=f;n=((i-s>>2)+1|0)/-2|0;t=f+(n<<2)|0;i=r-i|0;if(!i)r=t;else{fA(t|0,f|0,i|0)|0;r=(a[d>>2]|0)+(n<<2)|0}g=t+(i>>2<<2)|0;a[p>>2]=g;a[d>>2]=r;r=g}}while(0);a[r>>2]=a[e>>2];a[p>>2]=(a[p>>2]|0)+4;Y=m;return}function oo(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0,g=0;m=Y;Y=Y+48|0;n=m+32|0;r=m+28|0;s=m+8|0;c=m+4|0;l=m;p=t+4|0;f=a[p>>2]|0;d=a[t>>2]|0;u=d;do{if((f|0)==(d|0)){d=t+8|0;h=a[d>>2]|0;o=t+12|0;g=a[o>>2]|0;i=g;if(h>>>0>=g>>>0){g=i-u|0;g=(g|0)==0?1:g>>1;so(s,g,(g+3|0)>>>2,t+12|0);a[c>>2]=a[p>>2];a[l>>2]=a[d>>2];a[r>>2]=a[c>>2];a[n>>2]=a[l>>2];ho(s,r,n);r=a[t>>2]|0;a[t>>2]=a[s>>2];a[s>>2]=r;r=s+4|0;g=a[p>>2]|0;a[p>>2]=a[r>>2];a[r>>2]=g;r=s+8|0;g=a[d>>2]|0;a[d>>2]=a[r>>2];a[r>>2]=g;r=s+12|0;g=a[o>>2]|0;a[o>>2]=a[r>>2];a[r>>2]=g;uo(s);r=a[p>>2]|0;break}n=h;t=((i-n>>2)+1|0)/2|0;i=h+(t<<2)|0;n=n-f|0;r=i+(0-(n>>2)<<2)|0;if(!n){r=i;n=i}else{fA(r|0,f|0,n|0)|0;n=(a[d>>2]|0)+(t<<2)|0}a[p>>2]=r;a[d>>2]=n}else r=f}while(0);a[r+-4>>2]=a[e>>2];a[p>>2]=(a[p>>2]|0)+-4;Y=m;return}function so(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0;i=t+12|0;a[i>>2]=0;a[t+16>>2]=n;do{if(e){if(e>>>0>1073741823){i=E(8)|0;fg(i,6723);a[i>>2]=5956;S(i|0,3928,123)}else{n=qm(e<<2)|0;break}}else n=0}while(0);a[t>>2]=n;r=n+(r<<2)|0;a[t+8>>2]=r;a[t+4>>2]=r;a[i>>2]=n+(e<<2);return}function co(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0,g=0;m=Y;Y=Y+48|0;i=m+32|0;n=m+28|0;c=m+8|0;l=m+4|0;u=m;p=t+8|0;r=a[p>>2]|0;h=t+12|0;d=a[h>>2]|0;o=d;do{if((r|0)==(d|0)){d=t+4|0;f=a[d>>2]|0;g=a[t>>2]|0;s=g;if(f>>>0<=g>>>0){r=o-s|0;r=(r|0)==0?1:r>>1;so(c,r,r>>>2,a[t+16>>2]|0);a[l>>2]=a[d>>2];a[u>>2]=a[p>>2];a[n>>2]=a[l>>2];a[i>>2]=a[u>>2];ho(c,n,i);r=a[t>>2]|0;a[t>>2]=a[c>>2];a[c>>2]=r;r=c+4|0;g=a[d>>2]|0;a[d>>2]=a[r>>2];a[r>>2]=g;r=c+8|0;g=a[p>>2]|0;a[p>>2]=a[r>>2];a[r>>2]=g;r=c+12|0;g=a[h>>2]|0;a[h>>2]=a[r>>2];a[r>>2]=g;uo(c);r=a[p>>2]|0;break}i=f;n=((i-s>>2)+1|0)/-2|0;t=f+(n<<2)|0;i=r-i|0;if(!i)r=t;else{fA(t|0,f|0,i|0)|0;r=(a[d>>2]|0)+(n<<2)|0}g=t+(i>>2<<2)|0;a[p>>2]=g;a[d>>2]=r;r=g}}while(0);a[r>>2]=a[e>>2];a[p>>2]=(a[p>>2]|0)+4;Y=m;return}function lo(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0,g=0;m=Y;Y=Y+48|0;n=m+32|0;r=m+28|0;s=m+8|0;c=m+4|0;l=m;p=t+4|0;f=a[p>>2]|0;d=a[t>>2]|0;u=d;do{if((f|0)==(d|0)){d=t+8|0;h=a[d>>2]|0;o=t+12|0;g=a[o>>2]|0;i=g;if(h>>>0>=g>>>0){g=i-u|0;g=(g|0)==0?1:g>>1;so(s,g,(g+3|0)>>>2,a[t+16>>2]|0);a[c>>2]=a[p>>2];a[l>>2]=a[d>>2];a[r>>2]=a[c>>2];a[n>>2]=a[l>>2];ho(s,r,n);r=a[t>>2]|0;a[t>>2]=a[s>>2];a[s>>2]=r;r=s+4|0;g=a[p>>2]|0;a[p>>2]=a[r>>2];a[r>>2]=g;r=s+8|0;g=a[d>>2]|0;a[d>>2]=a[r>>2];a[r>>2]=g;r=s+12|0;g=a[o>>2]|0;a[o>>2]=a[r>>2];a[r>>2]=g;uo(s);r=a[p>>2]|0;break}n=h;t=((i-n>>2)+1|0)/2|0;i=h+(t<<2)|0;n=n-f|0;r=i+(0-(n>>2)<<2)|0;if(!n){r=i;n=i}else{fA(r|0,f|0,n|0)|0;n=(a[d>>2]|0)+(t<<2)|0}a[p>>2]=r;a[d>>2]=n}else r=f}while(0);a[r+-4>>2]=a[e>>2];a[p>>2]=(a[p>>2]|0)+-4;Y=m;return}function uo(t){t=t|0;var e=0,r=0,n=0;e=a[t+4>>2]|0;r=t+8|0;n=a[r>>2]|0;if((n|0)!=(e|0))a[r>>2]=n+(~((n+-4-e|0)>>>2)<<2);e=a[t>>2]|0;if(e|0)bt(e,(a[t+12>>2]|0)-e|0);return}function ho(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0;s=Y;Y=Y+16|0;o=s;i=a[e>>2]|0;fo(o,t+8|0,(a[r>>2]|0)-i>>2);t=a[o>>2]|0;n=o+4|0;if((t|0)!=(a[n>>2]|0)){r=i;do{a[t>>2]=a[r>>2];t=(a[o>>2]|0)+4|0;a[o>>2]=t;r=r+4|0}while((t|0)!=(a[n>>2]|0));a[e>>2]=r}po(o);Y=s;return}function fo(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=a[e>>2];a[t+4>>2]=(a[e>>2]|0)+(r<<2);a[t+8>>2]=e;return}function po(t){t=t|0;a[a[t+8>>2]>>2]=a[t>>2];return}function mo(t,e){t=t|0;e=e|0;return(a[t+4>>2]|0)==(a[e+4>>2]|0)|0}function go(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;a[t+4>>2]=r;return}function Ao(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;o=a[e+4>>2]|0;r=a[e+16>>2]|0;n=(r>>>0)/93|0;i=o+(n<<2)|0;if((a[e+8>>2]|0)==(o|0))e=0;else e=(a[i>>2]|0)+((r-(n*93|0)|0)*44|0)|0;a[t>>2]=i;a[t+4>>2]=e;return}function vo(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;r=(a[e+16>>2]|0)+(a[e+20>>2]|0)|0;o=a[e+4>>2]|0;n=(r>>>0)/93|0;i=o+(n<<2)|0;if((a[e+8>>2]|0)==(o|0))e=0;else e=(a[i>>2]|0)+((r-(n*93|0)|0)*44|0)|0;a[t>>2]=i;a[t+4>>2]=e;return}function yo(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,c=0;c=Y;Y=Y+16|0;n=c+8|0;o=c;bo(n,t);Ya(o,t);i=n+4|0;e=a[i>>2]|0;o=o+4|0;if((e|0)!=(a[o>>2]|0))do{Mr(e);e=(a[i>>2]|0)+44|0;a[i>>2]=e;r=a[n>>2]|0;if((e-(a[r>>2]|0)|0)==4092){e=r+4|0;a[n>>2]=e;e=a[e>>2]|0;a[i>>2]=e}}while((e|0)!=(a[o>>2]|0));a[t+20>>2]=0;i=t+8|0;n=t+4|0;r=a[n>>2]|0;e=(a[i>>2]|0)-r>>2;if(e>>>0>2)do{bt(a[r>>2]|0,4092);r=(a[n>>2]|0)+4|0;a[n>>2]=r;e=(a[i>>2]|0)-r>>2}while(e>>>0>2);switch(e|0){case 1:{e=46;s=11;break}case 2:{e=93;s=11;break}default:{}}if((s|0)==11)a[t+16>>2]=e;Y=c;return}function bo(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;o=a[e+4>>2]|0;r=a[e+16>>2]|0;n=(r>>>0)/93|0;i=o+(n<<2)|0;if((a[e+8>>2]|0)==(o|0))e=0;else e=(a[i>>2]|0)+((r-(n*93|0)|0)*44|0)|0;a[t>>2]=i;a[t+4>>2]=e;return}function xo(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,s=0,c=0,l=0,u=0,h=0,f=0;f=Y;Y=Y+16|0;h=f;l=t+4|0;if(!(n[l>>0]|0)){h=xi(e)|0;wi(h,r,a[t>>2]|0);h=a[t>>2]|0;c=r+h|0;if(!h)i=0;else{i=r;s=a[t+8>>2]|0;while(1){n[s>>0]=n[i>>0]|0;i=i+1|0;if((i|0)==(c|0))break;else s=s+1|0}i=a[t>>2]|0}n[l>>0]=1;r=r+i|0}else{s=a[t+20>>2]|0;i=a[t+8>>2]|0;bo(h,t+32|0);t=t+12|0;if((i|0)!=(a[t>>2]|0)){u=h+4|0;l=i;c=s;i=a[u>>2]|0;while(1){s=o[l>>0]|0;s=wo((Zr(e,i)|0)+s|0)|0;n[c>>0]=s;n[r>>0]=s;n[l>>0]=s;l=l+1|0;r=r+1|0;s=a[h>>2]|0;i=(a[u>>2]|0)+44|0;a[u>>2]=i;if((i-(a[s>>2]|0)|0)==4092){i=s+4|0;a[h>>2]=i;i=a[i>>2]|0;a[u>>2]=i}if((l|0)==(a[t>>2]|0))break;else c=c+1|0}}}Y=f;return r|0}function wo(t){t=t|0;return t&255|0}function _o(t){t=t|0;og(t);tm(t);return}function Eo(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+4>>2]&255](t);return}function Mo(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==11262?t+12|0:0)|0}function So(t){t=t|0;bt(t,16);return}function Co(t,e){t=t|0;e=e|0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;if(e|0){Ga(t,e);Io(t,e)}return}function To(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;a[t+12>>2]=0;a[t+16>>2]=0;a[t+20>>2]=0;if(e|0)Ro(t,e,r);return}function Io(t,e){t=t|0;e=e|0;var r=0,i=0,o=0;o=Y;Y=Y+16|0;i=o;ja(i,t,e);e=i+4|0;t=a[e>>2]|0;r=i+8|0;if((t|0)!=(a[r>>2]|0))do{n[t>>0]=0;t=(a[e>>2]|0)+1|0;a[e>>2]=t}while((t|0)!=(a[r>>2]|0));Wa(i);Y=o;return}function Ro(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0;p=Y;Y=Y+96|0;d=p+80|0;u=p+64|0;s=p+48|0;c=p+40|0;l=p+8|0;i=p;h=p+32|0;f=p+16|0;n=(a[t+8>>2]|0)-(a[t+4>>2]|0)|0;n=((n|0)==0?0:((n>>2)*93|0)+-1|0)-((a[t+20>>2]|0)+(a[t+16>>2]|0))|0;if(n>>>0>>0)qa(t,e-n|0);Ya(c,t);Ya(i,t);n=a[i>>2]|0;i=a[i+4>>2]|0;o=l;a[o>>2]=n;a[o+4>>2]=i;o=n;if(e|0){n=((i-(a[n>>2]|0)|0)/44|0)+e|0;if((n|0)>0){e=(n>>>0)/93|0;o=o+(e<<2)|0;a[l>>2]=o;n=(a[o>>2]|0)+((n-(e*93|0)|0)*44|0)|0}else{n=92-n|0;e=o+(((n|0)/-93|0)<<2)|0;a[l>>2]=e;n=(a[e>>2]|0)+((92-((n|0)%93|0)|0)*44|0)|0}a[l+4>>2]=n}a[u>>2]=a[c>>2];a[u+4>>2]=a[c+4>>2];a[d>>2]=a[l>>2];a[d+4>>2]=a[l+4>>2];Ja(s,u,d);Ka(d,s);$a(u,s);if(to(d,u)|0){i=f+4|0;do{eo(h,d);ro(f,t,h);n=a[f>>2]|0;if((n|0)!=(a[i>>2]|0))do{Nr(n,r);n=(a[f>>2]|0)+44|0;a[f>>2]=n}while((n|0)!=(a[i>>2]|0));no(f);io(d)|0}while(to(d,u)|0)}Y=p;return}function Bo(t){t=t|0;var e=0,r=0;yo(t);e=a[t+4>>2]|0;r=a[t+8>>2]|0;if((e|0)!=(r|0))do{bt(a[e>>2]|0,4092);e=e+4|0}while((e|0)!=(r|0));Xa(t);return}function ko(t,e,r){t=t|0;e=e|0;r=r|0;Rn(t);a[t>>2]=4924;a[t+4>>2]=e;a[t+8>>2]=r;return}function Lo(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4944;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;zo(t,n);Y=r;return}function Po(t,e){t=t|0;e=e|0;return Oo(a[t+8>>2]|0,a[t+4>>2]|0,e)|0}function Do(t){t=t|0;var e=0,r=0;a[t>>2]=4924;r=t+8|0;e=a[r>>2]|0;a[r>>2]=0;if(e|0){No(e);tm(e)}Pn(t);return}function Uo(t){t=t|0;Do(t);tm(t);return}function Oo(t,e,r){t=t|0;e=e|0;r=r|0;return Fo(t+4784|0,e,yi(t,e,r)|0)|0}function Fo(t,e,r){t=t|0;e=e|0;r=r|0;if(n[t>>0]|0){ir(e);n[t>>0]=0}return r|0}function No(t){t=t|0;Ai(t);return}function zo(t,e){t=t|0;e=e|0;return}function Go(t){t=t|0;og(t);tm(t);return}function Zo(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+8>>2]&255](t);return}function Vo(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==12004?t+12|0:0)|0}function Qo(t){t=t|0;bt(t,16);return}function jo(t){t=t|0;n[t>>0]=1;return}function Wo(t,e,r){t=t|0;e=e|0;r=r|0;Rn(t);a[t>>2]=4972;a[t+4>>2]=e;a[t+8>>2]=r;return}function Ho(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=4992;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;zo(t,n);Y=r;return}function Xo(t,e){t=t|0;e=e|0;return Jo(a[t+8>>2]|0,a[t+4>>2]|0,e)|0}function qo(t){t=t|0;var e=0,r=0;a[t>>2]=4972;r=t+8|0;e=a[r>>2]|0;a[r>>2]=0;if(e|0){$o(e);tm(e)}Pn(t);return}function Yo(t){t=t|0;qo(t);tm(t);return}function Jo(t,e,r){t=t|0;e=e|0;r=r|0;return Ko(t+4784|0,e,yi(t,e,r)|0)|0}function Ko(t,e,r){t=t|0;e=e|0;r=r|0;return Fo(t+328|0,e,sa(t,e,r)|0)|0}function $o(t){t=t|0;ts(t+4784|0);Ai(t);return}function ts(t){t=t|0;aa(t);return}function es(t){t=t|0;og(t);tm(t);return}function rs(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+8>>2]&255](t);return}function ns(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==12827?t+12|0:0)|0}function is(t){t=t|0;bt(t,16);return}function as(t){t=t|0;Xi(t);jo(t+328|0);return}function os(t,e,r){t=t|0;e=e|0;r=r|0;Rn(t);a[t>>2]=5020;a[t+4>>2]=e;a[t+8>>2]=r;return}function ss(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5040;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;zo(t,n);Y=r;return}function cs(t,e){t=t|0;e=e|0;return hs(a[t+8>>2]|0,a[t+4>>2]|0,e)|0}function ls(t){t=t|0;var e=0,r=0;a[t>>2]=5020;r=t+8|0;e=a[r>>2]|0;a[r>>2]=0;if(e|0){ds(e);tm(e)}Pn(t);return}function us(t){t=t|0;ls(t);tm(t);return}function hs(t,e,r){t=t|0;e=e|0;r=r|0;return fs(t+4784|0,e,yi(t,e,r)|0)|0}function fs(t,e,r){t=t|0;e=e|0;r=r|0;return Fo(t+316|0,e,Ma(t,e,r)|0)|0}function ds(t){t=t|0;ps(t+4784|0);Ai(t);return}function ps(t){t=t|0;Ea(t);return}function ms(t){t=t|0;og(t);tm(t);return}function gs(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+8>>2]&255](t);return}function As(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==13672?t+12|0:0)|0}function vs(t){t=t|0;bt(t,16);return}function ys(t){t=t|0;ya(t);jo(t+316|0);return}function bs(t,e,r){t=t|0;e=e|0;r=r|0;Rn(t);a[t>>2]=5068;a[t+4>>2]=e;a[t+8>>2]=r;return}function xs(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5088;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;zo(t,n);Y=r;return}function ws(t,e){t=t|0;e=e|0;return Ms(a[t+8>>2]|0,a[t+4>>2]|0,e)|0}function _s(t){t=t|0;var e=0,r=0;a[t>>2]=5068;r=t+8|0;e=a[r>>2]|0;a[r>>2]=0;if(e|0){Cs(e);tm(e)}Pn(t);return}function Es(t){t=t|0;_s(t);tm(t);return}function Ms(t,e,r){t=t|0;e=e|0;r=r|0;return Ss(t+4784|0,e,yi(t,e,r)|0)|0}function Ss(t,e,r){t=t|0;e=e|0;r=r|0;return fs(t+328|0,e,sa(t,e,r)|0)|0}function Cs(t){t=t|0;Ts(t+4784|0);Ai(t);return}function Ts(t){t=t|0;ps(t+328|0);aa(t);return}function Is(t){t=t|0;og(t);tm(t);return}function Rs(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+8>>2]&255](t);return}function Bs(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==14573?t+12|0:0)|0}function ks(t){t=t|0;bt(t,16);return}function Ls(t){t=t|0;Xi(t);ys(t+328|0);return}function Ps(t){t=t|0;return t+20|0}function Ds(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=e;a[t+4>>2]=r;a[t+8>>2]=0;return}function Us(t,e){t=t|0;e=e|0;a[t>>2]=e;a[t+4>>2]=0;a[t+8>>2]=-1;return}function Os(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;r=Y;Y=Y+16|0;n=r+4|0;o=r;i=qm(24)|0;tc(i,e);a[o>>2]=0;a[n>>2]=a[o>>2];ec(t,i,n);Y=r;return}function Fs(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){QA[a[(a[t>>2]|0)+8>>2]&255](t);sg(t)}return}function Ns(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5116;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gs(t,n);Y=r;return}function zs(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){QA[a[(a[t>>2]|0)+8>>2]&255](t);sg(t)}return}function Gs(t,e){t=t|0;e=e|0;return}function Zs(t){t=t|0;og(t);tm(t);return}function Vs(t){t=t|0;t=a[t+12>>2]|0;if(t|0)tm(t);return}function Qs(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==14966?t+12|0:0)|0}function js(t){t=t|0;bt(t,16);return}function Ws(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5144;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Xs(t,n);Y=r;return}function Hs(t){t=t|0;var e=0,r=0;t=a[t+4>>2]|0;if(t|0?(r=t+4|0,e=a[r>>2]|0,a[r>>2]=e+-1,(e|0)==0):0){QA[a[(a[t>>2]|0)+8>>2]&255](t);sg(t)}return}function Xs(t,e){t=t|0;e=e|0;return}function qs(t){t=t|0;og(t);tm(t);return}function Ys(t){t=t|0;t=a[t+12>>2]|0;if(t|0){$s(t);tm(t)}return}function Js(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==15127?t+12|0:0)|0}function Ks(t){t=t|0;bt(t,16);return}function $s(t){t=t|0;return}function tc(t,e){t=t|0;e=e|0;Rn(t);a[t>>2]=5172;a[t+4>>2]=e;a[t+8>>2]=0;a[t+12>>2]=0;a[t+16>>2]=0;n[t+20>>0]=1;return}function ec(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5192;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;sc(t,n);Y=r;return}function rc(t,e){t=t|0;e=e|0;var r=0,i=0,o=0,s=0,c=0,l=0,u=0;u=Y;Y=Y+16|0;s=u;r=a[t+8>>2]|0;c=a[t+12>>2]|0;if((r|0)!=(c|0)){l=s+4|0;do{i=a[r>>2]|0;a[s>>2]=i;o=a[r+4>>2]|0;a[l>>2]=o;if(o|0){o=o+4|0;a[o>>2]=(a[o>>2]|0)+1}e=GA[a[(a[i>>2]|0)+12>>2]&63](i,e)|0;Un(s);r=r+8|0}while((r|0)!=(c|0))}r=t+20|0;if(n[r>>0]|0){n[r>>0]=0;ac(a[t+4>>2]|0)}Y=u;return e|0}function nc(t){t=t|0;a[t>>2]=5172;On(t+8|0);Pn(t);return}function ic(t){t=t|0;nc(t);tm(t);return}function ac(t){t=t|0;var e=0;e=((oc(a[t>>2]|0)|0)&255)<<24;e=((oc(a[t>>2]|0)|0)&255)<<16|e;e=e|((oc(a[t>>2]|0)|0)&255)<<8;a[t+4>>2]=e|(oc(a[t>>2]|0)|0)&255;return}function oc(t){t=t|0;var e=0,r=0;e=a[t>>2]|0;r=t+8|0;t=a[r>>2]|0;a[r>>2]=t+1;return n[e+t>>0]|0}function sc(t,e){t=t|0;e=e|0;return}function cc(t){t=t|0;og(t);tm(t);return}function lc(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+8>>2]&255](t);return}function uc(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==15450?t+12|0:0)|0}function hc(t){t=t|0;bt(t,16);return}function fc(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0;l=Y;Y=Y+32|0;n=l+12|0;i=l;e=l+8|0;s=qm(180)|0;pc(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];mc(i,s,n);s=t+12|0;e=a[s>>2]|0;c=t+16|0;do{if(e>>>0>=(a[c>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)Hg(o);else{u=a[o>>2]|0;h=(a[c>>2]|0)-u|0;c=h>>2;Hn(n,h>>3>>>0>>1>>>0?c>>>0>>0?e:c:r,(a[s>>2]|0)-u>>3,t+16|0);c=n+8|0;s=a[c>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[c>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];c=i+4|0;a[u+4>>2]=a[c>>2];a[i>>2]=0;a[c>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=l;return}function dc(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0;l=Y;Y=Y+32|0;n=l+12|0;i=l;e=l+8|0;s=qm(180)|0;Fc(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];Nc(i,s,n);s=t+12|0;e=a[s>>2]|0;c=t+16|0;do{if(e>>>0>=(a[c>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)Hg(o);else{u=a[o>>2]|0;h=(a[c>>2]|0)-u|0;c=h>>2;Hn(n,h>>3>>>0>>1>>>0?c>>>0>>0?e:c:r,(a[s>>2]|0)-u>>3,t+16|0);c=n+8|0;s=a[c>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[c>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];c=i+4|0;a[u+4>>2]=a[c>>2];a[i>>2]=0;a[c>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=l;return}function pc(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=5220;a[t+4>>2]=e;gc(t+8|0);return}function mc(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5244;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function gc(t){t=t|0;mi(t,32,1,8,0);nr(t+80|0,32,1,8,0);n[t+160>>0]=0;n[t+161>>0]=0;bc(t+164|0);return}function Ac(t){t=t|0;a[t>>2]=5220;xc(t+8|0);ni(t);return}function vc(t){t=t|0;Ac(t);tm(t);return}function yc(t,e){t=t|0;e=e|0;return wc(t+8|0,a[t+4>>2]|0,e)|0}function bc(t){t=t|0;n[t+4>>0]=0;return}function xc(t){t=t|0;sr(t+80|0);gi(t);return}function wc(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0;s=Y;Y=Y+16|0;i=s;if(!(n[t+161>>0]|0))ar(t+80|0);o=t+164|0;if(_c(o)|0){e=Ec(t+80|0,e,a[o>>2]|0,0)|0;a[i>>2]=e;Ui(e,r)}else{Sc(Mc(e)|0,r,4);a[i>>2]=Bi(r)|0}Cc(o,i);Y=s;return r+4|0}function _c(t){t=t|0;return(n[t+4>>0]|0)!=0|0}function Ec(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;r=(Tc(t,e,(a[t+36>>2]|0)+(n*44|0)|0)|0)+r|0;e=a[t+24>>2]|0;if((r|0)<0)return r+e|0;else return r-(r>>>0>>0?0:e)|0;return 0}function Mc(t){t=t|0;return a[t>>2]|0}function Sc(t,e,r){t=t|0;e=e|0;r=r|0;var i=0;if((r|0)>0){i=0;do{n[e+i>>0]=oc(t)|0;i=i+1|0}while((i|0)!=(r|0))}return}function Cc(t,e){t=t|0;e=e|0;var r=0;r=t+4|0;if(!(n[r>>0]|0))n[r>>0]=1;a[t>>2]=a[e>>2];return}function Tc(t,e,r){t=t|0;e=e|0;r=r|0;var n=0;r=Ic(e,r)|0;a[t>>2]=r;do{if(r){if(r>>>0>=32){r=a[t+28>>2]|0;break}n=a[t+12>>2]|0;if(r>>>0>n>>>0){n=r-n|0;r=Ic(e,(a[t+68>>2]|0)+((r+-1|0)*44|0)|0)|0;n=r<>2]|0)+((r+-1|0)*44|0)|0)|0;r=a[t>>2]|0;if((n|0)<(1<>2]|0;i=a[e+16>>2]|0;if(i){n=t+4|0;r=a[n>>2]|0;h=f>>>15;a[d>>2]=h;l=(r>>>0)/(h>>>0)|0;c=l>>>(a[e+40>>2]|0);o=a[i+(c<<2)>>2]|0;c=(a[i+(c+1<<2)>>2]|0)+1|0;s=o+1|0;u=a[e+8>>2]|0;if(c>>>0>s>>>0){i=o;o=c;do{s=(o+i|0)>>>1;c=(a[u+(s<<2)>>2]|0)>>>0>l>>>0;i=c?i:s;o=c?s:o;s=i+1|0}while(o>>>0>s>>>0);o=i}i=y(a[u+(o<<2)>>2]|0,h)|0;if((o|0)==(a[e+32>>2]|0))s=f;else s=y(a[u+(s<<2)>>2]|0,h)|0}else{u=f>>>15;a[d>>2]=u;c=a[e>>2]|0;h=a[e+8>>2]|0;n=t+4|0;r=a[n>>2]|0;l=c>>>1;i=0;s=f;o=0;do{p=y(a[h+(l<<2)>>2]|0,u)|0;f=p>>>0>r>>>0;s=f?p:s;i=f?i:p;o=f?o:l;c=f?l:c;l=(o+c|0)>>>1}while((l|0)!=(o|0))}a[n>>2]=r-i;p=s-i|0;a[d>>2]=p;if(p>>>0<16777216)kc(t);d=(a[e+12>>2]|0)+(o<<2)|0;a[d>>2]=(a[d>>2]|0)+1;d=e+28|0;p=(a[d>>2]|0)+-1|0;a[d>>2]=p;if(!p)zr(e);return o|0}function Rc(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;if(e>>>0>19){r=(Lc(t)|0)&65535;return(Rc(t,e+-16|0)|0)<<16|r|0}n=t+4|0;i=a[n>>2]|0;o=t+8|0;r=(a[o>>2]|0)>>>e;a[o>>2]=r;e=(i>>>0)/(r>>>0)|0;a[n>>2]=i-(y(e,r)|0);if(r>>>0<16777216)kc(t);return e|0}function Bc(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0,c=0;n=t+8|0;i=a[n>>2]|0;r=y(i>>>13,a[e+8>>2]|0)|0;o=t+4|0;s=a[o>>2]|0;c=s>>>0>=r>>>0;if(c){a[o>>2]=s-r;r=i-r|0;a[n>>2]=r}else{a[n>>2]=r;s=e+12|0;a[s>>2]=(a[s>>2]|0)+1}if(r>>>0<16777216)kc(t);s=e+4|0;t=(a[s>>2]|0)+-1|0;a[s>>2]=t;if(!t)Hr(e);return c&1|0}function kc(t){t=t|0;var e=0,r=0,n=0,i=0;e=t+4|0;r=t+8|0;n=a[e>>2]|0;do{n=n<<8|(oc(a[t>>2]|0)|0)&255;a[e>>2]=n;i=a[r>>2]<<8;a[r>>2]=i}while(i>>>0<16777216);return}function Lc(t){t=t|0;var e=0,r=0,n=0,i=0;r=t+4|0;i=a[r>>2]|0;e=t+8|0;n=(a[e>>2]|0)>>>16;a[e>>2]=n;e=(i>>>0)/(n>>>0)|0;a[r>>2]=i-(y(e,n)|0);kc(t);return e&65535|0}function Pc(t){t=t|0;og(t);tm(t);return}function Dc(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+4>>2]&255](t);return}function Uc(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==15904?t+12|0:0)|0}function Oc(t){t=t|0;bt(t,16);return}function Fc(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=5272;a[t+4>>2]=e;zc(t+8|0);return}function Nc(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5296;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function zc(t){t=t|0;mi(t,32,1,8,0);nr(t+80|0,32,1,8,0);n[t+160>>0]=0;n[t+161>>0]=0;Qc(t+164|0);return}function Gc(t){t=t|0;a[t>>2]=5272;jc(t+8|0);ni(t);return}function Zc(t){t=t|0;Gc(t);tm(t);return}function Vc(t,e){t=t|0;e=e|0;return Wc(t+8|0,a[t+4>>2]|0,e)|0}function Qc(t){t=t|0;n[t+4>>0]=0;return}function jc(t){t=t|0;sr(t+80|0);gi(t);return}function Wc(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0;s=Y;Y=Y+16|0;i=s;if(!(n[t+161>>0]|0))ar(t+80|0);o=t+164|0;if(Hc(o)|0){e=Ec(t+80|0,e,a[o>>2]|0,0)|0;a[i>>2]=e;zi(e,r)}else{Sc(Mc(e)|0,r,4);a[i>>2]=Di(r)|0}Xc(o,i);Y=s;return r+4|0}function Hc(t){t=t|0;return(n[t+4>>0]|0)!=0|0}function Xc(t,e){t=t|0;e=e|0;var r=0;r=t+4|0;if(!(n[r>>0]|0))n[r>>0]=1;a[t>>2]=a[e>>2];return}function qc(t){t=t|0;og(t);tm(t);return}function Yc(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+4>>2]&255](t);return}function Jc(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==16402?t+12|0:0)|0}function Kc(t){t=t|0;bt(t,16);return}function $c(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0;l=Y;Y=Y+32|0;n=l+12|0;i=l;e=l+8|0;s=qm(172)|0;el(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];rl(i,s,n);s=t+12|0;e=a[s>>2]|0;c=t+16|0;do{if(e>>>0>=(a[c>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)Hg(o);else{u=a[o>>2]|0;h=(a[c>>2]|0)-u|0;c=h>>2;Hn(n,h>>3>>>0>>1>>>0?c>>>0>>0?e:c:r,(a[s>>2]|0)-u>>3,t+16|0);c=n+8|0;s=a[c>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[c>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];c=i+4|0;a[u+4>>2]=a[c>>2];a[i>>2]=0;a[c>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=l;return}function tl(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0;l=Y;Y=Y+32|0;n=l+12|0;i=l;e=l+8|0;s=qm(176)|0;vl(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];yl(i,s,n);s=t+12|0;e=a[s>>2]|0;c=t+16|0;do{if(e>>>0>=(a[c>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)Hg(o);else{u=a[o>>2]|0;h=(a[c>>2]|0)-u|0;c=h>>2;Hn(n,h>>3>>>0>>1>>>0?c>>>0>>0?e:c:r,(a[s>>2]|0)-u>>3,t+16|0);c=n+8|0;s=a[c>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[c>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];c=i+4|0;a[u+4>>2]=a[c>>2];a[i>>2]=0;a[c>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=l;return}function el(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=5324;a[t+4>>2]=e;nl(t+8|0);return}function rl(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5348;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function nl(t){t=t|0;mi(t,8,1,8,0);nr(t+80|0,8,1,8,0);n[t+160>>0]=0;n[t+161>>0]=0;sl(t+162|0);return}function il(t){t=t|0;a[t>>2]=5324;cl(t+8|0);ni(t);return}function al(t){t=t|0;il(t);tm(t);return}function ol(t,e){t=t|0;e=e|0;return ll(t+8|0,a[t+4>>2]|0,e)|0}function sl(t){t=t|0;n[t+1>>0]=0;return}function cl(t){t=t|0;sr(t+80|0);gi(t);return}function ll(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,a=0,o=0;o=Y;Y=Y+16|0;i=o;if(!(n[t+161>>0]|0))ar(t+80|0);a=t+162|0;if(ul(a)|0){e=(Ec(t+80|0,e,n[a>>0]|0,0)|0)&255;n[i>>0]=e;hl(e,r)}else{Sc(Mc(e)|0,r,1);n[i>>0]=fl(r)|0}dl(a,i);Y=o;return r+1|0}function ul(t){t=t|0;return(n[t+1>>0]|0)!=0|0}function hl(t,e){t=t|0;e=e|0;n[e>>0]=t;return}function fl(t){t=t|0;return n[t>>0]|0}function dl(t,e){t=t|0;e=e|0;var r=0;r=t+1|0;if(!(n[r>>0]|0))n[r>>0]=1;n[t>>0]=n[e>>0]|0;return}function pl(t){t=t|0;og(t);tm(t);return}function ml(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+4>>2]&255](t);return}function gl(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==16900?t+12|0:0)|0}function Al(t){t=t|0;bt(t,16);return}function vl(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=5376;a[t+4>>2]=e;bl(t+8|0);return}function yl(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5400;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function bl(t){t=t|0;mi(t,16,1,8,0);nr(t+80|0,16,1,8,0);n[t+160>>0]=0;n[t+161>>0]=0;El(t+162|0);return}function xl(t){t=t|0;a[t>>2]=5376;Ml(t+8|0);ni(t);return}function wl(t){t=t|0;xl(t);tm(t);return}function _l(t,e){t=t|0;e=e|0;return Sl(t+8|0,a[t+4>>2]|0,e)|0}function El(t){t=t|0;n[t+2>>0]=0;return}function Ml(t){t=t|0;sr(t+80|0);gi(t);return}function Sl(t,e,r){t=t|0;e=e|0;r=r|0;var a=0,o=0,s=0;s=Y;Y=Y+16|0;a=s;if(!(n[t+161>>0]|0))ar(t+80|0);o=t+162|0;if(Cl(o)|0){e=(Ec(t+80|0,e,i[o>>1]|0,0)|0)&65535;i[a>>1]=e;Tl(e,r)}else{Sc(Mc(e)|0,r,2);i[a>>1]=Il(r)|0}Rl(o,a);Y=s;return r+2|0}function Cl(t){t=t|0;return(n[t+2>>0]|0)!=0|0}function Tl(t,e){t=t|0;e=e|0;Oi(t,e);return}function Il(t){t=t|0;return ki(t)|0}function Rl(t,e){t=t|0;e=e|0;var r=0;r=t+2|0;if(!(n[r>>0]|0))n[r>>0]=1;i[t>>1]=i[e>>1]|0;return}function Bl(t){t=t|0;og(t);tm(t);return}function kl(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+4>>2]&255](t);return}function Ll(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==17398?t+12|0:0)|0}function Pl(t){t=t|0;bt(t,16);return}function Dl(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0;l=Y;Y=Y+32|0;n=l+12|0;i=l;e=l+8|0;s=qm(172)|0;Ol(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];Fl(i,s,n);s=t+12|0;e=a[s>>2]|0;c=t+16|0;do{if(e>>>0>=(a[c>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)Hg(o);else{u=a[o>>2]|0;h=(a[c>>2]|0)-u|0;c=h>>2;Hn(n,h>>3>>>0>>1>>>0?c>>>0>>0?e:c:r,(a[s>>2]|0)-u>>3,t+16|0);c=n+8|0;s=a[c>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[c>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];c=i+4|0;a[u+4>>2]=a[c>>2];a[i>>2]=0;a[c>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=l;return}function Ul(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0;l=Y;Y=Y+32|0;n=l+12|0;i=l;e=l+8|0;s=qm(176)|0;Kl(s,a[t+4>>2]|0);o=t+8|0;a[e>>2]=0;a[n>>2]=a[e>>2];$l(i,s,n);s=t+12|0;e=a[s>>2]|0;c=t+16|0;do{if(e>>>0>=(a[c>>2]|0)>>>0){e=(e-(a[o>>2]|0)>>3)+1|0;r=Yn(o)|0;if(r>>>0>>0)Hg(o);else{u=a[o>>2]|0;h=(a[c>>2]|0)-u|0;c=h>>2;Hn(n,h>>3>>>0>>1>>>0?c>>>0>>0?e:c:r,(a[s>>2]|0)-u>>3,t+16|0);c=n+8|0;s=a[c>>2]|0;a[s>>2]=a[i>>2];t=i+4|0;a[s+4>>2]=a[t>>2];a[i>>2]=0;a[t>>2]=0;a[c>>2]=s+8;Xn(o,n);qn(n);break}}else{jn(n,o,1);h=n+4|0;u=a[h>>2]|0;a[u>>2]=a[i>>2];c=i+4|0;a[u+4>>2]=a[c>>2];a[i>>2]=0;a[c>>2]=0;a[h>>2]=u+8;Wn(n)}}while(0);Un(i);Y=l;return}function Ol(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=5428;a[t+4>>2]=e;Nl(t+8|0);return}function Fl(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5452;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function Nl(t){t=t|0;mi(t,8,1,8,0);nr(t+80|0,8,1,8,0);n[t+160>>0]=0;n[t+161>>0]=0;Vl(t+162|0);return}function zl(t){t=t|0;a[t>>2]=5428;Ql(t+8|0);ni(t);return}function Gl(t){t=t|0;zl(t);tm(t);return}function Zl(t,e){t=t|0;e=e|0;return jl(t+8|0,a[t+4>>2]|0,e)|0}function Vl(t){t=t|0;n[t+1>>0]=0;return}function Ql(t){t=t|0;sr(t+80|0);gi(t);return}function jl(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,a=0,s=0;s=Y;Y=Y+16|0;i=s;if(!(n[t+161>>0]|0))ar(t+80|0);a=t+162|0;if(Wl(a)|0){e=(Ec(t+80|0,e,o[a>>0]|0,0)|0)&255;n[i>>0]=e;Fi(e,r)}else{Sc(Mc(e)|0,r,1);n[i>>0]=Li(r)|0}Hl(a,i);Y=s;return r+1|0}function Wl(t){t=t|0;return(n[t+1>>0]|0)!=0|0}function Hl(t,e){t=t|0;e=e|0;var r=0;r=t+1|0;if(!(n[r>>0]|0))n[r>>0]=1;n[t>>0]=n[e>>0]|0;return}function Xl(t){t=t|0;og(t);tm(t);return}function ql(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+4>>2]&255](t);return}function Yl(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==17896?t+12|0:0)|0}function Jl(t){t=t|0;bt(t,16);return}function Kl(t,e){t=t|0;e=e|0;Jn(t);a[t>>2]=5480;a[t+4>>2]=e;tu(t+8|0);return}function $l(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;r=Y;Y=Y+16|0;n=r;a[t>>2]=e;i=qm(16)|0;a[i+4>>2]=0;a[i+8>>2]=0;a[i>>2]=5504;a[i+12>>2]=e;a[t+4>>2]=i;a[n>>2]=e;a[n+4>>2]=e;Gi(t,n);Y=r;return}function tu(t){t=t|0;mi(t,16,1,8,0);nr(t+80|0,16,1,8,0);n[t+160>>0]=0;n[t+161>>0]=0;iu(t+162|0);return}function eu(t){t=t|0;a[t>>2]=5480;au(t+8|0);ni(t);return}function ru(t){t=t|0;eu(t);tm(t);return}function nu(t,e){t=t|0;e=e|0;return ou(t+8|0,a[t+4>>2]|0,e)|0}function iu(t){t=t|0;n[t+2>>0]=0;return}function au(t){t=t|0;sr(t+80|0);gi(t);return}function ou(t,e,r){t=t|0;e=e|0;r=r|0;var a=0,o=0,c=0;c=Y;Y=Y+16|0;a=c;if(!(n[t+161>>0]|0))ar(t+80|0);o=t+162|0;if(su(o)|0){e=(Ec(t+80|0,e,s[o>>1]|0,0)|0)&65535;i[a>>1]=e;Oi(e,r)}else{Sc(Mc(e)|0,r,2);i[a>>1]=ki(r)|0}cu(o,a);Y=c;return r+2|0}function su(t){t=t|0;return(n[t+2>>0]|0)!=0|0}function cu(t,e){t=t|0;e=e|0;var r=0;r=t+2|0;if(!(n[r>>0]|0))n[r>>0]=1;i[t>>1]=i[e>>1]|0;return}function lu(t){t=t|0;og(t);tm(t);return}function uu(t){t=t|0;t=a[t+12>>2]|0;if(t|0)QA[a[(a[t>>2]|0)+4>>2]&255](t);return}function hu(t,e){t=t|0;e=e|0;return((a[e+4>>2]|0)==18394?t+12|0:0)|0}function fu(t){t=t|0;bt(t,16);return}function du(){return}function pu(t){t=t|0;return wu(t)|0}function mu(){return 0}function gu(){return 0}function Au(t){t=t|0;if(t|0){_u(t);tm(t)}return}function vu(){return Eu()|0}function yu(){return Mu()|0}function bu(){return Su()|0}function xu(){return 0}function wu(t){t=t|0;return 3360}function _u(t){t=t|0;var e=0,r=0,n=0,i=0;e=Y;Y=Y+16|0;n=e;a[n>>2]=a[t>>2];a[t>>2]=0;r=t+4|0;a[n+4>>2]=a[r>>2];a[r>>2]=0;dt(n);r=t+8|0;a[n>>2]=a[r>>2];a[r>>2]=0;i=t+12|0;a[n+4>>2]=a[i>>2];a[i>>2]=0;_t(n);_t(r);dt(t);Y=e;return}function Eu(){return 3360}function Mu(){return 3368}function Su(){return 3384}function Cu(){return 18579}function Tu(){return 18582}function Iu(){return 18584}function Ru(){var t=0;t=qm(16)|0;Ou(t);return t|0}function Bu(t){t=t|0;var e=0,r=0,n=0,i=0;e=Y;Y=Y+16|0;r=e;i=vu()|0;n=Lu(r)|0;r=Pu(r)|0;L(i|0,n|0,r|0,Cu()|0,12,t|0);Y=e;return}function ku(t){t=t|0;return Du(FA[t&3]()|0)|0}function Lu(t){t=t|0;return 1}function Pu(t){t=t|0;return Uu()|0}function Du(t){t=t|0;return t|0}function Uu(){return 5524}function Ou(t){t=t|0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;a[t+12>>2]=0;return}function Fu(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;r=Y;Y=Y+16|0;n=r;i=r+8|0;s=a[e+4>>2]|0;a[n>>2]=a[e>>2];a[n+4>>2]=s;s=vu()|0;o=zu(i)|0;i=Gu(i)|0;e=Hu()|0;P(s|0,t|0,o|0,i|0,e|0,4,Zu(n)|0,0);Y=r;return}function Nu(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,o=0;o=Vu(e)|0;e=a[t>>2]|0;i=a[t+4>>2]|0;t=o+(i>>1)|0;if(i&1)e=a[(a[t>>2]|0)+e>>2]|0;i=Qu(r)|0;o=ju(n)|0;WA[e&15](t,i,o);return}function zu(t){t=t|0;return 4}function Gu(t){t=t|0;return Wu()|0}function Zu(t){t=t|0;var e=0,r=0;e=qm(8)|0;r=a[t+4>>2]|0;a[e>>2]=a[t>>2];a[e+4>>2]=r;return e|0}function Vu(t){t=t|0;return t|0}function Qu(t){t=t|0;return t|0}function ju(t){t=t|0;return t|0}function Wu(){return 144}function Hu(){return 18587}function Xu(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;r=Y;Y=Y+16|0;n=r;i=r+8|0;s=a[e+4>>2]|0;a[n>>2]=a[e>>2];a[n+4>>2]=s;s=vu()|0;o=Yu(i)|0;i=Ju(i)|0;e=eh()|0;P(s|0,t|0,o|0,i|0,e|0,7,Ku(n)|0,0);Y=r;return}function qu(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;i=Vu(e)|0;e=a[t>>2]|0;n=a[t+4>>2]|0;t=i+(n>>1)|0;if(n&1)e=a[(a[t>>2]|0)+e>>2]|0;i=$u(r)|0;jA[e&15](t,i);return}function Yu(t){t=t|0;return 3}function Ju(t){t=t|0;return th()|0}function Ku(t){t=t|0;var e=0,r=0;e=qm(8)|0;r=a[t+4>>2]|0;a[e>>2]=a[t>>2];a[e+4>>2]=r;return e|0}function $u(t){t=t|0;return t|0}function th(){return 5528}function eh(){return 18593}function rh(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;r=Y;Y=Y+16|0;n=r;i=r+8|0;s=a[e+4>>2]|0;a[n>>2]=a[e>>2];a[n+4>>2]=s;s=vu()|0;o=ih(i)|0;i=ah(i)|0;e=lh()|0;P(s|0,t|0,o|0,i|0,e|0,41,oh(n)|0,0);Y=r;return}function nh(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0;n=Y;Y=Y+16|0;r=n;o=Vu(e)|0;e=a[t>>2]|0;i=a[t+4>>2]|0;t=o+(i>>1)|0;if(i&1)e=a[(a[t>>2]|0)+e>>2]|0;a[r>>2]=NA[e&15](t)|0;o=sh(r)|0;Y=n;return o|0}function ih(t){t=t|0;return 2}function ah(t){t=t|0;return ch()|0}function oh(t){t=t|0;var e=0,r=0;e=qm(8)|0;r=a[t+4>>2]|0;a[e>>2]=a[t>>2];a[e+4>>2]=r;return e|0}function sh(t){t=t|0;return a[t>>2]|0}function ch(){return 5540}function lh(){return 18598}function uh(){return}function hh(t){t=t|0;return vh(t)|0}function fh(){return 0}function dh(){return 0}function ph(t){t=t|0;if(t|0){yh(t);tm(t)}return}function mh(){return bh()|0}function gh(){return xh()|0}function Ah(){return wh()|0}function vh(t){t=t|0;return 3400}function yh(t){t=t|0;var e=0,r=0,n=0,i=0;e=Y;Y=Y+16|0;n=e;a[n>>2]=a[t>>2];a[t>>2]=0;r=t+4|0;a[n+4>>2]=a[r>>2];a[r>>2]=0;zs(n);r=t+16|0;a[n>>2]=a[r>>2];a[r>>2]=0;i=t+20|0;a[n+4>>2]=a[i>>2];a[i>>2]=0;Fs(n);a[n>>2]=a[r>>2];a[r>>2]=0;a[n+4>>2]=a[i>>2];a[i>>2]=0;Fs(n);Fs(r);Hs(t+8|0);zs(t);Y=e;return}function bh(){return 3400}function xh(){return 3408}function wh(){return 3424}function _h(){var t=0;t=qm(24)|0;Rh(t);return t|0}function Eh(t){t=t|0;var e=0,r=0,n=0,i=0;e=Y;Y=Y+16|0;r=e;i=mh()|0;n=Sh(r)|0;r=Ch(r)|0;L(i|0,n|0,r|0,Cu()|0,13,t|0);Y=e;return}function Mh(t){t=t|0;return Th(FA[t&3]()|0)|0}function Sh(t){t=t|0;return 1}function Ch(t){t=t|0;return Ih()|0}function Th(t){t=t|0;return t|0}function Ih(){return 5548}function Rh(t){t=t|0;a[t>>2]=0;a[t+4>>2]=0;a[t+8>>2]=0;a[t+12>>2]=0;a[t+16>>2]=0;a[t+20>>2]=0;return}function Bh(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;r=Y;Y=Y+16|0;n=r;i=r+8|0;s=a[e+4>>2]|0;a[n>>2]=a[e>>2];a[n+4>>2]=s;s=mh()|0;o=Lh(i)|0;i=Ph(i)|0;e=Hu()|0;P(s|0,t|0,o|0,i|0,e|0,5,Dh(n)|0,0);Y=r;return}function kh(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,o=0;o=Uh(e)|0;e=a[t>>2]|0;i=a[t+4>>2]|0;t=o+(i>>1)|0;if(i&1)e=a[(a[t>>2]|0)+e>>2]|0;i=Qu(r)|0;o=ju(n)|0;WA[e&15](t,i,o);return}function Lh(t){t=t|0;return 4}function Ph(t){t=t|0;return Oh()|0}function Dh(t){t=t|0;var e=0,r=0;e=qm(8)|0;r=a[t+4>>2]|0;a[e>>2]=a[t>>2];a[e+4>>2]=r;return e|0}function Uh(t){t=t|0;return t|0}function Oh(){return 160}function Fh(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;r=Y;Y=Y+16|0;n=r;i=r+8|0;s=a[e+4>>2]|0;a[n>>2]=a[e>>2];a[n+4>>2]=s;s=mh()|0;o=zh(i)|0;i=Gh(i)|0;e=eh()|0;P(s|0,t|0,o|0,i|0,e|0,8,Zh(n)|0,0);Y=r;return}function Nh(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;i=Uh(e)|0;e=a[t>>2]|0;n=a[t+4>>2]|0;t=i+(n>>1)|0;if(n&1)e=a[(a[t>>2]|0)+e>>2]|0;i=ju(r)|0;jA[e&15](t,i);return}function zh(t){t=t|0;return 3}function Gh(t){t=t|0;return Vh()|0}function Zh(t){t=t|0;var e=0,r=0;e=qm(8)|0;r=a[t+4>>2]|0;a[e>>2]=a[t>>2];a[e+4>>2]=r;return e|0}function Vh(){return 5552}function Qh(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;r=Y;Y=Y+16|0;n=r;i=r+8|0;s=a[e+4>>2]|0;a[n>>2]=a[e>>2];a[n+4>>2]=s;s=mh()|0;o=Wh(i)|0;i=Hh(i)|0;e=eh()|0;P(s|0,t|0,o|0,i|0,e|0,9,Xh(n)|0,0);Y=r;return}function jh(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;i=Uh(e)|0;e=a[t>>2]|0;n=a[t+4>>2]|0;t=i+(n>>1)|0;if(n&1)e=a[(a[t>>2]|0)+e>>2]|0;i=$u(r)|0;jA[e&15](t,i);return}function Wh(t){t=t|0;return 3}function Hh(t){t=t|0;return qh()|0}function Xh(t){t=t|0;var e=0,r=0;e=qm(8)|0;r=a[t+4>>2]|0;a[e>>2]=a[t>>2];a[e+4>>2]=r;return e|0}function qh(){return 5564}function Yh(){tt();return}function Jh(){Kh();return}function Kh(){$h(22144);return}function $h(t){t=t|0;var e=0;e=Y;Y=Y+16|0;a[e>>2]=t;tf();Y=e;return}function tf(){G(ef()|0,18653);B(rf()|0,18658,1,1,0);nf(18663);af(18668);of(18680);sf(18694);cf(18700);lf(18715);uf(18719);hf(18732);ff(18737);df(18751);pf(18757);N(mf()|0,18764);N(gf()|0,18776);z(Af()|0,4,18809);z(vf()|0,2,18822);z(yf()|0,4,18837);D(bf()|0,18852);xf(18868);wf(18898);_f(18935);Ef(18974);Mf(19005);Sf(19045);Cf(19074);Tf(19112);If(19142);wf(19181);_f(19213);Ef(19246);Mf(19279);Sf(19313);Cf(19346);Rf(19380);Bf(19411);kf(19443);return}function ef(){return Qd()|0}function rf(){return Vd()|0}function nf(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Gd()|0;O(t|0,a[r>>2]|0,1,-128<<24>>24|0,127<<24>>24|0);Y=e;return}function af(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Nd()|0;O(t|0,a[r>>2]|0,1,-128<<24>>24|0,127<<24>>24|0);Y=e;return}function of(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Od()|0;O(t|0,a[r>>2]|0,1,0,255);Y=e;return}function sf(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Dd()|0;O(t|0,a[r>>2]|0,2,-32768<<16>>16|0,32767<<16>>16|0);Y=e;return}function cf(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Ld()|0;O(t|0,a[r>>2]|0,2,0,65535);Y=e;return}function lf(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Bd()|0;O(t|0,a[r>>2]|0,4,-2147483648,2147483647);Y=e;return}function uf(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Id()|0;O(t|0,a[r>>2]|0,4,0,-1);Y=e;return}function hf(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Cd()|0;O(t|0,a[r>>2]|0,4,-2147483648,2147483647);Y=e;return}function ff(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=Md()|0;O(t|0,a[r>>2]|0,4,0,-1);Y=e;return}function df(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=_d()|0;U(t|0,a[r>>2]|0,4);Y=e;return}function pf(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;t=xd()|0;U(t|0,a[r>>2]|0,8);Y=e;return}function mf(){return bd()|0}function gf(){return yd()|0}function Af(){return vd()|0}function vf(){return Ad()|0}function yf(){return gd()|0}function bf(){return md()|0}function xf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=fd()|0;t=dd()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function wf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=ld()|0;t=ud()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function _f(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=od()|0;t=sd()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Ef(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=nd()|0;t=id()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Mf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=td()|0;t=ed()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Sf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=Jf()|0;t=Kf()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Cf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=Xf()|0;t=qf()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Tf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=jf()|0;t=Wf()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function If(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=Zf()|0;t=Vf()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Rf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=Nf()|0;t=zf()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Bf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=Uf()|0;t=Of()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function kf(t){t=t|0;var e=0,r=0,n=0;e=Y;Y=Y+16|0;r=e;a[r>>2]=t;n=Lf()|0;t=Pf()|0;F(n|0,t|0,a[r>>2]|0);Y=e;return}function Lf(){return Df()|0}function Pf(){return 7}function Df(){return 3440}function Uf(){return Ff()|0}function Of(){return 7}function Ff(){return 3448}function Nf(){return Gf()|0}function zf(){return 6}function Gf(){return 3456}function Zf(){return Qf()|0}function Vf(){return 5}function Qf(){return 3464}function jf(){return Hf()|0}function Wf(){return 4}function Hf(){return 3472}function Xf(){return Yf()|0}function qf(){return 5}function Yf(){return 3480}function Jf(){return $f()|0}function Kf(){return 4}function $f(){return 3488}function td(){return rd()|0}function ed(){return 3}function rd(){return 3496}function nd(){return ad()|0}function id(){return 2}function ad(){return 3504}function od(){return cd()|0}function sd(){return 1}function cd(){return 3512}function ld(){return hd()|0}function ud(){return 0}function hd(){return 3520}function fd(){return pd()|0}function dd(){return 0}function pd(){return 3528}function md(){return 3536}function gd(){return 3544}function Ad(){return 3576}function vd(){return 3600}function yd(){return 3624}function bd(){return 3648}function xd(){return wd()|0}function wd(){return 4144}function _d(){return Ed()|0}function Ed(){return 4136}function Md(){return Sd()|0}function Sd(){return 4128}function Cd(){return Td()|0}function Td(){return 4120}function Id(){return Rd()|0}function Rd(){return 4112}function Bd(){return kd()|0}function kd(){return 4104}function Ld(){return Pd()|0}function Pd(){return 4096}function Dd(){return Ud()|0}function Ud(){return 4088}function Od(){return Fd()|0}function Fd(){return 4072}function Nd(){return zd()|0}function zd(){return 4080}function Gd(){return Zd()|0}function Zd(){return 4064}function Vd(){return 4056}function Qd(){return 4040}function jd(t){t=t|0;var e=0,r=0,n=0,i=0;e=Y;Y=Y+16|0;r=e+8|0;n=e+4|0;i=e;a[i>>2]=t;a[n>>2]=a[i>>2];a[r>>2]=a[(a[n>>2]|0)+4>>2];t=Sp(a[r>>2]|0)|0;Y=e;return t|0}function Wd(){return 21636}function Hd(t){t=t|0;return(t+-48|0)>>>0<10|0}function Xd(){return 5576}function qd(t,e){t=t|0;e=e|0;var r=0,i=0;r=n[t>>0]|0;i=n[e>>0]|0;if(r<<24>>24==0?1:r<<24>>24!=i<<24>>24)t=i;else{do{t=t+1|0;e=e+1|0;r=n[t>>0]|0;i=n[e>>0]|0}while(!(r<<24>>24==0?1:r<<24>>24!=i<<24>>24));t=i}return(r&255)-(t&255)|0}function Yd(t){t=t|0;var e=0,r=0,i=0;i=t;t:do{if(!(i&3))r=5;else{e=i;while(1){if(!(n[t>>0]|0)){t=e;break t}t=t+1|0;e=t;if(!(e&3)){r=5;break}}}}while(0);if((r|0)==5){while(1){e=a[t>>2]|0;if(!((e&-2139062144^-2139062144)&e+-16843009))t=t+4|0;else break}if((e&255)<<24>>24)do{t=t+1|0}while((n[t>>0]|0)!=0)}return t-i|0}function Jd(t){t=t|0;return}function Kd(t){t=t|0;return 1}function $d(t){t=t|0;var e=0,r=0;e=t+74|0;r=n[e>>0]|0;n[e>>0]=r+255|r;e=a[t>>2]|0;if(!(e&8)){a[t+8>>2]=0;a[t+4>>2]=0;r=a[t+44>>2]|0;a[t+28>>2]=r;a[t+20>>2]=r;a[t+16>>2]=r+(a[t+48>>2]|0);t=0}else{a[t>>2]=e|32;t=-1}return t|0}function tp(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,c=0,l=0;i=r+16|0;o=a[i>>2]|0;if(!o){if(!($d(r)|0)){o=a[i>>2]|0;s=5}else i=0}else s=5;t:do{if((s|0)==5){l=r+20|0;c=a[l>>2]|0;i=c;if((o-c|0)>>>0>>0){i=ZA[a[r+36>>2]&7](r,t,e)|0;break}e:do{if((n[r+75>>0]|0)<0|(e|0)==0){s=0;o=t}else{c=e;while(1){o=c+-1|0;if((n[t+o>>0]|0)==10)break;if(!o){s=0;o=t;break e}else c=o}i=ZA[a[r+36>>2]&7](r,t,c)|0;if(i>>>0>>0)break t;s=c;o=t+c|0;e=e-c|0;i=a[l>>2]|0}}while(0);hA(i|0,o|0,e|0)|0;a[l>>2]=(a[l>>2]|0)+e;i=s+e|0}}while(0);return i|0}function ep(t,e){t=t|0;e=e|0;if(!e)e=0;else e=rp(a[e>>2]|0,a[e+4>>2]|0,t)|0;return((e|0)==0?t:e)|0}function rp(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0;p=(a[t>>2]|0)+1794895138|0;s=np(a[t+8>>2]|0,p)|0;i=np(a[t+12>>2]|0,p)|0;o=np(a[t+16>>2]|0,p)|0;t:do{if((s>>>0>>2>>>0?(d=e-(s<<2)|0,i>>>0>>0&o>>>0>>0):0)?((o|i)&3|0)==0:0){d=i>>>2;f=o>>>2;h=0;while(1){l=s>>>1;u=h+l|0;c=u<<1;o=c+d|0;i=np(a[t+(o<<2)>>2]|0,p)|0;o=np(a[t+(o+1<<2)>>2]|0,p)|0;if(!(o>>>0>>0&i>>>0<(e-o|0)>>>0)){i=0;break t}if(n[t+(o+i)>>0]|0){i=0;break t}i=qd(r,t+o|0)|0;if(!i)break;i=(i|0)<0;if((s|0)==1){i=0;break t}h=i?h:u;s=i?l:s-l|0}i=c+f|0;o=np(a[t+(i<<2)>>2]|0,p)|0;i=np(a[t+(i+1<<2)>>2]|0,p)|0;if(i>>>0>>0&o>>>0<(e-i|0)>>>0)i=(n[t+(i+o)>>0]|0)==0?t+i|0:0;else i=0}else i=0}while(0);return i|0}function np(t,e){t=t|0;e=e|0;var r=0;r=uA(t|0)|0;return((e|0)==0?t:r)|0}function ip(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0;s=e&255;i=(r|0)!=0;t:do{if(i&(t&3|0)!=0){o=e&255;while(1){if((n[t>>0]|0)==o<<24>>24){o=6;break t}t=t+1|0;r=r+-1|0;i=(r|0)!=0;if(!(i&(t&3|0)!=0)){o=5;break}}}else o=5}while(0);if((o|0)==5)if(i)o=6;else t=0;t:do{if((o|0)==6){if((n[t>>0]|0)!=(e&255)<<24>>24){i=y(s,16843009)|0;e:do{if(r>>>0>3)do{s=a[t>>2]^i;if((s&-2139062144^-2139062144)&s+-16843009|0)break e;t=t+4|0;r=r+-4|0}while(r>>>0>3)}while(0)}if(!r)t=0;else{i=e&255;while(1){if((n[t>>0]|0)==i<<24>>24)break t;r=r+-1|0;if(!r){t=0;break}else t=t+1|0}}}}while(0);return t|0}function ap(t,e,r){t=t|0;e=e|0;r=r|0;return cp(t,e,r,1,8)|0}function op(t,e,r,i,s,c){t=t|0;e=+e;r=r|0;i=i|0;s=s|0;c=c|0;var l=0,u=0,h=0,f=0,d=0,p=0,m=0,g=0.0,A=0,v=0,b=0,x=0,w=0,E=0,M=0,S=0,C=0,T=0,I=0,R=0,B=0,k=0,L=0;L=Y;Y=Y+560|0;h=L+32|0;x=L+536|0;k=L;B=k;f=L+540|0;a[x>>2]=0;R=f+12|0;bp(e)|0;l=_()|0;if((l|0)<0){e=-e;bp(e)|0;I=1;T=20247;l=_()|0}else{I=(s&2049|0)!=0&1;T=(s&2048|0)==0?(s&1|0)==0?20248:20253:20250}do{if(0==0&(l&2146435072|0)==2146435072){k=(c&32|0)!=0;l=I+3|0;gp(t,32,r,l,s&-65537);up(t,T,I);up(t,e!=e|0.0!=0.0?k?20274:20278:k?20266:20270,3);gp(t,32,r,l,s^8192)}else{g=+xp(e,x)*2.0;l=g!=0.0;if(l)a[x>>2]=(a[x>>2]|0)+-1;b=c|32;if((b|0)==97){p=c&32;A=(p|0)==0?T:T+9|0;m=I|2;l=12-i|0;do{if(!(i>>>0>11|(l|0)==0)){e=8.0;do{l=l+-1|0;e=e*16.0}while((l|0)!=0);if((n[A>>0]|0)==45){e=-(e+(-g-e));break}else{e=g+e-e;break}}else e=g}while(0);u=a[x>>2]|0;l=(u|0)<0?0-u|0:u;l=mp(l,((l|0)<0)<<31>>31,R)|0;if((l|0)==(R|0)){l=f+11|0;n[l>>0]=48}n[l+-1>>0]=(u>>31&2)+43;d=l+-2|0;n[d>>0]=c+15;u=(i|0)<1;h=(s&8|0)==0;f=k;do{I=~~e;l=f+1|0;n[f>>0]=p|o[640+I>>0];e=(e-+(I|0))*16.0;if((l-B|0)==1?!(h&(u&e==0.0)):0){n[l>>0]=46;f=f+2|0}else f=l}while(e!=0.0);if((i|0)!=0?(-2-B+f|0)<(i|0):0){u=R;h=d;l=i+2+u-h|0}else{u=R;h=d;l=u-B-h+f|0}R=l+m|0;gp(t,32,r,R,s);up(t,A,m);gp(t,48,r,R,s^65536);B=f-B|0;up(t,k,B);k=u-h|0;gp(t,48,l-(B+k)|0,0,0);up(t,d,k);gp(t,32,r,R,s^8192);l=R;break}u=(i|0)<0?6:i;if(l){l=(a[x>>2]|0)+-28|0;a[x>>2]=l;e=g*268435456.0}else{e=g;l=a[x>>2]|0}C=(l|0)<0?h:h+288|0;h=C;do{M=~~e>>>0;a[h>>2]=M;h=h+4|0;e=(e-+(M>>>0))*1.0e9}while(e!=0.0);M=C;if((l|0)>0){p=C;while(1){d=(l|0)<29?l:29;l=h+-4|0;if(l>>>0>=p>>>0){f=0;do{v=cA(a[l>>2]|0,0,d|0)|0;v=rA(v|0,_()|0,f|0,0)|0;w=_()|0;f=oA(v|0,w|0,1e9,0)|0;E=eA(f|0,_()|0,1e9,0)|0;E=nA(v|0,w|0,E|0,_()|0)|0;_()|0;a[l>>2]=E;l=l+-4|0}while(l>>>0>=p>>>0);if(f){E=p+-4|0;a[E>>2]=f;f=E}else f=p}else f=p;t:do{if(h>>>0>f>>>0){l=h;while(1){h=l+-4|0;if(a[h>>2]|0){h=l;break t}if(h>>>0>f>>>0)l=h;else break}}}while(0);l=(a[x>>2]|0)-d|0;a[x>>2]=l;if((l|0)>0)p=f;else break}}else f=C;if((l|0)<0){i=((u+25|0)/9|0)+1|0;v=(b|0)==102;do{A=0-l|0;A=(A|0)<9?A:9;if(f>>>0>>0){d=(1<>>A;m=0;l=f;do{E=a[l>>2]|0;a[l>>2]=(E>>>A)+m;m=y(E&d,p)|0;l=l+4|0}while(l>>>0>>0);f=(a[f>>2]|0)==0?f+4|0:f;if(m){a[h>>2]=m;h=h+4|0}}else f=(a[f>>2]|0)==0?f+4|0:f;l=v?C:f;h=(h-l>>2|0)>(i|0)?l+(i<<2)|0:h;l=(a[x>>2]|0)+A|0;a[x>>2]=l}while((l|0)<0);v=f}else v=f;if(v>>>0>>0){l=(M-v>>2)*9|0;d=a[v>>2]|0;if(d>>>0>=10){f=10;do{f=f*10|0;l=l+1|0}while(d>>>0>=f>>>0)}}else l=0;w=(b|0)==103;E=(u|0)!=0;f=u-((b|0)==102?0:l)+((E&w)<<31>>31)|0;if((f|0)<(((h-M>>2)*9|0)+-9|0)){x=f+9216|0;f=(x|0)/9|0;i=C+4+(f+-1024<<2)|0;f=x-(f*9|0)|0;if((f|0)<8){d=10;while(1){d=d*10|0;if((f|0)<7)f=f+1|0;else break}}else d=10;m=a[i>>2]|0;f=(m>>>0)/(d>>>0)|0;A=m-(y(f,d)|0)|0;p=(i+4|0)==(h|0);if(!(p&(A|0)==0)){g=(f&1|0)==0?9007199254740992.0:9007199254740994.0;x=d>>>1;e=A>>>0>>0?0.5:p&(A|0)==(x|0)?1.0:1.5;if(I){x=(n[T>>0]|0)==45;e=x?-e:e;g=x?-g:g}f=m-A|0;a[i>>2]=f;if(g+e!=g){x=f+d|0;a[i>>2]=x;if(x>>>0>999999999){d=i;l=v;while(1){f=d+-4|0;a[d>>2]=0;if(f>>>0>>0){l=l+-4|0;a[l>>2]=0}x=(a[f>>2]|0)+1|0;a[f>>2]=x;if(x>>>0>999999999)d=f;else{d=l;break}}}else{f=i;d=v}l=(M-d>>2)*9|0;m=a[d>>2]|0;if(m>>>0>=10){p=10;do{p=p*10|0;l=l+1|0}while(m>>>0>=p>>>0)}}else{f=i;d=v}}else{f=i;d=v}x=f+4|0;h=h>>>0>x>>>0?x:h}else d=v;i=0-l|0;t:do{if(h>>>0>d>>>0)while(1){f=h+-4|0;if(a[f>>2]|0){x=h;b=1;break t}if(f>>>0>d>>>0)h=f;else{x=f;b=0;break}}else{x=h;b=0}}while(0);do{if(w){u=u+((E^1)&1)|0;if((u|0)>(l|0)&(l|0)>-5){p=c+-1|0;u=u+-1-l|0}else{p=c+-2|0;u=u+-1|0}if(!(s&8)){if(b?(S=a[x+-4>>2]|0,(S|0)!=0):0){if(!((S>>>0)%10|0)){f=0;h=10;do{h=h*10|0;f=f+1|0}while(!((S>>>0)%(h>>>0)|0|0))}else f=0}else f=9;h=((x-M>>2)*9|0)+-9|0;if((p|32|0)==102){c=h-f|0;c=(c|0)>0?c:0;u=(u|0)<(c|0)?u:c;break}else{c=h+l-f|0;c=(c|0)>0?c:0;u=(u|0)<(c|0)?u:c;break}}}else p=c}while(0);v=(u|0)!=0;m=v?1:s>>>3&1;A=(p|32|0)==102;if(A){w=0;l=(l|0)>0?l:0}else{h=(l|0)<0?i:l;h=mp(h,((h|0)<0)<<31>>31,R)|0;f=R;if((f-h|0)<2)do{h=h+-1|0;n[h>>0]=48}while((f-h|0)<2);n[h+-1>>0]=(l>>31&2)+43;l=h+-2|0;n[l>>0]=p;w=l;l=f-l|0}l=I+1+u+m+l|0;gp(t,32,r,l,s);up(t,T,I);gp(t,48,r,l,s^65536);if(A){m=d>>>0>C>>>0?C:d;A=k+9|0;d=A;p=k+8|0;f=m;do{h=mp(a[f>>2]|0,0,A)|0;if((f|0)==(m|0)){if((h|0)==(A|0)){n[p>>0]=48;h=p}}else if(h>>>0>k>>>0){dA(k|0,48,h-B|0)|0;do{h=h+-1|0}while(h>>>0>k>>>0)}up(t,h,d-h|0);f=f+4|0}while(f>>>0<=C>>>0);if(!((s&8|0)==0&(v^1)))up(t,20282,1);if(f>>>0>>0&(u|0)>0)while(1){h=mp(a[f>>2]|0,0,A)|0;if(h>>>0>k>>>0){dA(k|0,48,h-B|0)|0;do{h=h+-1|0}while(h>>>0>k>>>0)}up(t,h,(u|0)<9?u:9);f=f+4|0;h=u+-9|0;if(!(f>>>0>>0&(u|0)>9)){u=h;break}else u=h}gp(t,48,u+9|0,9,0)}else{x=b?x:d+4|0;if(d>>>0>>0&(u|0)>-1){i=k+9|0;v=(s&8|0)==0;b=i;m=0-B|0;A=k+8|0;p=d;do{h=mp(a[p>>2]|0,0,i)|0;if((h|0)==(i|0)){n[A>>0]=48;h=A}do{if((p|0)==(d|0)){f=h+1|0;up(t,h,1);if(v&(u|0)<1){h=f;break}up(t,20282,1);h=f}else{if(h>>>0<=k>>>0)break;dA(k|0,48,h+m|0)|0;do{h=h+-1|0}while(h>>>0>k>>>0)}}while(0);B=b-h|0;up(t,h,(u|0)>(B|0)?B:u);u=u-B|0;p=p+4|0}while(p>>>0>>0&(u|0)>-1)}gp(t,48,u+18|0,18,0);up(t,w,R-w|0)}gp(t,32,r,l,s^8192)}}while(0);Y=L;return((l|0)<(r|0)?r:l)|0}function sp(t,e){t=t|0;e=e|0;var r=0.0,n=0;n=(a[e>>2]|0)+(8-1)&~(8-1);r=+l[n>>3];a[e>>2]=n+8;l[t>>3]=r;return}function cp(t,e,r,i,o){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;var s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0,g=0,A=0,v=0,y=0;y=Y;Y=Y+224|0;m=y+208|0;g=y+160|0;A=y+80|0;v=y;s=g;c=s+40|0;do{a[s>>2]=0;s=s+4|0}while((s|0)<(c|0));a[m>>2]=a[r>>2];if((lp(0,e,m,A,g,i,o)|0)<0)r=-1;else{if((a[t+76>>2]|0)>-1)p=Kd(t)|0;else p=0;r=a[t>>2]|0;d=r&32;if((n[t+74>>0]|0)<1)a[t>>2]=r&-33;s=t+48|0;if(!(a[s>>2]|0)){c=t+44|0;l=a[c>>2]|0;a[c>>2]=v;u=t+28|0;a[u>>2]=v;h=t+20|0;a[h>>2]=v;a[s>>2]=80;f=t+16|0;a[f>>2]=v+80;r=lp(t,e,m,A,g,i,o)|0;if(l){ZA[a[t+36>>2]&7](t,0,0)|0;r=(a[h>>2]|0)==0?-1:r;a[c>>2]=l;a[s>>2]=0;a[f>>2]=0;a[u>>2]=0;a[h>>2]=0}}else r=lp(t,e,m,A,g,i,o)|0;s=a[t>>2]|0;a[t>>2]=s|d;if(p|0)Jd(t);r=(s&32|0)==0?r:-1}Y=y;return r|0}function lp(t,e,r,o,s,c,u){t=t|0;e=e|0;r=r|0;o=o|0;s=s|0;c=c|0;u=u|0;var h=0,f=0,d=0,p=0,m=0,g=0,A=0,v=0,y=0,b=0,x=0,w=0,E=0,M=0,S=0,C=0,T=0,I=0,R=0,B=0,k=0,L=0,P=0,D=0,U=0;D=Y;Y=Y+64|0;k=D+56|0;P=D+40|0;C=D;I=D+48|0;R=D+60|0;a[k>>2]=e;E=(t|0)!=0;M=C+40|0;S=M;C=C+39|0;T=I+4|0;h=0;e=0;d=0;t:while(1){do{do{if((e|0)>-1)if((h|0)>(2147483647-e|0)){a[(Wd()|0)>>2]=61;e=-1;break}else{e=h+e|0;break}}while(0);A=a[k>>2]|0;h=n[A>>0]|0;if(!(h<<24>>24)){w=92;break t}f=A;e:while(1){switch(h<<24>>24){case 37:{w=10;break e}case 0:{h=f;break e}default:{}}x=f+1|0;a[k>>2]=x;h=n[x>>0]|0;f=x}e:do{if((w|0)==10){w=0;h=f;do{if((n[f+1>>0]|0)!=37)break e;h=h+1|0;f=f+2|0;a[k>>2]=f}while((n[f>>0]|0)==37)}}while(0);h=h-A|0;if(E)up(t,A,h)}while((h|0)!=0);x=(Hd(n[(a[k>>2]|0)+1>>0]|0)|0)==0;f=a[k>>2]|0;if(!x?(n[f+2>>0]|0)==36:0){y=(n[f+1>>0]|0)+-48|0;m=1;h=3}else{y=-1;m=d;h=1}h=f+h|0;a[k>>2]=h;f=n[h>>0]|0;d=(f<<24>>24)+-32|0;if(d>>>0>31|(1<>2]=h;f=n[h>>0]|0;d=(f<<24>>24)+-32|0}while(!(d>>>0>31|(1<>24==42){if((Hd(n[h+1>>0]|0)|0)!=0?(L=a[k>>2]|0,(n[L+2>>0]|0)==36):0){h=L+1|0;a[s+((n[h>>0]|0)+-48<<2)>>2]=10;h=a[o+((n[h>>0]|0)+-48<<3)>>2]|0;d=1;f=L+3|0}else{if(m|0){e=-1;break}if(E){x=(a[r>>2]|0)+(4-1)&~(4-1);h=a[x>>2]|0;a[r>>2]=x+4}else h=0;d=0;f=(a[k>>2]|0)+1|0}a[k>>2]=f;x=(h|0)<0;b=x?0-h|0:h;p=x?p|8192:p;x=d}else{h=hp(k)|0;if((h|0)<0){e=-1;break}b=h;x=m;f=a[k>>2]|0}do{if((n[f>>0]|0)==46){h=f+1|0;if((n[h>>0]|0)!=42){a[k>>2]=h;h=hp(k)|0;f=a[k>>2]|0;break}if(Hd(n[f+2>>0]|0)|0?(B=a[k>>2]|0,(n[B+3>>0]|0)==36):0){h=B+2|0;a[s+((n[h>>0]|0)+-48<<2)>>2]=10;h=a[o+((n[h>>0]|0)+-48<<3)>>2]|0;f=B+4|0;a[k>>2]=f;break}if(x|0){e=-1;break t}if(E){v=(a[r>>2]|0)+(4-1)&~(4-1);h=a[v>>2]|0;a[r>>2]=v+4}else h=0;f=(a[k>>2]|0)+2|0;a[k>>2]=f}else h=-1}while(0);v=0;while(1){if(((n[f>>0]|0)+-65|0)>>>0>57){e=-1;break t}d=f;f=f+1|0;a[k>>2]=f;d=n[(n[d>>0]|0)+-65+(176+(v*58|0))>>0]|0;m=d&255;if((m+-1|0)>>>0>=8)break;else v=m}if(!(d<<24>>24)){e=-1;break}g=(y|0)>-1;do{if(d<<24>>24==19){if(g){e=-1;break t}else w=54}else{if(g){a[s+(y<<2)>>2]=m;g=o+(y<<3)|0;y=a[g+4>>2]|0;w=P;a[w>>2]=a[g>>2];a[w+4>>2]=y;w=54;break}if(!E){e=0;break t}fp(P,m,r,u);f=a[k>>2]|0;w=55}}while(0);if((w|0)==54){w=0;if(E)w=55;else h=0}e:do{if((w|0)==55){w=0;f=n[f+-1>>0]|0;f=(v|0)!=0&(f&15|0)==3?f&-33:f;d=p&-65537;y=(p&8192|0)==0?p:d;r:do{switch(f|0){case 110:switch((v&255)<<24>>24){case 0:{a[a[P>>2]>>2]=e;h=0;break e}case 1:{a[a[P>>2]>>2]=e;h=0;break e}case 2:{h=a[P>>2]|0;a[h>>2]=e;a[h+4>>2]=((e|0)<0)<<31>>31;h=0;break e}case 3:{i[a[P>>2]>>1]=e;h=0;break e}case 4:{n[a[P>>2]>>0]=e;h=0;break e}case 6:{a[a[P>>2]>>2]=e;h=0;break e}case 7:{h=a[P>>2]|0;a[h>>2]=e;a[h+4>>2]=((e|0)<0)<<31>>31;h=0;break e}default:{h=0;break e}}case 112:{f=120;h=h>>>0>8?h:8;d=y|8;w=67;break}case 88:case 120:{d=y;w=67;break}case 111:{g=P;g=pp(a[g>>2]|0,a[g+4>>2]|0,M)|0;d=S-g|0;p=0;m=20230;h=(y&8|0)==0|(h|0)>(d|0)?h:d+1|0;d=y;w=73;break}case 105:case 100:{d=P;f=a[d>>2]|0;d=a[d+4>>2]|0;if((d|0)<0){f=nA(0,0,f|0,d|0)|0;d=_()|0;p=P;a[p>>2]=f;a[p+4>>2]=d;p=1;m=20230;w=72;break r}else{p=(y&2049|0)!=0&1;m=(y&2048|0)==0?(y&1|0)==0?20230:20232:20231;w=72;break r}}case 117:{d=P;p=0;m=20230;f=a[d>>2]|0;d=a[d+4>>2]|0;w=72;break}case 99:{n[C>>0]=a[P>>2];A=C;p=0;m=20230;g=1;f=d;h=S;break}case 115:{v=a[P>>2]|0;v=(v|0)==0?20240:v;y=ip(v,0,h)|0;U=(y|0)==0;A=v;p=0;m=20230;g=U?h:y-v|0;f=d;h=U?v+h|0:y;break}case 67:{a[I>>2]=a[P>>2];a[T>>2]=0;a[P>>2]=I;m=-1;w=79;break}case 83:{if(!h){gp(t,32,b,0,y);h=0;w=89}else{m=h;w=79}break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{h=zA[c&1](t,+l[P>>3],b,h,y,f)|0;break e}default:{p=0;m=20230;g=h;f=y;h=S}}}while(0);r:do{if((w|0)==67){g=P;g=dp(a[g>>2]|0,a[g+4>>2]|0,M,f&32)|0;m=P;m=(d&8|0)==0|(a[m>>2]|0)==0&(a[m+4>>2]|0)==0;p=m?0:2;m=m?20230:20230+(f>>>4)|0;w=73}else if((w|0)==72){g=mp(f,d,M)|0;d=y;w=73}else if((w|0)==79){w=0;p=a[P>>2]|0;h=0;while(1){f=a[p>>2]|0;if(!f)break;f=Ap(R,f)|0;d=(f|0)<0;if(d|f>>>0>(m-h|0)>>>0){w=83;break}h=f+h|0;if(m>>>0>h>>>0)p=p+4|0;else break}if((w|0)==83){w=0;if(d){e=-1;break t}}gp(t,32,b,h,y);if(!h){h=0;w=89}else{d=a[P>>2]|0;p=0;while(1){f=a[d>>2]|0;if(!f){w=89;break r}f=Ap(R,f)|0;p=f+p|0;if((p|0)>(h|0)){w=89;break r}up(t,R,f);if(p>>>0>=h>>>0){w=89;break}else d=d+4|0}}}}while(0);if((w|0)==73){w=0;f=P;f=(a[f>>2]|0)!=0|(a[f+4>>2]|0)!=0;U=(h|0)!=0|f;f=S-g+((f^1)&1)|0;A=U?g:M;g=U?(h|0)>(f|0)?h:f:0;f=(h|0)>-1?d&-65537:d;h=S}else if((w|0)==89){w=0;gp(t,32,b,h,y^8192);h=(b|0)>(h|0)?b:h;break}y=h-A|0;v=(g|0)<(y|0)?y:g;U=v+p|0;h=(b|0)<(U|0)?U:b;gp(t,32,h,U,f);up(t,m,p);gp(t,48,h,U,f^65536);gp(t,48,v,y,0);up(t,A,y);gp(t,32,h,U,f^8192)}}while(0);d=x}t:do{if((w|0)==92)if(!t)if(!d)e=0;else{e=1;while(1){h=a[s+(e<<2)>>2]|0;if(!h)break;fp(o+(e<<3)|0,h,r,u);e=e+1|0;if(e>>>0>=10){e=1;break t}}while(1){if(a[s+(e<<2)>>2]|0){e=-1;break t}e=e+1|0;if(e>>>0>=10){e=1;break}}}}while(0);Y=D;return e|0}function up(t,e,r){t=t|0;e=e|0;r=r|0;if(!(a[t>>2]&32))tp(e,r,t)|0;return}function hp(t){t=t|0;var e=0,r=0;if(!(Hd(n[a[t>>2]>>0]|0)|0))e=0;else{e=0;do{r=a[t>>2]|0;e=(e*10|0)+-48+(n[r>>0]|0)|0;r=r+1|0;a[t>>2]=r}while((Hd(n[r>>0]|0)|0)!=0)}return e|0}function fp(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,o=0.0;t:do{if(e>>>0<=20)do{switch(e|0){case 9:{e=(a[r>>2]|0)+(4-1)&~(4-1);n=a[e>>2]|0;a[r>>2]=e+4;a[t>>2]=n;break t}case 10:{n=(a[r>>2]|0)+(4-1)&~(4-1);e=a[n>>2]|0;a[r>>2]=n+4;n=t;a[n>>2]=e;a[n+4>>2]=((e|0)<0)<<31>>31;break t}case 11:{n=(a[r>>2]|0)+(4-1)&~(4-1);e=a[n>>2]|0;a[r>>2]=n+4;n=t;a[n>>2]=e;a[n+4>>2]=0;break t}case 12:{n=(a[r>>2]|0)+(8-1)&~(8-1);e=n;i=a[e>>2]|0;e=a[e+4>>2]|0;a[r>>2]=n+8;n=t;a[n>>2]=i;a[n+4>>2]=e;break t}case 13:{i=(a[r>>2]|0)+(4-1)&~(4-1);n=a[i>>2]|0;a[r>>2]=i+4;n=(n&65535)<<16>>16;i=t;a[i>>2]=n;a[i+4>>2]=((n|0)<0)<<31>>31;break t}case 14:{i=(a[r>>2]|0)+(4-1)&~(4-1);n=a[i>>2]|0;a[r>>2]=i+4;i=t;a[i>>2]=n&65535;a[i+4>>2]=0;break t}case 15:{i=(a[r>>2]|0)+(4-1)&~(4-1);n=a[i>>2]|0;a[r>>2]=i+4;n=(n&255)<<24>>24;i=t;a[i>>2]=n;a[i+4>>2]=((n|0)<0)<<31>>31;break t}case 16:{i=(a[r>>2]|0)+(4-1)&~(4-1);n=a[i>>2]|0;a[r>>2]=i+4;i=t;a[i>>2]=n&255;a[i+4>>2]=0;break t}case 17:{i=(a[r>>2]|0)+(8-1)&~(8-1);o=+l[i>>3];a[r>>2]=i+8;l[t>>3]=o;break t}case 18:{jA[n&15](t,r);break t}default:break t}}while(0)}while(0);return}function dp(t,e,r,i){t=t|0;e=e|0;r=r|0;i=i|0;if(!((t|0)==0&(e|0)==0))do{r=r+-1|0;n[r>>0]=o[640+(t&15)>>0]|0|i;t=sA(t|0,e|0,4)|0;e=_()|0}while(!((t|0)==0&(e|0)==0));return r|0}function pp(t,e,r){t=t|0;e=e|0;r=r|0;if(!((t|0)==0&(e|0)==0))do{r=r+-1|0;n[r>>0]=t&7|48;t=sA(t|0,e|0,3)|0;e=_()|0}while(!((t|0)==0&(e|0)==0));return r|0}function mp(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,a=0,o=0;if(e>>>0>0|(e|0)==0&t>>>0>4294967295){do{i=t;t=oA(t|0,e|0,10,0)|0;a=e;e=_()|0;o=eA(t|0,e|0,10,0)|0;o=nA(i|0,a|0,o|0,_()|0)|0;_()|0;r=r+-1|0;n[r>>0]=o&255|48}while(a>>>0>9|(a|0)==9&i>>>0>4294967295);e=t}else e=t;if(e)do{o=e;e=(e>>>0)/10|0;r=r+-1|0;n[r>>0]=o-(e*10|0)|48}while(o>>>0>=10);return r|0}function gp(t,e,r,n,i){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;var a=0,o=0;o=Y;Y=Y+256|0;a=o;if((r|0)>(n|0)&(i&73728|0)==0){i=r-n|0;dA(a|0,e<<24>>24|0,(i>>>0<256?i:256)|0)|0;if(i>>>0>255){e=r-n|0;do{up(t,a,256);i=i+-256|0}while(i>>>0>255);i=e&255}up(t,a,i)}Y=o;return}function Ap(t,e){t=t|0;e=e|0;if(!t)t=0;else t=vp(t,e,0)|0;return t|0}function vp(t,e,r){t=t|0;e=e|0;r=r|0;do{if(t){if(e>>>0<128){n[t>>0]=e;t=1;break}if(!(a[a[(yp()|0)+176>>2]>>2]|0))if((e&-128|0)==57216){n[t>>0]=e;t=1;break}else{a[(Wd()|0)>>2]=25;t=-1;break}if(e>>>0<2048){n[t>>0]=e>>>6|192;n[t+1>>0]=e&63|128;t=2;break}if(e>>>0<55296|(e&-8192|0)==57344){n[t>>0]=e>>>12|224;n[t+1>>0]=e>>>6&63|128;n[t+2>>0]=e&63|128;t=3;break}if((e+-65536|0)>>>0<1048576){n[t>>0]=e>>>18|240;n[t+1>>0]=e>>>12&63|128;n[t+2>>0]=e>>>6&63|128;n[t+3>>0]=e&63|128;t=4;break}else{a[(Wd()|0)>>2]=25;t=-1;break}}else t=1}while(0);return t|0}function yp(){return Xd()|0}function bp(t){t=+t;var e=0;l[u>>3]=t;e=a[u>>2]|0;w(a[u+4>>2]|0);return e|0}function xp(t,e){t=+t;e=e|0;var r=0,n=0,i=0;l[u>>3]=t;r=a[u>>2]|0;n=a[u+4>>2]|0;i=sA(r|0,n|0,52)|0;_()|0;switch(i&2047){case 0:{if(t!=0.0){t=+xp(t*18446744073709551616.0,e);r=(a[e>>2]|0)+-64|0}else r=0;a[e>>2]=r;break}case 2047:break;default:{a[e>>2]=(i&2047)+-1022;a[u>>2]=r;a[u+4>>2]=n&-2146435073|1071644672;t=+l[u>>3]}}return+t}function wp(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,a=0;t:do{if(!r)t=0;else{while(1){i=n[t>>0]|0;a=n[e>>0]|0;if(i<<24>>24!=a<<24>>24)break;r=r+-1|0;if(!r){t=0;break t}else{t=t+1|0;e=e+1|0}}t=(i&255)-(a&255)|0}}while(0);return t|0}function _p(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,o=0;i=Y;Y=Y+16|0;o=i;a[o>>2]=n;n=Ep(t,e,r,o)|0;Y=i;return n|0}function Ep(t,e,r,i){t=t|0;e=e|0;r=r|0;i=i|0;var o=0,s=0,c=0,l=0;l=Y;Y=Y+160|0;o=l+144|0;c=l;hA(c|0,3672,144)|0;if((e+-1|0)>>>0>2147483646){if(!e){t=o;e=1;s=4}else{a[(Wd()|0)>>2]=61;e=-1}}else s=4;if((s|0)==4){s=-2-t|0;s=e>>>0>s>>>0?s:e;a[c+48>>2]=s;o=c+20|0;a[o>>2]=t;a[c+44>>2]=t;e=t+s|0;t=c+16|0;a[t>>2]=e;a[c+28>>2]=e;e=ap(c,r,i)|0;if(s){c=a[o>>2]|0;n[c+(((c|0)==(a[t>>2]|0))<<31>>31)>>0]=0}}Y=l;return e|0}function Mp(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;n=t+20|0;i=a[n>>2]|0;t=(a[t+16>>2]|0)-i|0;t=t>>>0>r>>>0?r:t;hA(i|0,e|0,t|0)|0;a[n>>2]=(a[n>>2]|0)+t;return r|0}function Sp(t){t=t|0;var e=0,r=0;e=(Yd(t)|0)+1|0;r=Xg(e)|0;if(!r)t=0;else t=hA(r|0,t|0,e|0)|0;return t|0}function Cp(t,e){t=t|0;e=e|0;var r=0,i=0;r=0;while(1){if((o[656+r>>0]|0)==(t|0)){i=4;break}r=r+1|0;if((r|0)==87){t=87;i=5;break}}if((i|0)==4)if(!r)r=752;else{t=r;i=5}if((i|0)==5){r=752;do{do{i=r;r=r+1|0}while((n[i>>0]|0)!=0);t=t+-1|0}while((t|0)!=0)}return Tp(r,a[e+20>>2]|0)|0}function Tp(t,e){t=t|0;e=e|0;return ep(t,e)|0}function Ip(t){t=t|0;return Cp(t,a[(Rp()|0)+176>>2]|0)|0}function Rp(){return Xd()|0}function Bp(t,e,r){t=t|0;e=e|0;r=r|0;var i=0;i=Ip(t)|0;t=Yd(i)|0;if(t>>>0>=r>>>0){t=r+-1|0;if(!r)t=68;else{hA(e|0,i|0,t|0)|0;n[e+t>>0]=0;t=68}}else{hA(e|0,i|0,t+1|0)|0;t=0}return t|0}function kp(){var t=0,e=0,r=0,n=0,i=0,o=0,s=0;n=Y;Y=Y+48|0;o=n+32|0;e=n+24|0;s=n+16|0;i=n;n=n+36|0;t=Lp()|0;if(t|0?(r=a[t>>2]|0,r|0):0){t=r+48|0;if(!(Pp(t)|0)){a[e>>2]=20420;Up(20370,e)}e=Dp(t)|0;if((e|0)==1126902529&(_()|0)==1129074247)t=a[r+44>>2]|0;else t=r+80|0;a[n>>2]=t;r=a[r>>2]|0;t=a[r+4>>2]|0;if(ZA[a[(a[954]|0)+16>>2]&7](3816,r,n)|0){s=a[n>>2]|0;s=NA[a[(a[s>>2]|0)+8>>2]&15](s)|0;a[i>>2]=20420;a[i+4>>2]=t;a[i+8>>2]=s;Up(20284,i)}else{a[s>>2]=20420;a[s+4>>2]=t;Up(20329,s)}}Up(20408,o)}function Lp(){return 21640}function Pp(t){t=t|0;t=Dp(t)|0;return(t&-256|0)==1126902528&(_()|0)==1129074247|0}function Dp(t){t=t|0;var e=0;e=t;t=a[e>>2]|0;w(a[e+4>>2]|0);return t|0}function Up(t,e){t=t|0;e=e|0;q()}function Op(t){t=t|0;return}function Fp(t){t=t|0;Op(t);tm(t);return}function Np(t){t=t|0;return}function zp(t){t=t|0;return}function Gp(t,e,r){t=t|0;e=e|0;r=r|0;var o=0,s=0,c=0,l=0,u=0,h=0;h=Y;Y=Y+64|0;l=h;if(!(jp(t,e,0)|0)){if((e|0)!=0?(u=qp(e,3840,3824,0)|0,(u|0)!=0):0){a[l>>2]=u;a[l+4>>2]=0;a[l+8>>2]=t;a[l+12>>2]=-1;t=l+16|0;e=l+24|0;o=l+48|0;s=t;c=s+36|0;do{a[s>>2]=0;s=s+4|0}while((s|0)<(c|0));i[t+36>>1]=0;n[t+38>>0]=0;a[o>>2]=1;HA[a[(a[u>>2]|0)+28>>2]&7](u,l,a[r>>2]|0,1);if((a[e>>2]|0)==1){a[r>>2]=a[t>>2];t=1}else t=0}else t=0}else t=1;Y=h;return t|0}function Zp(t,e,r,n,i,o){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;o=o|0;if(jp(t,a[e+8>>2]|0,o)|0)Xp(0,e,r,n,i);return}function Vp(t,e,r,i,o){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;var s=0;do{if(!(jp(t,a[e+8>>2]|0,o)|0)){if(jp(t,a[e>>2]|0,o)|0){if((a[e+16>>2]|0)!=(r|0)?(s=e+20|0,(a[s>>2]|0)!=(r|0)):0){a[e+32>>2]=i;a[s>>2]=r;o=e+40|0;a[o>>2]=(a[o>>2]|0)+1;if((a[e+36>>2]|0)==1?(a[e+24>>2]|0)==2:0)n[e+54>>0]=1;a[e+44>>2]=4;break}if((i|0)==1)a[e+32>>2]=1}}else Hp(0,e,r,i)}while(0);return}function Qp(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;if(jp(t,a[e+8>>2]|0,0)|0)Wp(0,e,r,n);return}function jp(t,e,r){t=t|0;e=e|0;r=r|0;if(r){if((t|0)==(e|0))t=1;else t=(qd(a[t+4>>2]|0,a[e+4>>2]|0)|0)==0}else t=(a[t+4>>2]|0)==(a[e+4>>2]|0);return t|0}function Wp(t,e,r,i){t=t|0;e=e|0;r=r|0;i=i|0;var o=0;t=e+16|0;o=a[t>>2]|0;do{if(o){if((o|0)!=(r|0)){i=e+36|0;a[i>>2]=(a[i>>2]|0)+1;a[e+24>>2]=2;n[e+54>>0]=1;break}t=e+24|0;if((a[t>>2]|0)==2)a[t>>2]=i}else{a[t>>2]=r;a[e+24>>2]=i;a[e+36>>2]=1}}while(0);return}function Hp(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0;if((a[e+4>>2]|0)==(r|0)?(i=e+28|0,(a[i>>2]|0)!=1):0)a[i>>2]=n;return}function Xp(t,e,r,i,o){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;n[e+53>>0]=1;do{if((a[e+4>>2]|0)==(i|0)){n[e+52>>0]=1;t=e+16|0;i=a[t>>2]|0;if(!i){a[t>>2]=r;a[e+24>>2]=o;a[e+36>>2]=1;if(!((o|0)==1?(a[e+48>>2]|0)==1:0))break;n[e+54>>0]=1;break}if((i|0)!=(r|0)){o=e+36|0;a[o>>2]=(a[o>>2]|0)+1;n[e+54>>0]=1;break}i=e+24|0;t=a[i>>2]|0;if((t|0)==2){a[i>>2]=o;t=o}if((t|0)==1?(a[e+48>>2]|0)==1:0)n[e+54>>0]=1}}while(0);return}function qp(t,e,r,o){t=t|0;e=e|0;r=r|0;o=o|0;var s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0;m=Y;Y=Y+64|0;d=m;f=a[t>>2]|0;p=t+(a[f+-8>>2]|0)|0;f=a[f+-4>>2]|0;a[d>>2]=r;a[d+4>>2]=t;a[d+8>>2]=e;a[d+12>>2]=o;t=d+16|0;e=d+20|0;o=d+24|0;s=d+28|0;c=d+32|0;l=d+40|0;u=t;h=u+36|0;do{a[u>>2]=0;u=u+4|0}while((u|0)<(h|0));i[t+36>>1]=0;n[t+38>>0]=0;t:do{if(jp(f,r,0)|0){a[d+48>>2]=1;qA[a[(a[f>>2]|0)+20>>2]&3](f,d,p,p,1,0);t=(a[o>>2]|0)==1?p:0}else{XA[a[(a[f>>2]|0)+24>>2]&3](f,d,p,1,0);switch(a[d+36>>2]|0){case 0:{t=(a[l>>2]|0)==1&(a[s>>2]|0)==1&(a[c>>2]|0)==1?a[e>>2]|0:0;break t}case 1:break;default:{t=0;break t}}if((a[o>>2]|0)!=1?!((a[l>>2]|0)==0&(a[s>>2]|0)==1&(a[c>>2]|0)==1):0){t=0;break}t=a[t>>2]|0}}while(0);Y=m;return t|0}function Yp(t){t=t|0;Op(t);tm(t);return}function Jp(t,e,r,n,i,o){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;o=o|0;if(jp(t,a[e+8>>2]|0,o)|0)Xp(0,e,r,n,i);else{t=a[t+8>>2]|0;qA[a[(a[t>>2]|0)+20>>2]&3](t,e,r,n,i,o)}return}function Kp(t,e,r,i,o){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;var s=0,c=0,l=0;t:do{if(!(jp(t,a[e+8>>2]|0,o)|0)){if(!(jp(t,a[e>>2]|0,o)|0)){c=a[t+8>>2]|0;XA[a[(a[c>>2]|0)+24>>2]&3](c,e,r,i,o);break}if((a[e+16>>2]|0)!=(r|0)?(c=e+20|0,(a[c>>2]|0)!=(r|0)):0){a[e+32>>2]=i;i=e+44|0;do{if((a[i>>2]|0)!=4){s=e+52|0;n[s>>0]=0;l=e+53|0;n[l>>0]=0;t=a[t+8>>2]|0;qA[a[(a[t>>2]|0)+20>>2]&3](t,e,r,r,1,o);if(n[l>>0]|0){l=(n[s>>0]|0)==0;a[i>>2]=3;if(l)break;else break t}else{a[i>>2]=4;break}}}while(0);a[c>>2]=r;l=e+40|0;a[l>>2]=(a[l>>2]|0)+1;if((a[e+36>>2]|0)!=1)break;if((a[e+24>>2]|0)!=2)break;n[e+54>>0]=1;break}if((i|0)==1)a[e+32>>2]=1}else Hp(0,e,r,i)}while(0);return}function $p(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;if(jp(t,a[e+8>>2]|0,0)|0)Wp(0,e,r,n);else{t=a[t+8>>2]|0;HA[a[(a[t>>2]|0)+28>>2]&7](t,e,r,n)}return}function tm(t){t=t|0;qg(t);return}function em(t){t=t|0;return}function rm(){var t=0,e=0;t=Lp()|0;if((t|0?(e=a[t>>2]|0,e|0):0)?Pp(e+48|0)|0:0)nm(a[e+12>>2]|0);nm(im()|0)}function nm(t){t=t|0;var e=0;e=Y;Y=Y+16|0;VA[t&3]();Up(20559,e)}function im(){return 2}function am(t){t=t|0;return}function om(t){t=t|0;tm(t);return}function sm(t){t=t|0;return 20599}function cm(t){t=t|0;a[t>>2]=5916;fm(t+4|0);return}function lm(t){t=t|0;cm(t);tm(t);return}function um(t){t=t|0;return hm(t+4|0)|0}function hm(t){t=t|0;return a[t>>2]|0}function fm(t){t=t|0;var e=0,r=0;if(dm(t)|0?(e=pm(a[t>>2]|0)|0,r=e+8|0,t=a[r>>2]|0,a[r>>2]=t+-1,(t|0)<1):0)tm(e);return}function dm(t){t=t|0;return 1}function pm(t){t=t|0;return t+-12|0}function mm(t){t=t|0;a[t>>2]=5936;fm(t+4|0);return}function gm(t){t=t|0;mm(t);tm(t);return}function Am(t){t=t|0;return hm(t+4|0)|0}function vm(t){t=t|0;cm(t);tm(t);return}function ym(t){t=t|0;cm(t);tm(t);return}function bm(){var t=0;t=Y;Y=Y+16|0;Up(20848,t)}function xm(t){t=t|0;Op(t);tm(t);return}function wm(t,e,r){t=t|0;e=e|0;r=r|0;return jp(t,e,0)|0}function _m(t){t=t|0;Op(t);tm(t);return}function Em(t,e,r){t=t|0;e=e|0;r=r|0;var o=0,s=0,c=0,l=0,u=0,h=0,f=0,d=0;d=Y;Y=Y+64|0;h=d;do{if(!(jp(e,4048,0)|0)){if(Mm(t,e,0)|0){e=a[r>>2]|0;if(!e){e=1;break}a[r>>2]=a[e>>2];e=1;break}if((e|0)!=0?(o=qp(e,3840,3976,0)|0,(o|0)!=0):0){e=a[r>>2]|0;if(e|0)a[r>>2]=a[e>>2];e=a[o+8>>2]|0;c=t+8|0;s=a[c>>2]|0;if((e&7&(s^7)|0)==0?((e&96^96)&s|0)==0:0){s=t+12|0;t=a[s>>2]|0;o=o+12|0;e=a[o>>2]|0;if(!(jp(t,e,0)|0)){if(jp(t,4040,0)|0){if(!e){e=1;break}e=(qp(e,3840,3992,0)|0)==0;break}if(t){e=qp(t,3840,3976,0)|0;if(e|0){if(!(a[c>>2]&1)){e=0;break}e=Sm(e,a[o>>2]|0)|0;break}e=a[s>>2]|0;if(e){e=qp(e,3840,4008,0)|0;if(e|0){if(!(a[c>>2]&1)){e=0;break}e=Cm(e,a[o>>2]|0)|0;break}e=a[s>>2]|0;if((((e|0)!=0?(l=qp(e,3840,3824,0)|0,(l|0)!=0):0)?(u=a[o>>2]|0,(u|0)!=0):0)?(f=qp(u,3840,3824,0)|0,(f|0)!=0):0){a[h>>2]=f;a[h+4>>2]=0;a[h+8>>2]=l;a[h+12>>2]=-1;e=h+16|0;t=h+24|0;o=h+48|0;s=e;c=s+36|0;do{a[s>>2]=0;s=s+4|0}while((s|0)<(c|0));i[e+36>>1]=0;n[e+38>>0]=0;a[o>>2]=1;HA[a[(a[f>>2]|0)+28>>2]&7](f,h,a[r>>2]|0,1);do{if((a[t>>2]|0)==1){if(!(a[r>>2]|0)){e=1;break}a[r>>2]=a[e>>2];e=1}else e=0}while(0)}else e=0}else e=0}else e=0}else e=1}else e=0}else e=0}else{a[r>>2]=0;e=1}}while(0);Y=d;return e|0}function Mm(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;if(!(a[t+8>>2]&24)){if((e|0)!=0?(n=qp(e,3840,3960,0)|0,(n|0)!=0):0){r=(a[n+8>>2]&24|0)!=0;i=5}else r=0}else{r=1;i=5}if((i|0)==5)r=jp(t,e,r)|0;return r|0}function Sm(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,o=0,s=0;while(1){if(!e){e=0;break}r=qp(e,3840,3976,0)|0;if(!r){e=0;break}i=a[t+8>>2]|0;if(a[r+8>>2]&~i|0){e=0;break}n=t+12|0;e=a[n>>2]|0;r=r+12|0;if(jp(e,a[r>>2]|0,0)|0){e=1;break}if((i&1|0)==0|(e|0)==0){e=0;break}t=qp(e,3840,3976,0)|0;if(!t){s=9;break}e=a[r>>2]|0}if((s|0)==9){e=a[n>>2]|0;if((e|0)!=0?(o=qp(e,3840,4008,0)|0,(o|0)!=0):0)e=Cm(o,a[r>>2]|0)|0;else e=0}return e|0}function Cm(t,e){t=t|0;e=e|0;var r=0;if((((e|0)!=0?(r=qp(e,3840,4008,0)|0,(r|0)!=0):0)?(a[r+8>>2]&~a[t+8>>2]|0)==0:0)?jp(a[t+12>>2]|0,a[r+12>>2]|0,0)|0:0)t=jp(a[t+16>>2]|0,a[r+16>>2]|0,0)|0;else t=0;return t|0}function Tm(t){t=t|0;Op(t);tm(t);return}function Im(t,e,r,i,o,s){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;s=s|0;var c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0,g=0,A=0;if(jp(t,a[e+8>>2]|0,s)|0)Xp(0,e,r,i,o);else{A=e+52|0;l=n[A>>0]|0;g=e+53|0;c=n[g>>0]|0;m=a[t+12>>2]|0;f=t+16+(m<<3)|0;n[A>>0]=0;n[g>>0]=0;Lm(t+16|0,e,r,i,o,s);u=n[A>>0]|0;l=u|l;h=n[g>>0]|0;c=h|c;t:do{if((m|0)>1){d=e+24|0;p=t+8|0;m=e+54|0;t=t+24|0;do{c=c&1;l=l&1;if(n[m>>0]|0)break t;if(!(u<<24>>24)){if(h<<24>>24?(a[p>>2]&1|0)==0:0)break t}else{if((a[d>>2]|0)==1)break t;if(!(a[p>>2]&2))break t}n[A>>0]=0;n[g>>0]=0;Lm(t,e,r,i,o,s);u=n[A>>0]|0;l=u|l;h=n[g>>0]|0;c=h|c;t=t+8|0}while(t>>>0>>0)}}while(0);n[A>>0]=l<<24>>24!=0&1;n[g>>0]=c<<24>>24!=0&1}return}function Rm(t,e,r,i,o){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;var s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0;t:do{if(!(jp(t,a[e+8>>2]|0,o)|0)){if(!(jp(t,a[e>>2]|0,o)|0)){m=a[t+12>>2]|0;u=t+16+(m<<3)|0;Pm(t+16|0,e,r,i,o);s=t+24|0;if((m|0)<=1)break;t=a[t+8>>2]|0;if((t&2|0)==0?(l=e+36|0,(a[l>>2]|0)!=1):0){if(!(t&1)){t=e+54|0;while(1){if(n[t>>0]|0)break t;if((a[l>>2]|0)==1)break t;Pm(s,e,r,i,o);s=s+8|0;if(s>>>0>=u>>>0)break t}}t=e+24|0;c=e+54|0;while(1){if(n[c>>0]|0)break t;if((a[l>>2]|0)==1?(a[t>>2]|0)==1:0)break t;Pm(s,e,r,i,o);s=s+8|0;if(s>>>0>=u>>>0)break t}}t=e+54|0;while(1){if(n[t>>0]|0)break t;Pm(s,e,r,i,o);s=s+8|0;if(s>>>0>=u>>>0)break t}}if((a[e+16>>2]|0)!=(r|0)?(m=e+20|0,(a[m>>2]|0)!=(r|0)):0){a[e+32>>2]=i;p=e+44|0;if((a[p>>2]|0)!=4){l=t+16+(a[t+12>>2]<<3)|0;u=e+52|0;i=e+53|0;h=e+54|0;f=t+8|0;d=e+24|0;s=0;c=t+16|0;t=0;e:while(1){if(c>>>0>=l>>>0){c=18;break}n[u>>0]=0;n[i>>0]=0;Lm(c,e,r,r,1,o);if(n[h>>0]|0){c=18;break}do{if(n[i>>0]|0){if(!(n[u>>0]|0))if(!(a[f>>2]&1)){c=19;break e}else{t=1;break}if((a[d>>2]|0)==1){s=1;c=19;break e}if(!(a[f>>2]&2)){s=1;c=19;break e}else{s=1;t=1}}}while(0);c=c+8|0}if((c|0)==18)if(t)c=19;else t=4;if((c|0)==19)t=3;a[p>>2]=t;if(s&1)break}a[m>>2]=r;r=e+40|0;a[r>>2]=(a[r>>2]|0)+1;if((a[e+36>>2]|0)!=1)break;if((a[e+24>>2]|0)!=2)break;n[e+54>>0]=1;break}if((i|0)==1)a[e+32>>2]=1}else Hp(0,e,r,i)}while(0);return}function Bm(t,e,r,i){t=t|0;e=e|0;r=r|0;i=i|0;var o=0,s=0;t:do{if(!(jp(t,a[e+8>>2]|0,0)|0)){s=a[t+12>>2]|0;o=t+16+(s<<3)|0;km(t+16|0,e,r,i);if((s|0)>1){s=e+54|0;t=t+24|0;do{km(t,e,r,i);if(n[s>>0]|0)break t;t=t+8|0}while(t>>>0>>0)}}else Wp(0,e,r,i)}while(0);return}function km(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,o=0;o=a[t+4>>2]|0;if(r){i=o>>8;if(o&1)i=a[(a[r>>2]|0)+i>>2]|0}else i=0;t=a[t>>2]|0;HA[a[(a[t>>2]|0)+28>>2]&7](t,e,r+i|0,(o&2|0)==0?2:n);return}function Lm(t,e,r,n,i,o){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;o=o|0;var s=0,c=0;c=a[t+4>>2]|0;s=c>>8;if(c&1)s=a[(a[n>>2]|0)+s>>2]|0;t=a[t>>2]|0;qA[a[(a[t>>2]|0)+20>>2]&3](t,e,r,n+s|0,(c&2|0)==0?2:i,o);return}function Pm(t,e,r,n,i){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;var o=0,s=0;s=a[t+4>>2]|0;o=s>>8;if(s&1)o=a[(a[r>>2]|0)+o>>2]|0;t=a[t>>2]|0;XA[a[(a[t>>2]|0)+24>>2]&3](t,e,r+o|0,(s&2|0)==0?2:n,i);return}function Dm(t){t=t|0;a[t>>2]=5896;return}function Um(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;Om(r,t);t=Fm(r)|0;Y=e;return t|0}function Om(t,e){t=t|0;e=e|0;Vm(t,e);return}function Fm(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;Nm(r,a[t+4>>2]|0);if(!((zm(r)|0)<<24>>24))t=Zm(Gm(t)|0)|0;else t=0;Y=e;return t|0}function Nm(t,e){t=t|0;e=e|0;a[t>>2]=e;return}function zm(t){t=t|0;return n[a[t>>2]>>0]|0}function Gm(t){t=t|0;return t|0}function Zm(t){t=t|0;var e=0,r=0,i=0,o=0;o=Y;Y=Y+16|0;i=o;t=a[t+8>>2]|0;e=n[t>>0]|0;do{if(e<<24>>24!=1){if(!(e&2)){n[t>>0]=2;r=1;break}else Up(20985,i)}else r=0}while(0);Y=o;return r|0}function Vm(t,e){t=t|0;e=e|0;a[t>>2]=e;a[t+4>>2]=e;a[t+8>>2]=e+1;a[t+12>>2]=0;return}function Qm(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;Om(r,t);jm(r);Y=e;return}function jm(t){t=t|0;var e=0,r=0;e=Y;Y=Y+16|0;r=e;Nm(r,a[t+4>>2]|0);Wm(r);Hm(Gm(t)|0);Y=e;return}function Wm(t){t=t|0;n[a[t>>2]>>0]=1;return}function Hm(t){t=t|0;n[a[t+8>>2]>>0]=1;return}function Xm(){return 0}function qm(t){t=t|0;var e=0,r=0;r=(t|0)==0?1:t;while(1){e=Xg(r)|0;if(e|0){t=6;break}t=Xm()|0;if(!t){t=5;break}VA[t&3]()}if((t|0)==5){r=E(4)|0;Dm(r);S(r|0,3880,121)}else if((t|0)==6)return e|0;return 0}function Ym(t){t=t|0;return qm(t)|0}function Jm(t){t=t|0;tm(t);return}function Km(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;i=Y;Y=Y+16|0;n=i;a[n>>2]=a[r>>2];t=ZA[a[(a[t>>2]|0)+16>>2]&7](t,e,n)|0;if(t)a[r>>2]=a[n>>2];Y=i;return t&1|0}function $m(t){t=t|0;if(!t)t=0;else t=(qp(t,3840,3976,0)|0)!=0&1;return t|0}function tg(t){t=t|0;return 0}function eg(){return(rg()|0)>0|0}function rg(){return C()|0}function ng(t){t=t|0;return}function ig(t){t=t|0;ng(t);tm(t);return}function ag(t){t=t|0;return 21039}function og(t){t=t|0;return}function sg(t){t=t|0;var e=0,r=0;e=t+8|0;if(!((a[e>>2]|0)!=0?(r=a[e>>2]|0,a[e>>2]=r+-1,(r|0)!=0):0))QA[a[(a[t>>2]|0)+16>>2]&255](t);return}function cg(t){t=t|0;t=tg(t)|0;if(!t)return;else Wg(t,21145)}function lg(t){t=t|0;return}function ug(t,e){t=t|0;e=e|0;var r=0,n=0;n=Yd(e)|0;r=qm(n+13|0)|0;a[r>>2]=n;a[r+4>>2]=n;a[r+8>>2]=0;r=hg(r)|0;hA(r|0,e|0,n+1|0)|0;a[t>>2]=r;return}function hg(t){t=t|0;return t+12|0}function fg(t,e){t=t|0;e=e|0;a[t>>2]=5916;ug(t+4|0,e);return}function dg(t,e){t=t|0;e=e|0;a[t>>2]=5936;ug(t+4|0,(n[e+11>>0]|0)<0?a[e>>2]|0:e);return}function pg(t,e){t=t|0;e=e|0;a[t>>2]=5936;ug(t+4|0,e);return}function mg(t){t=t|0;t=E(8)|0;fg(t,21163);a[t>>2]=5956;S(t|0,3928,123)}function gg(t){t=t|0;t=E(8)|0;fg(t,21163);a[t>>2]=5976;S(t|0,3944,123)}function Ag(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,c=0;o=Y;Y=Y+16|0;i=o;if(r>>>0>4294967279)mg(t);if(r>>>0<11)n[t+11>>0]=r;else{c=r+16&-16;s=qm(c)|0;a[t>>2]=s;a[t+8>>2]=c|-2147483648;a[t+4>>2]=r;t=s}vg(t,e,r)|0;n[i>>0]=0;ie(t+r|0,i);Y=o;return}function vg(t,e,r){t=t|0;e=e|0;r=r|0;if(r|0)hA(t|0,e|0,r|0)|0;return t|0}function yg(t){t=t|0;if((n[t+11>>0]|0)<0)bt(a[t>>2]|0,a[t+8>>2]&2147483647);return}function bg(t,e,r,i,o,s,c,l){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;s=s|0;c=c|0;l=l|0;var u=0,h=0,f=0,d=0,p=0;p=Y;Y=Y+16|0;d=p;if((-18-e|0)>>>0>>0)mg(t);if((n[t+11>>0]|0)<0)f=a[t>>2]|0;else f=t;if(e>>>0<2147483623){u=r+e|0;h=e<<1;u=u>>>0>>0?h:u;u=u>>>0<11?11:u+16&-16}else u=-17;h=qm(u)|0;if(o|0)vg(h,f,o)|0;if(c|0)vg(h+o|0,l,c)|0;i=i-s|0;r=i-o|0;if(r|0)vg(h+o+c|0,f+o+s|0,r)|0;r=e+1|0;if((r|0)!=11)bt(f,r);a[t>>2]=h;a[t+8>>2]=u|-2147483648;c=i+c|0;a[t+4>>2]=c;n[d>>0]=0;ie(h+c|0,d);Y=p;return}function xg(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,c=0,l=0,u=0;u=Y;Y=Y+16|0;c=u;l=t+11|0;i=n[l>>0]|0;s=i<<24>>24<0;if(s){o=(a[t+8>>2]&2147483647)+-1|0;i=a[t+4>>2]|0}else{o=10;i=i&255}if((o-i|0)>>>0>=r>>>0){if(r|0){if(s)o=a[t>>2]|0;else o=t;vg(o+i|0,e,r)|0;i=i+r|0;if((n[l>>0]|0)<0)a[t+4>>2]=i;else n[l>>0]=i;n[c>>0]=0;ie(o+i|0,c)}}else bg(t,o,i+r-o|0,i,i,0,r,e);Y=u;return t|0}function wg(t,e){t=t|0;e=e|0;return xg(t,e,re(e)|0)|0}function _g(t,e,r){t=t|0;e=e|0;r=r|0;if(!r)t=0;else t=wp(t,e,r)|0;return t|0}function Eg(t,e,r,i,o){t=t|0;e=e|0;r=r|0;i=i|0;o=o|0;var s=0,c=0;s=n[t+11>>0]|0;c=s<<24>>24<0;if(c)s=a[t+4>>2]|0;else s=s&255;if((o|0)==-1|s>>>0>>0)gg(t);s=s-e|0;r=s>>>0>>0?s:r;if(c)t=a[t>>2]|0;s=r>>>0>o>>>0;t=_g(t+e|0,i,s?o:r)|0;if(!t)return(r>>>0>>0?-1:s&1)|0;else return t|0;return 0}function Mg(t){t=t|0;return}function Sg(t){t=t|0;tm(t);return}function Cg(t){t=t|0;return 21228}function Tg(t,e,r){t=t|0;e=e|0;r=r|0;a[t>>2]=r;a[t+4>>2]=e;return}function Ig(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;i=Y;Y=Y+16|0;n=i;WA[a[(a[t>>2]|0)+12>>2]&15](n,t,e);if((a[n+4>>2]|0)==(a[r+4>>2]|0))t=(a[n>>2]|0)==(a[r>>2]|0);else t=0;Y=i;return t|0}function Rg(t,e,r){t=t|0;e=e|0;r=r|0;return((a[e>>2]|0)==(r|0)?(a[e+4>>2]|0)==(t|0):0)|0}function Bg(t,e,r){t=t|0;e=e|0;r=r|0;if((r|0)>256)Ag(t,21176,re(21176)|0);else kg(t,0,r);return}function kg(t,e,r){t=t|0;e=e|0;r=r|0;Lg(t,r);return}function Lg(t,e){t=t|0;e=e|0;var r=0,i=0,o=0,s=0,c=0;c=Y;Y=Y+1040|0;o=c+1024|0;r=c;s=a[(Wd()|0)>>2]|0;i=Pg(Bp(e,r,1024)|0,r)|0;if(!(n[i>>0]|0)){a[o>>2]=e;_p(r,1024,21211,o)|0}else r=i;a[(Wd()|0)>>2]=s;Ag(t,r,re(r)|0);Y=c;return}function Pg(t,e){t=t|0;e=e|0;var r=0,n=0;switch(t|0){case 0:{r=e;break}case-1:{t=a[(Wd()|0)>>2]|0;n=3;break}default:n=3}if((n|0)==3)if((t|0)==28)r=22145;else Q();return r|0}function Dg(t){t=t|0;tm(t);return}function Ug(t){t=t|0;return 21353}function Og(t,e,r){t=t|0;e=e|0;r=r|0;if((r|0)>256){Ng()|0;e=6180}else{zg()|0;e=6176}a[t>>2]=r;a[t+4>>2]=e;return}function Fg(t,e,r){t=t|0;e=e|0;r=r|0;if((r|0)>256)Ag(t,21319,re(21319)|0);else kg(t,0,r);return}function Ng(){if((n[21488]|0)==0?Um(21488)|0:0)Qm(21488);return 6180}function zg(){if((n[21480]|0)==0?Um(21480)|0:0)Qm(21480);return 6176}function Gg(t){t=t|0;mm(t);return}function Zg(t){t=t|0;Gg(t);tm(t);return}function Vg(t,e){t=t|0;e=e|0;var r=0;r=a[e+4>>2]|0;WA[a[(a[r>>2]|0)+24>>2]&15](t,r,a[e>>2]|0);return}function Qg(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0;s=Y;Y=Y+16|0;o=s;if(a[e>>2]|0){i=n[r+11>>0]|0;if(i<<24>>24<0)i=a[r+4>>2]|0;else i=i&255;if(i|0)wg(r,21417)|0;Vg(o,e);e=n[o+11>>0]|0;i=e<<24>>24<0;xg(r,i?a[o>>2]|0:o,i?a[o+4>>2]|0:e&255)|0;yg(o)}a[t>>2]=a[r>>2];a[t+4>>2]=a[r+4>>2];a[t+8>>2]=a[r+8>>2];i=0;while(1){if((i|0)==3)break;a[r+(i<<2)>>2]=0;i=i+1|0}Y=s;return}function jg(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0,o=0;n=Y;Y=Y+32|0;o=n+12|0;i=n;Ag(i,r,re(r)|0);Qg(o,e,i);dg(t,o);yg(o);yg(i);a[t>>2]=6192;i=e;e=a[i+4>>2]|0;r=t+8|0;a[r>>2]=a[i>>2];a[r+4>>2]=e;Y=n;return}function Wg(t,e){t=t|0;e=e|0;var r=0,n=0,i=0;i=Y;Y=Y+16|0;n=i+8|0;r=E(16)|0;Ng()|0;a[i>>2]=t;a[i+4>>2]=6180;a[n>>2]=a[i>>2];a[n+4>>2]=a[i+4>>2];jg(r,n,e);S(r|0,4272,136)}function Hg(t){t=t|0;t=E(8)|0;fg(t,21420);a[t>>2]=5956;S(t|0,3928,123)}function Xg(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0,g=0,A=0,v=0,y=0,b=0,x=0,w=0;w=Y;Y=Y+16|0;d=w;do{if(t>>>0<245){u=t>>>0<11?16:t+11&-8;t=u>>>3;f=a[5412]|0;r=f>>>t;if(r&3|0){e=(r&1^1)+t|0;t=21688+(e<<1<<2)|0;r=t+8|0;n=a[r>>2]|0;i=n+8|0;o=a[i>>2]|0;if((o|0)==(t|0))a[5412]=f&~(1<>2]=t;a[r>>2]=o}x=e<<3;a[n+4>>2]=x|3;x=n+x+4|0;a[x>>2]=a[x>>2]|1;x=i;Y=w;return x|0}h=a[5414]|0;if(u>>>0>h>>>0){if(r|0){e=2<>>12&16;e=e>>>c;r=e>>>5&8;e=e>>>r;o=e>>>2&4;e=e>>>o;t=e>>>1&2;e=e>>>t;n=e>>>1&1;n=(r|c|o|t|n)+(e>>>n)|0;e=21688+(n<<1<<2)|0;t=e+8|0;o=a[t>>2]|0;c=o+8|0;r=a[c>>2]|0;if((r|0)==(e|0)){t=f&~(1<>2]=e;a[t>>2]=r;t=f}x=n<<3;s=x-u|0;a[o+4>>2]=u|3;i=o+u|0;a[i+4>>2]=s|1;a[o+x>>2]=s;if(h|0){n=a[5417]|0;e=h>>>3;r=21688+(e<<1<<2)|0;e=1<>2]|0}a[t>>2]=n;a[e+12>>2]=n;a[n+8>>2]=e;a[n+12>>2]=r}a[5414]=s;a[5417]=i;x=c;Y=w;return x|0}o=a[5413]|0;if(o){r=(o&0-o)+-1|0;i=r>>>12&16;r=r>>>i;n=r>>>5&8;r=r>>>n;s=r>>>2&4;r=r>>>s;c=r>>>1&2;r=r>>>c;l=r>>>1&1;l=a[21952+((n|i|s|c|l)+(r>>>l)<<2)>>2]|0;r=l;c=l;l=(a[l+4>>2]&-8)-u|0;while(1){t=a[r+16>>2]|0;if(!t){t=a[r+20>>2]|0;if(!t)break}s=(a[t+4>>2]&-8)-u|0;i=s>>>0>>0;r=t;c=i?t:c;l=i?s:l}s=c+u|0;if(s>>>0>c>>>0){i=a[c+24>>2]|0;e=a[c+12>>2]|0;do{if((e|0)==(c|0)){t=c+20|0;e=a[t>>2]|0;if(!e){t=c+16|0;e=a[t>>2]|0;if(!e){r=0;break}}while(1){n=e+20|0;r=a[n>>2]|0;if(!r){n=e+16|0;r=a[n>>2]|0;if(!r)break;else{e=r;t=n}}else{e=r;t=n}}a[t>>2]=0;r=e}else{r=a[c+8>>2]|0;a[r+12>>2]=e;a[e+8>>2]=r;r=e}}while(0);do{if(i|0){e=a[c+28>>2]|0;t=21952+(e<<2)|0;if((c|0)==(a[t>>2]|0)){a[t>>2]=r;if(!r){a[5413]=o&~(1<>2]|0)==(c|0)?x:i+20|0)>>2]=r;if(!r)break}a[r+24>>2]=i;e=a[c+16>>2]|0;if(e|0){a[r+16>>2]=e;a[e+24>>2]=r}e=a[c+20>>2]|0;if(e|0){a[r+20>>2]=e;a[e+24>>2]=r}}}while(0);if(l>>>0<16){x=l+u|0;a[c+4>>2]=x|3;x=c+x+4|0;a[x>>2]=a[x>>2]|1}else{a[c+4>>2]=u|3;a[s+4>>2]=l|1;a[s+l>>2]=l;if(h|0){n=a[5417]|0;e=h>>>3;r=21688+(e<<1<<2)|0;e=1<>2]|0}a[t>>2]=n;a[e+12>>2]=n;a[n+8>>2]=e;a[n+12>>2]=r}a[5414]=l;a[5417]=s}x=c+8|0;Y=w;return x|0}else f=u}else f=u}else f=u}else if(t>>>0<=4294967231){t=t+11|0;u=t&-8;n=a[5413]|0;if(n){i=0-u|0;t=t>>>8;if(t){if(u>>>0>16777215)l=31;else{f=(t+1048320|0)>>>16&8;g=t<>>16&4;g=g<>>16&2;l=14-(c|f|l)+(g<>>15)|0;l=u>>>(l+7|0)&1|l<<1}}else l=0;r=a[21952+(l<<2)>>2]|0;t:do{if(!r){r=0;t=0;g=61}else{t=0;c=u<<((l|0)==31?0:25-(l>>>1)|0);o=0;while(1){s=(a[r+4>>2]&-8)-u|0;if(s>>>0>>0)if(!s){t=r;i=0;g=65;break t}else{t=r;i=s}g=a[r+20>>2]|0;r=a[r+16+(c>>>31<<2)>>2]|0;o=(g|0)==0|(g|0)==(r|0)?o:g;if(!r){r=o;g=61;break}else c=c<<1}}}while(0);if((g|0)==61){if((r|0)==0&(t|0)==0){t=2<>>12&16;f=f>>>s;o=f>>>5&8;f=f>>>o;c=f>>>2&4;f=f>>>c;l=f>>>1&2;f=f>>>l;r=f>>>1&1;t=0;r=a[21952+((o|s|c|l|r)+(f>>>r)<<2)>>2]|0}if(!r){c=t;s=i}else g=65}if((g|0)==65){o=r;while(1){f=(a[o+4>>2]&-8)-u|0;r=f>>>0>>0;i=r?f:i;t=r?o:t;r=a[o+16>>2]|0;if(!r)r=a[o+20>>2]|0;if(!r){c=t;s=i;break}else o=r}}if(((c|0)!=0?s>>>0<((a[5414]|0)-u|0)>>>0:0)?(h=c+u|0,h>>>0>c>>>0):0){o=a[c+24>>2]|0;e=a[c+12>>2]|0;do{if((e|0)==(c|0)){t=c+20|0;e=a[t>>2]|0;if(!e){t=c+16|0;e=a[t>>2]|0;if(!e){e=0;break}}while(1){i=e+20|0;r=a[i>>2]|0;if(!r){i=e+16|0;r=a[i>>2]|0;if(!r)break;else{e=r;t=i}}else{e=r;t=i}}a[t>>2]=0}else{x=a[c+8>>2]|0;a[x+12>>2]=e;a[e+8>>2]=x}}while(0);do{if(o){t=a[c+28>>2]|0;r=21952+(t<<2)|0;if((c|0)==(a[r>>2]|0)){a[r>>2]=e;if(!e){n=n&~(1<>2]|0)==(c|0)?x:o+20|0)>>2]=e;if(!e)break}a[e+24>>2]=o;t=a[c+16>>2]|0;if(t|0){a[e+16>>2]=t;a[t+24>>2]=e}t=a[c+20>>2]|0;if(t){a[e+20>>2]=t;a[t+24>>2]=e}}}while(0);t:do{if(s>>>0<16){x=s+u|0;a[c+4>>2]=x|3;x=c+x+4|0;a[x>>2]=a[x>>2]|1}else{a[c+4>>2]=u|3;a[h+4>>2]=s|1;a[h+s>>2]=s;e=s>>>3;if(s>>>0<256){r=21688+(e<<1<<2)|0;t=a[5412]|0;e=1<>2]|0}a[t>>2]=h;a[e+12>>2]=h;a[h+8>>2]=e;a[h+12>>2]=r;break}e=s>>>8;if(e){if(s>>>0>16777215)r=31;else{b=(e+1048320|0)>>>16&8;x=e<>>16&4;x=x<>>16&2;r=14-(y|b|r)+(x<>>15)|0;r=s>>>(r+7|0)&1|r<<1}}else r=0;e=21952+(r<<2)|0;a[h+28>>2]=r;t=h+16|0;a[t+4>>2]=0;a[t>>2]=0;t=1<>2]=h;a[h+24>>2]=e;a[h+12>>2]=h;a[h+8>>2]=h;break}e=a[e>>2]|0;e:do{if((a[e+4>>2]&-8|0)!=(s|0)){n=s<<((r|0)==31?0:25-(r>>>1)|0);while(1){r=e+16+(n>>>31<<2)|0;t=a[r>>2]|0;if(!t)break;if((a[t+4>>2]&-8|0)==(s|0)){e=t;break e}else{n=n<<1;e=t}}a[r>>2]=h;a[h+24>>2]=e;a[h+12>>2]=h;a[h+8>>2]=h;break t}}while(0);b=e+8|0;x=a[b>>2]|0;a[x+12>>2]=h;a[b>>2]=h;a[h+8>>2]=x;a[h+12>>2]=e;a[h+24>>2]=0}}while(0);x=c+8|0;Y=w;return x|0}else f=u}else f=u}else f=-1}while(0);r=a[5414]|0;if(r>>>0>=f>>>0){e=r-f|0;t=a[5417]|0;if(e>>>0>15){x=t+f|0;a[5417]=x;a[5414]=e;a[x+4>>2]=e|1;a[t+r>>2]=e;a[t+4>>2]=f|3}else{a[5414]=0;a[5417]=0;a[t+4>>2]=r|3;x=t+r+4|0;a[x>>2]=a[x>>2]|1}x=t+8|0;Y=w;return x|0}s=a[5415]|0;if(s>>>0>f>>>0){y=s-f|0;a[5415]=y;x=a[5418]|0;b=x+f|0;a[5418]=b;a[b+4>>2]=y|1;a[x+4>>2]=f|3;x=x+8|0;Y=w;return x|0}if(!(a[5530]|0)){a[5532]=4096;a[5531]=4096;a[5533]=-1;a[5534]=-1;a[5535]=0;a[5523]=0;a[5530]=d&-16^1431655768;t=4096}else t=a[5532]|0;c=f+48|0;l=f+47|0;o=t+l|0;i=0-t|0;u=o&i;if(u>>>0<=f>>>0){x=0;Y=w;return x|0}t=a[5522]|0;if(t|0?(h=a[5520]|0,d=h+u|0,d>>>0<=h>>>0|d>>>0>t>>>0):0){x=0;Y=w;return x|0}t:do{if(!(a[5523]&4)){r=a[5418]|0;e:do{if(r){n=22096;while(1){d=a[n>>2]|0;if(d>>>0<=r>>>0?(d+(a[n+4>>2]|0)|0)>>>0>r>>>0:0)break;t=a[n+8>>2]|0;if(!t){g=128;break e}else n=t}e=o-s&i;if(e>>>0<2147483647){t=Yg(e)|0;if((t|0)==((a[n>>2]|0)+(a[n+4>>2]|0)|0)){if((t|0)!=(-1|0)){s=e;o=t;g=145;break t}}else{n=t;g=136}}else e=0}else g=128}while(0);do{if((g|0)==128){r=Yg(0)|0;if((r|0)!=(-1|0)?(e=r,p=a[5531]|0,m=p+-1|0,e=((m&e|0)==0?0:(m+e&0-p)-e|0)+u|0,p=a[5520]|0,m=e+p|0,e>>>0>f>>>0&e>>>0<2147483647):0){d=a[5522]|0;if(d|0?m>>>0<=p>>>0|m>>>0>d>>>0:0){e=0;break}t=Yg(e)|0;if((t|0)==(r|0)){s=e;o=r;g=145;break t}else{n=t;g=136}}else e=0}}while(0);do{if((g|0)==136){r=0-e|0;if(!(c>>>0>e>>>0&(e>>>0<2147483647&(n|0)!=(-1|0))))if((n|0)==(-1|0)){e=0;break}else{s=e;o=n;g=145;break t}t=a[5532]|0;t=l-e+t&0-t;if(t>>>0>=2147483647){s=e;o=n;g=145;break t}if((Yg(t)|0)==(-1|0)){Yg(r)|0;e=0;break}else{s=t+e|0;o=n;g=145;break t}}}while(0);a[5523]=a[5523]|4;g=143}else{e=0;g=143}}while(0);if(((g|0)==143?u>>>0<2147483647:0)?(y=Yg(u)|0,m=Yg(0)|0,A=m-y|0,v=A>>>0>(f+40|0)>>>0,!((y|0)==(-1|0)|v^1|y>>>0>>0&((y|0)!=(-1|0)&(m|0)!=(-1|0))^1)):0){s=v?A:e;o=y;g=145}if((g|0)==145){e=(a[5520]|0)+s|0;a[5520]=e;if(e>>>0>(a[5521]|0)>>>0)a[5521]=e;l=a[5418]|0;t:do{if(l){e=22096;while(1){t=a[e>>2]|0;r=a[e+4>>2]|0;if((o|0)==(t+r|0)){g=154;break}n=a[e+8>>2]|0;if(!n)break;else e=n}if(((g|0)==154?(b=e+4|0,(a[e+12>>2]&8|0)==0):0)?o>>>0>l>>>0&t>>>0<=l>>>0:0){a[b>>2]=r+s;x=(a[5415]|0)+s|0;y=l+8|0;y=(y&7|0)==0?0:0-y&7;b=l+y|0;y=x-y|0;a[5418]=b;a[5415]=y;a[b+4>>2]=y|1;a[l+x+4>>2]=40;a[5419]=a[5534];break}if(o>>>0<(a[5416]|0)>>>0)a[5416]=o;r=o+s|0;e=22096;while(1){if((a[e>>2]|0)==(r|0)){g=162;break}t=a[e+8>>2]|0;if(!t)break;else e=t}if((g|0)==162?(a[e+12>>2]&8|0)==0:0){a[e>>2]=o;h=e+4|0;a[h>>2]=(a[h>>2]|0)+s;h=o+8|0;h=o+((h&7|0)==0?0:0-h&7)|0;e=r+8|0;e=r+((e&7|0)==0?0:0-e&7)|0;u=h+f|0;c=e-h-f|0;a[h+4>>2]=f|3;e:do{if((l|0)==(e|0)){x=(a[5415]|0)+c|0;a[5415]=x;a[5418]=u;a[u+4>>2]=x|1}else{if((a[5417]|0)==(e|0)){x=(a[5414]|0)+c|0;a[5414]=x;a[5417]=u;a[u+4>>2]=x|1;a[u+x>>2]=x;break}t=a[e+4>>2]|0;if((t&3|0)==1){s=t&-8;n=t>>>3;r:do{if(t>>>0<256){t=a[e+8>>2]|0;r=a[e+12>>2]|0;if((r|0)==(t|0)){a[5412]=a[5412]&~(1<>2]=r;a[r+8>>2]=t;break}}else{o=a[e+24>>2]|0;t=a[e+12>>2]|0;do{if((t|0)==(e|0)){r=e+16|0;n=r+4|0;t=a[n>>2]|0;if(!t){t=a[r>>2]|0;if(!t){t=0;break}}else r=n;while(1){i=t+20|0;n=a[i>>2]|0;if(!n){i=t+16|0;n=a[i>>2]|0;if(!n)break;else{t=n;r=i}}else{t=n;r=i}}a[r>>2]=0}else{x=a[e+8>>2]|0;a[x+12>>2]=t;a[t+8>>2]=x}}while(0);if(!o)break;r=a[e+28>>2]|0;n=21952+(r<<2)|0;do{if((a[n>>2]|0)!=(e|0)){x=o+16|0;a[((a[x>>2]|0)==(e|0)?x:o+20|0)>>2]=t;if(!t)break r}else{a[n>>2]=t;if(t|0)break;a[5413]=a[5413]&~(1<>2]=o;r=e+16|0;n=a[r>>2]|0;if(n|0){a[t+16>>2]=n;a[n+24>>2]=t}r=a[r+4>>2]|0;if(!r)break;a[t+20>>2]=r;a[r+24>>2]=t}}while(0);e=e+s|0;i=s+c|0}else i=c;e=e+4|0;a[e>>2]=a[e>>2]&-2;a[u+4>>2]=i|1;a[u+i>>2]=i;e=i>>>3;if(i>>>0<256){r=21688+(e<<1<<2)|0;t=a[5412]|0;e=1<>2]|0}a[t>>2]=u;a[e+12>>2]=u;a[u+8>>2]=e;a[u+12>>2]=r;break}e=i>>>8;do{if(!e)n=0;else{if(i>>>0>16777215){n=31;break}b=(e+1048320|0)>>>16&8;x=e<>>16&4;x=x<>>16&2;n=14-(y|b|n)+(x<>>15)|0;n=i>>>(n+7|0)&1|n<<1}}while(0);e=21952+(n<<2)|0;a[u+28>>2]=n;t=u+16|0;a[t+4>>2]=0;a[t>>2]=0;t=a[5413]|0;r=1<>2]=u;a[u+24>>2]=e;a[u+12>>2]=u;a[u+8>>2]=u;break}e=a[e>>2]|0;r:do{if((a[e+4>>2]&-8|0)!=(i|0)){n=i<<((n|0)==31?0:25-(n>>>1)|0);while(1){r=e+16+(n>>>31<<2)|0;t=a[r>>2]|0;if(!t)break;if((a[t+4>>2]&-8|0)==(i|0)){e=t;break r}else{n=n<<1;e=t}}a[r>>2]=u;a[u+24>>2]=e;a[u+12>>2]=u;a[u+8>>2]=u;break e}}while(0);b=e+8|0;x=a[b>>2]|0;a[x+12>>2]=u;a[b>>2]=u;a[u+8>>2]=x;a[u+12>>2]=e;a[u+24>>2]=0}}while(0);x=h+8|0;Y=w;return x|0}e=22096;while(1){t=a[e>>2]|0;if(t>>>0<=l>>>0?(x=t+(a[e+4>>2]|0)|0,x>>>0>l>>>0):0)break;e=a[e+8>>2]|0}i=x+-47|0;t=i+8|0;t=i+((t&7|0)==0?0:0-t&7)|0;i=l+16|0;t=t>>>0>>0?l:t;e=t+8|0;r=s+-40|0;y=o+8|0;y=(y&7|0)==0?0:0-y&7;b=o+y|0;y=r-y|0;a[5418]=b;a[5415]=y;a[b+4>>2]=y|1;a[o+r+4>>2]=40;a[5419]=a[5534];r=t+4|0;a[r>>2]=27;a[e>>2]=a[5524];a[e+4>>2]=a[5525];a[e+8>>2]=a[5526];a[e+12>>2]=a[5527];a[5524]=o;a[5525]=s;a[5527]=0;a[5526]=e;e=t+24|0;do{b=e;e=e+4|0;a[e>>2]=7}while((b+8|0)>>>0>>0);if((t|0)!=(l|0)){o=t-l|0;a[r>>2]=a[r>>2]&-2;a[l+4>>2]=o|1;a[t>>2]=o;e=o>>>3;if(o>>>0<256){r=21688+(e<<1<<2)|0;t=a[5412]|0;e=1<>2]|0}a[t>>2]=l;a[e+12>>2]=l;a[l+8>>2]=e;a[l+12>>2]=r;break}e=o>>>8;if(e){if(o>>>0>16777215)n=31;else{b=(e+1048320|0)>>>16&8;x=e<>>16&4;x=x<>>16&2;n=14-(y|b|n)+(x<>>15)|0;n=o>>>(n+7|0)&1|n<<1}}else n=0;r=21952+(n<<2)|0;a[l+28>>2]=n;a[l+20>>2]=0;a[i>>2]=0;e=a[5413]|0;t=1<>2]=l;a[l+24>>2]=r;a[l+12>>2]=l;a[l+8>>2]=l;break}e=a[r>>2]|0;e:do{if((a[e+4>>2]&-8|0)!=(o|0)){n=o<<((n|0)==31?0:25-(n>>>1)|0);while(1){r=e+16+(n>>>31<<2)|0;t=a[r>>2]|0;if(!t)break;if((a[t+4>>2]&-8|0)==(o|0)){e=t;break e}else{n=n<<1;e=t}}a[r>>2]=l;a[l+24>>2]=e;a[l+12>>2]=l;a[l+8>>2]=l;break t}}while(0);b=e+8|0;x=a[b>>2]|0;a[x+12>>2]=l;a[b>>2]=l;a[l+8>>2]=x;a[l+12>>2]=e;a[l+24>>2]=0}}else{x=a[5416]|0;if((x|0)==0|o>>>0>>0)a[5416]=o;a[5524]=o;a[5525]=s;a[5527]=0;a[5421]=a[5530];a[5420]=-1;a[5425]=21688;a[5424]=21688;a[5427]=21696;a[5426]=21696;a[5429]=21704;a[5428]=21704;a[5431]=21712;a[5430]=21712;a[5433]=21720;a[5432]=21720;a[5435]=21728;a[5434]=21728;a[5437]=21736;a[5436]=21736;a[5439]=21744;a[5438]=21744;a[5441]=21752;a[5440]=21752;a[5443]=21760;a[5442]=21760;a[5445]=21768;a[5444]=21768;a[5447]=21776;a[5446]=21776;a[5449]=21784;a[5448]=21784;a[5451]=21792;a[5450]=21792;a[5453]=21800;a[5452]=21800;a[5455]=21808;a[5454]=21808;a[5457]=21816;a[5456]=21816;a[5459]=21824;a[5458]=21824;a[5461]=21832;a[5460]=21832;a[5463]=21840;a[5462]=21840;a[5465]=21848;a[5464]=21848;a[5467]=21856;a[5466]=21856;a[5469]=21864;a[5468]=21864;a[5471]=21872;a[5470]=21872;a[5473]=21880;a[5472]=21880;a[5475]=21888;a[5474]=21888;a[5477]=21896;a[5476]=21896;a[5479]=21904;a[5478]=21904;a[5481]=21912;a[5480]=21912;a[5483]=21920;a[5482]=21920;a[5485]=21928;a[5484]=21928;a[5487]=21936;a[5486]=21936;x=s+-40|0;y=o+8|0;y=(y&7|0)==0?0:0-y&7;b=o+y|0;y=x-y|0;a[5418]=b;a[5415]=y;a[b+4>>2]=y|1;a[o+x+4>>2]=40;a[5419]=a[5534]}}while(0);e=a[5415]|0;if(e>>>0>f>>>0){y=e-f|0;a[5415]=y;x=a[5418]|0;b=x+f|0;a[5418]=b;a[b+4>>2]=y|1;a[x+4>>2]=f|3;x=x+8|0;Y=w;return x|0}}a[(Wd()|0)>>2]=48;x=0;Y=w;return x|0}function qg(t){t=t|0;var e=0,r=0,n=0,i=0,o=0,s=0,c=0,l=0;if(!t)return;r=t+-8|0;i=a[5416]|0;t=a[t+-4>>2]|0;e=t&-8;l=r+e|0;do{if(!(t&1)){n=a[r>>2]|0;if(!(t&3))return;s=r+(0-n)|0;o=n+e|0;if(s>>>0>>0)return;if((a[5417]|0)==(s|0)){t=l+4|0;e=a[t>>2]|0;if((e&3|0)!=3){c=s;e=o;break}a[5414]=o;a[t>>2]=e&-2;a[s+4>>2]=o|1;a[s+o>>2]=o;return}r=n>>>3;if(n>>>0<256){t=a[s+8>>2]|0;e=a[s+12>>2]|0;if((e|0)==(t|0)){a[5412]=a[5412]&~(1<>2]=e;a[e+8>>2]=t;c=s;e=o;break}}i=a[s+24>>2]|0;t=a[s+12>>2]|0;do{if((t|0)==(s|0)){e=s+16|0;r=e+4|0;t=a[r>>2]|0;if(!t){t=a[e>>2]|0;if(!t){t=0;break}}else e=r;while(1){n=t+20|0;r=a[n>>2]|0;if(!r){n=t+16|0;r=a[n>>2]|0;if(!r)break;else{t=r;e=n}}else{t=r;e=n}}a[e>>2]=0}else{c=a[s+8>>2]|0;a[c+12>>2]=t;a[t+8>>2]=c}}while(0);if(i){e=a[s+28>>2]|0;r=21952+(e<<2)|0;if((a[r>>2]|0)==(s|0)){a[r>>2]=t;if(!t){a[5413]=a[5413]&~(1<>2]|0)==(s|0)?c:i+20|0)>>2]=t;if(!t){c=s;e=o;break}}a[t+24>>2]=i;e=s+16|0;r=a[e>>2]|0;if(r|0){a[t+16>>2]=r;a[r+24>>2]=t}e=a[e+4>>2]|0;if(e){a[t+20>>2]=e;a[e+24>>2]=t;c=s;e=o}else{c=s;e=o}}else{c=s;e=o}}else{c=r;s=r}}while(0);if(s>>>0>=l>>>0)return;t=l+4|0;n=a[t>>2]|0;if(!(n&1))return;if(!(n&2)){if((a[5418]|0)==(l|0)){l=(a[5415]|0)+e|0;a[5415]=l;a[5418]=c;a[c+4>>2]=l|1;if((c|0)!=(a[5417]|0))return;a[5417]=0;a[5414]=0;return}if((a[5417]|0)==(l|0)){l=(a[5414]|0)+e|0;a[5414]=l;a[5417]=s;a[c+4>>2]=l|1;a[s+l>>2]=l;return}i=(n&-8)+e|0;r=n>>>3;do{if(n>>>0<256){e=a[l+8>>2]|0;t=a[l+12>>2]|0;if((t|0)==(e|0)){a[5412]=a[5412]&~(1<>2]=t;a[t+8>>2]=e;break}}else{o=a[l+24>>2]|0;t=a[l+12>>2]|0;do{if((t|0)==(l|0)){e=l+16|0;r=e+4|0;t=a[r>>2]|0;if(!t){t=a[e>>2]|0;if(!t){r=0;break}}else e=r;while(1){n=t+20|0;r=a[n>>2]|0;if(!r){n=t+16|0;r=a[n>>2]|0;if(!r)break;else{t=r;e=n}}else{t=r;e=n}}a[e>>2]=0;r=t}else{r=a[l+8>>2]|0;a[r+12>>2]=t;a[t+8>>2]=r;r=t}}while(0);if(o|0){t=a[l+28>>2]|0;e=21952+(t<<2)|0;if((a[e>>2]|0)==(l|0)){a[e>>2]=r;if(!r){a[5413]=a[5413]&~(1<>2]|0)==(l|0)?n:o+20|0)>>2]=r;if(!r)break}a[r+24>>2]=o;t=l+16|0;e=a[t>>2]|0;if(e|0){a[r+16>>2]=e;a[e+24>>2]=r}t=a[t+4>>2]|0;if(t|0){a[r+20>>2]=t;a[t+24>>2]=r}}}}while(0);a[c+4>>2]=i|1;a[s+i>>2]=i;if((c|0)==(a[5417]|0)){a[5414]=i;return}}else{a[t>>2]=n&-2;a[c+4>>2]=e|1;a[s+e>>2]=e;i=e}t=i>>>3;if(i>>>0<256){r=21688+(t<<1<<2)|0;e=a[5412]|0;t=1<>2]|0}a[e>>2]=c;a[t+12>>2]=c;a[c+8>>2]=t;a[c+12>>2]=r;return}t=i>>>8;if(t){if(i>>>0>16777215)n=31;else{s=(t+1048320|0)>>>16&8;l=t<>>16&4;l=l<>>16&2;n=14-(o|s|n)+(l<>>15)|0;n=i>>>(n+7|0)&1|n<<1}}else n=0;t=21952+(n<<2)|0;a[c+28>>2]=n;a[c+20>>2]=0;a[c+16>>2]=0;e=a[5413]|0;r=1<>2]=c;a[c+24>>2]=t;a[c+12>>2]=c;a[c+8>>2]=c}else{t=a[t>>2]|0;e:do{if((a[t+4>>2]&-8|0)!=(i|0)){n=i<<((n|0)==31?0:25-(n>>>1)|0);while(1){r=t+16+(n>>>31<<2)|0;e=a[r>>2]|0;if(!e)break;if((a[e+4>>2]&-8|0)==(i|0)){t=e;break e}else{n=n<<1;t=e}}a[r>>2]=c;a[c+24>>2]=t;a[c+12>>2]=c;a[c+8>>2]=c;break t}}while(0);s=t+8|0;l=a[s>>2]|0;a[l+12>>2]=c;a[s>>2]=c;a[c+8>>2]=l;a[c+12>>2]=t;a[c+24>>2]=0}}while(0);l=(a[5420]|0)+-1|0;a[5420]=l;if(l|0)return;t=22104;while(1){t=a[t>>2]|0;if(!t)break;else t=t+8|0}a[5420]=-1;return}function Yg(t){t=t|0;var e=0,r=0,n=0;n=t+3&-4;t=lA()|0;e=a[t>>2]|0;r=e+n|0;do{if((n|0)<1|r>>>0>e>>>0){if(r>>>0>(W()|0)>>>0?(X(r|0)|0)==0:0)break;a[t>>2]=r;n=e;return n|0}}while(0);a[(Wd()|0)>>2]=48;n=-1;return n|0}function Jg(t){t=t|0;var e=0;e=Y;Y=Y+t|0;Y=Y+15&-16;return e|0}function Kg(t){t=t|0;Y=t}function $g(){return Y|0}function tA(t,e){t=t|0;e=e|0;var r=0,n=0,i=0,a=0;a=t&65535;i=e&65535;r=y(i,a)|0;n=t>>>16;t=(r>>>16)+(y(i,n)|0)|0;i=e>>>16;e=y(i,a)|0;return(w((t>>>16)+(y(i,n)|0)+(((t&65535)+e|0)>>>16)|0),t+e<<16|r&65535|0)|0}function eA(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,a=0;i=t;a=r;r=tA(i,a)|0;t=_()|0;return(w((y(e,a)|0)+(y(n,i)|0)+t|t&0|0),r|0|0)|0}function rA(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;r=t+r>>>0;return(w(e+n+(r>>>0>>0|0)>>>0|0),r|0)|0}function nA(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;n=e-n-(r>>>0>t>>>0|0)>>>0;return(w(n|0),t-r>>>0|0)|0}function iA(t){t=t|0;return(t?31-(b(t^t-1)|0)|0:32)|0}function aA(t,e,r,n,i){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;var o=0,s=0,c=0,l=0,u=0,h=0,f=0,d=0,p=0,m=0;h=t;l=e;u=l;s=r;d=n;c=d;if(!u){o=(i|0)!=0;if(!c){if(o){a[i>>2]=(h>>>0)%(s>>>0);a[i+4>>2]=0}d=0;i=(h>>>0)/(s>>>0)>>>0;return(w(d|0),i)|0}else{if(!o){d=0;i=0;return(w(d|0),i)|0}a[i>>2]=t|0;a[i+4>>2]=e&0;d=0;i=0;return(w(d|0),i)|0}}o=(c|0)==0;do{if(s){if(!o){o=(b(c|0)|0)-(b(u|0)|0)|0;if(o>>>0<=31){f=o+1|0;c=31-o|0;e=o-31>>31;s=f;t=h>>>(f>>>0)&e|u<>>(f>>>0)&e;o=0;c=h<>2]=t|0;a[i+4>>2]=l|e&0;d=0;i=0;return(w(d|0),i)|0}o=s-1|0;if(o&s|0){c=(b(s|0)|0)+33-(b(u|0)|0)|0;m=64-c|0;f=32-c|0;l=f>>31;p=c-32|0;e=p>>31;s=c;t=f-1>>31&u>>>(p>>>0)|(u<>>(c>>>0))&e;e=e&u>>>(c>>>0);o=h<>>(p>>>0))&l|h<>31;break}if(i|0){a[i>>2]=o&h;a[i+4>>2]=0}if((s|0)==1){p=l|e&0;m=t|0|0;return(w(p|0),m)|0}else{m=iA(s|0)|0;p=u>>>(m>>>0)|0;m=u<<32-m|h>>>(m>>>0)|0;return(w(p|0),m)|0}}else{if(o){if(i|0){a[i>>2]=(u>>>0)%(s>>>0);a[i+4>>2]=0}p=0;m=(u>>>0)/(s>>>0)>>>0;return(w(p|0),m)|0}if(!h){if(i|0){a[i>>2]=0;a[i+4>>2]=(u>>>0)%(c>>>0)}p=0;m=(u>>>0)/(c>>>0)>>>0;return(w(p|0),m)|0}o=c-1|0;if(!(o&c)){if(i|0){a[i>>2]=t|0;a[i+4>>2]=o&u|e&0}p=0;m=u>>>((iA(c|0)|0)>>>0);return(w(p|0),m)|0}o=(b(c|0)|0)-(b(u|0)|0)|0;if(o>>>0<=30){e=o+1|0;c=31-o|0;s=e;t=u<>>(e>>>0);e=u>>>(e>>>0);o=0;c=h<>2]=t|0;a[i+4>>2]=l|e&0;p=0;m=0;return(w(p|0),m)|0}}while(0);if(!s){u=c;l=0;c=0}else{f=r|0|0;h=d|n&0;u=rA(f|0,h|0,-1,-1)|0;r=_()|0;l=c;c=0;do{n=l;l=o>>>31|l<<1;o=c|o<<1;n=t<<1|n>>>31|0;d=t>>>31|e<<1|0;nA(u|0,r|0,n|0,d|0)|0;m=_()|0;p=m>>31|((m|0)<0?-1:0)<<1;c=p&1;t=nA(n|0,d|0,p&f|0,(((m|0)<0?-1:0)>>31|((m|0)<0?-1:0)<<1)&h|0)|0;e=_()|0;s=s-1|0}while((s|0)!=0);u=l;l=0}s=0;if(i|0){a[i>>2]=t;a[i+4>>2]=e}p=(o|0)>>>31|(u|s)<<1|(s<<1|o>>>31)&0|l;m=(o<<1|0>>>31)&-2|c;return(w(p|0),m)|0}function oA(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;return aA(t,e,r,n,0)|0}function sA(t,e,r){t=t|0;e=e|0;r=r|0;if((r|0)<32){w(e>>>r|0);return t>>>r|(e&(1<>>r-32|0}function cA(t,e,r){t=t|0;e=e|0;r=r|0;if((r|0)<32){w(e<>>32-r|0);return t<>8&255)<<16|(t>>16&255)<<8|t>>>24|0}function hA(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0;if((r|0)>=512){H(t|0,e|0,r|0)|0;return t|0}s=t|0;o=t+r|0;if((t&3)==(e&3)){while(t&3){if(!r)return s|0;n[t>>0]=n[e>>0]|0;t=t+1|0;e=e+1|0;r=r-1|0}r=o&-4|0;i=r-64|0;while((t|0)<=(i|0)){a[t>>2]=a[e>>2];a[t+4>>2]=a[e+4>>2];a[t+8>>2]=a[e+8>>2];a[t+12>>2]=a[e+12>>2];a[t+16>>2]=a[e+16>>2];a[t+20>>2]=a[e+20>>2];a[t+24>>2]=a[e+24>>2];a[t+28>>2]=a[e+28>>2];a[t+32>>2]=a[e+32>>2];a[t+36>>2]=a[e+36>>2];a[t+40>>2]=a[e+40>>2];a[t+44>>2]=a[e+44>>2];a[t+48>>2]=a[e+48>>2];a[t+52>>2]=a[e+52>>2];a[t+56>>2]=a[e+56>>2];a[t+60>>2]=a[e+60>>2];t=t+64|0;e=e+64|0}while((t|0)<(r|0)){a[t>>2]=a[e>>2];t=t+4|0;e=e+4|0}}else{r=o-4|0;while((t|0)<(r|0)){n[t>>0]=n[e>>0]|0;n[t+1>>0]=n[e+1>>0]|0;n[t+2>>0]=n[e+2>>0]|0;n[t+3>>0]=n[e+3>>0]|0;t=t+4|0;e=e+4|0}}while((t|0)<(o|0)){n[t>>0]=n[e>>0]|0;t=t+1|0;e=e+1|0}return s|0}function fA(t,e,r){t=t|0;e=e|0;r=r|0;var i=0;if((e|0)<(t|0)&(t|0)<(e+r|0)){i=t;e=e+r|0;t=t+r|0;while((r|0)>0){t=t-1|0;e=e-1|0;r=r-1|0;n[t>>0]=n[e>>0]|0}t=i}else hA(t,e,r)|0;return t|0}function dA(t,e,r){t=t|0;e=e|0;r=r|0;var i=0,o=0,s=0,c=0;s=t+r|0;e=e&255;if((r|0)>=67){while(t&3){n[t>>0]=e;t=t+1|0}i=s&-4|0;c=e|e<<8|e<<16|e<<24;o=i-64|0;while((t|0)<=(o|0)){a[t>>2]=c;a[t+4>>2]=c;a[t+8>>2]=c;a[t+12>>2]=c;a[t+16>>2]=c;a[t+20>>2]=c;a[t+24>>2]=c;a[t+28>>2]=c;a[t+32>>2]=c;a[t+36>>2]=c;a[t+40>>2]=c;a[t+44>>2]=c;a[t+48>>2]=c;a[t+52>>2]=c;a[t+56>>2]=c;a[t+60>>2]=c;t=t+64|0}while((t|0)<(i|0)){a[t>>2]=c;t=t+4|0}}while((t|0)<(s|0)){n[t>>0]=e;t=t+1|0}return s-r|0}function pA(t){t=t|0;return FA[t&3]()|0}function mA(t,e){t=t|0;e=e|0;return NA[t&15](e|0)|0}function gA(t,e,r,n,i,a,o){t=t|0;e=e|0;r=+r;n=n|0;i=i|0;a=a|0;o=o|0;return zA[t&1](e|0,+r,n|0,i|0,a|0,o|0)|0}function AA(t,e,r){t=t|0;e=e|0;r=r|0;return GA[t&63](e|0,r|0)|0}function vA(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;return ZA[t&7](e|0,r|0,n|0)|0}function yA(t){t=t|0;VA[t&3]()}function bA(t,e){t=t|0;e=e|0;QA[t&255](e|0)}function xA(t,e,r){t=t|0;e=e|0;r=r|0;jA[t&15](e|0,r|0)}function wA(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;WA[t&15](e|0,r|0,n|0)}function _A(t,e,r,n,i){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;HA[t&7](e|0,r|0,n|0,i|0)}function EA(t,e,r,n,i,a){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;a=a|0;XA[t&3](e|0,r|0,n|0,i|0,a|0)}function MA(t,e,r,n,i,a,o){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;a=a|0;o=o|0;qA[t&3](e|0,r|0,n|0,i|0,a|0,o|0)}function SA(){x(0);return 0}function CA(t){t=t|0;x(1);return 0}function TA(t,e,r,n,i,a){t=t|0;e=+e;r=r|0;n=n|0;i=i|0;a=a|0;x(2);return 0}function IA(t,e){t=t|0;e=e|0;x(3);return 0}function RA(t,e,r){t=t|0;e=e|0;r=r|0;x(4);return 0}function BA(){x(5)}function kA(t){t=t|0;x(6)}function LA(t,e){t=t|0;e=e|0;x(7)}function PA(t,e,r){t=t|0;e=e|0;r=r|0;x(8)}function DA(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;x(9)}function UA(t,e,r,n,i){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;x(10)}function OA(t,e,r,n,i,a){t=t|0;e=e|0;r=r|0;n=n|0;i=i|0;a=a|0;x(11)}var FA=[SA,Ru,_h,SA];var NA=[CA,Am,ge,we,sm,um,ag,Cg,Ug,pu,it,hh,ku,Mh,CA,CA];var zA=[TA,op];var GA=[IA,vt,Ct,xe,tn,Bn,Gn,ei,ri,ai,Qi,Ji,ma,wa,Ba,Fa,Mo,Po,Vo,Xo,ns,cs,As,ws,Bs,Qs,Js,rc,uc,yc,Uc,Vc,Jc,ol,gl,_l,Ll,Zl,Yl,nu,hu,nh,IA,IA,IA,IA,IA,IA,IA,IA,IA,IA,IA,IA,IA,IA,IA,IA,IA,IA,IA,IA,IA,IA];var ZA=[RA,Mp,Gp,wm,Em,Ig,Rg,RA];var VA=[BA,bm,kp,BA];var QA=[kA,og,gt,At,yt,Mt,St,Tt,mm,ae,_e,me,ve,ye,Te,Ie,ze,Ge,lr,ur,hr,Rr,Kr,$r,en,Cn,kn,Ln,Pn,Dn,Nn,zn,Zn,$n,ti,ni,ii,Zi,Vi,ji,qi,Yi,da,pa,ga,ba,xa,Ia,Ra,ka,Ua,Oa,_o,Eo,So,Do,Uo,Go,Zo,Qo,qo,Yo,es,rs,is,ls,us,ms,gs,vs,_s,Es,Is,Rs,ks,Zs,Vs,js,qs,Ys,Ks,nc,ic,cc,lc,hc,Ac,vc,Pc,Dc,Oc,Gc,Zc,qc,Yc,Kc,il,al,pl,ml,Al,xl,wl,Bl,kl,Pl,zl,Gl,Xl,ql,Jl,eu,ru,lu,uu,fu,Op,Fp,Np,zp,Yp,am,om,cm,lm,gm,vm,ym,xm,_m,Tm,ng,ig,Mg,Sg,Dg,Gg,Zg,Au,ph,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA,kA];var jA=[LA,Ae,be,nt,ot,st,ct,lt,sp,LA,LA,LA,LA,LA,LA,LA];var WA=[PA,Tg,Bg,Og,Fg,rt,at,qu,Nh,jh,PA,PA,PA,PA,PA,PA];var HA=[DA,Qp,$p,Bm,Nu,kh,DA,DA];var XA=[UA,Vp,Kp,Rm];var qA=[OA,Zp,Jp,Im];return{__ZSt18uncaught_exceptionv:eg,___cxa_can_catch:Km,___cxa_is_pointer_type:$m,___embind_register_native_and_builtin_types:tf,___errno_location:Wd,___getTypeName:jd,___muldi3:eA,___udivdi3:oA,_bitshift64Lshr:sA,_bitshift64Shl:cA,_emscripten_get_sbrk_ptr:lA,_free:qg,_i64Add:rA,_i64Subtract:nA,_llvm_bswap_i32:uA,_malloc:Xg,_memcpy:hA,_memmove:fA,_memset:dA,dynCall_i:pA,dynCall_ii:mA,dynCall_iidiiii:gA,dynCall_iii:AA,dynCall_iiii:vA,dynCall_v:yA,dynCall_vi:bA,dynCall_vii:xA,dynCall_viii:wA,dynCall_viiii:_A,dynCall_viiiii:EA,dynCall_viiiiii:MA,globalCtors:$,stackAlloc:Jg,stackRestore:Kg,stackSave:$g}}({Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Float32Array,Float64Array},ne,b),ae=e.__ZSt18uncaught_exceptionv=ie.__ZSt18uncaught_exceptionv,oe=(e.___cxa_can_catch=ie.___cxa_can_catch,e.___cxa_is_pointer_type=ie.___cxa_is_pointer_type,e.___embind_register_native_and_builtin_types=ie.___embind_register_native_and_builtin_types,e.___errno_location=ie.___errno_location,e.___getTypeName=ie.___getTypeName),se=(e.___muldi3=ie.___muldi3,e.___udivdi3=ie.___udivdi3,e._bitshift64Lshr=ie._bitshift64Lshr,e._bitshift64Shl=ie._bitshift64Shl,e._emscripten_get_sbrk_ptr=ie._emscripten_get_sbrk_ptr,e._free=ie._free),ce=(e._i64Add=ie._i64Add,e._i64Subtract=ie._i64Subtract,e._llvm_bswap_i32=ie._llvm_bswap_i32,e._malloc=ie._malloc),le=(e._memcpy=ie._memcpy,e._memmove=ie._memmove,e._memset=ie._memset,e.globalCtors=ie.globalCtors);if(e.stackAlloc=ie.stackAlloc,e.stackRestore=ie.stackRestore,e.stackSave=ie.stackSave,e.dynCall_i=ie.dynCall_i,e.dynCall_ii=ie.dynCall_ii,e.dynCall_iidiiii=ie.dynCall_iidiiii,e.dynCall_iii=ie.dynCall_iii,e.dynCall_iiii=ie.dynCall_iiii,e.dynCall_v=ie.dynCall_v,e.dynCall_vi=ie.dynCall_vi,e.dynCall_vii=ie.dynCall_vii,e.dynCall_viii=ie.dynCall_viii,e.dynCall_viiii=ie.dynCall_viiii,e.dynCall_viiiii=ie.dynCall_viiiii,e.dynCall_viiiiii=ie.dynCall_viiiiii,e.asm=ie,H)if(q(H)||(ee=H,H=e.locateFile?e.locateFile(ee,d):d+ee),o||a){var ue=u(H);w.set(ue,8)}else{V++,e.monitorRunDependencies&&e.monitorRunDependencies(V);var he=function(t){t.byteLength&&(t=new Uint8Array(t)),w.set(t,8),e.memoryInitializerRequest&&delete e.memoryInitializerRequest.response,function(t){if(V--,e.monitorRunDependencies&&e.monitorRunDependencies(V),0==V&&(null!==Q&&(clearInterval(Q),Q=null),j)){var r=j;j=null,r()}}()},fe=function(){l(H,he,(function(){throw new Error("could not load memory initializer "+H)}))},de=te(H);if(de)he(de.buffer);else if(e.memoryInitializerRequest){var pe=function(){var t=e.memoryInitializerRequest,r=t.response;if(200!==t.status&&0!==t.status){var n=te(e.memoryInitializerRequestURL);if(!n)return console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+t.status+", retrying "+H),void fe();r=n.buffer}he(r)};e.memoryInitializerRequest.response?setTimeout(pe,0):e.memoryInitializerRequest.addEventListener("load",pe)}else fe()}function me(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function ge(t){function r(){re||(re=!0,e.calledRun=!0,A||(F(z),F(G),e.onRuntimeInitialized&&e.onRuntimeInitialized(),function(){if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;)t=e.postRun.shift(),Z.unshift(t);var t;F(Z)}()))}t=t||s,V>0||(function(){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)t=e.preRun.shift(),N.unshift(t);var t;F(N)}(),V>0||(e.setStatus?(e.setStatus("Running..."),setTimeout((function(){setTimeout((function(){e.setStatus("")}),1),r()}),1)):r()))}if(j=function t(){re||ge(),re||(j=t)},e.run=ge,e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();return ge(),e}let zn=null;const Gn={0:t=>({position:[t.getInt32(0,!0),t.getInt32(4,!0),t.getInt32(8,!0)],intensity:t.getUint16(12,!0),classification:t.getUint8(15)}),1:t=>({position:[t.getInt32(0,!0),t.getInt32(4,!0),t.getInt32(8,!0)],intensity:t.getUint16(12,!0),classification:t.getUint8(15)}),2:t=>({position:[t.getInt32(0,!0),t.getInt32(4,!0),t.getInt32(8,!0)],intensity:t.getUint16(12,!0),classification:t.getUint8(15),color:[t.getUint16(20,!0),t.getUint16(22,!0),t.getUint16(24,!0)]}),3:t=>({position:[t.getInt32(0,!0),t.getInt32(4,!0),t.getInt32(8,!0)],intensity:t.getUint16(12,!0),classification:t.getUint8(15),color:[t.getUint16(28,!0),t.getUint16(30,!0),t.getUint16(32,!0)]})};function Zn(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;n=void 0===n||0===n?1:n;const i=new e(t.slice(r,r+e.BYTES_PER_ELEMENT*n));if(1===n)return i[0];const a=[];for(let t=0;t=this.pointsCount)throw new Error("Point index out of range");const e=new DataView(this.arrayb,t*this.pointSize,this.pointSize);return this.decoder(e)}}class Hn{constructor(t){if(this.arraybuffer=void 0,this.formatId=0,this.loader=void 0,this.isCompressed=!0,this.isOpen=!1,this.version=0,this.versionAsString="",this.arraybuffer=t,this.determineVersion()>13)throw new Error("Only file versions <= 1.3 are supported at this time");if(this.determineFormat(),void 0===Gn[this.formatId])throw new Error("The point format ID is not supported");this.loader=this.isCompressed?new jn(this.arraybuffer):new Qn(this.arraybuffer)}determineFormat(){const t=Zn(this.arraybuffer,Uint8Array,104),e=(128&t)>>7,r=(64&t)>>6;if(1===e&&1===r)throw new Error("Old style compression not supported");this.formatId=63&t,this.isCompressed=1===e||1===r}determineVersion(){const t=new Int8Array(this.arraybuffer,24,2);return this.version=10*t[0]+t[1],this.versionAsString=`${t[0]}.${t[1]}`,this.version}open(){this.loader.open()&&(this.isOpen=!0)}getHeader(){return this.loader.getHeader()}readData(t,e,r){return this.loader.readData(t,e,r)}close(){this.loader.close()&&(this.isOpen=!1)}getUnpacker(){return Wn}}function Xn(t,e,r){const n=function(t){switch(t.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}(e.value),i=r||function(t){const e={};return"byteOffset"in t&&(e.byteOffset=t.byteOffset.toString(10)),"byteStride"in t&&(e.byteStride=t.byteStride.toString(10)),"normalized"in t&&(e.normalized=t.normalized.toString()),e}(e);return{name:t,type:{type:"fixed-size-list",listSize:e.size,children:[{name:"value",type:n}]},nullable:!1,metadata:i}}function qn(t,e){const r=function(t){const e={};return e.las_pointsOffset=t.pointsOffset.toString(10),e.las_pointsFormatId=t.pointsFormatId.toString(10),e.las_pointsStructSize=t.pointsStructSize.toString(10),e.las_pointsCount=t.pointsCount.toString(10),e.las_scale=JSON.stringify(t.scale),e.las_offset=JSON.stringify(t.offset),void 0!==t.maxs&&(e.las_maxs=JSON.stringify(t.maxs)),void 0!==t.mins&&(e.las_mins=JSON.stringify(t.mins)),e.las_totalToRead=t.totalToRead.toString(10),e.las_pointsFortotalReadmatId=t.totalRead.toString(10),void 0!==t.versionAsString&&(e.las_versionAsString=t.versionAsString),void 0!==t.isCompressed&&(e.las_isCompressed=t.isCompressed.toString()),e}(t);return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(t){const e=[];for(const r in t){const n=t[r];e.push(Xn(r,n))}return e}(t);return{fields:r,metadata:e}}(e,r)}function Yn(t,e){return function(t){var e;let r,n,i,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=0;const l={loader:"las",loaderData:{},schema:{fields:[],metadata:{}},header:{vertexCount:0,boundingBox:[[0,0,0],[0,0,0]]},attributes:{},topology:"point-list",mode:0};return function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=new Hn(t);try{n.open();const t=n.getHeader(),i=n.getUnpacker(),a=Math.ceil(t.pointsCount/Math.max(1,e));t.totalToRead=a;let o=0;for(;;){const s=n.readData(1e5,0,e);if(o+=s.count,t.totalRead=o,t.versionAsString=s.versionAsString,t.isCompressed=s.isCompressed,r(new i(s.buffer,s.count,t),t),!s.hasMoreData||o>=a)break}}catch(t){throw t}finally{n.close()}}(t,null===(e=s.las)||void 0===e?void 0:e.skip,(function(){var t,e;let u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},h=arguments.length>1?arguments[1]:void 0;if(!o){var f;o=h;const t=h.totalToRead,e=null!==(f=s.las)&&void 0!==f&&f.fp64?Float64Array:Float32Array;r=new e(3*t),n=h.pointsFormatId>=2?new Uint8Array(4*t):null,i=new Uint16Array(t),a=new Uint8Array(t),l.loaderData=h,l.attributes={POSITION:{value:r,size:3},intensity:{value:i,size:1},classification:{value:a,size:1}},n&&(l.attributes.COLOR_0={value:n,size:4})}const d=u.pointsCount,{scale:[p,m,g],offset:[A,v,y]}=h,b=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,r=!1;switch(arguments.length>2?arguments[2]:void 0){case 8:r=!1;break;case 16:r=!0;break;case"auto":if(t.getPoint(0).color)for(let n=0;n255||e[1]>255||e[2]>255)&&(r=!0)}break;default:console.warn("las: illegal value for options.las.colorDepth")}return r}(u,d,null===(t=s.las)||void 0===t?void 0:t.colorDepth);for(let t=0;tYn(t,e),parseSync:(t,e)=>Yn(t,e)},Kn={parse:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.in=e.in||{},e.out=e.out||{},Jn.parse(t,{las:{colorDepth:e.in.colorDepth||"auto",skip:e.out.skip||1}}).then((function(t){var e=new n.BufferGeometry;e.userData=t.loaderData,e.userData.vertexCount=t.header.vertexCount,e.userData.boundingBox=t.header.boundingBox;var r=new n.BufferAttribute(t.attributes.POSITION.value,3);e.setAttribute("position",r);var i=new n.BufferAttribute(t.attributes.intensity.value,1,!0);e.setAttribute("intensity",i);var a=new n.BufferAttribute(t.attributes.classification.value,1,!0);if(e.setAttribute("classification",a),t.attributes.COLOR_0){var o=new n.BufferAttribute(t.attributes.COLOR_0.value,4,!0);e.setAttribute("color",o)}return e.computeBoundingBox(),e}))}};var $n=function(t){(0,E.Z)(a,t);var e,r,n=(e=a,r=function(){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(t){return!1}}(),function(){var t,n=(0,S.Z)(e);if(r){var i=(0,S.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,M.Z)(this,t)});function a(t){var e;return(0,C.Z)(this,a),(e=n.call(this,t)).isEntwinePointTileSource=!0,e.colorDepth=t.colorDepth,e.url=e.url.replace("/ept.json",""),e.whenReady=f.Z.json("".concat(e.url,"/ept.json"),e.networkOptions).then((function(t){return e.parse="laszip"===t.dataType?Kn.parse:kn.parse,e.extension="laszip"===t.dataType?"laz":"bin",t.srs&&t.srs.authority&&t.srs.horizontal&&(e.crs="".concat(t.srs.authority,":").concat(t.srs.horizontal),i.default.defs(e.crs)||i.default.defs(e.crs,t.srs.wkt),t.srs.vertical&&t.srs.vertical!==t.srs.horizontal&&console.warn("EntwinePointTileSource: Vertical coordinates system code is not yet supported.")),e.spacing=(Math.abs(t.boundsConforming[3]-t.boundsConforming[0])+Math.abs(t.boundsConforming[4]-t.boundsConforming[1]))/(2*t.span),e.boundsConforming=t.boundsConforming,e.span=t.span,(0,w.Z)(e)})),e.fetcher=f.Z.arrayBuffer,e}return(0,T.Z)(a)}(Jr.ZP);const ti=$n;var ei=r(70274),ri=r(99127),ni=r(79003),ii=r.n(ni);const ai={parse:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r=(0,_t._F)(r),t.zip?e=ii().parseZip(t.zip):t.shp&&t.shx&&t.dbf&&(e=Promise.all([ii().parseShp(t.shp,t.prj),ii().parseDbf(t.dbf)]).then(ii().combine)),r.in=r.in||{},r.in.crs=t.prj?(0,i.default)(t.prj).oProj.datumName:r.in.crs,Promise.resolve(e).then((function(t){return Cr.Z.parse(t,r)}))}};var oi=r(49472),si=r(71077),ci=r(14278),li=r(82853),ui=r(97498),hi=r(45571),fi=r(25655),di=r(16916),pi=r(83500),mi=r(24147);function gi(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(this.inverseHierarchy[t]);try{for(l.s();!(c=l.n()).done;){var u=c.value;Object.assign(s,this.getInfoById(u))}}catch(t){l.e(t)}finally{l.f()}}return s}}]),t}();var vi=r(77474),yi="2.41.0"},82853:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>oe,qw:()=>ie,hu:()=>ae,zL:()=>ee,mp:()=>re});var n=r(71002),i=r(99477),a=r(47052),o=r(70885),s=r(88301),c=r(15671),l=r(43144),u=r(79340),h=r(82963),f=r(61120);function d(t,e){if(e===i.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(e===i.TriangleFanDrawMode||e===i.TriangleStripDrawMode){var r=t.getIndex();if(null===r){var n=[],a=t.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),t;for(var o=0;o=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=2.0 are supported."));else{var c=new ot(i,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(var l=0;l=0&&void 0===o[f]&&console.warn('THREE.GLTFLoader: Unknown extension "'+f+'".')}}c.setExtensions(a),c.setPlugins(o),c.parse(r,n)}}},{key:"parseAsync",value:function(t,e){var r=this;return new Promise((function(n,i){r.parse(t,e,n,i)}))}}]),r}(i.Loader);function v(){var t={};return{get:function(e){return t[e]},add:function(e,r){t[e]=r},remove:function(e){delete t[e]},removeAll:function(){t={}}}}var y={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"},b=function(){function t(e){(0,c.Z)(this,t),this.parser=e,this.name=y.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}return(0,l.Z)(t,[{key:"_markDefs",value:function(){for(var t=this.parser,e=this.parser.json.nodes||[],r=0,n=e.length;r=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,i.source,a)}}]),t}(),L=function(){function t(e){(0,c.Z)(this,t),this.parser=e,this.name=y.EXT_TEXTURE_WEBP,this.isSupported=null}return(0,l.Z)(t,[{key:"loadTexture",value:function(t){var e=this.name,r=this.parser,n=r.json,i=n.textures[t];if(!i.extensions||!i.extensions[e])return null;var a=i.extensions[e],o=n.images[a.source],s=r.textureLoader;if(o.uri){var c=r.options.manager.getHandler(o.uri);null!==c&&(s=c)}return this.detectSupport().then((function(i){if(i)return r.loadTextureImage(t,a.source,s);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(t)}))}},{key:"detectSupport",value:function(){return this.isSupported||(this.isSupported=new Promise((function(t){var e=new Image;e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.onload=e.onerror=function(){t(1===e.height)}}))),this.isSupported}}]),t}(),P=function(){function t(e){(0,c.Z)(this,t),this.parser=e,this.name=y.EXT_TEXTURE_AVIF,this.isSupported=null}return(0,l.Z)(t,[{key:"loadTexture",value:function(t){var e=this.name,r=this.parser,n=r.json,i=n.textures[t];if(!i.extensions||!i.extensions[e])return null;var a=i.extensions[e],o=n.images[a.source],s=r.textureLoader;if(o.uri){var c=r.options.manager.getHandler(o.uri);null!==c&&(s=c)}return this.detectSupport().then((function(i){if(i)return r.loadTextureImage(t,a.source,s);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(t)}))}},{key:"detectSupport",value:function(){return this.isSupported||(this.isSupported=new Promise((function(t){var e=new Image;e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",e.onload=e.onerror=function(){t(1===e.height)}}))),this.isSupported}}]),t}(),D=function(){function t(e){(0,c.Z)(this,t),this.name=y.EXT_MESHOPT_COMPRESSION,this.parser=e}return(0,l.Z)(t,[{key:"loadBufferView",value:function(t){var e=this.parser.json,r=e.bufferViews[t];if(r.extensions&&r.extensions[this.name]){var n=r.extensions[this.name],i=this.parser.getDependency("buffer",n.buffer),a=this.parser.options.meshoptDecoder;if(!a||!a.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return i.then((function(t){var e=n.byteOffset||0,r=n.byteLength||0,i=n.count,o=n.byteStride,s=new Uint8Array(t,e,r);return a.decodeGltfBufferAsync?a.decodeGltfBufferAsync(i,o,s,n.mode,n.filter).then((function(t){return t.buffer})):a.ready.then((function(){var t=new ArrayBuffer(i*o);return a.decodeGltfBuffer(new Uint8Array(t),i,o,s,n.mode,n.filter),t}))}))}return null}}]),t}(),U=function(){function t(e){(0,c.Z)(this,t),this.name=y.EXT_MESH_GPU_INSTANCING,this.parser=e}return(0,l.Z)(t,[{key:"createNodeMesh",value:function(t){var e=this,r=this.parser.json,n=r.nodes[t];if(!n.extensions||!n.extensions[this.name]||void 0===n.mesh)return null;var a,o=p(r.meshes[n.mesh].primitives);try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.mode!==j.TRIANGLES&&s.mode!==j.TRIANGLE_STRIP&&s.mode!==j.TRIANGLE_FAN&&void 0!==s.mode)return null}}catch(t){o.e(t)}finally{o.f()}var c=n.extensions[this.name].attributes,l=[],u={},h=function(t){l.push(e.parser.getDependency("accessor",c[t]).then((function(e){return u[t]=e,u[t]})))};for(var f in c)h(f);return l.length<1?null:(l.push(this.parser.createNodeMesh(t)),Promise.all(l).then((function(t){var r,n=t.pop(),a=n.isGroup?n.children:[n],o=t[0].count,s=[],c=p(a);try{for(c.s();!(r=c.n()).done;){for(var l=r.value,h=new i.Matrix4,f=new i.Vector3,d=new i.Quaternion,m=new i.Vector3(1,1,1),g=new i.InstancedMesh(l.geometry,l.material,o),A=0;A0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,c.Z)(this,t),this.json=e,this.extensions={},this.plugins={},this.options=r,this.cache=new v,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};var n=!1,a=!1,o=-1;"undefined"!=typeof navigator&&(n=!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent),o=(a=navigator.userAgent.indexOf("Firefox")>-1)?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||n||a&&o<98?this.textureLoader=new i.TextureLoader(this.options.manager):this.textureLoader=new i.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new i.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}return(0,l.Z)(t,[{key:"setExtensions",value:function(t){this.extensions=t}},{key:"setPlugins",value:function(t){this.plugins=t}},{key:"parse",value:function(t,e){var r=this,n=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll((function(t){return t._markDefs&&t._markDefs()})),Promise.all(this._invokeAll((function(t){return t.beforeRoot&&t.beforeRoot()}))).then((function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])})).then((function(e){var a={scene:e[0][n.scene||0],scenes:e[0],animations:e[1],cameras:e[2],asset:n.asset,parser:r,userData:{}};return $(i,a,n),tt(a,n),Promise.all(r._invokeAll((function(t){return t.afterRoot&&t.afterRoot(a)}))).then((function(){t(a)}))})).catch(e)}},{key:"_markDefs",value:function(){for(var t=this.json.nodes||[],e=this.json.skins||[],r=this.json.meshes||[],n=0,i=e.length;n=2&&o.setY(S,_[E*c+1]),c>=3&&o.setZ(S,_[E*c+2]),c>=4&&o.setW(S,_[E*c+3]),c>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o}))}},{key:"loadTexture",value:function(t){var e=this.json,r=this.options,n=e.textures[t].source,i=e.images[n],a=this.textureLoader;if(i.uri){var o=r.manager.getHandler(i.uri);null!==o&&(a=o)}return this.loadTextureImage(t,n,a)}},{key:"loadTextureImage",value:function(t,e,r){var n=this,a=this.json,o=a.textures[t],s=a.images[e],c=(s.uri||s.bufferView)+":"+o.sampler;if(this.textureCache[c])return this.textureCache[c];var l=this.loadImageSource(e,r).then((function(e){e.flipY=!1,e.name=o.name||s.name||"",""===e.name&&"string"==typeof s.uri&&!1===s.uri.startsWith("data:image/")&&(e.name=s.uri);var r=(a.samplers||{})[o.sampler]||{};return e.magFilter=H[r.magFilter]||i.LinearFilter,e.minFilter=H[r.minFilter]||i.LinearMipmapLinearFilter,e.wrapS=X[r.wrapS]||i.RepeatWrapping,e.wrapT=X[r.wrapT]||i.RepeatWrapping,n.associations.set(e,{textures:t}),e})).catch((function(){return null}));return this.textureCache[c]=l,l}},{key:"loadImageSource",value:function(t,e){var r=this.json,n=this.options;if(void 0!==this.sourceCache[t])return this.sourceCache[t].then((function(t){return t.clone()}));var a=r.images[t],o=self.URL||self.webkitURL,s=a.uri||"",c=!1;if(void 0!==a.bufferView)s=this.getDependency("bufferView",a.bufferView).then((function(t){c=!0;var e=new Blob([t],{type:a.mimeType});return s=o.createObjectURL(e)}));else if(void 0===a.uri)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");var l=Promise.resolve(s).then((function(t){return new Promise((function(r,a){var o=r;!0===e.isImageBitmapLoader&&(o=function(t){var e=new i.Texture(t);e.needsUpdate=!0,r(e)}),e.load(i.LoaderUtils.resolveURL(t,n.path),o,void 0,a)}))})).then((function(t){var e;return!0===c&&o.revokeObjectURL(s),t.userData.mimeType=a.mimeType||((e=a.uri).search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/)?"image/jpeg":e.search(/\.webp($|\?)/i)>0||0===e.search(/^data\:image\/webp/)?"image/webp":"image/png"),t})).catch((function(t){throw console.error("THREE.GLTFLoader: Couldn't load texture",s),t}));return this.sourceCache[t]=l,l}},{key:"assignTexture",value:function(t,e,r,n){var i=this;return this.getDependency("texture",r.index).then((function(a){if(!a)return null;if(void 0!==r.texCoord&&r.texCoord>0&&((a=a.clone()).channel=r.texCoord),i.extensions[y.KHR_TEXTURE_TRANSFORM]){var o=void 0!==r.extensions?r.extensions[y.KHR_TEXTURE_TRANSFORM]:void 0;if(o){var s=i.associations.get(a);a=i.extensions[y.KHR_TEXTURE_TRANSFORM].extendTexture(a,o),i.associations.set(a,s)}}return void 0!==n&&(a.colorSpace=n),t[e]=a,a}))}},{key:"assignFinalMaterial",value:function(t){var e=t.geometry,r=t.material,n=void 0===e.attributes.tangent,a=void 0!==e.attributes.color,o=void 0===e.attributes.normal;if(t.isPoints){var s="PointsMaterial:"+r.uuid,c=this.cache.get(s);c||(c=new i.PointsMaterial,i.Material.prototype.copy.call(c,r),c.color.copy(r.color),c.map=r.map,c.sizeAttenuation=!1,this.cache.add(s,c)),r=c}else if(t.isLine){var l="LineBasicMaterial:"+r.uuid,u=this.cache.get(l);u||(u=new i.LineBasicMaterial,i.Material.prototype.copy.call(u,r),u.color.copy(r.color),u.map=r.map,this.cache.add(l,u)),r=u}if(n||a||o){var h="ClonedMaterial:"+r.uuid+":";n&&(h+="derivative-tangents:"),a&&(h+="vertex-colors:"),o&&(h+="flat-shading:");var f=this.cache.get(h);f||(f=r.clone(),a&&(f.vertexColors=!0),o&&(f.flatShading=!0),n&&(f.normalScale&&(f.normalScale.y*=-1),f.clearcoatNormalScale&&(f.clearcoatNormalScale.y*=-1)),this.cache.add(h,f),this.associations.set(f,this.associations.get(r))),r=f}t.material=r}},{key:"getMaterialType",value:function(){return i.MeshStandardMaterial}},{key:"loadMaterial",value:function(t){var e,r=this,n=this.json,a=this.extensions,o=n.materials[t],s={},c=[];if((o.extensions||{})[y.KHR_MATERIALS_UNLIT]){var l=a[y.KHR_MATERIALS_UNLIT];e=l.getMaterialType(),c.push(l.extendParams(s,o,r))}else{var u=o.pbrMetallicRoughness||{};if(s.color=new i.Color(1,1,1),s.opacity=1,Array.isArray(u.baseColorFactor)){var h=u.baseColorFactor;s.color.setRGB(h[0],h[1],h[2],i.LinearSRGBColorSpace),s.opacity=h[3]}void 0!==u.baseColorTexture&&c.push(r.assignTexture(s,"map",u.baseColorTexture,i.SRGBColorSpace)),s.metalness=void 0!==u.metallicFactor?u.metallicFactor:1,s.roughness=void 0!==u.roughnessFactor?u.roughnessFactor:1,void 0!==u.metallicRoughnessTexture&&(c.push(r.assignTexture(s,"metalnessMap",u.metallicRoughnessTexture)),c.push(r.assignTexture(s,"roughnessMap",u.metallicRoughnessTexture))),e=this._invokeOne((function(e){return e.getMaterialType&&e.getMaterialType(t)})),c.push(Promise.all(this._invokeAll((function(e){return e.extendMaterialParams&&e.extendMaterialParams(t,s)}))))}!0===o.doubleSided&&(s.side=i.DoubleSide);var f=o.alphaMode||"OPAQUE";if("BLEND"===f?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,"MASK"===f&&(s.alphaTest=void 0!==o.alphaCutoff?o.alphaCutoff:.5)),void 0!==o.normalTexture&&e!==i.MeshBasicMaterial&&(c.push(r.assignTexture(s,"normalMap",o.normalTexture)),s.normalScale=new i.Vector2(1,1),void 0!==o.normalTexture.scale)){var d=o.normalTexture.scale;s.normalScale.set(d,d)}if(void 0!==o.occlusionTexture&&e!==i.MeshBasicMaterial&&(c.push(r.assignTexture(s,"aoMap",o.occlusionTexture)),void 0!==o.occlusionTexture.strength&&(s.aoMapIntensity=o.occlusionTexture.strength)),void 0!==o.emissiveFactor&&e!==i.MeshBasicMaterial){var p=o.emissiveFactor;s.emissive=(new i.Color).setRGB(p[0],p[1],p[2],i.LinearSRGBColorSpace)}return void 0!==o.emissiveTexture&&e!==i.MeshBasicMaterial&&c.push(r.assignTexture(s,"emissiveMap",o.emissiveTexture,i.SRGBColorSpace)),Promise.all(c).then((function(){var n=new e(s);return o.name&&(n.name=o.name),tt(n,o),r.associations.set(n,{materials:t}),o.extensions&&$(a,n,o),n}))}},{key:"createUniqueName",value:function(t){var e=i.PropertyBinding.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}},{key:"loadGeometries",value:function(t){var e=this,r=this.extensions,n=this.primitiveCache;function a(t){return r[y.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(t,e).then((function(r){return st(r,t,e)}))}for(var o=[],s=0,c=t.length;s0&&et(m,o),m.name=r.createUniqueName(o.name||"mesh_"+t),tt(m,o),p.extensions&&$(a,m,p),r.assignFinalMaterial(m),l.push(m)}for(var A=0,v=l.length;A1?new i.Group:1===e.length?e[0]:new i.Object3D)!==e[0])for(var c=0,l=e.length;c4&&void 0!==arguments[4]?arguments[4]:i.LinearSRGBColorSpace,o={attributeIDs:r||this.defaultAttributeIDs,attributeTypes:n||this.defaultAttributeTypes,useUniqueIDs:!!r,vertexColorSpace:a};return this.decodeGeometry(t,o).then(e)}},{key:"decodeGeometry",value:function(t,e){var r,n=this,i=JSON.stringify(e);if(ct.has(t)){var a=ct.get(t);if(a.key===i)return a.promise;if(0===t.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}var o=this.workerNextTaskID++,s=t.byteLength,c=this._getWorker(o,s).then((function(n){return r=n,new Promise((function(n,i){r._callbacks[o]={resolve:n,reject:i},r.postMessage({type:"decode",id:o,taskConfig:e,buffer:t},[t])}))})).then((function(t){return n._createGeometry(t.geometry)}));return c.catch((function(){return!0})).then((function(){r&&o&&n._releaseTask(r,o)})),ct.set(t,{key:i,promise:c}),c}},{key:"_createGeometry",value:function(t){var e=new i.BufferGeometry;t.index&&e.setIndex(new i.BufferAttribute(t.index.array,1));for(var r=0;re._taskLoad?-1:1}));var i=r.workerPool[r.workerPool.length-1];return i._taskCosts[t]=e,i._taskLoad+=e,i}))}},{key:"_releaseTask",value:function(t,e){t._taskLoad-=t._taskCosts[e],delete t._callbacks[e],delete t._taskCosts[e]}},{key:"debug",value:function(){console.log("Task load: ",this.workerPool.map((function(t){return t._taskLoad})))}},{key:"dispose",value:function(){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:4;(0,c.Z)(this,t),this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}return(0,l.Z)(t,[{key:"_initWorker",value:function(t){if(!this.workers[t]){var e=this.workerCreator();e.addEventListener("message",this._onMessage.bind(this,t)),this.workers[t]=e}}},{key:"_getIdleWorker",value:function(){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:0,r=this._offset,n=0;this._dataView.getUint8(this._offset)!==e&&n1&&void 0!==arguments[1]?arguments[1]:0;if(!ft)throw new Error("ZSTDDecoder: Await .init() before decoding.");var r=t.byteLength,n=ft.exports.malloc(r);dt.set(t,n),e=e||Number(ft.exports.ZSTD_findDecompressedSize(n,r));var i=ft.exports.malloc(e),a=ft.exports.ZSTD_decompress(i,e,n,r),o=dt.slice(i,i+a);return ft.exports.free(n),ft.exports.free(i),o}}]),t}(),Pt="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgAEEIIAEQFGs2AgQgAg8LIABBADYCBEF/DwsgACABNgIIIAAgAS0AACIDNgIAIAJBfmoiBEEBTQRAIARBAWtFBEAgACABLQACQRB0IANyIgM2AgALIAAgAS0AAUEIdCADajYCAAsgASACakF/ai0AACIBRQRAIABBADYCBEFsDwsgAEEoIAEQFCACQQN0ams2AgQgAgsWACAAIAEpAAA3AAAgACABKQAINwAICy8BAX8gAUECdEGgHWooAgAgACgCAEEgIAEgACgCBGprQR9xdnEhAiAAIAEQASACCyEAIAFCz9bTvtLHq9lCfiAAfEIfiUKHla+vmLbem55/fgsdAQF/IAAoAgggACgCDEYEfyAAKAIEQSBGBUEACwuCBAEDfyACQYDAAE8EQCAAIAEgAhBnIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAkEBSARAIAAhAgwBCyAAQQNxRQRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADTw0BIAJBA3ENAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQNqIQcMAQsLIAcgCGoiByAPSw0EIAVBAmohBQNAIAIgB0kEQCANIAJBAXRqQQA7AQAgAkEBaiECDAELCyAGIA5LQQAgBiAFQQN1aiIHIAxLG0UEQCAHKAAAIAVBB3EiBXYhBAwCCyAEQQJ2IQQLIAYhBwsCfyALQX9qIAQgAEF/anEiBiAAQQF0QX9qIgggCWsiEUkNABogBCAIcSIEQQAgESAEIABIG2shBiALCyEIIA0gAkEBdGogBkF/aiIEOwEAIAlBASAGayAEIAZBAUgbayEJA0AgCSAASARAIABBAXUhACALQX9qIQsMAQsLAn8gByAOS0EAIAcgBSAIaiIFQQN1aiIGIAxLG0UEQCAFQQdxDAELIAUgDCIGIAdrQQN0awshBSACQQFqIQIgBEUhCCAGKAAAIAVBH3F2IQQMAQsLQWwgCUEBRyAFQSBKcg0BGiABIAJBf2o2AgAgBiAFQQdqQQN1aiADawwBC0FQCyEAIApBEGokACAACwkAQQFBBSAAGwsMACAAIAEoAAA2AAALqgMBCn8jAEHwAGsiCiQAIAJBAWohDiAAQQhqIQtBgIAEIAVBf2p0QRB1IQxBACECQQEhBkEBIAV0IglBf2oiDyEIA0AgAiAORkUEQAJAIAEgAkEBdCINai8BACIHQf//A0YEQCALIAhBA3RqIAI2AgQgCEF/aiEIQQEhBwwBCyAGQQAgDCAHQRB0QRB1ShshBgsgCiANaiAHOwEAIAJBAWohAgwBCwsgACAFNgIEIAAgBjYCACAJQQN2IAlBAXZqQQNqIQxBACEAQQAhBkEAIQIDQCAGIA5GBEADQAJAIAAgCUYNACAKIAsgAEEDdGoiASgCBCIGQQF0aiICIAIvAQAiAkEBajsBACABIAUgAhAUayIIOgADIAEgAiAIQf8BcXQgCWs7AQAgASAEIAZBAnQiAmooAgA6AAIgASACIANqKAIANgIEIABBAWohAAwBCwsFIAEgBkEBdGouAQAhDUEAIQcDQCAHIA1ORQRAIAsgAkEDdGogBjYCBANAIAIgDGogD3EiAiAISw0ACyAHQQFqIQcMAQsLIAZBAWohBgwBCwsgCkHwAGokAAsjAEIAIAEQCSAAhUKHla+vmLbem55/fkLj3MqV/M7y9YV/fAsQACAAQn43AwggACABNgIACyQBAX8gAARAIAEoAgQiAgRAIAEoAgggACACEQEADwsgABAmCwsfACAAIAEgAi8BABAINgIAIAEQBBogACACQQRqNgIEC0oBAX9BoCAoAgAiASAAaiIAQX9MBEBBiCBBMDYCAEF/DwsCQCAAPwBBEHRNDQAgABBmDQBBiCBBMDYCAEF/DwtBoCAgADYCACABC9cBAQh/Qbp/IQoCQCACKAIEIgggAigCACIJaiIOIAEgAGtLDQBBbCEKIAkgBCADKAIAIgtrSw0AIAAgCWoiBCACKAIIIgxrIQ0gACABQWBqIg8gCyAJQQAQKSADIAkgC2o2AgACQAJAIAwgBCAFa00EQCANIQUMAQsgDCAEIAZrSw0CIAcgDSAFayIAaiIBIAhqIAdNBEAgBCABIAgQDxoMAgsgBCABQQAgAGsQDyEBIAIgACAIaiIINgIEIAEgAGshBAsgBCAPIAUgCEEBECkLIA4hCgsgCgubAgEBfyMAQYABayINJAAgDSADNgJ8AkAgAkEDSwRAQX8hCQwBCwJAAkACQAJAIAJBAWsOAwADAgELIAZFBEBBuH8hCQwEC0FsIQkgBS0AACICIANLDQMgACAHIAJBAnQiAmooAgAgAiAIaigCABA7IAEgADYCAEEBIQkMAwsgASAJNgIAQQAhCQwCCyAKRQRAQWwhCQwCC0EAIQkgC0UgDEEZSHINAUEIIAR0QQhqIQBBACECA0AgAiAATw0CIAJBQGshAgwAAAsAC0FsIQkgDSANQfwAaiANQfgAaiAFIAYQFSICEAMNACANKAJ4IgMgBEsNACAAIA0gDSgCfCAHIAggAxAYIAEgADYCACACIQkLIA1BgAFqJAAgCQsLACAAIAEgAhALGgsQACAALwAAIAAtAAJBEHRyCy8AAn9BuH8gAUEISQ0AGkFyIAAoAAQiAEF3Sw0AGkG4fyAAQQhqIgAgACABSxsLCwkAIAAgATsAAAsDAAELigYBBX8gACAAKAIAIgVBfnE2AgBBACAAIAVBAXZqQYQgKAIAIgQgAEYbIQECQAJAIAAoAgQiAkUNACACKAIAIgNBAXENACACQQhqIgUgA0EBdkF4aiIDQQggA0EISxtnQR9zQQJ0QYAfaiIDKAIARgRAIAMgAigCDDYCAAsgAigCCCIDBEAgAyACKAIMNgIECyACKAIMIgMEQCADIAIoAgg2AgALIAIgAigCACAAKAIAQX5xajYCAEGEICEAAkACQCABRQ0AIAEgAjYCBCABKAIAIgNBAXENASADQQF2QXhqIgNBCCADQQhLG2dBH3NBAnRBgB9qIgMoAgAgAUEIakYEQCADIAEoAgw2AgALIAEoAggiAwRAIAMgASgCDDYCBAsgASgCDCIDBEAgAyABKAIINgIAQYQgKAIAIQQLIAIgAigCACABKAIAQX5xajYCACABIARGDQAgASABKAIAQQF2akEEaiEACyAAIAI2AgALIAIoAgBBAXZBeGoiAEEIIABBCEsbZ0Efc0ECdEGAH2oiASgCACEAIAEgBTYCACACIAA2AgwgAkEANgIIIABFDQEgACAFNgIADwsCQCABRQ0AIAEoAgAiAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAigCACABQQhqRgRAIAIgASgCDDYCAAsgASgCCCICBEAgAiABKAIMNgIECyABKAIMIgIEQCACIAEoAgg2AgBBhCAoAgAhBAsgACAAKAIAIAEoAgBBfnFqIgI2AgACQCABIARHBEAgASABKAIAQQF2aiAANgIEIAAoAgAhAgwBC0GEICAANgIACyACQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgIoAgAhASACIABBCGoiAjYCACAAIAE2AgwgAEEANgIIIAFFDQEgASACNgIADwsgBUEBdkF4aiIBQQggAUEISxtnQR9zQQJ0QYAfaiICKAIAIQEgAiAAQQhqIgI2AgAgACABNgIMIABBADYCCCABRQ0AIAEgAjYCAAsLDgAgAARAIABBeGoQJQsLgAIBA38CQCAAQQ9qQXhxQYQgKAIAKAIAQQF2ayICEB1Bf0YNAAJAQYQgKAIAIgAoAgAiAUEBcQ0AIAFBAXZBeGoiAUEIIAFBCEsbZ0Efc0ECdEGAH2oiASgCACAAQQhqRgRAIAEgACgCDDYCAAsgACgCCCIBBEAgASAAKAIMNgIECyAAKAIMIgFFDQAgASAAKAIINgIAC0EBIQEgACAAKAIAIAJBAXRqIgI2AgAgAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAygCACECIAMgAEEIaiIDNgIAIAAgAjYCDCAAQQA2AgggAkUNACACIAM2AgALIAELtwIBA38CQAJAIABBASAAGyICEDgiAA0AAkACQEGEICgCACIARQ0AIAAoAgAiA0EBcQ0AIAAgA0EBcjYCACADQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgAgAEEIakYEQCABIAAoAgw2AgALIAAoAggiAQRAIAEgACgCDDYCBAsgACgCDCIBBEAgASAAKAIINgIACyACECchAkEAIQFBhCAoAgAhACACDQEgACAAKAIAQX5xNgIAQQAPCyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqMQAADAMLIAEgBGovAACtQoACfAwCCyABIARqKAAArQwBCyABIARqKQAACyEHIAAgBTYCICAAIAI2AhwgACAHNwMAQQAhAyAAQQA2AhQgACAHIAggBhsiBzcDCCAAIAdCgIAIIAdCgIAIVBs+AhALIAMLWwEBf0G4fyEDIAIQFiICIAFNBH8gACACakF/ai0AACIAQQNxQQJ0QaAeaigCACACaiAAQQZ2IgFBAnRBsB5qKAIAaiAAQSBxIgBFaiABRSAAQQV2cWoFQbh/CwsdACAAKAKQ4gEQWiAAQQA2AqDiASAAQgA3A5DiAQu1AwEFfyMAQZACayIKJABBuH8hBgJAIAVFDQAgBCwAACIIQf8BcSEHAkAgCEF/TARAIAdBgn9qQQF2IgggBU8NAkFsIQYgB0GBf2oiBUGAAk8NAiAEQQFqIQdBACEGA0AgBiAFTwRAIAUhBiAIIQcMAwUgACAGaiAHIAZBAXZqIgQtAABBBHY6AAAgACAGQQFyaiAELQAAQQ9xOgAAIAZBAmohBgwBCwAACwALIAcgBU8NASAAIARBAWogByAKEFMiBhADDQELIAYhBEEAIQYgAUEAQTQQECEJQQAhBQNAIAQgBkcEQCAAIAZqIggtAAAiAUELSwRAQWwhBgwDBSAJIAFBAnRqIgEgASgCAEEBajYCACAGQQFqIQZBASAILQAAdEEBdSAFaiEFDAILAAsLQWwhBiAFRQ0AIAUQFEEBaiIBQQxLDQAgAyABNgIAQQFBASABdCAFayIDEBQiAXQgA0cNACAAIARqIAFBAWoiADoAACAJIABBAnRqIgAgACgCAEEBajYCACAJKAIEIgBBAkkgAEEBcXINACACIARBAWo2AgAgB0EBaiEGCyAKQZACaiQAIAYLxhEBDH8jAEHwAGsiBSQAQWwhCwJAIANBCkkNACACLwAAIQogAi8AAiEJIAIvAAQhByAFQQhqIAQQDgJAIAMgByAJIApqakEGaiIMSQ0AIAUtAAohCCAFQdgAaiACQQZqIgIgChAGIgsQAw0BIAVBQGsgAiAKaiICIAkQBiILEAMNASAFQShqIAIgCWoiAiAHEAYiCxADDQEgBUEQaiACIAdqIAMgDGsQBiILEAMNASAAIAFqIg9BfWohECAEQQRqIQZBASELIAAgAUEDakECdiIDaiIMIANqIgIgA2oiDiEDIAIhBCAMIQcDQCALIAMgEElxBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgCS0AAyELIAcgBiAFQUBrIAgQAkECdGoiCS8BADsAACAFQUBrIAktAAIQASAJLQADIQogBCAGIAVBKGogCBACQQJ0aiIJLwEAOwAAIAVBKGogCS0AAhABIAktAAMhCSADIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgDS0AAyENIAAgC2oiCyAGIAVB2ABqIAgQAkECdGoiAC8BADsAACAFQdgAaiAALQACEAEgAC0AAyEAIAcgCmoiCiAGIAVBQGsgCBACQQJ0aiIHLwEAOwAAIAVBQGsgBy0AAhABIActAAMhByAEIAlqIgkgBiAFQShqIAgQAkECdGoiBC8BADsAACAFQShqIAQtAAIQASAELQADIQQgAyANaiIDIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgACALaiEAIAcgCmohByAEIAlqIQQgAyANLQADaiEDIAVB2ABqEA0gBUFAaxANciAFQShqEA1yIAVBEGoQDXJFIQsMAQsLIAQgDksgByACS3INAEFsIQsgACAMSw0BIAxBfWohCQNAQQAgACAJSSAFQdgAahAEGwRAIAAgBiAFQdgAaiAIEAJBAnRqIgovAQA7AAAgBUHYAGogCi0AAhABIAAgCi0AA2oiACAGIAVB2ABqIAgQAkECdGoiCi8BADsAACAFQdgAaiAKLQACEAEgACAKLQADaiEADAEFIAxBfmohCgNAIAVB2ABqEAQgACAKS3JFBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgACAJLQADaiEADAELCwNAIAAgCk0EQCAAIAYgBUHYAGogCBACQQJ0aiIJLwEAOwAAIAVB2ABqIAktAAIQASAAIAktAANqIQAMAQsLAkAgACAMTw0AIAAgBiAFQdgAaiAIEAIiAEECdGoiDC0AADoAACAMLQADQQFGBEAgBUHYAGogDC0AAhABDAELIAUoAlxBH0sNACAFQdgAaiAGIABBAnRqLQACEAEgBSgCXEEhSQ0AIAVBIDYCXAsgAkF9aiEMA0BBACAHIAxJIAVBQGsQBBsEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiIAIAYgBUFAayAIEAJBAnRqIgcvAQA7AAAgBUFAayAHLQACEAEgACAHLQADaiEHDAEFIAJBfmohDANAIAVBQGsQBCAHIAxLckUEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwNAIAcgDE0EQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwJAIAcgAk8NACAHIAYgBUFAayAIEAIiAEECdGoiAi0AADoAACACLQADQQFGBEAgBUFAayACLQACEAEMAQsgBSgCREEfSw0AIAVBQGsgBiAAQQJ0ai0AAhABIAUoAkRBIUkNACAFQSA2AkQLIA5BfWohAgNAQQAgBCACSSAFQShqEAQbBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2oiACAGIAVBKGogCBACQQJ0aiIELwEAOwAAIAVBKGogBC0AAhABIAAgBC0AA2ohBAwBBSAOQX5qIQIDQCAFQShqEAQgBCACS3JFBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsDQCAEIAJNBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsCQCAEIA5PDQAgBCAGIAVBKGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBKGogAi0AAhABDAELIAUoAixBH0sNACAFQShqIAYgAEECdGotAAIQASAFKAIsQSFJDQAgBUEgNgIsCwNAQQAgAyAQSSAFQRBqEAQbBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2oiACAGIAVBEGogCBACQQJ0aiICLwEAOwAAIAVBEGogAi0AAhABIAAgAi0AA2ohAwwBBSAPQX5qIQIDQCAFQRBqEAQgAyACS3JFBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsDQCADIAJNBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsCQCADIA9PDQAgAyAGIAVBEGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBEGogAi0AAhABDAELIAUoAhRBH0sNACAFQRBqIAYgAEECdGotAAIQASAFKAIUQSFJDQAgBUEgNgIUCyABQWwgBUHYAGoQCiAFQUBrEApxIAVBKGoQCnEgBUEQahAKcRshCwwJCwAACwALAAALAAsAAAsACwAACwALQWwhCwsgBUHwAGokACALC7UEAQ5/IwBBEGsiBiQAIAZBBGogABAOQVQhBQJAIARB3AtJDQAgBi0ABCEHIANB8ARqQQBB7AAQECEIIAdBDEsNACADQdwJaiIJIAggBkEIaiAGQQxqIAEgAhAxIhAQA0UEQCAGKAIMIgQgB0sNASADQdwFaiEPIANBpAVqIREgAEEEaiESIANBqAVqIQEgBCEFA0AgBSICQX9qIQUgCCACQQJ0aigCAEUNAAsgAkEBaiEOQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgASALaiAKNgIAIAVBAWohBSAKIAxqIQoMAQsLIAEgCjYCAEEAIQUgBigCCCELA0AgBSALRkUEQCABIAUgCWotAAAiDEECdGoiDSANKAIAIg1BAWo2AgAgDyANQQF0aiINIAw6AAEgDSAFOgAAIAVBAWohBQwBCwtBACEBIANBADYCqAUgBEF/cyAHaiEJQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgAyALaiABNgIAIAwgBSAJanQgAWohASAFQQFqIQUMAQsLIAcgBEEBaiIBIAJrIgRrQQFqIQgDQEEBIQUgBCAIT0UEQANAIAUgDk9FBEAgBUECdCIJIAMgBEE0bGpqIAMgCWooAgAgBHY2AgAgBUEBaiEFDAELCyAEQQFqIQQMAQsLIBIgByAPIAogESADIAIgARBkIAZBAToABSAGIAc6AAYgACAGKAIENgIACyAQIQULIAZBEGokACAFC8ENAQt/IwBB8ABrIgUkAEFsIQkCQCADQQpJDQAgAi8AACEKIAIvAAIhDCACLwAEIQYgBUEIaiAEEA4CQCADIAYgCiAMampBBmoiDUkNACAFLQAKIQcgBUHYAGogAkEGaiICIAoQBiIJEAMNASAFQUBrIAIgCmoiAiAMEAYiCRADDQEgBUEoaiACIAxqIgIgBhAGIgkQAw0BIAVBEGogAiAGaiADIA1rEAYiCRADDQEgACABaiIOQX1qIQ8gBEEEaiEGQQEhCSAAIAFBA2pBAnYiAmoiCiACaiIMIAJqIg0hAyAMIQQgCiECA0AgCSADIA9JcQRAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAACAGIAVBQGsgBxACQQF0aiIILQAAIQsgBUFAayAILQABEAEgAiALOgAAIAYgBUEoaiAHEAJBAXRqIggtAAAhCyAFQShqIAgtAAEQASAEIAs6AAAgBiAFQRBqIAcQAkEBdGoiCC0AACELIAVBEGogCC0AARABIAMgCzoAACAGIAVB2ABqIAcQAkEBdGoiCC0AACELIAVB2ABqIAgtAAEQASAAIAs6AAEgBiAFQUBrIAcQAkEBdGoiCC0AACELIAVBQGsgCC0AARABIAIgCzoAASAGIAVBKGogBxACQQF0aiIILQAAIQsgBUEoaiAILQABEAEgBCALOgABIAYgBUEQaiAHEAJBAXRqIggtAAAhCyAFQRBqIAgtAAEQASADIAs6AAEgA0ECaiEDIARBAmohBCACQQJqIQIgAEECaiEAIAkgBUHYAGoQDUVxIAVBQGsQDUVxIAVBKGoQDUVxIAVBEGoQDUVxIQkMAQsLIAQgDUsgAiAMS3INAEFsIQkgACAKSw0BIApBfWohCQNAIAVB2ABqEAQgACAJT3JFBEAgBiAFQdgAaiAHEAJBAXRqIggtAAAhCyAFQdgAaiAILQABEAEgACALOgAAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAASAAQQJqIQAMAQsLA0AgBUHYAGoQBCAAIApPckUEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCwNAIAAgCkkEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCyAMQX1qIQADQCAFQUBrEAQgAiAAT3JFBEAgBiAFQUBrIAcQAkEBdGoiCi0AACEJIAVBQGsgCi0AARABIAIgCToAACAGIAVBQGsgBxACQQF0aiIKLQAAIQkgBUFAayAKLQABEAEgAiAJOgABIAJBAmohAgwBCwsDQCAFQUBrEAQgAiAMT3JFBEAgBiAFQUBrIAcQAkEBdGoiAC0AACEKIAVBQGsgAC0AARABIAIgCjoAACACQQFqIQIMAQsLA0AgAiAMSQRAIAYgBUFAayAHEAJBAXRqIgAtAAAhCiAFQUBrIAAtAAEQASACIAo6AAAgAkEBaiECDAELCyANQX1qIQADQCAFQShqEAQgBCAAT3JFBEAgBiAFQShqIAcQAkEBdGoiAi0AACEKIAVBKGogAi0AARABIAQgCjoAACAGIAVBKGogBxACQQF0aiICLQAAIQogBUEoaiACLQABEAEgBCAKOgABIARBAmohBAwBCwsDQCAFQShqEAQgBCANT3JFBEAgBiAFQShqIAcQAkEBdGoiAC0AACECIAVBKGogAC0AARABIAQgAjoAACAEQQFqIQQMAQsLA0AgBCANSQRAIAYgBUEoaiAHEAJBAXRqIgAtAAAhAiAFQShqIAAtAAEQASAEIAI6AAAgBEEBaiEEDAELCwNAIAVBEGoQBCADIA9PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIAYgBUEQaiAHEAJBAXRqIgAtAAAhAiAFQRBqIAAtAAEQASADIAI6AAEgA0ECaiEDDAELCwNAIAVBEGoQBCADIA5PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIANBAWohAwwBCwsDQCADIA5JBEAgBiAFQRBqIAcQAkEBdGoiAC0AACECIAVBEGogAC0AARABIAMgAjoAACADQQFqIQMMAQsLIAFBbCAFQdgAahAKIAVBQGsQCnEgBUEoahAKcSAFQRBqEApxGyEJDAELQWwhCQsgBUHwAGokACAJC8oCAQR/IwBBIGsiBSQAIAUgBBAOIAUtAAIhByAFQQhqIAIgAxAGIgIQA0UEQCAEQQRqIQIgACABaiIDQX1qIQQDQCAFQQhqEAQgACAET3JFBEAgAiAFQQhqIAcQAkEBdGoiBi0AACEIIAVBCGogBi0AARABIAAgCDoAACACIAVBCGogBxACQQF0aiIGLQAAIQggBUEIaiAGLQABEAEgACAIOgABIABBAmohAAwBCwsDQCAFQQhqEAQgACADT3JFBEAgAiAFQQhqIAcQAkEBdGoiBC0AACEGIAVBCGogBC0AARABIAAgBjoAACAAQQFqIQAMAQsLA0AgACADT0UEQCACIAVBCGogBxACQQF0aiIELQAAIQYgBUEIaiAELQABEAEgACAGOgAAIABBAWohAAwBCwsgAUFsIAVBCGoQChshAgsgBUEgaiQAIAILtgMBCX8jAEEQayIGJAAgBkEANgIMIAZBADYCCEFUIQQCQAJAIANBQGsiDCADIAZBCGogBkEMaiABIAIQMSICEAMNACAGQQRqIAAQDiAGKAIMIgcgBi0ABEEBaksNASAAQQRqIQogBkEAOgAFIAYgBzoABiAAIAYoAgQ2AgAgB0EBaiEJQQEhBANAIAQgCUkEQCADIARBAnRqIgEoAgAhACABIAU2AgAgACAEQX9qdCAFaiEFIARBAWohBAwBCwsgB0EBaiEHQQAhBSAGKAIIIQkDQCAFIAlGDQEgAyAFIAxqLQAAIgRBAnRqIgBBASAEdEEBdSILIAAoAgAiAWoiADYCACAHIARrIQhBACEEAkAgC0EDTQRAA0AgBCALRg0CIAogASAEakEBdGoiACAIOgABIAAgBToAACAEQQFqIQQMAAALAAsDQCABIABPDQEgCiABQQF0aiIEIAg6AAEgBCAFOgAAIAQgCDoAAyAEIAU6AAIgBCAIOgAFIAQgBToABCAEIAg6AAcgBCAFOgAGIAFBBGohAQwAAAsACyAFQQFqIQUMAAALAAsgAiEECyAGQRBqJAAgBAutAQECfwJAQYQgKAIAIABHIAAoAgBBAXYiAyABa0F4aiICQXhxQQhHcgR/IAIFIAMQJ0UNASACQQhqC0EQSQ0AIAAgACgCACICQQFxIAAgAWpBD2pBeHEiASAAa0EBdHI2AgAgASAANgIEIAEgASgCAEEBcSAAIAJBAXZqIAFrIgJBAXRyNgIAQYQgIAEgAkH/////B3FqQQRqQYQgKAIAIABGGyABNgIAIAEQJQsLygIBBX8CQAJAAkAgAEEIIABBCEsbZ0EfcyAAaUEBR2oiAUEESSAAIAF2cg0AIAFBAnRB/B5qKAIAIgJFDQADQCACQXhqIgMoAgBBAXZBeGoiBSAATwRAIAIgBUEIIAVBCEsbZ0Efc0ECdEGAH2oiASgCAEYEQCABIAIoAgQ2AgALDAMLIARBHksNASAEQQFqIQQgAigCBCICDQALC0EAIQMgAUEgTw0BA0AgAUECdEGAH2ooAgAiAkUEQCABQR5LIQIgAUEBaiEBIAJFDQEMAwsLIAIgAkF4aiIDKAIAQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgBGBEAgASACKAIENgIACwsgAigCACIBBEAgASACKAIENgIECyACKAIEIgEEQCABIAIoAgA2AgALIAMgAygCAEEBcjYCACADIAAQNwsgAwvhCwINfwV+IwBB8ABrIgckACAHIAAoAvDhASIINgJcIAEgAmohDSAIIAAoAoDiAWohDwJAAkAgBUUEQCABIQQMAQsgACgCxOABIRAgACgCwOABIREgACgCvOABIQ4gAEEBNgKM4QFBACEIA0AgCEEDRwRAIAcgCEECdCICaiAAIAJqQazQAWooAgA2AkQgCEEBaiEIDAELC0FsIQwgB0EYaiADIAQQBhADDQEgB0EsaiAHQRhqIAAoAgAQEyAHQTRqIAdBGGogACgCCBATIAdBPGogB0EYaiAAKAIEEBMgDUFgaiESIAEhBEEAIQwDQCAHKAIwIAcoAixBA3RqKQIAIhRCEIinQf8BcSEIIAcoAkAgBygCPEEDdGopAgAiFUIQiKdB/wFxIQsgBygCOCAHKAI0QQN0aikCACIWQiCIpyEJIBVCIIghFyAUQiCIpyECAkAgFkIQiKdB/wFxIgNBAk8EQAJAIAZFIANBGUlyRQRAIAkgB0EYaiADQSAgBygCHGsiCiAKIANLGyIKEAUgAyAKayIDdGohCSAHQRhqEAQaIANFDQEgB0EYaiADEAUgCWohCQwBCyAHQRhqIAMQBSAJaiEJIAdBGGoQBBoLIAcpAkQhGCAHIAk2AkQgByAYNwNIDAELAkAgA0UEQCACBEAgBygCRCEJDAMLIAcoAkghCQwBCwJAAkAgB0EYakEBEAUgCSACRWpqIgNBA0YEQCAHKAJEQX9qIgMgA0VqIQkMAQsgA0ECdCAHaigCRCIJIAlFaiEJIANBAUYNAQsgByAHKAJINgJMCwsgByAHKAJENgJIIAcgCTYCRAsgF6chAyALBEAgB0EYaiALEAUgA2ohAwsgCCALakEUTwRAIAdBGGoQBBoLIAgEQCAHQRhqIAgQBSACaiECCyAHQRhqEAQaIAcgB0EYaiAUQhiIp0H/AXEQCCAUp0H//wNxajYCLCAHIAdBGGogFUIYiKdB/wFxEAggFadB//8DcWo2AjwgB0EYahAEGiAHIAdBGGogFkIYiKdB/wFxEAggFqdB//8DcWo2AjQgByACNgJgIAcoAlwhCiAHIAk2AmggByADNgJkAkACQAJAIAQgAiADaiILaiASSw0AIAIgCmoiEyAPSw0AIA0gBGsgC0Egak8NAQsgByAHKQNoNwMQIAcgBykDYDcDCCAEIA0gB0EIaiAHQdwAaiAPIA4gESAQEB4hCwwBCyACIARqIQggBCAKEAcgAkERTwRAIARBEGohAgNAIAIgCkEQaiIKEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgAmohAgsgB0EoahAEGiAHIAcoAmggAmoiCSADajYCaCAKIAwgCCAJSxsoAgAhDSAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogB0EoaiAfQhiIp0H/AXEQCCEOIAdB8ABqIARBBHRqIgsgCSANaiAIazYCDCALIAg2AgggCyADNgIEIAsgAjYCACAHIA4gH6dB//8DcWo2AkQgBEEBaiEEDAELCyAEIBdIDQEgEkFgaiEYIAdB4ABqIRogB0HkAGohGyABIQMDQCAHQShqEARBAksgBCAFTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEIIAcoAkggBygCREEDdGopAgAiH0IgiKchCSAeQiCIISAgHUIgiKchDAJAIB9CEIinQf8BcSICQQJPBEACQCAGRSACQRlJckUEQCAJIAdBKGogAkEgIAcoAixrIgogCiACSxsiChAFIAIgCmsiAnRqIQkgB0EoahAEGiACRQ0BIAdBKGogAhAFIAlqIQkMAQsgB0EoaiACEAUgCWohCSAHQShqEAQaCyAHKQJUISEgByAJNgJUIAcgITcDWAwBCwJAIAJFBEAgDARAIAcoAlQhCQwDCyAHKAJYIQkMAQsCQAJAIAdBKGpBARAFIAkgDEVqaiICQQNGBEAgBygCVEF/aiICIAJFaiEJDAELIAJBAnQgB2ooAlQiCSAJRWohCSACQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAk2AlQLICCnIRQgCARAIAdBKGogCBAFIBRqIRQLIAggC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgDGohDAsgB0EoahAEGiAHIAcoAmggDGoiGSAUajYCaCAbIBogCSAZSxsoAgAhHCAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogByAHQShqIB9CGIinQf8BcRAIIB+nQf//A3FqNgJEIAcgB0HwAGogBEEDcUEEdGoiDSkDCCIdNwPIASAHIA0pAwAiHjcDwAECQAJAAkAgBygCvAEiDiAepyICaiIWIBNLDQAgAyAHKALEASIKIAJqIgtqIBhLDQAgEiADayALQSBqTw0BCyAHIAcpA8gBNwMQIAcgBykDwAE3AwggAyASIAdBCGogB0G8AWogEyAPIBUgERAeIQsMAQsgAiADaiEIIAMgDhAHIAJBEU8EQCADQRBqIQIDQCACIA5BEGoiDhAHIAJBEGoiAiAISQ0ACwsgCCAdpyIOayECIAcgFjYCvAEgDiAIIA9rSwRAIA4gCCAVa0sEQEFsIQsMAgsgESACIA9rIgJqIhYgCmogEU0EQCAIIBYgChAPGgwCCyAIIBZBACACaxAPIQggByACIApqIgo2AsQBIAggAmshCCAPIQILIA5BEE8EQCAIIApqIQoDQCAIIAIQByACQRBqIQIgCEEQaiIIIApJDQALDAELAkAgDkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgDkECdCIKQcAeaigCAGoiAhAXIAIgCkHgHmooAgBrIQIgBygCxAEhCgwBCyAIIAIQDAsgCkEJSQ0AIAggCmohCiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAKSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAKSQ0ACwsgCxADBEAgCyEQDAQFIA0gDDYCACANIBkgHGogCWs2AgwgDSAJNgIIIA0gFDYCBCAEQQFqIQQgAyALaiEDDAILAAsLIAQgBUgNASAEIBdrIQtBACEEA0AgCyAFSARAIAcgB0HwAGogC0EDcUEEdGoiAikDCCIdNwPIASAHIAIpAwAiHjcDwAECQAJAAkAgBygCvAEiDCAepyICaiIKIBNLDQAgAyAHKALEASIJIAJqIhBqIBhLDQAgEiADayAQQSBqTw0BCyAHIAcpA8gBNwMgIAcgBykDwAE3AxggAyASIAdBGGogB0G8AWogEyAPIBUgERAeIRAMAQsgAiADaiEIIAMgDBAHIAJBEU8EQCADQRBqIQIDQCACIAxBEGoiDBAHIAJBEGoiAiAISQ0ACwsgCCAdpyIGayECIAcgCjYCvAEgBiAIIA9rSwRAIAYgCCAVa0sEQEFsIRAMAgsgESACIA9rIgJqIgwgCWogEU0EQCAIIAwgCRAPGgwCCyAIIAxBACACaxAPIQggByACIAlqIgk2AsQBIAggAmshCCAPIQILIAZBEE8EQCAIIAlqIQYDQCAIIAIQByACQRBqIQIgCEEQaiIIIAZJDQALDAELAkAgBkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgBkECdCIGQcAeaigCAGoiAhAXIAIgBkHgHmooAgBrIQIgBygCxAEhCQwBCyAIIAIQDAsgCUEJSQ0AIAggCWohBiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAGSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAGSQ0ACwsgEBADDQMgC0EBaiELIAMgEGohAwwBCwsDQCAEQQNHBEAgACAEQQJ0IgJqQazQAWogAiAHaigCVDYCACAEQQFqIQQMAQsLIAcoArwBIQgLQbp/IRAgEyAIayIAIBIgA2tLDQAgAwR/IAMgCCAAEAsgAGoFQQALIAFrIRALIAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqIAQgBCAFaiAGGyIEIAEgAmoiAiAEaxAVIgUQAw0AIAMoAnwiBkEfSw0AIAMoAngiB0EJTw0AIABBiCBqIAMgBkGAC0GADCAHEBggA0E0NgJ8IAMgA0H8AGogA0H4AGogBCAFaiIEIAIgBGsQFSIFEAMNACADKAJ8IgZBNEsNACADKAJ4IgdBCk8NACAAQZAwaiADIAZBgA1B4A4gBxAYIANBIzYCfCADIANB/ABqIANB+ABqIAQgBWoiBCACIARrEBUiBRADDQAgAygCfCIGQSNLDQAgAygCeCIHQQpPDQAgACADIAZBwBBB0BEgBxAYIAQgBWoiBEEMaiIFIAJLDQAgAiAFayEFQQAhAgNAIAJBA0cEQCAEKAAAIgZBf2ogBU8NAiAAIAJBAnRqQZzQAWogBjYCACACQQFqIQIgBEEEaiEEDAELCyAEIAFrIQgLIANBgAFqJAAgCAtGAQN/IABBCGohAyAAKAIEIQJBACEAA0AgACACdkUEQCABIAMgAEEDdGotAAJBFktqIQEgAEEBaiEADAELCyABQQggAmt0C4YDAQV/Qbh/IQcCQCADRQ0AIAItAAAiBEUEQCABQQA2AgBBAUG4fyADQQFGGw8LAn8gAkEBaiIFIARBGHRBGHUiBkF/Sg0AGiAGQX9GBEAgA0EDSA0CIAUvAABBgP4BaiEEIAJBA2oMAQsgA0ECSA0BIAItAAEgBEEIdHJBgIB+aiEEIAJBAmoLIQUgASAENgIAIAVBAWoiASACIANqIgNLDQBBbCEHIABBEGogACAFLQAAIgVBBnZBI0EJIAEgAyABa0HAEEHQEUHwEiAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBmCBqIABBCGogBUEEdkEDcUEfQQggASABIAZqIAgbIgEgAyABa0GAC0GADEGAFyAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBoDBqIABBBGogBUECdkEDcUE0QQkgASABIAZqIAgbIgEgAyABa0GADUHgDkGQGSAAKAKM4QEgACgCnOIBIAQQHyIAEAMNACAAIAFqIAJrIQcLIAcLrQMBCn8jAEGABGsiCCQAAn9BUiACQf8BSw0AGkFUIANBDEsNABogAkEBaiELIABBBGohCUGAgAQgA0F/anRBEHUhCkEAIQJBASEEQQEgA3QiB0F/aiIMIQUDQCACIAtGRQRAAkAgASACQQF0Ig1qLwEAIgZB//8DRgRAIAkgBUECdGogAjoAAiAFQX9qIQVBASEGDAELIARBACAKIAZBEHRBEHVKGyEECyAIIA1qIAY7AQAgAkEBaiECDAELCyAAIAQ7AQIgACADOwEAIAdBA3YgB0EBdmpBA2ohBkEAIQRBACECA0AgBCALRkUEQCABIARBAXRqLgEAIQpBACEAA0AgACAKTkUEQCAJIAJBAnRqIAQ6AAIDQCACIAZqIAxxIgIgBUsNAAsgAEEBaiEADAELCyAEQQFqIQQMAQsLQX8gAg0AGkEAIQIDfyACIAdGBH9BAAUgCCAJIAJBAnRqIgAtAAJBAXRqIgEgAS8BACIBQQFqOwEAIAAgAyABEBRrIgU6AAMgACABIAVB/wFxdCAHazsBACACQQFqIQIMAQsLCyEFIAhBgARqJAAgBQvjBgEIf0FsIQcCQCACQQNJDQACQAJAAkACQCABLQAAIgNBA3EiCUEBaw4DAwEAAgsgACgCiOEBDQBBYg8LIAJBBUkNAkEDIQYgASgAACEFAn8CQAJAIANBAnZBA3EiCEF+aiIEQQFNBEAgBEEBaw0BDAILIAVBDnZB/wdxIQQgBUEEdkH/B3EhAyAIRQwCCyAFQRJ2IQRBBCEGIAVBBHZB//8AcSEDQQAMAQsgBUEEdkH//w9xIgNBgIAISw0DIAEtAARBCnQgBUEWdnIhBEEFIQZBAAshBSAEIAZqIgogAksNAgJAIANBgQZJDQAgACgCnOIBRQ0AQQAhAgNAIAJBg4ABSw0BIAJBQGshAgwAAAsACwJ/IAlBA0YEQCABIAZqIQEgAEHw4gFqIQIgACgCDCEGIAUEQCACIAMgASAEIAYQXwwCCyACIAMgASAEIAYQXQwBCyAAQbjQAWohAiABIAZqIQEgAEHw4gFqIQYgAEGo0ABqIQggBQRAIAggBiADIAEgBCACEF4MAQsgCCAGIAMgASAEIAIQXAsQAw0CIAAgAzYCgOIBIABBATYCiOEBIAAgAEHw4gFqNgLw4QEgCUECRgRAIAAgAEGo0ABqNgIMCyAAIANqIgBBiOMBakIANwAAIABBgOMBakIANwAAIABB+OIBakIANwAAIABB8OIBakIANwAAIAoPCwJ/AkACQAJAIANBAnZBA3FBf2oiBEECSw0AIARBAWsOAgACAQtBASEEIANBA3YMAgtBAiEEIAEvAABBBHYMAQtBAyEEIAEQIUEEdgsiAyAEaiIFQSBqIAJLBEAgBSACSw0CIABB8OIBaiABIARqIAMQCyEBIAAgAzYCgOIBIAAgATYC8OEBIAEgA2oiAEIANwAYIABCADcAECAAQgA3AAggAEIANwAAIAUPCyAAIAM2AoDiASAAIAEgBGo2AvDhASAFDwsCfwJAAkACQCADQQJ2QQNxQX9qIgRBAksNACAEQQFrDgIAAgELQQEhByADQQN2DAILQQIhByABLwAAQQR2DAELIAJBBEkgARAhIgJBj4CAAUtyDQFBAyEHIAJBBHYLIQIgAEHw4gFqIAEgB2otAAAgAkEgahAQIQEgACACNgKA4gEgACABNgLw4QEgB0EBaiEHCyAHC0sAIABC+erQ0OfJoeThADcDICAAQgA3AxggAELP1tO+0ser2UI3AxAgAELW64Lu6v2J9eAANwMIIABCADcDACAAQShqQQBBKBAQGgviAgICfwV+IABBKGoiASAAKAJIaiECAn4gACkDACIDQiBaBEAgACkDECIEQgeJIAApAwgiBUIBiXwgACkDGCIGQgyJfCAAKQMgIgdCEol8IAUQGSAEEBkgBhAZIAcQGQwBCyAAKQMYQsXP2bLx5brqJ3wLIAN8IQMDQCABQQhqIgAgAk0EQEIAIAEpAAAQCSADhUIbiUKHla+vmLbem55/fkLj3MqV/M7y9YV/fCEDIAAhAQwBCwsCQCABQQRqIgAgAksEQCABIQAMAQsgASgAAK1Ch5Wvr5i23puef34gA4VCF4lCz9bTvtLHq9lCfkL5893xmfaZqxZ8IQMLA0AgACACSQRAIAAxAABCxc/ZsvHluuonfiADhUILiUKHla+vmLbem55/fiEDIABBAWohAAwBCwsgA0IhiCADhULP1tO+0ser2UJ+IgNCHYggA4VC+fPd8Zn2masWfiIDQiCIIAOFC+8CAgJ/BH4gACAAKQMAIAKtfDcDAAJAAkAgACgCSCIDIAJqIgRBH00EQCABRQ0BIAAgA2pBKGogASACECAgACgCSCACaiEEDAELIAEgAmohAgJ/IAMEQCAAQShqIgQgA2ogAUEgIANrECAgACAAKQMIIAQpAAAQCTcDCCAAIAApAxAgACkAMBAJNwMQIAAgACkDGCAAKQA4EAk3AxggACAAKQMgIABBQGspAAAQCTcDICAAKAJIIQMgAEEANgJIIAEgA2tBIGohAQsgAUEgaiACTQsEQCACQWBqIQMgACkDICEFIAApAxghBiAAKQMQIQcgACkDCCEIA0AgCCABKQAAEAkhCCAHIAEpAAgQCSEHIAYgASkAEBAJIQYgBSABKQAYEAkhBSABQSBqIgEgA00NAAsgACAFNwMgIAAgBjcDGCAAIAc3AxAgACAINwMICyABIAJPDQEgAEEoaiABIAIgAWsiBBAgCyAAIAQ2AkgLCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQEBogAwVBun8LCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQCxogAwVBun8LC6gCAQZ/IwBBEGsiByQAIABB2OABaikDAEKAgIAQViEIQbh/IQUCQCAEQf//B0sNACAAIAMgBBBCIgUQAyIGDQAgACgCnOIBIQkgACAHQQxqIAMgAyAFaiAGGyIKIARBACAFIAYbayIGEEAiAxADBEAgAyEFDAELIAcoAgwhBCABRQRAQbp/IQUgBEEASg0BCyAGIANrIQUgAyAKaiEDAkAgCQRAIABBADYCnOIBDAELAkACQAJAIARBBUgNACAAQdjgAWopAwBCgICACFgNAAwBCyAAQQA2ApziAQwBCyAAKAIIED8hBiAAQQA2ApziASAGQRRPDQELIAAgASACIAMgBSAEIAgQOSEFDAELIAAgASACIAMgBSAEIAgQOiEFCyAHQRBqJAAgBQtnACAAQdDgAWogASACIAAoAuzhARAuIgEQAwRAIAEPC0G4fyECAkAgAQ0AIABB7OABaigCACIBBEBBYCECIAAoApjiASABRw0BC0EAIQIgAEHw4AFqKAIARQ0AIABBkOEBahBDCyACCycBAX8QVyIERQRAQUAPCyAEIAAgASACIAMgBBBLEE8hACAEEFYgAAs/AQF/AkACQAJAIAAoAqDiAUEBaiIBQQJLDQAgAUEBaw4CAAECCyAAEDBBAA8LIABBADYCoOIBCyAAKAKU4gELvAMCB38BfiMAQRBrIgkkAEG4fyEGAkAgBCgCACIIQQVBCSAAKALs4QEiBRtJDQAgAygCACIHQQFBBSAFGyAFEC8iBRADBEAgBSEGDAELIAggBUEDakkNACAAIAcgBRBJIgYQAw0AIAEgAmohCiAAQZDhAWohCyAIIAVrIQIgBSAHaiEHIAEhBQNAIAcgAiAJECwiBhADDQEgAkF9aiICIAZJBEBBuH8hBgwCCyAJKAIAIghBAksEQEFsIQYMAgsgB0EDaiEHAn8CQAJAAkAgCEEBaw4CAgABCyAAIAUgCiAFayAHIAYQSAwCCyAFIAogBWsgByAGEEcMAQsgBSAKIAVrIActAAAgCSgCCBBGCyIIEAMEQCAIIQYMAgsgACgC8OABBEAgCyAFIAgQRQsgAiAGayECIAYgB2ohByAFIAhqIQUgCSgCBEUNAAsgACkD0OABIgxCf1IEQEFsIQYgDCAFIAFrrFINAQsgACgC8OABBEBBaiEGIAJBBEkNASALEEQhDCAHKAAAIAynRw0BIAdBBGohByACQXxqIQILIAMgBzYCACAEIAI2AgAgBSABayEGCyAJQRBqJAAgBgsuACAAECsCf0EAQQAQAw0AGiABRSACRXJFBEBBYiAAIAEgAhA9EAMNARoLQQALCzcAIAEEQCAAIAAoAsTgASABKAIEIAEoAghqRzYCnOIBCyAAECtBABADIAFFckUEQCAAIAEQWwsL0QIBB38jAEEQayIGJAAgBiAENgIIIAYgAzYCDCAFBEAgBSgCBCEKIAUoAgghCQsgASEIAkACQANAIAAoAuzhARAWIQsCQANAIAQgC0kNASADKAAAQXBxQdDUtMIBRgRAIAMgBBAiIgcQAw0EIAQgB2shBCADIAdqIQMMAQsLIAYgAzYCDCAGIAQ2AggCQCAFBEAgACAFEE5BACEHQQAQA0UNAQwFCyAAIAogCRBNIgcQAw0ECyAAIAgQUCAMQQFHQQAgACAIIAIgBkEMaiAGQQhqEEwiByIDa0EAIAMQAxtBCkdyRQRAQbh/IQcMBAsgBxADDQMgAiAHayECIAcgCGohCEEBIQwgBigCDCEDIAYoAgghBAwBCwsgBiADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEEdCAAbiECCyAAQQh2IgEgAkEYbCIAQYwIaigCAGwgAEGICGooAgBqIgJBA3YgAmogAEGACGooAgAgAEGECGooAgAgAWxqSQs3ACAAIAMgBCAFQYAQEDMiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQMgVBuH8LC78DAQN/IwBBIGsiBSQAIAVBCGogAiADEAYiAhADRQRAIAAgAWoiB0F9aiEGIAUgBBAOIARBBGohAiAFLQACIQMDQEEAIAAgBkkgBUEIahAEGwRAIAAgAiAFQQhqIAMQAkECdGoiBC8BADsAACAFQQhqIAQtAAIQASAAIAQtAANqIgQgAiAFQQhqIAMQAkECdGoiAC8BADsAACAFQQhqIAAtAAIQASAEIAAtAANqIQAMAQUgB0F+aiEEA0AgBUEIahAEIAAgBEtyRQRAIAAgAiAFQQhqIAMQAkECdGoiBi8BADsAACAFQQhqIAYtAAIQASAAIAYtAANqIQAMAQsLA0AgACAES0UEQCAAIAIgBUEIaiADEAJBAnRqIgYvAQA7AAAgBUEIaiAGLQACEAEgACAGLQADaiEADAELCwJAIAAgB08NACAAIAIgBUEIaiADEAIiA0ECdGoiAC0AADoAACAALQADQQFGBEAgBUEIaiAALQACEAEMAQsgBSgCDEEfSw0AIAVBCGogAiADQQJ0ai0AAhABIAUoAgxBIUkNACAFQSA2AgwLIAFBbCAFQQhqEAobIQILCwsgBUEgaiQAIAILkgIBBH8jAEFAaiIJJAAgCSADQTQQCyEDAkAgBEECSA0AIAMgBEECdGooAgAhCSADQTxqIAgQIyADQQE6AD8gAyACOgA+QQAhBCADKAI8IQoDQCAEIAlGDQEgACAEQQJ0aiAKNgEAIARBAWohBAwAAAsAC0EAIQkDQCAGIAlGRQRAIAMgBSAJQQF0aiIKLQABIgtBAnRqIgwoAgAhBCADQTxqIAotAABBCHQgCGpB//8DcRAjIANBAjoAPyADIAcgC2siCiACajoAPiAEQQEgASAKa3RqIQogAygCPCELA0AgACAEQQJ0aiALNgEAIARBAWoiBCAKSQ0ACyAMIAo2AgAgCUEBaiEJDAELCyADQUBrJAALowIBCX8jAEHQAGsiCSQAIAlBEGogBUE0EAsaIAcgBmshDyAHIAFrIRADQAJAIAMgCkcEQEEBIAEgByACIApBAXRqIgYtAAEiDGsiCGsiC3QhDSAGLQAAIQ4gCUEQaiAMQQJ0aiIMKAIAIQYgCyAPTwRAIAAgBkECdGogCyAIIAUgCEE0bGogCCAQaiIIQQEgCEEBShsiCCACIAQgCEECdGooAgAiCEEBdGogAyAIayAHIA4QYyAGIA1qIQgMAgsgCUEMaiAOECMgCUEBOgAPIAkgCDoADiAGIA1qIQggCSgCDCELA0AgBiAITw0CIAAgBkECdGogCzYBACAGQQFqIQYMAAALAAsgCUHQAGokAA8LIAwgCDYCACAKQQFqIQoMAAALAAs0ACAAIAMgBCAFEDYiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQNAVBuH8LCyMAIAA/AEEQdGtB//8DakEQdkAAQX9GBEBBAA8LQQAQAEEBCzsBAX8gAgRAA0AgACABIAJBgCAgAkGAIEkbIgMQCyEAIAFBgCBqIQEgAEGAIGohACACIANrIgINAAsLCwYAIAAQAwsLqBUJAEGICAsNAQAAAAEAAAACAAAAAgBBoAgLswYBAAAAAQAAAAIAAAACAAAAJgAAAIIAAAAhBQAASgAAAGcIAAAmAAAAwAEAAIAAAABJBQAASgAAAL4IAAApAAAALAIAAIAAAABJBQAASgAAAL4IAAAvAAAAygIAAIAAAACKBQAASgAAAIQJAAA1AAAAcwMAAIAAAACdBQAASgAAAKAJAAA9AAAAgQMAAIAAAADrBQAASwAAAD4KAABEAAAAngMAAIAAAABNBgAASwAAAKoKAABLAAAAswMAAIAAAADBBgAATQAAAB8NAABNAAAAUwQAAIAAAAAjCAAAUQAAAKYPAABUAAAAmQQAAIAAAABLCQAAVwAAALESAABYAAAA2gQAAIAAAABvCQAAXQAAACMUAABUAAAARQUAAIAAAABUCgAAagAAAIwUAABqAAAArwUAAIAAAAB2CQAAfAAAAE4QAAB8AAAA0gIAAIAAAABjBwAAkQAAAJAHAACSAAAAAAAAAAEAAAABAAAABQAAAA0AAAAdAAAAPQAAAH0AAAD9AAAA/QEAAP0DAAD9BwAA/Q8AAP0fAAD9PwAA/X8AAP3/AAD9/wEA/f8DAP3/BwD9/w8A/f8fAP3/PwD9/38A/f//AP3//wH9//8D/f//B/3//w/9//8f/f//P/3//38AAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAAAZAAAAGgAAABsAAAAcAAAAHQAAAB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACUAAAAnAAAAKQAAACsAAAAvAAAAMwAAADsAAABDAAAAUwAAAGMAAACDAAAAAwEAAAMCAAADBAAAAwgAAAMQAAADIAAAA0AAAAOAAAADAAEAQeAPC1EBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAQcQQC4sBAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABIAAAAUAAAAFgAAABgAAAAcAAAAIAAAACgAAAAwAAAAQAAAAIAAAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAQAAAAIAAAAAAAQBBkBIL5gQBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAAAEAAAAEAAAACAAAAAAAAAABAAEBBgAAAAAAAAQAAAAAEAAABAAAAAAgAAAFAQAAAAAAAAUDAAAAAAAABQQAAAAAAAAFBgAAAAAAAAUHAAAAAAAABQkAAAAAAAAFCgAAAAAAAAUMAAAAAAAABg4AAAAAAAEFEAAAAAAAAQUUAAAAAAABBRYAAAAAAAIFHAAAAAAAAwUgAAAAAAAEBTAAAAAgAAYFQAAAAAAABwWAAAAAAAAIBgABAAAAAAoGAAQAAAAADAYAEAAAIAAABAAAAAAAAAAEAQAAAAAAAAUCAAAAIAAABQQAAAAAAAAFBQAAACAAAAUHAAAAAAAABQgAAAAgAAAFCgAAAAAAAAULAAAAAAAABg0AAAAgAAEFEAAAAAAAAQUSAAAAIAABBRYAAAAAAAIFGAAAACAAAwUgAAAAAAADBSgAAAAAAAYEQAAAABAABgRAAAAAIAAHBYAAAAAAAAkGAAIAAAAACwYACAAAMAAABAAAAAAQAAAEAQAAACAAAAUCAAAAIAAABQMAAAAgAAAFBQAAACAAAAUGAAAAIAAABQgAAAAgAAAFCQAAACAAAAULAAAAIAAABQwAAAAAAAAGDwAAACAAAQUSAAAAIAABBRQAAAAgAAIFGAAAACAAAgUcAAAAIAADBSgAAAAgAAQFMAAAAAAAEAYAAAEAAAAPBgCAAAAAAA4GAEAAAAAADQYAIABBgBcLhwIBAAEBBQAAAAAAAAUAAAAAAAAGBD0AAAAAAAkF/QEAAAAADwX9fwAAAAAVBf3/HwAAAAMFBQAAAAAABwR9AAAAAAAMBf0PAAAAABIF/f8DAAAAFwX9/38AAAAFBR0AAAAAAAgE/QAAAAAADgX9PwAAAAAUBf3/DwAAAAIFAQAAABAABwR9AAAAAAALBf0HAAAAABEF/f8BAAAAFgX9/z8AAAAEBQ0AAAAQAAgE/QAAAAAADQX9HwAAAAATBf3/BwAAAAEFAQAAABAABgQ9AAAAAAAKBf0DAAAAABAF/f8AAAAAHAX9//8PAAAbBf3//wcAABoF/f//AwAAGQX9//8BAAAYBf3//wBBkBkLhgQBAAEBBgAAAAAAAAYDAAAAAAAABAQAAAAgAAAFBQAAAAAAAAUGAAAAAAAABQgAAAAAAAAFCQAAAAAAAAULAAAAAAAABg0AAAAAAAAGEAAAAAAAAAYTAAAAAAAABhYAAAAAAAAGGQAAAAAAAAYcAAAAAAAABh8AAAAAAAAGIgAAAAAAAQYlAAAAAAABBikAAAAAAAIGLwAAAAAAAwY7AAAAAAAEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ";var Dt,Ut=new WeakMap,Ot=0,Ft=function(t){(0,u.Z)(s,t);var e,r,n,a=(r=s,n=function(){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(t){return!1}}(),function(){var t,e=(0,f.Z)(r);if(n){var i=(0,f.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,h.Z)(this,t)});function s(t){var e;return(0,c.Z)(this,s),(e=a.call(this,t)).transcoderPath="",e.transcoderBinary=null,e.transcoderPending=null,e.workerPool=new vt,e.workerSourceURL="",e.workerConfig=null,"undefined"!=typeof MSC_TRANSCODER&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.'),e}return(0,l.Z)(s,[{key:"setTranscoderPath",value:function(t){return this.transcoderPath=t,this}},{key:"setWorkerLimit",value:function(t){return this.workerPool.setWorkerLimit(t),this}},{key:"detectSupport",value:function(t){return!0===t.isWebGPURenderer?this.workerConfig={astcSupported:t.hasFeature("texture-compression-astc"),etc1Supported:!1,etc2Supported:t.hasFeature("texture-compression-etc2"),dxtSupported:t.hasFeature("texture-compression-bc"),bptcSupported:!1,pvrtcSupported:!1}:(this.workerConfig={astcSupported:t.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:t.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:t.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:t.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:t.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:t.extensions.has("WEBGL_compressed_texture_pvrtc")||t.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},t.capabilities.isWebGL2&&(this.workerConfig.etc1Supported=!1)),this}},{key:"init",value:function(){var t=this;if(!this.transcoderPending){var e=new i.FileLoader(this.manager);e.setPath(this.transcoderPath),e.setWithCredentials(this.withCredentials);var r=e.loadAsync("basis_transcoder.js"),n=new i.FileLoader(this.manager);n.setPath(this.transcoderPath),n.setResponseType("arraybuffer"),n.setWithCredentials(this.withCredentials);var a=n.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([r,a]).then((function(e){var r=(0,o.Z)(e,2),n=r[0],i=r[1],a=s.BasisWorker.toString(),c=["/* constants */","let _EngineFormat = "+JSON.stringify(s.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(s.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(s.BasisFormat),"/* basis_transcoder.js */",n,"/* worker */",a.substring(a.indexOf("{")+1,a.lastIndexOf("}"))].join("\n");t.workerSourceURL=URL.createObjectURL(new Blob([c])),t.transcoderBinary=i,t.workerPool.setWorkerCreator((function(){var e=new Worker(t.workerSourceURL),r=t.transcoderBinary.slice(0);return e.postMessage({type:"init",config:t.workerConfig,transcoderBinary:r},[r]),e}))})),Ot>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),Ot++}return this.transcoderPending}},{key:"load",value:function(t,e,r,n){var a=this;if(null===this.workerConfig)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");var o=new i.FileLoader(this.manager);o.setResponseType("arraybuffer"),o.setWithCredentials(this.withCredentials),o.load(t,(function(t){if(Ut.has(t))return Ut.get(t).promise.then(e).catch(n);a._createTexture(t).then((function(t){return e?e(t):null})).catch(n)}),r,n)}},{key:"_createTextureFrom",value:function(t,e){var r,n=t.faces,a=t.width,o=t.height,s=t.format,c=t.type,l=t.error,u=t.dfdFlags;if("error"===c)return Promise.reject(l);if(6===e.faceCount)r=new i.CompressedCubeTexture(n,s,i.UnsignedByteType);else{var h=n[0].mipmaps;r=e.layerCount>1?new i.CompressedArrayTexture(h,a,o,e.layerCount,s,i.UnsignedByteType):new i.CompressedTexture(h,a,o,s,i.UnsignedByteType)}return r.minFilter=1===n[0].mipmaps.length?i.LinearFilter:i.LinearMipmapLinearFilter,r.magFilter=i.LinearFilter,r.generateMipmaps=!1,r.needsUpdate=!0,r.colorSpace=Qt(e),r.premultiplyAlpha=!!(1&u),r}},{key:"_createTexture",value:(e=(0,mt.Z)(At().mark((function t(e){var r,n,i,a,o=this,s=arguments;return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=s.length>1&&void 0!==s[1]?s[1]:{},0===(n=It(new Uint8Array(e))).vkFormat){t.next=4;break}return t.abrupt("return",Zt(n));case 4:return i=r,a=this.init().then((function(){return o.workerPool.postMessage({type:"transcode",buffer:e,taskConfig:i},[e])})).then((function(t){return o._createTextureFrom(t.data,n)})),Ut.set(e,{promise:a}),t.abrupt("return",a);case 8:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"dispose",value:function(){return this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),Ot--,this}}]),s}(i.Loader);Ft.BasisFormat={ETC1S:0,UASTC_4x4:1},Ft.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},Ft.EngineFormat={RGBAFormat:i.RGBAFormat,RGBA_ASTC_4x4_Format:i.RGBA_ASTC_4x4_Format,RGBA_BPTC_Format:i.RGBA_BPTC_Format,RGBA_ETC2_EAC_Format:i.RGBA_ETC2_EAC_Format,RGBA_PVRTC_4BPPV1_Format:i.RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT5_Format:i.RGBA_S3TC_DXT5_Format,RGB_ETC1_Format:i.RGB_ETC1_Format,RGB_ETC2_Format:i.RGB_ETC2_Format,RGB_PVRTC_4BPPV1_Format:i.RGB_PVRTC_4BPPV1_Format,RGB_S3TC_DXT1_Format:i.RGB_S3TC_DXT1_Format},Ft.BasisWorker=function(){var t,e,r,n=_EngineFormat,i=_TranscoderFormat,a=_BasisFormat;self.addEventListener("message",(function(o){var h,f=o.data;switch(f.type){case"init":t=f.config,h=f.transcoderBinary,e=new Promise((function(t){r={wasmBinary:h,onRuntimeInitialized:t},BASIS(r)})).then((function(){r.initializeBasis(),void 0===r.KTX2File&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")}));break;case"transcode":e.then((function(){try{var e=function(e){var o=new r.KTX2File(new Uint8Array(e));function h(){o.close(),o.delete()}if(!o.isValid())throw h(),new Error("THREE.KTX2Loader:\tInvalid or unsupported .ktx2 file");var f=o.isUASTC()?a.UASTC_4x4:a.ETC1S,d=o.getWidth(),p=o.getHeight(),m=o.getLayers()||1,g=o.getLevels(),A=o.getFaces(),v=o.getHasAlpha(),y=o.getDFDFlags(),b=function(e,r,o,u){for(var h=e===a.ETC1S?s:c,f=0;f1?(I=k.origWidth,R=k.origHeight):(I=k.width,R=k.height);var L=new Uint8Array(o.getImageTranscodedSizeInBytes(C,B,0,x));if(!o.transcodeImage(L,C,B,M,x,0,-1,-1))throw h(),new Error("THREE.KTX2Loader: .transcodeImage failed.");T.push(L)}var P=u(T);S.push({data:P,width:I,height:R}),E.push(P.buffer)}_.push({mipmaps:S,width:d,height:p,format:w})}return h(),{faces:_,buffers:E,width:d,height:p,hasAlpha:v,format:w,dfdFlags:y}}(f.buffer),o=e.faces,h=e.buffers,d=e.width,p=e.height,m=e.hasAlpha,g=e.format,A=e.dfdFlags;self.postMessage({type:"transcode",id:f.id,faces:o,width:d,height:p,hasAlpha:m,format:g,dfdFlags:A},h)}catch(t){console.error(t),self.postMessage({type:"error",id:f.id,error:t.message})}}))}}));var o=[{if:"astcSupported",basisFormat:[a.UASTC_4x4],transcoderFormat:[i.ASTC_4x4,i.ASTC_4x4],engineFormat:[n.RGBA_ASTC_4x4_Format,n.RGBA_ASTC_4x4_Format],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[a.ETC1S,a.UASTC_4x4],transcoderFormat:[i.BC7_M5,i.BC7_M5],engineFormat:[n.RGBA_BPTC_Format,n.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[a.ETC1S,a.UASTC_4x4],transcoderFormat:[i.BC1,i.BC3],engineFormat:[n.RGB_S3TC_DXT1_Format,n.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[a.ETC1S,a.UASTC_4x4],transcoderFormat:[i.ETC1,i.ETC2],engineFormat:[n.RGB_ETC2_Format,n.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[a.ETC1S,a.UASTC_4x4],transcoderFormat:[i.ETC1],engineFormat:[n.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[a.ETC1S,a.UASTC_4x4],transcoderFormat:[i.PVRTC1_4_RGB,i.PVRTC1_4_RGBA],engineFormat:[n.RGB_PVRTC_4BPPV1_Format,n.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0}],s=o.sort((function(t,e){return t.priorityETC1S-e.priorityETC1S})),c=o.sort((function(t,e){return t.priorityUASTC-e.priorityUASTC}));function l(t){return t<=2||0==(t&t-1)&&0!==t}function u(t){if(1===t.length)return t[0];for(var e=0,r=0;r>o),c=Math.max(1,e.pixelHeight>>o),l=e.pixelDepth?Math.max(1,e.pixelDepth>>o):0,u=e.levels[o],h=void 0,e.supercompressionScheme!==yt){t.next=20;break}h=u.levelData,t.next=25;break;case 20:if(e.supercompressionScheme!==bt){t.next=24;break}h=n.decode(u.levelData,u.uncompressedByteLength),t.next=25;break;case 24:throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");case 25:void 0,f=Gt[r]===i.FloatType?new Float32Array(h.buffer,h.byteOffset,h.byteLength/Float32Array.BYTES_PER_ELEMENT):Gt[r]===i.HalfFloatType?new Uint16Array(h.buffer,h.byteOffset,h.byteLength/Uint16Array.BYTES_PER_ELEMENT):h,a.push({data:f,width:s,height:c,depth:l});case 28:o++,t.next=10;break;case 31:if(!Nt.has(zt[r])){t.next=35;break}d=0===e.pixelDepth?new i.DataTexture(a[0].data,e.pixelWidth,e.pixelHeight):new i.Data3DTexture(a[0].data,e.pixelWidth,e.pixelHeight,e.pixelDepth),t.next=38;break;case 35:if(!(e.pixelDepth>0)){t.next=37;break}throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");case 37:d=new i.CompressedTexture(a,e.pixelWidth,e.pixelHeight);case 38:return d.mipmaps=a,d.type=Gt[r],d.format=zt[r],d.colorSpace=Qt(e),d.needsUpdate=!0,t.abrupt("return",Promise.resolve(d));case 44:case"end":return t.stop()}}),t)}))),Vt.apply(this,arguments)}function Qt(t){var e=t.dataFormatDescriptor[0];return e.colorPrimaries===_t?e.transferFunction===xt?i.SRGBColorSpace:i.LinearSRGBColorSpace:e.colorPrimaries===Et?e.transferFunction===xt?i.DisplayP3ColorSpace:i.LinearDisplayP3ColorSpace:(e.colorPrimaries===wt||console.warn('THREE.KTX2Loader: Unsupported color primaries, "'.concat(e.colorPrimaries,'"')),i.NoColorSpace)}var jt={};jt.LegacyGLTFLoader=function(){var t=function(t){(0,u.Z)(p,t);var e,r,s=(e=p,r=function(){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(t){return!1}}(),function(){var t,n=(0,f.Z)(e);if(r){var i=(0,f.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,h.Z)(this,t)});function p(t){return(0,c.Z)(this,p),s.call(this,t)}return(0,l.Z)(p,[{key:"load",value:function(t,e,r,n){var a,o=this;a=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:i.LoaderUtils.extractUrlBase(t);var s=new i.FileLoader(o.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.load(t,(function(t){o.parse(t,a,e)}),r,n)}},{key:"parse",value:function(t,e,r){var s,c={};i.LoaderUtils.decodeText(new Uint8Array(t,0,4))===o.magic?(c[n.KHR_BINARY_GLTF]=new d(t),s=c[n.KHR_BINARY_GLTF].content):s=i.LoaderUtils.decodeText(new Uint8Array(t));var l=JSON.parse(s);l.extensionsUsed&&l.extensionsUsed.indexOf(n.KHR_MATERIALS_COMMON)>=0&&(c[n.KHR_MATERIALS_COMMON]=new a(l)),new k(l,c,{crossOrigin:this.crossOrigin,manager:this.manager,path:e||this.resourcePath||""}).parse((function(t,e,n,i){r({scene:t,scenes:e,cameras:n,animations:i})}))}}]),p}(i.Loader);function e(){var t={};return{get:function(e){return t[e]},add:function(e,r){t[e]=r},remove:function(e){delete t[e]},removeAll:function(){t={}},update:function(e,r){for(var n in t){var i=t[n];i.update&&i.update(e,r)}}}}function r(t,e){var r={},n=t.material.uniforms;for(var a in n){var o=n[a];if(o.semantic){var s=o.node,c=t;s&&(c=e[s]),r[a]={semantic:o.semantic,sourceNode:c,targetNode:t,uniform:o}}}this.boundUniforms=r,this._m4=new i.Matrix4}t.Shaders={update:function(){console.warn("threeExamples.LegacyGLTFLoader.Shaders has been deprecated, and now updates automatically.")}},r.prototype.update=function(t,e){var r=this.boundUniforms;for(var n in r){var i=r[n];switch(i.semantic){case"MODELVIEW":i.uniform.value.multiplyMatrices(e.matrixWorldInverse,i.sourceNode.matrixWorld);break;case"MODELVIEWINVERSETRANSPOSE":var a=i.uniform.value;this._m4.multiplyMatrices(e.matrixWorldInverse,i.sourceNode.matrixWorld),a.getNormalMatrix(this._m4);break;case"PROJECTION":i.uniform.value.copy(e.projectionMatrix);break;case"JOINTMATRIX":for(var o=i.uniform.value,s=0;st.length)&&(e=t.length);for(var r=0,n=new Array(e);r0){var p=u,m=t.slice(p,l.FTJSONLength+p),g=Xt.Z.decode(new Uint8Array(m));(f=JSON.parse(g)).RTC_CENTER?d.fromArray(f.RTC_CENTER):d.set(0,0,0)}if(l.FTBinaryLength>0&&console.warn("3D Tiles feature table binary not supported yet."),l.BTJSONLength>0){var A=u+l.FTJSONLength+l.FTBinaryLength,v=t.slice(A,A+l.BTJSONLength+l.BTBinaryLength);h.push(Promise.resolve(new qt.Z(v,l.BTJSONLength,l.BTBinaryLength,f.BATCH_LENGTH,e.registeredExtensions)))}else h.push(Promise.resolve(new qt.Z));var y=u+l.FTJSONLength+l.FTBinaryLength+l.BTJSONLength+l.BTBinaryLength,b=t.slice(y),x=new DataView(b,0,20);return h.push(new Promise((function(t){var s=function(o){var s,c=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Kt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(o.scenes);try{for(c.s();!(s=c.n()).done;)s.value.traverse(ne)}catch(t){c.e(t)}finally{c.f()}void 0===r||"Y"===r?o.scene.applyMatrix4($t):"X"===r&&o.scene.applyMatrix4(te),o.scene.position.copy(d);var l=new Uint8Array(b,20,x.getUint32(12,!0)),u=Xt.Z.decode(new Uint8Array(l)),h=JSON.parse(u);h.extensions&&h.extensions.CESIUM_RTC&&(o.scene.position.fromArray(h.extensions.CESIUM_RTC.center),o.scene.updateMatrixWorld(!0)),o.scene.traverse((function(t){if(t.frustumCulled=!1,t.material){if(e.overrideMaterials){var r=t.material;"object"===(0,n.Z)(e.overrideMaterials)&&e.overrideMaterials.isMaterial?t.material=e.overrideMaterials:t.material=new i.MeshBasicMaterial,(0,Jt.Z)(r)}else a.Z.isLogDepthBufferSupported()&&t.material.isRawShaderMaterial&&!e.doNotPatchMaterial&&(Ht.Z.patchMaterialForLogDepthSupport(t.material),console.warn("b3dm shader has been patched to add log depth buffer support"));(0,Yt.Z)(t.material,e.layer)}})),t(o)};1===x.getUint32(4,!0)?re.parse(b,o,s):ee.parse(b,o,s)}))),Promise.all(h).then((function(t){return{gltf:t[1],batchTable:t[0]}}))}throw new Error("Invalid b3dm file.")}}},71077:(t,e,r)=>{"use strict";r.d(e,{S:()=>c,Z:()=>l});var n=r(99477),i=r(67503),a=r(99128),o=r(14278);function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{in:{}},l=t.split("\n"),u=l.indexOf(l.find((function(t){return t.includes("end_of_head")})))+1,h=l.slice(0,u),f={minX:c(h,"longlimit_west"),maxX:c(h,"longlimit_east"),minY:c(h,"latlimit_south"),maxY:c(h,"latlimit_north"),stepX:c(h,"gridstep"),stepY:c(h,"gridstep"),nRows:c(h,"latitude_parallels"),nColumns:c(h,"longitude_parallels")},d=new DataView(new ArrayBuffer(o.h8*f.nRows*f.nColumns)),p=0,m=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){c=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(c)throw a}}}}(l.slice(u,l.length));try{for(m.s();!(e=m.n()).done;){var g=e.value;(g=g.split(" ").filter((function(t){return""!==t}))).length&&(d.setFloat64(p*o.h8,parseFloat(g[2])),p++)}}catch(t){m.e(t)}finally{m.f()}var A=new a.ZP(r.in.crs||"EPSG:4326",f.minX,f.maxX,f.minY,f.maxY),v=new n.Vector2(f.stepX,f.stepY);return Promise.resolve(new i.Z(A,v,(function(t,e){return d.getFloat64((f.nColumns*(f.nRows-t-1)+e)*o.h8)})))}}},14278:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>s,h8:()=>o});var n=r(99477),i=r(67503),a=r(99128),o=8;const s={parse:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{in:{}},r=e.in.dataType||"float";if(!["float","double"].includes(r))throw new Error("`dataType` parameter is incorrect for GTXParser.parse method. This parameter must be either `double` or `float`.");var s=new DataView(t,0,40),c={minX:s.getFloat64(8),minY:s.getFloat64(0),stepX:s.getFloat64(24),stepY:s.getFloat64(16),nColumns:s.getInt32(36),nRows:s.getInt32(32)},l=new DataView(t,40),u=c.minX+c.stepX*(c.nColumns-1),h=c.minY+c.stepY*(c.nRows-1),f=new a.ZP(e.in.crs||"EPSG:4326",c.minX,u,c.minY,h),d=new n.Vector2(c.stepX,c.stepY);return Promise.resolve(new i.Z(f,d,(function(t,e){return"float"===r?l.getFloat32(4*(c.nColumns*t+e)):"double"===r?l.getFloat64((c.nColumns*t+e)*o):void 0})))}}},97400:(t,e,r)=>{"use strict";r.d(e,{Z:()=>A});var n=r(60145),i=r(94596),a=r(86896);function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){c=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(c)throw a}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{};(e=(0,a._F)(e)).in=e.in||{};var r=e.out,n=e.in;switch("string"==typeof t&&(t=JSON.parse(t)),n.crs=n.crs||function(t){if(t.crs){if("epsg"==t.crs.type.toLowerCase())return"EPSG:".concat(t.crs.properties.code);if("name"==t.crs.type.toLowerCase()){if(t.crs.properties.name.toLowerCase().includes("epsg:")){var e=t.crs.properties.name.lastIndexOf(":");if(e>0)return"EPSG:".concat(t.crs.properties.name.substr(e+1))}throw new Error("Unsupported CRS authority '".concat(t.crs.properties.name,"'"))}throw new Error("Unsupported CRS type '".concat(t.crs,"'"))}return"EPSG:4326"}(t),r.filteringExtent&&("boolean"==typeof r.filteringExtent?r.filterExtent=t.extent.as(n.crs):r.filteringExtent.isExtent&&(r.filterExtent=r.filteringExtent)),t.type.toLowerCase()){case"featurecollection":return Promise.resolve(g(n.crs,t.features,r));case"feature":return Promise.resolve(g(n.crs,[t],r));default:throw new Error("Unsupported GeoJSON type: '".concat(t.type))}}}},70274:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(75153),i=r(97400),a=r(86896);const o={parse:function(t,e){return e=(0,a._F)(e),i.Z.parse((0,n.ng)(t),e)}}},49472:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var n=r(99477),i=r(67503),a=r(99128),o=r(71077),s=r(14278);function c(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{in:{}},l=t.split("\n"),u=l.indexOf(l.find((function(t){return t.includes("end_of_head")})))+1,h=l.slice(0,u),f={minX:(0,o.S)(h,"lon min"),maxX:(0,o.S)(h,"lon max"),minY:(0,o.S)(h,"lat min"),maxY:(0,o.S)(h,"lat max"),stepX:(0,o.S)(h,"delta lon"),stepY:(0,o.S)(h,"delta lat"),nRows:(0,o.S)(h,"nrows"),nColumns:(0,o.S)(h,"ncols")},d=new DataView(new ArrayBuffer(s.h8*f.nRows*f.nColumns)),p=0,m=c(l.slice(u,l.length));try{for(m.s();!(e=m.n()).done;){var g=e.value;if(g=g.split(" ").filter((function(t){return""!==t})),g.length){var A,v=c(g);try{for(v.s();!(A=v.n()).done;){var y=A.value;d.setFloat64(p*s.h8,parseFloat(y)),p++}}catch(t){v.e(t)}finally{v.f()}}}}catch(t){m.e(t)}finally{m.f()}var b=new a.ZP(r.in.crs||"EPSG:4326",f.minX+f.stepX/2,f.maxX-f.stepX/2,f.minY+f.stepY/2,f.maxY-f.stepY/2),x=new n.Vector2(f.stepX,f.stepY);return Promise.resolve(new i.Z(b,x,(function(t,e){return d.getFloat64((f.nColumns*t+e)*s.h8)})))}}},99127:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(75153),i=r(97400),a=r(86896);const o={parse:function(t,e){return e=(0,a._F)(e),i.Z.parse((0,n.DS)(t),e)}}},77474:(t,e,r)=>{"use strict";r.d(e,{SR:()=>v,SY:()=>m,Ti:()=>x,Y0:()=>w,y:()=>d});var n=r(42982),i=r(99477),a=r(1857),o=r(24147),s=r(24266);function c(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:0,i=e.additiveRefinement||r>0,o=0;othis.cleanupDelay){this.root.cleanableSince=void 0;for(var e=0;ethis.cleanupDelay))break;p(this,r)}this._cleanableTiles.splice(0,e)}return[this.root]}var g=new i.Box3,A=new i.Sphere;function v(t,e,r,n){return u(t,e,r,n,void 0,!0).then((function(t){r.object3d.add(t),t.updateMatrixWorld(),r.tileset.tiles[t.tileId].loaded=!0,r.root=t,r.onTileContentLoaded(t)}))}function y(t,e){t.content&&(t.content.visible=e)}function b(t,e){e.cleanableSince||(e.cleanableSince=Date.now(),t._cleanableTiles.push(e))}function x(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w;return function(r,n,i){if(!i.parent.pendingSubdivision||i.parent.additiveRefinement){var a=!t||!t(n,r.camera,i,i.matrixWorld);if(i.visible=a,a){var o;if(i.cleanableSince&&(n._cleanableTiles.splice(n._cleanableTiles.indexOf(i),1),i.cleanableSince=void 0),i.pendingSubdivision||e(r,n,i))(function(t,e,r,n){r.additiveRefinement?function(t,e,r,n){var i,a=c(e.tileset.tiles[r.tileId].children);try{var o=function(){var a=i.value;if(a.promise||a.loaded)return"continue";var o=r.matrixWorld;if(a.transform&&(o=f.multiplyMatrices(r.matrixWorld,a.transform)),n&&n(e,t.camera,a,o))return"continue";a.promise=u(t.view,t.scheduler,e,a,r,!0).then((function(n){r.add(n),n.updateMatrixWorld(),e.onTileContentLoaded(n),t.view.notifyChange(a),a.loaded=!0,delete a.promise}))};for(a.s();!(i=a.n()).done;)o()}catch(t){a.e(t)}finally{a.f()}}(t,e,r,n):function(t,e,r){if(!r.pendingSubdivision&&0==h(r).length){var n=e.tileset.tiles[r.tileId].children;if(void 0===n||0===n.length)return;r.pendingSubdivision=!0;for(var i=[],a=function(a){i.push(u(t.view,t.scheduler,e,n[a],r,!1).then((function(i){n[a].loaded=!0,r.add(i),i.updateMatrixWorld(),r.additiveRefinement&&t.view.notifyChange(r),e.tileset.tiles[i.tileId].loaded=!0,e.onTileContentLoaded(i)})))},o=0;oe.sseThreshold}},75963:(t,e,r)=>{"use strict";r.d(e,{U8:()=>h,XP:()=>l,kE:()=>o,pN:()=>u});var n=r(54919),i=r(52872),a=r(13324),o=Math.pow(131072,.5);function s(t){return!(t.requester.parent&&t.requester.material&&!(t.layer.isElevationLayer&&t.requester.material.getElevationLayer()&&t.targetLevel<=t.requester.material.getElevationLayer().level)&&t.requester.layerUpdateState[t.layer.id]&&t.layer.source._featuresCaches[t.layer.crs]&&t.requester.material.visible)}function c(t,e,r,n,i){return{view:t,layer:e,extentsSource:r,extentsDestination:n,requester:i,priority:(a=i.material,a.visible?100:10),earlyDropFunction:s};var a}function l(t,e,r,o){var s=r.material;if(o&&s){var l=r.getExtentsByProjection(e.crs),u=l[0].zoom;if(!(u>e.zoom.max||u=e.source.zoom.min)return void t.view.notifyChange(r,!1)}if(s.visible&&e.visible&&r.layerUpdateState[e.id].canTryUpdate())if(h.level>=l[0].zoom)r.layerUpdateState[e.id].noMoreUpdatePossible();else if(!e.frozen){var p=r.layerUpdateState[e.id].failureParams,m=l[0].zoom||r.level,g=(0,n.k5)(e.updateStrategy.type,r,m,h.level,e,p);if(!(!e.source.isVectorSource&&g<=h.level||g>m)){if(!e.source.extentInsideLimit(r.extent,g))return r.layerUpdateState[e.id].noData({targetLevel:g}),void t.view.notifyChange(r,!1);var A=l.map((function(t){return t.tiledExtentParent(g)}));r.layerUpdateState[e.id].newTry();var v=c(t.view,e,A,l,r);return t.scheduler.execute(v).then((function(t){if(r.layerUpdateState[e.id]){var n=l.map((function(e,r){return e.offsetToParent(t[r].extent,h.offsetScales[r])}));h.setTextures(t,n),r.layerUpdateState[e.id].success()}}),(function(n){return(0,a.Z)(n,r,e,g,t.view)}))}p.lowestLevelError!=1/0&&r.layerUpdateState[e.id].noMoreUpdatePossible()}}}}function u(t,e,r,o){var s=r.material;if(o&&s){var l=r.getExtentsByProjection(e.crs),u=l[0].zoom;if(!(u>e.zoom.max||u=e.source.zoom.min)return void t.view.notifyChange(r,!1)}if(!e.frozen&&s.visible&&r.layerUpdateState[e.id].canTryUpdate()){var p=r.layerUpdateState[e.id].failureParams,m=(0,n.k5)(e.updateStrategy.type,r,l[0].zoom,h.level,e,p);if(!(m<=h.level||m>l[0].zoom)){if(!e.source.extentInsideLimit(r.extent,m))return r.layerUpdateState[e.id].noData({targetLevel:m}),void t.view.notifyChange(r,!1);var g=l.map((function(t){return t.tiledExtentParent(m)}));r.layerUpdateState[e.id].newTry();var A=c(t.view,e,g,l,r);return t.scheduler.execute(A).then((function(t){if(r.layerUpdateState[e.id])if(m<=h.level)r.layerUpdateState[e.id].noMoreUpdatePossible();else{var n=l.map((function(e,r){return e.offsetToParent(t[r].extent,h.offsetScales[r])}));h.setTextures(t,n),r.layerUpdateState[e.id].success()}}),(function(n){return(0,a.Z)(n,r,e,m,t.view)}))}r.layerUpdateState[e.id].noMoreUpdatePossible()}}}}function h(t){return function(e){var r;null!==(r=e.material)&&void 0!==r&&r.removeLayer&&(e.material.removeLayer(t),e.material.elevationLayerIds[0]==t&&e.setBBoxZ({min:0,max:0})),e.layerUpdateState&&e.layerUpdateState[t]&&delete e.layerUpdateState[t]}}},1857:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(42982);function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 o,s=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){c=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r{"use strict";r.d(e,{Z:()=>i});var n=4;function i(t,e,r,i,a){if(e.layerUpdateState[r.id])if(t.isCancelledCommandException)e.layerUpdateState[r.id].success();else if(t instanceof SyntaxError)e.layerUpdateState[r.id].failure(0,!0);else{var o=e.layerUpdateState[r.id].errorCount>n;e.layerUpdateState[r.id].failure(Date.now(),o,{targetLevel:i}),o||window.setTimeout((function(){a.notifyChange(e,!1)}),1e3*e.layerUpdateState[r.id].secondsUntilNextTry())}}},33347:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var n=r(99477);function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 o,s=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){c=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{}).then((function(t){return c(t),t.arrayBuffer()}))};const u={text:function(t){return fetch(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).then((function(t){return c(t),t.text()}))},json:function(t){return fetch(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).then((function(t){return c(t),t.json()}))},xml:function(t){return fetch(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).then((function(t){return c(t),t.text()})).then((function(t){return(new window.DOMParser).parseFromString(t,"text/xml")}))},texture:function(t){var e,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o.crossOrigin=n.crossOrigin;var i=new Promise((function(t,n){e=t,r=n}));return o.load(t,e,(function(){}),r),i},arrayBuffer:l,textureFloat:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(t,e).then((function(t){var r=function(t){if(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]){var e=new n.DataTexture(t,s,s,n.RedFormat,n.FloatType);return e.internalFormat="R32F",e.needsUpdate=!0,e}return new n.DataTexture(t,s,s,n.AlphaFormat,n.FloatType)}(new Float32Array(t),e.isWebGL2);return r}))},multiple:function(t,e){var r,n=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=[];for(var s in e){if(!this[s])throw new Error("".concat(s," is not a valid Fetcher method."));var c,l=i(e[s]);try{var u=function(){var e=c.value;r="".concat(t,".").concat(e),o.push(n[s](r,a).then((function(t){return{type:e,result:t}})))};for(l.s();!(c=l.n()).done;)u()}catch(t){l.e(t)}finally{l.f()}}return Promise.all(o).then((function(t){var e,r={},n=i(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;r[a.type]=a.result}}catch(t){n.e(t)}finally{n.f()}return Promise.resolve(r)}))}}},13012:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=new(r(99128).ZP)("EPSG:4326",[0,0,0,0]),i=0;function a(t){var e=/\$\{u:([\w-_.|]+)\}/.exec(t);if(!e)return t;var r=e[1].split("|");return t.replace(e[0],r[i++%r.length])}const o={subDomains:a,xyz:function(t,e){return a(e.url.replace(/(\$\{z\}|%TILEMATRIX)/,e.tileMatrixCallback(t.zoom)).replace(/(\$\{y\}|%ROW)/,t.row).replace(/(\$\{x\}|%COL)/,t.col))},bbox:function(t,e){var r="EPSG:4326"==e.crs?9:2;t.as(e.crs,n);var i=n.west.toFixed(r),o=n.south.toFixed(r),s=n.east.toFixed(r),c=n.north.toFixed(r),l=e.axisOrder||"wsen";return l=l.replace("w","".concat(i,",")).replace("s","".concat(o,",")).replace("e","".concat(s,",")).replace("n","".concat(c,",")).slice(0,-1),a(e.url.replace("%bbox",l))}}},800:(t,e,r)=>{"use strict";r.d(e,{P:()=>h,Z:()=>y});var n=r(15671),i=r(43144),a=r(86033),o=r(13092),s=r(99477),c=r(60145),l=r(79295);function u(t,e,r){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,r)}var h={PERSPECTIVE:0,ORTHOGRAPHIC:1},f={frustum:new s.Frustum,matrix:new s.Matrix4,box3:new s.Box3},d=new s.Box3(new s.Vector3(-1,-1,-1),new s.Vector3(1,1,1));function p(t,e,r){if(t.camera3D.isOrthographicCamera)t._preSSE=e;else{var n=s.MathUtils.degToRad(r);t._preSSE=e/(2*Math.tan(.5*n))}}var m=new WeakMap,g=new WeakMap,A=function(){function t(e,r,i){var a,o=this,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if((0,n.Z)(this,t),u(this,m,{writable:!0,value:!0}),u(this,g,{writable:!0,value:new s.Matrix4}),this.crs=e,c.isCamera)console.warn("options.camera parameter is deprecated. Use options.camera.cameraThree to place a custom camera as a parameter. See the documentation of Camera."),this.camera3D=c;else if(c.cameraThree)this.camera3D=c.cameraThree;else switch(c.type){case h.ORTHOGRAPHIC:this.camera3D=new s.OrthographicCamera;break;case h.PERSPECTIVE:default:this.camera3D=new s.PerspectiveCamera(30)}if(this.camera3D.aspect=null!==(a=this.camera3D.aspect)&&void 0!==a?a:1,this.width=r,this.height=i,this.resize(r,i),this._preSSE=1/0,this.camera3D.isPerspectiveCamera){var l=this.camera3D.fov;Object.defineProperty(this.camera3D,"fov",{get:function(){return l},set:function(t){l=t,p(o,o.height,l)}})}}return(0,i.Z)(t,[{key:"resize",value:function(t,e){if(!t||t<=0||!e||e<=0)console.warn("Trying to resize the Camera with invalid height (".concat(e,") or width (").concat(t,"). Skipping resize."));else{var r=t/e;if(this.camera3D.aspect!==r){if(this.camera3D.isOrthographicCamera){this.camera3D.zoom*=this.width/t;var n=this.camera3D.top*this.camera3D.aspect/r;this.camera3D.bottom=-n,this.camera3D.top=n}else this.camera3D.isPerspectiveCamera&&(this.camera3D.fov=2*s.MathUtils.radToDeg(Math.atan(e/this.height*Math.tan(s.MathUtils.degToRad(this.camera3D.fov)/2))));this.camera3D.aspect=r}this.width=t,this.height=e,p(this,this.height,this.camera3D.fov),this.camera3D.updateProjectionMatrix&&(this.camera3D.updateProjectionMatrix(),(0,o.Z)(this,m,!0))}}},{key:"update",value:function(){this.camera3D.updateMatrixWorld(),(0,o.Z)(this,m,!0)}},{key:"position",value:function(t){return new c.Z(this.crs,this.camera3D.position).as(t||this.crs)}},{key:"setPosition",value:function(t){this.camera3D.position.copy(t.as(this.crs))}},{key:"isBox3Visible",value:function(t,e){return this.box3SizeOnScreen(t,e).intersectsBox(d)}},{key:"isSphereVisible",value:function(t,e){return(0,a.Z)(this,m)&&((0,a.Z)(this,g).multiplyMatrices(this.camera3D.projectionMatrix,this.camera3D.matrixWorldInverse),(0,o.Z)(this,m,!1)),e?(f.matrix.multiplyMatrices((0,a.Z)(this,g),e),f.frustum.setFromProjectionMatrix(f.matrix)):f.frustum.setFromProjectionMatrix((0,a.Z)(this,g)),f.frustum.intersectsSphere(t)}},{key:"box3SizeOnScreen",value:function(t,e){var r=function(t,e,r){var n=t.camera3D.matrixWorldInverse;r&&(n=f.matrix.multiplyMatrices(t.camera3D.matrixWorldInverse,r)),v[0].set(e.min.x,e.min.y,e.min.z).applyMatrix4(n),v[1].set(e.min.x,e.min.y,e.max.z).applyMatrix4(n),v[2].set(e.min.x,e.max.y,e.min.z).applyMatrix4(n),v[3].set(e.min.x,e.max.y,e.max.z).applyMatrix4(n),v[4].set(e.max.x,e.min.y,e.min.z).applyMatrix4(n),v[5].set(e.max.x,e.min.y,e.max.z).applyMatrix4(n),v[6].set(e.max.x,e.max.y,e.min.z).applyMatrix4(n),v[7].set(e.max.x,e.max.y,e.max.z).applyMatrix4(n);for(var i=!1,a=0;a<8;a++)v[a].z<=-t.camera3D.near?i=!0:v[a].z=-t.camera3D.near;return i?v:void 0}(this,t,e);if(!r)return f.box3.makeEmpty();for(var n=0;n<8;n++)r[n].applyMatrix4(this.camera3D.projectionMatrix);return f.box3.setFromPoints(r)}},{key:"adjustAltitudeToAvoidCollisionWithLayer",value:function(t,e,r){var n=t.camera.position().as("EPSG:4326");if(void 0!==e){var i=l.Z.getElevationValueAt(e,n);void 0!==i&&n.altitude-(i+r)<0&&(n.altitude=i+r,t.camera3D.position.copy(n.as(t.referenceCrs)),t.notifyChange(this.camera3D))}}}]),t}(),v=[new s.Vector3,new s.Vector3,new s.Vector3,new s.Vector3,new s.Vector3,new s.Vector3,new s.Vector3,new s.Vector3];const y=A},12276:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s,i:()=>o});var n=r(66165);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}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 o,s=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){c=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw o}}}}(t.level0Nodes);try{for(s.s();!(r=s.n()).done;)r.value.traverse(o)}catch(t){s.e(t)}finally{s.f()}}var o="layers-order-changed";const s={moveLayerUp:function(t,e){var r=t.getLayers((function(t){return t.isColorLayer})),i=t.getLayerById(e);if(!i)throw new Error("".concat(e," isn't color layer"));var s=n.M.getColorLayersIdOrderedBySequence(r);n.M.moveLayerUp(i,r),a(t.tileLayer,r),t.dispatchEvent({type:o,previous:{sequence:s},new:{sequence:n.M.getColorLayersIdOrderedBySequence(r)}}),t.notifyChange(t.tileLayer)},moveLayerDown:function(t,e){var r=t.getLayers((function(t){return t.isColorLayer})),i=t.getLayerById(e);if(!i)throw new Error("".concat(e," isn't color layer"));var s=n.M.getColorLayersIdOrderedBySequence(r);n.M.moveLayerDown(i,r),a(t.tileLayer,r),t.dispatchEvent({type:o,previous:{sequence:s},new:{sequence:n.M.getColorLayersIdOrderedBySequence(r)}}),t.notifyChange(t.tileLayer)},moveLayerToIndex:function(t,e,r){var i=t.getLayers((function(t){return t.isColorLayer})),s=t.getLayerById(e);if(!s)throw new Error("".concat(e," isn't color layer"));var c=n.M.getColorLayersIdOrderedBySequence(i);n.M.moveLayerToIndex(s,r,i),a(t.tileLayer,i),t.dispatchEvent({type:o,previous:{sequence:c},new:{sequence:n.M.getColorLayersIdOrderedBySequence(i)}}),t.notifyChange(t.tileLayer)}}},96586:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(99477);const i={setDefineMapping:function(t,e,r){Object.keys(r).forEach((function(n){t.defines["".concat(e,"_").concat(n)]=r[n]}))},setDefineProperty:function(t,e,r,n){t.defines[r]=n,Object.defineProperty(t,e,{get:function(){return t.defines[r]},set:function(e){t.defines[r]!=e&&(t.defines[r]=e,t.needsUpdate=!0)}})},setUniformProperty:function(t,e,r){t.uniforms[e]=new n.Uniform(r),Object.defineProperty(t,e,{get:function(){return t.uniforms[e].value},set:function(r){t.uniforms[e].value!=r&&(t.uniforms[e].value=r)}})}}},6755:(t,e,r)=>{"use strict";r.d(e,{R:()=>c,Z:()=>u});var n=r(15671),i=r(43144),a=r(99477),o=r(10268),s=new a.Frustum,c=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:12,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;(0,n.Z)(this,t),this.x=e,this.y=r,this.grid=[],this.visible=[],this.resize(),this.reset(),this.width=i,this.height=a}return(0,i.Z)(t,[{key:"reset",value:function(){for(var t=0;t0&&this.grid[a][o].some((function(e){return r=e.boundaries,n=t.boundaries,!(r.left>n.right||r.rightn.bottom||r.bottom{"use strict";r.d(e,{On:()=>x,ZP:()=>k,dn:()=>E,pO:()=>M,zQ:()=>I});var n=r(15671),i=r(43144),a=r(97326),o=r(79340),s=r(82963),c=r(61120),l=r(13092),u=r(86033),h=r(99477),f=r(77567),d=r(47052),p=r(32475),m=r(96586);function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(e);try{for(l.s();!(n=l.n()).done;){var u=n.value;u.textureOffset=c;for(var h=0,f=u.textures.length;hr&&console.warn("LayeredMaterial: Not enough texture units (".concat(r," < ").concat(c,"), excess textures have been discarded.")),s.value=c;for(var d=c;d0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;return(0,n.Z)(this,y),t=g.call(this,o),e=(0,a.Z)(t),i={writable:!0,value:!0},function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,r=B),r.set(e,i),T=T||[_,E()],t.defines.NUM_VS_TEXTURES=T[0],t.defines.NUM_FS_TEXTURES=T[1],t.defines.USE_FOG=1,t.defines.NUM_CRS=s,m.Z.setDefineMapping((0,a.Z)(t),"ELEVATION",I),m.Z.setDefineMapping((0,a.Z)(t),"MODE",p.Z.MODES),m.Z.setDefineProperty((0,a.Z)(t),"mode","MODE",p.Z.MODES.FINAL),d.Z.isLogDepthBufferSupported()&&(t.defines.USE_LOGDEPTHBUF=1,t.defines.USE_LOGDEPTHBUF_EXT=1),t.vertexShader="#include \n#include \n#include \n#include \n#include \n#include \nattribute vec2 uv_0;\n#if NUM_CRS > 1\nattribute float uv_1;\n#endif\nattribute vec3 normal;\n\nuniform mat4 modelMatrix;\nuniform bool lightingEnabled;\nvarying vec2 vHighPrecisionZW;\n\n#if MODE == MODE_FINAL\n#include \nvarying vec3 vUv;\nvarying vec3 vNormal;\n#endif\nvoid main() {\n vec2 uv = vec2(uv_0.x, 1.0 - uv_0.y);\n\n #include \n #include \n #include \n #include \n #include \n vHighPrecisionZW = gl_Position.zw;\n#if MODE == MODE_FINAL\n #include \n #if NUM_CRS > 1\n vUv = vec3(uv_0, (uv_1 > 0.) ? uv_1 : uv_0.y); // set uv_1 = uv_0 if uv_1 is undefined\n #else\n vUv = vec3(uv_0, 0.0);\n #endif\n vNormal = normalize ( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n#endif\n}\n",R[s]=R[s]||f.Z.unrollLoops("#include \n#include \n#include \n#include \n#include \n#if MODE == MODE_FINAL\n#include \n#include \n#include \n#endif\n#include \n\nuniform vec3 diffuse;\nuniform float opacity;\nvarying vec3 vUv; // uv_0.x/uv_1.x, uv_0.y, uv_1.y\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n #include \n\n#if MODE == MODE_ID\n\n #include \n\n#elif MODE == MODE_DEPTH\n\n #include \n\n#else\n\n gl_FragColor = vec4(diffuse, opacity);\n\n uvs[0] = vec3(vUv.xy, 0.);\n\n#if NUM_CRS > 1\n uvs[1] = vec3(vUv.x, fract(vUv.z), floor(vUv.z));\n#endif\n\n vec4 color;\n #pragma unroll_loop\n for ( int i = 0; i < NUM_FS_TEXTURES; i ++ ) {\n color = getLayerColor( i , colorTextures[ i ], colorOffsetScales[ i ], colorLayers[ i ]);\n gl_FragColor.rgb = mix(gl_FragColor.rgb, color.rgb, color.a);\n }\n\n #if defined(DEBUG)\n if (showOutline) {\n #pragma unroll_loop\n for ( int i = 0; i < NUM_CRS; i ++) {\n color = getOutlineColor( outlineColors[ i ], uvs[ i ].xy);\n gl_FragColor.rgb = mix(gl_FragColor.rgb, color.rgb, color.a);\n }\n }\n #endif\n\n #include \n #include \n #include \n\n#endif\n}\n",t.defines),t.fragmentShader=R[s],m.Z.setUniformProperty((0,a.Z)(t),"diffuse",new h.Color(.04,.23,.35)),m.Z.setUniformProperty((0,a.Z)(t),"opacity",t.opacity),m.Z.setUniformProperty((0,a.Z)(t),"lightingEnabled",!1),m.Z.setUniformProperty((0,a.Z)(t),"lightPosition",new h.Vector3(-.5,0,1)),m.Z.setUniformProperty((0,a.Z)(t),"fogDistance",1e9),m.Z.setUniformProperty((0,a.Z)(t),"fogColor",new h.Color(.76,.85,1)),m.Z.setUniformProperty((0,a.Z)(t),"overlayAlpha",0),m.Z.setUniformProperty((0,a.Z)(t),"overlayColor",new h.Color(1,.3,0)),m.Z.setUniformProperty((0,a.Z)(t),"objectId",0),m.Z.setUniformProperty((0,a.Z)(t),"geoidHeight",0),m.Z.setUniformProperty((0,a.Z)(t),"minBorderDistance",-.01),t.layers=[],t.elevationLayerIds=[],t.colorLayerIds=[],t.uniforms.elevationLayers=new h.Uniform(new Array(T[0]).fill(S)),t.uniforms.elevationTextures=new h.Uniform(new Array(T[0]).fill(v)),t.uniforms.elevationOffsetScales=new h.Uniform(new Array(T[0]).fill(A)),t.uniforms.elevationTextureCount=new h.Uniform(0),t.uniforms.colorLayers=new h.Uniform(new Array(T[1]).fill(S)),t.uniforms.colorTextures=new h.Uniform(new Array(T[1]).fill(v)),t.uniforms.colorOffsetScales=new h.Uniform(new Array(T[1]).fill(A)),t.uniforms.colorTextureCount=new h.Uniform(0),Object.defineProperty((0,a.Z)(t),"visible",{get:function(){return(0,u.Z)(this,B)},set:function(t){(0,u.Z)(this,B)!=t&&((0,l.Z)(this,B,t),this.dispatchEvent({type:t?"shown":"hidden"}))}}),t}return(0,i.Z)(y,[{key:"onBeforeCompile",value:function(t,e){e.capabilities.isWebGL2&&(this.defines.WEBGL2=!0,t.glslVersion="300 es")}},{key:"getUniformByType",value:function(t){return{layers:this.uniforms["".concat(t,"Layers")],textures:this.uniforms["".concat(t,"Textures")],offsetScales:this.uniforms["".concat(t,"OffsetScales")],textureCount:this.uniforms["".concat(t,"TextureCount")]}}},{key:"updateLayersUniforms",value:function(){var t=this,e=this.layers.filter((function(e){return t.colorLayerIds.includes(e.id)&&e.visible&&e.opacity>0}));if(e.sort((function(e,r){return t.colorLayerIds.indexOf(e.id)-t.colorLayerIds.indexOf(r.id)})),C(this.getUniformByType("color"),e,this.defines.NUM_FS_TEXTURES),this.elevationLayerIds.some((function(e){return t.getLayer(e)}))||this.uniforms.elevationTextureCount.value&&!this.elevationLayerIds.length){var r=this.getElevationLayer()?[this.getElevationLayer()]:[];C(this.getUniformByType("elevation"),r,this.defines.NUM_VS_TEXTURES)}this.layersNeedUpdate=!1}},{key:"dispose",value:function(){this.dispatchEvent({type:"dispose"}),this.layers.forEach((function(t){return t.dispose(!0)})),this.layers.length=0,this.layersNeedUpdate=!0}},{key:"setSequence",value:function(t){this.colorLayerIds=t,this.layersNeedUpdate=!0}},{key:"setSequenceElevation",value:function(t){this.elevationLayerIds[0]=t,this.layersNeedUpdate=!0}},{key:"removeLayer",value:function(t){var e=this.layers.findIndex((function(e){return e.id===t}));if(e>-1){this.layers[e].dispose(),this.layers.splice(e,1);var r=this.colorLayerIds.indexOf(t);r>-1?this.colorLayerIds.splice(r,1):this.elevationLayerIds=[]}}},{key:"addLayer",value:function(t){t.layer.id in this.layers&&console.warn('The "{layer.id}" layer was already present in the material, overwritting.'),this.layers.push(t)}},{key:"getLayer",value:function(t){return this.layers.find((function(e){return e.id===t}))}},{key:"getLayers",value:function(t){return this.layers.filter((function(e){return t.includes(e.id)}))}},{key:"getElevationLayer",value:function(){var t=this;return this.layers.find((function(e){return e.id===t.elevationLayerIds[0]}))}},{key:"setElevationScale",value:function(t){this.elevationLayerIds.length&&(this.getElevationLayer().scale=t)}}]),y}(h.RawShaderMaterial)},44996:(t,e,r)=>{"use strict";r.d(e,{Z:()=>x});var n=r(15671),i=r(43144),a=r(88301),o=r(79340),s=r(82963),c=r(61120),l=r(99477),u=r(3590),h=r(56564),f=r(60145),d=r(82150);var p,m=new h.Z({crs:"EPSG:4978",uvCount:1}),g=new l.Vector3,A=new l.Vector2,v=new l.Vector3,y=new f.Z("EPSG:4326",0,0,0),b=function(t){(0,o.Z)(f,t);var e,r,h=(e=f,r=function(){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(t){return!1}}(),function(){var t,n=(0,c.Z)(e);if(r){var i=(0,c.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,s.Z)(this,t)});function f(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new l.Vector3(1/0,1/0,1/0),r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new l.Vector3(-1/0,-1/0,-1/0);return(0,n.Z)(this,f),(t=h.call(this)).box3D=new l.Box3(e.clone(),r.clone()),t.natBox=t.box3D.clone(),t.z={min:0,max:0,scale:1},t}return(0,i.Z)(f,[{key:"clone",value:function(){return(new f).copy(this)}},{key:"copy",value:function(t){return(0,a.Z)((0,c.Z)(f.prototype),"copy",this).call(this,t),this.box3D.copy(t.box3D),this.natBox.copy(t.natBox),this.z.min=t.z.min,this.z.max=t.z.max,this.z.scale=t.z.scale,this}},{key:"updateZ",value:function(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.z.min=null!==(t=r.min)&&void 0!==t?t:this.z.min,this.z.max=null!==(e=r.max)&&void 0!==e?e:this.z.max,this.z.scale=r.scale>0?r.scale:this.z.scale,this.z.delta=Math.abs(this.z.max-this.z.min)*this.z.scale;var n=r.geoidHeight||0;this.box3D.min.z=this.natBox.min.z+this.z.min*this.z.scale+n,this.box3D.max.z=this.natBox.max.z+this.z.max*this.z.scale+n}},{key:"isSphereAboveXYBox",value:function(t){var e=this.worldToLocal(t.center),r=Math.max(this.box3D.min.x,Math.min(e.x,this.box3D.max.x)),n=Math.max(this.box3D.min.y,Math.min(e.y,this.box3D.max.y));return Math.sqrt((r-e.x)*(r-e.x)+(n-e.y)*(n-e.y))1&&void 0!==arguments[1]?arguments[1]:t.min||0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.max||0;if("EPSG:4326"==t.crs){var n=m.computeSharableExtent(t),i=n.sharableExtent,a=n.quaternion,o=n.position,s=Math.max(Math.floor(i.planarDimensions(A).x/90+1),2),c=new u.Z({extent:i,level:0,segment:s,disableSkirt:!0,builder:m});p.box3D.copy(c.boundingBox),p.natBox.copy(c.boundingBox),this.copy(p),this.updateZ({min:e,max:r}),this.position.copy(o),this.quaternion.copy(a),this.updateMatrixWorld(!0)}else{if(d.Z.isTms(t.crs)||!d.Z.isMetricUnit(t.crs))throw new Error("Unsupported extent crs");t.center(y).toVector3(this.position),t.planarDimensions(A),g.set(A.x,A.y,Math.abs(r-e)),this.box3D.setFromCenterAndSize(v,g),this.updateMatrixWorld(!0)}return this}}]),f}(l.Object3D);p=new b;const x=b},32204:(t,e,r)=>{"use strict";r.d(e,{E7:()=>A,Uz:()=>g,ZP:()=>b,vj:()=>m,wy:()=>y});var n=r(97326),i=r(88301),a=r(79340),o=r(82963),s=r(61120),c=r(43144),l=r(15671),u=r(99477),h=r(47052),f=r(77567),d=r(96586);var p="#include \n#include \n#include \n#if defined(USE_TEXTURES_PROJECTIVE)\n#include \n#endif\n\nvarying vec4 vColor;\nuniform bool picking;\nuniform int shape;\n\nvoid main() {\n #include \n //square shape does not require any change.\n if (shape == PNTS_SHAPE_CIRCLE) {\n //circular rendering in glsl\n if ((length(gl_PointCoord - 0.5) > 0.5) || (vColor.a == 0.0)) {\n discard;\n }\n }\n\n#if defined(USE_TEXTURES_PROJECTIVE)\n vec4 color = vColor;\n if (!picking) {\n #pragma unroll_loop\n for (int i = 0; i < ORIENTED_IMAGES_COUNT; i++) {\n color = projectiveTextureColor(projectiveTextureCoords[ ORIENTED_IMAGES_COUNT - 1 - i ], projectiveTextureDistortion[ ORIENTED_IMAGES_COUNT - 1 - i ], projectiveTexture[ ORIENTED_IMAGES_COUNT - 1 - i ], mask[ORIENTED_IMAGES_COUNT - 1 - i], color);\n }\n gl_FragColor = vec4(color.rgb, color.a * opacity);\n } else {\n gl_FragColor = color;\n }\n#else\n gl_FragColor = vColor;\n#endif\n}\n",m={COLOR:0,INTENSITY:1,CLASSIFICATION:2,NORMAL:3},g={CIRCLE:0,SQUARE:1},A={VALUE:0,ATTENUATED:1},v=new u.Color(1,1,1),y={DEFAULT:{0:{visible:!0,name:"never classified",color:new u.Color(.5,.5,.5),opacity:1},1:{visible:!0,name:"unclassified",color:new u.Color(.5,.5,.5),opacity:1},2:{visible:!0,name:"ground",color:new u.Color(.63,.32,.18),opacity:1},3:{visible:!0,name:"low vegetation",color:new u.Color(0,1,0),opacity:1},4:{visible:!0,name:"medium vegetation",color:new u.Color(0,.8,0),opacity:1},5:{visible:!0,name:"high vegetation",color:new u.Color(0,.6,0),opacity:1},6:{visible:!0,name:"building",color:new u.Color(1,.66,0),opacity:1},7:{visible:!0,name:"low point(noise)",color:new u.Color(1,0,1),opacity:1},8:{visible:!0,name:"key-point",color:new u.Color(1,0,0),opacity:1},9:{visible:!0,name:"water",color:new u.Color(0,0,1),opacity:1},10:{visible:!0,name:"rail",color:new u.Color(.8,.8,1),opacity:1},11:{visible:!0,name:"road Surface",color:new u.Color(.4,.4,.7),opacity:1},12:{visible:!0,name:"overlap",color:new u.Color(1,1,0),opacity:1},DEFAULT:{visible:!0,name:"default",color:new u.Color(.3,.6,.6),opacity:.5}}};const b=function(t){(0,a.Z)(x,t);var e,r,b=(e=x,r=function(){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(t){return!1}}(),function(){var t,n=(0,s.Z)(e);if(r){var i=(0,s.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,o.Z)(this,t)});function x(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,l.Z)(this,x);var r=e.intensityRange||new u.Vector2(0,1),i=e.orientedImageMaterial,a=e.classification||y.DEFAULT,o=null!=e.applyOpacityClassication&&e.applyOpacityClassication,s=e.size||0,c=e.mode||m.COLOR,v=e.shape||g.CIRCLE,w=0===s?A.ATTENUATED:e.sizeMode||A.VALUE,_=e.minAttenuatedSize||3,E=e.maxAttenuatedSize||10;delete e.orientedImageMaterial,delete e.intensityRange,delete e.classification,delete e.applyOpacityClassication,delete e.size,delete e.mode,delete e.shape,delete e.sizeMode,delete e.minAttenuatedSize,delete e.maxAttenuatedSize,(t=b.call(this,e)).vertexShader="#include \n#include \n#include \n#if defined(USE_TEXTURES_PROJECTIVE)\n#include \n#endif\n#include \n#include \n\nuniform float size;\nuniform float scale;\n\nuniform bool picking;\nuniform int mode;\nuniform float opacity;\nuniform vec4 overlayColor;\nuniform vec2 intensityRange;\nuniform bool applyOpacityClassication;\nattribute vec3 color;\nattribute vec4 unique_id;\nattribute float intensity;\nattribute float classification;\nuniform sampler2D classificationLUT;\nuniform int sizeMode;\nuniform float minAttenuatedSize;\nuniform float maxAttenuatedSize;\n\n#if defined(NORMAL_OCT16)\nattribute vec2 oct16Normal;\n#elif defined(NORMAL_SPHEREMAPPED)\nattribute vec2 sphereMappedNormal;\n#else\nattribute vec3 normal;\n#endif\n\nvarying vec4 vColor;\n\n// see https://web.archive.org/web/20150303053317/http://lgdv.cs.fau.de/get/1602\n// and implementation in PotreeConverter (BINPointReader.cpp) and potree (BinaryDecoderWorker.js)\n#if defined(NORMAL_OCT16)\nvec3 decodeOct16Normal(vec2 encodedNormal) {\n vec2 nNorm = 2. * (encodedNormal / 255.) - 1.;\n vec3 n;\n n.z = 1. - abs(nNorm.x) - abs(nNorm.y);\n if (n.z >= 0.) {\n n.x = nNorm.x;\n n.y = nNorm.y;\n } else {\n n.x = sign(nNorm.x) - sign(nNorm.x) * sign(nNorm.y) * nNorm.y;\n n.y = sign(nNorm.y) - sign(nNorm.y) * sign(nNorm.x) * nNorm.x;\n }\n return normalize(n);\n}\n#elif defined(NORMAL_SPHEREMAPPED)\n// see http://aras-p.info/texts/CompactNormalStorage.html method #4\n// or see potree's implementation in BINPointReader.cpp\nvec3 decodeSphereMappedNormal(vec2 encodedNormal) {\n vec2 fenc = 2. * encodedNormal / 255. - 1.;\n float f = dot(fenc,fenc);\n float g = 2. * sqrt(1. - f);\n vec3 n;\n n.xy = fenc * g;\n n.z = 1. - 2. * f;\n return n;\n}\n#endif\n\nvoid main() {\n\n#if defined(NORMAL_OCT16)\n vec3 normal = decodeOct16Normal(oct16Normal);\n#elif defined(NORMAL_SPHEREMAPPED)\n vec3 normal = decodeSphereMappedNormal(sphereMappedNormal);\n#elif defined(NORMAL)\n // nothing to do\n#else\n // default to color\n vec3 normal = color;\n#endif\n\n if (picking) {\n vColor = unique_id;\n } else {\n vColor.a = opacity;\n if (applyOpacityClassication || mode == PNTS_MODE_CLASSIFICATION) {\n vec2 uv = vec2(classification, 0.5);\n vColor = texture2D(classificationLUT, uv);\n vColor.a *= opacity;\n }\n\n if (mode == PNTS_MODE_INTENSITY) {\n // adapt the grayscale knowing the range\n float i = (intensity - intensityRange.x) / (intensityRange.y - intensityRange.x);\n vColor.rgb = vec3(i, i, i);\n } else if (mode == PNTS_MODE_NORMAL) {\n vColor.rgb = abs(normal);\n } else if (mode == PNTS_MODE_COLOR) {\n // default to color mode\n vColor.rgb = mix(color, overlayColor.rgb, overlayColor.a);\n }\n }\n\n #include \n #include \n\n gl_PointSize = size;\n\n if (sizeMode == PNTS_SIZE_MODE_ATTENUATED) {\n bool isPerspective = isPerspectiveMatrix(projectionMatrix);\n\n if (isPerspective) {\n gl_PointSize *= scale / -mvPosition.z;\n gl_PointSize = clamp(gl_PointSize, minAttenuatedSize, maxAttenuatedSize);\n }\n }\n\n#if defined(USE_TEXTURES_PROJECTIVE)\n #include \n#endif\n #include \n}\n";var M=e.scale||.025/Math.tan(.5);d.Z.setDefineMapping((0,n.Z)(t),"PNTS_MODE",m),d.Z.setDefineMapping((0,n.Z)(t),"PNTS_SHAPE",g),d.Z.setDefineMapping((0,n.Z)(t),"PNTS_SIZE_MODE",A),d.Z.setUniformProperty((0,n.Z)(t),"size",s),d.Z.setUniformProperty((0,n.Z)(t),"mode",c),d.Z.setUniformProperty((0,n.Z)(t),"shape",v),d.Z.setUniformProperty((0,n.Z)(t),"picking",!1),d.Z.setUniformProperty((0,n.Z)(t),"opacity",t.opacity),d.Z.setUniformProperty((0,n.Z)(t),"overlayColor",e.overlayColor||new u.Vector4(0,0,0,0)),d.Z.setUniformProperty((0,n.Z)(t),"intensityRange",r),d.Z.setUniformProperty((0,n.Z)(t),"applyOpacityClassication",o),d.Z.setUniformProperty((0,n.Z)(t),"sizeMode",w),d.Z.setUniformProperty((0,n.Z)(t),"scale",M),d.Z.setUniformProperty((0,n.Z)(t),"minAttenuatedSize",_),d.Z.setUniformProperty((0,n.Z)(t),"maxAttenuatedSize",E);var S=new Uint8Array(1024),C=new u.DataTexture(S,256,1,u.RGBAFormat);return C.needsUpdate=!0,C.magFilter=u.NearestFilter,d.Z.setUniformProperty((0,n.Z)(t),"classificationLUT",C),t.classification=a,t.recomputeClassification(),i?(t.uniforms.projectiveTextureAlphaBorder=i.uniforms.projectiveTextureAlphaBorder,t.uniforms.projectiveTextureDistortion=i.uniforms.projectiveTextureDistortion,t.uniforms.projectiveTextureMatrix=i.uniforms.projectiveTextureMatrix,t.uniforms.projectiveTexture=i.uniforms.projectiveTexture,t.uniforms.mask=i.uniforms.mask,t.uniforms.boostLight=i.uniforms.boostLight,t.defines.ORIENTED_IMAGES_COUNT=i.defines.ORIENTED_IMAGES_COUNT,t.defines.USE_DISTORTION=i.defines.USE_DISTORTION,t.defines.DEBUG_ALPHA_BORDER=i.defines.DEBUG_ALPHA_BORDER,t.defines.USE_TEXTURES_PROJECTIVE=!0,t.defines.USE_BASE_MATERIAL=!0,t.fragmentShader=f.Z.unrollLoops(p,t.defines)):t.fragmentShader=p,h.Z.isLogDepthBufferSupported()&&(t.defines.USE_LOGDEPTHBUF=1,t.defines.USE_LOGDEPTHBUF_EXT=1),t}return(0,c.Z)(x,[{key:"recomputeClassification",value:function(){for(var t=this.classification,e=this.classificationLUT.image.data,r=this.classificationLUT.image.width,n=0;n{"use strict";r.d(e,{pL:()=>A,AN:()=>b,NO:()=>x});var n=r(88301),i=r(15671),a=r(43144),o=r(79340),s=r(82963),c=r(61120),l=r(99477),u=r(27240),h=r(42982),f=r(79295);var d=r(82150);function p(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rthis.level){var r,n=0,i=p(e);try{for(i.s();!(r=i.n()).done;){var a,o=r.value,s=p(t.textures);try{for(s.s();!(a=s.n()).done;){var c=a.value;if(o.isInside(c.extent)){this.setTexture(n++,c,o.offsetToParent(c.extent));break}}}catch(t){s.e(t)}finally{s.f()}}}catch(t){i.e(t)}finally{i.f()}}}},{key:"dispose",value:function(t){t&&(this.layer.removeEventListener("visible-property-changed",this._handlerCBEvent),this.layer.removeEventListener("opacity-property-changed",this._handlerCBEvent),this._listeners={});var e,r=p(this.textures);try{for(r.s();!(e=r.n()).done;){var n=e.value;n.isTexture&&n.dispose()}}catch(t){r.e(t)}finally{r.f()}this.level=A,this.textures=[],this.offsetScales=[],this.material.layersNeedUpdate=!0}},{key:"setTexture",value:function(t,e,r){this.level=e&&0==t?e.extent.zoom:this.level,this.textures[t]=e||null,this.offsetScales[t]=r,this.material.layersNeedUpdate=!0}},{key:"setTextures",value:function(t,e){this.dispose(!1);for(var r=0,n=t.length;r2){for(var d=Math.floor(e.z*a),p=Math.floor(e.x*i),m=Math.floor(e.y*a),g=Math.max(Math.floor(u/32),2),A=m;Ac&&(c=r.zmin),r.zmaxn&&r[i-1]>n&&r[Math.sqrt(i)-1]>n&&r[i-Math.sqrt(i)]>n)||function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return 0},r=arguments.length>2?arguments[2]:void 0,n=0,i=t.length;n{"use strict";r.d(e,{Z:()=>i});var n={FINAL:0,DEPTH:1,ID:2};const i={MODES:n,push:function(t,e){var r,i=null!==(r=t.mode)&&void 0!==r?r:n.FINAL;if(i==e)return function(){};var a=function(t){return function(e){var r=e.material;r&&(r.mode=t)}};return t.traverse(a(e)),function(){t.traverse(a(i))}}}},77567:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var n=new RegExp("gl_Position.*(?![^]*gl_Position)"),i=new RegExp("[^\\w]*main[^\\w]*(void)?[^\\w]*{");const a={patchMaterialForLogDepthSupport:function(t){if(!t.vertexShader.includes("USE_LOGDEPTHBUF")&&!t.vertexShader.includes("logdepthbuf_pars_vertex")){t.vertexShader="#include \n#define EPSILON 1e-6\n".concat(t.vertexShader);var e=n.exec(t.vertexShader),r=e[0].length+e.index;t.vertexShader="".concat(t.vertexShader.slice(0,r),"\n#include \n").concat(t.vertexShader.slice(r)),t.fragmentShader="#include \n").concat(t.fragmentShader.slice(r)),t.defines={USE_LOGDEPTHBUF:1,USE_LOGDEPTHBUF_EXT:1}}},unrollLoops:function(t,e){return t.replace(/#pragma unroll_loop\s+for\s*\(\s*int\s+i\s*=\s*([\w\d]+);\s*i\s+<\s+([\w\d]+);\s*i\s*\+\+\s*\)\s*\{\n([^}]*)\}/g,(function(t,r,n,i){var a="";r=r in e?e[r]:parseInt(r,10),n=n in e?e[n]:parseInt(n,10);for(var o=r;o{"use strict";r.d(e,{ZP:()=>O});var n=r(79340),i=r(82963),a=r(61120),o=r(43144),s=r(15671),c=r(99128),l=r(97400),u=r(99127),h=r(71077),f=r(70274),d=r(14278),p=r(49472),m=r(99477),g=r(3614),A=r.n(g),v=r(38929),y=r(94596),b=r(86896),x=r(60145);function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(e.in.layers[n].filter((function(t){return t.filterExpression.filter({zoom:a},r)&&a>=t.zoom.min&&a2&&void 0!==arguments[2]&&arguments[2],n=e.bindNewGeometry(),i=e.type===y.tg.POLYGON;r=r&&i,n.properties=t.properties;var a=t._pbf;a.pos=t._geometry;for(var o=a.readVarint()+a.pos,s=1,c=0,l=0,u=0,h=0,f=0;a.pos>3}if(c--,1===s||2===s){l+=a.readSVarint(),u+=a.readSVarint(),1===s&&(h&&(r&&f>0&&n.indices.length>0&&(e.updateExtent(n),(n=e.bindNewGeometry()).properties=t.properties),n.closeSubGeometry(h,e),n.getLastSubGeometry().ccw=f<0),h=0,f=0),h++;var p=C(l,u,t.tileNumbers,t.extent);n.pushCoordinatesValues(e,{x:l,y:u},p),1==h?(S.set(l,u),S.coordProj=p,M.set(l,u)):i&&h>1&&(f+=(M.x-l)*(M.y+u),M.set(l,u))}else{if(7!==s)throw new Error("unknown command ".concat(s));h&&(h++,n.pushCoordinatesValues(e,{x:S.x,y:S.y},S.coordProj),i&&(f+=(M.x-S.x)*(M.y+S.y)))}}h&&(r&&f>0&&n.indices.length>0&&(e.updateExtent(n),(n=e.bindNewGeometry()).properties=t.properties),n.closeSubGeometry(h,e),n.getLastSubGeometry().ccw=f<0),e.updateExtent(n)}(r,c))};for(h.s();!(u=h.n()).done;)f()}catch(t){h.e(t)}finally{h.f()}},l=o.length-1;l>=0;l--)c()})),s.removeEmptyFeature(),s.features.sort((function(t,e){return t.order-e.order})),s.updateExtent(),s.extent=t.extent,s.isInverted=e.in.isInverted,Promise.resolve(s)}}const I={parse:function(t,e){return e=(0,b._F)(e),Promise.resolve(T(t,e))}};var R=r(33347),B=r(1537),k=r(82150);var L=new Map([["image/x-bil;bits=32",R.Z.textureFloat],["geojson",R.Z.json],["application/json",R.Z.json],["application/kml",R.Z.xml],["application/gpx",R.Z.xml],["application/x-protobuf;type=mapbox-vector",R.Z.arrayBuffer],["application/gtx",R.Z.arrayBuffer],["application/isg",R.Z.text],["application/gdf",R.Z.text]]),P=new Map([["geojson",l.Z.parse],["application/json",l.Z.parse],["application/kml",u.Z.parse],["application/gpx",f.Z.parse],["application/x-protobuf;type=mapbox-vector",I.parse],["application/gtx",d.ZP.parse],["application/isg",p.Z.parse],["application/gdf",h.Z.parse]]),D={getByArray:function(){},setByArray:function(t){return t},clear:function(){}},U=0;const O=function(t){(0,n.Z)(u,t);var e,r,l=(e=u,r=function(){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(t){return!1}}(),function(){var t,n=(0,a.Z)(e);if(r){var o=(0,a.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,i.Z)(this,t)});function u(t){var e;if((0,s.Z)(this,u),(e=l.call(this,t)).isSource=!0,!t.url)throw new Error("New Source: url is required");return e.uid=U++,e.url=t.url,e.format=t.format,e.fetcher=t.fetcher||L.get(t.format)||R.Z.texture,e.parser=t.parser||P.get(t.format)||function(t){return t},e.isVectorSource=null!=(t.parser||P.get(t.format)),e.networkOptions=t.networkOptions||{crossOrigin:"anonymous"},e.attribution=t.attribution,e.whenReady=Promise.resolve(),e._featuresCaches={},t.extent&&!t.extent.isExtent?e.extent=new c.ZP(e.crs,t.extent):e.extent=t.extent,e}return(0,o.Z)(u,[{key:"handlingError",value:function(t){throw new Error(t)}},{key:"urlFromExtent",value:function(){throw new Error("In extended Source, you have to implement the method urlFromExtent!")}},{key:"requestToKey",value:function(t){return[t.zoom,t.row,t.col]}},{key:"loadData",value:function(t,e){var r=this,n=this._featuresCaches[e.crs],i=this.requestToKey(t),a=n.getByArray(i);return a||(a=n.setByArray(function(t,e){var r=t.urlFromExtent(e);return t.fetcher(r,t.networkOptions).then((function(t){return t.extent=e,t}),(function(e){return t.handlingError(e)}))}(this,t).then((function(t){return r.parser(t,{out:e,in:r})}),(function(t){return r.handlingError(t)})),i),this.onParsedFile&&a.then((function(t){return r.onParsedFile(t),console.warn("Source.onParsedFile was deprecated"),t}))),a}},{key:"onLayerAdded",value:function(t){this._featuresCaches[t.out.crs]||(this._featuresCaches[t.out.crs]=this.isVectorSource?new B.Z:D)}},{key:"onLayerRemoved",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._featuresCaches[t.unusedCrs];e&&(e.clear(),delete this._featuresCaches[t.unusedCrs])}},{key:"extentInsideLimit",value:function(){throw new Error("In extented Source, you have to implement the method extentInsideLimit!")}}]),u}((0,o.Z)((function t(e){(0,s.Z)(this,t),e.projection&&(console.warn("Source projection parameter is deprecated, use crs instead."),e.crs=e.crs||e.projection),e.crs&&k.Z.isValid(e.crs),this.crs=e.crs})))},4596:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>S});var n=r(15671),i=r(43144),a=r(79340),o=r(82963),s=r(61120),c=r(99477),l=r(36194),u=r(79295),h=r(49469),f=r(60145),d=r(16828),p=r(44996),m=r(36873);c.Object3D.DEFAULT_UP.set(0,0,1);var g=new c.Vector3,A=new f.Z("EPSG:4326",0,0,0),v=new d.Z,y=[],b=new p.Z,x=new c.Vector3;function w(t){return t-360*Math.floor((t+180)/360)}function _(t){return t.getLayers((function(t){return t.isTiledGeometryLayer}))[0]}var E=function(t){(0,a.Z)(p,t);var e,r,d=(e=p,r=function(){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(t){return!1}}(),function(){var t,n=(0,s.Z)(e);if(r){var i=(0,s.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,o.Z)(this,t)});function p(){var t;return(0,n.Z)(this,p),(t=d.call(this)).seaLevel=new c.Object3D,t.target=new c.Object3D,t.target.rotation.order="ZXY",t.camera=new c.Camera,t.add(t.seaLevel),t.seaLevel.add(t.target),t.target.add(t.camera),t.coord=new f.Z("EPSG:4978",0,0),t.targetWorldPosition=new c.Vector3,t.removeAll=function(){},t._onChangeCallback=null,t}return(0,i.Z)(p,[{key:"applyTransformToCamera",value:function(t,e){var r=this;this.proxy?(e.quaternion._onChange(this._onChangeCallback),this.camera.matrixWorld.decompose(this.proxy.position,e.quaternion,e.scale),e.quaternion._onChange((function(){return r.removeProxy(t,e)}))):this.camera.matrixWorld.decompose(e.position,e.quaternion,e.scale),t.dispatchEvent({type:m.b.CAMERA_MOVED,coord:this.coord,range:this.range,heading:this.heading,tilt:this.tilt})}},{key:"setProxy",value:function(t,e){var r=this;!this.proxy&&t&&e&&(this.proxy={position:new c.Vector3},Object.keys(e.position).forEach((function(n){return function(t,e,r,n){r.proxy.position[n]=e.position[n],Object.defineProperty(e.position,n,{get:function(){return r.proxy.position[n]},set:function(i){r.removeProxy(t,e),e.position[n]=i}})}(t,e,r,n)})),this._onChangeCallback=e.quaternion._onChangeCallback,e.quaternion._onChange((function(){return r.removeProxy(t,e)})))}},{key:"removeProxy",value:function(t,e){var r=this;this.stop(t),this.proxy&&t&&e&&(Object.keys(e.position).forEach((function(t){return Object.defineProperty(e.position,t,{value:r.proxy.position[t],writable:!0})})),e.quaternion._onChange(this._onChangeCallback),this.proxy=null)}},{key:"setTargetFromCoordinate",value:function(t,e){e.as(_(t).extent.crs,this.coord);var r=Math.max(0,u.Z.getElevationValueAt(_(t),this.coord,u.Z.PRECISE_READ_Z)||this.coord.z);this.coord.z=r,this.coord.as(t.referenceCrs).toVector3(g),"EPSG:4978"==t.referenceCrs?(this.lookAt(g),this.seaLevel.position.set(0,0,g.length()-r)):(this.position.set(g.x,g.y,0),this.seaLevel.position.set(0,0,0)),this.target.position.set(0,0,r)}},{key:"setFromPositions",value:function(t,e){this.setTargetFromCoordinate(t,new f.Z(t.referenceCrs,g)),this.target.rotation.set(0,0,0),this.updateMatrixWorld(!0),this.camera.position.copy(e),this.target.worldToLocal(this.camera.position);var r=this.camera.position.length();this.target.rotation.x=Math.asin(this.camera.position.z/r);var n=c.MathUtils.clamp(this.camera.position.y/(Math.cos(this.target.rotation.x)*r),-1,1);this.target.rotation.z=Math.sign(-this.camera.position.x||1)*Math.acos(n),this.camera.position.set(0,r,0)}},{key:"applyParams",value:function(t,e){e.coord&&this.setTargetFromCoordinate(t,e.coord),null!=e.tilt&&(this.target.rotation.x=c.MathUtils.degToRad(e.tilt)),null!=e.heading&&(this.target.rotation.z=c.MathUtils.degToRad(-w(e.heading+180))),e.range&&this.camera.position.set(0,e.range,0),this.camera.rotation.set(.5*-Math.PI,0,Math.PI),this.updateMatrixWorld(!0),this.targetWorldPosition.setFromMatrixPosition(this.seaLevel.matrixWorld)}},{key:"getParams",value:function(){return{coord:this.coord.clone(),tilt:this.tilt,heading:this.heading,range:this.range,targetWorldPosition:this.targetWorldPosition}}},{key:"setfromCamera",value:function(t,e,r){e.updateMatrixWorld(!0),null==r&&(r=t.getPickingPositionFromDepth()||function(t,e){var r=new c.Vector3(0,0,.5);if(r.unproject(e),r.sub(e.position).normalize(),"EPSG:4978"==t.referenceCrs)return v.intersection({direction:r,origin:e.position});var n=e.position.z/r.z;return r.multiplyScalar(n).add(e.position)}(t,e));var n=r&&!isNaN(r.x)?e.position.distanceTo(r):100;e.localToWorld(g.set(0,0,-n)),this.setFromPositions(t,e.position)}},{key:"copyObject3D",value:function(t){return this.copy(t,!1),this.seaLevel.copy(t.seaLevel,!1),this.target.copy(t.target,!1),this.camera.copy(t.camera),this}},{key:"animateCameraToLookAtTarget",value:function(t,e,r){var n=this;r.easing=r.easing||l.ZP.Easing.Quartic.InOut,this.setfromCamera(t,e);var i=new l.ZP.Group;this.start=(this.start||new p).copyObject3D(this),this.end=(this.end||new p).copyObject3D(this);var a,o,s=r.time||2500,u={t:0},f=[],d={promise:new Promise((function(t,e){a=t,o=e})),resolve:a,reject:o};this.addPlaceTargetOnGround(t,e,r.coord,u),this.end.applyParams(t,r);var m=this.end.target.rotation.z-this.start.target.rotation.z;return Math.abs(m)>Math.PI&&(this.end.target.rotation.z=this.start.target.rotation.z+m-2*Math.sign(m)*Math.PI),f.push(new l.ZP.Tween(u,i).to({t:1},s).easing(r.easing).onUpdate((function(e){"EPSG:4978"==t.referenceCrs&&n.quaternion.slerpQuaternions(n.start.quaternion,n.end.quaternion,e.t),n.camera.quaternion.slerpQuaternions(n.start.camera.quaternion,n.end.camera.quaternion,e.t),n.target.rotation.set(0,0,0),n.target.rotateZ(c.MathUtils.lerp(n.start.target.rotation.z,n.end.target.rotation.z,e.t)),n.target.rotateX(c.MathUtils.lerp(n.start.target.rotation.x,n.end.target.rotation.x,e.t))}))),"EPSG:4978"!=t.referenceCrs&&f.push(new l.ZP.Tween(this.position,i).to(this.end.position,s).easing(r.easing)),f.push(new l.ZP.Tween(this.seaLevel.position,i).to(this.end.seaLevel.position,s).easing(r.easing)),f.push(new l.ZP.Tween(this.camera.position,i).to(this.end.camera.position,s).easing(r.easing)),this.animationFrameRequester=function(){i.update(),n.updateMatrixWorld(!0),n.applyTransformToCamera(t,e),n.targetWorldPosition.setFromMatrixPosition(n.seaLevel.matrixWorld),r.callback&&r.callback(n),A.crs=t.referenceCrs,A.setFromVector3(n.targetWorldPosition).as(_(t).extent.crs,n.coord),t.notifyChange(e)},this.removeAll=function(e){this.removeAll=function(){},i.removeAll(),this.animationFrameRequester&&t.removeFrameRequester(h.Ao.BEFORE_RENDER,this.animationFrameRequester),d.resolve(void 0!==e),this.animationFrameRequester=null},f[f.length-1].onComplete(this.removeAll),f.forEach((function(t){return t.start()})),t.addFrameRequester(h.Ao.BEFORE_RENDER,this.animationFrameRequester),t.notifyChange(e),d}},{key:"stop",value:function(t){this.removePlaceTargetOnGround(t),this.removeAll()}},{key:"addPlaceTargetOnGround",value:function(t,e,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{t:1};if(this.removePlaceTargetOnGround(t),t&&e){var a=this.target.position.z;this.placeTargetOnGround=function(){var o=Math.max(0,u.Z.getElevationValueAt(_(t),r||n.coord,u.Z.PRECISE_READ_Z)||0);n.target.position.z=a*(1-i.t)+o*i.t,n.target.updateMatrixWorld(!0),n.applyTransformToCamera(t,e)},this.placeTargetOnGround(),t.addFrameRequester(h.Ao.BEFORE_RENDER,this.placeTargetOnGround)}}},{key:"removePlaceTargetOnGround",value:function(t){t&&this.placeTargetOnGround&&(t.removeFrameRequester(h.Ao.BEFORE_RENDER,this.placeTargetOnGround),this.placeTargetOnGround=null)}},{key:"tilt",get:function(){return c.MathUtils.radToDeg(this.target.rotation.x)}},{key:"heading",get:function(){return-w(c.MathUtils.radToDeg(this.target.rotation.z)+180)}},{key:"range",get:function(){return this.camera.position.y}}]),p}(c.Object3D);function M(t){return y[t.uuid]=y[t.uuid]||new E,y[t.uuid]}const S={defaultStopPlaceOnGroundAtEnd:!1,Easing:l.ZP.Easing,stop:function(t,e){M(e).stop(t)},getTransformCameraLookingAtTarget:function(t,e,r){var n=M(e);return n.setfromCamera(t,e,r),n.getParams()},transformCameraToLookAtTarget:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.isExtent&&(r=this.getCameraTransformOptionsFromExtent(t,e,r)),r.proxy=void 0===r.proxy||r.proxy;var n=M(e);return n.stop(t),n.setfromCamera(t,e),r.proxy&&n.setProxy(t,e),n.applyParams(t,r),n.addPlaceTargetOnGround(t,e,r.coord),n.applyTransformToCamera(t,e),t.notifyChange(e),Promise.resolve(n.getParams())},getCameraTransformOptionsFromExtent:function(t,e,r){var n,i={coord:new f.Z(r.crs,0,0,0),heading:0,tilt:t.isPlanarView?90:89.9};if(t.isGlobeView?(r=r.as("EPSG:4326"),b.setFromExtent(r),b.box3D.getSize(x),n={x:x.y,y:x.x}):n=(r=r.as(t.referenceCrs)).planarDimensions(),r.center(i.coord),e.isOrthographicCamera)n.x/n.y>e.aspect?e.zoom=(e.right-e.left)/n.x:e.zoom=(e.top-e.bottom)/n.y,e.updateProjectionMatrix(),i.range=1e3;else if(e.isPerspectiveCamera){var a=c.MathUtils.degToRad(e.fov);if(n.x/n.y>e.aspect){var o=.5*t.domElement.clientHeight/Math.tan(.5*a),s=2*Math.atan(.5*t.domElement.clientWidth/o);i.range=n.x/(2*Math.tan(.5*s))}else i.range=n.y/(2*Math.tan(.5*a))}return i},animateCameraToLookAtTarget:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.proxy=void 0===n.proxy||n.proxy;var i=M(e);return i.stop(t),n.proxy&&i.setProxy(t,e),i.animateCameraToLookAtTarget(t,e,n).promise.then((function(e){var a=void 0===n.stopPlaceOnGroundAtEnd?r.defaultStopPlaceOnGroundAtEnd:n.stopPlaceOnGroundAtEnd,o=i.getParams();return a&&i.stop(t),o.finished=e,o}))},sequenceAnimationsToLookAtTarget:function(t,e){var r=this;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[{}]).map((function(n){return function(){return r.animateCameraToLookAtTarget(t,e,n)}})).reduce((function(t,e){return t.then((function(t){return!t.length||t[t.length-1].finished?e().then(Array.prototype.concat.bind(t)):Promise.resolve([{finished:!1}])}))}),Promise.resolve([]))},getDiffParams:function(t,e){var r;if(t&&e)return Math.abs(t.range-e.range)/t.range>.001&&((r=r||{}).range={previous:t.range,new:e.range}),Math.abs(t.tilt-e.tilt)>.1&&((r=r||{}).tilt={previous:t.tilt,new:e.tilt}),Math.abs(t.heading-e.heading)>.1&&((r=r||{}).heading={previous:t.heading,new:e.heading}),(Math.abs(t.coord.x-e.coord.x)>1e-6||Math.abs(t.coord.y-e.coord.y)>1e-6)&&((r=r||{}).coord={previous:t.coord,new:e.coord}),r}}},79295:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c,P:()=>p});var n=r(70885),i=r(99477),a=r(60145),o={v:new i.Vector3,coord1:new a.Z("EPSG:4978"),coord2:new a.Z("EPSG:4978"),offset:new i.Vector2};function s(t,e,r,n,i,s){var l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},u=arguments.length>8?arguments[8]:void 0,h=(arguments.length>7?arguments[7]:void 0)||new a.Z(n);l.worldFromLocal?h.setFromVector3(o.v.copy(i).applyMatrix4(l.worldFromLocal)):h.setFromVector3(i);var f=c.getTerrainObjectAt(t,h,e,r,u);if(f)return f.coord.z+=s,f.coord.as(n,o.coord2).toVector3(i),l.localFromWorld&&i.applyMatrix4(l.localFromWorld),{id:f.texture.id,version:f.texture.version,tile:f.tile}}const c={getElevationValueAt:function(t,e){var r=v(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,e,(arguments.length>3?arguments[3]:void 0)||t.level0Nodes);if(r)return r.coord.z},getTerrainObjectAt:function(t,e){var r=arguments.length>4?arguments[4]:void 0;return v(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,e,(arguments.length>3?arguments[3]:void 0)||t.level0Nodes,r)},FAST_READ_Z:0,PRECISE_READ_Z:1,placeObjectOnGround:function(t,e,r){var n,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=arguments.length>4?arguments[4]:void 0;if(console.warn("placeObjectOnGround has been deprecated because it needs review and test"),n=l?l.concat(t.level0Nodes):t.level0Nodes,o.modifyGeometry){var u={worldFromLocal:r.matrixWorld,localFromWorld:(new i.Matrix4).copy(r.matrixWorld).invert()},h=r.geometry;if(h.vertices){o.cache&&(o.cache.length=h.vertices.length);for(var f=!0,d=new a.Z(e),p=0;p=0?e:void 0}}var u;function h(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a2&&void 0!==arguments[2]?arguments[2]:new i.Vector2;if(t.crs!=e.crs)throw new Error("Unsupported mix: ".concat(t.crs," and ").concat(e.crs));e.planarDimensions(A);var n=(t.x-e.west)/A.x,a=(e.north-t.y)/A.y;r.set(n,a)}(s,c.extent,g.offset),s.z=1==e?function(t,e,r,n,a){var o=n.x/a.x/16,s=Math.floor(r.x/o)*o,c=Math.floor(r.y/o)*o;1==s&&(s-=o),1==c&&(c-=o);var l=s,u=s+o,h=c,f=c+o,d=(r.x-s)/o,g=(r.y-c)/o,A=new i.Triangle(new i.Vector3(l,f),new i.Vector3(u,h),1==g||d/(1-g)>=1?new i.Vector3(u,f):new i.Vector3(l,h));A.getBarycoord(new i.Vector3(r.x,r.y),m);var v=t.attachedLayers.filter((function(t){return t.isElevationLayer}))[0],y=p(v,e,A.a.x,A.a.y),b=p(v,e,A.b.x,A.b.y),x=p(v,e,A.c.x,A.c.y);return y*m.x+b*m.y+x*m.z}(t,y,g.offset,d.extent.planarDimensions(),c.extent.planarDimensions()):function(t,e,r){return function(t,e,r,n){var i=f(e,r,n);return h(t,e,i.wu<=0?i.u1:i.u2,i.wv<=0?i.v1:i.v2)}(t.attachedLayers.filter((function(t){return t.isElevationLayer}))[0],e,r.x,r.y)}(t,y,g.offset),null!=s.z?{coord:s,texture:y,tile:d}:void 0}}},39683:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var n=r(94596);function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 o,s=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){c=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=-r&&y<=v+r&&Math.abs(A*o-g*s+f*h-d*u)/v<=r)return!0}return!1}function s(t,e,r,i,a,s,c){if(e==n.tg.LINE&&o(t,r,i,a,s,c))return!0;if(e==n.tg.POLYGON&&function(t,e,r,n,i,a){for(var s=t.x,c=t.y,l=!1,u=n,h=n+i-a;uc!=m>c&&s<(p-f)*(c-d)/(m-d)+f&&(l=!l)}return l}(t,r,i,a,s,c))return!0;if(e==n.tg.POINT){var l=function(t,e,r,n,i,a){for(var o,s=t.x,c=t.y,l=r*r,u=n;u2&&void 0!==arguments[2]?arguments[2]:.1,n=[];if(t.as(e.crs,l),l.applyMatrix4(e.matrixWorldInverse),e.extent.isPointInside(l,r))if(e.isFeatureCollection){r*=Math.sqrt(Math.pow(e.scale.x,2)+Math.pow(e.scale.y,2));var a,o=i(e.features);try{for(o.s();!(a=o.n()).done;){var s=a.value;s.extent&&!s.extent.isPointInside(l,r)||c(l,s,r,n)}}catch(t){o.e(t)}finally{o.f()}}else e.geometries&&c(l,e,r,n);return n}}},12306:(t,e,r)=>{"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}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 o,s=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){c=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw o}}}}(t);try{for(i.s();!(r=i.n()).done;)r.value.dispose()}catch(t){i.e(t)}finally{i.f()}}else t.dispose();for(var a=0;a=0;i--){var a=t.geometry.groups[i];a.materialIndex===r?(t.geometry.groups[i+1].count+=a.count,t.geometry.groups.splice(i,1)):(r=a.materialIndex,n.push(r))}for(var o=function(e){n.includes(e)||(t.geometry.groups.forEach((function(t){t.materialIndex>e&&(t.materialIndex-=1)})),t.material.splice(e,1))},s=t.material.length-1;s>=0;s--)o(s)}}r.d(e,{O:()=>a,Z:()=>i})},30633:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(11379);const i=new("function"==typeof r.g.TextDecoder?r.g.TextDecoder:n.k)("utf-8")},79742:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,a=s(t),o=a[0],c=a[1],l=new i(function(t,e,r){return 3*(e+r)/4-r}(0,o,c)),u=0,h=c>0?o-4:o;for(r=0;r>16&255,l[u++]=e>>8&255,l[u++]=255&e;return 2===c&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,l[u++]=255&e),1===c&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e),l},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,a=[],o=16383,s=0,l=n-i;sl?l:s+o));return 1===i?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,n){for(var i,a,o=[],s=e;s>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},48764:(t,e,r)=>{"use strict";var n=r(79742),i=r(80645),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.lW=c,e.h2=50;var o=2147483647;function s(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return l(t,e,r)}function l(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|m(t,e),n=s(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(G(t,Uint8Array)){var e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(G(t,ArrayBuffer)||t&&G(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(G(t,SharedArrayBuffer)||t&&G(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);var i=function(t){if(c.isBuffer(t)){var e=0|p(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||Z(t.length)?s(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return u(t),s(t<0?0:0|p(t))}function f(t){for(var e=t.length<0?0:0|p(t.length),r=s(e),n=0;n=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function m(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||G(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(t).length;default:if(i)return n?-1:F(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return T(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return M(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function A(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Z(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var a,o=1,s=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,c/=2,r/=2}function l(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var u=-1;for(a=r;as&&(r=s-c),a=r;a>=0;a--){for(var h=!0,f=0;fi&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function M(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:l>223?3:l>191?2:1;if(i+h<=r)switch(h){case 1:l<128&&(u=l);break;case 2:128==(192&(a=t[i+1]))&&(c=(31&l)<<6|63&a)>127&&(u=c);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&(c=(15&l)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(u=c)}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=h}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn.length?c.from(a).copy(n,i):Uint8Array.prototype.set.call(n,a,i);else{if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i)}i+=a.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;er&&(t+=" ... "),""},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(t,e,r,n,i){if(G(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(e>>>=0),s=Math.min(a,o),l=this.slice(n,i),u=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return x(this,t,e,r);case"ascii":case"latin1":case"binary":return w(this,t,e,r);case"base64":return _(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function T(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,n,i,a){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function P(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(t,e,r,n,a){return e=+e,r>>>=0,a||P(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,a){return e=+e,r>>>=0,a||P(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||k(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||k(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||k(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||k(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||k(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||k(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||k(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||k(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},c.prototype.readInt8=function(t,e){return t>>>=0,e||k(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||k(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||k(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return t>>>=0,e||k(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||k(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||k(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||k(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,n||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeFloatLE=function(t,e,r){return D(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return D(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(a=e;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function N(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(O,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function G(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Z(t){return t!=t}var V=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},9187:t=>{"use strict";function e(t,e,n){n=n||2;var a,o,s,c,h,f,p,m=e&&e.length,g=m?e[0]*n:t.length,A=r(t,0,g,n,!0),v=[];if(!A||A.next===A.prev)return v;if(m&&(A=function(t,e,n,i){var a,o,s,c=[];for(a=0,o=e.length;a80*n){a=s=t[0],o=c=t[1];for(var y=n;ys&&(s=h),f>c&&(c=f);p=0!==(p=Math.max(s-a,c-o))?32767/p:0}return i(A,v,n,a,o,p,0),v}function r(t,e,r,n,i){var a,o;if(i===S(t,e,r,n)>0)for(a=e;a=e;a-=n)o=_(a,t[a],t[a+1],o);return o&&A(o,o.next)&&(E(o),o=o.next),o}function n(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!A(n,n.next)&&0!==g(n.prev,n,n.next))n=n.next;else{if(E(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function i(t,e,r,l,u,h,d){if(t){!d&&h&&function(t,e,r,n){var i=t;do{0===i.z&&(i.z=f(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,c,l=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||c>0&&n;)0!==s&&(0===c||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,c--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,l*=2}while(o>1)}(i)}(t,l,u,h);for(var p,m,g=t;t.prev!==t.next;)if(p=t.prev,m=t.next,h?o(t,l,u,h):a(t))e.push(p.i/r|0),e.push(t.i/r|0),e.push(m.i/r|0),E(t),t=m.next,g=m.next;else if((t=m)===g){d?1===d?i(t=s(n(t),e,r),e,r,l,u,h,2):2===d&&c(t,e,r,l,u,h):i(n(t),e,r,l,u,h,1);break}}}function a(t){var e=t.prev,r=t,n=t.next;if(g(e,r,n)>=0)return!1;for(var i=e.x,a=r.x,o=n.x,s=e.y,c=r.y,l=n.y,u=ia?i>o?i:o:a>o?a:o,d=s>c?s>l?s:l:c>l?c:l,m=n.next;m!==e;){if(m.x>=u&&m.x<=f&&m.y>=h&&m.y<=d&&p(i,s,a,c,o,l,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function o(t,e,r,n){var i=t.prev,a=t,o=t.next;if(g(i,a,o)>=0)return!1;for(var s=i.x,c=a.x,l=o.x,u=i.y,h=a.y,d=o.y,m=sc?s>l?s:l:c>l?c:l,y=u>h?u>d?u:d:h>d?h:d,b=f(m,A,e,r,n),x=f(v,y,e,r,n),w=t.prevZ,_=t.nextZ;w&&w.z>=b&&_&&_.z<=x;){if(w.x>=m&&w.x<=v&&w.y>=A&&w.y<=y&&w!==i&&w!==o&&p(s,u,c,h,l,d,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,_.x>=m&&_.x<=v&&_.y>=A&&_.y<=y&&_!==i&&_!==o&&p(s,u,c,h,l,d,_.x,_.y)&&g(_.prev,_,_.next)>=0)return!1;_=_.nextZ}for(;w&&w.z>=b;){if(w.x>=m&&w.x<=v&&w.y>=A&&w.y<=y&&w!==i&&w!==o&&p(s,u,c,h,l,d,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;_&&_.z<=x;){if(_.x>=m&&_.x<=v&&_.y>=A&&_.y<=y&&_!==i&&_!==o&&p(s,u,c,h,l,d,_.x,_.y)&&g(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function s(t,e,r){var i=t;do{var a=i.prev,o=i.next.next;!A(a,o)&&v(a,i,i.next,o)&&x(a,o)&&x(o,a)&&(e.push(a.i/r|0),e.push(i.i/r|0),e.push(o.i/r|0),E(i),E(i.next),i=t=o),i=i.next}while(i!==t);return n(i)}function c(t,e,r,a,o,s){var c=t;do{for(var l=c.next.next;l!==c.prev;){if(c.i!==l.i&&m(c,l)){var u=w(c,l);return c=n(c,c.next),u=n(u,u.next),i(c,e,r,a,o,s,0),void i(u,e,r,a,o,s,0)}l=l.next}c=c.next}while(c!==t)}function l(t,e){return t.x-e.x}function u(t,e){var r=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o&&(o=s,r=n.x=n.x&&n.x>=u&&i!==n.x&&p(ar.x||n.x===r.x&&h(r,n)))&&(r=n,d=c)),n=n.next}while(n!==l);return r}(t,e);if(!r)return e;var i=w(r,t);return n(i,i.next),n(r,r.next)}function h(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function f(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,r=t;do{(e.x=(t-o)*(a-s)&&(t-o)*(n-s)>=(r-o)*(e-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&v(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(x(t,e)&&x(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||A(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function A(t,e){return t.x===e.x&&t.y===e.y}function v(t,e,r,n){var i=b(g(t,e,r)),a=b(g(t,e,n)),o=b(g(r,n,t)),s=b(g(r,n,e));return i!==a&&o!==s||!(0!==i||!y(t,r,e))||!(0!==a||!y(t,n,e))||!(0!==o||!y(r,t,n))||!(0!==s||!y(r,e,n))}function y(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function b(t){return t>0?1:t<0?-1:0}function x(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function w(t,e){var r=new M(t.i,t.x,t.y),n=new M(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function _(t,e,r,n){var i=new M(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function E(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function M(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},80645:(t,e)=>{e.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,c=(1<>1,u=-7,h=r?i-1:0,f=r?-1:1,d=t[e+h];for(h+=f,a=d&(1<<-u)-1,d>>=-u,u+=s;u>0;a=256*a+t[e+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+h],h+=f,u-=8);if(0===a)a=1-l;else{if(a===c)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=l}return(d?-1:1)*o*Math.pow(2,a-n)},e.write=function(t,e,r,n,i,a){var o,s,c,l=8*a-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),(e+=o+h>=1?f/c:f*Math.pow(2,1-h))*c>=2&&(o++,c/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(e*c-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;t[r+d]=255&o,d+=p,o/=256,l-=8);t[r+d-p]|=128*m}},25705:(t,e,r)=>{"use strict";var n,i,a=r.g.MutationObserver||r.g.WebKitMutationObserver;if(a){var o=0,s=new a(h),c=r.g.document.createTextNode("");s.observe(c,{characterData:!0}),n=function(){c.data=o=++o%2}}else if(r.g.setImmediate||void 0===r.g.MessageChannel)n="document"in r.g&&"onreadystatechange"in r.g.document.createElement("script")?function(){var t=r.g.document.createElement("script");t.onreadystatechange=function(){h(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},r.g.document.documentElement.appendChild(t)}:function(){setTimeout(h,0)};else{var l=new r.g.MessageChannel;l.port1.onmessage=h,n=function(){l.port2.postMessage(0)}}var u=[];function h(){var t,e;i=!0;for(var r=u.length;r;){for(e=u,u=[],t=-1;++t{t.exports=function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[o]={exports:{}};e[o][0].call(l.exports,(function(t){return i(e[o][1][t]||t)}),l,l.exports,t,e,r,n)}return r[o].exports}for(var a=void 0,o=0;o>>1],e)>=0?i=a+1:n=a;return i},e.exports=function(){function t(t){var e;this.options=t,this.comparator=this.options.comparator,this.data=(null!=(e=this.options.initialValues)?e.slice(0):void 0)||[],this.data.sort(this.comparator).reverse()}return t.prototype.queue=function(t){var e;e=n(this.data,t,this.comparator),this.data.splice(e,0,t)},t.prototype.dequeue=function(){return this.data.pop()},t.prototype.peek=function(){return this.data[this.data.length-1]},t.prototype.clear=function(){this.data.length=0},t}()},{}],4:[function(t,e,r){e.exports=function(){function t(t){var e,r,n,i,a,o,s,c;for(this.comparator=(null!=t?t.comparator:void 0)||function(t,e){return t-e},this.pageSize=(null!=t?t.pageSize:void 0)||512,this.length=0,s=0;1<a;0<=a?++r:--r)e.push(null);if(this._memory=[],this._mask=this.pageSize-1,t.initialValues)for(n=0,i=(o=t.initialValues).length;n0&&(this._write(1,e),this._bubbleDown(1,e)),t},t.prototype.peek=function(){return this._read(1)},t.prototype.clear=function(){this.length=0,this._memory.length=0},t.prototype._write=function(t,e){var r;for(r=t>>this._shift;r>=this._memory.length;)this._memory.push(this._emptyMemoryPageTemplate.slice(0));return this._memory[r][t&this._mask]=e},t.prototype._read=function(t){return this._memory[t>>this._shift][t&this._mask]},t.prototype._bubbleUp=function(t,e){var r,n,i,a;for(r=this.comparator;t>1&&(n=t&this._mask,t3?i=t&~this._mask|n>>1:n<2?(i=t-this.pageSize>>this._shift,i+=i&~(this._mask>>1),i|=this.pageSize>>1):i=t-2,!(r(a=this._read(i),e)<0));)this._write(i,e),this._write(t,a),t=i},t.prototype._bubbleDown=function(t,e){var r,n,i,a,o;for(o=this.comparator;tthis._mask&&!(t&this._mask-1)?r=n=t+2:t&this.pageSize>>1?(r=(t&~this._mask)>>1,n=1+(r=1+(r|=t&this._mask>>1)<0)for(t=e=1,r=this.data.length;1<=r?er;t=1<=r?++e:--e)this._bubbleUp(t)},t.prototype.queue=function(t){this.data.push(t),this._bubbleUp(this.data.length-1)},t.prototype.dequeue=function(){var t,e;return e=this.data[0],t=this.data.pop(),this.data.length>0&&(this.data[0]=t,this._bubbleDown(0)),e},t.prototype.peek=function(){return this.data[0]},t.prototype.clear=function(){this.length=0,this.data.length=0},t.prototype._bubbleUp=function(t){for(var e,r;t>0&&(e=t-1>>>1,this.comparator(this.data[t],this.data[e])<0);)r=this.data[e],this.data[e]=this.data[t],this.data[t]=r,t=e},t.prototype._bubbleDown=function(t){var e,r,n,i,a;for(e=this.data.length-1;i=1+(r=1+(t<<1)),n=t,r<=e&&this.comparator(this.data[r],this.data[n])<0&&(n=r),i<=e&&this.comparator(this.data[i],this.data[n])<0&&(n=i),n!==t;)a=this.data[n],this.data[n]=this.data[t],this.data[t]=a,t=n},t}()},{}]},{},[1])(1)},55733:(t,e,r)=>{t.exports=function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[o]={exports:{}};e[o][0].call(l.exports,(function(t){return i(e[o][1][t]||t)}),l,l.exports,t,e,r,n)}return r[o].exports}for(var a=void 0,o=0;o>2,s=(3&e)<<4|r>>4,c=1>6:64,l=2>4,r=(15&o)<<4|(s=a.indexOf(t.charAt(l++)))>>2,n=(3&s)<<6|(c=a.indexOf(t.charAt(l++))),f[u++]=e,64!==s&&(f[u++]=r),64!==c&&(f[u++]=n);return f}},{"./support":30,"./utils":32}],2:[function(t,e,r){"use strict";var n=t("./external"),i=t("./stream/DataWorker"),a=t("./stream/Crc32Probe"),o=t("./stream/DataLengthProbe");function s(t,e,r,n,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=n,this.compressedContent=i}s.prototype={getContentWorker:function(){var t=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(t,e,r){return t.pipe(new a).pipe(new o("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new o("compressedSize")).withStreamInfo("compression",e)},e.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){"use strict";var n=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){"use strict";var n=t("./utils"),i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==n.getTypeOf(t)?function(t,e,r,n){var a=i,o=0+r;t^=-1;for(var s=0;s>>8^a[255&(t^e[s])];return-1^t}(0|e,t,t.length):function(t,e,r,n){var a=i,o=0+r;t^=-1;for(var s=0;s>>8^a[255&(t^e.charCodeAt(s))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var n;n="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:n}},{lie:37}],7:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=t("pako"),a=t("./utils"),o=t("./stream/GenericWorker"),s=n?"uint8array":"array";function c(t,e){o.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\b\0",a.inherits(c,o),c.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(a.transformTo(s,t.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(t){return new c("Deflate",t)},r.uncompressWorker=function(){return new c("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){"use strict";function n(t,e){var r,n="";for(r=0;r>>=8;return n}function i(t,e,r,i,o,u){var h,f,d=t.file,p=t.compression,m=u!==s.utf8encode,g=a.transformTo("string",u(d.name)),A=a.transformTo("string",s.utf8encode(d.name)),v=d.comment,y=a.transformTo("string",u(v)),b=a.transformTo("string",s.utf8encode(v)),x=A.length!==d.name.length,w=b.length!==v.length,_="",E="",M="",S=d.dir,C=d.date,T={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(T.crc32=t.crc32,T.compressedSize=t.compressedSize,T.uncompressedSize=t.uncompressedSize);var I=0;e&&(I|=8),m||!x&&!w||(I|=2048);var R=0,B=0;S&&(R|=16),"UNIX"===o?(B=798,R|=function(t,e){var r=t;return t||(r=e?16893:33204),(65535&r)<<16}(d.unixPermissions,S)):(B=20,R|=function(t){return 63&(t||0)}(d.dosPermissions)),h=C.getUTCHours(),h<<=6,h|=C.getUTCMinutes(),h<<=5,h|=C.getUTCSeconds()/2,f=C.getUTCFullYear()-1980,f<<=4,f|=C.getUTCMonth()+1,f<<=5,f|=C.getUTCDate(),x&&(E=n(1,1)+n(c(g),4)+A,_+="up"+n(E.length,2)+E),w&&(M=n(1,1)+n(c(y),4)+b,_+="uc"+n(M.length,2)+M);var k="";return k+="\n\0",k+=n(I,2),k+=p.magic,k+=n(h,2),k+=n(f,2),k+=n(T.crc32,4),k+=n(T.compressedSize,4),k+=n(T.uncompressedSize,4),k+=n(g.length,2),k+=n(_.length,2),{fileRecord:l.LOCAL_FILE_HEADER+k+g+_,dirRecord:l.CENTRAL_FILE_HEADER+n(B,2)+k+n(y.length,2)+"\0\0\0\0"+n(R,4)+n(i,4)+g+_+y}}var a=t("../utils"),o=t("../stream/GenericWorker"),s=t("../utf8"),c=t("../crc32"),l=t("../signature");function u(t,e,r,n){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,o.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-n-1))/r:100}}))},u.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=i(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:function(t){return l.DATA_DESCRIPTOR+n(t.crc32,4)+n(t.compressedSize,4)+n(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return n.transformTo("string",this.readData(t))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=i},{"../utils":32}],19:[function(t,e,r){"use strict";var n=t("./Uint8ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){"use strict";var n=t("./DataReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},i.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},i.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){"use strict";var n=t("./ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../support"),a=t("./ArrayReader"),o=t("./StringReader"),s=t("./NodeBufferReader"),c=t("./Uint8ArrayReader");e.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new s(t):i.uint8array?new c(n.transformTo("uint8array",t)):new a(n.transformTo("array",t)):new o(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../utils");function a(t){n.call(this,"ConvertWorker to "+t),this.destType=t}i.inherits(a,n),a.prototype.processChunk=function(t){this.push({data:i.transformTo(this.destType,t.data),meta:t.meta})},e.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../crc32");function a(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(a,n),a.prototype.processChunk=function(t){this.streamInfo.crc32=i(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function a(t){i.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}n.inherits(a,i),a.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}i.prototype.processChunk.call(this,t)},e.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function a(t){i.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=n.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}n.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){"use strict";function n(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r "+t:t}},e.exports=n},{}],29:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./ConvertWorker"),a=t("./GenericWorker"),o=t("../base64"),s=t("../support"),c=t("../external"),l=null;if(s.nodestream)try{l=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function u(t,e,r){var o=e;switch(e){case"blob":case"arraybuffer":o="uint8array";break;case"base64":o="string"}try{this._internalType=o,this._outputType=e,this._mimeType=r,n.checkSupport(o),this._worker=t.pipe(new i(o)),t.lock()}catch(t){this._worker=new a("error"),this._worker.error(t)}}u.prototype={accumulate:function(t){return function(t,e){return new c.Promise((function(r,i){var a=[],s=t._internalType,c=t._outputType,l=t._mimeType;t.on("data",(function(t,r){a.push(t),e&&e(r)})).on("error",(function(t){a=[],i(t)})).on("end",(function(){try{var t=function(t,e,r){switch(t){case"blob":return n.newBlob(n.transformTo("arraybuffer",e),r);case"base64":return o.encode(e);default:return n.transformTo(t,e)}}(c,function(t,e){var r,n=0,i=null,a=0;for(r=0;r>>6:(r<65536?e[o++]=224|r>>>12:(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63),e[o++]=128|r>>>6&63),e[o++]=128|63&r);return e}(t)},r.utf8decode=function(t){return i.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,a,o=t.length,c=new Array(2*o);for(e=r=0;e>10&1023,c[r++]=56320|1023&i)}return c.length!==r&&(c.subarray?c=c.subarray(0,r):c.length=r),n.applyFromCharCode(c)}(t=n.transformTo(i.uint8array?"uint8array":"array",t))},n.inherits(l,o),l.prototype.processChunk=function(t){var e=n.transformTo(i.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=e;(e=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),e.set(a,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var o=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+s[t[r]]>e?r:e}(e),c=e;o!==e.length&&(i.uint8array?(c=e.subarray(0,o),this.leftOver=e.subarray(o,e.length)):(c=e.slice(0,o),this.leftOver=e.slice(o,e.length))),this.push({data:r.utf8decode(c),meta:t.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=l,n.inherits(u,o),u.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,r){"use strict";var n=t("./support"),i=t("./base64"),a=t("./nodejsUtils"),o=t("./external");function s(t){return t}function c(t,e){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var t=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4>>6:(r<65536?e[o++]=224|r>>>12:(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63),e[o++]=128|r>>>6&63),e[o++]=128|63&r);return e},r.buf2binstring=function(t){return c(t,t.length)},r.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r>10&1023,l[n++]=56320|1023&i)}return c(l,n)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+o[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){for(var i=65535&t|0,a=t>>>16&65535|0,o=0;0!==r;){for(r-=o=2e3>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,i){var a=n,o=i+r;t^=-1;for(var s=i;s>>8^a[255&(t^e[s])];return-1^t}},{}],46:[function(t,e,r){"use strict";var n,i=t("../utils/common"),a=t("./trees"),o=t("./adler32"),s=t("./crc32"),c=t("./messages"),l=0,u=0,h=-2,f=2,d=8,p=286,m=30,g=19,A=2*p+1,v=15,y=3,b=258,x=b+y+1,w=42,_=113;function E(t,e){return t.msg=c[e],e}function M(t){return(t<<1)-(4t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function T(t,e){a._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,C(t.strm)}function I(t,e){t.pending_buf[t.pending++]=e}function R(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function B(t,e){var r,n,i=t.max_chain_length,a=t.strstart,o=t.prev_length,s=t.nice_match,c=t.strstart>t.w_size-x?t.strstart-(t.w_size-x):0,l=t.window,u=t.w_mask,h=t.prev,f=t.strstart+b,d=l[a+o-1],p=l[a+o];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(l[(r=e)+o]===p&&l[r+o-1]===d&&l[r]===l[a]&&l[++r]===l[a+1]){a+=2,r++;do{}while(l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&ac&&0!=--i);return o<=t.lookahead?o:t.lookahead}function k(t){var e,r,n,a,c,l,u,h,f,d,p=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-x)){for(i.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,e=r=t.hash_size;n=t.head[--e],t.head[e]=p<=n?n-p:0,--r;);for(e=r=p;n=t.prev[--e],t.prev[e]=p<=n?n-p:0,--r;);a+=p}if(0===t.strm.avail_in)break;if(l=t.strm,u=t.window,h=t.strstart+t.lookahead,d=void 0,(f=a)<(d=l.avail_in)&&(d=f),r=0===d?0:(l.avail_in-=d,i.arraySet(u,l.input,l.next_in,d,h),1===l.state.wrap?l.adler=o(l.adler,u,d,h):2===l.state.wrap&&(l.adler=s(l.adler,u,d,h)),l.next_in+=d,l.total_in+=d,d),t.lookahead+=r,t.lookahead+t.insert>=y)for(c=t.strstart-t.insert,t.ins_h=t.window[c],t.ins_h=(t.ins_h<=y&&(t.ins_h=(t.ins_h<=y)if(n=a._tr_tally(t,t.strstart-t.match_start,t.match_length-y),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=y){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=y&&(t.ins_h=(t.ins_h<=y&&t.match_length<=t.prev_length){for(i=t.strstart+t.lookahead-y,n=a._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-y),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=i&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(k(t),0===t.lookahead&&e===l)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,T(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-x&&(T(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(T(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(T(t,!1),t.strm.avail_out),1)})),new D(4,4,8,4,L),new D(4,5,16,8,L),new D(4,6,32,32,L),new D(4,4,16,16,P),new D(8,16,32,32,P),new D(8,16,128,128,P),new D(8,32,128,256,P),new D(32,128,258,1024,P),new D(32,258,258,4096,P)],r.deflateInit=function(t,e){return N(t,e,d,15,8,0)},r.deflateInit2=N,r.deflateReset=F,r.deflateResetKeep=O,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?h:(t.state.gzhead=e,u):h},r.deflate=function(t,e){var r,i,o,c;if(!t||!t.state||5>8&255),I(i,i.gzhead.time>>16&255),I(i,i.gzhead.time>>24&255),I(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),I(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(I(i,255&i.gzhead.extra.length),I(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(I(i,0),I(i,0),I(i,0),I(i,0),I(i,0),I(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),I(i,3),i.status=_);else{var f=d+(i.w_bits-8<<4)<<8;f|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=_,R(i,f),0!==i.strstart&&(R(i,t.adler>>>16),R(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),C(t),o=i.pending,i.pending!==i.pending_buf_size));)I(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),C(t),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),0===c&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),C(t),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),0===c&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&C(t),i.pending+2<=i.pending_buf_size&&(I(i,255&t.adler),I(i,t.adler>>8&255),t.adler=0,i.status=_)):i.status=_),0!==i.pending){if(C(t),0===t.avail_out)return i.last_flush=-1,u}else if(0===t.avail_in&&M(e)<=M(r)&&4!==e)return E(t,-5);if(666===i.status&&0!==t.avail_in)return E(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==l&&666!==i.status){var p=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(k(t),0===t.lookahead)){if(e===l)return 1;break}if(t.match_length=0,r=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(T(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(T(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,o,s=t.window;;){if(t.lookahead<=b){if(k(t),t.lookahead<=b&&e===l)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=y&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=y?(r=a._tr_tally(t,1,t.match_length-y),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(T(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(T(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==p&&4!==p||(i.status=666),1===p||3===p)return 0===t.avail_out&&(i.last_flush=-1),u;if(2===p&&(1===e?a._tr_align(i):5!==e&&(a._tr_stored_block(i,0,0,!1),3===e&&(S(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),C(t),0===t.avail_out))return i.last_flush=-1,u}return 4!==e?u:i.wrap<=0?1:(2===i.wrap?(I(i,255&t.adler),I(i,t.adler>>8&255),I(i,t.adler>>16&255),I(i,t.adler>>24&255),I(i,255&t.total_in),I(i,t.total_in>>8&255),I(i,t.total_in>>16&255),I(i,t.total_in>>24&255)):(R(i,t.adler>>>16),R(i,65535&t.adler)),C(t),0=r.w_size&&(0===s&&(S(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,e,p-r.w_size,r.w_size,0),e=d,p=r.w_size),c=t.avail_in,l=t.next_in,f=t.input,t.avail_in=p,t.next_in=0,t.input=e,k(r);r.lookahead>=y;){for(n=r.strstart,a=r.lookahead-(y-1);r.ins_h=(r.ins_h<>>=b=y>>>24,p-=b,0==(b=y>>>16&255))S[a++]=65535&y;else{if(!(16&b)){if(0==(64&b)){y=m[(65535&y)+(d&(1<>>=b,p-=b),p<15&&(d+=M[n++]<>>=b=y>>>24,p-=b,!(16&(b=y>>>16&255))){if(0==(64&b)){y=g[(65535&y)+(d&(1<>>=b,p-=b,(b=a-o)>3,d&=(1<<(p-=x<<3))-1,t.next_in=n,t.next_out=a,t.avail_in=n>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function p(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function m(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=u,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(h),e.distcode=e.distdyn=new n.Buf32(f),e.sane=1,e.back=-1,c):l}function g(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,m(t)):l}function A(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=o.wsize?(n.arraySet(o.window,e,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),n.arraySet(o.window,e,r-i,a,o.wnext),(i-=a)?(n.arraySet(o.window,e,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=a(r.check,F,2,0),y=v=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&v)<<8)+(v>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&v)){t.msg="unknown compression method",r.mode=30;break}if(y-=4,L=8+(15&(v>>>=4)),0===r.wbits)r.wbits=L;else if(L>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(F[0]=255&v,F[1]=v>>>8&255,r.check=a(r.check,F,2,0)),y=v=0,r.mode=3;case 3:for(;y<32;){if(0===g)break t;g--,v+=h[p++]<>>8&255,F[2]=v>>>16&255,F[3]=v>>>24&255,r.check=a(r.check,F,4,0)),y=v=0,r.mode=4;case 4:for(;y<16;){if(0===g)break t;g--,v+=h[p++]<>8),512&r.flags&&(F[0]=255&v,F[1]=v>>>8&255,r.check=a(r.check,F,2,0)),y=v=0,r.mode=5;case 5:if(1024&r.flags){for(;y<16;){if(0===g)break t;g--,v+=h[p++]<>>8&255,r.check=a(r.check,F,2,0)),y=v=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(g<(E=r.length)&&(E=g),E&&(r.head&&(L=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,h,p,E,L)),512&r.flags&&(r.check=a(r.check,h,E,p)),g-=E,p+=E,r.length-=E),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break t;for(E=0;L=h[p+E++],r.head&&L&&r.length<65536&&(r.head.name+=String.fromCharCode(L)),L&&E>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;y<32;){if(0===g)break t;g--,v+=h[p++]<>>=7&y,y-=7&y,r.mode=27;break}for(;y<3;){if(0===g)break t;g--,v+=h[p++]<>>=1)){case 0:r.mode=14;break;case 1:if(w(r),r.mode=20,6!==e)break;v>>>=2,y-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}v>>>=2,y-=2;break;case 14:for(v>>>=7&y,y-=7&y;y<32;){if(0===g)break t;g--,v+=h[p++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&v,y=v=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(E=r.length){if(g>>=5,y-=5,r.ndist=1+(31&v),v>>>=5,y-=5,r.ncode=4+(15&v),v>>>=4,y-=4,286>>=3,y-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,D={bits:r.lenbits},P=s(0,r.lens,0,19,r.lencode,0,r.work,D),r.lenbits=D.bits,P){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,I=65535&O,!((C=O>>>24)<=y);){if(0===g)break t;g--,v+=h[p++]<>>=C,y-=C,r.lens[r.have++]=I;else{if(16===I){for(U=C+2;y>>=C,y-=C,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}L=r.lens[r.have-1],E=3+(3&v),v>>>=2,y-=2}else if(17===I){for(U=C+3;y>>=C)),v>>>=3,y-=3}else{for(U=C+7;y>>=C)),v>>>=7,y-=7}if(r.have+E>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;E--;)r.lens[r.have++]=L}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,D={bits:r.lenbits},P=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,D),r.lenbits=D.bits,P){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,D={bits:r.distbits},P=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,D),r.distbits=D.bits,P){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=g&&258<=A){t.next_out=m,t.avail_out=A,t.next_in=p,t.avail_in=g,r.hold=v,r.bits=y,o(t,x),m=t.next_out,f=t.output,A=t.avail_out,p=t.next_in,h=t.input,g=t.avail_in,v=r.hold,y=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;T=(O=r.lencode[v&(1<>>16&255,I=65535&O,!((C=O>>>24)<=y);){if(0===g)break t;g--,v+=h[p++]<>R)])>>>16&255,I=65535&O,!(R+(C=O>>>24)<=y);){if(0===g)break t;g--,v+=h[p++]<>>=R,y-=R,r.back+=R}if(v>>>=C,y-=C,r.back+=C,r.length=I,0===T){r.mode=26;break}if(32&T){r.back=-1,r.mode=12;break}if(64&T){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&T,r.mode=22;case 22:if(r.extra){for(U=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;T=(O=r.distcode[v&(1<>>16&255,I=65535&O,!((C=O>>>24)<=y);){if(0===g)break t;g--,v+=h[p++]<>R)])>>>16&255,I=65535&O,!(R+(C=O>>>24)<=y);){if(0===g)break t;g--,v+=h[p++]<>>=R,y-=R,r.back+=R}if(v>>>=C,y-=C,r.back+=C,64&T){t.msg="invalid distance code",r.mode=30;break}r.offset=I,r.extra=15&T,r.mode=24;case 24:if(r.extra){for(U=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===A)break t;if(E=x-A,r.offset>E){if((E=r.offset-E)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}M=E>r.wnext?(E-=r.wnext,r.wsize-E):r.wnext-E,E>r.length&&(E=r.length),S=r.window}else S=f,M=m-r.offset,E=r.length;for(Av?(b=O[F+h[E]],L[P+h[E]]):(b=96,0),d=1<<_-I,M=p=1<>I)+(p-=d)]=y<<24|b<<16|x|0,0!==p;);for(d=1<<_-1;k&d;)d>>=1;if(0!==d?(k&=d-1,k+=d):k=0,E++,0==--D[_]){if(_===S)break;_=e[r+h[E]]}if(C<_&&(k&g)!==m){for(0===I&&(I=C),A+=M,R=1<<(T=_-I);T+I>>7)]}function S(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function C(t,e,r){t.bi_valid>l-r?(t.bi_buf|=e<>l-t.bi_valid,t.bi_valid+=r-l):(t.bi_buf|=e<>>=1,r<<=1,0<--e;);return r>>>1}function R(t,e,r){var n,i,a=new Array(c+1),o=0;for(n=1;n<=c;n++)a[n]=o=o+r[n-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=I(a[s]++,s))}}function B(t){var e;for(e=0;e>1;1<=r;r--)P(t,a,r);for(i=l;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],P(t,a,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,a[2*i]=a[2*r]+a[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,a[2*r+1]=a[2*n+1]=i,t.heap[1]=i++,P(t,a,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,a,o,s,l=e.dyn_tree,u=e.max_code,h=e.stat_desc.static_tree,f=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,m=e.stat_desc.max_length,g=0;for(a=0;a<=c;a++)t.bl_count[a]=0;for(l[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)m<(a=l[2*l[2*(n=t.heap[r])+1]+1]+1)&&(a=m,g++),l[2*n+1]=a,u>=7;n>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?z(t,e,r,n):4===t.strategy||o===i?(C(t,2+(n?1:0),3),D(t,p,m)):(C(t,4+(n?1:0),3),function(t,e,r,n){var i;for(C(t,e-257,5),C(t,r-1,5),C(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(A[r]+a+1)]++,t.dyn_dtree[2*M(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){C(t,2,3),T(t,256,p),function(t){16===t.bi_valid?(S(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,n){(function(t){!function(t,e){"use strict";if(!t.setImmediate){var r,n,i,a,o=1,s={},c=!1,l=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,r="[object process]"==={}.toString.call(t.process)?function(t){process.nextTick((function(){f(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?(a="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",d,!1):t.attachEvent("onmessage",d),function(e){t.postMessage(a+e,"*")}):t.MessageChannel?((i=new MessageChannel).port1.onmessage=function(t){f(t.data)},function(t){i.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(n=l.documentElement,function(t){var e=l.createElement("script");e.onreadystatechange=function(){f(t),e.onreadystatechange=null,n.removeChild(e),e=null},n.appendChild(e)}):function(t){setTimeout(f,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n{"use strict";var n=r(25705);function i(){}var a={},o=["REJECTED"],s=["FULFILLED"],c=["PENDING"];function l(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,t!==i&&d(this,t)}function u(t,e,r){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function h(t,e,r){n((function(){var n;try{n=e(r)}catch(e){return a.reject(t,e)}n===t?a.reject(t,new TypeError("Cannot resolve promise with itself")):a.resolve(t,n)}))}function f(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function d(t,e){var r=!1;function n(e){r||(r=!0,a.reject(t,e))}function i(e){r||(r=!0,a.resolve(t,e))}var o=p((function(){e(i,n)}));"error"===o.status&&n(o.value)}function p(t,e){var r={};try{r.value=t(e),r.status="success"}catch(t){r.status="error",r.value=t}return r}t.exports=l,l.prototype.finally=function(t){if("function"!=typeof t)return this;var e=this.constructor;return this.then((function(r){return e.resolve(t()).then((function(){return r}))}),(function(r){return e.resolve(t()).then((function(){throw r}))}))},l.prototype.catch=function(t){return this.then(null,t)},l.prototype.then=function(t,e){if("function"!=typeof t&&this.state===s||"function"!=typeof e&&this.state===o)return this;var r=new this.constructor(i);return this.state!==c?h(r,this.state===s?t:e,this.outcome):this.queue.push(new u(r,t,e)),r},u.prototype.callFulfilled=function(t){a.resolve(this.promise,t)},u.prototype.otherCallFulfilled=function(t){h(this.promise,this.onFulfilled,t)},u.prototype.callRejected=function(t){a.reject(this.promise,t)},u.prototype.otherCallRejected=function(t){h(this.promise,this.onRejected,t)},a.resolve=function(t,e){var r=p(f,e);if("error"===r.status)return a.reject(t,r.value);var n=r.value;if(n)d(t,n);else{t.state=s,t.outcome=e;for(var i=-1,o=t.queue.length;++i{r(29718);var n=r(6941).s;function i(t){var e=new n;return(e.write(t)+e.end()).replace(/\0/g,"").trim()}t.exports=function t(e,r){if(!e)return i;try{new TextDecoder(e.trim())}catch(o){var n=a.exec(e);return n&&!r?t("windows-"+n[1],!0):i}return function(t){var r=new TextDecoder(e);return(r.decode(t,{stream:!0})+r.decode()).replace(/\0/g,"").trim()}};var a=/^(?:ANSI\s)?(\d+)$/m},9462:(t,e,r)=>{var n=r(11392);function i(t,e,r,n,i){var a=i(t.slice(e,e+r));switch(n){case"N":case"F":case"O":return parseFloat(a,10);case"D":return new Date(a.slice(0,4),parseInt(a.slice(4,6),10)-1,a.slice(6,8));case"L":return"y"===a.toLowerCase()||"t"===a.toLowerCase();default:return a}}function a(t,e,r,n){for(var a,o,s={},c=0,l=r.length;c{"use strict";t.exports=i;var n=r(80645);function i(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var a=4294967296,o=1/a,s="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function c(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function l(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function u(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function h(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function w(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>3,a=this.pos;this.type=7&n,t(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=w(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=b(this.buf,this.pos)+b(this.buf,this.pos+4)*a;return this.pos+=8,t},readSFixed64:function(){var t=b(this.buf,this.pos)+w(this.buf,this.pos+4)*a;return this.pos+=8,t},readFloat:function(){var t=n.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=n.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,a=r.buf;if(n=(112&(i=a[r.pos++]))>>4,i<128)return l(t,n,e);if(n|=(127&(i=a[r.pos++]))<<3,i<128)return l(t,n,e);if(n|=(127&(i=a[r.pos++]))<<10,i<128)return l(t,n,e);if(n|=(127&(i=a[r.pos++]))<<17,i<128)return l(t,n,e);if(n|=(127&(i=a[r.pos++]))<<24,i<128)return l(t,n,e);if(n|=(1&(i=a[r.pos++]))<<31,i<128)return l(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&s?function(t,e,r){return s.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){for(var n="",i=e;i239?4:c>223?3:c>191?2:1;if(i+u>r)break;1===u?c<128&&(l=c):2===u?128==(192&(a=t[i+1]))&&(l=(31&c)<<6|63&a)<=127&&(l=null):3===u?(a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&((l=(15&c)<<12|(63&a)<<6|63&o)<=2047||l>=55296&&l<=57343)&&(l=null)):4===u&&(a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&((l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,u=1):l>65535&&(l-=65536,n+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),n+=String.fromCharCode(l),i+=u}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==i.Bytes)return t.push(this.readVarint(e));var r=c(this);for(t=t||[];this.pos127;);else if(e===i.Bytes)this.pos=this.readVarint()+this.pos;else if(e===i.Fixed32)this.pos+=4;else{if(e!==i.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0?function(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,a=0;a55295&&n<57344){if(!i){n>56319||a+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&u(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),n.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),n.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&u(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,i.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,m,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,A,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,v,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,y,e)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},24472:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>rr});var n=1,i=2,a=3,o=5,s=6378137,c=6356752.314,l=.0066943799901413165,u=484813681109536e-20,h=Math.PI/2,f=1e-10,d=.017453292519943295,p=57.29577951308232,m=Math.PI/4,g=2*Math.PI,A=3.14159265359,v={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};const y={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var b=/[\s_\-\/\(\)]/g;function x(t,e){if(t[e])return t[e];for(var r,n=Object.keys(t),i=e.toLowerCase().replace(b,""),a=-1;++a=this.text.length)return;t=this.text[this.place++]}switch(this.state){case E:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},R.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(T.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},R.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=E)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=E,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},R.prototype.number=function(t){if(!I.test(t)){if(T.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},R.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},R.prototype.keyword=function(t){if(C.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=E)}if(!T.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},R.prototype.neutral=function(t){if(S.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(I.test(t))return this.word=t,void(this.state=3);if(!T.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},R.prototype.output=function(){for(;this.place0?90:-90)):(t.lat0=P(t.lat1>0?90:-90),t.lat_ts=t.lat1)}(i),i}function U(t){var e=this;if(2===arguments.length){var r=arguments[1];"string"==typeof r?"+"===r.charAt(0)?U[t]=w(arguments[1]):U[t]=D(arguments[1]):U[t]=r}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?U.apply(e,t):U(t)}));if("string"==typeof t){if(t in U)return U[t]}else"EPSG"in t?U["EPSG:"+t.EPSG]=t:"ESRI"in t?U["ESRI:"+t.ESRI]=t:"IAU2000"in t?U["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(U);const O=U;var F=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"],N=["3857","900913","3785","102113"];function z(t,e){var r,n;if(t=t||{},!e)return t;for(n in e)void 0!==(r=e[n])&&(t[n]=r);return t}function G(t,e,r){var n=t*e;return r/Math.sqrt(1-n*n)}function Z(t){return t<0?-1:1}function V(t){return Math.abs(t)<=A?t:t-Z(t)*g}function Q(t,e,r){var n=t*r,i=.5*t;return n=Math.pow((1-n)/(1+n),i),Math.tan(.5*(h-e))/n}function j(t,e){for(var r,n,i=.5*t,a=h-2*Math.atan(e),o=0;o<=15;o++)if(r=t*Math.sin(a),a+=n=h-2*Math.atan(e*Math.pow((1-r)/(1+r),i))-a,Math.abs(n)<=1e-10)return a;return-9999}function W(t){return t}var H=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=G(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var e,r,n=t.x,i=t.y;if(i*p>90&&i*p<-90&&n*p>180&&n*p<-180)return null;if(Math.abs(Math.abs(i)-h)<=f)return null;if(this.sphere)e=this.x0+this.a*this.k0*V(n-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(m+.5*i));else{var a=Math.sin(i),o=Q(this.e,i,a);e=this.x0+this.a*this.k0*V(n-this.long0),r=this.y0-this.a*this.k0*Math.log(o)}return t.x=e,t.y=r,t},inverse:function(t){var e,r,n=t.x-this.x0,i=t.y-this.y0;if(this.sphere)r=h-2*Math.atan(Math.exp(-i/(this.a*this.k0)));else{var a=Math.exp(-i/(this.a*this.k0));if(-9999===(r=j(this.e,a)))return null}return e=V(this.long0+n/(this.a*this.k0)),t.x=e,t.y=r,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:W,inverse:W,names:["longlat","identity"]}],X={},q=[];function Y(t,e){var r=q.length;return t.names?(q[r]=t,t.names.forEach((function(t){X[t.toLowerCase()]=r})),this):(console.log(e),!0)}const J={start:function(){H.forEach(Y)},add:Y,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==X[e]&&q[X[e]]?q[X[e]]:void 0}};var K={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},$=K.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};K.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var tt={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}};var et={};function rt(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:et[t]||null,isNull:!1}}function nt(t){return t/3600*Math.PI/180}function it(t,e,r){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,r)))}function at(t){return t.map((function(t){return[nt(t.longitudeShift),nt(t.latitudeShift)]}))}function ot(t,e,r){return{name:it(t,e+8,e+16).trim(),parent:it(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,r),upperLatitude:t.getFloat64(e+88,r),lowerLongitude:t.getFloat64(e+104,r),upperLongitude:t.getFloat64(e+120,r),latitudeInterval:t.getFloat64(e+136,r),longitudeInterval:t.getFloat64(e+152,r),gridNodeCount:t.getInt32(e+168,r)}}function st(t,e,r,n){for(var i=e+176,a=[],o=0;o-1}))}(t)){var e=D(t);if(function(t){var e=x(t,"authority");if(e){var r=x(e,"epsg");return r&&N.indexOf(r)>-1}}(e))return O["EPSG:3857"];var r=function(t){var e=x(t,"extension");if(e)return x(e,"proj4")}(e);return r?w(r):e}return function(t){return"+"===t[0]}(t)?w(t):void 0}(t);if("object"==typeof r){var s=ct.projections.get(r.projName);if(s){if(r.datumCode&&"none"!==r.datumCode){var c=x(tt,r.datumCode);c&&(r.datum_params=r.datum_params||(c.towgs84?c.towgs84.split(","):null),r.ellps=c.ellipse,r.datumName=c.datumName?c.datumName:r.datumCode)}r.k0=r.k0||1,r.axis=r.axis||"enu",r.ellps=r.ellps||"wgs84",r.lat1=r.lat1||r.lat0;var l,h,d,p,m,g,A=function(t,e,r,n,i){if(!t){var a=x(K,n);a||(a=$),t=a.a,e=a.b,r=a.rf}return r&&!e&&(e=(1-1/r)*t),(0===r||Math.abs(t-e)3&&(0===f.datum_params[3]&&0===f.datum_params[4]&&0===f.datum_params[5]&&0===f.datum_params[6]||(f.datum_type=i,f.datum_params[3]*=u,f.datum_params[4]*=u,f.datum_params[5]*=u,f.datum_params[6]=f.datum_params[6]/1e6+1))),h&&(f.datum_type=a,f.grids=h),f.a=r,f.b=s,f.es=c,f.ep2=l,f}(r.datumCode,r.datum_params,A.a,A.b,v.es,v.ep2,y);z(this,r),z(this,s),this.a=A.a,this.b=A.b,this.rf=A.rf,this.sphere=A.sphere,this.es=v.es,this.e=v.e,this.ep2=v.ep2,this.datum=b,this.init(),e(null,this)}else e(t)}else e(t)}ct.projections=J,ct.projections.start();const lt=ct;function ut(t,e,r){var n,i,a,o,s=t.x,c=t.y,l=t.z?t.z:0;if(c<-h&&c>-1.001*h)c=-h;else if(c>h&&c<1.001*h)c=h;else{if(c<-h)return{x:-1/0,y:-1/0,z:t.z};if(c>h)return{x:1/0,y:1/0,z:t.z}}return s>Math.PI&&(s-=2*Math.PI),i=Math.sin(c),o=Math.cos(c),a=i*i,{x:((n=r/Math.sqrt(1-e*a))+l)*o*Math.cos(s),y:(n+l)*o*Math.sin(s),z:(n*(1-e)+l)*i}}function ht(t,e,r,n){var i,a,o,s,c,l,u,h,f,d,p,m,g,A,v,y=t.x,b=t.y,x=t.z?t.z:0;if(i=Math.sqrt(y*y+b*b),a=Math.sqrt(y*y+b*b+x*x),i/r<1e-12){if(A=0,a/r<1e-12)return v=-n,{x:t.x,y:t.y,z:t.z}}else A=Math.atan2(b,y);o=x/a,h=(s=i/a)*(1-e)*(c=1/Math.sqrt(1-e*(2-e)*s*s)),f=o*c,g=0;do{g++,l=e*(u=r/Math.sqrt(1-e*f*f))/(u+(v=i*h+x*f-u*(1-e*f*f))),m=(p=o*(c=1/Math.sqrt(1-l*(2-l)*s*s)))*h-(d=s*(1-l)*c)*f,h=d,f=p}while(m*m>1e-24&&g<30);return{x:A,y:Math.atan(p/Math.abs(d)),z:v}}function ft(t){return t===n||t===i}function dt(t,e,r){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;var n={x:-r.x,y:r.y},i={x:Number.NaN,y:Number.NaN},a=[];t:for(var o=0;on.y||d>n.x||A1e-12&&Math.abs(o.y)>1e-12);if(c<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=V(a.x+r.ll[0]),n.y=a.y+r.ll[1]}else isNaN(a.x)||(n.x=t.x+a.x,n.y=t.y+a.y);return n}function mt(t,e){var r,n={x:t.x/e.del[0],y:t.y/e.del[1]},i=Math.floor(n.x),a=Math.floor(n.y),o=n.x-1*i,s=n.y-1*a,c={x:Number.NaN,y:Number.NaN};if(i<0||i>=e.lim[0])return c;if(a<0||a>=e.lim[1])return c;r=a*e.lim[0]+i;var l=e.cvs[r][0],u=e.cvs[r][1];r++;var h=e.cvs[r][0],f=e.cvs[r][1];r+=e.lim[0];var d=e.cvs[r][0],p=e.cvs[r][1];r--;var m=e.cvs[r][0],g=e.cvs[r][1],A=o*s,v=o*(1-s),y=(1-o)*(1-s),b=(1-o)*s;return c.x=y*l+v*h+b*m+A*d,c.y=y*u+v*f+b*g+A*p,c}function gt(t,e,r){var n,i,a,o=r.x,s=r.y,c=r.z||0,l={};for(a=0;a<3;a++)if(!e||2!==a||void 0!==r.z)switch(0===a?(n=o,i=-1!=="ew".indexOf(t.axis[a])?"x":"y"):1===a?(n=s,i=-1!=="ns".indexOf(t.axis[a])?"y":"x"):(n=c,i="z"),t.axis[a]){case"e":case"n":l[i]=n;break;case"w":case"s":l[i]=-n;break;case"u":void 0!==r[i]&&(l.z=n);break;case"d":void 0!==r[i]&&(l.z=-n);break;default:return null}return l}function At(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}function vt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function yt(t,e,r,u){var h,f=void 0!==(r=Array.isArray(r)?At(r):{x:r.x,y:r.y,z:r.z,m:r.m}).z;if(function(t){vt(t.x),vt(t.y)}(r),t.datum&&e.datum&&function(t,e){return(t.datum.datum_type===n||t.datum.datum_type===i||t.datum.datum_type===a)&&"WGS84"!==e.datumCode||(e.datum.datum_type===n||e.datum.datum_type===i||e.datum.datum_type===a)&&"WGS84"!==t.datumCode}(t,e)&&(r=yt(t,h=new lt("WGS84"),r,u),t=h),u&&"enu"!==t.axis&&(r=gt(t,!1,r)),"longlat"===t.projName)r={x:r.x*d,y:r.y*d,z:r.z||0};else if(t.to_meter&&(r={x:r.x*t.to_meter,y:r.y*t.to_meter,z:r.z||0}),!(r=t.inverse(r)))return;if(t.from_greenwich&&(r.x+=t.from_greenwich),r=function(t,e,r){if(function(t,e){return t.datum_type===e.datum_type&&!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(t.datum_type===n?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:t.datum_type!==i||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6])}(t,e))return r;if(t.datum_type===o||e.datum_type===o)return r;var u=t.a,h=t.es;if(t.datum_type===a){if(0!==dt(t,!1,r))return;u=s,h=l}var f=e.a,d=e.b,p=e.es;return e.datum_type===a&&(f=s,d=c,p=l),h!==p||u!==f||ft(t.datum_type)||ft(e.datum_type)?(r=ut(r,h,u),ft(t.datum_type)&&(r=function(t,e,r){if(e===n)return{x:t.x+r[0],y:t.y+r[1],z:t.z+r[2]};if(e===i){var a=r[0],o=r[1],s=r[2],c=r[3],l=r[4],u=r[5],h=r[6];return{x:h*(t.x-u*t.y+l*t.z)+a,y:h*(u*t.x+t.y-c*t.z)+o,z:h*(-l*t.x+c*t.y+t.z)+s}}}(r,t.datum_type,t.datum_params)),ft(e.datum_type)&&(r=function(t,e,r){if(e===n)return{x:t.x-r[0],y:t.y-r[1],z:t.z-r[2]};if(e===i){var a=r[0],o=r[1],s=r[2],c=r[3],l=r[4],u=r[5],h=r[6],f=(t.x-a)/h,d=(t.y-o)/h,p=(t.z-s)/h;return{x:f+u*d-l*p,y:-u*f+d+c*p,z:l*f-c*d+p}}}(r,e.datum_type,e.datum_params)),r=ht(r,p,f,d),e.datum_type!==a||0===dt(e,!0,r)?r:void 0):r}(t.datum,e.datum,r))return e.from_greenwich&&(r={x:r.x-e.from_greenwich,y:r.y,z:r.z||0}),"longlat"===e.projName?r={x:r.x*p,y:r.y*p,z:r.z||0}:(r=e.forward(r),e.to_meter&&(r={x:r.x/e.to_meter,y:r.y/e.to_meter,z:r.z||0})),u&&"enu"!==e.axis?gt(e,!0,r):(r&&!f&&delete r.z,r)}var bt=lt("WGS84");function xt(t,e,r,n){var i,a,o;return Array.isArray(r)?(i=yt(t,e,r,n)||{x:NaN,y:NaN},r.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof i.z?[i.x,i.y,i.z].concat(r.splice(3)):[i.x,i.y,r[2]].concat(r.splice(3)):[i.x,i.y].concat(r.splice(2)):[i.x,i.y]):(a=yt(t,e,r,n),2===(o=Object.keys(r)).length||o.forEach((function(n){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;a[n]=r[n]})),a)}function wt(t){return t instanceof lt?t:t.oProj?t.oProj:lt(t)}const _t=function(t,e,r){t=wt(t);var n,i=!1;return void 0===e?(e=t,t=bt,i=!0):(void 0!==e.x||Array.isArray(e))&&(r=e,e=t,t=bt,i=!0),e=wt(e),r?xt(t,e,r):(n={forward:function(r,n){return xt(t,e,r,n)},inverse:function(r,n){return xt(e,t,r,n)}},i&&(n.oProj=e),n)};var Et=6,Mt="AJSAJS",St="AFAFAF",Ct=65,Tt=73,It=79,Rt=86,Bt=90;const kt={forward:Lt,inverse:function(t){var e=Ot(Nt(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]},toPoint:Pt};function Lt(t,e){return e=e||5,function(t,e){var r,n,i,a,o,s,c,l,u,h,f,d="00000"+t.easting,p="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(u=t.easting,h=t.northing,f=Ft(t.zoneNumber),r=Math.floor(u/1e5),n=Math.floor(h/1e5)%20,i=f-1,a=Mt.charCodeAt(i),o=St.charCodeAt(i),l=!1,(s=a+r-1)>Bt&&(s=s-Bt+Ct-1,l=!0),(s===Tt||aTt||(s>Tt||aIt||(s>It||aBt&&(s=s-Bt+Ct-1),(c=o+n)>Rt?(c=c-Rt+Ct-1,l=!0):l=!1,(c===Tt||oTt||(c>Tt||oIt||(c>It||oRt&&(c=c-Rt+Ct-1),String.fromCharCode(s)+String.fromCharCode(c))+d.substr(d.length-5,e)+p.substr(p.length-5,e)}(function(t){var e,r,n,i,a,o,s,c=t.lat,l=t.lon,u=6378137,h=.00669438,f=.9996,d=Dt(c),p=Dt(l);s=Math.floor((l+180)/6)+1,180===l&&(s=60),c>=56&&c<64&&l>=3&&l<12&&(s=32),c>=72&&c<84&&(l>=0&&l<9?s=31:l>=9&&l<21?s=33:l>=21&&l<33?s=35:l>=33&&l<42&&(s=37)),o=Dt(6*(s-1)-180+3),e=.006739496752268451,r=u/Math.sqrt(1-h*Math.sin(d)*Math.sin(d)),n=Math.tan(d)*Math.tan(d),i=e*Math.cos(d)*Math.cos(d);var m,g,A=f*r*((a=Math.cos(d)*(p-o))+(1-n+i)*a*a*a/6+(5-18*n+n*n+72*i-58*e)*a*a*a*a*a/120)+5e5,v=f*(u*(.9983242984503243*d-.002514607064228144*Math.sin(2*d)+2639046602129982e-21*Math.sin(4*d)-3.418046101696858e-9*Math.sin(6*d))+r*Math.tan(d)*(a*a/2+(5-n+9*i+4*i*i)*a*a*a*a/24+(61-58*n+n*n+600*i-2.2240339282485886)*a*a*a*a*a*a/720));return c<0&&(v+=1e7),{northing:Math.round(v),easting:Math.round(A),zoneNumber:s,zoneLetter:(m=c,g="Z",84>=m&&m>=72?g="X":72>m&&m>=64?g="W":64>m&&m>=56?g="V":56>m&&m>=48?g="U":48>m&&m>=40?g="T":40>m&&m>=32?g="S":32>m&&m>=24?g="R":24>m&&m>=16?g="Q":16>m&&m>=8?g="P":8>m&&m>=0?g="N":0>m&&m>=-8?g="M":-8>m&&m>=-16?g="L":-16>m&&m>=-24?g="K":-24>m&&m>=-32?g="J":-32>m&&m>=-40?g="H":-40>m&&m>=-48?g="G":-48>m&&m>=-56?g="F":-56>m&&m>=-64?g="E":-64>m&&m>=-72?g="D":-72>m&&m>=-80&&(g="C"),g)}}({lat:t[1],lon:t[0]}),e)}function Pt(t){var e=Ot(Nt(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function Dt(t){return t*(Math.PI/180)}function Ut(t){return t/Math.PI*180}function Ot(t){var e=t.northing,r=t.easting,n=t.zoneLetter,i=t.zoneNumber;if(i<0||i>60)return null;var a,o,s,c,l,u,h,f,d,p=.9996,m=6378137,g=.00669438,A=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),v=r-5e5,y=e;n<"N"&&(y-=1e7),h=6*(i-1)-180+3,a=.006739496752268451,d=(f=y/p/6367449.145945056)+(3*A/2-27*A*A*A/32)*Math.sin(2*f)+(21*A*A/16-55*A*A*A*A/32)*Math.sin(4*f)+151*A*A*A/96*Math.sin(6*f),o=m/Math.sqrt(1-g*Math.sin(d)*Math.sin(d)),s=Math.tan(d)*Math.tan(d),c=a*Math.cos(d)*Math.cos(d),l=.99330562*m/Math.pow(1-g*Math.sin(d)*Math.sin(d),1.5),u=v/(o*p);var b=d-o*Math.tan(d)/l*(u*u/2-(5+3*s+10*c-4*c*c-9*a)*u*u*u*u/24+(61+90*s+298*c+45*s*s-1.6983531815716497-3*c*c)*u*u*u*u*u*u/720);b=Ut(b);var x,w=(u-(1+2*s+c)*u*u*u/6+(5-2*c+28*s-3*c*c+8*a+24*s*s)*u*u*u*u*u/120)/Math.cos(d);if(w=h+Ut(w),t.accuracy){var _=Ot({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});x={top:_.lat,right:_.lon,bottom:b,left:w}}else x={lat:b,lon:w};return x}function Ft(t){var e=t%Et;return 0===e&&(e=Et),e}function Nt(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,r=t.length,n=null,i="",a=0;!/[A-Z]/.test(e=t.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+t;i+=e,a++}var o=parseInt(i,10);if(0===a||a+3>r)throw"MGRSPoint bad conversion from: "+t;var s=t.charAt(a++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+t;n=t.substring(a,a+=2);for(var c=Ft(o),l=function(t,e){for(var r=Mt.charCodeAt(e-1),n=1e5,i=!1;r!==t.charCodeAt(0);){if(++r===Tt&&r++,r===It&&r++,r>Bt){if(i)throw"Bad character: "+t;r=Ct,i=!0}n+=1e5}return n}(n.charAt(0),c),u=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var r=St.charCodeAt(e-1),n=0,i=!1;r!==t.charCodeAt(0);){if(++r===Tt&&r++,r===It&&r++,r>Rt){if(i)throw"Bad character: "+t;r=Ct,i=!0}n+=1e5}return n}(n.charAt(1),c);u0&&(f=1e5/Math.pow(10,m),d=t.substring(a,a+m),g=parseFloat(d)*f,p=t.substring(a+m),A=parseFloat(p)*f),{easting:g+l,northing:A+u,zoneLetter:s,zoneNumber:o,accuracy:f}}function zt(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function Gt(t,e,r){if(!(this instanceof Gt))return new Gt(t,e,r);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var n=t.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=t,this.y=e,this.z=r||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Gt.fromMGRS=function(t){return new Gt(Pt(t))},Gt.prototype.toMGRS=function(t){return Lt([this.x,this.y],t)};const Zt=Gt;var Vt=.046875,Qt=.01953125,jt=.01068115234375;function Wt(t){var e=[];e[0]=1-t*(.25+t*(Vt+t*(Qt+t*jt))),e[1]=t*(.75-t*(Vt+t*(Qt+t*jt)));var r=t*t;return e[2]=r*(.46875-t*(.013020833333333334+.007120768229166667*t)),r*=t,e[3]=r*(.3645833333333333-.005696614583333333*t),e[4]=r*t*.3076171875,e}function Ht(t,e,r,n){return r*=e,e*=e,n[0]*t-r*(n[1]+e*(n[2]+e*(n[3]+e*n[4])))}function Xt(t,e,r){for(var n=1/(1-e),i=t,a=20;a;--a){var o=Math.sin(i),s=1-e*o*o;if(i-=s=(Ht(i,o,Math.cos(i),r)-t)*(s*Math.sqrt(s))*n,Math.abs(s)f?Math.tan(a):0,m=Math.pow(p,2),g=Math.pow(m,2);e=1-this.es*Math.pow(s,2),l/=Math.sqrt(e);var A=Ht(a,s,c,this.en);r=this.a*(this.k0*l*(1+u/6*(1-m+h+u/20*(5-18*m+g+14*h-58*m*h+u/42*(61+179*g-g*m-479*m)))))+this.x0,n=this.a*(this.k0*(A-this.ml0+s*o*l/2*(1+u/12*(5-m+9*h+4*d+u/30*(61+g-58*m+270*h-330*m*h+u/56*(1385+543*g-g*m-3111*m))))))+this.y0}else{var v=c*Math.sin(o);if(Math.abs(Math.abs(v)-1)=1){if(v-1>f)return 93;n=0}else n=Math.acos(n);a<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return t.x=r,t.y=n,t},inverse:function(t){var e,r,n,i,a=(t.x-this.x0)*(1/this.a),o=(t.y-this.y0)*(1/this.a);if(this.es)if(r=Xt(e=this.ml0+o/this.k0,this.es,this.en),Math.abs(r)f?Math.tan(r):0,u=this.ep2*Math.pow(c,2),d=Math.pow(u,2),p=Math.pow(l,2),m=Math.pow(p,2);e=1-this.es*Math.pow(s,2);var g=a*Math.sqrt(e)/this.k0,A=Math.pow(g,2);n=r-(e*=l)*A/(1-this.es)*.5*(1-A/12*(5+3*p-9*u*p+u-4*d-A/30*(61+90*p-252*u*p+45*m+46*u-A/56*(1385+3633*p+4095*m+1574*m*p)))),i=V(this.long0+g*(1-A/6*(1+2*p+u-A/20*(5+28*p+24*m+8*u*p+6*u-A/42*(61+662*p+1320*m+720*m*p))))/c)}else n=h*Z(o),i=0;else{var v=Math.exp(a/this.k0),y=.5*(v-1/v),b=this.lat0+o/this.k0,x=Math.cos(b);e=Math.sqrt((1-Math.pow(x,2))/(1+Math.pow(y,2))),n=Math.asin(e),o<0&&(n=-n),i=0===y&&0===x?0:V(Math.atan2(y,x)+this.long0)}return t.x=i,t.y=n,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function Yt(t){var e=Math.exp(t);return(e-1/e)/2}function Jt(t,e){t=Math.abs(t),e=Math.abs(e);var r=Math.max(t,e),n=Math.min(t,e)/(r||1);return r*Math.sqrt(1+Math.pow(n,2))}function Kt(t,e){for(var r,n=2*Math.cos(2*e),i=t.length-1,a=t[i],o=0;--i>=0;)r=n*a-o+t[i],o=a,a=r;return e+r*Math.sin(2*e)}function $t(t,e,r){for(var n,i,a=Math.sin(e),o=Math.cos(e),s=Yt(r),c=function(t){var e=Math.exp(t);return(e+1/e)/2}(r),l=2*o*c,u=-2*a*s,h=t.length-1,f=t[h],d=0,p=0,m=0;--h>=0;)n=p,i=d,f=l*(p=f)-n-u*(d=m)+t[h],m=u*p-i+l*d;return[(l=a*c)*f-(u=o*s)*m,l*m+u*f]}const te={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(qt.init.apply(this),this.forward=qt.forward,this.inverse=qt.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),r=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),r*=e,this.cgb[1]=r*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=r*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),r*=e,this.cgb[2]=r*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=r*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),r*=e,this.cgb[3]=r*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=r*(1237/630+e*(e*(-24832/14175)-2.4)),r*=e,this.cgb[4]=r*(4174/315+e*(-144838/6237)),this.cbg[4]=r*(-734/315+e*(109598/31185)),r*=e,this.cgb[5]=r*(601676/22275),this.cbg[5]=r*(444337/155925),r=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+r*(1/4+r*(1/64+r/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=r*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=r*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),r*=e,this.utg[2]=r*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=r*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),r*=e,this.utg[3]=r*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=r*(49561/161280+e*(-179/168+e*(6601661/7257600))),r*=e,this.utg[4]=r*(-4583/161280+e*(108847/3991680)),this.gtu[4]=r*(34729/80640+e*(-3418889/1995840)),r*=e,this.utg[5]=r*(-20648693/638668800),this.gtu[5]=.6650675310896665*r;var n=Kt(this.cbg,this.lat0);this.Zb=-this.Qn*(n+function(t,e){for(var r,n=2*Math.cos(e),i=t.length-1,a=t[i],o=0;--i>=0;)r=n*a-o+t[i],o=a,a=r;return Math.sin(e)*r}(this.gtu,2*n))},forward:function(t){var e=V(t.x-this.long0),r=t.y;r=Kt(this.cbg,r);var n=Math.sin(r),i=Math.cos(r),a=Math.sin(e),o=Math.cos(e);r=Math.atan2(n,o*i),e=Math.atan2(a*i,Jt(n,i*o)),e=function(t){var e=Math.abs(t);return e=function(t){var e=1+t,r=e-1;return 0===r?t:t*Math.log(e)/r}(e*(1+e/(Jt(1,e)+1))),t<0?-e:e}(Math.tan(e));var s,c,l=$t(this.gtu,2*r,2*e);return r+=l[0],e+=l[1],Math.abs(e)<=2.623395162778?(s=this.a*(this.Qn*e)+this.x0,c=this.a*(this.Qn*r+this.Zb)+this.y0):(s=1/0,c=1/0),t.x=s,t.y=c,t},inverse:function(t){var e,r,n=(t.x-this.x0)*(1/this.a),i=(t.y-this.y0)*(1/this.a);if(i=(i-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var a=$t(this.utg,2*i,2*n);i+=a[0],n+=a[1],n=Math.atan(Yt(n));var o=Math.sin(i),s=Math.cos(i),c=Math.sin(n),l=Math.cos(n);i=Math.atan2(o*l,Jt(c,l*s)),e=V((n=Math.atan2(c,l*s))+this.long0),r=Kt(this.cgb,i)}else e=1/0,r=1/0;return t.x=e,t.y=r,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]},ee={init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(V(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*d,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,te.init.apply(this),this.forward=te.forward,this.inverse=te.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function re(t,e){return Math.pow((1-t)/(1+t),e)}const ne={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+m)/(Math.pow(Math.tan(.5*this.lat0+m),this.C)*re(this.e*t,this.ratexp))},forward:function(t){var e=t.x,r=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*r+m),this.C)*re(this.e*Math.sin(r),this.ratexp))-h,t.x=this.C*e,t},inverse:function(t){for(var e=t.x/this.C,r=t.y,n=Math.pow(Math.tan(.5*r+m)/this.K,1/this.C),i=20;i>0&&(r=2*Math.atan(n*re(this.e*Math.sin(t.y),-.5*this.e))-h,!(Math.abs(r-t.y)<1e-14));--i)t.y=r;return i?(t.x=e,t.y=r,t):null},names:["gauss"]},ie={init:function(){ne.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,r,n,i;return t.x=V(t.x-this.long0),ne.forward.apply(this,[t]),e=Math.sin(t.y),r=Math.cos(t.y),n=Math.cos(t.x),i=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*r*n),t.x=i*r*Math.sin(t.x),t.y=i*(this.cosc0*e-this.sinc0*r*n),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,r,n,i,a;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,a=Math.sqrt(t.x*t.x+t.y*t.y)){var o=2*Math.atan2(a,this.R2);e=Math.sin(o),r=Math.cos(o),i=Math.asin(r*this.sinc0+t.y*e*this.cosc0/a),n=Math.atan2(t.x*e,a*this.cosc0*r-t.y*this.sinc0*e)}else i=this.phic0,n=0;return t.x=n,t.y=i,ne.inverse.apply(this,[t]),t.x=V(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},ae={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=f&&(this.k0=.5*(1+Z(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=f&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=f&&Math.abs(Math.cos(this.lat_ts))>f&&(this.k0=.5*this.cons*G(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Q(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=G(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-h,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,r,n,i,a,o,s=t.x,c=t.y,l=Math.sin(c),u=Math.cos(c),d=V(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=f&&Math.abs(c+this.lat0)<=f?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*l+this.coslat0*u*Math.cos(d)),t.x=this.a*e*u*Math.sin(d)+this.x0,t.y=this.a*e*(this.coslat0*l-this.sinlat0*u*Math.cos(d))+this.y0,t):(r=2*Math.atan(this.ssfn_(c,l,this.e))-h,i=Math.cos(r),n=Math.sin(r),Math.abs(this.coslat0)<=f?(a=Q(this.e,c*this.con,this.con*l),o=2*this.a*this.k0*a/this.cons,t.x=this.x0+o*Math.sin(s-this.long0),t.y=this.y0-this.con*o*Math.cos(s-this.long0),t):(Math.abs(this.sinlat0)0?V(this.long0+Math.atan2(t.x,-1*t.y)):V(this.long0+Math.atan2(t.x,t.y)):V(this.long0+Math.atan2(t.x*Math.sin(s),o*this.coslat0*Math.cos(s)-t.y*this.sinlat0*Math.sin(s))),t.x=e,t.y=r,t)}if(Math.abs(this.coslat0)<=f){if(o<=f)return r=this.lat0,e=this.long0,t.x=e,t.y=r,t;t.x*=this.con,t.y*=this.con,n=o*this.cons/(2*this.a*this.k0),r=this.con*j(this.e,n),e=this.con*V(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else i=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,o<=f?a=this.X0:(a=Math.asin(Math.cos(i)*this.sinX0+t.y*Math.sin(i)*this.cosX0/o),e=V(this.long0+Math.atan2(t.x*Math.sin(i),o*this.cosX0*Math.cos(i)-t.y*this.sinX0*Math.sin(i)))),r=-1*j(this.e,Math.tan(.5*(h+a)));return t.x=e,t.y=r,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"],ssfn_:function(t,e,r){return e*=r,Math.tan(.5*(h+t))*Math.pow((1-e)/(1+e),.5*r)}},oe={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),r=this.a,n=1/this.rf,i=2*n-Math.pow(n,2),a=this.e=Math.sqrt(i);this.R=this.k0*r*Math.sqrt(1-i)/(1-i*Math.pow(e,2)),this.alpha=Math.sqrt(1+i/(1-i)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+t/2)),c=Math.log((1+a*e)/(1-a*e));this.K=o-this.alpha*s+this.alpha*a/2*c},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),r=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),n=-this.alpha*(e+r)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),a=this.alpha*(t.x-this.lambda0),o=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(a))),s=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(a));return t.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,t.x=this.R*o+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,r=t.y-this.y0,n=e/this.R,i=2*(Math.atan(Math.exp(r/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),o=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),s=this.lambda0+o/this.alpha,c=0,l=a,u=-1e3,h=0;Math.abs(l-u)>1e-7;){if(++h>20)return;c=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),u=l,l=2*Math.atan(Math.exp(c))-Math.PI/2}return t.x=s,t.y=l,t},names:["somerc"]};var se=1e-7;const ce={init:function(){var t,e,r,n,i,a,o,s,c,l,u,p,A,v=0,y=0,b=0,x=0,w=0,_=0,E=0;this.no_off=(A="object"==typeof(p=this).PROJECTION?Object.keys(p.PROJECTION)[0]:p.PROJECTION,"no_uoff"in p||"no_off"in p||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(A)),this.no_rot="no_rot"in this;var M=!1;"alpha"in this&&(M=!0);var S=!1;if("rectified_grid_angle"in this&&(S=!0),M&&(E=this.alpha),S&&(v=this.rectified_grid_angle*d),M||S)y=this.longc;else if(b=this.long1,w=this.lat1,x=this.long2,_=this.lat2,Math.abs(w-_)<=se||(t=Math.abs(w))<=se||Math.abs(t-h)<=se||Math.abs(Math.abs(this.lat0)-h)<=se||Math.abs(Math.abs(_)-h)<=se)throw new Error;var C=1-this.es;e=Math.sqrt(C),Math.abs(this.lat0)>f?(s=Math.sin(this.lat0),r=Math.cos(this.lat0),t=1-this.es*s*s,this.B=r*r,this.B=Math.sqrt(1+this.es*this.B*this.B/C),this.A=this.B*this.k0*e/t,(i=(n=this.B*e/(r*Math.sqrt(t)))*n-1)<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=n,this.E*=Math.pow(Q(this.e,this.lat0,s),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=i=1),M||S?(M?(u=Math.asin(Math.sin(E)/n),S||(v=E)):(u=v,E=Math.asin(n*Math.sin(u))),this.lam0=y-Math.asin(.5*(i-1/i)*Math.tan(u))/this.B):(a=Math.pow(Q(this.e,w,Math.sin(w)),this.B),o=Math.pow(Q(this.e,_,Math.sin(_)),this.B),i=this.E/a,c=(o-a)/(o+a),l=((l=this.E*this.E)-o*a)/(l+o*a),(t=b-x)<-Math.pi?x-=g:t>Math.pi&&(x+=g),this.lam0=V(.5*(b+x)-Math.atan(l*Math.tan(.5*this.B*(b-x))/c)/this.B),u=Math.atan(2*Math.sin(this.B*V(b-this.lam0))/(i-1/i)),v=E=Math.asin(n*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(v),this.cosrot=Math.cos(v),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(E))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(m-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(m+i))},forward:function(t){var e,r,n,i,a,o,s,c,l={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-h)>f){if(e=.5*((a=this.E/Math.pow(Q(this.e,t.y,Math.sin(t.y)),this.B))-(o=1/a)),r=.5*(a+o),i=Math.sin(this.B*t.x),n=(e*this.singam-i*this.cosgam)/r,Math.abs(Math.abs(n)-1)0?this.v_pole_n:this.v_pole_s,s=this.ArB*t.y;return this.no_rot?(l.x=s,l.y=c):(s-=this.u_0,l.x=c*this.cosrot+s*this.sinrot,l.y=s*this.cosrot-c*this.sinrot),l.x=this.a*l.x+this.x0,l.y=this.a*l.y+this.y0,l},inverse:function(t){var e,r,n,i,a,o,s,c={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(r=t.y,e=t.x):(r=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),i=.5*((n=Math.exp(-this.BrA*r))-1/n),a=.5*(n+1/n),s=((o=Math.sin(this.BrA*e))*this.cosgam+i*this.singam)/a,Math.abs(Math.abs(s)-1)f?this.ns=Math.log(n/s)/Math.log(i/c):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e=t.x,r=t.y;Math.abs(2*Math.abs(r)-Math.PI)<=f&&(r=Z(r)*(h-2e-10));var n,i,a=Math.abs(Math.abs(r)-h);if(a>f)n=Q(this.e,r,Math.sin(r)),i=this.a*this.f0*Math.pow(n,this.ns);else{if((a=r*this.ns)<=0)return null;i=0}var o=this.ns*V(e-this.long0);return t.x=this.k0*(i*Math.sin(o))+this.x0,t.y=this.k0*(this.rh-i*Math.cos(o))+this.y0,t},inverse:function(t){var e,r,n,i,a,o=(t.x-this.x0)/this.k0,s=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(o*o+s*s),r=1):(e=-Math.sqrt(o*o+s*s),r=-1);var c=0;if(0!==e&&(c=Math.atan2(r*o,r*s)),0!==e||this.ns>0){if(r=1/this.ns,n=Math.pow(e/(this.a*this.f0),r),-9999===(i=j(this.e,n)))return null}else i=-h;return a=V(c/this.ns+this.long0),t.x=a,t.y=i,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]},ue={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,r,n,i,a,o,s,c=t.x,l=t.y,u=V(c-this.long0);return e=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),r=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/e)-this.s45),n=-u*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(r)+Math.sin(this.ad)*Math.cos(r)*Math.cos(n)),a=Math.asin(Math.cos(r)*Math.sin(n)/Math.cos(i)),o=this.n*a,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),t.y=s*Math.cos(o)/1,t.x=s*Math.sin(o)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,r,n,i,a,o,s,c=t.x;t.x=t.y,t.y=c,this.czech||(t.y*=-1,t.x*=-1),a=Math.sqrt(t.x*t.x+t.y*t.y),i=Math.atan2(t.y,t.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),r=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(e)),t.x=this.long0-r/this.alfa,o=e,s=0;var l=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-t.y)<1e-10&&(s=1),o=t.y,l+=1}while(0===s&&l<15);return l>=15?null:t},names:["Krovak","krovak"]};function he(t,e,r,n,i){return t*i-e*Math.sin(2*i)+r*Math.sin(4*i)-n*Math.sin(6*i)}function fe(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function de(t){return.375*t*(1+.25*t*(1+.46875*t))}function pe(t){return.05859375*t*t*(1+.75*t)}function me(t){return t*t*t*(35/3072)}function ge(t,e,r){var n=e*r;return t/Math.sqrt(1-n*n)}function Ae(t){return Math.abs(t)1e-7?(1-t*t)*(e/(1-(r=t*e)*r)-.5/t*Math.log((1-r)/(1+r))):2*e}const xe={init:function(){var t,e=Math.abs(this.lat0);if(Math.abs(e-h)0)switch(this.qp=be(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,r=[];return r[0]=.3333333333333333*t,e=t*t,r[0]+=.17222222222222222*e,r[1]=.06388888888888888*e,e*=t,r[0]+=.10257936507936508*e,r[1]+=.0664021164021164*e,r[2]=.016415012942191543*e,r}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=be(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var e,r,n,i,a,o,s,c,l,u,d=t.x,p=t.y;if(d=V(d-this.long0),this.sphere){if(a=Math.sin(p),u=Math.cos(p),n=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((r=this.mode===this.EQUIT?1+u*n:1+this.sinph0*a+this.cosph0*u*n)<=f)return null;e=(r=Math.sqrt(2/r))*u*Math.sin(d),r*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(p+this.lat0)=0?(e=(l=Math.sqrt(o))*i,r=n*(this.mode===this.S_POLE?l:-l)):e=r=0}}return t.x=this.a*e+this.x0,t.y=this.a*r+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,r,n,i,a,o,s,c,l,u,d=t.x/this.a,p=t.y/this.a;if(this.sphere){var m,g=0,A=0;if((r=.5*(m=Math.sqrt(d*d+p*p)))>1)return null;switch(r=2*Math.asin(r),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(A=Math.sin(r),g=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(m)<=f?0:Math.asin(p*A/m),d*=A,p=g*m;break;case this.OBLIQ:r=Math.abs(m)<=f?this.lat0:Math.asin(g*this.sinph0+p*A*this.cosph0/m),d*=A*this.cosph0,p=(g-Math.sin(r)*this.sinph0)*m;break;case this.N_POLE:p=-p,r=h-r;break;case this.S_POLE:r-=h}e=0!==p||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(d,p):0}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(d/=this.dd,p*=this.dd,(o=Math.sqrt(d*d+p*p))1&&(t=t>1?1:-1),Math.asin(t)}const _e={init:function(){Math.abs(this.lat1+this.lat2)f?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,r=t.y;this.sin_phi=Math.sin(r),this.cos_phi=Math.cos(r);var n=be(this.e3,this.sin_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,a=this.ns0*V(e-this.long0),o=i*Math.sin(a)+this.x0,s=this.rh-i*Math.cos(a)+this.y0;return t.x=o,t.y=s,t},inverse:function(t){var e,r,n,i,a,o;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),n=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1),i=0,0!==e&&(i=Math.atan2(n*t.x,n*t.y)),n=e*this.ns0/this.a,this.sphere?o=Math.asin((this.c-n*n)/(2*this.ns0)):(r=(this.c-n*n)/this.ns0,o=this.phi1z(this.e3,r)),a=V(i/this.ns0+this.long0),t.x=a,t.y=o,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,e){var r,n,i,a,o=we(.5*e);if(t0||Math.abs(a)<=f?(o=this.x0+1*this.a*r*Math.sin(n)/a,s=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*r*i)/a):(o=this.x0+this.infinity_dist*r*Math.sin(n),s=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*r*i)),t.x=o,t.y=s,t},inverse:function(t){var e,r,n,i,a,o;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(i=Math.atan2(e,this.rc),r=Math.sin(i),o=we((n=Math.cos(i))*this.sin_p14+t.y*r*this.cos_p14/e),a=Math.atan2(t.x*r,e*this.cos_p14*n-t.y*this.sin_p14*r),a=V(this.long0+a)):(o=this.phic0,a=0),t.x=a,t.y=o,t},names:["gnom"]},Me={init:function(){this.sphere||(this.k0=G(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,r,n=t.x,i=t.y,a=V(n-this.long0);if(this.sphere)e=this.x0+this.a*a*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var o=be(this.e,Math.sin(i));e=this.x0+this.a*this.k0*a,r=this.y0+this.a*o*.5/this.k0}return t.x=e,t.y=r,t},inverse:function(t){var e,r;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=V(this.long0+t.x/this.a/Math.cos(this.lat_ts)),r=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(r=function(t,e){var r=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-r)<1e-6)return e<0?-1*h:h;for(var n,i,a,o,s=Math.asin(.5*e),c=0;c<30;c++)if(i=Math.sin(s),a=Math.cos(s),o=t*i,s+=n=Math.pow(1-o*o,2)/(2*a)*(e/(1-t*t)-i/(1-o*o)+.5/t*Math.log((1-o)/(1+o))),Math.abs(n)<=1e-10)return s;return NaN}(this.e,2*t.y*this.k0/this.a),e=V(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=r,t},names:["cea"]},Se={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,r=t.y,n=V(e-this.long0),i=Ae(r-this.lat0);return t.x=this.x0+this.a*n*this.rc,t.y=this.y0+this.a*i,t},inverse:function(t){var e=t.x,r=t.y;return t.x=V(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=Ae(this.lat0+(r-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},Ce={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=fe(this.es),this.e1=de(this.es),this.e2=pe(this.es),this.e3=me(this.es),this.ml0=this.a*he(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,r,n,i=t.x,a=t.y,o=V(i-this.long0);if(n=o*Math.sin(a),this.sphere)Math.abs(a)<=f?(e=this.a*o,r=-1*this.a*this.lat0):(e=this.a*Math.sin(n)/Math.tan(a),r=this.a*(Ae(a-this.lat0)+(1-Math.cos(n))/Math.tan(a)));else if(Math.abs(a)<=f)e=this.a*o,r=-1*this.ml0;else{var s=ge(this.a,this.e,Math.sin(a))/Math.tan(a);e=s*Math.sin(n),r=this.a*he(this.e0,this.e1,this.e2,this.e3,a)-this.ml0+s*(1-Math.cos(n))}return t.x=e+this.x0,t.y=r+this.y0,t},inverse:function(t){var e,r,n,i,a,o,s,c,l;if(n=t.x-this.x0,i=t.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=f)e=V(n/this.a+this.long0),r=0;else{var u;for(o=this.lat0+i/this.a,s=n*n/this.a/this.a+o*o,c=o,a=20;a;--a)if(c+=l=-1*(o*(c*(u=Math.tan(c))+1)-c-.5*(c*c+s)*u)/((c-o)/u-1),Math.abs(l)<=f){r=c;break}e=V(this.long0+Math.asin(n*Math.tan(c)/this.a)/Math.sin(r))}else if(Math.abs(i+this.ml0)<=f)r=0,e=V(this.long0+n/this.a);else{var h,d,p,m,g;for(o=(this.ml0+i)/this.a,s=n*n/this.a/this.a+o*o,c=o,a=20;a;--a)if(g=this.e*Math.sin(c),h=Math.sqrt(1-g*g)*Math.tan(c),d=this.a*he(this.e0,this.e1,this.e2,this.e3,c),p=this.e0-2*this.e1*Math.cos(2*c)+4*this.e2*Math.cos(4*c)-6*this.e3*Math.cos(6*c),c-=l=(o*(h*(m=d/this.a)+1)-m-.5*h*(m*m+s))/(this.es*Math.sin(2*c)*(m*m+s-2*o*m)/(4*h)+(o-m)*(h*p-2/Math.sin(2*c))-p),Math.abs(l)<=f){r=c;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(r),2))*Math.tan(r),e=V(this.long0+Math.asin(n*h/this.a)/Math.sin(r))}return t.x=e,t.y=r,t},names:["Polyconic","poly"]},Te={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var e,r=t.x,n=t.y-this.lat0,i=r-this.long0,a=n/u*1e-5,o=i,s=1,c=0;for(e=1;e<=10;e++)s*=a,c+=this.A[e]*s;var l,h=c,f=o,d=1,p=0,m=0,g=0;for(e=1;e<=6;e++)l=p*h+d*f,d=d*h-p*f,p=l,m=m+this.B_re[e]*d-this.B_im[e]*p,g=g+this.B_im[e]*d+this.B_re[e]*p;return t.x=g*this.a+this.x0,t.y=m*this.a+this.y0,t},inverse:function(t){var e,r,n=t.x,i=t.y,a=n-this.x0,o=(i-this.y0)/this.a,s=a/this.a,c=1,l=0,h=0,f=0;for(e=1;e<=6;e++)r=l*o+c*s,c=c*o-l*s,l=r,h=h+this.C_re[e]*c-this.C_im[e]*l,f=f+this.C_im[e]*c+this.C_re[e]*l;for(var d=0;d.999999999999&&(r=.999999999999),e=Math.asin(r);var n=V(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),r=(2*e+Math.sin(2*e))/Math.PI,Math.abs(r)>1&&(r=1);var i=Math.asin(r);return t.x=n,t.y=i,t},names:["Mollweide","moll"]},ke={init:function(){Math.abs(this.lat1+this.lat2)=0?(r=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(r=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var a=0;return 0!==r&&(a=Math.atan2(e*t.x,e*t.y)),this.sphere?(i=V(this.long0+a/this.ns),n=Ae(this.g-r/this.a),t.x=i,t.y=n,t):(n=ve(this.g-r/this.a,this.e0,this.e1,this.e2,this.e3),i=V(this.long0+a/this.ns),t.x=i,t.y=n,t)},names:["Equidistant_Conic","eqdc"]},Le={init:function(){this.R=this.a},forward:function(t){var e,r,n=t.x,i=t.y,a=V(n-this.long0);Math.abs(i)<=f&&(e=this.x0+this.R*a,r=this.y0);var o=we(2*Math.abs(i/Math.PI));(Math.abs(a)<=f||Math.abs(Math.abs(i)-h)<=f)&&(e=this.x0,r=i>=0?this.y0+Math.PI*this.R*Math.tan(.5*o):this.y0+Math.PI*this.R*-Math.tan(.5*o));var s=.5*Math.abs(Math.PI/a-a/Math.PI),c=s*s,l=Math.sin(o),u=Math.cos(o),d=u/(l+u-1),p=d*d,m=d*(2/l-1),g=m*m,A=Math.PI*this.R*(s*(d-g)+Math.sqrt(c*(d-g)*(d-g)-(g+c)*(p-g)))/(g+c);a<0&&(A=-A),e=this.x0+A;var v=c+d;return A=Math.PI*this.R*(m*v-s*Math.sqrt((g+c)*(c+1)-v*v))/(g+c),r=i>=0?this.y0+A:this.y0-A,t.x=e,t.y=r,t},inverse:function(t){var e,r,n,i,a,o,s,c,l,u,h,d;return t.x-=this.x0,t.y-=this.y0,h=Math.PI*this.R,a=(n=t.x/h)*n+(i=t.y/h)*i,h=3*(i*i/(c=-2*(o=-Math.abs(i)*(1+a))+1+2*i*i+a*a)+(2*(s=o-2*i*i+n*n)*s*s/c/c/c-9*o*s/c/c)/27)/(l=(o-s*s/3/c)/c)/(u=2*Math.sqrt(-l/3)),Math.abs(h)>1&&(h=h>=0?1:-1),d=Math.acos(h)/3,r=t.y>=0?(-u*Math.cos(d+Math.PI/3)-s/3/c)*Math.PI:-(-u*Math.cos(d+Math.PI/3)-s/3/c)*Math.PI,e=Math.abs(n)2*h*this.a)return;return r=e/this.a,n=Math.sin(r),i=Math.cos(r),a=this.long0,Math.abs(e)<=f?o=this.lat0:(o=we(i*this.sin_p12+t.y*n*this.cos_p12/e),s=Math.abs(this.lat0)-h,a=Math.abs(s)<=f?this.lat0>=0?V(this.long0+Math.atan2(t.x,-t.y)):V(this.long0-Math.atan2(-t.x,t.y)):V(this.long0+Math.atan2(t.x*n,e*this.cos_p12*i-t.y*this.sin_p12*n))),t.x=a,t.y=o,t}return c=fe(this.es),l=de(this.es),u=pe(this.es),d=me(this.es),Math.abs(this.sin_p12-1)<=f?(o=ve(((p=this.a*he(c,l,u,d,h))-(e=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,c,l,u,d),a=V(this.long0+Math.atan2(t.x,-1*t.y)),t.x=a,t.y=o,t):Math.abs(this.sin_p12+1)<=f?(p=this.a*he(c,l,u,d,h),o=ve(((e=Math.sqrt(t.x*t.x+t.y*t.y))-p)/this.a,c,l,u,d),a=V(this.long0+Math.atan2(t.x,t.y)),t.x=a,t.y=o,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),A=Math.atan2(t.x,t.y),m=ge(this.a,this.e,this.sin_p12),v=Math.cos(A),b=-(y=this.e*this.cos_p12*v)*y/(1-this.es),x=3*this.es*(1-b)*this.sin_p12*this.cos_p12*v/(1-this.es),E=1-b*(_=(w=e/m)-b*(1+b)*Math.pow(w,3)/6-x*(1+3*b)*Math.pow(w,4)/24)*_/2-w*_*_*_/6,g=Math.asin(this.sin_p12*Math.cos(_)+this.cos_p12*Math.sin(_)*v),a=V(this.long0+Math.asin(Math.sin(A)*Math.sin(_)/Math.cos(g))),M=Math.sin(g),o=Math.atan2((M-this.es*E*this.sin_p12)*Math.tan(g),M*(1-this.es)),t.x=a,t.y=o,t)},names:["Azimuthal_Equidistant","aeqd"]},De={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,r,n,i,a,o,s,c=t.x,l=t.y;return n=V(c-this.long0),e=Math.sin(l),r=Math.cos(l),i=Math.cos(n),((a=this.sin_p14*e+this.cos_p14*r*i)>0||Math.abs(a)<=f)&&(o=1*this.a*r*Math.sin(n),s=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*r*i)),t.x=o,t.y=s,t},inverse:function(t){var e,r,n,i,a,o,s;return t.x-=this.x0,t.y-=this.y0,r=we((e=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),n=Math.sin(r),i=Math.cos(r),o=this.long0,Math.abs(e)<=f?(s=this.lat0,t.x=o,t.y=s,t):(s=we(i*this.sin_p14+t.y*n*this.cos_p14/e),a=Math.abs(this.lat0)-h,Math.abs(a)<=f?(o=this.lat0>=0?V(this.long0+Math.atan2(t.x,-t.y)):V(this.long0-Math.atan2(-t.x,t.y)),t.x=o,t.y=s,t):(o=V(this.long0+Math.atan2(t.x*n,e*this.cos_p14*i-t.y*this.sin_p14*n)),t.x=o,t.y=s,t))},names:["ortho"]};var Ue=1,Oe=2,Fe=3,Ne=4;function ze(t,e,r,n){var i;return tm&&i<=h+m?(n.value=Oe,i-=h):i>h+m||i<=-(h+m)?(n.value=Fe,i=i>=0?i-A:i+A):(n.value=Ne,i+=h)),i}function Ge(t,e){var r=t+e;return r<-A?r+=g:r>+A&&(r-=g),r}const Ze={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=h-m/2?this.face=5:this.lat0<=-(h-m/2)?this.face=6:Math.abs(this.long0)<=m?this.face=1:Math.abs(this.long0)<=h+m?this.face=this.long0>0?2:4:this.face=3,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,r,n,i,a,o,s={x:0,y:0},c={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,r=t.x,5===this.face)i=h-e,r>=m&&r<=h+m?(c.value=Ue,n=r-h):r>h+m||r<=-(h+m)?(c.value=Oe,n=r>0?r-A:r+A):r>-(h+m)&&r<=-m?(c.value=Fe,n=r+h):(c.value=Ne,n=r);else if(6===this.face)i=h+e,r>=m&&r<=h+m?(c.value=Ue,n=-r+h):r=-m?(c.value=Oe,n=-r):r<-m&&r>=-(h+m)?(c.value=Fe,n=-r-h):(c.value=Ne,n=r>0?-r+A:-r-A);else{var l,u,f,d,p,g;2===this.face?r=Ge(r,+h):3===this.face?r=Ge(r,+A):4===this.face&&(r=Ge(r,-h)),d=Math.sin(e),p=Math.cos(e),g=Math.sin(r),l=p*Math.cos(r),u=p*g,f=d,1===this.face?n=ze(i=Math.acos(l),f,u,c):2===this.face?n=ze(i=Math.acos(u),f,-l,c):3===this.face?n=ze(i=Math.acos(-l),f,-u,c):4===this.face?n=ze(i=Math.acos(-u),f,l,c):(i=n=0,c.value=Ue)}return o=Math.atan(12/A*(n+Math.acos(Math.sin(n)*Math.cos(m))-h)),a=Math.sqrt((1-Math.cos(i))/(Math.cos(o)*Math.cos(o))/(1-Math.cos(Math.atan(1/Math.cos(n))))),c.value===Oe?o+=h:c.value===Fe?o+=A:c.value===Ne&&(o+=1.5*A),s.x=a*Math.cos(o),s.y=a*Math.sin(o),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,t.x=s.x,t.y=s.y,t},inverse:function(t){var e,r,n,i,a,o,s,c,l,u,f,d,p={lam:0,phi:0},m={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,r=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?m.value=Ue:t.y>=0&&t.y>=Math.abs(t.x)?(m.value=Oe,e-=h):t.x<0&&-t.x>=Math.abs(t.y)?(m.value=Fe,e=e<0?e+A:e-A):(m.value=Ne,e+=h),l=A/12*Math.tan(e),a=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),o=Math.atan(a),(s=1-(n=Math.cos(e))*n*(i=Math.tan(r))*i*(1-Math.cos(Math.atan(1/Math.cos(o)))))<-1?s=-1:s>1&&(s=1),5===this.face)c=Math.acos(s),p.phi=h-c,m.value===Ue?p.lam=o+h:m.value===Oe?p.lam=o<0?o+A:o-A:m.value===Fe?p.lam=o-h:p.lam=o;else if(6===this.face)c=Math.acos(s),p.phi=c-h,m.value===Ue?p.lam=-o+h:m.value===Oe?p.lam=-o:m.value===Fe?p.lam=-o-h:p.lam=o<0?-o-A:-o+A;else{var g,v,y;l=(g=s)*g,v=(l+=(y=l>=1?0:Math.sqrt(1-l)*Math.sin(o))*y)>=1?0:Math.sqrt(1-l),m.value===Oe?(l=v,v=-y,y=l):m.value===Fe?(v=-v,y=-y):m.value===Ne&&(l=v,v=y,y=-l),2===this.face?(l=g,g=-v,v=l):3===this.face?(g=-g,v=-v):4===this.face&&(l=g,g=v,v=-l),p.phi=Math.acos(-y)-h,p.lam=Math.atan2(v,g),2===this.face?p.lam=Ge(p.lam,-h):3===this.face?p.lam=Ge(p.lam,-A):4===this.face&&(p.lam=Ge(p.lam,+h))}return 0!==this.es&&(u=p.phi<0?1:0,f=Math.tan(p.phi),d=this.b/Math.sqrt(f*f+this.one_minus_f_squared),p.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),u&&(p.phi=-p.phi)),p.lam+=this.long0,t.x=p.lam,t.y=p.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]};var Ve=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Qe=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],je=.8487,We=1.3523,He=p/5,Xe=1/He,qe=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};const Ye={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=V(t.x-this.long0),r=Math.abs(t.y),n=Math.floor(r*He);n<0?n=0:n>=18&&(n=17);var i={x:qe(Ve[n],r=p*(r-Xe*n))*e,y:qe(Qe[n],r)};return t.y<0&&(i.y=-i.y),i.x=i.x*this.a*je+this.x0,i.y=i.y*this.a*We+this.y0,i},inverse:function(t){var e={x:(t.x-this.x0)/(this.a*je),y:Math.abs(t.y-this.y0)/(this.a*We)};if(e.y>=1)e.x/=Ve[18][0],e.y=t.y<0?-h:h;else{var r=Math.floor(18*e.y);for(r<0?r=0:r>=18&&(r=17);;)if(Qe[r][0]>e.y)--r;else{if(!(Qe[r+1][0]<=e.y))break;++r}var n=Qe[r],i=5*(e.y-n[0])/(Qe[r+1][0]-n[0]);i=function(t,e,r,n){for(var i=e;n;--n){var a=t(i);if(i-=a,Math.abs(a)<1e-10)break}return i}((function(t){return(qe(n,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(n,t)}),i,0,100),e.x/=qe(Ve[r],i),e.y=(5*r+i)*d,t.y<0&&(e.y=-e.y)}return e.x=V(e.x+this.long0),e},names:["Robinson","robin"]},Je={init:function(){this.name="geocent"},forward:function(t){return ut(t,this.es,this.a)},inverse:function(t){return ht(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};var Ke={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};const $e={init:function(){if(Object.keys(Ke).forEach(function(t){if(void 0===this[t])this[t]=Ke[t].def;else{if(Ke[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);Ke[t].num&&(this[t]=parseFloat(this[t]))}Ke[t].degrees&&(this[t]=this[t]*d)}.bind(this)),Math.abs(Math.abs(this.lat0)-h)1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var e,r,n,i,a=Math.sin(t.y),o=Math.cos(t.y),s=Math.cos(t.x);switch(this.mode){case 3:r=this.sinph0*a+this.cosph0*o*s;break;case 2:r=o*s;break;case 1:r=-a;break;case 0:r=a}switch(e=(r=this.pn1/(this.p-r))*o*Math.sin(t.x),this.mode){case 3:r*=this.cosph0*a-this.sinph0*o*s;break;case 2:r*=a;break;case 0:r*=-o*s;break;case 1:r*=o*s}return i=1/((n=r*this.cg+e*this.sg)*this.sw*this.h1+this.cw),e=(e*this.cg-r*this.sg)*this.cw*i,r=n*i,t.x=e*this.a,t.y=r*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var e,r,n,i={x:t.x,y:t.y};n=1/(this.pn1-t.y*this.sw),e=this.pn1*t.x*n,r=this.pn1*t.y*this.cw*n,t.x=e*this.cg+r*this.sg,t.y=r*this.cg-e*this.sg;var a=Jt(t.x,t.y);if(Math.abs(a)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,e=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var e,r,n,i,a=t.x,o=t.y;if(a-=this.long0,"ellipse"===this.shape){o=Math.atan(this.radius_p2*Math.tan(o));var s=this.radius_p/Jt(this.radius_p*Math.cos(o),Math.sin(o));if(r=s*Math.cos(a)*Math.cos(o),n=s*Math.sin(a)*Math.cos(o),i=s*Math.sin(o),(this.radius_g-r)*r-n*n-i*i*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=this.radius_g-r,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/Jt(i,e)),t.y=this.radius_g_1*Math.atan(i/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(i/Jt(n,e)))}else"sphere"===this.shape&&(e=Math.cos(o),r=Math.cos(a)*e,n=Math.sin(a)*e,i=Math.sin(o),e=this.radius_g-r,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/Jt(i,e)),t.y=this.radius_g_1*Math.atan(i/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(i/Jt(n,e))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var e,r,n,i,a=-1,o=0,s=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),o=Math.tan(t.x/this.radius_g_1)*Jt(1,s)):(o=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*Jt(1,o));var c=s/this.radius_p;if(e=o*o+c*c+a*a,(n=(r=2*this.radius_g*a)*r-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;i=(-r-Math.sqrt(n))/(2*e),a=this.radius_g+i*a,o*=i,s*=i,t.x=Math.atan2(o,a),t.y=Math.atan(s*Math.cos(t.x)/a),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),o=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+s*s)):(o=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+o*o)),e=o*o+s*s+a*a,(n=(r=2*this.radius_g*a)*r-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;i=(-r-Math.sqrt(n))/(2*e),a=this.radius_g+i*a,o*=i,s*=i,t.x=Math.atan2(o,a),t.y=Math.atan(s*Math.cos(t.x)/a)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};var er;_t.defaultDatum="WGS84",_t.Proj=lt,_t.WGS84=new _t.Proj("WGS84"),_t.Point=Zt,_t.toPoint=At,_t.defs=O,_t.nadgrid=function(t,e){var r=new DataView(e),n=function(t){var e=t.getInt32(8,!1);return 11!==e&&(11!==(e=t.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}(r),i=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:it(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)}}(r,n),a=function(t,e,r){for(var n=176,i=[],a=0;a{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var a=e&&e.prototype instanceof A?e:A,o=Object.create(a.prototype),s=new R(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f="suspendedStart",d="suspendedYield",p="executing",m="completed",g={};function A(){}function v(){}function y(){}var b={};l(b,o,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(B([])));w&&w!==r&&n.call(w,o)&&(b=w);var _=y.prototype=A.prototype=Object.create(b);function E(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function M(t,e){function r(i,a,o,s){var c=h(t[i],t,a);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==typeof u&&n.call(u,"__await")?e.resolve(u.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(u).then((function(t){l.value=t,o(l)}),(function(t){return r("throw",t,o,s)}))}s(c.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(t,r,n){var i=f;return function(a,o){if(i===p)throw new Error("Generator is already running");if(i===m){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var c=C(s,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var l=h(t,r,n);if("normal"===l.type){if(i=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function B(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;I(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:B(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},94830:(t,e,r)=>{"use strict";const n=r(43389),i=r(69208),a=r(48764).lW;t.exports=function(t,e){return new n((function(r,n){const o=i(t,e),s=new XMLHttpRequest;s.open("GET",o,!0),"prj"!==e&&"cpg"!==e&&(s.responseType="arraybuffer"),s.addEventListener("load",(function(){return s.status>399?"prj"===e||"cpg"===e?r(!1):n(new Error(s.status)):r("prj"!==e&&"cpg"!==e?a.from(s.response):s.response)}),!1),s.send()}))}},9078:(t,e,r)=>{"use strict";const n=r(94830),i=r(69208),a=r(48764).lW;t.exports=async function(t,e){if(!r.g.fetch)return n(t,e);const o=i(t,e),s="prj"===e||"cpg"===e;try{const t=await fetch(o);if(t.status>399)throw new Error(t.statusText);if(s)return t.text();const e=await t.arrayBuffer();return a.from(e)}catch(t){if(console.log("ERROR",t,e),s||"dbf"===e)return!1;throw t}}},69208:(t,e,r)=>{const n=r.g.URL;t.exports=(t,e)=>{if(!e)return t;const r=new n(t);return r.pathname=`${r.pathname}.${e}`,r.href}},79003:(t,e,r)=>{"use strict";let n=r(24472);n.default&&(n=n.default);const i=r(32555),a=r(9078),o=r(76415),s=r(9462),c=r(43389),l=r(95079),u=r(48764).lW,h=r.g.URL,f=new l({max:20});function d(t){if(!t)throw new Error("forgot to pass buffer");return u.isBuffer(t)?t:p(t)?u.from(t):p(t.buffer)?1===t.BYTES_PER_ELEMENT?u.from(t):u.from(t.buffer):void 0}function p(t){return t instanceof r.g.ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)}function m(t,e){return"string"==typeof t&&f.has(t)?c.resolve(f.get(t)):m.getShapefile(t,e).then((function(e){return"string"==typeof t&&f.set(t,e),e}))}m.combine=function([t,e]){const r={type:"FeatureCollection",features:[]};let n=0;const i=t.length;for(e||(e=[]);n-1?c.push(r.slice(0,-3)+r.slice(-3).toLowerCase()):"dbf"!==r.slice(-3).toLowerCase()&&"cpg"!==r.slice(-3).toLowerCase()||(a[r.slice(0,-3)+r.slice(-3).toLowerCase()]=a[r]));if(!c.length)throw new Error("no layers founds");const l=c.map((function(t){let r,n;const i=t.lastIndexOf(".");return i>-1&&t.slice(i).indexOf("json")>-1?(r=JSON.parse(a[t]),r.fileName=t.slice(0,i)):e.indexOf(t.slice(i+1))>-1?(r=a[t],r.fileName=t):(a[t+".dbf"]&&(n=s(a[t+".dbf"],a[t+".cpg"])),r=m.combine([o(a[t+".shp"],a[t+".prj"]),n]),r.fileName=t),r}));return 1===l.length?l[0]:l};const g=async t=>{const e=await c.all([a(t,"shp"),a(t,"prj")]);let r=!1;try{e[1]&&(r=n(e[1]))}catch(t){r=!1}return o(e[0],r)},A=async t=>{const[e,r]=await c.all([a(t,"dbf"),a(t,"cpg")]);if(e)return s(e,r)};m.getShapefile=async function(t,e){if("string"!=typeof t)return m.parseZip(t);if(((t,e)=>".zip"===new h(t).pathname.slice(-4).toLowerCase())(t))return async function(t,e){const r=await a(t);return m.parseZip(r,e)}(t,e);const r=await c.all([g(t),A(t)]);return m.combine(r)},m.parseShp=function(t,e){if(t=d(t),u.isBuffer(e)&&(e=e.toString()),"string"==typeof e)try{e=n(e)}catch(t){e=!1}return o(t,e)},m.parseDbf=function(t,e){return t=d(t),s(t,e)},t.exports=m},76415:t=>{"use strict";function e(t,e){return!function(t){let e=0,r=1;const n=t.length;let i,a;for(;r0}(e)&&t.length?t[t.length-1].push(e):t.push([e]),t}n.prototype.parsePoint=function(t){return{type:"Point",coordinates:this.parseCoord(t,0)}},n.prototype.parseZPoint=function(t){const e=this.parsePoint(t);return e.coordinates.push(t.readDoubleLE(16)),e},n.prototype.parsePointArray=function(t,e,r){const n=[];let i=0;for(;i20&&(e-=20),!(e in r))throw new Error("I don't know that shp type");var n;this.parseFunc=this[r[e]],this.parseCoord=(n=t)?function(t,e){const r=[t.readDoubleLE(e),t.readDoubleLE(e+8)];return n.inverse(r)}:function(t,e){return[t.readDoubleLE(e),t.readDoubleLE(e+8)]}},n.prototype.getShpCode=function(){return this.parseHeader().shpCode},n.prototype.parseHeader=function(){const t=this.buffer.slice(0,100);return{length:t.readInt32BE(24)<<1,version:t.readInt32LE(28),shpCode:t.readInt32LE(32),bbox:[t.readDoubleLE(36),t.readDoubleLE(44),t.readDoubleLE(52),t.readDoubleLE(52)]}},n.prototype.getRows=function(){let t=100;const e=this.buffer.byteLength,r=[];let n;for(;t{"use strict";const n=r(55733);t.exports=async t=>{const e=new n;await e.loadAsync(t);const r=e.file(/.+/),i={};return await Promise.all(r.map((async t=>{let e;e="shp"===t.name.slice(-3).toLowerCase()||"dbf"===t.name.slice(-3).toLowerCase()?await t.async("nodebuffer"):await t.async("text"),i[t.name]=e}))),i}},95079:t=>{!function(){function e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function r(){return 1}t.exports?t.exports=a:this.LRUCache=a;var n=!1;function i(t){n||"string"==typeof t||"number"==typeof t||(n=!0,console.error(new TypeError("LRU: key must be a string or number. Almost certainly a bug! "+typeof t).stack))}function a(t){if(!(this instanceof a))return new a(t);"number"==typeof t&&(t={max:t}),t||(t={}),this._max=t.max,(!this._max||"number"!=typeof this._max||this._max<=0)&&(this._max=1/0),this._lengthCalculator=t.length||r,"function"!=typeof this._lengthCalculator&&(this._lengthCalculator=r),this._allowStale=t.stale||!1,this._maxAge=t.maxAge||null,this._dispose=t.dispose,this.reset()}function o(t,e,r){i(e);var n=t._cache[e];return n&&(s(t,n)?(u(t,n),t._allowStale||(n=void 0)):r&&function(t,e){l(t,e),e.lu=t._mru++,t._lruList[e.lu]=e}(t,n),n&&(n=n.value)),n}function s(t,e){if(!e||!e.maxAge&&!t._maxAge)return!1;var r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t._maxAge&&r>t._maxAge}function c(t){for(;t._lrut._max;)u(t,t._lruList[t._lru])}function l(t,e){for(delete t._lruList[e.lu];t._lruthis._max&&c(this)},get:function(){return this._max},enumerable:!0}),Object.defineProperty(a.prototype,"lengthCalculator",{set:function(t){if("function"!=typeof t)for(var e in this._lengthCalculator=r,this._length=this._itemCount,this._cache)this._cache[e].length=1;else for(var e in this._lengthCalculator=t,this._length=0,this._cache)this._cache[e].length=this._lengthCalculator(this._cache[e].value),this._length+=this._cache[e].length;this._length>this._max&&c(this)},get:function(){return this._lengthCalculator},enumerable:!0}),Object.defineProperty(a.prototype,"length",{get:function(){return this._length},enumerable:!0}),Object.defineProperty(a.prototype,"itemCount",{get:function(){return this._itemCount},enumerable:!0}),a.prototype.forEach=function(t,e){e=e||this;for(var r=0,n=this._itemCount,i=this._mru-1;i>=0&&r=0&&e=0&&e=0&&ethis._max?(u(this,this._cache[t]),!1):(this._dispose&&this._dispose(t,this._cache[t].value),this._cache[t].now=a,this._cache[t].maxAge=n,this._cache[t].value=r,this._length+=o-this._cache[t].length,this._cache[t].length=o,this.get(t),this._length>this._max&&c(this),!0);var s=new h(t,r,this._mru++,o,a,n);return s.length>this._max?(this._dispose&&this._dispose(t,r),!1):(this._length+=s.length,this._lruList[s.lu]=this._cache[t]=s,this._itemCount++,this._length>this._max&&c(this),!0)},a.prototype.has=function(t){return i(t),!!e(this._cache,t)&&!s(this,this._cache[t])},a.prototype.get=function(t){return i(t),o(this,t,!0)},a.prototype.peek=function(t){return i(t),o(this,t,!1)},a.prototype.pop=function(){var t=this._lruList[this._lru];return u(this,t),t||null},a.prototype.del=function(t){i(t),u(this,this._cache[t])},a.prototype.load=function(t){this.reset();for(var e=Date.now(),r=t.length-1;r>=0;r--){var n=t[r];i(n.k);var a=n.e||0;if(0===a)this.set(n.k,n.v);else{var o=a-e;o>0&&this.set(n.k,n.v,o)}}}}()},6941:(t,e,r)=>{var n=r(48764).lW,i=n.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},a=e.s=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!i(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=c;break;default:return void(this.write=o)}this.charBuffer=new n(6),this.charReceived=0,this.charLength=0};function o(t){return t.toString(this.encoding)}function s(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function c(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}a.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var n,i=t.length;if(this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),i=(e+=t.toString(this.encoding,0,i)).length-1,(n=e.charCodeAt(i))>=55296&&n<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),t.copy(this.charBuffer,0,0,a),e.substring(0,i)}return e},a.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},a.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},29718:(t,e,r)=>{t.exports=r(59141)},59141:function(t,e,r){!function(e){"use strict";function n(t,e,r){return e<=t&&t<=r}t.exports&&!e["encoding-indexes"]&&r(37597);var i=Math.floor;function a(t){if(void 0===t)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function o(t){return 0<=t&&t<=127}var s=o,c=-1;function l(t){this.tokens=[].slice.call(t),this.tokens.reverse()}l.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():c},prepend:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.push(e.pop());else this.tokens.push(t)},push:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.unshift(e.shift());else this.tokens.unshift(t)}};var u=-1;function h(t,e){if(t)throw TypeError("Decoder error");return e||65533}function f(t){throw TypeError("The code point "+t+" could not be encoded.")}function d(t){return t=String(t).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(m,t)?m[t]:null}var p=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],m={};p.forEach((function(t){t.encodings.forEach((function(t){t.labels.forEach((function(e){m[e]=t}))}))}));var g,A,v={},y={};function b(t,e){return e&&e[t]||null}function x(t,e){var r=e.indexOf(t);return-1===r?null:r}function w(t){if(!("encoding-indexes"in e))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return e["encoding-indexes"][t]}var _="utf-8";function E(t,e){if(!(this instanceof E))throw TypeError("Called as a function. Did you forget 'new'?");t=void 0!==t?String(t):_,e=a(e),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var r=d(t);if(null===r||"replacement"===r.name)throw RangeError("Unknown encoding: "+t);if(!y[r.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var n=this;return n._encoding=r,Boolean(e.fatal)&&(n._error_mode="fatal"),Boolean(e.ignoreBOM)&&(n._ignoreBOM=!0),Object.defineProperty||(this.encoding=n._encoding.name.toLowerCase(),this.fatal="fatal"===n._error_mode,this.ignoreBOM=n._ignoreBOM),n}function M(t,r){if(!(this instanceof M))throw TypeError("Called as a function. Did you forget 'new'?");r=a(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var n=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){var i=d(t=void 0!==t?String(t):_);if(null===i||"replacement"===i.name)throw RangeError("Unknown encoding: "+t);if(!v[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");n._encoding=i}else n._encoding=d("utf-8"),void 0!==t&&"console"in e&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=n._encoding.name.toLowerCase()),n}function S(t){var e=t.fatal,r=0,i=0,a=0,o=128,s=191;this.handler=function(t,l){if(l===c&&0!==a)return a=0,h(e);if(l===c)return u;if(0===a){if(n(l,0,127))return l;if(n(l,194,223))a=1,r=31&l;else if(n(l,224,239))224===l&&(o=160),237===l&&(s=159),a=2,r=15&l;else{if(!n(l,240,244))return h(e);240===l&&(o=144),244===l&&(s=143),a=3,r=7&l}return null}if(!n(l,o,s))return r=a=i=0,o=128,s=191,t.prepend(l),h(e);if(o=128,s=191,r=r<<6|63&l,(i+=1)!==a)return null;var f=r;return r=a=i=0,f}}function C(t){t.fatal,this.handler=function(t,e){if(e===c)return u;if(s(e))return e;var r,i;n(e,128,2047)?(r=1,i=192):n(e,2048,65535)?(r=2,i=224):n(e,65536,1114111)&&(r=3,i=240);for(var a=[(e>>6*r)+i];r>0;){var o=e>>6*(r-1);a.push(128|63&o),r-=1}return a}}function T(t,e){var r=e.fatal;this.handler=function(e,n){if(n===c)return u;if(o(n))return n;var i=t[n-128];return null===i?h(r):i}}function I(t,e){e.fatal,this.handler=function(e,r){if(r===c)return u;if(s(r))return r;var n=x(r,t);return null===n&&f(r),n+128}}function R(t){var e=t.fatal,r=0,i=0,a=0;this.handler=function(t,s){if(s===c&&0===r&&0===i&&0===a)return u;var l;if(s!==c||0===r&&0===i&&0===a||(r=0,i=0,a=0,h(e)),0!==a){l=null,n(s,48,57)&&(l=function(t){if(t>39419&&t<189e3||t>1237575)return null;if(7457===t)return 59335;var e,r=0,n=0,i=w("gb18030-ranges");for(e=0;e>8,n=255&t;return e?[r,n]:[n,r]}function V(t,e){var r=e.fatal,i=null,a=null;this.handler=function(e,o){if(o===c&&(null!==i||null!==a))return h(r);if(o===c&&null===i&&null===a)return u;if(null===i)return i=o,null;var s;if(s=t?(i<<8)+o:(o<<8)+i,i=null,null!==a){var l=a;return a=null,n(s,56320,57343)?65536+1024*(l-55296)+(s-56320):(e.prepend(Z(s,t)),h(r))}return n(s,55296,56319)?(a=s,null):n(s,56320,57343)?h(r):s}}function Q(t,e){e.fatal,this.handler=function(e,r){if(r===c)return u;if(n(r,0,65535))return Z(r,t);var i=Z(55296+(r-65536>>10),t),a=Z(56320+(r-65536&1023),t);return i.concat(a)}}function j(t){t.fatal,this.handler=function(t,e){return e===c?u:o(e)?e:63360+e-128}}function W(t){t.fatal,this.handler=function(t,e){return e===c?u:s(e)?e:n(e,63360,63487)?e-63360+128:f(e)}}Object.defineProperty&&(Object.defineProperty(E.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(E.prototype,"fatal",{get:function(){return"fatal"===this._error_mode}}),Object.defineProperty(E.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}})),E.prototype.decode=function(t,e){var r;r="object"==typeof t&&t instanceof ArrayBuffer?new Uint8Array(t):"object"==typeof t&&"buffer"in t&&t.buffer instanceof ArrayBuffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),e=a(e),this._do_not_flush||(this._decoder=y[this._encoding.name]({fatal:"fatal"===this._error_mode}),this._BOMseen=!1),this._do_not_flush=Boolean(e.stream);for(var n,i=new l(r),o=[];;){var s=i.read();if(s===c)break;if((n=this._decoder.handler(i,s))===u)break;null!==n&&(Array.isArray(n)?o.push.apply(o,n):o.push(n))}if(!this._do_not_flush){do{if((n=this._decoder.handler(i,i.read()))===u)break;null!==n&&(Array.isArray(n)?o.push.apply(o,n):o.push(n))}while(!i.endOfStream());this._decoder=null}return function(t){var e,r;return e=["UTF-8","UTF-16LE","UTF-16BE"],r=this._encoding.name,-1===e.indexOf(r)||this._ignoreBOM||this._BOMseen||(t.length>0&&65279===t[0]?(this._BOMseen=!0,t.shift()):t.length>0&&(this._BOMseen=!0)),function(t){for(var e="",r=0;r>10),56320+(1023&n)))}return e}(t)}.call(this,o)},Object.defineProperty&&Object.defineProperty(M.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),M.prototype.encode=function(t,e){t=void 0===t?"":String(t),e=a(e),this._do_not_flush||(this._encoder=v[this._encoding.name]({fatal:"fatal"===this._fatal})),this._do_not_flush=Boolean(e.stream);for(var r,n=new l(function(t){for(var e=String(t),r=e.length,n=0,i=[];n57343)i.push(a);else if(56320<=a&&a<=57343)i.push(65533);else if(55296<=a&&a<=56319)if(n===r-1)i.push(65533);else{var o=e.charCodeAt(n+1);if(56320<=o&&o<=57343){var s=1023&a,c=1023&o;i.push(65536+(s<<10)+c),n+=1}else i.push(65533)}n+=1}return i}(t)),i=[];;){var o=n.read();if(o===c)break;if((r=this._encoder.handler(n,o))===u)break;Array.isArray(r)?i.push.apply(i,r):i.push(r)}if(!this._do_not_flush){for(;(r=this._encoder.handler(n,n.read()))!==u;)Array.isArray(r)?i.push.apply(i,r):i.push(r);this._encoder=null}return new Uint8Array(i)},v["UTF-8"]=function(t){return new C(t)},y["UTF-8"]=function(t){return new S(t)},"encoding-indexes"in e&&p.forEach((function(t){"Legacy single-byte encodings"===t.heading&&t.encodings.forEach((function(t){var e=t.name,r=w(e.toLowerCase());y[e]=function(t){return new T(r,t)},v[e]=function(t){return new I(r,t)}}))})),y.GBK=function(t){return new R(t)},v.GBK=function(t){return new B(t,!0)},v.gb18030=function(t){return new B(t)},y.gb18030=function(t){return new R(t)},v.Big5=function(t){return new L(t)},y.Big5=function(t){return new k(t)},v["EUC-JP"]=function(t){return new D(t)},y["EUC-JP"]=function(t){return new P(t)},v["ISO-2022-JP"]=function(t){return new O(t)},y["ISO-2022-JP"]=function(t){return new U(t)},v.Shift_JIS=function(t){return new N(t)},y.Shift_JIS=function(t){return new F(t)},v["EUC-KR"]=function(t){return new G(t)},y["EUC-KR"]=function(t){return new z(t)},v["UTF-16BE"]=function(t){return new Q(!0,t)},y["UTF-16BE"]=function(t){return new V(!0,t)},v["UTF-16LE"]=function(t){return new Q(!1,t)},y["UTF-16LE"]=function(t){return new V(!1,t)},v["x-user-defined"]=function(t){return new W(t)},y["x-user-defined"]=function(t){return new j(t)},e.TextEncoder||(e.TextEncoder=M),e.TextDecoder||(e.TextDecoder=E),t.exports&&(t.exports={TextEncoder:e.TextEncoder,TextDecoder:e.TextDecoder,EncodingIndexes:e["encoding-indexes"]})}(this||{})},11379:(t,e)=>{"use strict";function r(t,e,r){return e<=t&&t<=r}function n(t){if(void 0===t)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function i(t){this.tokens=[].slice.call(t)}i.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(t)},push:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.push(e.shift());else this.tokens.push(t)}};var a=-1;function o(t,e){if(t)throw TypeError("Decoder error");return e||65533}var s="utf-8";function c(t,e){if(!(this instanceof c))return new c(t,e);if((t=void 0!==t?String(t).toLowerCase():s)!==s)throw new Error("Encoding not supported. Only utf-8 is supported");e=n(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(e.fatal),this._ignoreBOM=Boolean(e.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function l(t){var e=t.fatal,n=0,i=0,s=0,c=128,l=191;this.handler=function(t,u){if(-1===u&&0!==s)return s=0,o(e);if(-1===u)return a;if(0===s){if(r(u,0,127))return u;if(r(u,194,223))s=1,n=u-192;else if(r(u,224,239))224===u&&(c=160),237===u&&(l=159),s=2,n=u-224;else{if(!r(u,240,244))return o(e);240===u&&(c=144),244===u&&(l=143),s=3,n=u-240}return n<<=6*s,null}if(!r(u,c,l))return n=s=i=0,c=128,l=191,t.prepend(u),o(e);if(c=128,l=191,n+=u-128<<6*(s-(i+=1)),i!==s)return null;var h=n;return n=s=i=0,h}}c.prototype={decode:function(t,e){var r;r="object"==typeof t&&t instanceof ArrayBuffer?new Uint8Array(t):"object"==typeof t&&"buffer"in t&&t.buffer instanceof ArrayBuffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),e=n(e),this._streaming||(this._decoder=new l({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(e.stream);for(var o,s=new i(r),c=[];!s.endOfStream()&&(o=this._decoder.handler(s,s.read()))!==a;)null!==o&&(Array.isArray(o)?c.push.apply(c,o):c.push(o));if(!this._streaming){do{if((o=this._decoder.handler(s,s.read()))===a)break;null!==o&&(Array.isArray(o)?c.push.apply(c,o):c.push(o))}while(!s.endOfStream());this._decoder=null}return c.length&&(-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===c[0]?(this._BOMseen=!0,c.shift()):this._BOMseen=!0)),function(t){for(var e="",r=0;r>10),56320+(1023&n)))}return e}(c)}},e.k=c},38264:function(t,e,r){!function(t){var e=function(){try{return!!Symbol.iterator}catch(t){return!1}}(),r=function(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e&&(r[Symbol.iterator]=function(){return r}),r},n=function(t){return encodeURIComponent(t).replace(/%20/g,"+")},i=function(t){return decodeURIComponent(String(t).replace(/\+/g," "))};(function(){try{var e=t.URLSearchParams;return"a=1"===new e("?a=1").toString()&&"function"==typeof e.prototype.set&&"function"==typeof e.prototype.entries}catch(t){return!1}})()||function(){var i=function(t){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var e=typeof t;if("undefined"===e);else if("string"===e)""!==t&&this._fromString(t);else if(t instanceof i){var r=this;t.forEach((function(t,e){r.append(e,t)}))}else{if(null===t||"object"!==e)throw new TypeError("Unsupported input's type for URLSearchParams");if("[object Array]"===Object.prototype.toString.call(t))for(var n=0;ne[0]?1:0})),t._entries&&(t._entries={});for(var r=0;r1?i(n[1]):"")}})}(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(t){if(function(){try{var e=new t.URL("b","http://a");return e.pathname="c d","http://a/c%20d"===e.href&&e.searchParams}catch(t){return!1}}()||function(){var e=t.URL,r=function(e,r){"string"!=typeof e&&(e=String(e)),r&&"string"!=typeof r&&(r=String(r));var n,i=document;if(r&&(void 0===t.location||r!==t.location.href)){r=r.toLowerCase(),(n=(i=document.implementation.createHTMLDocument("")).createElement("base")).href=r,i.head.appendChild(n);try{if(0!==n.href.indexOf(r))throw new Error(n.href)}catch(t){throw new Error("URL unable to set base "+r+" due to "+t)}}var a=i.createElement("a");a.href=e,n&&(i.body.appendChild(a),a.href=a.href);var o=i.createElement("input");if(o.type="url",o.value=e,":"===a.protocol||!/:/.test(a.href)||!o.checkValidity()&&!r)throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:a});var s=new t.URLSearchParams(this.search),c=!0,l=!0,u=this;["append","delete","set"].forEach((function(t){var e=s[t];s[t]=function(){e.apply(s,arguments),c&&(l=!1,u.search=s.toString(),l=!0)}})),Object.defineProperty(this,"searchParams",{value:s,enumerable:!0});var h=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==h&&(h=this.search,l&&(c=!1,this.searchParams._fromString(this.search),c=!0))}})},n=r.prototype;["hash","host","hostname","port","protocol"].forEach((function(t){!function(t){Object.defineProperty(n,t,{get:function(){return this._anchorElement[t]},set:function(e){this._anchorElement[t]=e},enumerable:!0})}(t)})),Object.defineProperty(n,"search",{get:function(){return this._anchorElement.search},set:function(t){this._anchorElement.search=t,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(n,{toString:{get:function(){var t=this;return function(){return t.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(t){this._anchorElement.href=t,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(t){this._anchorElement.pathname=t},enumerable:!0},origin:{get:function(){var t={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],e=this._anchorElement.port!=t&&""!==this._anchorElement.port;return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(e?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(t){},enumerable:!0},username:{get:function(){return""},set:function(t){},enumerable:!0}}),r.createObjectURL=function(t){return e.createObjectURL.apply(e,arguments)},r.revokeObjectURL=function(t){return e.revokeObjectURL.apply(e,arguments)},t.URL=r}(),void 0!==t.location&&!("origin"in t.location)){var e=function(){return t.location.protocol+"//"+t.location.hostname+(t.location.port?":"+t.location.port:"")};try{Object.defineProperty(t.location,"origin",{get:e,enumerable:!0})}catch(r){setInterval((function(){t.location.origin=e()}),100)}}}(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this)},57147:(t,e,r)=>{"use strict";var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g||{},i="URLSearchParams"in n,a="Symbol"in n&&"iterator"in Symbol,o="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(t){return!1}}(),s="FormData"in n,c="ArrayBuffer"in n;if(c)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&l.indexOf(Object.prototype.toString.call(t))>-1};function h(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function f(t){return"string"!=typeof t&&(t=String(t)),t}function d(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return a&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){if(2!=t.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function m(t){if(!t._noBody)return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function g(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function A(t){var e=new FileReader,r=g(e);return e.readAsArrayBuffer(t),r}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:s&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:i&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():c&&o&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var t=m(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return m(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer));if(o)return this.blob().then(A);throw new Error("could not read as ArrayBuffer")},this.text=function(){var t,e,r,n,i,a=m(this);if(a)return a;if(this._bodyBlob)return t=this._bodyBlob,r=g(e=new FileReader),i=(n=/charset=([A-Za-z0-9_-]+)/.exec(t.type))?n[1]:"utf-8",e.readAsText(t,i),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?i:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in n)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function w(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function _(t,e){if(!(this instanceof _))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new p(e.headers),this.url=e.url||"",this._initBody(t)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})},y.call(x.prototype),y.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},_.error=function(){var t=new _(null,{status:200,statusText:""});return t.status=0,t.type="error",t};var E=[301,302,303,307,308];_.redirect=function(t,e){if(-1===E.indexOf(e))throw new RangeError("Invalid status code");return new _(null,{status:e,headers:{location:t}})};var M=n.DOMException;try{new M}catch(t){(M=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack}).prototype=Object.create(Error.prototype),M.prototype.constructor=M}function S(t,e){return new Promise((function(r,i){var a=new x(t,e);if(a.signal&&a.signal.aborted)return i(new M("Aborted","AbortError"));var s=new XMLHttpRequest;function l(){s.abort()}if(s.onload=function(){var t,e,n={statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new p,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{e.append(n,i)}catch(t){console.warn("Response "+t.message)}}})),e)};a.url.startsWith("file://")&&(s.status<200||s.status>599)?n.status=200:n.status=s.status,n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;setTimeout((function(){r(new _(i,n))}),0)},s.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},s.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request timed out"))}),0)},s.onabort=function(){setTimeout((function(){i(new M("Aborted","AbortError"))}),0)},s.open(a.method,function(t){try{return""===t&&n.location.href?n.location.href:t}catch(e){return t}}(a.url),!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&(o?s.responseType="blob":c&&(s.responseType="arraybuffer")),e&&"object"==typeof e.headers&&!(e.headers instanceof p||n.Headers&&e.headers instanceof n.Headers)){var u=[];Object.getOwnPropertyNames(e.headers).forEach((function(t){u.push(h(t)),s.setRequestHeader(t,f(e.headers[t]))})),a.headers.forEach((function(t,e){-1===u.indexOf(e)&&s.setRequestHeader(e,t)}))}else a.headers.forEach((function(t,e){s.setRequestHeader(e,t)}));a.signal&&(a.signal.addEventListener("abort",l),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",l)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}S.polyfill=!0,n.fetch||(n.fetch=S,n.Headers=p,n.Request=x,n.Response=_)},37597:()=>{},17061:(t,e,r)=>{var n=r(18698).default;function i(){"use strict";t.exports=i=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},r=Object.prototype,a=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),s=new T(n||[]);return o(a,"_invoke",{value:E(t,r,s)}),a}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p={};function m(){}function g(){}function A(){}var v={};h(v,c,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(I([])));b&&b!==r&&a.call(b,c)&&(v=b);var x=A.prototype=m.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,s,c){var l=d(t[i],t,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==n(h)&&a.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(h).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return{value:void 0,done:!0}}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=M(o,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=d(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function M(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,M(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var i=d(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,p;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function I(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;C(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:I(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},18698:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},64687:(t,e,r)=>{var n=r(17061)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},42917:(t,e,r)=>{"use strict";r(59749),r(86544),r(58373),r(96157),r(82529),r(84254),r(64155),r(93531),r(95906),r(50549),r(96285),r(18200),r(69373),r(66793),r(44578),r(21057),r(68932),r(95879),r(54927),r(92176),r(34338),r(2966),r(55791),r(97895),r(38077),r(25728),r(39772),r(59867),r(93383),r(62795),r(54564),r(49693),r(77049),r(76801),r(97195),r(63975),r(752),r(6203),r(72410),r(50886),r(37593),r(70560),r(278),r(81386),r(93374),r(89730),r(98742),r(65137),r(21932),r(62506),r(29830),r(12894),r(93530),r(13383),r(90385),r(91719),r(21319),r(69365),r(33870),r(99211),r(18201),r(55635),r(42227),r(99679),r(24343),r(65007),r(78150),r(59903),r(30024),r(60428),r(41517),r(56269),r(34284),r(45398),r(48324),r(7629),r(56646),r(89348),r(6557),r(62428),r(45263),r(74712),r(54986),r(47221),r(94992),r(25499),r(59944),r(78527),r(75239),r(92076),r(68813),r(96976),r(62700),r(91554),r(77509),r(21416),r(79288),r(53584),r(82243),r(95765),r(45993),r(92547),r(7936),r(32704),r(52362),r(21552),r(10704),r(97389),r(25284),r(60429),r(51013),r(33994),r(35082),r(40739),r(47409),r(36585),r(41830),r(85415),r(81919),r(99474),r(79997),r(88052),r(44079),r(14566),r(76101),r(36446),r(35140),r(4179),r(69358),r(75450),r(54993),r(48115),r(19330),r(30658),r(5399),r(60228),r(86466),r(80939),r(32320),r(73964),r(41195),r(87609),r(36409),r(13505),r(54333),r(30050),r(99871),r(1049),r(32349),r(50149),r(43792),r(69707),r(63545),r(62087),r(51505),r(45247),r(22373),r(76034),r(52003),r(68518),r(64043),r(25847),r(13440),r(7409),r(12826),r(19649),r(7961),r(86239),r(2918),r(20283),r(43843),r(12281),r(21694),r(22462),r(79866),r(72940),r(8472),r(92404),r(59588),r(57267),r(56532),r(61514),r(9873),r(268),r(20372),r(35237),r(28436),r(16386),r(3255),r(90343),r(21444),r(25906),r(95682),r(98041),r(6364),r(82954),r(19162),r(37960),r(470),r(67446),r(47729),r(2e3),r(29068),r(70292),r(55304),r(89988),r(854),r(28607),r(30938),r(75679),r(18557),r(95194),r(36664),r(55980),r(79943),r(96089),r(18539),r(48690),r(20522),r(82),r(45385),r(59495),r(85552),r(31803),r(91565),r(67987),r(49365),r(80677),r(19038),r(18118),r(41165),r(71522),r(79976),r(4797),r(7300),r(93356),r(62533),r(99724),r(24224),r(61121),r(99901),r(37133),r(622),r(51090),r(50414),r(89503),r(26810),r(18073),r(4154),r(7802),r(54883),r(38197),r(20097),r(36208),r(22525),r(96882),r(32539),r(5082),r(98),r(32221),r(67890),r(47041),r(86322),r(92253),r(97554),r(86247),r(21412),r(43097),r(11070),r(64578),r(77299),r(15694),r(17815),r(19029),r(6237),r(81954),r(87152),r(89667),r(49118),r(32411),r(3256),r(85625),r(10914),r(14494),r(9468),r(24587),r(60779),r(65503),r(50236),r(89246),r(31186),r(9279),r(26725),r(26125),r(2820),r(62517),r(54947),r(74993),r(78832),r(67602),r(50647),r(82639),r(63986),r(16054),r(53476),r(70928),r(49411),r(30005),r(73494),r(94564),r(41792),r(5985),r(31107),r(28244),r(3645),r(58429),r(39569),r(74320),r(20691),r(82964),r(67444),r(97968),r(747),r(41099),r(26320),r(20876),r(6052),r(39879),r(76791),r(75341),r(40019),r(92343),r(51096),r(4314),r(63111),r(23346),r(64984),r(64078),r(24453),r(66190),r(25684),r(31789),r(8677),r(346),r(59151),r(91069),r(18886),r(88065),r(68172),r(60445),r(99457),r(613),r(835),r(926),r(82899),r(29977),r(53669),r(31927),r(77131),r(55174),r(3210),r(76314),r(218),r(40393),r(6616),r(90810),r(19959),r(73347),r(71913),r(70003),r(79955),r(7859),r(31138),r(28809),r(2946),r(32460),r(57282),r(5058),r(15716),r(36814),r(30349),r(96986),r(95681),r(13781),r(33442),r(98873),r(61964),r(50308),r(69878),r(18955),r(52915),r(65115),r(19490),r(95752),r(32789),r(27913),r(6831),r(98686),r(90243),r(22275),r(98030),r(86220),r(21917),r(95853),r(66084),r(2741),r(59012),r(38320),r(78988),r(80546),r(62586),r(46019),r(5010),r(45749),r(4835),r(58799),r(18134),r(27041),r(44767),r(92981),r(85044),r(76677),r(96256),r(18241),r(59359),r(54302),r(1274),r(30548),r(25298),r(11882),r(915),r(91238),r(17911),r(23579),r(91117),r(85723),r(68680),r(77225),r(99369),r(22983),r(90201),r(13466),r(23321),r(84930),r(92465),r(45738),r(52586),r(84645),r(47522),r(76265),r(97337),r(13429),r(37462),r(40088),r(10455),r(3650),r(25564),r(96869),r(78730),r(69822),r(19979),r(79307),r(98858),r(61318),r(33228),r(50496)},46108:(t,e,r)=>{"use strict";r(42917)},10509:(t,e,r)=>{"use strict";var n=r(69985),i=r(23691),a=TypeError;t.exports=function(t){if(n(t))return t;throw new a(i(t)+" is not a function")}},52655:(t,e,r)=>{"use strict";var n=r(19429),i=r(23691),a=TypeError;t.exports=function(t){if(n(t))return t;throw new a(i(t)+" is not a constructor")}},9945:(t,e,r)=>{"use strict";var n=r(83914).has;t.exports=function(t){return n(t),t}},23550:(t,e,r)=>{"use strict";var n=r(69985),i=String,a=TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw new a("Can't set "+i(t)+" as a prototype")}},10029:(t,e,r)=>{"use strict";var n=r(61034).has;t.exports=function(t){return n(t),t}},51082:t=>{"use strict";var e=TypeError;t.exports=function(t){if("string"==typeof t)return t;throw new e("Argument is not a string")}},457:(t,e,r)=>{"use strict";var n=r(16803).has;t.exports=function(t){return n(t),t}},53499:(t,e,r)=>{"use strict";var n=r(78616).has;t.exports=function(t){return n(t),t}},29199:(t,e,r)=>{"use strict";var n=r(22615),i=r(68844),a=r(54071),o=r(85027),s=r(10509),c=r(981),l=r(54849),u=r(44201),h=u("asyncDispose"),f=u("dispose"),d=i([].push),p=function(t,e,r){return arguments.length<3&&!c(t)&&(r=s(function(t,e){if("async-dispose"===e){var r=l(t,h);return void 0!==r?r:(r=l(t,f),function(){n(r,this)})}return l(t,f)}(o(t),e))),void 0===r?function(){}:a(r,t)};t.exports=function(t,e,r,n){var i;if(arguments.length<4){if(c(e)&&"sync-dispose"===r)return;i=p(e,r)}else i=p(void 0,r,n);d(t.stack,i)}},87370:(t,e,r)=>{"use strict";var n=r(44201),i=r(25391),a=r(72560).f,o=n("unscopables"),s=Array.prototype;void 0===s[o]&&a(s,o,{configurable:!0,value:i(null)}),t.exports=function(t){s[o][t]=!0}},71514:(t,e,r)=>{"use strict";var n=r(10730).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},767:(t,e,r)=>{"use strict";var n=r(23622),i=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new i("Incorrect invocation")}},33425:(t,e,r)=>{"use strict";var n=r(48999),i=String,a=TypeError;t.exports=function(t){if(void 0===t||n(t))return t;throw new a(i(t)+" is not an object or undefined")}},85027:(t,e,r)=>{"use strict";var n=r(48999),i=String,a=TypeError;t.exports=function(t){if(n(t))return t;throw new a(i(t)+" is not an object")}},95668:(t,e,r)=>{"use strict";var n=r(50926),i=TypeError;t.exports=function(t){if("Uint8Array"===n(t))return t;throw new i("Argument is not an Uint8Array")}},37075:t=>{"use strict";t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},33050:(t,e,r)=>{"use strict";var n=r(52743),i=r(6648),a=TypeError;t.exports=n(ArrayBuffer.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==i(t))throw new a("ArrayBuffer expected");return t.byteLength}},22961:(t,e,r)=>{"use strict";var n=r(68844),i=r(33050),a=n(ArrayBuffer.prototype.slice);t.exports=function(t){if(0!==i(t))return!1;try{return a(t,0,0),!1}catch(t){return!0}}},11655:(t,e,r)=>{"use strict";var n=r(3689);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},29195:(t,e,r)=>{"use strict";var n=r(19037),i=r(68844),a=r(52743),o=r(19842),s=r(22961),c=r(33050),l=r(21420),u=r(63514),h=n.structuredClone,f=n.ArrayBuffer,d=n.DataView,p=n.TypeError,m=Math.min,g=f.prototype,A=d.prototype,v=i(g.slice),y=a(g,"resizable","get"),b=a(g,"maxByteLength","get"),x=i(A.getInt8),w=i(A.setInt8);t.exports=(u||l)&&function(t,e,r){var n,i=c(t),a=void 0===e?i:o(e),g=!y||!y(t);if(s(t))throw new p("ArrayBuffer is detached");if(u&&(t=h(t,{transfer:[t]}),i===a&&(r||g)))return t;if(i>=a&&(!r||g))n=v(t,0,a);else{var A=r&&!g&&b?{maxByteLength:b(t)}:void 0;n=new f(a,A);for(var _=new d(t),E=new d(n),M=m(a,i),S=0;S{"use strict";var n,i,a,o=r(37075),s=r(67697),c=r(19037),l=r(69985),u=r(48999),h=r(36812),f=r(50926),d=r(23691),p=r(75773),m=r(11880),g=r(62148),A=r(23622),v=r(61868),y=r(49385),b=r(44201),x=r(14630),w=r(618),_=w.enforce,E=w.get,M=c.Int8Array,S=M&&M.prototype,C=c.Uint8ClampedArray,T=C&&C.prototype,I=M&&v(M),R=S&&v(S),B=Object.prototype,k=c.TypeError,L=b("toStringTag"),P=x("TYPED_ARRAY_TAG"),D="TypedArrayConstructor",U=o&&!!y&&"Opera"!==f(c.opera),O=!1,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},N={BigInt64Array:8,BigUint64Array:8},z=function(t){var e=v(t);if(u(e)){var r=E(e);return r&&h(r,D)?r[D]:z(e)}},G=function(t){if(!u(t))return!1;var e=f(t);return h(F,e)||h(N,e)};for(n in F)(a=(i=c[n])&&i.prototype)?_(a)[D]=i:U=!1;for(n in N)(a=(i=c[n])&&i.prototype)&&(_(a)[D]=i);if((!U||!l(I)||I===Function.prototype)&&(I=function(){throw new k("Incorrect invocation")},U))for(n in F)c[n]&&y(c[n],I);if((!U||!R||R===B)&&(R=I.prototype,U))for(n in F)c[n]&&y(c[n].prototype,R);if(U&&v(T)!==R&&y(T,R),s&&!h(R,L))for(n in O=!0,g(R,L,{configurable:!0,get:function(){return u(this)?this[P]:void 0}}),F)c[n]&&p(c[n],P,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:U,TYPED_ARRAY_TAG:O&&P,aTypedArray:function(t){if(G(t))return t;throw new k("Target is not a typed array")},aTypedArrayConstructor:function(t){if(l(t)&&(!y||A(I,t)))return t;throw new k(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,n){if(s){if(r)for(var i in F){var a=c[i];if(a&&h(a.prototype,t))try{delete a.prototype[t]}catch(r){try{a.prototype[t]=e}catch(t){}}}R[t]&&!r||m(R,t,r?e:U&&S[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,r){var n,i;if(s){if(y){if(r)for(n in F)if((i=c[n])&&h(i,t))try{delete i[t]}catch(t){}if(I[t]&&!r)return;try{return m(I,t,r?e:U&&I[t]||e)}catch(t){}}for(n in F)!(i=c[n])||i[t]&&!r||m(i,t,e)}},getTypedArrayConstructor:z,isView:function(t){if(!u(t))return!1;var e=f(t);return"DataView"===e||h(F,e)||h(N,e)},isTypedArray:G,TypedArray:I,TypedArrayPrototype:R}},83999:(t,e,r)=>{"use strict";var n=r(19037),i=r(68844),a=r(67697),o=r(37075),s=r(41236),c=r(75773),l=r(62148),u=r(6045),h=r(3689),f=r(767),d=r(68700),p=r(43126),m=r(19842),g=r(37788),A=r(15477),v=r(61868),y=r(49385),b=r(72741).f,x=r(62872),w=r(9015),_=r(55997),E=r(618),M=s.PROPER,S=s.CONFIGURABLE,C="ArrayBuffer",T="DataView",I="prototype",R="Wrong index",B=E.getterFor(C),k=E.getterFor(T),L=E.set,P=n[C],D=P,U=D&&D[I],O=n[T],F=O&&O[I],N=Object.prototype,z=n.Array,G=n.RangeError,Z=i(x),V=i([].reverse),Q=A.pack,j=A.unpack,W=function(t){return[255&t]},H=function(t){return[255&t,t>>8&255]},X=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},q=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},Y=function(t){return Q(g(t),23,4)},J=function(t){return Q(t,52,8)},K=function(t,e,r){l(t[I],e,{configurable:!0,get:function(){return r(this)[e]}})},$=function(t,e,r,n){var i=k(t),a=m(r),o=!!n;if(a+e>i.byteLength)throw new G(R);var s=i.bytes,c=a+i.byteOffset,l=w(s,c,c+e);return o?l:V(l)},tt=function(t,e,r,n,i,a){var o=k(t),s=m(r),c=n(+i),l=!!a;if(s+e>o.byteLength)throw new G(R);for(var u=o.bytes,h=s+o.byteOffset,f=0;fit;)(rt=nt[it++])in D||c(D,rt,P[rt]);U.constructor=D}y&&v(F)!==N&&y(F,N);var at=new O(new D(2)),ot=i(F.setInt8);at.setInt8(0,2147483648),at.setInt8(1,2147483649),!at.getInt8(0)&&at.getInt8(1)||u(F,{setInt8:function(t,e){ot(this,t,e<<24>>24)},setUint8:function(t,e){ot(this,t,e<<24>>24)}},{unsafe:!0})}else U=(D=function(t){f(this,U);var e=m(t);L(this,{type:C,bytes:Z(z(e),0),byteLength:e}),a||(this.byteLength=e,this.detached=!1)})[I],F=(O=function(t,e,r){f(this,F),f(t,U);var n=B(t),i=n.byteLength,o=d(e);if(o<0||o>i)throw new G("Wrong offset");if(o+(r=void 0===r?i-o:p(r))>i)throw new G("Wrong length");L(this,{type:T,buffer:t,byteLength:r,byteOffset:o,bytes:n.bytes}),a||(this.buffer=t,this.byteLength=r,this.byteOffset=o)})[I],a&&(K(D,"byteLength",B),K(O,"buffer",k),K(O,"byteLength",k),K(O,"byteOffset",k)),u(F,{getInt8:function(t){return $(this,1,t)[0]<<24>>24},getUint8:function(t){return $(this,1,t)[0]},getInt16:function(t){var e=$(this,2,t,arguments.length>1&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=$(this,2,t,arguments.length>1&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return q($(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function(t){return q($(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(t){return j($(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function(t){return j($(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function(t,e){tt(this,1,t,W,e)},setUint8:function(t,e){tt(this,1,t,W,e)},setInt16:function(t,e){tt(this,2,t,H,e,arguments.length>2&&arguments[2])},setUint16:function(t,e){tt(this,2,t,H,e,arguments.length>2&&arguments[2])},setInt32:function(t,e){tt(this,4,t,X,e,arguments.length>2&&arguments[2])},setUint32:function(t,e){tt(this,4,t,X,e,arguments.length>2&&arguments[2])},setFloat32:function(t,e){tt(this,4,t,Y,e,arguments.length>2&&arguments[2])},setFloat64:function(t,e){tt(this,8,t,J,e,arguments.length>2&&arguments[2])}});_(D,C),_(O,T),t.exports={ArrayBuffer:D,DataView:O}},70357:(t,e,r)=>{"use strict";var n=r(90690),i=r(27578),a=r(6310),o=r(98494),s=Math.min;t.exports=[].copyWithin||function(t,e){var r=n(this),c=a(r),l=i(t,c),u=i(e,c),h=arguments.length>2?arguments[2]:void 0,f=s((void 0===h?c:i(h,c))-u,c-l),d=1;for(u0;)u in r?r[l]=r[u]:o(r,l),l+=d,u+=d;return r}},62872:(t,e,r)=>{"use strict";var n=r(90690),i=r(27578),a=r(6310);t.exports=function(t){for(var e=n(this),r=a(e),o=arguments.length,s=i(o>1?arguments[1]:void 0,r),c=o>2?arguments[2]:void 0,l=void 0===c?r:i(c,r);l>s;)e[s++]=t;return e}},57612:(t,e,r)=>{"use strict";var n=r(2960).forEach,i=r(16834)("forEach");t.exports=i?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},2231:(t,e,r)=>{"use strict";var n=r(54071),i=r(68844),a=r(90690),o=r(19429),s=r(13807),c=r(5185),l=r(22302),u=r(91664),h=r(54849),f=r(76058),d=r(88277),p=r(44201),m=r(29019),g=r(62489).toArray,A=p("asyncIterator"),v=i(d("Array","values")),y=i(v([]).next),b=function(){return new x(this)},x=function(t){this.iterator=v(t)};x.prototype.next=function(){return y(this.iterator)},t.exports=function(t){var e=this,r=arguments.length,i=r>1?arguments[1]:void 0,d=r>2?arguments[2]:void 0;return new(f("Promise"))((function(r){var f=a(t);void 0!==i&&(i=n(i,d));var p=h(f,A),v=p?void 0:u(f)||b,y=o(e)?new e:[],x=p?s(f,p):new m(l(c(f,v)));r(g(x,i,y))}))}},59976:(t,e,r)=>{"use strict";var n=r(6310);t.exports=function(t,e,r){for(var i=0,a=arguments.length>2?r:n(e),o=new t(a);a>i;)o[i]=e[i++];return o}},21055:(t,e,r)=>{"use strict";var n=r(54071),i=r(22615),a=r(90690),o=r(71228),s=r(93292),c=r(19429),l=r(6310),u=r(76522),h=r(5185),f=r(91664),d=Array;t.exports=function(t){var e=a(t),r=c(this),p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m;g&&(m=n(m,p>2?arguments[2]:void 0));var A,v,y,b,x,w,_=f(e),E=0;if(!_||this===d&&s(_))for(A=l(e),v=r?new this(A):d(A);A>E;E++)w=g?m(e[E],E):e[E],u(v,E,w);else for(x=(b=h(e,_)).next,v=r?new this:[];!(y=i(x,b)).done;E++)w=g?o(b,m,[y.value,E],!0):y.value,u(v,E,w);return v.length=E,v}},44416:(t,e,r)=>{"use strict";var n=r(54071),i=r(68844),a=r(94413),o=r(90690),s=r(6310),c=r(83914),l=c.Map,u=c.get,h=c.has,f=c.set,d=i([].push);t.exports=function(t){for(var e,r,i=o(this),c=a(i),p=n(t,arguments.length>1?arguments[1]:void 0),m=new l,g=s(c),A=0;g>A;A++)e=p(r=c[A],A,i),h(m,e)?d(u(m,e),r):f(m,e,[r]);return m}},64976:(t,e,r)=>{"use strict";var n=r(54071),i=r(68844),a=r(94413),o=r(90690),s=r(18360),c=r(6310),l=r(25391),u=r(59976),h=Array,f=i([].push);t.exports=function(t,e,r,i){for(var d,p,m,g=o(t),A=a(g),v=n(e,r),y=l(null),b=c(A),x=0;b>x;x++)m=A[x],(p=s(v(m,x,g)))in y?f(y[p],m):y[p]=[m];if(i&&(d=i(g))!==h)for(p in y)y[p]=u(d,y[p]);return y}},84328:(t,e,r)=>{"use strict";var n=r(65290),i=r(27578),a=r(6310),o=function(t){return function(e,r,o){var s,c=n(e),l=a(c),u=i(o,l);if(t&&r!=r){for(;l>u;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((t||u in c)&&c[u]===r)return t||u||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},61969:(t,e,r)=>{"use strict";var n=r(54071),i=r(94413),a=r(90690),o=r(6310),s=function(t){var e=1===t;return function(r,s,c){for(var l,u=a(r),h=i(u),f=o(h),d=n(s,c);f-- >0;)if(d(l=h[f],f,u))switch(t){case 0:return l;case 1:return f}return e?-1:void 0}};t.exports={findLast:s(0),findLastIndex:s(1)}},2960:(t,e,r)=>{"use strict";var n=r(54071),i=r(68844),a=r(94413),o=r(90690),s=r(6310),c=r(27120),l=i([].push),u=function(t){var e=1===t,r=2===t,i=3===t,u=4===t,h=6===t,f=7===t,d=5===t||h;return function(p,m,g,A){for(var v,y,b=o(p),x=a(b),w=s(x),_=n(m,g),E=0,M=A||c,S=e?M(p,w):r||f?M(p,0):void 0;w>E;E++)if((d||E in x)&&(y=_(v=x[E],E,b),t))if(e)S[E]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return E;case 2:l(S,v)}else switch(t){case 4:return!1;case 7:l(S,v)}return h?-1:i||u?u:S}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},60953:(t,e,r)=>{"use strict";var n=r(61735),i=r(65290),a=r(68700),o=r(6310),s=r(16834),c=Math.min,l=[].lastIndexOf,u=!!l&&1/[1].lastIndexOf(1,-0)<0,h=s("lastIndexOf"),f=u||!h;t.exports=f?function(t){if(u)return n(l,this,arguments)||0;var e=i(this),r=o(e),s=r-1;for(arguments.length>1&&(s=c(s,a(arguments[1]))),s<0&&(s=r+s);s>=0;s--)if(s in e&&e[s]===t)return s||0;return-1}:l},29042:(t,e,r)=>{"use strict";var n=r(3689),i=r(44201),a=r(3615),o=i("species");t.exports=function(t){return a>=51||!n((function(){var e=[];return(e.constructor={})[o]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},16834:(t,e,r)=>{"use strict";var n=r(3689);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){return 1},1)}))}},88820:(t,e,r)=>{"use strict";var n=r(10509),i=r(90690),a=r(94413),o=r(6310),s=TypeError,c=function(t){return function(e,r,c,l){var u=i(e),h=a(u),f=o(u);n(r);var d=t?f-1:0,p=t?-1:1;if(c<2)for(;;){if(d in h){l=h[d],d+=p;break}if(d+=p,t?d<0:f<=d)throw new s("Reduce of empty array with no initial value")}for(;t?d>=0:f>d;d+=p)d in h&&(l=r(l,h[d],d,u));return l}};t.exports={left:c(!1),right:c(!0)}},5649:(t,e,r)=>{"use strict";var n=r(67697),i=r(92297),a=TypeError,o=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(i(t)&&!o(t,"length").writable)throw new a("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},9015:(t,e,r)=>{"use strict";var n=r(27578),i=r(6310),a=r(76522),o=Array,s=Math.max;t.exports=function(t,e,r){for(var c=i(t),l=n(e,c),u=n(void 0===r?c:r,c),h=o(s(u-l,0)),f=0;l{"use strict";var n=r(68844);t.exports=n([].slice)},50382:(t,e,r)=>{"use strict";var n=r(9015),i=Math.floor,a=function(t,e){var r=t.length,c=i(r/2);return r<8?o(t,e):s(t,a(n(t,0,c),e),a(n(t,c),e),e)},o=function(t,e){for(var r,n,i=t.length,a=1;a0;)t[n]=t[--n];n!==a++&&(t[n]=r)}return t},s=function(t,e,r,n){for(var i=e.length,a=r.length,o=0,s=0;o{"use strict";var n=r(92297),i=r(19429),a=r(48999),o=r(44201)("species"),s=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,(i(e)&&(e===s||n(e.prototype))||a(e)&&null===(e=e[o]))&&(e=void 0)),void 0===e?s:e}},27120:(t,e,r)=>{"use strict";var n=r(25271);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},26166:(t,e,r)=>{"use strict";var n=r(6310);t.exports=function(t,e){for(var r=n(t),i=new e(r),a=0;a{"use strict";var n=r(68844),i=r(10509),a=r(981),o=r(6310),s=r(90690),c=r(83914),l=r(10613),u=c.Map,h=c.has,f=c.set,d=n([].push);t.exports=function(t){var e,r,n,c=s(this),p=o(c),m=[],g=new u,A=a(t)?function(t){return t}:i(t);for(e=0;e{"use strict";var n=r(6310),i=r(68700),a=RangeError;t.exports=function(t,e,r,o){var s=n(t),c=i(r),l=c<0?s+c:c;if(l>=s||l<0)throw new a("Incorrect index");for(var u=new e(s),h=0;h{"use strict";var n=r(22615),i=r(85027),a=r(25391),o=r(54849),s=r(6045),c=r(618),l=r(76058),u=r(23070),h=r(27807),f=l("Promise"),d="AsyncFromSyncIterator",p=c.set,m=c.getterFor(d),g=function(t,e,r){var n=t.done;f.resolve(t.value).then((function(t){e(h(t,n))}),r)},A=function(t){t.type=d,p(this,t)};A.prototype=s(a(u),{next:function(){var t=m(this);return new f((function(e,r){var a=i(n(t.next,t.iterator));g(a,e,r)}))},return:function(){var t=m(this).iterator;return new f((function(e,r){var a=o(t,"return");if(void 0===a)return e(h(void 0,!0));var s=i(n(a,t));g(s,e,r)}))}}),t.exports=A},52399:(t,e,r)=>{"use strict";var n=r(22615),i=r(76058),a=r(54849);t.exports=function(t,e,r,o){try{var s=a(t,"return");if(s)return i("Promise").resolve(n(s,t)).then((function(){e(r)}),(function(t){o(t)}))}catch(t){return o(t)}e(r)}},17394:(t,e,r)=>{"use strict";var n=r(22615),i=r(9302),a=r(85027),o=r(25391),s=r(75773),c=r(6045),l=r(44201),u=r(618),h=r(76058),f=r(54849),d=r(23070),p=r(27807),m=r(72125),g=h("Promise"),A=l("toStringTag"),v="AsyncIteratorHelper",y="WrapForValidAsyncIterator",b=u.set,x=function(t){var e=!t,r=u.getterFor(t?y:v),s=function(t){var n=i((function(){return r(t)})),a=n.error,o=n.value;return a||e&&o.done?{exit:!0,value:a?g.reject(o):g.resolve(p(void 0,!0))}:{exit:!1,value:o}};return c(o(d),{next:function(){var t=s(this),e=t.value;if(t.exit)return e;var r=i((function(){return a(e.nextHandler(g))})),n=r.error,o=r.value;return n&&(e.done=!0),n?g.reject(o):g.resolve(o)},return:function(){var e=s(this),r=e.value;if(e.exit)return r;r.done=!0;var o,c,l=r.iterator,u=i((function(){if(r.inner)try{m(r.inner.iterator,"normal")}catch(t){return m(l,"throw",t)}return f(l,"return")}));return o=c=u.value,u.error?g.reject(c):void 0===o?g.resolve(p(void 0,!0)):(c=(u=i((function(){return n(o,l)}))).value,u.error?g.reject(c):t?g.resolve(c):g.resolve(c).then((function(t){return a(t),p(void 0,!0)})))}})},w=x(!0),_=x(!1);s(_,A,"Async Iterator Helper"),t.exports=function(t,e){var r=function(r,n){n?(n.iterator=r.iterator,n.next=r.next):n=r,n.type=e?y:v,n.nextHandler=t,n.counter=0,n.done=!1,b(this,n)};return r.prototype=e?w:_,r}},40164:(t,e,r)=>{"use strict";var n=r(22615),i=r(82412),a=function(t,e){return[e,t]};t.exports=function(){return n(i,this,a)}},62489:(t,e,r)=>{"use strict";var n=r(22615),i=r(10509),a=r(85027),o=r(48999),s=r(55565),c=r(76058),l=r(22302),u=r(52399),h=function(t){var e=0===t,r=1===t,h=2===t,f=3===t;return function(t,d,p){a(t);var m=void 0!==d;!m&&e||i(d);var g=l(t),A=c("Promise"),v=g.iterator,y=g.next,b=0;return new A((function(t,i){var c=function(t){u(v,i,t,i)},l=function(){try{if(m)try{s(b)}catch(t){c(t)}A.resolve(a(n(y,v))).then((function(n){try{if(a(n).done)e?(p.length=b,t(p)):t(!f&&(h||void 0));else{var s=n.value;try{if(m){var g=d(s,b),y=function(n){if(r)l();else if(h)n?l():u(v,t,!1,i);else if(e)try{p[b++]=n,l()}catch(t){c(t)}else n?u(v,t,f||s,i):l()};o(g)?A.resolve(g).then(y,c):y(g)}else p[b++]=s,l()}catch(t){c(t)}}}catch(t){i(t)}}),i)}catch(t){i(t)}};l()}))}};t.exports={toArray:h(0),forEach:h(1),every:h(2),some:h(3),find:h(4)}},82412:(t,e,r)=>{"use strict";var n=r(22615),i=r(10509),a=r(85027),o=r(48999),s=r(22302),c=r(17394),l=r(27807),u=r(52399),h=c((function(t){var e=this,r=e.iterator,i=e.mapper;return new t((function(s,c){var h=function(t){e.done=!0,c(t)},f=function(t){u(r,h,t,h)};t.resolve(a(n(e.next,r))).then((function(r){try{if(a(r).done)e.done=!0,s(l(void 0,!0));else{var n=r.value;try{var c=i(n,e.counter++),u=function(t){s(l(t,!1))};o(c)?t.resolve(c).then(u,f):u(c)}catch(t){f(t)}}}catch(t){h(t)}}),h)}))}));t.exports=function(t){return a(this),i(t),new h(s(this),{mapper:t})}},23070:(t,e,r)=>{"use strict";var n,i,a=r(19037),o=r(84091),s=r(69985),c=r(25391),l=r(61868),u=r(11880),h=r(44201),f=r(53931),d="USE_FUNCTION_CONSTRUCTOR",p=h("asyncIterator"),m=a.AsyncIterator,g=o.AsyncIteratorPrototype;if(g)n=g;else if(s(m))n=m.prototype;else if(o[d]||a[d])try{i=l(l(l(Function("return async function*(){}()")()))),l(i)===Object.prototype&&(n=i)}catch(t){}n?f&&(n=c(n)):n={},s(n[p])||u(n,p,(function(){return this})),t.exports=n},40219:(t,e,r)=>{"use strict";var n=r(22615),i=r(17394);t.exports=i((function(){return n(this.next,this.iterator)}),!0)},18368:t=>{"use strict";var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=e+"+/",n=e+"-_",i=function(t){for(var e={},r=0;r<64;r++)e[t.charAt(r)]=r;return e};t.exports={i2c:r,c2i:i(r),i2cUrl:n,c2iUrl:i(n)}},71228:(t,e,r)=>{"use strict";var n=r(85027),i=r(72125);t.exports=function(t,e,r,a){try{return a?e(n(r)[0],r[1]):e(r)}catch(e){i(t,"throw",e)}}},86431:(t,e,r)=>{"use strict";var n=r(44201)("iterator"),i=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){i=!0}};o[n]=function(){return this},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){try{if(!e&&!i)return!1}catch(t){return!1}var r=!1;try{var a={};a[n]=function(){return{next:function(){return{done:r=!0}}}},t(a)}catch(t){}return r}},6648:(t,e,r)=>{"use strict";var n=r(68844),i=n({}.toString),a=n("".slice);t.exports=function(t){return a(i(t),8,-1)}},50926:(t,e,r)=>{"use strict";var n=r(23043),i=r(69985),a=r(6648),o=r(44201)("toStringTag"),s=Object,c="Arguments"===a(function(){return arguments}());t.exports=n?a:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=s(t),o))?r:c?a(e):"Object"===(n=a(e))&&i(e.callee)?"Arguments":n}},28737:(t,e,r)=>{"use strict";var n=r(54071),i=r(22615),a=r(10509),o=r(52655),s=r(981),c=r(18734),l=[].push;t.exports=function(t){var e,r,u,h,f=arguments.length,d=f>1?arguments[1]:void 0;return o(this),(e=void 0!==d)&&a(d),s(t)?new this:(r=[],e?(u=0,h=n(d,f>2?arguments[2]:void 0),c(t,(function(t){i(l,r,h(t,u++))}))):c(t,l,{that:r}),new this(r))}},1114:(t,e,r)=>{"use strict";var n=r(96004);t.exports=function(){return new this(n(arguments))}},70800:(t,e,r)=>{"use strict";var n=r(25391),i=r(62148),a=r(6045),o=r(54071),s=r(767),c=r(981),l=r(18734),u=r(91934),h=r(27807),f=r(14241),d=r(67697),p=r(45375).fastKey,m=r(618),g=m.set,A=m.getterFor;t.exports={getConstructor:function(t,e,r,u){var h=t((function(t,i){s(t,f),g(t,{type:e,index:n(null),first:void 0,last:void 0,size:0}),d||(t.size=0),c(i)||l(i,t[u],{that:t,AS_ENTRIES:r})})),f=h.prototype,m=A(e),v=function(t,e,r){var n,i,a=m(t),o=y(t,e);return o?o.value=r:(a.last=o={index:i=p(e,!0),key:e,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=o),n&&(n.next=o),d?a.size++:t.size++,"F"!==i&&(a.index[i]=o)),t},y=function(t,e){var r,n=m(t),i=p(e);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key===e)return r};return a(f,{clear:function(){for(var t=m(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,d?t.size=0:this.size=0},delete:function(t){var e=this,r=m(e),n=y(e,t);if(n){var i=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=i),i&&(i.previous=a),r.first===n&&(r.first=i),r.last===n&&(r.last=a),d?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=m(this),n=o(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!y(this,t)}}),a(f,r?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return v(this,0===t?0:t,e)}}:{add:function(t){return v(this,t=0===t?0:t,t)}}),d&&i(f,"size",{configurable:!0,get:function(){return m(this).size}}),h},setStrong:function(t,e,r){var n=e+" Iterator",i=A(e),a=A(n);u(t,e,(function(t,e){g(this,{type:n,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=a(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?h("keys"===e?r.key:"values"===e?r.value:[r.key,r.value],!1):(t.target=void 0,h(void 0,!0))}),r?"entries":"values",!r,!0),f(e)}}},70637:(t,e,r)=>{"use strict";var n=r(68844),i=r(6045),a=r(45375).getWeakData,o=r(767),s=r(85027),c=r(981),l=r(48999),u=r(18734),h=r(2960),f=r(36812),d=r(618),p=d.set,m=d.getterFor,g=h.find,A=h.findIndex,v=n([].splice),y=0,b=function(t){return t.frozen||(t.frozen=new x)},x=function(){this.entries=[]},w=function(t,e){return g(t.entries,(function(t){return t[0]===e}))};x.prototype={get:function(t){var e=w(this,t);if(e)return e[1]},has:function(t){return!!w(this,t)},set:function(t,e){var r=w(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=A(this.entries,(function(e){return e[0]===t}));return~e&&v(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,r,n){var h=t((function(t,i){o(t,d),p(t,{type:e,id:y++,frozen:void 0}),c(i)||u(i,t[n],{that:t,AS_ENTRIES:r})})),d=h.prototype,g=m(e),A=function(t,e,r){var n=g(t),i=a(s(e),!0);return!0===i?b(n).set(e,r):i[n.id]=r,t};return i(d,{delete:function(t){var e=g(this);if(!l(t))return!1;var r=a(t);return!0===r?b(e).delete(t):r&&f(r,e.id)&&delete r[e.id]},has:function(t){var e=g(this);if(!l(t))return!1;var r=a(t);return!0===r?b(e).has(t):r&&f(r,e.id)}}),i(d,r?{get:function(t){var e=g(this);if(l(t)){var r=a(t);return!0===r?b(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return A(this,t,e)}}:{add:function(t){return A(this,t,!0)}}),h}}},20319:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(68844),o=r(35266),s=r(11880),c=r(45375),l=r(18734),u=r(767),h=r(69985),f=r(981),d=r(48999),p=r(3689),m=r(86431),g=r(55997),A=r(33457);t.exports=function(t,e,r){var v=-1!==t.indexOf("Map"),y=-1!==t.indexOf("Weak"),b=v?"set":"add",x=i[t],w=x&&x.prototype,_=x,E={},M=function(t){var e=a(w[t]);s(w,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(y&&!d(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return y&&!d(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(y&&!d(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(o(t,!h(x)||!(y||w.forEach&&!p((function(){(new x).entries().next()})))))_=r.getConstructor(e,t,v,b),c.enable();else if(o(t,!0)){var S=new _,C=S[b](y?{}:-0,1)!==S,T=p((function(){S.has(1)})),I=m((function(t){new x(t)})),R=!y&&p((function(){for(var t=new x,e=5;e--;)t[b](e,e);return!t.has(-0)}));I||((_=e((function(t,e){u(t,w);var r=A(new x,t,_);return f(e)||l(e,r[b],{that:r,AS_ENTRIES:v}),r}))).prototype=w,w.constructor=_),(T||R)&&(M("delete"),M("has"),v&&M("get")),(R||C)&&M(b),y&&w.clear&&delete w.clear}return E[t]=_,n({global:!0,constructor:!0,forced:_!==x},E),g(_,t),y||r.setStrong(_,t,v),_}},41544:(t,e,r)=>{"use strict";r(56646),r(51090);var n=r(76058),i=r(25391),a=r(48999),o=Object,s=TypeError,c=n("Map"),l=n("WeakMap"),u=function(){this.object=null,this.symbol=null,this.primitives=null,this.objectsByIndex=i(null)};u.prototype.get=function(t,e){return this[t]||(this[t]=e())},u.prototype.next=function(t,e,r){var n=r?this.objectsByIndex[t]||(this.objectsByIndex[t]=new l):this.primitives||(this.primitives=new c),i=n.get(e);return i||n.set(e,i=new u),i};var h=new u;t.exports=function(){var t,e,r=h,n=arguments.length;for(t=0;t{"use strict";var n=r(36812),i=r(19152),a=r(82474),o=r(72560);t.exports=function(t,e,r){for(var s=i(e),c=o.f,l=a.f,u=0;u{"use strict";var n=r(44201)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},81748:(t,e,r)=>{"use strict";var n=r(3689);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},71568:(t,e,r)=>{"use strict";var n=r(68844),i=r(74684),a=r(34327),o=/"/g,s=n("".replace);t.exports=function(t,e,r,n){var c=a(i(t)),l="<"+e;return""!==r&&(l+=" "+r+'="'+s(a(n),o,""")+'"'),l+">"+c+""}},27807:t=>{"use strict";t.exports=function(t,e){return{value:t,done:e}}},75773:(t,e,r)=>{"use strict";var n=r(67697),i=r(72560),a=r(75684);t.exports=n?function(t,e,r){return i.f(t,e,a(1,r))}:function(t,e,r){return t[e]=r,t}},75684:t=>{"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},76522:(t,e,r)=>{"use strict";var n=r(18360),i=r(72560),a=r(75684);t.exports=function(t,e,r){var o=n(e);o in t?i.f(t,o,a(0,r)):t[o]=r}},99455:(t,e,r)=>{"use strict";var n=r(68844),i=r(3689),a=r(77254).start,o=RangeError,s=isFinite,c=Math.abs,l=Date.prototype,u=l.toISOString,h=n(l.getTime),f=n(l.getUTCDate),d=n(l.getUTCFullYear),p=n(l.getUTCHours),m=n(l.getUTCMilliseconds),g=n(l.getUTCMinutes),A=n(l.getUTCMonth),v=n(l.getUTCSeconds);t.exports=i((function(){return"0385-07-25T07:06:39.999Z"!==u.call(new Date(-50000000000001))}))||!i((function(){u.call(new Date(NaN))}))?function(){if(!s(h(this)))throw new o("Invalid time value");var t=this,e=d(t),r=m(t),n=e<0?"-":e>9999?"+":"";return n+a(c(e),n?6:4,0)+"-"+a(A(t)+1,2,0)+"-"+a(f(t),2,0)+"T"+a(p(t),2,0)+":"+a(g(t),2,0)+":"+a(v(t),2,0)+"."+a(r,3,0)+"Z"}:u},81797:(t,e,r)=>{"use strict";var n=r(85027),i=r(35899),a=TypeError;t.exports=function(t){if(n(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new a("Incorrect hint");return i(this,t)}},62148:(t,e,r)=>{"use strict";var n=r(98702),i=r(72560);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},11880:(t,e,r)=>{"use strict";var n=r(69985),i=r(72560),a=r(98702),o=r(95014);t.exports=function(t,e,r,s){s||(s={});var c=s.enumerable,l=void 0!==s.name?s.name:e;if(n(r)&&a(r,l,s),s.global)c?t[e]=r:o(e,r);else{try{s.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},6045:(t,e,r)=>{"use strict";var n=r(11880);t.exports=function(t,e,r){for(var i in e)n(t,i,e[i],r);return t}},95014:(t,e,r)=>{"use strict";var n=r(19037),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},98494:(t,e,r)=>{"use strict";var n=r(23691),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw new i("Cannot delete property "+n(e)+" of "+n(t))}},67697:(t,e,r)=>{"use strict";var n=r(3689);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},21420:(t,e,r)=>{"use strict";var n,i,a,o,s=r(19037),c=r(21905),l=r(63514),u=s.structuredClone,h=s.ArrayBuffer,f=s.MessageChannel,d=!1;if(l)d=function(t){u(t,{transfer:[t]})};else if(h)try{f||(n=c("worker_threads"))&&(f=n.MessageChannel),f&&(i=new f,a=new h(2),o=function(t){i.port1.postMessage(null,[t])},2===a.byteLength&&(o(a),0===a.byteLength&&(d=o)))}catch(t){}t.exports=d},22659:t=>{"use strict";var e="object"==typeof document&&document.all,r=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:r}},36420:(t,e,r)=>{"use strict";var n=r(19037),i=r(48999),a=n.document,o=i(a)&&i(a.createElement);t.exports=function(t){return o?a.createElement(t):{}}},55565:t=>{"use strict";var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},37136:t=>{"use strict";t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},66338:t=>{"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},33265:(t,e,r)=>{"use strict";var n=r(36420)("span").classList,i=n&&n.constructor&&n.constructor.prototype;t.exports=i===Object.prototype?void 0:i},97365:(t,e,r)=>{"use strict";var n=r(30071).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},72532:(t,e,r)=>{"use strict";var n=r(88563),i=r(50806);t.exports=!n&&!i&&"object"==typeof window&&"object"==typeof document},83127:t=>{"use strict";t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},88563:t=>{"use strict";t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},37298:(t,e,r)=>{"use strict";var n=r(30071);t.exports=/MSIE|Trident/.test(n)},63221:(t,e,r)=>{"use strict";var n=r(30071);t.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},4764:(t,e,r)=>{"use strict";var n=r(30071);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},50806:(t,e,r)=>{"use strict";var n=r(19037),i=r(6648);t.exports="process"===i(n.process)},27486:(t,e,r)=>{"use strict";var n=r(30071);t.exports=/web0s(?!.*chrome)/i.test(n)},30071:t=>{"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3615:(t,e,r)=>{"use strict";var n,i,a=r(19037),o=r(30071),s=a.process,c=a.Deno,l=s&&s.versions||c&&c.version,u=l&&l.v8;u&&(i=(n=u.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(i=+n[1]),t.exports=i},27922:(t,e,r)=>{"use strict";var n=r(30071).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},72739:t=>{"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},56610:(t,e,r)=>{"use strict";var n=r(68844),i=Error,a=n("".replace),o=String(new i("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,c=s.test(o);t.exports=function(t,e){if(c&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=a(t,s,"");return t}},65411:(t,e,r)=>{"use strict";var n=r(75773),i=r(56610),a=r(49599),o=Error.captureStackTrace;t.exports=function(t,e,r,s){a&&(o?o(t,e):n(t,"stack",i(r,s)))}},49599:(t,e,r)=>{"use strict";var n=r(3689),i=r(75684);t.exports=!n((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)}))},20445:(t,e,r)=>{"use strict";var n=r(67697),i=r(3689),a=r(85027),o=r(13841),s=Error.prototype.toString,c=i((function(){if(n){var t=Object.create(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==s.call(t))return!0}return"2: 1"!==s.call({message:1,name:2})||"Error"!==s.call({})}));t.exports=c?function(){var t=a(this),e=o(t.name,"Error"),r=o(t.message);return e?r?e+": "+r:e:r}:s},79989:(t,e,r)=>{"use strict";var n=r(19037),i=r(82474).f,a=r(75773),o=r(11880),s=r(95014),c=r(8758),l=r(35266);t.exports=function(t,e){var r,u,h,f,d,p=t.target,m=t.global,g=t.stat;if(r=m?n:g?n[p]||s(p,{}):(n[p]||{}).prototype)for(u in e){if(f=e[u],h=t.dontCallGetSet?(d=i(r,u))&&d.value:r[u],!l(m?u:p+(g?".":"#")+u,t.forced)&&void 0!==h){if(typeof f==typeof h)continue;c(f,h)}(t.sham||h&&h.sham)&&a(f,"sham",!0),o(r,u,f,t)}}},3689:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},65773:(t,e,r)=>{"use strict";r(64043);var n=r(46576),i=r(11880),a=r(56308),o=r(3689),s=r(44201),c=r(75773),l=s("species"),u=RegExp.prototype;t.exports=function(t,e,r,h){var f=s(t),d=!o((function(){var e={};return e[f]=function(){return 7},7!==""[t](e)})),p=d&&!o((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[l]=function(){return r},r.flags="",r[f]=/./[f]),r.exec=function(){return e=!0,null},r[f](""),!e}));if(!d||!p||r){var m=n(/./[f]),g=e(f,""[t],(function(t,e,r,i,o){var s=n(t),c=e.exec;return c===a||c===u.exec?d&&!o?{done:!0,value:m(e,r,i)}:{done:!0,value:s(r,e,i)}:{done:!1}}));i(String.prototype,t,g[0]),i(u,f,g[1])}h&&c(u[f],"sham",!0)}},37809:(t,e,r)=>{"use strict";var n=r(92297),i=r(6310),a=r(55565),o=r(54071),s=function(t,e,r,c,l,u,h,f){for(var d,p,m=l,g=0,A=!!h&&o(h,f);g0&&n(d)?(p=i(d),m=s(t,e,d,p,m,u-1)-1):(a(m+1),t[m]=d),m++),g++;return m};t.exports=s},71594:(t,e,r)=>{"use strict";var n=r(3689);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},61735:(t,e,r)=>{"use strict";var n=r(97215),i=Function.prototype,a=i.apply,o=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?o.bind(a):function(){return o.apply(a,arguments)})},54071:(t,e,r)=>{"use strict";var n=r(46576),i=r(10509),a=r(97215),o=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:a?o(t,e):function(){return t.apply(e,arguments)}}},97215:(t,e,r)=>{"use strict";var n=r(3689);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},86761:(t,e,r)=>{"use strict";var n=r(68844),i=r(10509),a=r(48999),o=r(36812),s=r(96004),c=r(97215),l=Function,u=n([].concat),h=n([].join),f={};t.exports=c?l.bind:function(t){var e=i(this),r=e.prototype,n=s(arguments,1),c=function(){var r=u(n,s(arguments));return this instanceof c?function(t,e,r){if(!o(f,e)){for(var n=[],i=0;i{"use strict";var n=r(97215),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},33505:(t,e,r)=>{"use strict";var n=r(68844),i=r(10509);t.exports=function(){return n(i(this))}},41236:(t,e,r)=>{"use strict";var n=r(67697),i=r(36812),a=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,s=i(a,"name"),c=s&&"something"===function(){}.name,l=s&&(!n||n&&o(a,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:l}},52743:(t,e,r)=>{"use strict";var n=r(68844),i=r(10509);t.exports=function(t,e,r){try{return n(i(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},46576:(t,e,r)=>{"use strict";var n=r(6648),i=r(68844);t.exports=function(t){if("Function"===n(t))return i(t)}},68844:(t,e,r)=>{"use strict";var n=r(97215),i=Function.prototype,a=i.call,o=n&&i.bind.bind(a,a);t.exports=n?o:function(t){return function(){return a.apply(t,arguments)}}},9093:t=>{"use strict";var e=TypeError;t.exports=function(t){var r=t&&t.alphabet;if(void 0===r||"base64"===r||"base64url"===r)return r||"base64";throw new e("Incorrect `alphabet` option")}},11427:(t,e,r)=>{"use strict";var n=r(22615),i=r(69985),a=r(85027),o=r(22302),s=r(91664),c=r(54849),l=r(44201),u=r(29019),h=l("asyncIterator");t.exports=function(t){var e,r=a(t),l=!0,f=c(r,h);return i(f)||(f=s(r),l=!1),void 0!==f?e=n(f,r):(e=r,l=!0),a(e),o(l?e:new u(o(e)))}},13807:(t,e,r)=>{"use strict";var n=r(22615),i=r(29019),a=r(85027),o=r(5185),s=r(22302),c=r(54849),l=r(44201)("asyncIterator");t.exports=function(t,e){var r=arguments.length<2?c(t,l):e;return r?a(n(r,t)):new i(s(o(t)))}},88277:(t,e,r)=>{"use strict";var n=r(19037);t.exports=function(t,e){var r=n[t],i=r&&r.prototype;return i&&i[e]}},76058:(t,e,r)=>{"use strict";var n=r(19037),i=r(69985);t.exports=function(t,e){return arguments.length<2?(r=n[t],i(r)?r:void 0):n[t]&&n[t][e];var r}},22302:t=>{"use strict";t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},36752:(t,e,r)=>{"use strict";var n=r(22615),i=r(85027),a=r(22302),o=r(91664);t.exports=function(t,e){e&&"string"==typeof t||i(t);var r=o(t);return a(i(void 0!==r?n(r,t):t))}},91664:(t,e,r)=>{"use strict";var n=r(50926),i=r(54849),a=r(981),o=r(9478),s=r(44201)("iterator");t.exports=function(t){if(!a(t))return i(t,s)||i(t,"@@iterator")||o[n(t)]}},5185:(t,e,r)=>{"use strict";var n=r(22615),i=r(10509),a=r(85027),o=r(23691),s=r(91664),c=TypeError;t.exports=function(t,e){var r=arguments.length<2?s(t):e;if(i(r))return a(n(r,t));throw new c(o(t)+" is not iterable")}},92643:(t,e,r)=>{"use strict";var n=r(68844),i=r(92297),a=r(69985),o=r(6648),s=r(34327),c=n([].push);t.exports=function(t){if(a(t))return t;if(i(t)){for(var e=t.length,r=[],n=0;n{"use strict";var n=r(10509),i=r(981);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},41074:(t,e,r)=>{"use strict";var n=r(10509),i=r(85027),a=r(22615),o=r(68700),s=r(22302),c="Invalid size",l=RangeError,u=TypeError,h=Math.max,f=function(t,e,r,n){this.set=t,this.size=e,this.has=r,this.keys=n};f.prototype={getIterator:function(){return s(i(a(this.keys,this.set)))},includes:function(t){return a(this.has,this.set,t)}},t.exports=function(t){i(t);var e=+t.size;if(e!=e)throw new u(c);var r=o(e);if(r<0)throw new l(c);return new f(t,h(r,0),n(t.has),n(t.keys))}},27017:(t,e,r)=>{"use strict";var n=r(68844),i=r(90690),a=Math.floor,o=n("".charAt),s=n("".replace),c=n("".slice),l=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,n,h,f){var d=r+t.length,p=n.length,m=u;return void 0!==h&&(h=i(h),m=l),s(f,m,(function(i,s){var l;switch(o(s,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,r);case"'":return c(e,d);case"<":l=h[c(s,1,-1)];break;default:var u=+s;if(0===u)return i;if(u>p){var f=a(u/10);return 0===f?i:f<=p?void 0===n[f-1]?o(s,1):n[f-1]+o(s,1):i}l=n[u-1]}return void 0===l?"":l}))}},19037:function(t,e,r){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},36812:(t,e,r)=>{"use strict";var n=r(68844),i=r(90690),a=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return a(i(t),e)}},57248:t=>{"use strict";t.exports={}},20920:t=>{"use strict";t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}},2688:(t,e,r)=>{"use strict";var n=r(76058);t.exports=n("document","documentElement")},68506:(t,e,r)=>{"use strict";var n=r(67697),i=r(3689),a=r(36420);t.exports=!n&&!i((function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},15477:t=>{"use strict";var e=Array,r=Math.abs,n=Math.pow,i=Math.floor,a=Math.log,o=Math.LN2;t.exports={pack:function(t,s,c){var l,u,h,f=e(c),d=8*c-s-1,p=(1<>1,g=23===s?n(2,-24)-n(2,-77):0,A=t<0||0===t&&1/t<0?1:0,v=0;for((t=r(t))!=t||t===1/0?(u=t!=t?1:0,l=p):(l=i(a(t)/o),t*(h=n(2,-l))<1&&(l--,h*=2),(t+=l+m>=1?g/h:g*n(2,1-m))*h>=2&&(l++,h/=2),l+m>=p?(u=0,l=p):l+m>=1?(u=(t*h-1)*n(2,s),l+=m):(u=t*n(2,m-1)*n(2,s),l=0));s>=8;)f[v++]=255&u,u/=256,s-=8;for(l=l<0;)f[v++]=255&l,l/=256,d-=8;return f[--v]|=128*A,f},unpack:function(t,e){var r,i=t.length,a=8*i-e-1,o=(1<>1,c=a-7,l=i-1,u=t[l--],h=127&u;for(u>>=7;c>0;)h=256*h+t[l--],c-=8;for(r=h&(1<<-c)-1,h>>=-c,c+=e;c>0;)r=256*r+t[l--],c-=8;if(0===h)h=1-s;else{if(h===o)return r?NaN:u?-1/0:1/0;r+=n(2,e),h-=s}return(u?-1:1)*r*n(2,h-e)}}},94413:(t,e,r)=>{"use strict";var n=r(68844),i=r(3689),a=r(6648),o=Object,s=n("".split);t.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"===a(t)?s(t,""):o(t)}:o},33457:(t,e,r)=>{"use strict";var n=r(69985),i=r(48999),a=r(49385);t.exports=function(t,e,r){var o,s;return a&&n(o=e.constructor)&&o!==r&&i(s=o.prototype)&&s!==r.prototype&&a(t,s),t}},6738:(t,e,r)=>{"use strict";var n=r(68844),i=r(69985),a=r(84091),o=n(Function.toString);i(a.inspectSource)||(a.inspectSource=function(t){return o(t)}),t.exports=a.inspectSource},62570:(t,e,r)=>{"use strict";var n=r(48999),i=r(75773);t.exports=function(t,e){n(e)&&"cause"in e&&i(t,"cause",e.cause)}},45375:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(57248),o=r(48999),s=r(36812),c=r(72560).f,l=r(72741),u=r(26062),h=r(27049),f=r(14630),d=r(71594),p=!1,m=f("meta"),g=0,A=function(t){c(t,m,{value:{objectID:"O"+g++,weakData:{}}})},v=t.exports={enable:function(){v.enable=function(){},p=!0;var t=l.f,e=i([].splice),r={};r[m]=1,t(r).length&&(l.f=function(r){for(var n=t(r),i=0,a=n.length;i{"use strict";var n,i,a,o=r(59834),s=r(19037),c=r(48999),l=r(75773),u=r(36812),h=r(84091),f=r(2713),d=r(57248),p="Object already initialized",m=s.TypeError,g=s.WeakMap;if(o||h.state){var A=h.state||(h.state=new g);A.get=A.get,A.has=A.has,A.set=A.set,n=function(t,e){if(A.has(t))throw new m(p);return e.facade=t,A.set(t,e),e},i=function(t){return A.get(t)||{}},a=function(t){return A.has(t)}}else{var v=f("state");d[v]=!0,n=function(t,e){if(u(t,v))throw new m(p);return e.facade=t,l(t,v,e),e},i=function(t){return u(t,v)?t[v]:{}},a=function(t){return u(t,v)}}t.exports={set:n,get:i,has:a,enforce:function(t){return a(t)?i(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!c(e)||(r=i(e)).type!==t)throw new m("Incompatible receiver, "+t+" required");return r}}}},93292:(t,e,r)=>{"use strict";var n=r(44201),i=r(9478),a=n("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||o[a]===t)}},92297:(t,e,r)=>{"use strict";var n=r(6648);t.exports=Array.isArray||function(t){return"Array"===n(t)}},9401:(t,e,r)=>{"use strict";var n=r(50926);t.exports=function(t){var e=n(t);return"BigInt64Array"===e||"BigUint64Array"===e}},69985:(t,e,r)=>{"use strict";var n=r(22659),i=n.all;t.exports=n.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},19429:(t,e,r)=>{"use strict";var n=r(68844),i=r(3689),a=r(69985),o=r(50926),s=r(76058),c=r(6738),l=function(){},u=[],h=s("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=n(f.exec),p=!f.test(l),m=function(t){if(!a(t))return!1;try{return h(l,u,t),!0}catch(t){return!1}},g=function(t){if(!a(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(f,c(t))}catch(t){return!0}};g.sham=!0,t.exports=!h||i((function(){var t;return m(m.call)||!m(Object)||!m((function(){t=!0}))||t}))?g:m},76251:(t,e,r)=>{"use strict";var n=r(36812);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},35266:(t,e,r)=>{"use strict";var n=r(3689),i=r(69985),a=/#|\.prototype\./,o=function(t,e){var r=c[s(t)];return r===u||r!==l&&(i(e)?n(e):!!e)},s=o.normalize=function(t){return String(t).replace(a,".").toLowerCase()},c=o.data={},l=o.NATIVE="N",u=o.POLYFILL="P";t.exports=o},71973:(t,e,r)=>{"use strict";var n=r(48999),i=Math.floor;t.exports=Number.isInteger||function(t){return!n(t)&&isFinite(t)&&i(t)===t}},9603:(t,e,r)=>{"use strict";var n=r(50926),i=r(36812),a=r(981),o=r(44201),s=r(9478),c=o("iterator"),l=Object;t.exports=function(t){if(a(t))return!1;var e=l(t);return void 0!==e[c]||"@@iterator"in e||i(s,n(e))}},981:t=>{"use strict";t.exports=function(t){return null==t}},48999:(t,e,r)=>{"use strict";var n=r(69985),i=r(22659),a=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:n(t)||t===a}:function(t){return"object"==typeof t?null!==t:n(t)}},53931:t=>{"use strict";t.exports=!1},55670:(t,e,r)=>{"use strict";var n=r(48999),i=r(618).get;t.exports=function(t){if(!n(t))return!1;var e=i(t);return!!e&&"RawJSON"===e.type}},91245:(t,e,r)=>{"use strict";var n=r(48999),i=r(6648),a=r(44201)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[a])?!!e:"RegExp"===i(t))}},30734:(t,e,r)=>{"use strict";var n=r(76058),i=r(69985),a=r(23622),o=r(39525),s=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&a(e.prototype,s(t))}},96704:(t,e,r)=>{"use strict";var n=r(22615);t.exports=function(t,e,r){for(var i,a,o=r?t:t.iterator,s=t.next;!(i=n(s,o)).done;)if(void 0!==(a=e(i.value)))return a}},18734:(t,e,r)=>{"use strict";var n=r(54071),i=r(22615),a=r(85027),o=r(23691),s=r(93292),c=r(6310),l=r(23622),u=r(5185),h=r(91664),f=r(72125),d=TypeError,p=function(t,e){this.stopped=t,this.result=e},m=p.prototype;t.exports=function(t,e,r){var g,A,v,y,b,x,w,_=r&&r.that,E=!(!r||!r.AS_ENTRIES),M=!(!r||!r.IS_RECORD),S=!(!r||!r.IS_ITERATOR),C=!(!r||!r.INTERRUPTED),T=n(e,_),I=function(t){return g&&f(g,"normal",t),new p(!0,t)},R=function(t){return E?(a(t),C?T(t[0],t[1],I):T(t[0],t[1])):C?T(t,I):T(t)};if(M)g=t.iterator;else if(S)g=t;else{if(!(A=h(t)))throw new d(o(t)+" is not iterable");if(s(A)){for(v=0,y=c(t);y>v;v++)if((b=R(t[v]))&&l(m,b))return b;return new p(!1)}g=u(t,A)}for(x=M?t.next:g.next;!(w=i(x,g)).done;){try{b=R(w.value)}catch(t){f(g,"throw",t)}if("object"==typeof b&&b&&l(m,b))return b}return new p(!1)}},72125:(t,e,r)=>{"use strict";var n=r(22615),i=r(85027),a=r(54849);t.exports=function(t,e,r){var o,s;i(t);try{if(!(o=a(t,"return"))){if("throw"===e)throw r;return r}o=n(o,t)}catch(t){s=!0,o=t}if("throw"===e)throw r;if(s)throw o;return i(o),r}},30974:(t,e,r)=>{"use strict";var n=r(12013).IteratorPrototype,i=r(25391),a=r(75684),o=r(55997),s=r(9478),c=function(){return this};t.exports=function(t,e,r,l){var u=e+" Iterator";return t.prototype=i(n,{next:a(+!l,r)}),o(t,u,!1,!0),s[u]=c,t}},65419:(t,e,r)=>{"use strict";var n=r(22615),i=r(25391),a=r(75773),o=r(6045),s=r(44201),c=r(618),l=r(54849),u=r(12013).IteratorPrototype,h=r(27807),f=r(72125),d=s("toStringTag"),p="IteratorHelper",m="WrapForValidIterator",g=c.set,A=function(t){var e=c.getterFor(t?m:p);return o(i(u),{next:function(){var r=e(this);if(t)return r.nextHandler();try{var n=r.done?void 0:r.nextHandler();return h(n,r.done)}catch(t){throw r.done=!0,t}},return:function(){var r=e(this),i=r.iterator;if(r.done=!0,t){var a=l(i,"return");return a?n(a,i):h(void 0,!0)}if(r.inner)try{f(r.inner.iterator,"normal")}catch(t){return f(i,"throw",t)}return f(i,"normal"),h(void 0,!0)}})},v=A(!0),y=A(!1);a(y,d,"Iterator Helper"),t.exports=function(t,e){var r=function(r,n){n?(n.iterator=r.iterator,n.next=r.next):n=r,n.type=e?m:p,n.nextHandler=t,n.counter=0,n.done=!1,g(this,n)};return r.prototype=e?v:y,r}},91934:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(53931),o=r(41236),s=r(69985),c=r(30974),l=r(61868),u=r(49385),h=r(55997),f=r(75773),d=r(11880),p=r(44201),m=r(9478),g=r(12013),A=o.PROPER,v=o.CONFIGURABLE,y=g.IteratorPrototype,b=g.BUGGY_SAFARI_ITERATORS,x=p("iterator"),w="keys",_="values",E="entries",M=function(){return this};t.exports=function(t,e,r,o,p,g,S){c(r,e,o);var C,T,I,R=function(t){if(t===p&&D)return D;if(!b&&t&&t in L)return L[t];switch(t){case w:case _:case E:return function(){return new r(this,t)}}return function(){return new r(this)}},B=e+" Iterator",k=!1,L=t.prototype,P=L[x]||L["@@iterator"]||p&&L[p],D=!b&&P||R(p),U="Array"===e&&L.entries||P;if(U&&(C=l(U.call(new t)))!==Object.prototype&&C.next&&(a||l(C)===y||(u?u(C,y):s(C[x])||d(C,x,M)),h(C,B,!0,!0),a&&(m[B]=M)),A&&p===_&&P&&P.name!==_&&(!a&&v?f(L,"name",_):(k=!0,D=function(){return i(P,this)})),p)if(T={values:R(_),keys:g?D:R(w),entries:R(E)},S)for(I in T)(b||k||!(I in L))&&d(L,I,T[I]);else n({target:e,proto:!0,forced:b||k},T);return a&&!S||L[x]===D||d(L,x,D,{name:p}),m[e]=D,T}},47082:(t,e,r)=>{"use strict";var n=r(22615),i=r(88983),a=function(t,e){return[e,t]};t.exports=function(){return n(i,this,a)}},88983:(t,e,r)=>{"use strict";var n=r(22615),i=r(10509),a=r(85027),o=r(22302),s=r(65419),c=r(71228),l=s((function(){var t=this.iterator,e=a(n(this.next,t));if(!(this.done=!!e.done))return c(t,this.mapper,[e.value,this.counter++],!0)}));t.exports=function(t){return a(this),i(t),new l(o(this),{mapper:t})}},12013:(t,e,r)=>{"use strict";var n,i,a,o=r(3689),s=r(69985),c=r(48999),l=r(25391),u=r(61868),h=r(11880),f=r(44201),d=r(53931),p=f("iterator"),m=!1;[].keys&&("next"in(a=[].keys())?(i=u(u(a)))!==Object.prototype&&(n=i):m=!0),!c(n)||o((function(){var t={};return n[p].call(t)!==t}))?n={}:d&&(n=l(n)),s(n[p])||h(n,p,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},9478:t=>{"use strict";t.exports={}},6310:(t,e,r)=>{"use strict";var n=r(43126);t.exports=function(t){return n(t.length)}},98702:(t,e,r)=>{"use strict";var n=r(68844),i=r(3689),a=r(69985),o=r(36812),s=r(67697),c=r(41236).CONFIGURABLE,l=r(6738),u=r(618),h=u.enforce,f=u.get,d=String,p=Object.defineProperty,m=n("".slice),g=n("".replace),A=n([].join),v=s&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),y=String(String).split("String"),b=t.exports=function(t,e,r){"Symbol("===m(d(e),0,7)&&(e="["+g(d(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!o(t,"name")||c&&t.name!==e)&&(s?p(t,"name",{value:e,configurable:!0}):t.name=e),v&&r&&o(r,"arity")&&t.length!==r.arity&&p(t,"length",{value:r.arity});try{r&&o(r,"constructor")&&r.constructor?s&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=h(t);return o(n,"source")||(n.source=A(y,"string"==typeof e?e:"")),t};Function.prototype.toString=b((function(){return a(this)&&f(this).source||l(this)}),"toString")},83914:(t,e,r)=>{"use strict";var n=r(68844),i=Map.prototype;t.exports={Map,set:n(i.set),get:n(i.get),has:n(i.has),remove:n(i.delete),proto:i}},10613:(t,e,r)=>{"use strict";var n=r(68844),i=r(96704),a=r(83914),o=a.Map,s=a.proto,c=n(s.forEach),l=n(s.entries),u=l(new o).next;t.exports=function(t,e,r){return r?i({iterator:l(t),next:u},(function(t){return e(t[1],t[0])})):c(t,e)}},41432:(t,e,r)=>{"use strict";var n=r(22615),i=r(10509),a=r(69985),o=r(85027),s=TypeError;t.exports=function(t,e){var r,c=o(this),l=i(c.get),u=i(c.has),h=i(c.set),f=arguments.length>2?arguments[2]:void 0;if(!a(e)&&!a(f))throw new s("At least one callback required");return n(u,c,t)?(r=n(l,c,t),a(e)&&(r=e(r),n(h,c,t,r))):a(f)&&(r=f(),n(h,c,t,r)),r}},21745:t=>{"use strict";var e=Math.expm1,r=Math.exp;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!==e(-2e-17)?function(t){var e=+t;return 0===e?e:e>-1e-6&&e<1e-6?e+e*e/2:r(e)-1}:e},76043:(t,e,r)=>{"use strict";var n=r(40134);t.exports=Math.f16round||function(t){return n(t,.0009765625,65504,6103515625e-14)}},40134:(t,e,r)=>{"use strict";var n=r(55680),i=Math.abs,a=2220446049250313e-31,o=1/a;t.exports=function(t,e,r,s){var c=+t,l=i(c),u=n(c);if(lr||f!=f?u*(1/0):u*f}},37788:(t,e,r)=>{"use strict";var n=r(40134);t.exports=Math.fround||function(t){return n(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},4736:t=>{"use strict";var e=Math.log,r=Math.LOG10E;t.exports=Math.log10||function(t){return e(t)*r}},93956:t=>{"use strict";var e=Math.log;t.exports=Math.log1p||function(t){var r=+t;return r>-1e-8&&r<1e-8?r-r*r/2:e(1+r)}},84463:t=>{"use strict";t.exports=Math.scale||function(t,e,r,n,i){var a=+t,o=+e,s=+r,c=+n,l=+i;return a!=a||o!=o||s!=s||c!=c||l!=l?NaN:a===1/0||a===-1/0?a:(a-o)*(l-c)/(s-o)+c}},55680:t=>{"use strict";t.exports=Math.sign||function(t){var e=+t;return 0===e||e!=e?e:e<0?-1:1}},58828:t=>{"use strict";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},80231:(t,e,r)=>{"use strict";var n,i,a,o,s,c=r(19037),l=r(54071),u=r(82474).f,h=r(99886).set,f=r(34410),d=r(4764),p=r(63221),m=r(27486),g=r(50806),A=c.MutationObserver||c.WebKitMutationObserver,v=c.document,y=c.process,b=c.Promise,x=u(c,"queueMicrotask"),w=x&&x.value;if(!w){var _=new f,E=function(){var t,e;for(g&&(t=y.domain)&&t.exit();e=_.get();)try{e()}catch(t){throw _.head&&n(),t}t&&t.enter()};d||g||m||!A||!v?!p&&b&&b.resolve?((o=b.resolve(void 0)).constructor=b,s=l(o.then,o),n=function(){s(E)}):g?n=function(){y.nextTick(E)}:(h=l(h,c),n=function(){h(E)}):(i=!0,a=v.createTextNode(""),new A(E).observe(a,{characterData:!0}),n=function(){a.data=i=!i}),w=function(t){_.head||n(),_.add(t)}}t.exports=w},22818:(t,e,r)=>{"use strict";var n=r(3689);t.exports=!n((function(){var t="9007199254740993",e=JSON.rawJSON(t);return!JSON.isRawJSON(e)||JSON.stringify(e)!==t}))},48742:(t,e,r)=>{"use strict";var n=r(10509),i=TypeError,a=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw new i("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new a(t)}},13841:(t,e,r)=>{"use strict";var n=r(34327);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},4654:t=>{"use strict";var e=RangeError;t.exports=function(t){if(t==t)return t;throw new e("NaN is not allowed")}},42124:(t,e,r)=>{"use strict";var n=r(91245),i=TypeError;t.exports=function(t){if(n(t))throw new i("The method doesn't accept regular expressions");return t}},70046:(t,e,r)=>{"use strict";var n=r(19037).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&n(t)}},14818:(t,e,r)=>{"use strict";var n=r(19037),i=r(3689),a=r(68844),o=r(34327),s=r(61435).trim,c=r(86350),l=a("".charAt),u=n.parseFloat,h=n.Symbol,f=h&&h.iterator,d=1/u(c+"-0")!=-1/0||f&&!i((function(){u(Object(f))}));t.exports=d?function(t){var e=s(o(t)),r=u(e);return 0===r&&"-"===l(e,0)?-0:r}:u},67897:(t,e,r)=>{"use strict";var n=r(19037),i=r(3689),a=r(68844),o=r(34327),s=r(61435).trim,c=r(86350),l=n.parseInt,u=n.Symbol,h=u&&u.iterator,f=/^[+-]?0x/i,d=a(f.exec),p=8!==l(c+"08")||22!==l(c+"0x16")||h&&!i((function(){l(Object(h))}));t.exports=p?function(t,e){var r=s(o(t));return l(r,e>>>0||(d(f,r)?16:10))}:l},98554:(t,e,r)=>{"use strict";var n=r(618),i=r(30974),a=r(27807),o=r(981),s=r(48999),c=r(62148),l=r(67697),u="Incorrect Iterator.range arguments",h="NumericRangeIterator",f=n.set,d=n.getterFor(h),p=RangeError,m=TypeError,g=i((function(t,e,r,n,i,a){if(typeof t!=n||e!==1/0&&e!==-1/0&&typeof e!=n)throw new m(u);if(t===1/0||t===-1/0)throw new p(u);var c,d=e>t,g=!1;if(void 0===r)c=void 0;else if(s(r))c=r.step,g=!!r.inclusive;else{if(typeof r!=n)throw new m(u);c=r}if(o(c)&&(c=d?a:-a),typeof c!=n)throw new m(u);if(c===1/0||c===-1/0||c===i&&t!==e)throw new p(u);f(this,{type:h,start:t,end:e,step:c,inclusive:g,hitsEnd:t!=t||e!=e||c!=c||e>t!=c>i,currentCount:i,zero:i}),l||(this.start=t,this.end=e,this.step=c,this.inclusive=g)}),h,(function(){var t=d(this);if(t.hitsEnd)return a(void 0,!0);var e=t.start,r=t.end,n=e+t.step*t.currentCount++;n===r&&(t.hitsEnd=!0);var i=t.inclusive;return(r>e?i?n>r:n>=r:i?r>n:r>=n)?(t.hitsEnd=!0,a(void 0,!0)):a(n,!1)})),A=function(t){c(g.prototype,t,{get:function(){return d(this)[t]},set:function(){},configurable:!0,enumerable:!1})};l&&(A("start"),A("end"),A("inclusive"),A("step")),t.exports=g},45394:(t,e,r)=>{"use strict";var n=r(67697),i=r(68844),a=r(22615),o=r(3689),s=r(20300),c=r(7518),l=r(49556),u=r(90690),h=r(94413),f=Object.assign,d=Object.defineProperty,p=i([].concat);t.exports=!f||o((function(){if(n&&1!==f({b:1},f(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[r]=7,i.split("").forEach((function(t){e[t]=t})),7!==f({},t)[r]||s(f({},e)).join("")!==i}))?function(t,e){for(var r=u(t),i=arguments.length,o=1,f=c.f,d=l.f;i>o;)for(var m,g=h(arguments[o++]),A=f?p(s(g),f(g)):s(g),v=A.length,y=0;v>y;)m=A[y++],n&&!a(d,g,m)||(r[m]=g[m]);return r}:f},25391:(t,e,r)=>{"use strict";var n,i=r(85027),a=r(98920),o=r(72739),s=r(57248),c=r(2688),l=r(36420),u=r(2713),h="prototype",f="script",d=u("IE_PROTO"),p=function(){},m=function(t){return"<"+f+">"+t+""},g=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},A=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;A="undefined"!=typeof document?document.domain&&n?g(n):(e=l("iframe"),r="java"+f+":",e.style.display="none",c.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(m("document.F=Object")),t.close(),t.F):g(n);for(var i=o.length;i--;)delete A[h][o[i]];return A()};s[d]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(p[h]=i(t),r=new p,p[h]=null,r[d]=t):r=A(),void 0===e?r:a.f(r,e)}},98920:(t,e,r)=>{"use strict";var n=r(67697),i=r(15648),a=r(72560),o=r(85027),s=r(65290),c=r(20300);e.f=n&&!i?Object.defineProperties:function(t,e){o(t);for(var r,n=s(e),i=c(e),l=i.length,u=0;l>u;)a.f(t,r=i[u++],n[r]);return t}},72560:(t,e,r)=>{"use strict";var n=r(67697),i=r(68506),a=r(15648),o=r(85027),s=r(18360),c=TypeError,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",f="configurable",d="writable";e.f=n?a?function(t,e,r){if(o(t),e=s(e),o(r),"function"==typeof t&&"prototype"===e&&"value"in r&&d in r&&!r[d]){var n=u(t,e);n&&n[d]&&(t[e]=r.value,r={configurable:f in r?r[f]:n[f],enumerable:h in r?r[h]:n[h],writable:!1})}return l(t,e,r)}:l:function(t,e,r){if(o(t),e=s(e),o(r),i)try{return l(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},82474:(t,e,r)=>{"use strict";var n=r(67697),i=r(22615),a=r(49556),o=r(75684),s=r(65290),c=r(18360),l=r(36812),u=r(68506),h=Object.getOwnPropertyDescriptor;e.f=n?h:function(t,e){if(t=s(t),e=c(e),u)try{return h(t,e)}catch(t){}if(l(t,e))return o(!i(a.f,t,e),t[e])}},26062:(t,e,r)=>{"use strict";var n=r(6648),i=r(65290),a=r(72741).f,o=r(9015),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"===n(t)?function(t){try{return a(t)}catch(t){return o(s)}}(t):a(i(t))}},72741:(t,e,r)=>{"use strict";var n=r(54948),i=r(72739).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},7518:(t,e)=>{"use strict";e.f=Object.getOwnPropertySymbols},61868:(t,e,r)=>{"use strict";var n=r(36812),i=r(69985),a=r(90690),o=r(2713),s=r(81748),c=o("IE_PROTO"),l=Object,u=l.prototype;t.exports=s?l.getPrototypeOf:function(t){var e=a(t);if(n(e,c))return e[c];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof l?u:null}},27049:(t,e,r)=>{"use strict";var n=r(3689),i=r(48999),a=r(6648),o=r(11655),s=Object.isExtensible,c=n((function(){s(1)}));t.exports=c||o?function(t){return!!i(t)&&(!o||"ArrayBuffer"!==a(t))&&(!s||s(t))}:s},23622:(t,e,r)=>{"use strict";var n=r(68844);t.exports=n({}.isPrototypeOf)},42351:(t,e,r)=>{"use strict";var n=r(618),i=r(30974),a=r(27807),o=r(36812),s=r(20300),c=r(90690),l="Object Iterator",u=n.set,h=n.getterFor(l);t.exports=i((function(t,e){var r=c(t);u(this,{type:l,mode:e,object:r,keys:s(r),index:0})}),"Object",(function(){for(var t=h(this),e=t.keys;;){if(null===e||t.index>=e.length)return t.object=t.keys=null,a(void 0,!0);var r=e[t.index++],n=t.object;if(o(n,r)){switch(t.mode){case"keys":return a(r,!1);case"values":return a(n[r],!1)}return a([r,n[r]],!1)}}}))},54948:(t,e,r)=>{"use strict";var n=r(68844),i=r(36812),a=r(65290),o=r(84328).indexOf,s=r(57248),c=n([].push);t.exports=function(t,e){var r,n=a(t),l=0,u=[];for(r in n)!i(s,r)&&i(n,r)&&c(u,r);for(;e.length>l;)i(n,r=e[l++])&&(~o(u,r)||c(u,r));return u}},20300:(t,e,r)=>{"use strict";var n=r(54948),i=r(72739);t.exports=Object.keys||function(t){return n(t,i)}},49556:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},90600:(t,e,r)=>{"use strict";var n=r(53931),i=r(19037),a=r(3689),o=r(27922);t.exports=n||!a((function(){if(!(o&&o<535)){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete i[t]}}))},49385:(t,e,r)=>{"use strict";var n=r(52743),i=r(85027),a=r(23550);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return i(r),a(n),e?t(r,n):r.__proto__=n,r}}():void 0)},49419:(t,e,r)=>{"use strict";var n=r(67697),i=r(3689),a=r(68844),o=r(61868),s=r(20300),c=r(65290),l=a(r(49556).f),u=a([].push),h=n&&i((function(){var t=Object.create(null);return t[2]=2,!l(t,2)})),f=function(t){return function(e){for(var r,i=c(e),a=s(i),f=h&&null===o(i),d=a.length,p=0,m=[];d>p;)r=a[p++],n&&!(f?r in i:l(i,r))||u(m,t?[r,i[r]]:i[r]);return m}};t.exports={entries:f(!0),values:f(!1)}},65073:(t,e,r)=>{"use strict";var n=r(23043),i=r(50926);t.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},35899:(t,e,r)=>{"use strict";var n=r(22615),i=r(69985),a=r(48999),o=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&i(r=t.toString)&&!a(s=n(r,t)))return s;if(i(r=t.valueOf)&&!a(s=n(r,t)))return s;if("string"!==e&&i(r=t.toString)&&!a(s=n(r,t)))return s;throw new o("Can't convert object to primitive value")}},19152:(t,e,r)=>{"use strict";var n=r(76058),i=r(68844),a=r(72741),o=r(7518),s=r(85027),c=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=a.f(s(t)),r=o.f;return r?c(e,r(t)):e}},46675:(t,e,r)=>{"use strict";var n=r(68844),i=r(36812),a=SyntaxError,o=parseInt,s=String.fromCharCode,c=n("".charAt),l=n("".slice),u=n(/./.exec),h={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},f=/^[\da-f]{4}$/i,d=/^[\u0000-\u001F]$/;t.exports=function(t,e){for(var r=!0,n="";e{"use strict";var n=r(19037);t.exports=n},9302:t=>{"use strict";t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},87073:(t,e,r)=>{"use strict";var n=r(19037),i=r(17919),a=r(69985),o=r(35266),s=r(6738),c=r(44201),l=r(72532),u=r(88563),h=r(53931),f=r(3615),d=i&&i.prototype,p=c("species"),m=!1,g=a(n.PromiseRejectionEvent),A=o("Promise",(function(){var t=s(i),e=t!==String(i);if(!e&&66===f)return!0;if(h&&(!d.catch||!d.finally))return!0;if(!f||f<51||!/native code/.test(t)){var r=new i((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[p]=n,!(m=r.then((function(){}))instanceof n))return!0}return!e&&(l||u)&&!g}));t.exports={CONSTRUCTOR:A,REJECTION_EVENT:g,SUBCLASSING:m}},17919:(t,e,r)=>{"use strict";var n=r(19037);t.exports=n.Promise},72945:(t,e,r)=>{"use strict";var n=r(85027),i=r(48999),a=r(48742);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=a.f(t);return(0,r.resolve)(e),r.promise}},562:(t,e,r)=>{"use strict";var n=r(17919),i=r(86431),a=r(87073).CONSTRUCTOR;t.exports=a||!i((function(t){n.all(t).then(void 0,(function(){}))}))},38055:(t,e,r)=>{"use strict";var n=r(72560).f;t.exports=function(t,e,r){r in t||n(t,r,{configurable:!0,get:function(){return e[r]},set:function(t){e[r]=t}})}},34410:t=>{"use strict";var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},33666:(t,e,r)=>{"use strict";r(56646),r(51090);var n=r(76058),i=r(68844),a=r(83430),o=n("Map"),s=n("WeakMap"),c=i([].push),l=a("metadata"),u=l.store||(l.store=new s),h=function(t,e,r){var n=u.get(t);if(!n){if(!r)return;u.set(t,n=new o)}var i=n.get(e);if(!i){if(!r)return;n.set(e,i=new o)}return i};t.exports={store:u,getMap:h,has:function(t,e,r){var n=h(e,r,!1);return void 0!==n&&n.has(t)},get:function(t,e,r){var n=h(e,r,!1);return void 0===n?void 0:n.get(t)},set:function(t,e,r,n){h(r,n,!0).set(t,e)},keys:function(t,e){var r=h(t,e,!1),n=[];return r&&r.forEach((function(t,e){c(n,e)})),n},toKey:function(t){return void 0===t||"symbol"==typeof t?t:String(t)}}},66100:(t,e,r)=>{"use strict";var n=r(22615),i=r(85027),a=r(69985),o=r(6648),s=r(56308),c=TypeError;t.exports=function(t,e){var r=t.exec;if(a(r)){var l=n(r,t,e);return null!==l&&i(l),l}if("RegExp"===o(t))return n(s,t,e);throw new c("RegExp#exec called on incompatible receiver")}},56308:(t,e,r)=>{"use strict";var n,i,a=r(22615),o=r(68844),s=r(34327),c=r(69633),l=r(87901),u=r(83430),h=r(25391),f=r(618).get,d=r(62100),p=r(26738),m=u("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,A=g,v=o("".charAt),y=o("".indexOf),b=o("".replace),x=o("".slice),w=(i=/b*/g,a(g,n=/a/,"a"),a(g,i,"a"),0!==n.lastIndex||0!==i.lastIndex),_=l.BROKEN_CARET,E=void 0!==/()??/.exec("")[1];(w||E||_||d||p)&&(A=function(t){var e,r,n,i,o,l,u,d=this,p=f(d),M=s(t),S=p.raw;if(S)return S.lastIndex=d.lastIndex,e=a(A,S,M),d.lastIndex=S.lastIndex,e;var C=p.groups,T=_&&d.sticky,I=a(c,d),R=d.source,B=0,k=M;if(T&&(I=b(I,"y",""),-1===y(I,"g")&&(I+="g"),k=x(M,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==v(M,d.lastIndex-1))&&(R="(?: "+R+")",k=" "+k,B++),r=new RegExp("^(?:"+R+")",I)),E&&(r=new RegExp("^"+R+"$(?!\\s)",I)),w&&(n=d.lastIndex),i=a(g,T?r:d,k),T?i?(i.input=x(i.input,B),i[0]=x(i[0],B),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:w&&i&&(d.lastIndex=d.global?i.index+i[0].length:n),E&&i&&i.length>1&&a(m,i[0],r,(function(){for(o=1;o{"use strict";var n=r(85027);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},63477:(t,e,r)=>{"use strict";var n=r(22615),i=r(36812),a=r(23622),o=r(69633),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||i(t,"flags")||!a(s,t)?e:n(o,t)}},87901:(t,e,r)=>{"use strict";var n=r(3689),i=r(19037).RegExp,a=n((function(){var t=i("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),o=a||n((function(){return!i("a","y").sticky})),s=a||n((function(){var t=i("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:s,MISSED_STICKY:o,UNSUPPORTED_Y:a}},62100:(t,e,r)=>{"use strict";var n=r(3689),i=r(19037).RegExp;t.exports=n((function(){var t=i(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))},26738:(t,e,r)=>{"use strict";var n=r(3689),i=r(19037).RegExp;t.exports=n((function(){var t=i("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}))},74684:(t,e,r)=>{"use strict";var n=r(981),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},68600:t=>{"use strict";t.exports=function(t,e){return t===e||t!=t&&e!=e}},70953:t=>{"use strict";t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},8552:(t,e,r)=>{"use strict";var n,i=r(19037),a=r(61735),o=r(69985),s=r(83127),c=r(30071),l=r(96004),u=r(21500),h=i.Function,f=/MSIE .\./.test(c)||s&&((n=i.Bun.version.split(".")).length<3||"0"===n[0]&&(n[1]<3||"3"===n[1]&&"0"===n[2]));t.exports=function(t,e){var r=e?2:1;return f?function(n,i){var s=u(arguments.length,1)>r,c=o(n)?n:h(n),f=s?l(arguments,r):[],d=s?function(){a(c,this,f)}:c;return e?t(d,i):t(d)}:t}},3097:(t,e,r)=>{"use strict";var n=r(61034),i=r(48774),a=n.Set,o=n.add;t.exports=function(t){var e=new a;return i(t,(function(t){o(e,t)})),e}},27748:(t,e,r)=>{"use strict";var n=r(10029),i=r(61034),a=r(3097),o=r(17026),s=r(41074),c=r(48774),l=r(96704),u=i.has,h=i.remove;t.exports=function(t){var e=n(this),r=s(t),i=a(e);return o(e)<=r.size?c(e,(function(t){r.includes(t)&&h(i,t)})):l(r.getIterator(),(function(t){u(e,t)&&h(i,t)})),i}},61034:(t,e,r)=>{"use strict";var n=r(68844),i=Set.prototype;t.exports={Set,add:n(i.add),has:n(i.has),remove:n(i.delete),proto:i}},72948:(t,e,r)=>{"use strict";var n=r(10029),i=r(61034),a=r(17026),o=r(41074),s=r(48774),c=r(96704),l=i.Set,u=i.add,h=i.has;t.exports=function(t){var e=n(this),r=o(t),i=new l;return a(e)>r.size?c(r.getIterator(),(function(t){h(e,t)&&u(i,t)})):s(e,(function(t){r.includes(t)&&u(i,t)})),i}},97795:(t,e,r)=>{"use strict";var n=r(10029),i=r(61034).has,a=r(17026),o=r(41074),s=r(48774),c=r(96704),l=r(72125);t.exports=function(t){var e=n(this),r=o(t);if(a(e)<=r.size)return!1!==s(e,(function(t){if(r.includes(t))return!1}),!0);var u=r.getIterator();return!1!==c(u,(function(t){if(i(e,t))return l(u,"normal",!1)}))}},26951:(t,e,r)=>{"use strict";var n=r(10029),i=r(17026),a=r(48774),o=r(41074);t.exports=function(t){var e=n(this),r=o(t);return!(i(e)>r.size)&&!1!==a(e,(function(t){if(!r.includes(t))return!1}),!0)}},3894:(t,e,r)=>{"use strict";var n=r(10029),i=r(61034).has,a=r(17026),o=r(41074),s=r(96704),c=r(72125);t.exports=function(t){var e=n(this),r=o(t);if(a(e){"use strict";var n=r(68844),i=r(96704),a=r(61034),o=a.Set,s=a.proto,c=n(s.forEach),l=n(s.keys),u=l(new o).next;t.exports=function(t,e,r){return r?i({iterator:l(t),next:u},e):c(t,e)}},53234:(t,e,r)=>{"use strict";var n=r(76058),i=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};t.exports=function(t){var e=n("Set");try{(new e)[t](i(0));try{return(new e)[t](i(-1)),!1}catch(t){return!0}}catch(t){return!1}}},17026:(t,e,r)=>{"use strict";var n=r(52743),i=r(61034);t.exports=n(i.proto,"size","get")||function(t){return t.size}},14241:(t,e,r)=>{"use strict";var n=r(76058),i=r(62148),a=r(44201),o=r(67697),s=a("species");t.exports=function(t){var e=n(t);o&&e&&!e[s]&&i(e,s,{configurable:!0,get:function(){return this}})}},62289:(t,e,r)=>{"use strict";var n=r(10029),i=r(61034),a=r(3097),o=r(41074),s=r(96704),c=i.add,l=i.has,u=i.remove;t.exports=function(t){var e=n(this),r=o(t).getIterator(),i=a(e);return s(r,(function(t){l(e,t)?u(i,t):c(i,t)})),i}},55997:(t,e,r)=>{"use strict";var n=r(72560).f,i=r(36812),a=r(44201)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!i(t,a)&&n(t,a,{configurable:!0,value:e})}},75674:(t,e,r)=>{"use strict";var n=r(10029),i=r(61034).add,a=r(3097),o=r(41074),s=r(96704);t.exports=function(t){var e=n(this),r=o(t).getIterator(),c=a(e);return s(r,(function(t){i(c,t)})),c}},2713:(t,e,r)=>{"use strict";var n=r(83430),i=r(14630),a=n("keys");t.exports=function(t){return a[t]||(a[t]=i(t))}},84091:(t,e,r)=>{"use strict";var n=r(19037),i=r(95014),a="__core-js_shared__",o=n[a]||i(a,{});t.exports=o},83430:(t,e,r)=>{"use strict";var n=r(53931),i=r(84091);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.34.0",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE",source:"https://github.com/zloirock/core-js"})},76373:(t,e,r)=>{"use strict";var n=r(85027),i=r(52655),a=r(981),o=r(44201)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||a(r=n(s)[o])?e:i(r)}},8195:(t,e,r)=>{"use strict";var n=r(68844),i=r(65290),a=r(34327),o=r(6310),s=TypeError,c=n([].push),l=n([].join);t.exports=function(t){var e=i(t),r=o(e);if(!r)return"";for(var n=arguments.length,u=[],h=0;;){var f=e[h++];if(void 0===f)throw new s("Incorrect template");if(c(u,a(f)),h===r)return l(u,"");h{"use strict";var n=r(3689);t.exports=function(t){return n((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},10730:(t,e,r)=>{"use strict";var n=r(68844),i=r(68700),a=r(34327),o=r(74684),s=n("".charAt),c=n("".charCodeAt),l=n("".slice),u=function(t){return function(e,r){var n,u,h=a(o(e)),f=i(r),d=h.length;return f<0||f>=d?t?"":void 0:(n=c(h,f))<55296||n>56319||f+1===d||(u=c(h,f+1))<56320||u>57343?t?s(h,f):n:t?l(h,f,f+2):u-56320+(n-55296<<10)+65536}};t.exports={codeAt:u(!1),charAt:u(!0)}},35947:(t,e,r)=>{"use strict";var n=r(30071);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(n)},77254:(t,e,r)=>{"use strict";var n=r(68844),i=r(43126),a=r(34327),o=r(90534),s=r(74684),c=n(o),l=n("".slice),u=Math.ceil,h=function(t){return function(e,r,n){var o,h,f=a(s(e)),d=i(r),p=f.length,m=void 0===n?" ":a(n);return d<=p||""===m?f:((h=c(m,u((o=d-p)/m.length))).length>o&&(h=l(h,0,o)),t?f+h:h+f)}};t.exports={start:h(!1),end:h(!0)}},98985:(t,e,r)=>{"use strict";var n=r(76058),i=r(68844),a=String.fromCharCode,o=n("String","fromCodePoint"),s=i("".charAt),c=i("".charCodeAt),l=i("".indexOf),u=i("".slice),h=function(t,e){var r=c(t,e);return r>=48&&r<=57},f=function(t,e,r){if(r>=t.length)return-1;for(var n=0;e=48&&t<=57?t-48:t>=97&&t<=102?t-97+10:t>=65&&t<=70?t-65+10:-1};t.exports=function(t){for(var e,r="",n=0,i=0;(i=l(t,"\\",i))>-1;){if(r+=u(t,n,i),++i===t.length)return;var c=s(t,i++);switch(c){case"b":r+="\b";break;case"t":r+="\t";break;case"n":r+="\n";break;case"v":r+="\v";break;case"f":r+="\f";break;case"r":r+="\r";break;case"\r":i1114111)return;r+=o(e);break;default:if(h(c,0))return;r+=c}n=i}return r+u(t,n)}},6430:(t,e,r)=>{"use strict";var n=r(68844),i=2147483647,a=/[^\0-\u007E]/,o=/[.\u3002\uFF0E\uFF61]/g,s="Overflow: input needs wider integers to process",c=RangeError,l=n(o.exec),u=Math.floor,h=String.fromCharCode,f=n("".charCodeAt),d=n([].join),p=n([].push),m=n("".replace),g=n("".split),A=n("".toLowerCase),v=function(t){return t+22+75*(t<26)},y=function(t,e,r){var n=0;for(t=r?u(t/700):t>>1,t+=u(t/e);t>455;)t=u(t/35),n+=36;return u(n+36*t/(t+38))},b=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r=55296&&i<=56319&&r=o&&nu((i-l)/x))throw new c(s);for(l+=(b-o)*x,o=b,r=0;ri)throw new c(s);if(n===o){for(var w=l,_=36;;){var E=_<=m?1:_>=m+26?26:_-m;if(w{"use strict";var n=r(68700),i=r(34327),a=r(74684),o=RangeError;t.exports=function(t){var e=i(a(this)),r="",s=n(t);if(s<0||s===1/0)throw new o("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(e+=e))1&s&&(r+=e);return r}},79558:(t,e,r)=>{"use strict";var n=r(61435).end,i=r(75984);t.exports=i("trimEnd")?function(){return n(this)}:"".trimEnd},75984:(t,e,r)=>{"use strict";var n=r(41236).PROPER,i=r(3689),a=r(86350);t.exports=function(t){return i((function(){return!!a[t]()||"​…᠎"!=="​…᠎"[t]()||n&&a[t].name!==t}))}},72291:(t,e,r)=>{"use strict";var n=r(61435).start,i=r(75984);t.exports=i("trimStart")?function(){return n(this)}:"".trimStart},61435:(t,e,r)=>{"use strict";var n=r(68844),i=r(74684),a=r(34327),o=r(86350),s=n("".replace),c=RegExp("^["+o+"]+"),l=RegExp("(^|[^"+o+"])["+o+"]+$"),u=function(t){return function(e){var r=a(i(e));return 1&t&&(r=s(r,c,"")),2&t&&(r=s(r,l,"$1")),r}};t.exports={start:u(1),end:u(2),trim:u(3)}},63514:(t,e,r)=>{"use strict";var n=r(19037),i=r(3689),a=r(3615),o=r(72532),s=r(88563),c=r(50806),l=n.structuredClone;t.exports=!!l&&!i((function(){if(s&&a>92||c&&a>94||o&&a>97)return!1;var t=new ArrayBuffer(8),e=l(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength}))},50146:(t,e,r)=>{"use strict";var n=r(3615),i=r(3689),a=r(19037).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},13032:(t,e,r)=>{"use strict";var n=r(22615),i=r(76058),a=r(44201),o=r(11880);t.exports=function(){var t=i("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,s=a("toPrimitive");e&&!e[s]&&o(e,s,(function(t){return n(r,this)}),{arity:1})}},18992:(t,e,r)=>{"use strict";var n=r(76058),i=r(68844),a=n("Symbol"),o=a.keyFor,s=i(a.prototype.valueOf);t.exports=a.isRegisteredSymbol||function(t){try{return void 0!==o(s(t))}catch(t){return!1}}},8957:(t,e,r)=>{"use strict";for(var n=r(83430),i=r(76058),a=r(68844),o=r(30734),s=r(44201),c=i("Symbol"),l=c.isWellKnownSymbol,u=i("Object","getOwnPropertyNames"),h=a(c.prototype.valueOf),f=n("wks"),d=0,p=u(c),m=p.length;d{"use strict";var n=r(50146);t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},99886:(t,e,r)=>{"use strict";var n,i,a,o,s=r(19037),c=r(61735),l=r(54071),u=r(69985),h=r(36812),f=r(3689),d=r(2688),p=r(96004),m=r(36420),g=r(21500),A=r(4764),v=r(50806),y=s.setImmediate,b=s.clearImmediate,x=s.process,w=s.Dispatch,_=s.Function,E=s.MessageChannel,M=s.String,S=0,C={},T="onreadystatechange";f((function(){n=s.location}));var I=function(t){if(h(C,t)){var e=C[t];delete C[t],e()}},R=function(t){return function(){I(t)}},B=function(t){I(t.data)},k=function(t){s.postMessage(M(t),n.protocol+"//"+n.host)};y&&b||(y=function(t){g(arguments.length,1);var e=u(t)?t:_(t),r=p(arguments,1);return C[++S]=function(){c(e,void 0,r)},i(S),S},b=function(t){delete C[t]},v?i=function(t){x.nextTick(R(t))}:w&&w.now?i=function(t){w.now(R(t))}:E&&!A?(o=(a=new E).port2,a.port1.onmessage=B,i=l(o.postMessage,o)):s.addEventListener&&u(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!f(k)?(i=k,s.addEventListener("message",B,!1)):i=T in m("script")?function(t){d.appendChild(m("script"))[T]=function(){d.removeChild(this),I(t)}}:function(t){setTimeout(R(t),0)}),t.exports={set:y,clear:b}},23648:(t,e,r)=>{"use strict";var n=r(68844);t.exports=n(1..valueOf)},27578:(t,e,r)=>{"use strict";var n=r(68700),i=Math.max,a=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):a(r,e)}},71530:(t,e,r)=>{"use strict";var n=r(88732),i=TypeError;t.exports=function(t){var e=n(t,"number");if("number"==typeof e)throw new i("Can't convert number to bigint");return BigInt(e)}},19842:(t,e,r)=>{"use strict";var n=r(68700),i=r(43126),a=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=n(t),r=i(e);if(e!==r)throw new a("Wrong length or index");return r}},65290:(t,e,r)=>{"use strict";var n=r(94413),i=r(74684);t.exports=function(t){return n(i(t))}},68700:(t,e,r)=>{"use strict";var n=r(58828);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},43126:(t,e,r)=>{"use strict";var n=r(68700),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},90690:(t,e,r)=>{"use strict";var n=r(74684),i=Object;t.exports=function(t){return i(n(t))}},83250:(t,e,r)=>{"use strict";var n=r(15904),i=RangeError;t.exports=function(t,e){var r=n(t);if(r%e)throw new i("Wrong offset");return r}},15904:(t,e,r)=>{"use strict";var n=r(68700),i=RangeError;t.exports=function(t){var e=n(t);if(e<0)throw new i("The argument can't be less than 0");return e}},88732:(t,e,r)=>{"use strict";var n=r(22615),i=r(48999),a=r(30734),o=r(54849),s=r(35899),c=r(44201),l=TypeError,u=c("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var r,c=o(t,u);if(c){if(void 0===e&&(e="default"),r=n(c,t,e),!i(r)||a(r))return r;throw new l("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},18360:(t,e,r)=>{"use strict";var n=r(88732),i=r(30734);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},2939:(t,e,r)=>{"use strict";var n=r(76058),i=r(69985),a=r(9603),o=r(48999),s=n("Set");t.exports=function(t){return function(t){return o(t)&&"number"==typeof t.size&&i(t.has)&&i(t.keys)}(t)?t:a(t)?new s(t):t}},23043:(t,e,r)=>{"use strict";var n={};n[r(44201)("toStringTag")]="z",t.exports="[object z]"===String(n)},34327:(t,e,r)=>{"use strict";var n=r(50926),i=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},87191:t=>{"use strict";var e=Math.round;t.exports=function(t){var r=e(t);return r<0?0:r>255?255:255&r}},21905:(t,e,r)=>{"use strict";var n=r(50806);t.exports=function(t){try{if(n)return Function('return require("'+t+'")')()}catch(t){}}},23691:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},31158:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(22615),o=r(67697),s=r(39800),c=r(54872),l=r(83999),u=r(767),h=r(75684),f=r(75773),d=r(71973),p=r(43126),m=r(19842),g=r(83250),A=r(87191),v=r(18360),y=r(36812),b=r(50926),x=r(48999),w=r(30734),_=r(25391),E=r(23622),M=r(49385),S=r(72741).f,C=r(41304),T=r(2960).forEach,I=r(14241),R=r(62148),B=r(72560),k=r(82474),L=r(618),P=r(33457),D=L.get,U=L.set,O=L.enforce,F=B.f,N=k.f,z=i.RangeError,G=l.ArrayBuffer,Z=G.prototype,V=l.DataView,Q=c.NATIVE_ARRAY_BUFFER_VIEWS,j=c.TYPED_ARRAY_TAG,W=c.TypedArray,H=c.TypedArrayPrototype,X=c.aTypedArrayConstructor,q=c.isTypedArray,Y="BYTES_PER_ELEMENT",J="Wrong length",K=function(t,e){X(t);for(var r=0,n=e.length,i=new t(n);n>r;)i[r]=e[r++];return i},$=function(t,e){R(t,e,{configurable:!0,get:function(){return D(this)[e]}})},tt=function(t){var e;return E(Z,t)||"ArrayBuffer"===(e=b(t))||"SharedArrayBuffer"===e},et=function(t,e){return q(t)&&!w(e)&&e in t&&d(+e)&&e>=0},rt=function(t,e){return e=v(e),et(t,e)?h(2,t[e]):N(t,e)},nt=function(t,e,r){return e=v(e),!(et(t,e)&&x(r)&&y(r,"value"))||y(r,"get")||y(r,"set")||r.configurable||y(r,"writable")&&!r.writable||y(r,"enumerable")&&!r.enumerable?F(t,e,r):(t[e]=r.value,t)};o?(Q||(k.f=rt,B.f=nt,$(H,"buffer"),$(H,"byteOffset"),$(H,"byteLength"),$(H,"length")),n({target:"Object",stat:!0,forced:!Q},{getOwnPropertyDescriptor:rt,defineProperty:nt}),t.exports=function(t,e,r){var o=t.match(/\d+/)[0]/8,c=t+(r?"Clamped":"")+"Array",l="get"+t,h="set"+t,d=i[c],v=d,y=v&&v.prototype,b={},w=function(t,e){F(t,e,{get:function(){return function(t,e){var r=D(t);return r.view[l](e*o+r.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,n){var i=D(t);i.view[h](e*o+i.byteOffset,r?A(n):n,!0)}(this,e,t)},enumerable:!0})};Q?s&&(v=e((function(t,e,r,n){return u(t,y),P(x(e)?tt(e)?void 0!==n?new d(e,g(r,o),n):void 0!==r?new d(e,g(r,o)):new d(e):q(e)?K(v,e):a(C,v,e):new d(m(e)),t,v)})),M&&M(v,W),T(S(d),(function(t){t in v||f(v,t,d[t])})),v.prototype=y):(v=e((function(t,e,r,n){u(t,y);var i,s,c,l=0,h=0;if(x(e)){if(!tt(e))return q(e)?K(v,e):a(C,v,e);i=e,h=g(r,o);var f=e.byteLength;if(void 0===n){if(f%o)throw new z(J);if((s=f-h)<0)throw new z(J)}else if((s=p(n)*o)+h>f)throw new z(J);c=s/o}else c=m(e),i=new G(s=c*o);for(U(t,{buffer:i,byteOffset:h,byteLength:s,length:c,view:new V(i)});l{"use strict";var n=r(19037),i=r(3689),a=r(86431),o=r(54872).NATIVE_ARRAY_BUFFER_VIEWS,s=n.ArrayBuffer,c=n.Int8Array;t.exports=!o||!i((function(){c(1)}))||!i((function(){new c(-1)}))||!a((function(t){new c,new c(null),new c(1.5),new c(t)}),!0)||i((function(){return 1!==new c(new s(2),1,void 0).length}))},20716:(t,e,r)=>{"use strict";var n=r(59976),i=r(47338);t.exports=function(t,e){return n(i(t),e)}},41304:(t,e,r)=>{"use strict";var n=r(54071),i=r(22615),a=r(52655),o=r(90690),s=r(6310),c=r(5185),l=r(91664),u=r(93292),h=r(9401),f=r(54872).aTypedArrayConstructor,d=r(71530);t.exports=function(t){var e,r,p,m,g,A,v,y,b=a(this),x=o(t),w=arguments.length,_=w>1?arguments[1]:void 0,E=void 0!==_,M=l(x);if(M&&!u(M))for(y=(v=c(x,M)).next,x=[];!(A=i(y,v)).done;)x.push(A.value);for(E&&w>2&&(_=n(_,arguments[2])),r=s(x),p=new(f(b))(r),m=h(p),e=0;r>e;e++)g=E?_(x[e],e):x[e],p[e]=m?d(g):+g;return p}},47338:(t,e,r)=>{"use strict";var n=r(54872),i=r(76373),a=n.aTypedArrayConstructor,o=n.getTypedArrayConstructor;t.exports=function(t){return a(i(t,o(t)))}},14630:(t,e,r)=>{"use strict";var n=r(68844),i=0,a=Math.random(),o=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++i+a,36)}},76837:(t,e,r)=>{"use strict";var n=r(3689),i=r(44201),a=r(67697),o=r(53931),s=i("iterator");t.exports=!n((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),r.delete("a",2),r.delete("b",void 0),o&&(!t.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!e.size&&(o||!a)||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},39525:(t,e,r)=>{"use strict";var n=r(50146);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},15648:(t,e,r)=>{"use strict";var n=r(67697),i=r(3689);t.exports=n&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},21500:t=>{"use strict";var e=TypeError;t.exports=function(t,r){if(t{"use strict";var n=r(19037),i=r(69985),a=n.WeakMap;t.exports=i(a)&&/native code/.test(String(a))},16803:(t,e,r)=>{"use strict";var n=r(68844),i=WeakMap.prototype;t.exports={WeakMap,set:n(i.set),get:n(i.get),has:n(i.has),remove:n(i.delete)}},78616:(t,e,r)=>{"use strict";var n=r(68844),i=WeakSet.prototype;t.exports={WeakSet,add:n(i.add),has:n(i.has),remove:n(i.delete)}},35405:(t,e,r)=>{"use strict";var n=r(50496),i=r(36812),a=r(96145),o=r(72560).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});i(e,t)||o(e,t,{value:a.f(t)})}},96145:(t,e,r)=>{"use strict";var n=r(44201);e.f=n},44201:(t,e,r)=>{"use strict";var n=r(19037),i=r(83430),a=r(36812),o=r(14630),s=r(50146),c=r(39525),l=n.Symbol,u=i("wks"),h=c?l.for||l:l&&l.withoutSetter||o;t.exports=function(t){return a(u,t)||(u[t]=s&&a(l,t)?l[t]:h("Symbol."+t)),u[t]}},86350:t=>{"use strict";t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},51064:(t,e,r)=>{"use strict";var n=r(76058),i=r(36812),a=r(75773),o=r(23622),s=r(49385),c=r(8758),l=r(38055),u=r(33457),h=r(13841),f=r(62570),d=r(65411),p=r(67697),m=r(53931);t.exports=function(t,e,r,g){var A="stackTraceLimit",v=g?2:1,y=t.split("."),b=y[y.length-1],x=n.apply(null,y);if(x){var w=x.prototype;if(!m&&i(w,"cause")&&delete w.cause,!r)return x;var _=n("Error"),E=e((function(t,e){var r=h(g?e:t,void 0),n=g?new x(t):new x;return void 0!==r&&a(n,"message",r),d(n,E,n.stack,2),this&&o(w,this)&&u(n,this,E),arguments.length>v&&f(n,arguments[v]),n}));if(E.prototype=w,"Error"!==b?s?s(E,_):c(E,_,{name:!0}):p&&A in x&&(l(E,x,A),l(E,x,"prepareStackTrace")),c(E,x),!m)try{w.name!==b&&a(w,"name",b),w.constructor=E}catch(t){}return E}}},54927:(t,e,r)=>{"use strict";var n=r(79989),i=r(76058),a=r(61735),o=r(3689),s=r(51064),c="AggregateError",l=i(c),u=!o((function(){return 1!==l([1]).errors[0]}))&&o((function(){return 7!==l([1],c,{cause:7}).cause}));n({global:!0,constructor:!0,arity:2,forced:u},{AggregateError:s(c,(function(t){return function(e,r){return a(t,this,arguments)}}),u,!0)})},39382:(t,e,r)=>{"use strict";var n=r(79989),i=r(23622),a=r(61868),o=r(49385),s=r(8758),c=r(25391),l=r(75773),u=r(75684),h=r(62570),f=r(65411),d=r(18734),p=r(13841),m=r(44201)("toStringTag"),g=Error,A=[].push,v=function(t,e){var r,n=i(y,this);o?r=o(new g,n?a(this):y):(r=n?this:c(y),l(r,m,"Error")),void 0!==e&&l(r,"message",p(e)),f(r,v,r.stack,1),arguments.length>2&&h(r,arguments[2]);var s=[];return d(t,A,{that:s}),l(r,"errors",s),r};o?o(v,g):s(v,g,{name:!0});var y=v.prototype=c(g.prototype,{constructor:u(1,v),message:u(1,""),name:u(1,"AggregateError")});n({global:!0,constructor:!0,arity:2},{AggregateError:v})},95879:(t,e,r)=>{"use strict";r(39382)},69365:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(83999),o=r(14241),s="ArrayBuffer",c=a[s];n({global:!0,constructor:!0,forced:i[s]!==c},{ArrayBuffer:c}),o(s)},33870:(t,e,r)=>{"use strict";var n=r(79989),i=r(54872);n({target:"ArrayBuffer",stat:!0,forced:!i.NATIVE_ARRAY_BUFFER_VIEWS},{isView:i.isView})},99211:(t,e,r)=>{"use strict";var n=r(79989),i=r(46576),a=r(3689),o=r(83999),s=r(85027),c=r(27578),l=r(43126),u=r(76373),h=o.ArrayBuffer,f=o.DataView,d=f.prototype,p=i(h.prototype.slice),m=i(d.getUint8),g=i(d.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:a((function(){return!new h(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(p&&void 0===e)return p(s(this),t);for(var r=s(this).byteLength,n=c(t,r),i=c(void 0===e?r:e,r),a=new(u(this,h))(l(i-n)),o=new f(this),d=new f(a),A=0;n{"use strict";var n=r(79989),i=r(90690),a=r(6310),o=r(68700),s=r(87370);n({target:"Array",proto:!0},{at:function(t){var e=i(this),r=a(e),n=o(t),s=n>=0?n:r+n;return s<0||s>=r?void 0:e[s]}}),s("at")},34338:(t,e,r)=>{"use strict";var n=r(79989),i=r(3689),a=r(92297),o=r(48999),s=r(90690),c=r(6310),l=r(55565),u=r(76522),h=r(27120),f=r(29042),d=r(44201),p=r(3615),m=d("isConcatSpreadable"),g=p>=51||!i((function(){var t=[];return t[m]=!1,t.concat()[0]!==t})),A=function(t){if(!o(t))return!1;var e=t[m];return void 0!==e?!!e:a(t)};n({target:"Array",proto:!0,arity:1,forced:!g||!f("concat")},{concat:function(t){var e,r,n,i,a,o=s(this),f=h(o,0),d=0;for(e=-1,n=arguments.length;e{"use strict";var n=r(79989),i=r(70357),a=r(87370);n({target:"Array",proto:!0},{copyWithin:i}),a("copyWithin")},55791:(t,e,r)=>{"use strict";var n=r(79989),i=r(2960).every;n({target:"Array",proto:!0,forced:!r(16834)("every")},{every:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},97895:(t,e,r)=>{"use strict";var n=r(79989),i=r(62872),a=r(87370);n({target:"Array",proto:!0},{fill:i}),a("fill")},38077:(t,e,r)=>{"use strict";var n=r(79989),i=r(2960).filter;n({target:"Array",proto:!0,forced:!r(29042)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},39772:(t,e,r)=>{"use strict";var n=r(79989),i=r(2960).findIndex,a=r(87370),o="findIndex",s=!0;o in[]&&Array(1)[o]((function(){s=!1})),n({target:"Array",proto:!0,forced:s},{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a(o)},93383:(t,e,r)=>{"use strict";var n=r(79989),i=r(61969).findLastIndex,a=r(87370);n({target:"Array",proto:!0},{findLastIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a("findLastIndex")},59867:(t,e,r)=>{"use strict";var n=r(79989),i=r(61969).findLast,a=r(87370);n({target:"Array",proto:!0},{findLast:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a("findLast")},25728:(t,e,r)=>{"use strict";var n=r(79989),i=r(2960).find,a=r(87370),o="find",s=!0;o in[]&&Array(1)[o]((function(){s=!1})),n({target:"Array",proto:!0,forced:s},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a(o)},54564:(t,e,r)=>{"use strict";var n=r(79989),i=r(37809),a=r(10509),o=r(90690),s=r(6310),c=r(27120);n({target:"Array",proto:!0},{flatMap:function(t){var e,r=o(this),n=s(r);return a(t),(e=c(r,0)).length=i(e,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},62795:(t,e,r)=>{"use strict";var n=r(79989),i=r(37809),a=r(90690),o=r(6310),s=r(68700),c=r(27120);n({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=a(this),r=o(e),n=c(e,0);return n.length=i(n,e,e,r,0,void 0===t?1:s(t)),n}})},49693:(t,e,r)=>{"use strict";var n=r(79989),i=r(57612);n({target:"Array",proto:!0,forced:[].forEach!==i},{forEach:i})},77049:(t,e,r)=>{"use strict";var n=r(79989),i=r(21055);n({target:"Array",stat:!0,forced:!r(86431)((function(t){Array.from(t)}))},{from:i})},76801:(t,e,r)=>{"use strict";var n=r(79989),i=r(84328).includes,a=r(3689),o=r(87370);n({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},97195:(t,e,r)=>{"use strict";var n=r(79989),i=r(46576),a=r(84328).indexOf,o=r(16834),s=i([].indexOf),c=!!s&&1/s([1],1,-0)<0;n({target:"Array",proto:!0,forced:c||!o("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return c?s(this,t,e)||0:a(this,t,e)}})},63975:(t,e,r)=>{"use strict";r(79989)({target:"Array",stat:!0},{isArray:r(92297)})},752:(t,e,r)=>{"use strict";var n=r(65290),i=r(87370),a=r(9478),o=r(618),s=r(72560).f,c=r(91934),l=r(27807),u=r(53931),h=r(67697),f="Array Iterator",d=o.set,p=o.getterFor(f);t.exports=c(Array,"Array",(function(t,e){d(this,{type:f,target:n(t),index:0,kind:e})}),(function(){var t=p(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=void 0,l(void 0,!0);switch(t.kind){case"keys":return l(r,!1);case"values":return l(e[r],!1)}return l([r,e[r]],!1)}),"values");var m=a.Arguments=a.Array;if(i("keys"),i("values"),i("entries"),!u&&h&&"values"!==m.name)try{s(m,"name",{value:"values"})}catch(t){}},6203:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(94413),o=r(65290),s=r(16834),c=i([].join);n({target:"Array",proto:!0,forced:a!==Object||!s("join",",")},{join:function(t){return c(o(this),void 0===t?",":t)}})},72410:(t,e,r)=>{"use strict";var n=r(79989),i=r(60953);n({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},50886:(t,e,r)=>{"use strict";var n=r(79989),i=r(2960).map;n({target:"Array",proto:!0,forced:!r(29042)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},37593:(t,e,r)=>{"use strict";var n=r(79989),i=r(3689),a=r(19429),o=r(76522),s=Array;n({target:"Array",stat:!0,forced:i((function(){function t(){}return!(s.of.call(t)instanceof t)}))},{of:function(){for(var t=0,e=arguments.length,r=new(a(this)?this:s)(e);e>t;)o(r,t,arguments[t++]);return r.length=e,r}})},70560:(t,e,r)=>{"use strict";var n=r(79989),i=r(90690),a=r(6310),o=r(5649),s=r(55565);n({target:"Array",proto:!0,arity:1,forced:r(3689)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=i(this),r=a(e),n=arguments.length;s(r+n);for(var c=0;c{"use strict";var n=r(79989),i=r(88820).right,a=r(16834),o=r(3615);n({target:"Array",proto:!0,forced:!r(50806)&&o>79&&o<83||!a("reduceRight")},{reduceRight:function(t){return i(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},278:(t,e,r)=>{"use strict";var n=r(79989),i=r(88820).left,a=r(16834),o=r(3615);n({target:"Array",proto:!0,forced:!r(50806)&&o>79&&o<83||!a("reduce")},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},93374:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(92297),o=i([].reverse),s=[1,2];n({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return a(this)&&(this.length=this.length),o(this)}})},89730:(t,e,r)=>{"use strict";var n=r(79989),i=r(92297),a=r(19429),o=r(48999),s=r(27578),c=r(6310),l=r(65290),u=r(76522),h=r(44201),f=r(29042),d=r(96004),p=f("slice"),m=h("species"),g=Array,A=Math.max;n({target:"Array",proto:!0,forced:!p},{slice:function(t,e){var r,n,h,f=l(this),p=c(f),v=s(t,p),y=s(void 0===e?p:e,p);if(i(f)&&(r=f.constructor,(a(r)&&(r===g||i(r.prototype))||o(r)&&null===(r=r[m]))&&(r=void 0),r===g||void 0===r))return d(f,v,y);for(n=new(void 0===r?g:r)(A(y-v,0)),h=0;v{"use strict";var n=r(79989),i=r(2960).some;n({target:"Array",proto:!0,forced:!r(16834)("some")},{some:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},65137:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(10509),o=r(90690),s=r(6310),c=r(98494),l=r(34327),u=r(3689),h=r(50382),f=r(16834),d=r(97365),p=r(37298),m=r(3615),g=r(27922),A=[],v=i(A.sort),y=i(A.push),b=u((function(){A.sort(void 0)})),x=u((function(){A.sort(null)})),w=f("sort"),_=!u((function(){if(m)return m<70;if(!(d&&d>3)){if(p)return!0;if(g)return g<603;var t,e,r,n,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)A.push({k:e+n,v:r})}for(A.sort((function(t,e){return e.v-t.v})),n=0;nl(r)?1:-1}}(t)),r=s(i),n=0;n{"use strict";r(14241)("Array")},62506:(t,e,r)=>{"use strict";var n=r(79989),i=r(90690),a=r(27578),o=r(68700),s=r(6310),c=r(5649),l=r(55565),u=r(27120),h=r(76522),f=r(98494),d=r(29042)("splice"),p=Math.max,m=Math.min;n({target:"Array",proto:!0,forced:!d},{splice:function(t,e){var r,n,d,g,A,v,y=i(this),b=s(y),x=a(t,b),w=arguments.length;for(0===w?r=n=0:1===w?(r=0,n=b-x):(r=w-2,n=m(p(o(e),0),b-x)),l(b+r-n),d=u(y,n),g=0;gb-n+r;g--)f(y,g-1)}else if(r>n)for(g=b-n;g>x;g--)v=g+r-1,(A=g+n-1)in y?y[v]=y[A]:f(y,v);for(g=0;g{"use strict";var n=r(79989),i=r(26166),a=r(65290),o=r(87370),s=Array;n({target:"Array",proto:!0},{toReversed:function(){return i(a(this),s)}}),o("toReversed")},12894:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(10509),o=r(65290),s=r(59976),c=r(88277),l=r(87370),u=Array,h=i(c("Array","sort"));n({target:"Array",proto:!0},{toSorted:function(t){void 0!==t&&a(t);var e=o(this),r=s(u,e);return h(r,t)}}),l("toSorted")},93530:(t,e,r)=>{"use strict";var n=r(79989),i=r(87370),a=r(55565),o=r(6310),s=r(27578),c=r(65290),l=r(68700),u=Array,h=Math.max,f=Math.min;n({target:"Array",proto:!0},{toSpliced:function(t,e){var r,n,i,d,p=c(this),m=o(p),g=s(t,m),A=arguments.length,v=0;for(0===A?r=n=0:1===A?(r=0,n=m-g):(r=A-2,n=f(h(l(e),0),m-g)),i=a(m+r-n),d=u(i);v{"use strict";r(87370)("flatMap")},13383:(t,e,r)=>{"use strict";r(87370)("flat")},91719:(t,e,r)=>{"use strict";var n=r(79989),i=r(90690),a=r(6310),o=r(5649),s=r(98494),c=r(55565);n({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(t){return t instanceof TypeError}}()},{unshift:function(t){var e=i(this),r=a(e),n=arguments.length;if(n){c(r+n);for(var l=r;l--;){var u=l+n;l in e?e[u]=e[l]:s(e,u)}for(var h=0;h{"use strict";var n=r(79989),i=r(16134),a=r(65290),o=Array;n({target:"Array",proto:!0},{with:function(t,e){return i(a(this),o,t,e)}})},87347:(t,e,r)=>{"use strict";var n=r(79989),i=r(83999);n({global:!0,constructor:!0,forced:!r(37075)},{DataView:i.DataView})},18201:(t,e,r)=>{"use strict";r(87347)},55635:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(3689)((function(){return 120!==new Date(16e11).getYear()})),o=i(Date.prototype.getFullYear);n({target:"Date",proto:!0,forced:a},{getYear:function(){return o(this)-1900}})},42227:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=Date,o=i(a.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return o(new a)}})},99679:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(68700),o=Date.prototype,s=i(o.getTime),c=i(o.setFullYear);n({target:"Date",proto:!0},{setYear:function(t){s(this);var e=a(t);return c(this,e>=0&&e<=99?e+1900:e)}})},24343:(t,e,r)=>{"use strict";r(79989)({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})},65007:(t,e,r)=>{"use strict";var n=r(79989),i=r(99455);n({target:"Date",proto:!0,forced:Date.prototype.toISOString!==i},{toISOString:i})},78150:(t,e,r)=>{"use strict";var n=r(79989),i=r(3689),a=r(90690),o=r(88732);n({target:"Date",proto:!0,arity:1,forced:i((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=a(this),r=o(e,"number");return"number"!=typeof r||isFinite(r)?e.toISOString():null}})},59903:(t,e,r)=>{"use strict";var n=r(36812),i=r(11880),a=r(81797),o=r(44201)("toPrimitive"),s=Date.prototype;n(s,o)||i(s,o,a)},30024:(t,e,r)=>{"use strict";var n=r(68844),i=r(11880),a=Date.prototype,o="Invalid Date",s="toString",c=n(a[s]),l=n(a.getTime);String(new Date(NaN))!==o&&i(a,s,(function(){var t=l(this);return t==t?c(this):o}))},21057:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(61735),o=r(51064),s="WebAssembly",c=i[s],l=7!==new Error("e",{cause:7}).cause,u=function(t,e){var r={};r[t]=o(t,e,l),n({global:!0,constructor:!0,arity:1,forced:l},r)},h=function(t,e){if(c&&c[t]){var r={};r[t]=o(s+"."+t,e,l),n({target:s,stat:!0,constructor:!0,arity:1,forced:l},r)}};u("Error",(function(t){return function(e){return a(t,this,arguments)}})),u("EvalError",(function(t){return function(e){return a(t,this,arguments)}})),u("RangeError",(function(t){return function(e){return a(t,this,arguments)}})),u("ReferenceError",(function(t){return function(e){return a(t,this,arguments)}})),u("SyntaxError",(function(t){return function(e){return a(t,this,arguments)}})),u("TypeError",(function(t){return function(e){return a(t,this,arguments)}})),u("URIError",(function(t){return function(e){return a(t,this,arguments)}})),h("CompileError",(function(t){return function(e){return a(t,this,arguments)}})),h("LinkError",(function(t){return function(e){return a(t,this,arguments)}})),h("RuntimeError",(function(t){return function(e){return a(t,this,arguments)}}))},68932:(t,e,r)=>{"use strict";var n=r(11880),i=r(20445),a=Error.prototype;a.toString!==i&&n(a,"toString",i)},60428:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(34327),o=i("".charAt),s=i("".charCodeAt),c=i(/./.exec),l=i(1..toString),u=i("".toUpperCase),h=/[\w*+\-./@]/,f=function(t,e){for(var r=l(t,16);r.length{"use strict";var n=r(79989),i=r(86761);n({target:"Function",proto:!0,forced:Function.bind!==i},{bind:i})},56269:(t,e,r)=>{"use strict";var n=r(69985),i=r(48999),a=r(72560),o=r(61868),s=r(44201),c=r(98702),l=s("hasInstance"),u=Function.prototype;l in u||a.f(u,l,{value:c((function(t){if(!n(this)||!i(t))return!1;var e=this.prototype;if(!i(e))return t instanceof this;for(;t=o(t);)if(e===t)return!0;return!1}),l)})},34284:(t,e,r)=>{"use strict";var n=r(67697),i=r(41236).EXISTS,a=r(68844),o=r(62148),s=Function.prototype,c=a(s.toString),l=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=a(l.exec);n&&!i&&o(s,"name",{configurable:!0,get:function(){try{return u(l,c(this))[1]}catch(t){return""}}})},45398:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037);n({global:!0,forced:i.globalThis!==i},{globalThis:i})},48324:(t,e,r)=>{"use strict";var n=r(79989),i=r(76058),a=r(61735),o=r(22615),s=r(68844),c=r(3689),l=r(69985),u=r(30734),h=r(96004),f=r(92643),d=r(50146),p=String,m=i("JSON","stringify"),g=s(/./.exec),A=s("".charAt),v=s("".charCodeAt),y=s("".replace),b=s(1..toString),x=/[\uD800-\uDFFF]/g,w=/^[\uD800-\uDBFF]$/,_=/^[\uDC00-\uDFFF]$/,E=!d||c((function(){var t=i("Symbol")("stringify detection");return"[null]"!==m([t])||"{}"!==m({a:t})||"{}"!==m(Object(t))})),M=c((function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")})),S=function(t,e){var r=h(arguments),n=f(e);if(l(n)||void 0!==t&&!u(t))return r[1]=function(t,e){if(l(n)&&(e=o(n,this,p(t),e)),!u(e))return e},a(m,null,r)},C=function(t,e,r){var n=A(r,e-1),i=A(r,e+1);return g(w,t)&&!g(_,i)||g(_,t)&&!g(w,n)?"\\u"+b(v(t,0),16):t};m&&n({target:"JSON",stat:!0,arity:3,forced:E||M},{stringify:function(t,e,r){var n=h(arguments),i=a(E?S:m,null,n);return M&&"string"==typeof i?y(i,x,C):i}})},7629:(t,e,r)=>{"use strict";var n=r(19037);r(55997)(n.JSON,"JSON",!0)},9322:(t,e,r)=>{"use strict";r(20319)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(70800))},89348:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(10509),o=r(74684),s=r(18734),c=r(83914),l=r(53931),u=c.Map,h=c.has,f=c.get,d=c.set,p=i([].push);n({target:"Map",stat:!0,forced:l},{groupBy:function(t,e){o(t),a(e);var r=new u,n=0;return s(t,(function(t){var i=e(t,n++);h(r,i)?p(f(r,i),t):d(r,i,[t])})),r}})},56646:(t,e,r)=>{"use strict";r(9322)},6557:(t,e,r)=>{"use strict";var n=r(79989),i=r(93956),a=Math.acosh,o=Math.log,s=Math.sqrt,c=Math.LN2;n({target:"Math",stat:!0,forced:!a||710!==Math.floor(a(Number.MAX_VALUE))||a(1/0)!==1/0},{acosh:function(t){var e=+t;return e<1?NaN:e>94906265.62425156?o(e)+c:i(e-1+s(e-1)*s(e+1))}})},62428:(t,e,r)=>{"use strict";var n=r(79989),i=Math.asinh,a=Math.log,o=Math.sqrt;n({target:"Math",stat:!0,forced:!(i&&1/i(0)>0)},{asinh:function t(e){var r=+e;return isFinite(r)&&0!==r?r<0?-t(-r):a(r+o(r*r+1)):r}})},45263:(t,e,r)=>{"use strict";var n=r(79989),i=Math.atanh,a=Math.log;n({target:"Math",stat:!0,forced:!(i&&1/i(-0)<0)},{atanh:function(t){var e=+t;return 0===e?e:a((1+e)/(1-e))/2}})},74712:(t,e,r)=>{"use strict";var n=r(79989),i=r(55680),a=Math.abs,o=Math.pow;n({target:"Math",stat:!0},{cbrt:function(t){var e=+t;return i(e)*o(a(e),1/3)}})},54986:(t,e,r)=>{"use strict";var n=r(79989),i=Math.floor,a=Math.log,o=Math.LOG2E;n({target:"Math",stat:!0},{clz32:function(t){var e=t>>>0;return e?31-i(a(e+.5)*o):32}})},47221:(t,e,r)=>{"use strict";var n=r(79989),i=r(21745),a=Math.cosh,o=Math.abs,s=Math.E;n({target:"Math",stat:!0,forced:!a||a(710)===1/0},{cosh:function(t){var e=i(o(t)-1)+1;return(e+1/(e*s*s))*(s/2)}})},94992:(t,e,r)=>{"use strict";var n=r(79989),i=r(21745);n({target:"Math",stat:!0,forced:i!==Math.expm1},{expm1:i})},25499:(t,e,r)=>{"use strict";r(79989)({target:"Math",stat:!0},{fround:r(37788)})},59944:(t,e,r)=>{"use strict";var n=r(79989),i=Math.hypot,a=Math.abs,o=Math.sqrt;n({target:"Math",stat:!0,arity:2,forced:!!i&&i(1/0,NaN)!==1/0},{hypot:function(t,e){for(var r,n,i=0,s=0,c=arguments.length,l=0;s0?(n=r/l)*n:r;return l===1/0?1/0:l*o(i)}})},78527:(t,e,r)=>{"use strict";var n=r(79989),i=r(3689),a=Math.imul;n({target:"Math",stat:!0,forced:i((function(){return-5!==a(4294967295,5)||2!==a.length}))},{imul:function(t,e){var r=65535,n=+t,i=+e,a=r&n,o=r&i;return 0|a*o+((r&n>>>16)*o+a*(r&i>>>16)<<16>>>0)}})},75239:(t,e,r)=>{"use strict";r(79989)({target:"Math",stat:!0},{log10:r(4736)})},92076:(t,e,r)=>{"use strict";r(79989)({target:"Math",stat:!0},{log1p:r(93956)})},68813:(t,e,r)=>{"use strict";var n=r(79989),i=Math.log,a=Math.LN2;n({target:"Math",stat:!0},{log2:function(t){return i(t)/a}})},96976:(t,e,r)=>{"use strict";r(79989)({target:"Math",stat:!0},{sign:r(55680)})},62700:(t,e,r)=>{"use strict";var n=r(79989),i=r(3689),a=r(21745),o=Math.abs,s=Math.exp,c=Math.E;n({target:"Math",stat:!0,forced:i((function(){return-2e-17!==Math.sinh(-2e-17)}))},{sinh:function(t){var e=+t;return o(e)<1?(a(e)-a(-e))/2:(s(e-1)-s(-e-1))*(c/2)}})},91554:(t,e,r)=>{"use strict";var n=r(79989),i=r(21745),a=Math.exp;n({target:"Math",stat:!0},{tanh:function(t){var e=+t,r=i(e),n=i(-e);return r===1/0?1:n===1/0?-1:(r-n)/(a(e)+a(-e))}})},77509:(t,e,r)=>{"use strict";r(55997)(Math,"Math",!0)},21416:(t,e,r)=>{"use strict";r(79989)({target:"Math",stat:!0},{trunc:r(58828)})},79288:(t,e,r)=>{"use strict";var n=r(79989),i=r(53931),a=r(67697),o=r(19037),s=r(50496),c=r(68844),l=r(35266),u=r(36812),h=r(33457),f=r(23622),d=r(30734),p=r(88732),m=r(3689),g=r(72741).f,A=r(82474).f,v=r(72560).f,y=r(23648),b=r(61435).trim,x="Number",w=o[x],_=s[x],E=w.prototype,M=o.TypeError,S=c("".slice),C=c("".charCodeAt),T=l(x,!w(" 0o1")||!w("0b1")||w("+0x1")),I=function(t){var e,r=arguments.length<1?0:w(function(t){var e=p(t,"number");return"bigint"==typeof e?e:function(t){var e,r,n,i,a,o,s,c,l=p(t,"number");if(d(l))throw new M("Cannot convert a Symbol value to a number");if("string"==typeof l&&l.length>2)if(l=b(l),43===(e=C(l,0))||45===e){if(88===(r=C(l,2))||120===r)return NaN}else if(48===e){switch(C(l,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+l}for(o=(a=S(l,2)).length,s=0;si)return NaN;return parseInt(a,n)}return+l}(e)}(t));return f(E,e=this)&&m((function(){y(e)}))?h(Object(r),this,I):r};I.prototype=E,T&&!i&&(E.constructor=I),n({global:!0,constructor:!0,wrap:!0,forced:T},{Number:I});var R=function(t,e){for(var r,n=a?g(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;n.length>i;i++)u(e,r=n[i])&&!u(t,r)&&v(t,r,A(e,r))};i&&_&&R(s[x],_),(T||i)&&R(s[x],w)},53584:(t,e,r)=>{"use strict";r(79989)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})},82243:(t,e,r)=>{"use strict";r(79989)({target:"Number",stat:!0},{isFinite:r(70046)})},95765:(t,e,r)=>{"use strict";r(79989)({target:"Number",stat:!0},{isInteger:r(71973)})},45993:(t,e,r)=>{"use strict";r(79989)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},92547:(t,e,r)=>{"use strict";var n=r(79989),i=r(71973),a=Math.abs;n({target:"Number",stat:!0},{isSafeInteger:function(t){return i(t)&&a(t)<=9007199254740991}})},7936:(t,e,r)=>{"use strict";r(79989)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},32704:(t,e,r)=>{"use strict";r(79989)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})},52362:(t,e,r)=>{"use strict";var n=r(79989),i=r(14818);n({target:"Number",stat:!0,forced:Number.parseFloat!==i},{parseFloat:i})},21552:(t,e,r)=>{"use strict";var n=r(79989),i=r(67897);n({target:"Number",stat:!0,forced:Number.parseInt!==i},{parseInt:i})},10704:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(68700),o=r(23648),s=r(90534),c=r(4736),l=r(3689),u=RangeError,h=String,f=isFinite,d=Math.abs,p=Math.floor,m=Math.pow,g=Math.round,A=i(1..toExponential),v=i(s),y=i("".slice),b="-6.9000e-11"===A(-69e-12,4)&&"1.25e+0"===A(1.255,2)&&"1.235e+4"===A(12345,3)&&"3e+1"===A(25,0);n({target:"Number",proto:!0,forced:!b||!(l((function(){A(1,1/0)}))&&l((function(){A(1,-1/0)})))||!!l((function(){A(1/0,1/0),A(NaN,1/0)}))},{toExponential:function(t){var e=o(this);if(void 0===t)return A(e);var r=a(t);if(!f(e))return String(e);if(r<0||r>20)throw new u("Incorrect fraction digits");if(b)return A(e,r);var n="",i="",s=0,l="",x="";if(e<0&&(n="-",e=-e),0===e)s=0,i=v("0",r+1);else{var w=c(e);s=p(w);var _=0,E=m(10,s-r);2*e>=(2*(_=g(e/E))+1)*E&&(_+=1),_>=m(10,r+1)&&(_/=10,s+=1),i=h(_)}return 0!==r&&(i=y(i,0,1)+"."+y(i,1)),0===s?(l="+",x="0"):(l=s>0?"+":"-",x=h(d(s))),n+(i+"e")+l+x}})},97389:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(68700),o=r(23648),s=r(90534),c=r(3689),l=RangeError,u=String,h=Math.floor,f=i(s),d=i("".slice),p=i(1..toFixed),m=function(t,e,r){return 0===e?r:e%2==1?m(t,e-1,r*t):m(t*t,e/2,r)},g=function(t,e,r){for(var n=-1,i=r;++n<6;)i+=e*t[n],t[n]=i%1e7,i=h(i/1e7)},A=function(t,e){for(var r=6,n=0;--r>=0;)n+=t[r],t[r]=h(n/e),n=n%e*1e7},v=function(t){for(var e=6,r="";--e>=0;)if(""!==r||0===e||0!==t[e]){var n=u(t[e]);r=""===r?n:r+f("0",7-n.length)+n}return r};n({target:"Number",proto:!0,forced:c((function(){return"0.000"!==p(8e-5,3)||"1"!==p(.9,0)||"1.25"!==p(1.255,2)||"1000000000000000128"!==p(0xde0b6b3a7640080,0)}))||!c((function(){p({})}))},{toFixed:function(t){var e,r,n,i,s=o(this),c=a(t),h=[0,0,0,0,0,0],p="",y="0";if(c<0||c>20)throw new l("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return u(s);if(s<0&&(p="-",s=-s),s>1e-21)if(r=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(s*m(2,69,1))-69)<0?s*m(2,-e,1):s/m(2,e,1),r*=4503599627370496,(e=52-e)>0){for(g(h,0,r),n=c;n>=7;)g(h,1e7,0),n-=7;for(g(h,m(10,n,1),0),n=e-1;n>=23;)A(h,1<<23),n-=23;A(h,1<0?p+((i=y.length)<=c?"0."+f("0",c-i)+y:d(y,0,i-c)+"."+d(y,i-c)):p+y}})},25284:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(3689),o=r(23648),s=i(1..toPrecision);n({target:"Number",proto:!0,forced:a((function(){return"1"!==s(1,void 0)}))||!a((function(){s({})}))},{toPrecision:function(t){return void 0===t?s(o(this)):s(o(this),t)}})},60429:(t,e,r)=>{"use strict";var n=r(79989),i=r(45394);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},51013:(t,e,r)=>{"use strict";r(79989)({target:"Object",stat:!0,sham:!r(67697)},{create:r(25391)})},33994:(t,e,r)=>{"use strict";var n=r(79989),i=r(67697),a=r(90600),o=r(10509),s=r(90690),c=r(72560);i&&n({target:"Object",proto:!0,forced:a},{__defineGetter__:function(t,e){c.f(s(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},35082:(t,e,r)=>{"use strict";var n=r(79989),i=r(67697),a=r(98920).f;n({target:"Object",stat:!0,forced:Object.defineProperties!==a,sham:!i},{defineProperties:a})},40739:(t,e,r)=>{"use strict";var n=r(79989),i=r(67697),a=r(72560).f;n({target:"Object",stat:!0,forced:Object.defineProperty!==a,sham:!i},{defineProperty:a})},47409:(t,e,r)=>{"use strict";var n=r(79989),i=r(67697),a=r(90600),o=r(10509),s=r(90690),c=r(72560);i&&n({target:"Object",proto:!0,forced:a},{__defineSetter__:function(t,e){c.f(s(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},36585:(t,e,r)=>{"use strict";var n=r(79989),i=r(49419).entries;n({target:"Object",stat:!0},{entries:function(t){return i(t)}})},41830:(t,e,r)=>{"use strict";var n=r(79989),i=r(71594),a=r(3689),o=r(48999),s=r(45375).onFreeze,c=Object.freeze;n({target:"Object",stat:!0,forced:a((function(){c(1)})),sham:!i},{freeze:function(t){return c&&o(t)?c(s(t)):t}})},85415:(t,e,r)=>{"use strict";var n=r(79989),i=r(18734),a=r(76522);n({target:"Object",stat:!0},{fromEntries:function(t){var e={};return i(t,(function(t,r){a(e,t,r)}),{AS_ENTRIES:!0}),e}})},81919:(t,e,r)=>{"use strict";var n=r(79989),i=r(3689),a=r(65290),o=r(82474).f,s=r(67697);n({target:"Object",stat:!0,forced:!s||i((function(){o(1)})),sham:!s},{getOwnPropertyDescriptor:function(t,e){return o(a(t),e)}})},99474:(t,e,r)=>{"use strict";var n=r(79989),i=r(67697),a=r(19152),o=r(65290),s=r(82474),c=r(76522);n({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,r,n=o(t),i=s.f,l=a(n),u={},h=0;l.length>h;)void 0!==(r=i(n,e=l[h++]))&&c(u,e,r);return u}})},79997:(t,e,r)=>{"use strict";var n=r(79989),i=r(3689),a=r(26062).f;n({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:a})},79434:(t,e,r)=>{"use strict";var n=r(79989),i=r(50146),a=r(3689),o=r(7518),s=r(90690);n({target:"Object",stat:!0,forced:!i||a((function(){o.f(1)}))},{getOwnPropertySymbols:function(t){var e=o.f;return e?e(s(t)):[]}})},88052:(t,e,r)=>{"use strict";var n=r(79989),i=r(3689),a=r(90690),o=r(61868),s=r(81748);n({target:"Object",stat:!0,forced:i((function(){o(1)})),sham:!s},{getPrototypeOf:function(t){return o(a(t))}})},44079:(t,e,r)=>{"use strict";var n=r(79989),i=r(76058),a=r(68844),o=r(10509),s=r(74684),c=r(18360),l=r(18734),u=i("Object","create"),h=a([].push);n({target:"Object",stat:!0},{groupBy:function(t,e){s(t),o(e);var r=u(null),n=0;return l(t,(function(t){var i=c(e(t,n++));i in r?h(r[i],t):r[i]=[t]})),r}})},14566:(t,e,r)=>{"use strict";r(79989)({target:"Object",stat:!0},{hasOwn:r(36812)})},36446:(t,e,r)=>{"use strict";var n=r(79989),i=r(27049);n({target:"Object",stat:!0,forced:Object.isExtensible!==i},{isExtensible:i})},35140:(t,e,r)=>{"use strict";var n=r(79989),i=r(3689),a=r(48999),o=r(6648),s=r(11655),c=Object.isFrozen;n({target:"Object",stat:!0,forced:s||i((function(){c(1)}))},{isFrozen:function(t){return!a(t)||!(!s||"ArrayBuffer"!==o(t))||!!c&&c(t)}})},4179:(t,e,r)=>{"use strict";var n=r(79989),i=r(3689),a=r(48999),o=r(6648),s=r(11655),c=Object.isSealed;n({target:"Object",stat:!0,forced:s||i((function(){c(1)}))},{isSealed:function(t){return!a(t)||!(!s||"ArrayBuffer"!==o(t))||!!c&&c(t)}})},76101:(t,e,r)=>{"use strict";r(79989)({target:"Object",stat:!0},{is:r(70953)})},69358:(t,e,r)=>{"use strict";var n=r(79989),i=r(90690),a=r(20300);n({target:"Object",stat:!0,forced:r(3689)((function(){a(1)}))},{keys:function(t){return a(i(t))}})},75450:(t,e,r)=>{"use strict";var n=r(79989),i=r(67697),a=r(90600),o=r(90690),s=r(18360),c=r(61868),l=r(82474).f;i&&n({target:"Object",proto:!0,forced:a},{__lookupGetter__:function(t){var e,r=o(this),n=s(t);do{if(e=l(r,n))return e.get}while(r=c(r))}})},54993:(t,e,r)=>{"use strict";var n=r(79989),i=r(67697),a=r(90600),o=r(90690),s=r(18360),c=r(61868),l=r(82474).f;i&&n({target:"Object",proto:!0,forced:a},{__lookupSetter__:function(t){var e,r=o(this),n=s(t);do{if(e=l(r,n))return e.set}while(r=c(r))}})},48115:(t,e,r)=>{"use strict";var n=r(79989),i=r(48999),a=r(45375).onFreeze,o=r(71594),s=r(3689),c=Object.preventExtensions;n({target:"Object",stat:!0,forced:s((function(){c(1)})),sham:!o},{preventExtensions:function(t){return c&&i(t)?c(a(t)):t}})},19330:(t,e,r)=>{"use strict";var n=r(67697),i=r(62148),a=r(48999),o=r(90690),s=r(74684),c=Object.getPrototypeOf,l=Object.setPrototypeOf,u=Object.prototype,h="__proto__";if(n&&c&&l&&!(h in u))try{i(u,h,{configurable:!0,get:function(){return c(o(this))},set:function(t){var e=s(this);(a(t)||null===t)&&a(e)&&l(e,t)}})}catch(t){}},30658:(t,e,r)=>{"use strict";var n=r(79989),i=r(48999),a=r(45375).onFreeze,o=r(71594),s=r(3689),c=Object.seal;n({target:"Object",stat:!0,forced:s((function(){c(1)})),sham:!o},{seal:function(t){return c&&i(t)?c(a(t)):t}})},5399:(t,e,r)=>{"use strict";r(79989)({target:"Object",stat:!0},{setPrototypeOf:r(49385)})},60228:(t,e,r)=>{"use strict";var n=r(23043),i=r(11880),a=r(65073);n||i(Object.prototype,"toString",a,{unsafe:!0})},86466:(t,e,r)=>{"use strict";var n=r(79989),i=r(49419).values;n({target:"Object",stat:!0},{values:function(t){return i(t)}})},80939:(t,e,r)=>{"use strict";var n=r(79989),i=r(14818);n({global:!0,forced:parseFloat!==i},{parseFloat:i})},32320:(t,e,r)=>{"use strict";var n=r(79989),i=r(67897);n({global:!0,forced:parseInt!==i},{parseInt:i})},41195:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(10509),o=r(48742),s=r(9302),c=r(18734);n({target:"Promise",stat:!0,forced:r(562)},{allSettled:function(t){var e=this,r=o.f(e),n=r.resolve,l=r.reject,u=s((function(){var r=a(e.resolve),o=[],s=0,l=1;c(t,(function(t){var a=s++,c=!1;l++,i(r,e,t).then((function(t){c||(c=!0,o[a]={status:"fulfilled",value:t},--l||n(o))}),(function(t){c||(c=!0,o[a]={status:"rejected",reason:t},--l||n(o))}))})),--l||n(o)}));return u.error&&l(u.value),r.promise}})},81692:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(10509),o=r(48742),s=r(9302),c=r(18734);n({target:"Promise",stat:!0,forced:r(562)},{all:function(t){var e=this,r=o.f(e),n=r.resolve,l=r.reject,u=s((function(){var r=a(e.resolve),o=[],s=0,u=1;c(t,(function(t){var a=s++,c=!1;u++,i(r,e,t).then((function(t){c||(c=!0,o[a]=t,--u||n(o))}),l)})),--u||n(o)}));return u.error&&l(u.value),r.promise}})},87609:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(10509),o=r(76058),s=r(48742),c=r(9302),l=r(18734),u=r(562),h="No one promise resolved";n({target:"Promise",stat:!0,forced:u},{any:function(t){var e=this,r=o("AggregateError"),n=s.f(e),u=n.resolve,f=n.reject,d=c((function(){var n=a(e.resolve),o=[],s=0,c=1,d=!1;l(t,(function(t){var a=s++,l=!1;c++,i(n,e,t).then((function(t){l||d||(d=!0,u(t))}),(function(t){l||d||(l=!0,o[a]=t,--c||f(new r(o,h)))}))})),--c||f(new r(o,h))}));return d.error&&f(d.value),n.promise}})},75089:(t,e,r)=>{"use strict";var n=r(79989),i=r(53931),a=r(87073).CONSTRUCTOR,o=r(17919),s=r(76058),c=r(69985),l=r(11880),u=o&&o.prototype;if(n({target:"Promise",proto:!0,forced:a,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&c(o)){var h=s("Promise").prototype.catch;u.catch!==h&&l(u,"catch",h,{unsafe:!0})}},56697:(t,e,r)=>{"use strict";var n,i,a,o=r(79989),s=r(53931),c=r(50806),l=r(19037),u=r(22615),h=r(11880),f=r(49385),d=r(55997),p=r(14241),m=r(10509),g=r(69985),A=r(48999),v=r(767),y=r(76373),b=r(99886).set,x=r(80231),w=r(20920),_=r(9302),E=r(34410),M=r(618),S=r(17919),C=r(87073),T=r(48742),I="Promise",R=C.CONSTRUCTOR,B=C.REJECTION_EVENT,k=C.SUBCLASSING,L=M.getterFor(I),P=M.set,D=S&&S.prototype,U=S,O=D,F=l.TypeError,N=l.document,z=l.process,G=T.f,Z=G,V=!!(N&&N.createEvent&&l.dispatchEvent),Q="unhandledrejection",j=function(t){var e;return!(!A(t)||!g(e=t.then))&&e},W=function(t,e){var r,n,i,a=e.value,o=1===e.state,s=o?t.ok:t.fail,c=t.resolve,l=t.reject,h=t.domain;try{s?(o||(2===e.rejection&&J(e),e.rejection=1),!0===s?r=a:(h&&h.enter(),r=s(a),h&&(h.exit(),i=!0)),r===t.promise?l(new F("Promise-chain cycle")):(n=j(r))?u(n,r,c,l):c(r)):l(a)}catch(t){h&&!i&&h.exit(),l(t)}},H=function(t,e){t.notified||(t.notified=!0,x((function(){for(var r,n=t.reactions;r=n.get();)W(r,t);t.notified=!1,e&&!t.rejection&&q(t)})))},X=function(t,e,r){var n,i;V?((n=N.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),l.dispatchEvent(n)):n={promise:e,reason:r},!B&&(i=l["on"+t])?i(n):t===Q&&w("Unhandled promise rejection",r)},q=function(t){u(b,l,(function(){var e,r=t.facade,n=t.value;if(Y(t)&&(e=_((function(){c?z.emit("unhandledRejection",n,r):X(Q,r,n)})),t.rejection=c||Y(t)?2:1,e.error))throw e.value}))},Y=function(t){return 1!==t.rejection&&!t.parent},J=function(t){u(b,l,(function(){var e=t.facade;c?z.emit("rejectionHandled",e):X("rejectionhandled",e,t.value)}))},K=function(t,e,r){return function(n){t(e,n,r)}},$=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,H(t,!0))},tt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new F("Promise can't be resolved itself");var n=j(e);n?x((function(){var r={done:!1};try{u(n,e,K(tt,r,t),K($,r,t))}catch(e){$(r,e,t)}})):(t.value=e,t.state=1,H(t,!1))}catch(e){$({done:!1},e,t)}}};if(R&&(O=(U=function(t){v(this,O),m(t),u(n,this);var e=L(this);try{t(K(tt,e),K($,e))}catch(t){$(e,t)}}).prototype,(n=function(t){P(this,{type:I,done:!1,notified:!1,parent:!1,reactions:new E,rejection:!1,state:0,value:void 0})}).prototype=h(O,"then",(function(t,e){var r=L(this),n=G(y(this,U));return r.parent=!0,n.ok=!g(t)||t,n.fail=g(e)&&e,n.domain=c?z.domain:void 0,0===r.state?r.reactions.add(n):x((function(){W(n,r)})),n.promise})),i=function(){var t=new n,e=L(t);this.promise=t,this.resolve=K(tt,e),this.reject=K($,e)},T.f=G=function(t){return t===U||void 0===t?new i(t):Z(t)},!s&&g(S)&&D!==Object.prototype)){a=D.then,k||h(D,"then",(function(t,e){var r=this;return new U((function(t,e){u(a,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete D.constructor}catch(t){}f&&f(D,O)}o({global:!0,constructor:!0,wrap:!0,forced:R},{Promise:U}),d(U,I,!1,!0),p(I)},36409:(t,e,r)=>{"use strict";var n=r(79989),i=r(53931),a=r(17919),o=r(3689),s=r(76058),c=r(69985),l=r(76373),u=r(72945),h=r(11880),f=a&&a.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!a&&o((function(){f.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=l(this,s("Promise")),r=c(t);return this.then(r?function(r){return u(e,t()).then((function(){return r}))}:t,r?function(r){return u(e,t()).then((function(){throw r}))}:t)}}),!i&&c(a)){var d=s("Promise").prototype.finally;f.finally!==d&&h(f,"finally",d,{unsafe:!0})}},73964:(t,e,r)=>{"use strict";r(56697),r(81692),r(75089),r(58829),r(42092),r(57905)},58829:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(10509),o=r(48742),s=r(9302),c=r(18734);n({target:"Promise",stat:!0,forced:r(562)},{race:function(t){var e=this,r=o.f(e),n=r.reject,l=s((function(){var o=a(e.resolve);c(t,(function(t){i(o,e,t).then(r.resolve,n)}))}));return l.error&&n(l.value),r.promise}})},42092:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(48742);n({target:"Promise",stat:!0,forced:r(87073).CONSTRUCTOR},{reject:function(t){var e=a.f(this);return i(e.reject,void 0,t),e.promise}})},57905:(t,e,r)=>{"use strict";var n=r(79989),i=r(76058),a=r(53931),o=r(17919),s=r(87073).CONSTRUCTOR,c=r(72945),l=i("Promise"),u=a&&!s;n({target:"Promise",stat:!0,forced:a||s},{resolve:function(t){return c(u&&this===l?o:this,t)}})},13505:(t,e,r)=>{"use strict";var n=r(79989),i=r(48742);n({target:"Promise",stat:!0},{withResolvers:function(){var t=i.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}})},54333:(t,e,r)=>{"use strict";var n=r(79989),i=r(61735),a=r(10509),o=r(85027);n({target:"Reflect",stat:!0,forced:!r(3689)((function(){Reflect.apply((function(){}))}))},{apply:function(t,e,r){return i(a(t),e,o(r))}})},30050:(t,e,r)=>{"use strict";var n=r(79989),i=r(76058),a=r(61735),o=r(86761),s=r(52655),c=r(85027),l=r(48999),u=r(25391),h=r(3689),f=i("Reflect","construct"),d=Object.prototype,p=[].push,m=h((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),g=!h((function(){f((function(){}))})),A=m||g;n({target:"Reflect",stat:!0,forced:A,sham:A},{construct:function(t,e){s(t),c(e);var r=arguments.length<3?t:s(arguments[2]);if(g&&!m)return f(t,e,r);if(t===r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return a(p,n,e),new(a(o,t,n))}var i=r.prototype,h=u(l(i)?i:d),A=a(t,h,e);return l(A)?A:h}})},99871:(t,e,r)=>{"use strict";var n=r(79989),i=r(67697),a=r(85027),o=r(18360),s=r(72560);n({target:"Reflect",stat:!0,forced:r(3689)((function(){Reflect.defineProperty(s.f({},1,{value:1}),1,{value:2})})),sham:!i},{defineProperty:function(t,e,r){a(t);var n=o(e);a(r);try{return s.f(t,n,r),!0}catch(t){return!1}}})},1049:(t,e,r)=>{"use strict";var n=r(79989),i=r(85027),a=r(82474).f;n({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var r=a(i(t),e);return!(r&&!r.configurable)&&delete t[e]}})},50149:(t,e,r)=>{"use strict";var n=r(79989),i=r(67697),a=r(85027),o=r(82474);n({target:"Reflect",stat:!0,sham:!i},{getOwnPropertyDescriptor:function(t,e){return o.f(a(t),e)}})},43792:(t,e,r)=>{"use strict";var n=r(79989),i=r(85027),a=r(61868);n({target:"Reflect",stat:!0,sham:!r(81748)},{getPrototypeOf:function(t){return a(i(t))}})},32349:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(48999),o=r(85027),s=r(76251),c=r(82474),l=r(61868);n({target:"Reflect",stat:!0},{get:function t(e,r){var n,u,h=arguments.length<3?e:arguments[2];return o(e)===h?e[r]:(n=c.f(e,r))?s(n)?n.value:void 0===n.get?void 0:i(n.get,h):a(u=l(e))?t(u,r,h):void 0}})},69707:(t,e,r)=>{"use strict";r(79989)({target:"Reflect",stat:!0},{has:function(t,e){return e in t}})},63545:(t,e,r)=>{"use strict";var n=r(79989),i=r(85027),a=r(27049);n({target:"Reflect",stat:!0},{isExtensible:function(t){return i(t),a(t)}})},62087:(t,e,r)=>{"use strict";r(79989)({target:"Reflect",stat:!0},{ownKeys:r(19152)})},51505:(t,e,r)=>{"use strict";var n=r(79989),i=r(76058),a=r(85027);n({target:"Reflect",stat:!0,sham:!r(71594)},{preventExtensions:function(t){a(t);try{var e=i("Object","preventExtensions");return e&&e(t),!0}catch(t){return!1}}})},22373:(t,e,r)=>{"use strict";var n=r(79989),i=r(85027),a=r(23550),o=r(49385);o&&n({target:"Reflect",stat:!0},{setPrototypeOf:function(t,e){i(t),a(e);try{return o(t,e),!0}catch(t){return!1}}})},45247:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(85027),o=r(48999),s=r(76251),c=r(3689),l=r(72560),u=r(82474),h=r(61868),f=r(75684);n({target:"Reflect",stat:!0,forced:c((function(){var t=function(){},e=l.f(new t,"a",{configurable:!0});return!1!==Reflect.set(t.prototype,"a",1,e)}))},{set:function t(e,r,n){var c,d,p,m=arguments.length<4?e:arguments[3],g=u.f(a(e),r);if(!g){if(o(d=h(e)))return t(d,r,n,m);g=f(0)}if(s(g)){if(!1===g.writable||!o(m))return!1;if(c=u.f(m,r)){if(c.get||c.set||!1===c.writable)return!1;c.value=n,l.f(m,r,c)}else l.f(m,r,f(0,n))}else{if(void 0===(p=g.set))return!1;i(p,m,n)}return!0}})},76034:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(55997);n({global:!0},{Reflect:{}}),a(i.Reflect,"Reflect",!0)},52003:(t,e,r)=>{"use strict";var n=r(67697),i=r(19037),a=r(68844),o=r(35266),s=r(33457),c=r(75773),l=r(25391),u=r(72741).f,h=r(23622),f=r(91245),d=r(34327),p=r(63477),m=r(87901),g=r(38055),A=r(11880),v=r(3689),y=r(36812),b=r(618).enforce,x=r(14241),w=r(44201),_=r(62100),E=r(26738),M=w("match"),S=i.RegExp,C=S.prototype,T=i.SyntaxError,I=a(C.exec),R=a("".charAt),B=a("".replace),k=a("".indexOf),L=a("".slice),P=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,D=/a/g,U=/a/g,O=new S(D)!==D,F=m.MISSED_STICKY,N=m.UNSUPPORTED_Y;if(o("RegExp",n&&(!O||F||_||E||v((function(){return U[M]=!1,S(D)!==D||S(U)===U||"/a/i"!==String(S(D,"i"))}))))){for(var z=function(t,e){var r,n,i,a,o,u,m=h(C,this),g=f(t),A=void 0===e,v=[],x=t;if(!m&&g&&A&&t.constructor===z)return t;if((g||h(C,t))&&(t=t.source,A&&(e=p(x))),t=void 0===t?"":d(t),e=void 0===e?"":d(e),x=t,_&&"dotAll"in D&&(n=!!e&&k(e,"s")>-1)&&(e=B(e,/s/g,"")),r=e,F&&"sticky"in D&&(i=!!e&&k(e,"y")>-1)&&N&&(e=B(e,/y/g,"")),E&&(a=function(t){for(var e,r=t.length,n=0,i="",a=[],o=l(null),s=!1,c=!1,u=0,h="";n<=r;n++){if("\\"===(e=R(t,n)))e+=R(t,++n);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:I(P,L(t,n+1))&&(n+=2,c=!0),i+=e,u++;continue;case">"===e&&c:if(""===h||y(o,h))throw new T("Invalid capture group name");o[h]=!0,a[a.length]=[h,u],c=!1,h="";continue}c?h+=e:i+=e}return[i,a]}(t),t=a[0],v=a[1]),o=s(S(t,e),m?this:C,z),(n||i||v.length)&&(u=b(o),n&&(u.dotAll=!0,u.raw=z(function(t){for(var e,r=t.length,n=0,i="",a=!1;n<=r;n++)"\\"!==(e=R(t,n))?a||"."!==e?("["===e?a=!0:"]"===e&&(a=!1),i+=e):i+="[\\s\\S]":i+=e+R(t,++n);return i}(t),r)),i&&(u.sticky=!0),v.length&&(u.groups=v)),t!==x)try{c(o,"source",""===x?"(?:)":x)}catch(t){}return o},G=u(S),Z=0;G.length>Z;)g(z,S,G[Z++]);C.constructor=z,z.prototype=C,A(i,"RegExp",z,{constructor:!0})}x("RegExp")},68518:(t,e,r)=>{"use strict";var n=r(67697),i=r(62100),a=r(6648),o=r(62148),s=r(618).get,c=RegExp.prototype,l=TypeError;n&&i&&o(c,"dotAll",{configurable:!0,get:function(){if(this!==c){if("RegExp"===a(this))return!!s(this).dotAll;throw new l("Incompatible receiver, RegExp required")}}})},64043:(t,e,r)=>{"use strict";var n=r(79989),i=r(56308);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},25847:(t,e,r)=>{"use strict";var n=r(19037),i=r(67697),a=r(62148),o=r(69633),s=r(3689),c=n.RegExp,l=c.prototype;i&&s((function(){var t=!0;try{c(".","d")}catch(e){t=!1}var e={},r="",n=t?"dgimsy":"gimsy",i=function(t,n){Object.defineProperty(e,t,{get:function(){return r+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var o in t&&(a.hasIndices="d"),a)i(o,a[o]);return Object.getOwnPropertyDescriptor(l,"flags").get.call(e)!==n||r!==n}))&&a(l,"flags",{configurable:!0,get:o})},13440:(t,e,r)=>{"use strict";var n=r(67697),i=r(87901).MISSED_STICKY,a=r(6648),o=r(62148),s=r(618).get,c=RegExp.prototype,l=TypeError;n&&i&&o(c,"sticky",{configurable:!0,get:function(){if(this!==c){if("RegExp"===a(this))return!!s(this).sticky;throw new l("Incompatible receiver, RegExp required")}}})},7409:(t,e,r)=>{"use strict";r(64043);var n,i,a=r(79989),o=r(22615),s=r(69985),c=r(85027),l=r(34327),u=(n=!1,(i=/[ac]/).exec=function(){return n=!0,/./.exec.apply(this,arguments)},!0===i.test("abc")&&n),h=/./.test;a({target:"RegExp",proto:!0,forced:!u},{test:function(t){var e=c(this),r=l(t),n=e.exec;if(!s(n))return o(h,e,r);var i=o(n,e,r);return null!==i&&(c(i),!0)}})},12826:(t,e,r)=>{"use strict";var n=r(41236).PROPER,i=r(11880),a=r(85027),o=r(34327),s=r(3689),c=r(63477),l="toString",u=RegExp.prototype[l],h=s((function(){return"/a/b"!==u.call({source:"a",flags:"b"})})),f=n&&u.name!==l;(h||f)&&i(RegExp.prototype,l,(function(){var t=a(this);return"/"+o(t.source)+"/"+o(c(t))}),{unsafe:!0})},17985:(t,e,r)=>{"use strict";r(20319)("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(70800))},19649:(t,e,r)=>{"use strict";r(17985)},90343:(t,e,r)=>{"use strict";var n=r(79989),i=r(71568);n({target:"String",proto:!0,forced:r(74580)("anchor")},{anchor:function(t){return i(this,"a","name",t)}})},7961:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(74684),o=r(68700),s=r(34327),c=r(3689),l=i("".charAt);n({target:"String",proto:!0,forced:c((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(t){var e=s(a(this)),r=e.length,n=o(t),i=n>=0?n:r+n;return i<0||i>=r?void 0:l(e,i)}})},21444:(t,e,r)=>{"use strict";var n=r(79989),i=r(71568);n({target:"String",proto:!0,forced:r(74580)("big")},{big:function(){return i(this,"big","","")}})},25906:(t,e,r)=>{"use strict";var n=r(79989),i=r(71568);n({target:"String",proto:!0,forced:r(74580)("blink")},{blink:function(){return i(this,"blink","","")}})},95682:(t,e,r)=>{"use strict";var n=r(79989),i=r(71568);n({target:"String",proto:!0,forced:r(74580)("bold")},{bold:function(){return i(this,"b","","")}})},86239:(t,e,r)=>{"use strict";var n=r(79989),i=r(10730).codeAt;n({target:"String",proto:!0},{codePointAt:function(t){return i(this,t)}})},2918:(t,e,r)=>{"use strict";var n,i=r(79989),a=r(46576),o=r(82474).f,s=r(43126),c=r(34327),l=r(42124),u=r(74684),h=r(27413),f=r(53931),d=a("".endsWith),p=a("".slice),m=Math.min,g=h("endsWith");i({target:"String",proto:!0,forced:!(!f&&!g&&(n=o(String.prototype,"endsWith"),n&&!n.writable)||g)},{endsWith:function(t){var e=c(u(this));l(t);var r=arguments.length>1?arguments[1]:void 0,n=e.length,i=void 0===r?n:m(s(r),n),a=c(t);return d?d(e,a,i):p(e,i-a.length,i)===a}})},98041:(t,e,r)=>{"use strict";var n=r(79989),i=r(71568);n({target:"String",proto:!0,forced:r(74580)("fixed")},{fixed:function(){return i(this,"tt","","")}})},6364:(t,e,r)=>{"use strict";var n=r(79989),i=r(71568);n({target:"String",proto:!0,forced:r(74580)("fontcolor")},{fontcolor:function(t){return i(this,"font","color",t)}})},82954:(t,e,r)=>{"use strict";var n=r(79989),i=r(71568);n({target:"String",proto:!0,forced:r(74580)("fontsize")},{fontsize:function(t){return i(this,"font","size",t)}})},20283:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(27578),o=RangeError,s=String.fromCharCode,c=String.fromCodePoint,l=i([].join);n({target:"String",stat:!0,arity:1,forced:!!c&&1!==c.length},{fromCodePoint:function(t){for(var e,r=[],n=arguments.length,i=0;n>i;){if(e=+arguments[i++],a(e,1114111)!==e)throw new o(e+" is not a valid code point");r[i]=e<65536?s(e):s(55296+((e-=65536)>>10),e%1024+56320)}return l(r,"")}})},43843:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(42124),o=r(74684),s=r(34327),c=r(27413),l=i("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~l(s(o(this)),s(a(t)),arguments.length>1?arguments[1]:void 0)}})},12281:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(74684),o=r(34327),s=i("".charCodeAt);n({target:"String",proto:!0},{isWellFormed:function(){for(var t=o(a(this)),e=t.length,r=0;r=56320||++r>=e||56320!=(64512&s(t,r))))return!1}return!0}})},19162:(t,e,r)=>{"use strict";var n=r(79989),i=r(71568);n({target:"String",proto:!0,forced:r(74580)("italics")},{italics:function(){return i(this,"i","","")}})},21694:(t,e,r)=>{"use strict";var n=r(10730).charAt,i=r(34327),a=r(618),o=r(91934),s=r(27807),c="String Iterator",l=a.set,u=a.getterFor(c);o(String,"String",(function(t){l(this,{type:c,string:i(t),index:0})}),(function(){var t,e=u(this),r=e.string,i=e.index;return i>=r.length?s(void 0,!0):(t=n(r,i),e.index+=t.length,s(t,!1))}))},37960:(t,e,r)=>{"use strict";var n=r(79989),i=r(71568);n({target:"String",proto:!0,forced:r(74580)("link")},{link:function(t){return i(this,"a","href",t)}})},79866:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(46576),o=r(30974),s=r(27807),c=r(74684),l=r(43126),u=r(34327),h=r(85027),f=r(981),d=r(6648),p=r(91245),m=r(63477),g=r(54849),A=r(11880),v=r(3689),y=r(44201),b=r(76373),x=r(71514),w=r(66100),_=r(618),E=r(53931),M=y("matchAll"),S="RegExp String",C=S+" Iterator",T=_.set,I=_.getterFor(C),R=RegExp.prototype,B=TypeError,k=a("".indexOf),L=a("".matchAll),P=!!L&&!v((function(){L("a",/./)})),D=o((function(t,e,r,n){T(this,{type:C,regexp:t,string:e,global:r,unicode:n,done:!1})}),S,(function(){var t=I(this);if(t.done)return s(void 0,!0);var e=t.regexp,r=t.string,n=w(e,r);return null===n?(t.done=!0,s(void 0,!0)):t.global?(""===u(n[0])&&(e.lastIndex=x(r,l(e.lastIndex),t.unicode)),s(n,!1)):(t.done=!0,s(n,!1))})),U=function(t){var e,r,n,i=h(this),a=u(t),o=b(i,RegExp),s=u(m(i));return e=new o(o===RegExp?i.source:i,s),r=!!~k(s,"g"),n=!!~k(s,"u"),e.lastIndex=l(i.lastIndex),new D(e,a,r,n)};n({target:"String",proto:!0,forced:P},{matchAll:function(t){var e,r,n,a,o=c(this);if(f(t)){if(P)return L(o,t)}else{if(p(t)&&(e=u(c(m(t))),!~k(e,"g")))throw new B("`.matchAll` does not allow non-global regexes");if(P)return L(o,t);if(void 0===(n=g(t,M))&&E&&"RegExp"===d(t)&&(n=U),n)return i(n,t,o)}return r=u(o),a=new RegExp(t,"g"),E?i(U,a,r):a[M](r)}}),E||M in R||A(R,M,U)},22462:(t,e,r)=>{"use strict";var n=r(22615),i=r(65773),a=r(85027),o=r(981),s=r(43126),c=r(34327),l=r(74684),u=r(54849),h=r(71514),f=r(66100);i("match",(function(t,e,r){return[function(e){var r=l(this),i=o(e)?void 0:u(e,t);return i?n(i,e,r):new RegExp(e)[t](c(r))},function(t){var n=a(this),i=c(t),o=r(e,n,i);if(o.done)return o.value;if(!n.global)return f(n,i);var l=n.unicode;n.lastIndex=0;for(var u,d=[],p=0;null!==(u=f(n,i));){var m=c(u[0]);d[p]=m,""===m&&(n.lastIndex=h(i,s(n.lastIndex),l)),p++}return 0===p?null:d}]}))},72940:(t,e,r)=>{"use strict";var n=r(79989),i=r(77254).end;n({target:"String",proto:!0,forced:r(35947)},{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},8472:(t,e,r)=>{"use strict";var n=r(79989),i=r(77254).start;n({target:"String",proto:!0,forced:r(35947)},{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},92404:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(65290),o=r(90690),s=r(34327),c=r(6310),l=i([].push),u=i([].join);n({target:"String",stat:!0},{raw:function(t){var e=a(o(t).raw),r=c(e);if(!r)return"";for(var n=arguments.length,i=[],h=0;;){if(l(i,s(e[h++])),h===r)return u(i,"");h{"use strict";r(79989)({target:"String",proto:!0},{repeat:r(90534)})},56532:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(68844),o=r(74684),s=r(69985),c=r(981),l=r(91245),u=r(34327),h=r(54849),f=r(63477),d=r(27017),p=r(44201),m=r(53931),g=p("replace"),A=TypeError,v=a("".indexOf),y=a("".replace),b=a("".slice),x=Math.max,w=function(t,e,r){return r>t.length?-1:""===e?r:v(t,e,r)};n({target:"String",proto:!0},{replaceAll:function(t,e){var r,n,a,p,_,E,M,S,C,T=o(this),I=0,R=0,B="";if(!c(t)){if((r=l(t))&&(n=u(o(f(t))),!~v(n,"g")))throw new A("`.replaceAll` does not allow non-global regexes");if(a=h(t,g))return i(a,t,T,e);if(m&&r)return y(u(T),t,e)}for(p=u(T),_=u(t),(E=s(e))||(e=u(e)),M=_.length,S=x(1,M),I=w(p,_,0);-1!==I;)C=E?u(e(_,I,p)):d(_,p,I,[],void 0,e),B+=b(p,R,I)+C,R=I+M,I=w(p,_,I+S);return R{"use strict";var n=r(61735),i=r(22615),a=r(68844),o=r(65773),s=r(3689),c=r(85027),l=r(69985),u=r(981),h=r(68700),f=r(43126),d=r(34327),p=r(74684),m=r(71514),g=r(54849),A=r(27017),v=r(66100),y=r(44201)("replace"),b=Math.max,x=Math.min,w=a([].concat),_=a([].push),E=a("".indexOf),M=a("".slice),S="$0"==="a".replace(/./,"$0"),C=!!/./[y]&&""===/./[y]("a","$0");o("replace",(function(t,e,r){var a=C?"$":"$0";return[function(t,r){var n=p(this),a=u(t)?void 0:g(t,y);return a?i(a,t,n,r):i(e,d(n),t,r)},function(t,i){var o=c(this),s=d(t);if("string"==typeof i&&-1===E(i,a)&&-1===E(i,"$<")){var u=r(e,o,s,i);if(u.done)return u.value}var p=l(i);p||(i=d(i));var g,y=o.global;y&&(g=o.unicode,o.lastIndex=0);for(var S,C=[];null!==(S=v(o,s))&&(_(C,S),y);)""===d(S[0])&&(o.lastIndex=m(s,f(o.lastIndex),g));for(var T,I="",R=0,B=0;B=R&&(I+=M(s,R,P)+k,R=P+L.length)}return I+M(s,R)}]}),!!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}))||!S||C)},61514:(t,e,r)=>{"use strict";var n=r(22615),i=r(65773),a=r(85027),o=r(981),s=r(74684),c=r(70953),l=r(34327),u=r(54849),h=r(66100);i("search",(function(t,e,r){return[function(e){var r=s(this),i=o(e)?void 0:u(e,t);return i?n(i,e,r):new RegExp(e)[t](l(r))},function(t){var n=a(this),i=l(t),o=r(e,n,i);if(o.done)return o.value;var s=n.lastIndex;c(s,0)||(n.lastIndex=0);var u=h(n,i);return c(n.lastIndex,s)||(n.lastIndex=s),null===u?-1:u.index}]}))},470:(t,e,r)=>{"use strict";var n=r(79989),i=r(71568);n({target:"String",proto:!0,forced:r(74580)("small")},{small:function(){return i(this,"small","","")}})},9873:(t,e,r)=>{"use strict";var n=r(61735),i=r(22615),a=r(68844),o=r(65773),s=r(85027),c=r(981),l=r(91245),u=r(74684),h=r(76373),f=r(71514),d=r(43126),p=r(34327),m=r(54849),g=r(9015),A=r(66100),v=r(56308),y=r(87901),b=r(3689),x=y.UNSUPPORTED_Y,w=4294967295,_=Math.min,E=[].push,M=a(/./.exec),S=a(E),C=a("".slice);o("split",(function(t,e,r){var a;return a="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var a=p(u(this)),o=void 0===r?w:r>>>0;if(0===o)return[];if(void 0===t)return[a];if(!l(t))return i(e,a,t,o);for(var s,c,h,f=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),m=0,A=new RegExp(t.source,d+"g");(s=i(v,A,a))&&!((c=A.lastIndex)>m&&(S(f,C(a,m,s.index)),s.length>1&&s.index=o));)A.lastIndex===s.index&&A.lastIndex++;return m===a.length?!h&&M(A,"")||S(f,""):S(f,C(a,m)),f.length>o?g(f,0,o):f}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:i(e,this,t,r)}:e,[function(e,r){var n=u(this),o=c(e)?void 0:m(e,t);return o?i(o,e,n,r):i(a,p(n),e,r)},function(t,n){var i=s(this),o=p(t),c=r(a,i,o,n,a!==e);if(c.done)return c.value;var l=h(i,RegExp),u=i.unicode,m=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(x?"g":"y"),g=new l(x?"^(?:"+i.source+")":i,m),v=void 0===n?w:n>>>0;if(0===v)return[];if(0===o.length)return null===A(g,o)?[o]:[];for(var y=0,b=0,E=[];b{"use strict";var n,i=r(79989),a=r(46576),o=r(82474).f,s=r(43126),c=r(34327),l=r(42124),u=r(74684),h=r(27413),f=r(53931),d=a("".startsWith),p=a("".slice),m=Math.min,g=h("startsWith");i({target:"String",proto:!0,forced:!(!f&&!g&&(n=o(String.prototype,"startsWith"),n&&!n.writable)||g)},{startsWith:function(t){var e=c(u(this));l(t);var r=s(m(arguments.length>1?arguments[1]:void 0,e.length)),n=c(t);return d?d(e,n,r):p(e,r,r+n.length)===n}})},67446:(t,e,r)=>{"use strict";var n=r(79989),i=r(71568);n({target:"String",proto:!0,forced:r(74580)("strike")},{strike:function(){return i(this,"strike","","")}})},47729:(t,e,r)=>{"use strict";var n=r(79989),i=r(71568);n({target:"String",proto:!0,forced:r(74580)("sub")},{sub:function(){return i(this,"sub","","")}})},20372:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(74684),o=r(68700),s=r(34327),c=i("".slice),l=Math.max,u=Math.min;n({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(t,e){var r,n,i=s(a(this)),h=i.length,f=o(t);return f===1/0&&(f=0),f<0&&(f=l(h+f,0)),(r=void 0===e?h:o(e))<=0||r===1/0||f>=(n=u(f+r,h))?"":c(i,f,n)}})},2e3:(t,e,r)=>{"use strict";var n=r(79989),i=r(71568);n({target:"String",proto:!0,forced:r(74580)("sup")},{sup:function(){return i(this,"sup","","")}})},35237:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(68844),o=r(74684),s=r(34327),c=r(3689),l=Array,u=a("".charAt),h=a("".charCodeAt),f=a([].join),d="".toWellFormed,p=d&&c((function(){return"1"!==i(d,1)}));n({target:"String",proto:!0,forced:p},{toWellFormed:function(){var t=s(o(this));if(p)return i(d,t);for(var e=t.length,r=l(e),n=0;n=56320||n+1>=e||56320!=(64512&h(t,n+1))?r[n]="�":(r[n]=u(t,n),r[++n]=u(t,n))}return f(r,"")}})},16386:(t,e,r)=>{"use strict";r(61313);var n=r(79989),i=r(79558);n({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==i},{trimEnd:i})},10974:(t,e,r)=>{"use strict";var n=r(79989),i=r(72291);n({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==i},{trimLeft:i})},61313:(t,e,r)=>{"use strict";var n=r(79989),i=r(79558);n({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==i},{trimRight:i})},3255:(t,e,r)=>{"use strict";r(10974);var n=r(79989),i=r(72291);n({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==i},{trimStart:i})},28436:(t,e,r)=>{"use strict";var n=r(79989),i=r(61435).trim;n({target:"String",proto:!0,forced:r(75984)("trim")},{trim:function(){return i(this)}})},58373:(t,e,r)=>{"use strict";r(35405)("asyncIterator")},37855:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(22615),o=r(68844),s=r(53931),c=r(67697),l=r(50146),u=r(3689),h=r(36812),f=r(23622),d=r(85027),p=r(65290),m=r(18360),g=r(34327),A=r(75684),v=r(25391),y=r(20300),b=r(72741),x=r(26062),w=r(7518),_=r(82474),E=r(72560),M=r(98920),S=r(49556),C=r(11880),T=r(62148),I=r(83430),R=r(2713),B=r(57248),k=r(14630),L=r(44201),P=r(96145),D=r(35405),U=r(13032),O=r(55997),F=r(618),N=r(2960).forEach,z=R("hidden"),G="Symbol",Z="prototype",V=F.set,Q=F.getterFor(G),j=Object[Z],W=i.Symbol,H=W&&W[Z],X=i.RangeError,q=i.TypeError,Y=i.QObject,J=_.f,K=E.f,$=x.f,tt=S.f,et=o([].push),rt=I("symbols"),nt=I("op-symbols"),it=I("wks"),at=!Y||!Y[Z]||!Y[Z].findChild,ot=function(t,e,r){var n=J(j,e);n&&delete j[e],K(t,e,r),n&&t!==j&&K(j,e,n)},st=c&&u((function(){return 7!==v(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?ot:K,ct=function(t,e){var r=rt[t]=v(H);return V(r,{type:G,tag:t,description:e}),c||(r.description=e),r},lt=function(t,e,r){t===j&<(nt,e,r),d(t);var n=m(e);return d(r),h(rt,n)?(r.enumerable?(h(t,z)&&t[z][n]&&(t[z][n]=!1),r=v(r,{enumerable:A(0,!1)})):(h(t,z)||K(t,z,A(1,{})),t[z][n]=!0),st(t,n,r)):K(t,n,r)},ut=function(t,e){d(t);var r=p(e),n=y(r).concat(pt(r));return N(n,(function(e){c&&!a(ht,r,e)||lt(t,e,r[e])})),t},ht=function(t){var e=m(t),r=a(tt,this,e);return!(this===j&&h(rt,e)&&!h(nt,e))&&(!(r||!h(this,e)||!h(rt,e)||h(this,z)&&this[z][e])||r)},ft=function(t,e){var r=p(t),n=m(e);if(r!==j||!h(rt,n)||h(nt,n)){var i=J(r,n);return!i||!h(rt,n)||h(r,z)&&r[z][n]||(i.enumerable=!0),i}},dt=function(t){var e=$(p(t)),r=[];return N(e,(function(t){h(rt,t)||h(B,t)||et(r,t)})),r},pt=function(t){var e=t===j,r=$(e?nt:p(t)),n=[];return N(r,(function(t){!h(rt,t)||e&&!h(j,t)||et(n,rt[t])})),n};l||(C(H=(W=function(){if(f(H,this))throw new q("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,e=k(t),r=function(t){var n=void 0===this?i:this;n===j&&a(r,nt,t),h(n,z)&&h(n[z],e)&&(n[z][e]=!1);var o=A(1,t);try{st(n,e,o)}catch(t){if(!(t instanceof X))throw t;ot(n,e,o)}};return c&&at&&st(j,e,{configurable:!0,set:r}),ct(e,t)})[Z],"toString",(function(){return Q(this).tag})),C(W,"withoutSetter",(function(t){return ct(k(t),t)})),S.f=ht,E.f=lt,M.f=ut,_.f=ft,b.f=x.f=dt,w.f=pt,P.f=function(t){return ct(L(t),t)},c&&(T(H,"description",{configurable:!0,get:function(){return Q(this).description}}),s||C(j,"propertyIsEnumerable",ht,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!l,sham:!l},{Symbol:W}),N(y(it),(function(t){D(t)})),n({target:G,stat:!0,forced:!l},{useSetter:function(){at=!0},useSimple:function(){at=!1}}),n({target:"Object",stat:!0,forced:!l,sham:!c},{create:function(t,e){return void 0===e?v(t):ut(v(t),e)},defineProperty:lt,defineProperties:ut,getOwnPropertyDescriptor:ft}),n({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:dt}),U(),O(W,G),B[z]=!0},86544:(t,e,r)=>{"use strict";var n=r(79989),i=r(67697),a=r(19037),o=r(68844),s=r(36812),c=r(69985),l=r(23622),u=r(34327),h=r(62148),f=r(8758),d=a.Symbol,p=d&&d.prototype;if(i&&c(d)&&(!("description"in p)||void 0!==d().description)){var m={},g=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:u(arguments[0]),e=l(p,this)?new d(t):void 0===t?d():d(t);return""===t&&(m[e]=!0),e};f(g,d),g.prototype=p,p.constructor=g;var A="Symbol(description detection)"===String(d("description detection")),v=o(p.valueOf),y=o(p.toString),b=/^Symbol\((.*)\)[^)]+$/,x=o("".replace),w=o("".slice);h(p,"description",{configurable:!0,get:function(){var t=v(this);if(s(m,t))return"";var e=y(t),r=A?w(e,7,-1):x(e,b,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:g})}},43975:(t,e,r)=>{"use strict";var n=r(79989),i=r(76058),a=r(36812),o=r(34327),s=r(83430),c=r(46549),l=s("string-to-symbol-registry"),u=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{for:function(t){var e=o(t);if(a(l,e))return l[e];var r=i("Symbol")(e);return l[e]=r,u[r]=e,r}})},96157:(t,e,r)=>{"use strict";r(35405)("hasInstance")},82529:(t,e,r)=>{"use strict";r(35405)("isConcatSpreadable")},84254:(t,e,r)=>{"use strict";r(35405)("iterator")},59749:(t,e,r)=>{"use strict";r(37855),r(43975),r(81445),r(48324),r(79434)},81445:(t,e,r)=>{"use strict";var n=r(79989),i=r(36812),a=r(30734),o=r(23691),s=r(83430),c=r(46549),l=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{keyFor:function(t){if(!a(t))throw new TypeError(o(t)+" is not a symbol");if(i(l,t))return l[t]}})},93531:(t,e,r)=>{"use strict";r(35405)("matchAll")},64155:(t,e,r)=>{"use strict";r(35405)("match")},95906:(t,e,r)=>{"use strict";r(35405)("replace")},50549:(t,e,r)=>{"use strict";r(35405)("search")},96285:(t,e,r)=>{"use strict";r(35405)("species")},18200:(t,e,r)=>{"use strict";r(35405)("split")},69373:(t,e,r)=>{"use strict";var n=r(35405),i=r(13032);n("toPrimitive"),i()},66793:(t,e,r)=>{"use strict";var n=r(76058),i=r(35405),a=r(55997);i("toStringTag"),a(n("Symbol"),"Symbol")},44578:(t,e,r)=>{"use strict";r(35405)("unscopables")},95194:(t,e,r)=>{"use strict";var n=r(54872),i=r(6310),a=r(68700),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("at",(function(t){var e=o(this),r=i(e),n=a(t),s=n>=0?n:r+n;return s<0||s>=r?void 0:e[s]}))},36664:(t,e,r)=>{"use strict";var n=r(68844),i=r(54872),a=n(r(70357)),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(t,e){return a(o(this),t,e,arguments.length>2?arguments[2]:void 0)}))},55980:(t,e,r)=>{"use strict";var n=r(54872),i=r(2960).every,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},79943:(t,e,r)=>{"use strict";var n=r(54872),i=r(62872),a=r(71530),o=r(50926),s=r(22615),c=r(68844),l=r(3689),u=n.aTypedArray,h=n.exportTypedArrayMethod,f=c("".slice);h("fill",(function(t){var e=arguments.length;u(this);var r="Big"===f(o(this),0,3)?a(t):+t;return s(i,this,r,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),l((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})))},96089:(t,e,r)=>{"use strict";var n=r(54872),i=r(2960).filter,a=r(20716),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(t){var e=i(o(this),t,arguments.length>1?arguments[1]:void 0);return a(this,e)}))},48690:(t,e,r)=>{"use strict";var n=r(54872),i=r(2960).findIndex,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},82:(t,e,r)=>{"use strict";var n=r(54872),i=r(61969).findLastIndex,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLastIndex",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},20522:(t,e,r)=>{"use strict";var n=r(54872),i=r(61969).findLast,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLast",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},18539:(t,e,r)=>{"use strict";var n=r(54872),i=r(2960).find,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},29068:(t,e,r)=>{"use strict";r(31158)("Float32",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},70292:(t,e,r)=>{"use strict";r(31158)("Float64",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},45385:(t,e,r)=>{"use strict";var n=r(54872),i=r(2960).forEach,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(t){i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},59495:(t,e,r)=>{"use strict";var n=r(39800);(0,r(54872).exportTypedArrayStaticMethod)("from",r(41304),n)},85552:(t,e,r)=>{"use strict";var n=r(54872),i=r(84328).includes,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},31803:(t,e,r)=>{"use strict";var n=r(54872),i=r(84328).indexOf,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},89988:(t,e,r)=>{"use strict";r(31158)("Int16",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},854:(t,e,r)=>{"use strict";r(31158)("Int32",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},55304:(t,e,r)=>{"use strict";r(31158)("Int8",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},91565:(t,e,r)=>{"use strict";var n=r(19037),i=r(3689),a=r(68844),o=r(54872),s=r(752),c=r(44201)("iterator"),l=n.Uint8Array,u=a(s.values),h=a(s.keys),f=a(s.entries),d=o.aTypedArray,p=o.exportTypedArrayMethod,m=l&&l.prototype,g=!i((function(){m[c].call([1])})),A=!!m&&m.values&&m[c]===m.values&&"values"===m.values.name,v=function(){return u(d(this))};p("entries",(function(){return f(d(this))}),g),p("keys",(function(){return h(d(this))}),g),p("values",v,g||!A,{name:"values"}),p(c,v,g||!A,{name:"values"})},67987:(t,e,r)=>{"use strict";var n=r(54872),i=r(68844),a=n.aTypedArray,o=n.exportTypedArrayMethod,s=i([].join);o("join",(function(t){return s(a(this),t)}))},49365:(t,e,r)=>{"use strict";var n=r(54872),i=r(61735),a=r(60953),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(t){var e=arguments.length;return i(a,o(this),e>1?[t,arguments[1]]:[t])}))},80677:(t,e,r)=>{"use strict";var n=r(54872),i=r(2960).map,a=r(47338),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("map",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(a(t))(e)}))}))},19038:(t,e,r)=>{"use strict";var n=r(54872),i=r(39800),a=n.aTypedArrayConstructor;(0,n.exportTypedArrayStaticMethod)("of",(function(){for(var t=0,e=arguments.length,r=new(a(this))(e);e>t;)r[t]=arguments[t++];return r}),i)},41165:(t,e,r)=>{"use strict";var n=r(54872),i=r(88820).right,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(t){var e=arguments.length;return i(a(this),t,e,e>1?arguments[1]:void 0)}))},18118:(t,e,r)=>{"use strict";var n=r(54872),i=r(88820).left,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(t){var e=arguments.length;return i(a(this),t,e,e>1?arguments[1]:void 0)}))},71522:(t,e,r)=>{"use strict";var n=r(54872),i=n.aTypedArray,a=n.exportTypedArrayMethod,o=Math.floor;a("reverse",(function(){for(var t,e=this,r=i(e).length,n=o(r/2),a=0;a{"use strict";var n=r(19037),i=r(22615),a=r(54872),o=r(6310),s=r(83250),c=r(90690),l=r(3689),u=n.RangeError,h=n.Int8Array,f=h&&h.prototype,d=f&&f.set,p=a.aTypedArray,m=a.exportTypedArrayMethod,g=!l((function(){var t=new Uint8ClampedArray(2);return i(d,t,{length:1,0:3},1),3!==t[1]})),A=g&&a.NATIVE_ARRAY_BUFFER_VIEWS&&l((function(){var t=new h(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));m("set",(function(t){p(this);var e=s(arguments.length>1?arguments[1]:void 0,1),r=c(t);if(g)return i(d,this,r,e);var n=this.length,a=o(r),l=0;if(a+e>n)throw new u("Wrong length");for(;l{"use strict";var n=r(54872),i=r(47338),a=r(3689),o=r(96004),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("slice",(function(t,e){for(var r=o(s(this),t,e),n=i(this),a=0,c=r.length,l=new n(c);c>a;)l[a]=r[a++];return l}),a((function(){new Int8Array(1).slice()})))},7300:(t,e,r)=>{"use strict";var n=r(54872),i=r(2960).some,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},93356:(t,e,r)=>{"use strict";var n=r(19037),i=r(46576),a=r(3689),o=r(10509),s=r(50382),c=r(54872),l=r(97365),u=r(37298),h=r(3615),f=r(27922),d=c.aTypedArray,p=c.exportTypedArrayMethod,m=n.Uint16Array,g=m&&i(m.prototype.sort),A=!(!g||a((function(){g(new m(2),null)}))&&a((function(){g(new m(2),{})}))),v=!!g&&!a((function(){if(h)return h<74;if(l)return l<67;if(u)return!0;if(f)return f<602;var t,e,r=new m(516),n=Array(516);for(t=0;t<516;t++)e=t%4,r[t]=515-t,n[t]=t-2*e+3;for(g(r,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(r[t]!==n[t])return!0}));p("sort",(function(t){return void 0!==t&&o(t),v?g(this,t):s(d(this),function(t){return function(e,r){return void 0!==t?+t(e,r)||0:r!=r?-1:e!=e?1:0===e&&0===r?1/e>0&&1/r<0?1:-1:e>r}}(t))}),!v||A)},62533:(t,e,r)=>{"use strict";var n=r(54872),i=r(43126),a=r(27578),o=r(47338),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("subarray",(function(t,e){var r=s(this),n=r.length,c=a(t,n);return new(o(r))(r.buffer,r.byteOffset+c*r.BYTES_PER_ELEMENT,i((void 0===e?n:a(e,n))-c))}))},99724:(t,e,r)=>{"use strict";var n=r(19037),i=r(61735),a=r(54872),o=r(3689),s=r(96004),c=n.Int8Array,l=a.aTypedArray,u=a.exportTypedArrayMethod,h=[].toLocaleString,f=!!c&&o((function(){h.call(new c(1))}));u("toLocaleString",(function(){return i(h,f?s(l(this)):l(this),s(arguments))}),o((function(){return[1,2].toLocaleString()!==new c([1,2]).toLocaleString()}))||!o((function(){c.prototype.toLocaleString.call([1,2])})))},24224:(t,e,r)=>{"use strict";var n=r(26166),i=r(54872),a=i.aTypedArray,o=i.exportTypedArrayMethod,s=i.getTypedArrayConstructor;o("toReversed",(function(){return n(a(this),s(this))}))},61121:(t,e,r)=>{"use strict";var n=r(54872),i=r(68844),a=r(10509),o=r(59976),s=n.aTypedArray,c=n.getTypedArrayConstructor,l=n.exportTypedArrayMethod,u=i(n.TypedArrayPrototype.sort);l("toSorted",(function(t){void 0!==t&&a(t);var e=s(this),r=o(c(e),e);return u(r,t)}))},99901:(t,e,r)=>{"use strict";var n=r(54872).exportTypedArrayMethod,i=r(3689),a=r(19037),o=r(68844),s=a.Uint8Array,c=s&&s.prototype||{},l=[].toString,u=o([].join);i((function(){l.call({})}))&&(l=function(){return u(this)});var h=c.toString!==l;n("toString",l,h)},75679:(t,e,r)=>{"use strict";r(31158)("Uint16",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},18557:(t,e,r)=>{"use strict";r(31158)("Uint32",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},28607:(t,e,r)=>{"use strict";r(31158)("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},30938:(t,e,r)=>{"use strict";r(31158)("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}),!0)},37133:(t,e,r)=>{"use strict";var n=r(16134),i=r(54872),a=r(9401),o=r(68700),s=r(71530),c=i.aTypedArray,l=i.getTypedArrayConstructor,u=i.exportTypedArrayMethod,h=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();u("with",{with:function(t,e){var r=c(this),i=o(t),u=a(r)?s(e):+e;return n(r,l(r),i,u)}}.with,!h)},622:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(34327),o=String.fromCharCode,s=i("".charAt),c=i(/./.exec),l=i("".slice),u=/^[\da-f]{2}$/i,h=/^[\da-f]{4}$/i;n({global:!0},{unescape:function(t){for(var e,r,n=a(t),i="",f=n.length,d=0;d{"use strict";var n,i=r(71594),a=r(19037),o=r(68844),s=r(6045),c=r(45375),l=r(20319),u=r(70637),h=r(48999),f=r(618).enforce,d=r(3689),p=r(59834),m=Object,g=Array.isArray,A=m.isExtensible,v=m.isFrozen,y=m.isSealed,b=m.freeze,x=m.seal,w={},_={},E=!a.ActiveXObject&&"ActiveXObject"in a,M=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},S=l("WeakMap",M,u),C=S.prototype,T=o(C.set);if(p)if(E){n=u.getConstructor(M,"WeakMap",!0),c.enable();var I=o(C.delete),R=o(C.has),B=o(C.get);s(C,{delete:function(t){if(h(t)&&!A(t)){var e=f(this);return e.frozen||(e.frozen=new n),I(this,t)||e.frozen.delete(t)}return I(this,t)},has:function(t){if(h(t)&&!A(t)){var e=f(this);return e.frozen||(e.frozen=new n),R(this,t)||e.frozen.has(t)}return R(this,t)},get:function(t){if(h(t)&&!A(t)){var e=f(this);return e.frozen||(e.frozen=new n),R(this,t)?B(this,t):e.frozen.get(t)}return B(this,t)},set:function(t,e){if(h(t)&&!A(t)){var r=f(this);r.frozen||(r.frozen=new n),R(this,t)?T(this,t,e):r.frozen.set(t,e)}else T(this,t,e);return this}})}else i&&d((function(){var t=b([]);return T(new S,t,1),!v(t)}))&&s(C,{set:function(t,e){var r;return g(t)&&(v(t)?r=w:y(t)&&(r=_)),T(this,t,e),r===w&&b(t),r===_&&x(t),this}})},51090:(t,e,r)=>{"use strict";r(45164)},87884:(t,e,r)=>{"use strict";r(20319)("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(70637))},50414:(t,e,r)=>{"use strict";r(87884)},89503:(t,e,r)=>{"use strict";r(95879)},86247:(t,e,r)=>{"use strict";var n=r(67697),i=r(62148),a=r(22961),o=ArrayBuffer.prototype;n&&!("detached"in o)&&i(o,"detached",{configurable:!0,get:function(){return a(this)}})},43097:(t,e,r)=>{"use strict";var n=r(79989),i=r(29195);i&&n({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return i(this,arguments.length?arguments[0]:void 0,!1)}})},21412:(t,e,r)=>{"use strict";var n=r(79989),i=r(29195);i&&n({target:"ArrayBuffer",proto:!0},{transfer:function(){return i(this,arguments.length?arguments[0]:void 0,!0)}})},4154:(t,e,r)=>{"use strict";r(92176)},7802:(t,e,r)=>{"use strict";var n=r(79989),i=r(2960).filterReject,a=r(87370);n({target:"Array",proto:!0,forced:!0},{filterOut:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a("filterOut")},54883:(t,e,r)=>{"use strict";var n=r(79989),i=r(2960).filterReject,a=r(87370);n({target:"Array",proto:!0,forced:!0},{filterReject:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a("filterReject")},20097:(t,e,r)=>{"use strict";r(93383)},38197:(t,e,r)=>{"use strict";r(59867)},18073:(t,e,r)=>{"use strict";r(79989)({target:"Array",stat:!0},{fromAsync:r(2231)})},96882:(t,e,r)=>{"use strict";var n=r(79989),i=r(16834),a=r(87370),o=r(44416);n({target:"Array",proto:!0,name:"groupToMap",forced:r(53931)||!i("groupByToMap")},{groupByToMap:o}),a("groupByToMap")},22525:(t,e,r)=>{"use strict";var n=r(79989),i=r(64976),a=r(16834),o=r(87370);n({target:"Array",proto:!0,forced:!a("groupBy")},{groupBy:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("groupBy")},32539:(t,e,r)=>{"use strict";var n=r(79989),i=r(87370),a=r(44416);n({target:"Array",proto:!0,forced:r(53931)},{groupToMap:a}),i("groupToMap")},36208:(t,e,r)=>{"use strict";var n=r(79989),i=r(64976),a=r(87370);n({target:"Array",proto:!0},{group:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a("group")},5082:(t,e,r)=>{"use strict";var n=r(79989),i=r(92297),a=Object.isFrozen,o=function(t,e){if(!a||!i(t)||!a(t))return!1;for(var r,n=0,o=t.length;n{"use strict";var n=r(67697),i=r(87370),a=r(90690),o=r(6310),s=r(62148);n&&(s(Array.prototype,"lastIndex",{configurable:!0,get:function(){var t=a(this),e=o(t);return 0===e?0:e-1}}),i("lastIndex"))},32221:(t,e,r)=>{"use strict";var n=r(67697),i=r(87370),a=r(90690),o=r(6310),s=r(62148);n&&(s(Array.prototype,"lastItem",{configurable:!0,get:function(){var t=a(this),e=o(t);return 0===e?void 0:t[e-1]},set:function(t){var e=a(this),r=o(e);return e[0===r?0:r-1]=t}}),i("lastItem"))},67890:(t,e,r)=>{"use strict";r(29830)},47041:(t,e,r)=>{"use strict";r(12894)},86322:(t,e,r)=>{"use strict";r(93530)},92253:(t,e,r)=>{"use strict";var n=r(79989),i=r(87370);n({target:"Array",proto:!0,forced:!0},{uniqueBy:r(12397)}),i("uniqueBy")},97554:(t,e,r)=>{"use strict";r(21319)},11070:(t,e,r)=>{"use strict";var n=r(79989),i=r(67697),a=r(76058),o=r(10509),s=r(767),c=r(11880),l=r(6045),u=r(62148),h=r(44201),f=r(618),d=r(29199),p=a("Promise"),m=a("SuppressedError"),g=ReferenceError,A=h("asyncDispose"),v=h("toStringTag"),y="AsyncDisposableStack",b=f.set,x=f.getterFor(y),w="async-dispose",_="disposed",E=function(t){var e=x(t);if(e.state===_)throw new g(y+" already disposed");return e},M=function(){b(s(this,S),{type:y,state:"pending",stack:[]}),i||(this.disposed=!1)},S=M.prototype;l(S,{disposeAsync:function(){var t=this;return new p((function(e,r){var n=x(t);if(n.state===_)return e(void 0);n.state=_,i||(t.disposed=!0);var a,o=n.stack,s=o.length,c=!1,l=function(t){c?a=new m(t,a):(c=!0,a=t),u()},u=function(){if(s){var t=o[--s];o[s]=null;try{p.resolve(t()).then(u,l)}catch(t){l(t)}}else n.stack=null,c?r(a):e(void 0)};u()}))},use:function(t){return d(E(this),t,w),t},adopt:function(t,e){var r=E(this);return o(e),d(r,void 0,w,(function(){return e(t)})),t},defer:function(t){var e=E(this);o(t),d(e,void 0,w,t)},move:function(){var t=E(this),e=new M;return x(e).stack=t.stack,t.stack=[],t.state=_,i||(this.disposed=!0),e}}),i&&u(S,"disposed",{configurable:!0,get:function(){return x(this).state===_}}),c(S,A,S.disposeAsync,{name:"disposeAsync"}),c(S,v,y,{nonWritable:!0}),n({global:!0,constructor:!0},{AsyncDisposableStack:M})},77299:(t,e,r)=>{"use strict";r(79989)({target:"AsyncIterator",name:"indexed",proto:!0,real:!0,forced:!0},{asIndexedPairs:r(40164)})},15694:(t,e,r)=>{"use strict";var n=r(22615),i=r(11880),a=r(76058),o=r(54849),s=r(36812),c=r(44201),l=r(23070),u=c("asyncDispose"),h=a("Promise");s(l,u)||i(l,u,(function(){var t=this;return new h((function(e,r){var i=o(t,"return");i?h.resolve(n(i,t)).then((function(){e(void 0)}),r):e(void 0)}))}))},64578:(t,e,r)=>{"use strict";var n=r(79989),i=r(767),a=r(61868),o=r(75773),s=r(36812),c=r(44201),l=r(23070),u=r(53931),h=c("toStringTag"),f=TypeError,d=function(){if(i(this,l),a(this)===l)throw new f("Abstract class AsyncIterator not directly constructable")};d.prototype=l,s(l,h)||o(l,h,"AsyncIterator"),!u&&s(l,"constructor")&&l.constructor!==Object||o(l,"constructor",d),n({global:!0,constructor:!0,forced:u},{AsyncIterator:d})},17815:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(85027),o=r(22302),s=r(4654),c=r(15904),l=r(17394),u=r(27807),h=r(53931),f=l((function(t){var e=this;return new t((function(r,n){var o=function(t){e.done=!0,n(t)},s=function(){try{t.resolve(a(i(e.next,e.iterator))).then((function(t){try{a(t).done?(e.done=!0,r(u(void 0,!0))):e.remaining?(e.remaining--,s()):r(u(t.value,!1))}catch(t){o(t)}}),o)}catch(t){o(t)}};s()}))}));n({target:"AsyncIterator",proto:!0,real:!0,forced:h},{drop:function(t){a(this);var e=c(s(+t));return new f(o(this),{remaining:e})}})},19029:(t,e,r)=>{"use strict";var n=r(79989),i=r(62489).every;n({target:"AsyncIterator",proto:!0,real:!0},{every:function(t){return i(this,t)}})},6237:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(10509),o=r(85027),s=r(48999),c=r(22302),l=r(17394),u=r(27807),h=r(52399),f=r(53931),d=l((function(t){var e=this,r=e.iterator,n=e.predicate;return new t((function(a,c){var l=function(t){e.done=!0,c(t)},f=function(t){h(r,l,t,l)},d=function(){try{t.resolve(o(i(e.next,r))).then((function(r){try{if(o(r).done)e.done=!0,a(u(void 0,!0));else{var i=r.value;try{var c=n(i,e.counter++),h=function(t){t?a(u(i,!1)):d()};s(c)?t.resolve(c).then(h,f):h(c)}catch(t){f(t)}}}catch(t){l(t)}}),l)}catch(t){l(t)}};d()}))}));n({target:"AsyncIterator",proto:!0,real:!0,forced:f},{filter:function(t){return o(this),a(t),new d(c(this),{predicate:t})}})},81954:(t,e,r)=>{"use strict";var n=r(79989),i=r(62489).find;n({target:"AsyncIterator",proto:!0,real:!0},{find:function(t){return i(this,t)}})},87152:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(10509),o=r(85027),s=r(48999),c=r(22302),l=r(17394),u=r(27807),h=r(11427),f=r(52399),d=r(53931),p=l((function(t){var e=this,r=e.iterator,n=e.mapper;return new t((function(a,c){var l=function(t){e.done=!0,c(t)},d=function(t){f(r,l,t,l)},p=function(){try{t.resolve(o(i(e.next,r))).then((function(r){try{if(o(r).done)e.done=!0,a(u(void 0,!0));else{var i=r.value;try{var c=n(i,e.counter++),f=function(t){try{e.inner=h(t),m()}catch(t){d(t)}};s(c)?t.resolve(c).then(f,d):f(c)}catch(t){d(t)}}}catch(t){l(t)}}),l)}catch(t){l(t)}},m=function(){var r=e.inner;if(r)try{t.resolve(o(i(r.next,r.iterator))).then((function(t){try{o(t).done?(e.inner=null,p()):a(u(t.value,!1))}catch(t){d(t)}}),d)}catch(t){d(t)}else p()};m()}))}));n({target:"AsyncIterator",proto:!0,real:!0,forced:d},{flatMap:function(t){return o(this),a(t),new p(c(this),{mapper:t,inner:null})}})},89667:(t,e,r)=>{"use strict";var n=r(79989),i=r(62489).forEach;n({target:"AsyncIterator",proto:!0,real:!0},{forEach:function(t){return i(this,t)}})},49118:(t,e,r)=>{"use strict";var n=r(79989),i=r(90690),a=r(23622),o=r(11427),s=r(23070),c=r(40219);n({target:"AsyncIterator",stat:!0,forced:r(53931)},{from:function(t){var e=o("string"==typeof t?i(t):t);return a(s,e.iterator)?e.iterator:new c(e)}})},32411:(t,e,r)=>{"use strict";r(79989)({target:"AsyncIterator",proto:!0,real:!0,forced:!0},{indexed:r(40164)})},3256:(t,e,r)=>{"use strict";var n=r(79989),i=r(82412);n({target:"AsyncIterator",proto:!0,real:!0,forced:r(53931)},{map:i})},85625:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(10509),o=r(85027),s=r(48999),c=r(76058),l=r(22302),u=r(52399),h=c("Promise"),f=TypeError;n({target:"AsyncIterator",proto:!0,real:!0},{reduce:function(t){o(this),a(t);var e=l(this),r=e.iterator,n=e.next,c=arguments.length<2,d=c?void 0:arguments[1],p=0;return new h((function(e,a){var l=function(t){u(r,a,t,a)},m=function(){try{h.resolve(o(i(n,r))).then((function(r){try{if(o(r).done)c?a(new f("Reduce of empty iterator with no initial value")):e(d);else{var n=r.value;if(c)c=!1,d=n,m();else try{var i=t(d,n,p),u=function(t){d=t,m()};s(i)?h.resolve(i).then(u,l):u(i)}catch(t){l(t)}}p++}catch(t){a(t)}}),a)}catch(t){a(t)}};m()}))}})},10914:(t,e,r)=>{"use strict";var n=r(79989),i=r(62489).some;n({target:"AsyncIterator",proto:!0,real:!0},{some:function(t){return i(this,t)}})},14494:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(85027),o=r(22302),s=r(4654),c=r(15904),l=r(17394),u=r(27807),h=r(53931),f=l((function(t){var e,r=this,n=r.iterator;if(!r.remaining--){var o=u(void 0,!0);return r.done=!0,void 0!==(e=n.return)?t.resolve(i(e,n,void 0)).then((function(){return o})):o}return t.resolve(i(r.next,n)).then((function(t){return a(t).done?(r.done=!0,u(void 0,!0)):u(t.value,!1)})).then(null,(function(t){throw r.done=!0,t}))}));n({target:"AsyncIterator",proto:!0,real:!0,forced:h},{take:function(t){a(this);var e=c(s(+t));return new f(o(this),{remaining:e})}})},9468:(t,e,r)=>{"use strict";var n=r(79989),i=r(62489).toArray;n({target:"AsyncIterator",proto:!0,real:!0},{toArray:function(){return i(this,void 0,[])}})},24587:(t,e,r)=>{"use strict";var n=r(79989),i=r(98554);"function"==typeof BigInt&&n({target:"BigInt",stat:!0,forced:!0},{range:function(t,e,r){return new i(t,e,r,"bigint",BigInt(0),BigInt(1))}})},60779:(t,e,r)=>{"use strict";var n=r(79989),i=r(61735),a=r(41544),o=r(76058),s=r(25391),c=Object,l=function(){var t=o("Object","freeze");return t?t(s(null)):s(null)};n({global:!0,forced:!0},{compositeKey:function(){return i(a,c,arguments).get("object",l)}})},65503:(t,e,r)=>{"use strict";var n=r(79989),i=r(41544),a=r(76058),o=r(61735);n({global:!0,forced:!0},{compositeSymbol:function(){return 1===arguments.length&&"string"==typeof arguments[0]?a("Symbol").for(arguments[0]):o(i,null,arguments).get("symbol",a("Symbol"))}})},50236:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(15477).unpack,o=i(DataView.prototype.getUint16);n({target:"DataView",proto:!0},{getFloat16:function(t){var e=o(this,t,arguments.length>1&&arguments[1]);return a([255&e,e>>8&255],10)}})},89246:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844)(DataView.prototype.getUint8);n({target:"DataView",proto:!0,forced:!0},{getUint8Clamped:function(t){return i(this,t)}})},31186:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(50926),o=r(19842),s=r(15477).pack,c=r(76043),l=TypeError,u=i(DataView.prototype.setUint16);n({target:"DataView",proto:!0},{setFloat16:function(t,e){if("DataView"!==a(this))throw new l("Incorrect receiver");var r=o(t),n=s(c(e),10,2);return u(this,r,n[1]<<8|n[0],arguments.length>2&&arguments[2])}})},9279:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(50926),o=r(19842),s=r(87191),c=TypeError,l=i(DataView.prototype.setUint8);n({target:"DataView",proto:!0,forced:!0},{setUint8Clamped:function(t,e){if("DataView"!==a(this))throw new c("Incorrect receiver");var r=o(t);return l(this,r,s(e))}})},26725:(t,e,r)=>{"use strict";var n=r(79989),i=r(67697),a=r(76058),o=r(10509),s=r(767),c=r(11880),l=r(6045),u=r(62148),h=r(44201),f=r(618),d=r(29199),p=a("SuppressedError"),m=ReferenceError,g=h("dispose"),A=h("toStringTag"),v="DisposableStack",y=f.set,b=f.getterFor(v),x="sync-dispose",w="disposed",_=function(t){var e=b(t);if(e.state===w)throw new m(v+" already disposed");return e},E=function(){y(s(this,M),{type:v,state:"pending",stack:[]}),i||(this.disposed=!1)},M=E.prototype;l(M,{dispose:function(){var t=b(this);if(t.state!==w){t.state=w,i||(this.disposed=!0);for(var e,r=t.stack,n=r.length,a=!1;n;){var o=r[--n];r[n]=null;try{o()}catch(t){a?e=new p(t,e):(a=!0,e=t)}}if(t.stack=null,a)throw e}},use:function(t){return d(_(this),t,x),t},adopt:function(t,e){var r=_(this);return o(e),d(r,void 0,x,(function(){e(t)})),t},defer:function(t){var e=_(this);o(t),d(e,void 0,x,t)},move:function(){var t=_(this),e=new E;return b(e).stack=t.stack,t.stack=[],t.state=w,i||(this.disposed=!0),e}}),i&&u(M,"disposed",{configurable:!0,get:function(){return b(this).state===w}}),c(M,g,M.dispose,{name:"dispose"}),c(M,A,v,{nonWritable:!0}),n({global:!0,constructor:!0},{DisposableStack:E})},26125:(t,e,r)=>{"use strict";r(79989)({target:"Function",proto:!0,forced:!0},{demethodize:r(33505)})},2820:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(69985),o=r(6738),s=r(36812),c=r(67697),l=Object.getOwnPropertyDescriptor,u=/^\s*class\b/,h=i(u.exec);n({target:"Function",stat:!0,sham:!0,forced:!0},{isCallable:function(t){return a(t)&&!function(t){try{if(!c||!h(u,o(t)))return!1}catch(t){}var e=l(t,"prototype");return!!e&&s(e,"writable")&&!e.writable}(t)}})},62517:(t,e,r)=>{"use strict";r(79989)({target:"Function",stat:!0,forced:!0},{isConstructor:r(19429)})},54947:(t,e,r)=>{"use strict";var n=r(44201),i=r(72560).f,a=n("metadata"),o=Function.prototype;void 0===o[a]&&i(o,a,{value:null})},74993:(t,e,r)=>{"use strict";r(79989)({target:"Function",proto:!0,forced:!0,name:"demethodize"},{unThis:r(33505)})},78832:(t,e,r)=>{"use strict";r(45398)},50647:(t,e,r)=>{"use strict";r(79989)({target:"Iterator",name:"indexed",proto:!0,real:!0,forced:!0},{asIndexedPairs:r(47082)})},67602:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(767),o=r(85027),s=r(69985),c=r(61868),l=r(62148),u=r(76522),h=r(3689),f=r(36812),d=r(44201),p=r(12013).IteratorPrototype,m=r(67697),g=r(53931),A="constructor",v="Iterator",y=d("toStringTag"),b=TypeError,x=i[v],w=g||!s(x)||x.prototype!==p||!h((function(){x({})})),_=function(){if(a(this,p),c(this)===p)throw new b("Abstract class Iterator not directly constructable")},E=function(t,e){m?l(p,t,{configurable:!0,get:function(){return e},set:function(e){if(o(this),this===p)throw new b("You can't redefine this property");f(this,t)?this[t]=e:u(this,t,e)}}):p[t]=e};f(p,y)||E(y,v),!w&&f(p,A)&&p[A]!==Object||E(A,_),_.prototype=p,n({global:!0,constructor:!0,forced:w},{Iterator:_})},82639:(t,e,r)=>{"use strict";var n=r(22615),i=r(11880),a=r(54849),o=r(36812),s=r(44201),c=r(12013).IteratorPrototype,l=s("dispose");o(c,l)||i(c,l,(function(){var t=a(this,"return");t&&n(t,this)}))},63986:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(85027),o=r(22302),s=r(4654),c=r(15904),l=r(65419),u=r(53931),h=l((function(){for(var t,e=this.iterator,r=this.next;this.remaining;)if(this.remaining--,t=a(i(r,e)),this.done=!!t.done)return;if(t=a(i(r,e)),!(this.done=!!t.done))return t.value}));n({target:"Iterator",proto:!0,real:!0,forced:u},{drop:function(t){a(this);var e=c(s(+t));return new h(o(this),{remaining:e})}})},16054:(t,e,r)=>{"use strict";var n=r(79989),i=r(18734),a=r(10509),o=r(85027),s=r(22302);n({target:"Iterator",proto:!0,real:!0},{every:function(t){o(this),a(t);var e=s(this),r=0;return!i(e,(function(e,n){if(!t(e,r++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},53476:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(10509),o=r(85027),s=r(22302),c=r(65419),l=r(71228),u=r(53931),h=c((function(){for(var t,e,r=this.iterator,n=this.predicate,a=this.next;;){if(t=o(i(a,r)),this.done=!!t.done)return;if(e=t.value,l(r,n,[e,this.counter++],!0))return e}}));n({target:"Iterator",proto:!0,real:!0,forced:u},{filter:function(t){return o(this),a(t),new h(s(this),{predicate:t})}})},70928:(t,e,r)=>{"use strict";var n=r(79989),i=r(18734),a=r(10509),o=r(85027),s=r(22302);n({target:"Iterator",proto:!0,real:!0},{find:function(t){o(this),a(t);var e=s(this),r=0;return i(e,(function(e,n){if(t(e,r++))return n(e)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},49411:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(10509),o=r(85027),s=r(22302),c=r(36752),l=r(65419),u=r(72125),h=r(53931),f=l((function(){for(var t,e,r=this.iterator,n=this.mapper;;){if(e=this.inner)try{if(!(t=o(i(e.next,e.iterator))).done)return t.value;this.inner=null}catch(t){u(r,"throw",t)}if(t=o(i(this.next,r)),this.done=!!t.done)return;try{this.inner=c(n(t.value,this.counter++),!1)}catch(t){u(r,"throw",t)}}}));n({target:"Iterator",proto:!0,real:!0,forced:h},{flatMap:function(t){return o(this),a(t),new f(s(this),{mapper:t,inner:null})}})},30005:(t,e,r)=>{"use strict";var n=r(79989),i=r(18734),a=r(10509),o=r(85027),s=r(22302);n({target:"Iterator",proto:!0,real:!0},{forEach:function(t){o(this),a(t);var e=s(this),r=0;i(e,(function(e){t(e,r++)}),{IS_RECORD:!0})}})},73494:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(90690),o=r(23622),s=r(12013).IteratorPrototype,c=r(65419),l=r(36752),u=r(53931),h=c((function(){return i(this.next,this.iterator)}),!0);n({target:"Iterator",stat:!0,forced:u},{from:function(t){var e=l("string"==typeof t?a(t):t,!0);return o(s,e.iterator)?e.iterator:new h(e)}})},94564:(t,e,r)=>{"use strict";r(79989)({target:"Iterator",proto:!0,real:!0,forced:!0},{indexed:r(47082)})},41792:(t,e,r)=>{"use strict";var n=r(79989),i=r(88983);n({target:"Iterator",proto:!0,real:!0,forced:r(53931)},{map:i})},5985:(t,e,r)=>{"use strict";var n=r(79989),i=r(98554),a=TypeError;n({target:"Iterator",stat:!0,forced:!0},{range:function(t,e,r){if("number"==typeof t)return new i(t,e,r,"number",0,1);if("bigint"==typeof t)return new i(t,e,r,"bigint",BigInt(0),BigInt(1));throw new a("Incorrect Iterator.range arguments")}})},31107:(t,e,r)=>{"use strict";var n=r(79989),i=r(18734),a=r(10509),o=r(85027),s=r(22302),c=TypeError;n({target:"Iterator",proto:!0,real:!0},{reduce:function(t){o(this),a(t);var e=s(this),r=arguments.length<2,n=r?void 0:arguments[1],l=0;if(i(e,(function(e){r?(r=!1,n=e):n=t(n,e,l),l++}),{IS_RECORD:!0}),r)throw new c("Reduce of empty iterator with no initial value");return n}})},28244:(t,e,r)=>{"use strict";var n=r(79989),i=r(18734),a=r(10509),o=r(85027),s=r(22302);n({target:"Iterator",proto:!0,real:!0},{some:function(t){o(this),a(t);var e=s(this),r=0;return i(e,(function(e,n){if(t(e,r++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},3645:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(85027),o=r(22302),s=r(4654),c=r(15904),l=r(65419),u=r(72125),h=r(53931),f=l((function(){var t=this.iterator;if(!this.remaining--)return this.done=!0,u(t,"normal",void 0);var e=a(i(this.next,t));return(this.done=!!e.done)?void 0:e.value}));n({target:"Iterator",proto:!0,real:!0,forced:h},{take:function(t){a(this);var e=c(s(+t));return new f(o(this),{remaining:e})}})},58429:(t,e,r)=>{"use strict";var n=r(79989),i=r(85027),a=r(18734),o=r(22302),s=[].push;n({target:"Iterator",proto:!0,real:!0},{toArray:function(){var t=[];return a(o(i(this)),s,{that:t,IS_RECORD:!0}),t}})},39569:(t,e,r)=>{"use strict";var n=r(79989),i=r(85027),a=r(29019),o=r(40219),s=r(22302);n({target:"Iterator",proto:!0,real:!0,forced:r(53931)},{toAsync:function(){return new o(s(new a(s(i(this)))))}})},74320:(t,e,r)=>{"use strict";r(79989)({target:"JSON",stat:!0,forced:!r(22818)},{isRawJSON:r(55670)})},20691:(t,e,r)=>{"use strict";var n=r(79989),i=r(67697),a=r(19037),o=r(76058),s=r(68844),c=r(22615),l=r(69985),u=r(48999),h=r(92297),f=r(36812),d=r(34327),p=r(6310),m=r(76522),g=r(3689),A=r(46675),v=r(50146),y=a.JSON,b=a.Number,x=a.SyntaxError,w=y&&y.parse,_=o("Object","keys"),E=Object.getOwnPropertyDescriptor,M=s("".charAt),S=s("".slice),C=s(/./.exec),T=s([].push),I=/^\d$/,R=/^[1-9]$/,B=/^(?:-|\d)$/,k=/^[\t\n\r ]$/,L=function(t,e,r,n){var i,a,o,s,l,d=t[e],m=n&&d===n.value,g=m&&"string"==typeof n.source?{source:n.source}:{};if(u(d)){var A=h(d),v=m?n.nodes:A?[]:{};if(A)for(i=v.length,o=p(d),s=0;s{"use strict";var n=r(79989),i=r(71594),a=r(22818),o=r(76058),s=r(22615),c=r(68844),l=r(69985),u=r(55670),h=r(34327),f=r(76522),d=r(46675),p=r(92643),m=r(14630),g=r(618).set,A=String,v=SyntaxError,y=o("JSON","parse"),b=o("JSON","stringify"),x=o("Object","create"),w=o("Object","freeze"),_=c("".charAt),E=c("".slice),M=c(/./.exec),S=c([].push),C=m(),T=C.length,I="Unacceptable as raw JSON",R=/^[\t\n\r ]$/;n({target:"JSON",stat:!0,forced:!a},{rawJSON:function(t){var e=h(t);if(""===e||M(R,_(e,0))||M(R,_(e,e.length-1)))throw new v(I);var r=y(e);if("object"==typeof r&&null!==r)throw new v(I);var n=x(null);return g(n,{type:"RawJSON"}),f(n,"rawJSON",e),i?w(n):n}}),b&&n({target:"JSON",stat:!0,arity:3,forced:!a},{stringify:function(t,e,r){var n=p(e),i=[],a=b(t,(function(t,e){var r=l(n)?s(n,this,A(t),e):e;return u(r)?C+(S(i,r.rawJSON)-1):r}),r);if("string"!=typeof a)return a;for(var o="",c=a.length,h=0;h{"use strict";var n=r(79989),i=r(9945),a=r(83914).remove;n({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n{"use strict";var n=r(79989),i=r(9945),a=r(83914),o=a.get,s=a.has,c=a.set;n({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(t,e){var r,n,a=i(this);return s(a,t)?(r=o(a,t),"update"in e&&(r=e.update(r,t,a),c(a,t,r)),r):(n=e.insert(t,a),c(a,t,n),n)}})},747:(t,e,r)=>{"use strict";var n=r(79989),i=r(54071),a=r(9945),o=r(10613);n({target:"Map",proto:!0,real:!0,forced:!0},{every:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!1!==o(e,(function(t,n){if(!r(t,n,e))return!1}),!0)}})},41099:(t,e,r)=>{"use strict";var n=r(79989),i=r(54071),a=r(9945),o=r(83914),s=r(10613),c=o.Map,l=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new c;return s(e,(function(t,i){r(t,i,e)&&l(n,i,t)})),n}})},20876:(t,e,r)=>{"use strict";var n=r(79989),i=r(54071),a=r(9945),o=r(10613);n({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=o(e,(function(t,n){if(r(t,n,e))return{key:n}}),!0);return n&&n.key}})},26320:(t,e,r)=>{"use strict";var n=r(79989),i=r(54071),a=r(9945),o=r(10613);n({target:"Map",proto:!0,real:!0,forced:!0},{find:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=o(e,(function(t,n){if(r(t,n,e))return{value:t}}),!0);return n&&n.value}})},6052:(t,e,r)=>{"use strict";r(79989)({target:"Map",stat:!0,forced:!0},{from:r(28737)})},39879:(t,e,r)=>{"use strict";r(89348)},76791:(t,e,r)=>{"use strict";var n=r(79989),i=r(68600),a=r(9945),o=r(10613);n({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(t){return!0===o(a(this),(function(e){if(i(e,t))return!0}),!0)}})},75341:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(18734),o=r(69985),s=r(10509),c=r(83914).Map;n({target:"Map",stat:!0,forced:!0},{keyBy:function(t,e){var r=new(o(this)?this:c);s(e);var n=s(r.set);return a(t,(function(t){i(n,r,e(t),t)})),r}})},40019:(t,e,r)=>{"use strict";var n=r(79989),i=r(9945),a=r(10613);n({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(t){var e=a(i(this),(function(e,r){if(e===t)return{key:r}}),!0);return e&&e.key}})},92343:(t,e,r)=>{"use strict";var n=r(79989),i=r(54071),a=r(9945),o=r(83914),s=r(10613),c=o.Map,l=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new c;return s(e,(function(t,i){l(n,r(t,i,e),t)})),n}})},51096:(t,e,r)=>{"use strict";var n=r(79989),i=r(54071),a=r(9945),o=r(83914),s=r(10613),c=o.Map,l=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new c;return s(e,(function(t,i){l(n,i,r(t,i,e))})),n}})},4314:(t,e,r)=>{"use strict";var n=r(79989),i=r(9945),a=r(18734),o=r(83914).set;n({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(t){for(var e=i(this),r=arguments.length,n=0;n{"use strict";r(79989)({target:"Map",stat:!0,forced:!0},{of:r(1114)})},23346:(t,e,r)=>{"use strict";var n=r(79989),i=r(10509),a=r(9945),o=r(10613),s=TypeError;n({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=a(this),r=arguments.length<2,n=r?void 0:arguments[1];if(i(t),o(e,(function(i,a){r?(r=!1,n=i):n=t(n,i,a,e)})),r)throw new s("Reduce of empty map with no initial value");return n}})},64984:(t,e,r)=>{"use strict";var n=r(79989),i=r(54071),a=r(9945),o=r(10613);n({target:"Map",proto:!0,real:!0,forced:!0},{some:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!0===o(e,(function(t,n){if(r(t,n,e))return!0}),!0)}})},24453:(t,e,r)=>{"use strict";r(79989)({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:r(41432)})},64078:(t,e,r)=>{"use strict";var n=r(79989),i=r(10509),a=r(9945),o=r(83914),s=TypeError,c=o.get,l=o.has,u=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{update:function(t,e){var r=a(this),n=arguments.length;i(e);var o=l(r,t);if(!o&&n<3)throw new s("Updating absent value");var h=o?c(r,t):i(n>2?arguments[2]:void 0)(t,r);return u(r,t,e(h,t,r)),r}})},66190:(t,e,r)=>{"use strict";r(79989)({target:"Map",proto:!0,real:!0,forced:!0},{upsert:r(41432)})},25684:(t,e,r)=>{"use strict";var n=r(79989),i=Math.min,a=Math.max;n({target:"Math",stat:!0,forced:!0},{clamp:function(t,e,r){return i(r,a(e,t))}})},31789:(t,e,r)=>{"use strict";r(79989)({target:"Math",stat:!0,nonConfigurable:!0,nonWritable:!0},{DEG_PER_RAD:Math.PI/180})},8677:(t,e,r)=>{"use strict";var n=r(79989),i=180/Math.PI;n({target:"Math",stat:!0,forced:!0},{degrees:function(t){return t*i}})},59151:(t,e,r)=>{"use strict";r(79989)({target:"Math",stat:!0},{f16round:r(76043)})},346:(t,e,r)=>{"use strict";var n=r(79989),i=r(84463),a=r(37788);n({target:"Math",stat:!0,forced:!0},{fscale:function(t,e,r,n,o){return a(i(t,e,r,n,o))}})},91069:(t,e,r)=>{"use strict";r(79989)({target:"Math",stat:!0,forced:!0},{iaddh:function(t,e,r,n){var i=t>>>0,a=r>>>0;return(e>>>0)+(n>>>0)+((i&a|(i|a)&~(i+a>>>0))>>>31)|0}})},18886:(t,e,r)=>{"use strict";r(79989)({target:"Math",stat:!0,forced:!0},{imulh:function(t,e){var r=65535,n=+t,i=+e,a=n&r,o=i&r,s=n>>16,c=i>>16,l=(s*o>>>0)+(a*o>>>16);return s*c+(l>>16)+((a*c>>>0)+(l&r)>>16)}})},88065:(t,e,r)=>{"use strict";r(79989)({target:"Math",stat:!0,forced:!0},{isubh:function(t,e,r,n){var i=t>>>0,a=r>>>0;return(e>>>0)-(n>>>0)-((~i&a|~(i^a)&i-a>>>0)>>>31)|0}})},68172:(t,e,r)=>{"use strict";r(79989)({target:"Math",stat:!0,nonConfigurable:!0,nonWritable:!0},{RAD_PER_DEG:180/Math.PI})},60445:(t,e,r)=>{"use strict";var n=r(79989),i=Math.PI/180;n({target:"Math",stat:!0,forced:!0},{radians:function(t){return t*i}})},99457:(t,e,r)=>{"use strict";r(79989)({target:"Math",stat:!0,forced:!0},{scale:r(84463)})},613:(t,e,r)=>{"use strict";var n=r(79989),i=r(85027),a=r(70046),o=r(30974),s=r(27807),c=r(618),l="Seeded Random",u=l+" Generator",h=c.set,f=c.getterFor(u),d=TypeError,p=o((function(t){h(this,{type:u,seed:t%2147483647})}),l,(function(){var t=f(this),e=t.seed=(1103515245*t.seed+12345)%2147483647;return s((1073741823&e)/1073741823,!1)}));n({target:"Math",stat:!0,forced:!0},{seededPRNG:function(t){var e=i(t).seed;if(!a(e))throw new d('Math.seededPRNG() argument should have a "seed" field with a finite value.');return new p(e)}})},835:(t,e,r)=>{"use strict";r(79989)({target:"Math",stat:!0,forced:!0},{signbit:function(t){var e=+t;return e==e&&0===e?1/e==-1/0:e<0}})},926:(t,e,r)=>{"use strict";r(79989)({target:"Math",stat:!0,forced:!0},{umulh:function(t,e){var r=65535,n=+t,i=+e,a=n&r,o=i&r,s=n>>>16,c=i>>>16,l=(s*o>>>0)+(a*o>>>16);return s*c+(l>>>16)+((a*c>>>0)+(l&r)>>>16)}})},82899:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(68700),o="Invalid number representation",s=RangeError,c=SyntaxError,l=TypeError,u=parseInt,h=Math.pow,f=/^[\d.a-z]+$/,d=i("".charAt),p=i(f.exec),m=i(1..toString),g=i("".slice),A=i("".split);n({target:"Number",stat:!0,forced:!0},{fromString:function(t,e){var r=1;if("string"!=typeof t)throw new l(o);if(!t.length)throw new c(o);if("-"===d(t,0)&&(r=-1,!(t=g(t,1)).length))throw new c(o);var n=void 0===e?10:a(e);if(n<2||n>36)throw new s("Invalid radix");if(!p(f,t))throw new c(o);var i=A(t,"."),v=u(i[0],n);if(i.length>1&&(v+=u(i[1],n)/h(n,i[1].length)),10===n&&m(v,n)!==t)throw new c(o);return r*v}})},29977:(t,e,r)=>{"use strict";var n=r(79989),i=r(98554);n({target:"Number",stat:!0,forced:!0},{range:function(t,e,r){return new i(t,e,r,"number",0,1)}})},3210:(t,e,r)=>{"use strict";r(44079)},53669:(t,e,r)=>{"use strict";r(14566)},31927:(t,e,r)=>{"use strict";var n=r(79989),i=r(42351);n({target:"Object",stat:!0,forced:!0},{iterateEntries:function(t){return new i(t,"entries")}})},77131:(t,e,r)=>{"use strict";var n=r(79989),i=r(42351);n({target:"Object",stat:!0,forced:!0},{iterateKeys:function(t){return new i(t,"keys")}})},55174:(t,e,r)=>{"use strict";var n=r(79989),i=r(42351);n({target:"Object",stat:!0,forced:!0},{iterateValues:function(t){return new i(t,"values")}})},63503:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(67697),o=r(14241),s=r(10509),c=r(85027),l=r(767),u=r(69985),h=r(981),f=r(48999),d=r(54849),p=r(11880),m=r(6045),g=r(62148),A=r(20920),v=r(44201),y=r(618),b=v("observable"),x="Observable",w="Subscription",_="SubscriptionObserver",E=y.getterFor,M=y.set,S=E(x),C=E(w),T=E(_),I=function(t){this.observer=c(t),this.cleanup=void 0,this.subscriptionObserver=void 0};I.prototype={type:w,clean:function(){var t=this.cleanup;if(t){this.cleanup=void 0;try{t()}catch(t){A(t)}}},close:function(){if(!a){var t=this.facade,e=this.subscriptionObserver;t.closed=!0,e&&(e.closed=!0)}this.observer=void 0},isClosed:function(){return void 0===this.observer}};var R=function(t,e){var r,n=M(this,new I(t));a||(this.closed=!1);try{(r=d(t,"start"))&&i(r,t,this)}catch(t){A(t)}if(!n.isClosed()){var o=n.subscriptionObserver=new B(n);try{var c=e(o),l=c;h(c)||(n.cleanup=u(c.unsubscribe)?function(){l.unsubscribe()}:s(c))}catch(t){return void o.error(t)}n.isClosed()&&n.clean()}};R.prototype=m({},{unsubscribe:function(){var t=C(this);t.isClosed()||(t.close(),t.clean())}}),a&&g(R.prototype,"closed",{configurable:!0,get:function(){return C(this).isClosed()}});var B=function(t){M(this,{type:_,subscriptionState:t}),a||(this.closed=!1)};B.prototype=m({},{next:function(t){var e=T(this).subscriptionState;if(!e.isClosed()){var r=e.observer;try{var n=d(r,"next");n&&i(n,r,t)}catch(t){A(t)}}},error:function(t){var e=T(this).subscriptionState;if(!e.isClosed()){var r=e.observer;e.close();try{var n=d(r,"error");n?i(n,r,t):A(t)}catch(t){A(t)}e.clean()}},complete:function(){var t=T(this).subscriptionState;if(!t.isClosed()){var e=t.observer;t.close();try{var r=d(e,"complete");r&&i(r,e)}catch(t){A(t)}t.clean()}}}),a&&g(B.prototype,"closed",{configurable:!0,get:function(){return T(this).subscriptionState.isClosed()}});var k=function(t){l(this,L),M(this,{type:x,subscriber:s(t)})},L=k.prototype;m(L,{subscribe:function(t){var e=arguments.length;return new R(u(t)?{next:t,error:e>1?arguments[1]:void 0,complete:e>2?arguments[2]:void 0}:f(t)?t:{},S(this).subscriber)}}),p(L,b,(function(){return this})),n({global:!0,constructor:!0,forced:!0},{Observable:k}),o(x)},9818:(t,e,r)=>{"use strict";var n=r(79989),i=r(76058),a=r(22615),o=r(85027),s=r(19429),c=r(5185),l=r(54849),u=r(18734),h=r(44201)("observable");n({target:"Observable",stat:!0,forced:!0},{from:function(t){var e=s(this)?this:i("Observable"),r=l(o(t),h);if(r){var n=o(a(r,t));return n.constructor===e?n:new e((function(t){return n.subscribe(t)}))}var f=c(t);return new e((function(t){u(f,(function(e,r){if(t.next(e),t.closed)return r()}),{IS_ITERATOR:!0,INTERRUPTED:!0}),t.complete()}))}})},76314:(t,e,r)=>{"use strict";r(63503),r(9818),r(38771)},38771:(t,e,r)=>{"use strict";var n=r(79989),i=r(76058),a=r(19429),o=i("Array");n({target:"Observable",stat:!0,forced:!0},{of:function(){for(var t=a(this)?this:i("Observable"),e=arguments.length,r=o(e),n=0;n{"use strict";r(41195)},40393:(t,e,r)=>{"use strict";r(87609)},6616:(t,e,r)=>{"use strict";var n=r(79989),i=r(48742),a=r(9302);n({target:"Promise",stat:!0,forced:!0},{try:function(t){var e=i.f(this),r=a(t);return(r.error?e.reject:e.resolve)(r.value),e.promise}})},90810:(t,e,r)=>{"use strict";r(13505)},19959:(t,e,r)=>{"use strict";var n=r(79989),i=r(33666),a=r(85027),o=i.toKey,s=i.set;n({target:"Reflect",stat:!0},{defineMetadata:function(t,e,r){var n=arguments.length<4?void 0:o(arguments[3]);s(t,e,a(r),n)}})},73347:(t,e,r)=>{"use strict";var n=r(79989),i=r(33666),a=r(85027),o=i.toKey,s=i.getMap,c=i.store;n({target:"Reflect",stat:!0},{deleteMetadata:function(t,e){var r=arguments.length<3?void 0:o(arguments[2]),n=s(a(e),r,!1);if(void 0===n||!n.delete(t))return!1;if(n.size)return!0;var i=c.get(e);return i.delete(r),!!i.size||c.delete(e)}})},70003:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(33666),o=r(85027),s=r(61868),c=i(r(12397)),l=i([].concat),u=a.keys,h=a.toKey,f=function(t,e){var r=u(t,e),n=s(t);if(null===n)return r;var i=f(n,e);return i.length?r.length?c(l(r,i)):i:r};n({target:"Reflect",stat:!0},{getMetadataKeys:function(t){var e=arguments.length<2?void 0:h(arguments[1]);return f(o(t),e)}})},71913:(t,e,r)=>{"use strict";var n=r(79989),i=r(33666),a=r(85027),o=r(61868),s=i.has,c=i.get,l=i.toKey,u=function(t,e,r){if(s(t,e,r))return c(t,e,r);var n=o(e);return null!==n?u(t,n,r):void 0};n({target:"Reflect",stat:!0},{getMetadata:function(t,e){var r=arguments.length<3?void 0:l(arguments[2]);return u(t,a(e),r)}})},7859:(t,e,r)=>{"use strict";var n=r(79989),i=r(33666),a=r(85027),o=i.keys,s=i.toKey;n({target:"Reflect",stat:!0},{getOwnMetadataKeys:function(t){var e=arguments.length<2?void 0:s(arguments[1]);return o(a(t),e)}})},79955:(t,e,r)=>{"use strict";var n=r(79989),i=r(33666),a=r(85027),o=i.get,s=i.toKey;n({target:"Reflect",stat:!0},{getOwnMetadata:function(t,e){var r=arguments.length<3?void 0:s(arguments[2]);return o(t,a(e),r)}})},31138:(t,e,r)=>{"use strict";var n=r(79989),i=r(33666),a=r(85027),o=r(61868),s=i.has,c=i.toKey,l=function(t,e,r){if(s(t,e,r))return!0;var n=o(e);return null!==n&&l(t,n,r)};n({target:"Reflect",stat:!0},{hasMetadata:function(t,e){var r=arguments.length<3?void 0:c(arguments[2]);return l(t,a(e),r)}})},28809:(t,e,r)=>{"use strict";var n=r(79989),i=r(33666),a=r(85027),o=i.has,s=i.toKey;n({target:"Reflect",stat:!0},{hasOwnMetadata:function(t,e){var r=arguments.length<3?void 0:s(arguments[2]);return o(t,a(e),r)}})},2946:(t,e,r)=>{"use strict";var n=r(79989),i=r(33666),a=r(85027),o=i.toKey,s=i.set;n({target:"Reflect",stat:!0},{metadata:function(t,e){return function(r,n){s(t,e,a(r),o(n))}}})},32460:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(34327),o=r(86350),s=i("".charCodeAt),c=i("".replace),l=RegExp("[!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^`{|}~"+o+"]","g");n({target:"RegExp",stat:!0,forced:!0},{escape:function(t){var e=a(t),r=s(e,0);return(r>47&&r<58?"\\x3":"")+c(e,l,"\\$&")}})},57282:(t,e,r)=>{"use strict";var n=r(79989),i=r(10029),a=r(61034).add;n({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var t=i(this),e=0,r=arguments.length;e{"use strict";var n=r(79989),i=r(10029),a=r(61034).remove;n({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n{"use strict";var n=r(79989),i=r(22615),a=r(2939),o=r(27748);n({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(t){return i(o,this,a(t))}})},15716:(t,e,r)=>{"use strict";var n=r(79989),i=r(27748);n({target:"Set",proto:!0,real:!0,forced:!r(53234)("difference")},{difference:i})},30349:(t,e,r)=>{"use strict";var n=r(79989),i=r(54071),a=r(10029),o=r(48774);n({target:"Set",proto:!0,real:!0,forced:!0},{every:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!1!==o(e,(function(t){if(!r(t,t,e))return!1}),!0)}})},96986:(t,e,r)=>{"use strict";var n=r(79989),i=r(54071),a=r(10029),o=r(61034),s=r(48774),c=o.Set,l=o.add;n({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new c;return s(e,(function(t){r(t,t,e)&&l(n,t)})),n}})},95681:(t,e,r)=>{"use strict";var n=r(79989),i=r(54071),a=r(10029),o=r(48774);n({target:"Set",proto:!0,real:!0,forced:!0},{find:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=o(e,(function(t){if(r(t,t,e))return{value:t}}),!0);return n&&n.value}})},13781:(t,e,r)=>{"use strict";r(79989)({target:"Set",stat:!0,forced:!0},{from:r(28737)})},98873:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(2939),o=r(72948);n({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(t){return i(o,this,a(t))}})},33442:(t,e,r)=>{"use strict";var n=r(79989),i=r(3689),a=r(72948);n({target:"Set",proto:!0,real:!0,forced:!r(53234)("intersection")||i((function(){return"3,2"!==Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}))},{intersection:a})},50308:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(2939),o=r(97795);n({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(t){return i(o,this,a(t))}})},61964:(t,e,r)=>{"use strict";var n=r(79989),i=r(97795);n({target:"Set",proto:!0,real:!0,forced:!r(53234)("isDisjointFrom")},{isDisjointFrom:i})},18955:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(2939),o=r(26951);n({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(t){return i(o,this,a(t))}})},69878:(t,e,r)=>{"use strict";var n=r(79989),i=r(26951);n({target:"Set",proto:!0,real:!0,forced:!r(53234)("isSubsetOf")},{isSubsetOf:i})},65115:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(2939),o=r(3894);n({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(t){return i(o,this,a(t))}})},52915:(t,e,r)=>{"use strict";var n=r(79989),i=r(3894);n({target:"Set",proto:!0,real:!0,forced:!r(53234)("isSupersetOf")},{isSupersetOf:i})},19490:(t,e,r)=>{"use strict";var n=r(79989),i=r(68844),a=r(10029),o=r(48774),s=r(34327),c=i([].join),l=i([].push);n({target:"Set",proto:!0,real:!0,forced:!0},{join:function(t){var e=a(this),r=void 0===t?",":s(t),n=[];return o(e,(function(t){l(n,t)})),c(n,r)}})},95752:(t,e,r)=>{"use strict";var n=r(79989),i=r(54071),a=r(10029),o=r(61034),s=r(48774),c=o.Set,l=o.add;n({target:"Set",proto:!0,real:!0,forced:!0},{map:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new c;return s(e,(function(t){l(n,r(t,t,e))})),n}})},32789:(t,e,r)=>{"use strict";r(79989)({target:"Set",stat:!0,forced:!0},{of:r(1114)})},27913:(t,e,r)=>{"use strict";var n=r(79989),i=r(10509),a=r(10029),o=r(48774),s=TypeError;n({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=a(this),r=arguments.length<2,n=r?void 0:arguments[1];if(i(t),o(e,(function(i){r?(r=!1,n=i):n=t(n,i,i,e)})),r)throw new s("Reduce of empty set with no initial value");return n}})},6831:(t,e,r)=>{"use strict";var n=r(79989),i=r(54071),a=r(10029),o=r(48774);n({target:"Set",proto:!0,real:!0,forced:!0},{some:function(t){var e=a(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!0===o(e,(function(t){if(r(t,t,e))return!0}),!0)}})},90243:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(2939),o=r(62289);n({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(t){return i(o,this,a(t))}})},98686:(t,e,r)=>{"use strict";var n=r(79989),i=r(62289);n({target:"Set",proto:!0,real:!0,forced:!r(53234)("symmetricDifference")},{symmetricDifference:i})},98030:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615),a=r(2939),o=r(75674);n({target:"Set",proto:!0,real:!0,forced:!0},{union:function(t){return i(o,this,a(t))}})},22275:(t,e,r)=>{"use strict";var n=r(79989),i=r(75674);n({target:"Set",proto:!0,real:!0,forced:!r(53234)("union")},{union:i})},86220:(t,e,r)=>{"use strict";var n=r(79989),i=r(10730).charAt,a=r(74684),o=r(68700),s=r(34327);n({target:"String",proto:!0,forced:!0},{at:function(t){var e=s(a(this)),r=e.length,n=o(t),c=n>=0?n:r+n;return c<0||c>=r?void 0:i(e,c)}})},95853:(t,e,r)=>{"use strict";var n=r(79989),i=r(30974),a=r(27807),o=r(74684),s=r(34327),c=r(618),l=r(10730),u=l.codeAt,h=l.charAt,f="String Iterator",d=c.set,p=c.getterFor(f),m=i((function(t){d(this,{type:f,string:t,index:0})}),"String",(function(){var t,e=p(this),r=e.string,n=e.index;return n>=r.length?a(void 0,!0):(t=h(r,n),e.index+=t.length,a({codePoint:u(t,0),position:n},!1))}));n({target:"String",proto:!0,forced:!0},{codePoints:function(){return new m(s(o(this)))}})},21917:(t,e,r)=>{"use strict";r(79989)({target:"String",stat:!0,forced:!0},{cooked:r(8195)})},66084:(t,e,r)=>{"use strict";var n=r(71594),i=r(79989),a=r(98702),o=r(68844),s=r(61735),c=r(85027),l=r(90690),u=r(69985),h=r(6310),f=r(72560).f,d=r(9015),p=r(16803),m=r(8195),g=r(98985),A=r(86350),v=new p.WeakMap,y=p.get,b=p.has,x=p.set,w=Array,_=TypeError,E=Object.freeze||Object,M=Object.isFrozen,S=Math.min,C=o("".charAt),T=o("".slice),I=o("".split),R=o(/./.exec),B=/([\n\u2028\u2029]|\r\n?)/g,k=RegExp("^["+A+"]*"),L=RegExp("[^"+A+"]"),P="Invalid tag",D=function(t,e){if(void 0===e||t===e)return t;for(var r=0,n=S(t.length,e.length);r0)throw new _("Invalid opening line");e[1]=""}if(d){if(1===e.length||R(L,e[e.length-1]))throw new _("Invalid closing line");e[e.length-2]="",e[e.length-1]=""}for(var p=2;p{"use strict";r(12281)},59012:(t,e,r)=>{"use strict";r(79866)},38320:(t,e,r)=>{"use strict";r(56532)},78988:(t,e,r)=>{"use strict";r(35237)},26810:(t,e,r)=>{"use strict";var n=r(79989),i=r(23622),a=r(61868),o=r(49385),s=r(8758),c=r(25391),l=r(75773),u=r(75684),h=r(65411),f=r(13841),d=r(44201)("toStringTag"),p=Error,m=function(t,e,r){var n,s=i(g,this);return o?n=o(new p,s?a(this):g):(n=s?this:c(g),l(n,d,"Error")),void 0!==r&&l(n,"message",f(r)),h(n,m,n.stack,1),l(n,"error",t),l(n,"suppressed",e),n};o?o(m,p):s(m,p,{name:!0});var g=m.prototype=c(p.prototype,{constructor:u(1,m),message:u(1,""),name:u(1,"SuppressedError")});n({global:!0,constructor:!0,arity:3},{SuppressedError:m})},80546:(t,e,r)=>{"use strict";var n=r(19037),i=r(35405),a=r(72560).f,o=r(82474).f,s=n.Symbol;if(i("asyncDispose"),s){var c=o(s,"asyncDispose");c.enumerable&&c.configurable&&c.writable&&a(s,"asyncDispose",{value:c.value,enumerable:!1,configurable:!1,writable:!1})}},62586:(t,e,r)=>{"use strict";var n=r(19037),i=r(35405),a=r(72560).f,o=r(82474).f,s=n.Symbol;if(i("dispose"),s){var c=o(s,"dispose");c.enumerable&&c.configurable&&c.writable&&a(s,"dispose",{value:c.value,enumerable:!1,configurable:!1,writable:!1})}},46019:(t,e,r)=>{"use strict";r(79989)({target:"Symbol",stat:!0},{isRegisteredSymbol:r(18992)})},5010:(t,e,r)=>{"use strict";r(79989)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:r(18992)})},45749:(t,e,r)=>{"use strict";r(79989)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:r(8957)})},4835:(t,e,r)=>{"use strict";r(79989)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:r(8957)})},58799:(t,e,r)=>{"use strict";r(35405)("matcher")},27041:(t,e,r)=>{"use strict";r(35405)("metadataKey")},18134:(t,e,r)=>{"use strict";r(35405)("metadata")},44767:(t,e,r)=>{"use strict";r(35405)("observable")},92981:(t,e,r)=>{"use strict";r(35405)("patternMatch")},85044:(t,e,r)=>{"use strict";r(35405)("replaceAll")},96256:(t,e,r)=>{"use strict";r(95194)},18241:(t,e,r)=>{"use strict";var n=r(54872),i=r(2960).filterReject,a=r(20716),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("filterOut",(function(t){var e=i(o(this),t,arguments.length>1?arguments[1]:void 0);return a(this,e)}),!0)},59359:(t,e,r)=>{"use strict";var n=r(54872),i=r(2960).filterReject,a=r(20716),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("filterReject",(function(t){var e=i(o(this),t,arguments.length>1?arguments[1]:void 0);return a(this,e)}),!0)},1274:(t,e,r)=>{"use strict";r(82)},54302:(t,e,r)=>{"use strict";r(20522)},76677:(t,e,r)=>{"use strict";var n=r(76058),i=r(52655),a=r(2231),o=r(54872),s=r(59976),c=o.aTypedArrayConstructor;(0,o.exportTypedArrayStaticMethod)("fromAsync",(function(t){var e=this,r=arguments.length,o=r>1?arguments[1]:void 0,l=r>2?arguments[2]:void 0;return new(n("Promise"))((function(r){i(e),r(a(t,o,l))})).then((function(t){return s(c(e),t)}))}),!0)},30548:(t,e,r)=>{"use strict";var n=r(54872),i=r(64976),a=r(47338),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("groupBy",(function(t){var e=arguments.length>1?arguments[1]:void 0;return i(o(this),t,e,a)}),!0)},25298:(t,e,r)=>{"use strict";r(24224)},11882:(t,e,r)=>{"use strict";r(61121)},915:(t,e,r)=>{"use strict";var n=r(54872),i=r(6310),a=r(9401),o=r(27578),s=r(71530),c=r(68700),l=r(3689),u=n.aTypedArray,h=n.getTypedArrayConstructor,f=n.exportTypedArrayMethod,d=Math.max,p=Math.min;f("toSpliced",(function(t,e){var r,n,l,f,m,g,A,v=u(this),y=h(v),b=i(v),x=o(t,b),w=arguments.length,_=0;if(0===w)r=n=0;else if(1===w)r=0,n=b-x;else if(n=p(d(c(e),0),b-x),r=w-2){f=new y(r),l=a(f);for(var E=2;E{"use strict";var n=r(68844),i=r(54872),a=r(59976),o=r(12397),s=i.aTypedArray,c=i.getTypedArrayConstructor,l=i.exportTypedArrayMethod,u=n(o);l("uniqueBy",(function(t){return s(this),a(c(this),u(this,t))}),!0)},17911:(t,e,r)=>{"use strict";r(37133)},23579:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(68844),o=r(33425),s=r(51082),c=r(36812),l=r(59976),u=r(18368),h=r(9093),f=u.c2i,d=u.c2iUrl,p=i.Uint8Array,m=i.SyntaxError,g=a("".charAt),A=a("".replace),v=a("".slice),y=a([].push),b=/[\t\n\f\r ]/g,x="Extra bits";p&&n({target:"Uint8Array",stat:!0,forced:!0},{fromBase64:function(t){s(t);var e=arguments.length>1?o(arguments[1]):void 0,r="base64"===h(e)?f:d,n=!!e&&!!e.strict,i=n?t:A(t,b,"");if(i.length%4==0)"=="===v(i,-2)?i=v(i,0,-2):"="===v(i,-1)&&(i=v(i,0,-1));else if(n)throw new m("Input is not correctly padded");var a=i.length%4;switch(a){case 1:throw new m("Bad input length");case 2:i+="AA";break;case 3:i+="A"}for(var u=[],w=0,_=i.length,E=function(t){var e=g(i,w+t);if(!c(r,e))throw new m('Bad char in input: "'+e+'"');return r[e]<<18-6*t};w<_;w+=4){var M=E(0)+E(1)+E(2)+E(3);y(u,M>>16&255,M>>8&255,255&M)}var S=u.length;if(2===a){if(n&&0!==u[S-2])throw new m(x);S-=2}else if(3===a){if(n&&0!==u[S-1])throw new m(x);S--}return l(p,u,S)}})},91117:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(68844),o=r(51082),s=i.Uint8Array,c=i.SyntaxError,l=i.parseInt,u=/[^\da-f]/i,h=a(u.exec),f=a("".slice);s&&n({target:"Uint8Array",stat:!0,forced:!0},{fromHex:function(t){o(t);var e=t.length;if(e%2)throw new c("String should have an even number of characters");if(h(u,t))throw new c("String should only contain hex characters");for(var r=new s(e/2),n=0;n{"use strict";var n=r(79989),i=r(19037),a=r(68844),o=r(33425),s=r(95668),c=r(18368),l=r(9093),u=c.i2c,h=c.i2cUrl,f=i.Uint8Array,d=a("".charAt);f&&n({target:"Uint8Array",proto:!0,forced:!0},{toBase64:function(){for(var t,e=s(this),r=arguments.length?o(arguments[0]):void 0,n="base64"===l(r)?u:h,i="",a=0,c=e.length,f=function(e){return d(n,t>>6*e&63)};a+2{"use strict";var n=r(79989),i=r(19037),a=r(68844),o=r(95668),s=i.Uint8Array,c=a(1..toString);s&&n({target:"Uint8Array",proto:!0,forced:!0},{toHex:function(){o(this);for(var t="",e=0,r=this.length;e{"use strict";var n=r(79989),i=r(457),a=r(16803).remove;n({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n{"use strict";var n=r(79989),i=r(457),a=r(16803),o=a.get,s=a.has,c=a.set;n({target:"WeakMap",proto:!0,real:!0,forced:!0},{emplace:function(t,e){var r,n,a=i(this);return s(a,t)?(r=o(a,t),"update"in e&&(r=e.update(r,t,a),c(a,t,r)),r):(n=e.insert(t,a),c(a,t,n),n)}})},99369:(t,e,r)=>{"use strict";r(79989)({target:"WeakMap",stat:!0,forced:!0},{from:r(28737)})},22983:(t,e,r)=>{"use strict";r(79989)({target:"WeakMap",stat:!0,forced:!0},{of:r(1114)})},13466:(t,e,r)=>{"use strict";r(79989)({target:"WeakMap",proto:!0,real:!0,forced:!0},{upsert:r(41432)})},23321:(t,e,r)=>{"use strict";var n=r(79989),i=r(53499),a=r(78616).add;n({target:"WeakSet",proto:!0,real:!0,forced:!0},{addAll:function(){for(var t=i(this),e=0,r=arguments.length;e{"use strict";var n=r(79989),i=r(53499),a=r(78616).remove;n({target:"WeakSet",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n{"use strict";r(79989)({target:"WeakSet",stat:!0,forced:!0},{from:r(28737)})},45738:(t,e,r)=>{"use strict";r(79989)({target:"WeakSet",stat:!0,forced:!0},{of:r(1114)})},52586:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(76058),o=r(68844),s=r(22615),c=r(3689),l=r(34327),u=r(21500),h=r(18368).c2i,f=/[^\d+/a-z]/i,d=/[\t\n\f\r ]+/g,p=/[=]{1,2}$/,m=a("atob"),g=String.fromCharCode,A=o("".charAt),v=o("".replace),y=o(f.exec),b=!!m&&!c((function(){return"hi"!==m("aGk=")})),x=b&&c((function(){return""!==m(" ")})),w=b&&!c((function(){m("a")})),_=b&&!c((function(){m()})),E=b&&1!==m.length;n({global:!0,bind:!0,enumerable:!0,forced:!b||x||w||_||E},{atob:function(t){if(u(arguments.length,1),b&&!x&&!w)return s(m,i,t);var e,r,n,o=v(l(t),d,""),c="",_=0,E=0;if(o.length%4==0&&(o=v(o,p,"")),(e=o.length)%4==1||y(f,o))throw new(a("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;_>(-2*E&6)));return c}})},84645:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(76058),o=r(68844),s=r(22615),c=r(3689),l=r(34327),u=r(21500),h=r(18368).i2c,f=a("btoa"),d=o("".charAt),p=o("".charCodeAt),m=!!f&&!c((function(){return"aGk="!==f("hi")})),g=m&&!c((function(){f()})),A=m&&c((function(){return"bnVsbA=="!==f(null)})),v=m&&1!==f.length;n({global:!0,bind:!0,enumerable:!0,forced:!m||g||A||v},{btoa:function(t){if(u(arguments.length,1),m)return s(f,i,l(t));for(var e,r,n=l(t),o="",c=0,g=h;d(n,c)||(g="=",c%1);){if((r=p(n,c+=3/4))>255)throw new(a("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");o+=d(g,63&(e=e<<8|r)>>8-c%1*8)}return o}})},19742:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(99886).clear;n({global:!0,bind:!0,enumerable:!0,forced:i.clearImmediate!==a},{clearImmediate:a})},47522:(t,e,r)=>{"use strict";var n=r(19037),i=r(66338),a=r(33265),o=r(57612),s=r(75773),c=function(t){if(t&&t.forEach!==o)try{s(t,"forEach",o)}catch(e){t.forEach=o}};for(var l in i)i[l]&&c(n[l]&&n[l].prototype);c(a)},76265:(t,e,r)=>{"use strict";var n=r(19037),i=r(66338),a=r(33265),o=r(752),s=r(75773),c=r(55997),l=r(44201)("iterator"),u=o.values,h=function(t,e){if(t){if(t[l]!==u)try{s(t,l,u)}catch(e){t[l]=u}if(c(t,e,!0),i[e])for(var r in o)if(t[r]!==o[r])try{s(t,r,o[r])}catch(e){t[r]=o[r]}}};for(var f in i)h(n[f]&&n[f].prototype,f);h(a,"DOMTokenList")},97337:(t,e,r)=>{"use strict";var n=r(79989),i=r(21905),a=r(76058),o=r(3689),s=r(25391),c=r(75684),l=r(72560).f,u=r(11880),h=r(62148),f=r(36812),d=r(767),p=r(85027),m=r(20445),g=r(13841),A=r(37136),v=r(56610),y=r(618),b=r(67697),x=r(53931),w="DOMException",_="DATA_CLONE_ERR",E=a("Error"),M=a(w)||function(){try{(new(a("MessageChannel")||i("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(t){if(t.name===_&&25===t.code)return t.constructor}}(),S=M&&M.prototype,C=E.prototype,T=y.set,I=y.getterFor(w),R="stack"in new E(w),B=function(t){return f(A,t)&&A[t].m?A[t].c:0},k=function(){d(this,L);var t=arguments.length,e=g(t<1?void 0:arguments[0]),r=g(t<2?void 0:arguments[1],"Error"),n=B(r);if(T(this,{type:w,name:r,message:e,code:n}),b||(this.name=r,this.message=e,this.code=n),R){var i=new E(e);i.name=w,l(this,"stack",c(1,v(i.stack,1)))}},L=k.prototype=s(C),P=function(t){return{enumerable:!0,configurable:!0,get:t}},D=function(t){return P((function(){return I(this)[t]}))};b&&(h(L,"code",D("code")),h(L,"message",D("message")),h(L,"name",D("name"))),l(L,"constructor",c(1,k));var U=o((function(){return!(new M instanceof E)})),O=U||o((function(){return C.toString!==m||"2: 1"!==String(new M(1,2))})),F=U||o((function(){return 25!==new M(1,"DataCloneError").code})),N=U||25!==M[_]||25!==S[_],z=x?O||F||N:U;n({global:!0,constructor:!0,forced:z},{DOMException:z?k:M});var G=a(w),Z=G.prototype;for(var V in O&&(x||M===G)&&u(Z,"toString",m),F&&b&&M===G&&h(Z,"code",P((function(){return B(p(this).name)}))),A)if(f(A,V)){var Q=A[V],j=Q.s,W=c(6,Q.c);f(G,j)||l(G,j,W),f(Z,j)||l(Z,j,W)}},13429:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(76058),o=r(75684),s=r(72560).f,c=r(36812),l=r(767),u=r(33457),h=r(13841),f=r(37136),d=r(56610),p=r(67697),m=r(53931),g="DOMException",A=a("Error"),v=a(g),y=function(){l(this,b);var t=arguments.length,e=h(t<1?void 0:arguments[0]),r=h(t<2?void 0:arguments[1],"Error"),n=new v(e,r),i=new A(e);return i.name=g,s(n,"stack",o(1,d(i.stack,1))),u(n,this,y),n},b=y.prototype=v.prototype,x="stack"in new A(g),w="stack"in new v(1,2),_=v&&p&&Object.getOwnPropertyDescriptor(i,g),E=!(!_||_.writable&&_.configurable),M=x&&!E&&!w;n({global:!0,constructor:!0,forced:m||M},{DOMException:M?y:v});var S=a(g),C=S.prototype;if(C.constructor!==S)for(var T in m||s(C,"constructor",o(1,S)),f)if(c(f,T)){var I=f[T],R=I.s;c(S,R)||s(S,R,o(6,I.c))}},37462:(t,e,r)=>{"use strict";var n=r(76058),i="DOMException";r(55997)(n(i),i)},40088:(t,e,r)=>{"use strict";r(19742),r(52731)},10455:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(80231),o=r(10509),s=r(21500),c=r(50806),l=i.process;n({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(t){s(arguments.length,1),o(t);var e=c&&l.domain;a(e?e.bind(t):t)}})},3650:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(62148),o=r(67697),s=TypeError,c=Object.defineProperty,l=i.self!==i;try{if(o){var u=Object.getOwnPropertyDescriptor(i,"self");!l&&u&&u.get&&u.enumerable||a(i,"self",{get:function(){return i},set:function(t){if(this!==i)throw new s("Illegal invocation");c(i,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else n({global:!0,simple:!0,forced:l},{self:i})}catch(t){}},52731:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(99886).set,o=r(8552),s=i.setImmediate?o(a,!1):a;n({global:!0,bind:!0,enumerable:!0,forced:i.setImmediate!==s},{setImmediate:s})},10209:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(8552)(i.setInterval,!0);n({global:!0,bind:!0,forced:i.setInterval!==a},{setInterval:a})},83509:(t,e,r)=>{"use strict";var n=r(79989),i=r(19037),a=r(8552)(i.setTimeout,!0);n({global:!0,bind:!0,forced:i.setTimeout!==a},{setTimeout:a})},25564:(t,e,r)=>{"use strict";var n,i=r(53931),a=r(79989),o=r(19037),s=r(76058),c=r(68844),l=r(3689),u=r(14630),h=r(69985),f=r(19429),d=r(981),p=r(48999),m=r(30734),g=r(18734),A=r(85027),v=r(50926),y=r(36812),b=r(76522),x=r(75773),w=r(6310),_=r(21500),E=r(63477),M=r(83914),S=r(61034),C=r(48774),T=r(21420),I=r(49599),R=r(63514),B=o.Object,k=o.Array,L=o.Date,P=o.Error,D=o.TypeError,U=o.PerformanceMark,O=s("DOMException"),F=M.Map,N=M.has,z=M.get,G=M.set,Z=S.Set,V=S.add,Q=S.has,j=s("Object","keys"),W=c([].push),H=c((!0).valueOf),X=c(1..valueOf),q=c("".valueOf),Y=c(L.prototype.getTime),J=u("structuredClone"),K="DataCloneError",$="Transferring",tt=function(t){return!l((function(){var e=new o.Set([7]),r=t(e),n=t(B(7));return r===e||!r.has(7)||!p(n)||7!=+n}))&&t},et=function(t,e){return!l((function(){var r=new e,n=t({a:r,b:r});return!(n&&n.a===n.b&&n.a instanceof e&&n.a.stack===r.stack)}))},rt=o.structuredClone,nt=i||!et(rt,P)||!et(rt,O)||(n=rt,!!l((function(){var t=n(new o.AggregateError([1],J,{cause:3}));return"AggregateError"!==t.name||1!==t.errors[0]||t.message!==J||3!==t.cause}))),it=!rt&&tt((function(t){return new U(J,{detail:t}).detail})),at=tt(rt)||it,ot=function(t){throw new O("Uncloneable type: "+t,K)},st=function(t,e){throw new O((e||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",K)},ct=function(t,e){return at||st(e),at(t)},lt=function(t,e,r){if(N(e,t))return z(e,t);var n,i,a,s,c,l;if("SharedArrayBuffer"===(r||v(t)))n=at?at(t):t;else{var u=o.DataView;u||h(t.slice)||st("ArrayBuffer");try{if(h(t.slice)&&!t.resizable)n=t.slice(0);else{i=t.byteLength,a="maxByteLength"in t?{maxByteLength:t.maxByteLength}:void 0,n=new ArrayBuffer(i,a),s=new u(t),c=new u(n);for(l=0;l1&&!d(arguments[1])?A(arguments[1]):void 0,i=n?n.transfer:void 0;void 0!==i&&(r=function(t,e){if(!p(t))throw new D("Transfer option cannot be converted to a sequence");var r=[];g(t,(function(t){W(r,A(t))}));for(var n,i,a,s,c,l=0,u=w(r),d=new Z;l{"use strict";r(10209),r(83509)},2625:(t,e,r)=>{"use strict";r(752);var n=r(79989),i=r(19037),a=r(22615),o=r(68844),s=r(67697),c=r(76837),l=r(11880),u=r(62148),h=r(6045),f=r(55997),d=r(30974),p=r(618),m=r(767),g=r(69985),A=r(36812),v=r(54071),y=r(50926),b=r(85027),x=r(48999),w=r(34327),_=r(25391),E=r(75684),M=r(5185),S=r(91664),C=r(27807),T=r(21500),I=r(44201),R=r(50382),B=I("iterator"),k="URLSearchParams",L=k+"Iterator",P=p.set,D=p.getterFor(k),U=p.getterFor(L),O=Object.getOwnPropertyDescriptor,F=function(t){if(!s)return i[t];var e=O(i,t);return e&&e.value},N=F("fetch"),z=F("Request"),G=F("Headers"),Z=z&&z.prototype,V=G&&G.prototype,Q=i.RegExp,j=i.TypeError,W=i.decodeURIComponent,H=i.encodeURIComponent,X=o("".charAt),q=o([].join),Y=o([].push),J=o("".replace),K=o([].shift),$=o([].splice),tt=o("".split),et=o("".slice),rt=/\+/g,nt=Array(4),it=function(t){return nt[t-1]||(nt[t-1]=Q("((?:%[\\da-f]{2}){"+t+"})","gi"))},at=function(t){try{return W(t)}catch(e){return t}},ot=function(t){var e=J(t,rt," "),r=4;try{return W(e)}catch(t){for(;r;)e=J(e,it(r--),at);return e}},st=/[!'()~]|%20/g,ct={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},lt=function(t){return ct[t]},ut=function(t){return J(H(t),st,lt)},ht=d((function(t,e){P(this,{type:L,target:D(t).entries,index:0,kind:e})}),k,(function(){var t=U(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=void 0,C(void 0,!0);var n=e[r];switch(t.kind){case"keys":return C(n.key,!1);case"values":return C(n.value,!1)}return C([n.key,n.value],!1)}),!0),ft=function(t){this.entries=[],this.url=null,void 0!==t&&(x(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===X(t,0)?et(t,1):t:w(t)))};ft.prototype={type:k,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,i,o,s,c,l=this.entries,u=S(t);if(u)for(r=(e=M(t,u)).next;!(n=a(r,e)).done;){if(o=(i=M(b(n.value))).next,(s=a(o,i)).done||(c=a(o,i)).done||!a(o,i).done)throw new j("Expected sequence with length 2");Y(l,{key:w(s.value),value:w(c.value)})}else for(var h in t)A(t,h)&&Y(l,{key:h,value:w(t[h])})},parseQuery:function(t){if(t)for(var e,r,n=this.entries,i=tt(t,"&"),a=0;a0?arguments[0]:void 0));s||(this.size=t.entries.length)},pt=dt.prototype;if(h(pt,{append:function(t,e){var r=D(this);T(arguments.length,2),Y(r.entries,{key:w(t),value:w(e)}),s||this.length++,r.updateURL()},delete:function(t){for(var e=D(this),r=T(arguments.length,1),n=e.entries,i=w(t),a=r<2?void 0:arguments[1],o=void 0===a?a:w(a),c=0;ce.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,r=D(this).entries,n=v(t,arguments.length>1?arguments[1]:void 0),i=0;i1?At(arguments[1]):{})}}),g(z)){var vt=function(t){return m(this,Z),new z(t,arguments.length>1?At(arguments[1]):{})};Z.constructor=vt,vt.prototype=Z,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:vt})}}t.exports={URLSearchParams:dt,getState:D}},98858:(t,e,r)=>{"use strict";var n=r(11880),i=r(68844),a=r(34327),o=r(21500),s=URLSearchParams,c=s.prototype,l=i(c.append),u=i(c.delete),h=i(c.forEach),f=i([].push),d=new s("a=1&a=2&b=3");d.delete("a",1),d.delete("b",void 0),d+""!="a=2"&&n(c,"delete",(function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return u(this,t);var n=[];h(this,(function(t,e){f(n,{key:e,value:t})})),o(e,1);for(var i,s=a(t),c=a(r),d=0,p=0,m=!1,g=n.length;d{"use strict";var n=r(11880),i=r(68844),a=r(34327),o=r(21500),s=URLSearchParams,c=s.prototype,l=i(c.getAll),u=i(c.has),h=new s("a=1");!h.has("a",2)&&h.has("a",void 0)||n(c,"has",(function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return u(this,t);var n=l(this,t);o(e,1);for(var i=a(r),s=0;s{"use strict";r(2625)},33228:(t,e,r)=>{"use strict";var n=r(67697),i=r(68844),a=r(62148),o=URLSearchParams.prototype,s=i(o.forEach);n&&!("size"in o)&&a(o,"size",{get:function(){var t=0;return s(this,(function(){t++})),t},configurable:!0,enumerable:!0})},69822:(t,e,r)=>{"use strict";var n=r(79989),i=r(76058),a=r(3689),o=r(21500),s=r(34327),c=r(76837),l=i("URL");n({target:"URL",stat:!0,forced:!(c&&a((function(){l.canParse()})))},{canParse:function(t){var e=o(arguments.length,1),r=s(t),n=e<2||void 0===arguments[1]?void 0:s(arguments[1]);try{return!!new l(r,n)}catch(t){return!1}}})},79391:(t,e,r)=>{"use strict";r(21694);var n,i=r(79989),a=r(67697),o=r(76837),s=r(19037),c=r(54071),l=r(68844),u=r(11880),h=r(62148),f=r(767),d=r(36812),p=r(45394),m=r(21055),g=r(9015),A=r(10730).codeAt,v=r(6430),y=r(34327),b=r(55997),x=r(21500),w=r(2625),_=r(618),E=_.set,M=_.getterFor("URL"),S=w.URLSearchParams,C=w.getState,T=s.URL,I=s.TypeError,R=s.parseInt,B=Math.floor,k=Math.pow,L=l("".charAt),P=l(/./.exec),D=l([].join),U=l(1..toString),O=l([].pop),F=l([].push),N=l("".replace),z=l([].shift),G=l("".split),Z=l("".slice),V=l("".toLowerCase),Q=l([].unshift),j="Invalid scheme",W="Invalid host",H="Invalid port",X=/[a-z]/i,q=/[\d+-.a-z]/i,Y=/\d/,J=/^0x/i,K=/^[0-7]+$/,$=/^\d+$/,tt=/^[\da-f]+$/i,et=/[\0\t\n\r #%/:<>?@[\\\]^|]/,rt=/[\0\t\n\r #/:<>?@[\\\]^|]/,nt=/^[\u0000-\u0020]+/,it=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,at=/[\t\n\r]/g,ot=function(t){var e,r,n,i;if("number"==typeof t){for(e=[],r=0;r<4;r++)Q(e,t%256),t=B(t/256);return D(e,".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,i=0,a=0;a<8;a++)0!==t[a]?(i>r&&(e=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(e=n,r=i),e}(t),r=0;r<8;r++)i&&0===t[r]||(i&&(i=!1),n===r?(e+=r?":":"::",i=!0):(e+=U(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},st={},ct=p({},st,{" ":1,'"':1,"<":1,">":1,"`":1}),lt=p({},ct,{"#":1,"?":1,"{":1,"}":1}),ut=p({},lt,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ht=function(t,e){var r=A(t,0);return r>32&&r<127&&!d(e,t)?t:encodeURIComponent(t)},ft={ftp:21,file:null,http:80,https:443,ws:80,wss:443},dt=function(t,e){var r;return 2===t.length&&P(X,L(t,0))&&(":"===(r=L(t,1))||!e&&"|"===r)},pt=function(t){var e;return t.length>1&&dt(Z(t,0,2))&&(2===t.length||"/"===(e=L(t,2))||"\\"===e||"?"===e||"#"===e)},mt=function(t){return"."===t||"%2e"===V(t)},gt={},At={},vt={},yt={},bt={},xt={},wt={},_t={},Et={},Mt={},St={},Ct={},Tt={},It={},Rt={},Bt={},kt={},Lt={},Pt={},Dt={},Ut={},Ot=function(t,e,r){var n,i,a,o=y(t);if(e){if(i=this.parse(o))throw new I(i);this.searchParams=null}else{if(void 0!==r&&(n=new Ot(r,!0)),i=this.parse(o,null,n))throw new I(i);(a=C(new S)).bindURL(this),this.searchParams=a}};Ot.prototype={type:"URL",parse:function(t,e,r){var i,a,o,s,c,l=this,u=e||gt,h=0,f="",p=!1,A=!1,v=!1;for(t=y(t),e||(l.scheme="",l.username="",l.password="",l.host=null,l.port=null,l.path=[],l.query=null,l.fragment=null,l.cannotBeABaseURL=!1,t=N(t,nt,""),t=N(t,it,"$1")),t=N(t,at,""),i=m(t);h<=i.length;){switch(a=i[h],u){case gt:if(!a||!P(X,a)){if(e)return j;u=vt;continue}f+=V(a),u=At;break;case At:if(a&&(P(q,a)||"+"===a||"-"===a||"."===a))f+=V(a);else{if(":"!==a){if(e)return j;f="",u=vt,h=0;continue}if(e&&(l.isSpecial()!==d(ft,f)||"file"===f&&(l.includesCredentials()||null!==l.port)||"file"===l.scheme&&!l.host))return;if(l.scheme=f,e)return void(l.isSpecial()&&ft[l.scheme]===l.port&&(l.port=null));f="","file"===l.scheme?u=It:l.isSpecial()&&r&&r.scheme===l.scheme?u=yt:l.isSpecial()?u=_t:"/"===i[h+1]?(u=bt,h++):(l.cannotBeABaseURL=!0,F(l.path,""),u=Pt)}break;case vt:if(!r||r.cannotBeABaseURL&&"#"!==a)return j;if(r.cannotBeABaseURL&&"#"===a){l.scheme=r.scheme,l.path=g(r.path),l.query=r.query,l.fragment="",l.cannotBeABaseURL=!0,u=Ut;break}u="file"===r.scheme?It:xt;continue;case yt:if("/"!==a||"/"!==i[h+1]){u=xt;continue}u=Et,h++;break;case bt:if("/"===a){u=Mt;break}u=Lt;continue;case xt:if(l.scheme=r.scheme,a===n)l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=g(r.path),l.query=r.query;else if("/"===a||"\\"===a&&l.isSpecial())u=wt;else if("?"===a)l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=g(r.path),l.query="",u=Dt;else{if("#"!==a){l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=g(r.path),l.path.length--,u=Lt;continue}l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=g(r.path),l.query=r.query,l.fragment="",u=Ut}break;case wt:if(!l.isSpecial()||"/"!==a&&"\\"!==a){if("/"!==a){l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,u=Lt;continue}u=Mt}else u=Et;break;case _t:if(u=Et,"/"!==a||"/"!==L(f,h+1))continue;h++;break;case Et:if("/"!==a&&"\\"!==a){u=Mt;continue}break;case Mt:if("@"===a){p&&(f="%40"+f),p=!0,o=m(f);for(var b=0;b65535)return H;l.port=l.isSpecial()&&_===ft[l.scheme]?null:_,f=""}if(e)return;u=kt;continue}return H}f+=a;break;case It:if(l.scheme="file","/"===a||"\\"===a)u=Rt;else{if(!r||"file"!==r.scheme){u=Lt;continue}switch(a){case n:l.host=r.host,l.path=g(r.path),l.query=r.query;break;case"?":l.host=r.host,l.path=g(r.path),l.query="",u=Dt;break;case"#":l.host=r.host,l.path=g(r.path),l.query=r.query,l.fragment="",u=Ut;break;default:pt(D(g(i,h),""))||(l.host=r.host,l.path=g(r.path),l.shortenPath()),u=Lt;continue}}break;case Rt:if("/"===a||"\\"===a){u=Bt;break}r&&"file"===r.scheme&&!pt(D(g(i,h),""))&&(dt(r.path[0],!0)?F(l.path,r.path[0]):l.host=r.host),u=Lt;continue;case Bt:if(a===n||"/"===a||"\\"===a||"?"===a||"#"===a){if(!e&&dt(f))u=Lt;else if(""===f){if(l.host="",e)return;u=kt}else{if(s=l.parseHost(f))return s;if("localhost"===l.host&&(l.host=""),e)return;f="",u=kt}continue}f+=a;break;case kt:if(l.isSpecial()){if(u=Lt,"/"!==a&&"\\"!==a)continue}else if(e||"?"!==a)if(e||"#"!==a){if(a!==n&&(u=Lt,"/"!==a))continue}else l.fragment="",u=Ut;else l.query="",u=Dt;break;case Lt:if(a===n||"/"===a||"\\"===a&&l.isSpecial()||!e&&("?"===a||"#"===a)){if(".."===(c=V(c=f))||"%2e."===c||".%2e"===c||"%2e%2e"===c?(l.shortenPath(),"/"===a||"\\"===a&&l.isSpecial()||F(l.path,"")):mt(f)?"/"===a||"\\"===a&&l.isSpecial()||F(l.path,""):("file"===l.scheme&&!l.path.length&&dt(f)&&(l.host&&(l.host=""),f=L(f,0)+":"),F(l.path,f)),f="","file"===l.scheme&&(a===n||"?"===a||"#"===a))for(;l.path.length>1&&""===l.path[0];)z(l.path);"?"===a?(l.query="",u=Dt):"#"===a&&(l.fragment="",u=Ut)}else f+=ht(a,lt);break;case Pt:"?"===a?(l.query="",u=Dt):"#"===a?(l.fragment="",u=Ut):a!==n&&(l.path[0]+=ht(a,st));break;case Dt:e||"#"!==a?a!==n&&("'"===a&&l.isSpecial()?l.query+="%27":l.query+="#"===a?"%23":ht(a,st)):(l.fragment="",u=Ut);break;case Ut:a!==n&&(l.fragment+=ht(a,ct))}h++}},parseHost:function(t){var e,r,n;if("["===L(t,0)){if("]"!==L(t,t.length-1))return W;if(e=function(t){var e,r,n,i,a,o,s,c=[0,0,0,0,0,0,0,0],l=0,u=null,h=0,f=function(){return L(t,h)};if(":"===f()){if(":"!==L(t,1))return;h+=2,u=++l}for(;f();){if(8===l)return;if(":"!==f()){for(e=r=0;r<4&&P(tt,f());)e=16*e+R(f(),16),h++,r++;if("."===f()){if(0===r)return;if(h-=r,l>6)return;for(n=0;f();){if(i=null,n>0){if(!("."===f()&&n<4))return;h++}if(!P(Y,f()))return;for(;P(Y,f());){if(a=R(f(),10),null===i)i=a;else{if(0===i)return;i=10*i+a}if(i>255)return;h++}c[l]=256*c[l]+i,2!=++n&&4!==n||l++}if(4!==n)return;break}if(":"===f()){if(h++,!f())return}else if(f())return;c[l++]=e}else{if(null!==u)return;h++,u=++l}}if(null!==u)for(o=l-u,l=7;0!==l&&o>0;)s=c[l],c[l--]=c[u+o-1],c[u+--o]=s;else if(8!==l)return;return c}(Z(t,1,-1)),!e)return W;this.host=e}else if(this.isSpecial()){if(t=v(t),P(et,t))return W;if(e=function(t){var e,r,n,i,a,o,s,c=G(t,".");if(c.length&&""===c[c.length-1]&&c.length--,(e=c.length)>4)return t;for(r=[],n=0;n1&&"0"===L(i,0)&&(a=P(J,i)?16:8,i=Z(i,8===a?1:2)),""===i)o=0;else{if(!P(10===a?$:8===a?K:tt,i))return t;o=R(i,a)}F(r,o)}for(n=0;n=k(256,5-e))return null}else if(o>255)return null;for(s=O(r),n=0;n1?arguments[1]:void 0,n=E(e,new Ot(t,!1,r));a||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},Nt=Ft.prototype,zt=function(t,e){return{get:function(){return M(this)[t]()},set:e&&function(t){return M(this)[e](t)},configurable:!0,enumerable:!0}};if(a&&(h(Nt,"href",zt("serialize","setHref")),h(Nt,"origin",zt("getOrigin")),h(Nt,"protocol",zt("getProtocol","setProtocol")),h(Nt,"username",zt("getUsername","setUsername")),h(Nt,"password",zt("getPassword","setPassword")),h(Nt,"host",zt("getHost","setHost")),h(Nt,"hostname",zt("getHostname","setHostname")),h(Nt,"port",zt("getPort","setPort")),h(Nt,"pathname",zt("getPathname","setPathname")),h(Nt,"search",zt("getSearch","setSearch")),h(Nt,"searchParams",zt("getSearchParams")),h(Nt,"hash",zt("getHash","setHash"))),u(Nt,"toJSON",(function(){return M(this).serialize()}),{enumerable:!0}),u(Nt,"toString",(function(){return M(this).serialize()}),{enumerable:!0}),T){var Gt=T.createObjectURL,Zt=T.revokeObjectURL;Gt&&u(Ft,"createObjectURL",c(Gt,T)),Zt&&u(Ft,"revokeObjectURL",c(Zt,T))}b(Ft,"URL"),i({global:!0,constructor:!0,forced:!o,sham:!a},{URL:Ft})},78730:(t,e,r)=>{"use strict";r(79391)},19979:(t,e,r)=>{"use strict";var n=r(79989),i=r(22615);n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return i(URL.prototype.toString,this)}})},30907:(t,e,r)=>{"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rn})},97326:(t,e,r)=>{"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}r.d(e,{Z:()=>n})},15861:(t,e,r)=>{"use strict";function n(t,e,r,n,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,a){var o=t.apply(e,r);function s(t){n(o,i,a,s,c,"next",t)}function c(t){n(o,i,a,s,c,"throw",t)}s(void 0)}))}}r.d(e,{Z:()=>i})},15671:(t,e,r)=>{"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,{Z:()=>n})},1519:(t,e,r)=>{"use strict";function n(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}r.d(e,{Z:()=>n})},86033:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(1519);function i(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,(0,n.Z)(t,e,"get"))}},13092:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(1519);function i(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,(0,n.Z)(t,e,"set"),r),r}},43144:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var n=r(49142);function i(t,e){for(var r=0;r{"use strict";r.d(e,{Z:()=>i});var n=r(49142);function i(t,e,r){return(e=(0,n.Z)(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},88301:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(18415);function i(){return i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=(0,n.Z)(t,e);if(i){var a=Object.getOwnPropertyDescriptor(i,e);return a.get?a.get.call(arguments.length<3?t:r):a.value}},i.apply(this,arguments)}},61120:(t,e,r)=>{"use strict";function n(t){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}r.d(e,{Z:()=>n})},79340:(t,e,r)=>{"use strict";function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)}r.d(e,{Z:()=>i})},82963:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var n=r(71002),i=r(97326);function a(t,e){if(e&&("object"===(0,n.Z)(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(t)}},70885:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(40181);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(t){l=!0,i=t}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(t,e)||(0,n.Z)(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},18415:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(61120);function i(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=(0,n.Z)(t)););return t}},42982:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var n=r(30907),i=r(40181);function a(t){return function(t){if(Array.isArray(t))return(0,n.Z)(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||(0,i.Z)(t)||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.")}()}},49142:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(71002);function i(t){var e=function(t,e){if("object"!==(0,n.Z)(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!==(0,n.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===(0,n.Z)(e)?e:String(e)}},71002:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r.d(e,{Z:()=>n})},40181:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(30907);function i(t,e){if(t){if("string"==typeof t)return(0,n.Z)(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?(0,n.Z)(t,e):void 0}}},92294:(t,e,r)=>{"use strict";r.d(e,{TE:()=>kr,th:()=>jr});var n={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},terrain:{type:"terrain",doc:"A global modifier that elevates layers and markers based on a DEM data source."},fog:{type:"fog",doc:"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features. Note: fog is renamed to atmosphere in the Android and iOS SDKs and planned to be changed in GL-JS v.3.0.0."},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},projection:{type:"projection",doc:"The projection the map should be rendered in. Supported projections are Mercator, Globe, Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Natural Earth, and Winkel Tripel. Terrain, sky and fog are supported by only Mercator and globe. CustomLayerInterface is not supported outside of Mercator.",example:{name:"albers",center:[-154,50],parallels:[55,65]}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`. If specified as a string for a vector tile source, the same property is used across all its source layers. If specified as an object only specified source layers will have id overriden, others will fallback to original feature id"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},sky:{doc:"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:'An expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `["feature-state", ...]` expression is not supported in filter expressions. The `["pitch"]` and `["distance-from-center"]` expressions are supported only for filter expressions on the symbol layer.'},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"},"fill-extrusion-edge-radius":{type:"number",private:!0,default:0,minimum:0,maximum:1,doc:"Radius of a fill extrusion edge in meters. If not zero, rounds extrusion edges for a smoother appearance.","sdk-support":{"basic functionality":{js:"v2.10.0",android:"10.7.0",ios:"10.7.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options. SDF images are not supported in formatted text and will be ignored.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0",android:"10.0.0",ios:"10.0.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either ['horizontal', 'vertical'] or ['vertical', 'horizontal'], the order doesn't affect the placement.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_symbol:{type:"boolean",doc:'Expression which determines whether or not to display a symbol. Symbols support dynamic filtering, meaning this expression can use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",doc:'Expression which determines whether or not to display a polygon. Fill layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",doc:'Expression which determines whether or not to display a Polygon or LineString. Line layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",doc:'Expression which determines whether or not to display a circle. Circle layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",doc:'Expression which determines whether or not to display a Polygon. Fill-extrusion layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",doc:'Expression used to determine whether a point is being displayed or not. Heatmap layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0",android:"10.0.0",ios:"10.0.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0",android:"10.0.0",ios:"10.0.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `["get", "building_type"]`). Each label must be unique, and must be either:\n - a single literal value; or\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `["c", "b"]`).\n\nThe input matches if any of the values in the array matches using strict equality, similar to the `"in"` operator.\nIf the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first valid value is obtained. Invalid values are `null` and [`'image'`](#types-image) expressions that are unavailable in the style. If all values are invalid, `coalesce` returns the first value listed.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns a [`ResolvedImage`](/mapbox-gl-js/style-spec/types/#resolvedimage) for use in [`icon-image`](/mapbox-gl-js/style-spec/layers/#layout-symbol-icon-image), `*-pattern` entries, and as a section in the [`'format'`](#types-format) expression. A [`'coalesce'`](#coalesce) expression containing `image` expressions will evaluate to the first listed image that is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `'image'` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `unit` argument specifies a [simple ECMAScript unit](https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier) to use for unit-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0",android:"8.4.0",ios:"5.4.0",macos:"0.15.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a [`boolean`](#types-boolean), the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a [`color`](#color), it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. If the input is an [`\'image\'`](#types-image) expression, `\'to-string\'` returns the image name. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns `null` if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Returns the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Returns the feature properties object. Note that in some cases, it may be more efficient to use `["get", "property_name"]` directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns `null` if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0",android:"10.0.0",ios:"10.0.0"}}},"geometry-type":{doc:"Returns the feature's geometry type: `Point`, `LineString` or `Polygon`. `Multi*` feature types return the singular forms.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Returns the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Returns the current zoom level. Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Camera","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pitch:{doc:'Returns the current pitch in degrees. `["pitch"]` may only be used in the `filter` expression for a `symbol` layer.',group:"Camera","sdk-support":{"basic functionality":{js:"2.6.0",android:"10.9.0",ios:"10.9.0"}}},"distance-from-center":{doc:'Returns the distance of a `symbol` instance from the center of the map. The distance is measured in pixels divided by the height of the map container. It measures 0 at the center, decreases towards the camera and increase away from the camera. For example, if the height of the map is 1000px, a value of -1 means 1000px away from the center towards the camera, and a value of 1 means a distance of 1000px away from the camera from the center. `["distance-from-center"]` may only be used in the `filter` expression for a `symbol` layer.',group:"Camera","sdk-support":{"basic functionality":{js:"2.6.0",android:"10.9.0",ios:"10.9.0"}}},"heatmap-density":{doc:"Returns the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Returns the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},"sky-radial-progress":{doc:"Returns the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.",group:"sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},accumulated:{doc:"Returns the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0",android:"8.4.0",ios:"5.5.0",macos:"0.15.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0",ios:"4.1.0",macos:"0.8.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.",example:[.5,10],"sdk-support":{"basic functionality":{js:"2.3.0",android:"10.6.0",ios:"10.6.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the atmosphere region immediately below the horizon and within the `range` and above the horizon and within `horizon-blend`. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{js:"2.3.0",android:"10.6.0",ios:"10.6.0"}}},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the atmosphere region above the horizon, `high-color` extends further above the horizon than the `color` property and its spread can be controlled with `horizon-blend`. The opacity can be set to `0` to remove the high atmosphere color contribution.","sdk-support":{"basic functionality":{js:"2.9.0",android:"10.6.0",ios:"10.6.0"}}},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the region above the horizon and after the end of the `horizon-blend` contribution. The opacity can be set to `0` to have a transparent background.","sdk-support":{"basic functionality":{js:"2.9.0",android:"10.6.0",ios:"10.6.0"}}},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Horizon blend applies a smooth fade from the color of the atmosphere to the color of space. A value of zero leaves a sharp transition from atmosphere to space. Increasing the value blends the color of atmosphere into increasingly high angles of the sky.","sdk-support":{"basic functionality":{js:"2.3.0",android:"10.6.0",ios:"10.6.0"}}},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"A value controlling the star intensity where `0` will show no stars and `1` will show stars at their maximum intensity.","sdk-support":{"basic functionality":{js:"2.9.0",android:"10.6.0",ios:"10.6.0"}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},projection:{name:{type:"enum",values:{albers:{doc:"An Albers equal-area projection centered on the continental United States. You can configure the projection for a different region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region."},equalEarth:{doc:"An Equal Earth projection."},equirectangular:{doc:"An Equirectangular projection. This projection is very similar to the Plate Carrée projection."},lambertConformalConic:{doc:"A Lambert conformal conic projection. You can configure the projection for a region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region."},mercator:{doc:"The Mercator projection is the default projection."},naturalEarth:{doc:"A Natural Earth projection."},winkelTripel:{doc:"A Winkel Tripel projection."},globe:{doc:"A globe projection."}},default:"mercator",doc:"The name of the projection to be used for rendering the map.",required:!0,"sdk-support":{"basic functionality":{js:"2.6.0"}}},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,doc:"The reference longitude and latitude of the projection. `center` takes the form of [lng, lat]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic). All other projections are centered on [0, 0].",example:[-96,37.5],requires:[{name:["albers","lambertConformalConic"]}],"sdk-support":{"basic functionality":{js:"2.6.0"}}},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,doc:"The standard parallels of the projection, denoting the desired latitude range with minimal distortion. `parallels` takes the form of [lat0, lat1]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic).",example:[29.5,45.5],requires:[{name:["albers","lambertConformalConic"]}],"sdk-support":{"basic functionality":{js:"2.6.0"}}}},terrain:{source:{type:"string",doc:"Name of a source of `raster_dem` type to be used for terrain elevation.",required:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.",requires:["source"],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!1,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!1,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",android:"7.0.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant",type:"number",private:!0,default:0,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Controls the intensity of shading near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.","sdk-support":{"basic functionality":{js:"2.10.0",android:"10.7.0",ios:"10.7.0"}}},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant",type:"number",private:!0,default:3,minimum:0,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings.",requires:["fill-extrusion-edge-radius"],"sdk-support":{"basic functionality":{js:"2.10.0",android:"10.7.0",ios:"10.7.0"}}}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!1,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{type:"resolvedImage",transition:!1,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",doc:"The line part between [trim-start, trim-end] will be marked as transparent to make a route vanishing effect. The line trim-off offset is based on the whole line range [0.0, 1.0].",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"2.9.0",android:"10.5.0",ios:"10.5.0",macos:"10.5.0"}},"property-type":"constant"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. `queryRenderedFeatures` on heatmap layers will return points within this radius.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!1,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{doc:"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},atmosphere:{doc:"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},default:"atmosphere",doc:"The type of the sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,doc:"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,doc:"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],doc:"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.",transition:!1,requires:[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",doc:"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",doc:"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire sky layer.",transition:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}}},i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},a={},o={exports:{}};!function(t,e){!function(r){var n=e&&!e.nodeType&&e,a=t&&!t.nodeType&&t,o="object"==typeof i&&i;o.global!==o&&o.window!==o&&o.self!==o||(r=o);var s,c,l=2147483647,u=36,h=26,f=38,d=700,p=/^xn--/,m=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,A={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=u-1,y=Math.floor,b=String.fromCharCode;function x(t){throw RangeError(A[t])}function w(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function _(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+w((t=t.replace(g,".")).split("."),e).join(".")}function E(t){for(var e,r,n=[],i=0,a=t.length;i=55296&&e<=56319&&i65535&&(e+=b((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+b(t)})).join("")}function S(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function C(t,e,r){var n=0;for(t=r?y(t/d):t>>1,t+=y(t/e);t>v*h>>1;n+=u)t=y(t/v);return y(n+(v+1)*t/(t+f))}function T(t){var e,r,n,i,a,o,s,c,f,d,p,m=[],g=t.length,A=0,v=128,b=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&x("not-basic"),m.push(t.charCodeAt(n));for(i=r>0?r+1:0;i=g&&x("invalid-input"),((c=(p=t.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:u)>=u||c>y((l-A)/o))&&x("overflow"),A+=c*o,!(c<(f=s<=b?1:s>=b+h?h:s-b));s+=u)o>y(l/(d=u-f))&&x("overflow"),o*=d;b=C(A-a,e=m.length+1,0==a),y(A/e)>l-v&&x("overflow"),v+=y(A/e),A%=e,m.splice(A++,0,v)}return M(m)}function I(t){var e,r,n,i,a,o,s,c,f,d,p,m,g,A,v,w=[];for(m=(t=E(t)).length,e=128,r=0,a=72,o=0;o=e&&py((l-r)/(g=n+1))&&x("overflow"),r+=(s-e)*g,e=s,o=0;ol&&x("overflow"),p==e){for(c=r,f=u;!(c<(d=f<=a?1:f>=a+h?h:f-a));f+=u)v=c-d,A=u-d,w.push(b(S(d+v%A,0))),c=y(v/A);w.push(b(S(c,0))),a=C(r,g,n==i),r=0,++n}++r,++e}return w.join("")}if(s={version:"1.3.2",ucs2:{decode:E,encode:M},decode:T,encode:I,toASCII:function(t){return _(t,(function(t){return m.test(t)?"xn--"+I(t):t}))},toUnicode:function(t){return _(t,(function(t){return p.test(t)?T(t.slice(4).toLowerCase()):t}))}},n&&a)if(t.exports==n)a.exports=s;else for(c in s)s.hasOwnProperty(c)&&(n[c]=s[c]);else r.punycode=s}(i)}(o,o.exports);var s={};function c(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var l=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};s.decode=s.parse=function(t,e,r,n){e=e||"&",r=r||"=";var i={};if("string"!=typeof t||0===t.length)return i;var a=/\+/g;t=t.split(e);var o=1e3;n&&"number"==typeof n.maxKeys&&(o=n.maxKeys);var s=t.length;o>0&&s>o&&(s=o);for(var l=0;l=0?(u=p.substr(0,m),h=p.substr(m+1)):(u=p,h=""),f=decodeURIComponent(u),d=decodeURIComponent(h),c(i,f)?Array.isArray(i[f])?i[f].push(d):i[f]=[i[f],d]:i[f]=d}return i},s.encode=s.stringify=function(t,e,r,n){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(n){var i=encodeURIComponent(l(n))+r;return Array.isArray(t[n])?t[n].map((function(t){return i+encodeURIComponent(l(t))})).join(e):i+encodeURIComponent(l(t[n]))})).join(e):n?encodeURIComponent(l(n))+r+encodeURIComponent(l(t)):""};var u=o.exports,h=function(t){return"string"==typeof t},f=function(t){return"object"==typeof t&&null!==t},d=function(t){return null===t},p=function(t){return null==t};function m(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}a.parse=I,a.resolve=function(t,e){return I(t,!1,!0).resolve(e)},a.resolveObject=function(t,e){return t?I(t,!1,!0).resolveObject(e):e},a.format=function(t){return h(t)&&(t=I(t)),t instanceof m?t.format():m.prototype.format.call(t)},a.Url=m;var g=/^([a-z0-9.+-]+:)/i,A=/:[0-9]*$/,v=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,y=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),b=["'"].concat(y),x=["%","/","?",";","#"].concat(b),w=["/","?","#"],_=/^[+a-z0-9A-Z_-]{0,63}$/,E=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,M={javascript:!0,"javascript:":!0},S={javascript:!0,"javascript:":!0},C={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},T=s;function I(t,e,r){if(t&&f(t)&&t instanceof m)return t;var n=new m;return n.parse(t,e,r),n}function R(t,...e){for(const r of e)for(const e in r)t[e]=r[e];return t}m.prototype.parse=function(t,e,r){if(!h(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=-1!==n&&n127?L+="x":L+=k[P];if(!L.match(_)){var U=R.slice(0,A),O=R.slice(A+1),F=k.match(E);F&&(U.push(F[1]),O.unshift(F[2])),O.length&&(o="/"+O.join(".")+o),this.hostname=U.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=u.toASCII(this.hostname));var N=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+N,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!M[l])for(A=0,B=b.length;A0)&&r.host.split("@"))&&(r.auth=B.shift(),r.host=r.hostname=B.shift())),r.search=t.search,r.query=t.query,d(r.pathname)&&d(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var M=_.slice(-1)[0],T=(r.host||t.host||_.length>1)&&("."===M||".."===M)||""===M,I=0,R=_.length;R>=0;R--)"."===(M=_[R])?_.splice(R,1):".."===M?(_.splice(R,1),I++):I&&(_.splice(R,1),I--);if(!x&&!w)for(;I--;I)_.unshift("..");!x||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),T&&"/"!==_.join("/").substr(-1)&&_.push("");var B,k=""===_[0]||_[0]&&"/"===_[0].charAt(0);return E&&(r.hostname=r.host=k?"":_.length?_.shift():"",(B=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=B.shift(),r.host=r.hostname=B.shift())),(x=x||r.host&&_.length)&&!k&&_.unshift(""),_.length?r.pathname=_.join("/"):(r.pathname=null,r.path=null),d(r.pathname)&&d(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},m.prototype.parseHost=function(){var t=this.host,e=A.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};class B extends Error{constructor(t,e){super(e),this.message=e,this.key=t}}var k=B;class L{constructor(t,e=[]){this.parent=t,this.bindings={};for(const[t,r]of e)this.bindings[t]=r}concat(t){return new L(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}var P=L;const D={kind:"null"},U={kind:"number"},O={kind:"string"},F={kind:"boolean"},N={kind:"color"},z={kind:"object"},G={kind:"value"},Z={kind:"collator"},V={kind:"formatted"},Q={kind:"resolvedImage"};function j(t,e){return{kind:"array",itemType:t,N:e}}function W(t){if("array"===t.kind){const e=W(t.itemType);return"number"==typeof t.N?`array<${e}, ${t.N}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}const H=[D,U,O,F,N,V,z,j(G),Q];function X(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!X(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(const t of H)if(!X(t,e))return null}return`Expected ${W(t)} but found ${W(e)} instead.`}function q(t,e){return e.some((e=>e.kind===t.kind))}function Y(t,e){return e.some((e=>"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t))}var J,K={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function $(t){return(t=Math.round(t))<0?0:t>255?255:t}function tt(t){return t<0?0:t>1?1:t}function et(t){return"%"===t[t.length-1]?$(parseFloat(t)/100*255):$(parseInt(t))}function rt(t){return"%"===t[t.length-1]?tt(parseFloat(t)/100):tt(parseFloat(t))}function nt(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{J={}.parseCSSColor=function(t){var e,r=t.replace(/ /g,"").toLowerCase();if(r in K)return K[r].slice();if("#"===r[0])return 4===r.length?(e=parseInt(r.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===r.length&&(e=parseInt(r.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var n=r.indexOf("("),i=r.indexOf(")");if(-1!==n&&i+1===r.length){var a=r.substr(0,n),o=r.substr(n+1,i-(n+1)).split(","),s=1;switch(a){case"rgba":if(4!==o.length)return null;s=rt(o.pop());case"rgb":return 3!==o.length?null:[et(o[0]),et(o[1]),et(o[2]),s];case"hsla":if(4!==o.length)return null;s=rt(o.pop());case"hsl":if(3!==o.length)return null;var c=(parseFloat(o[0])%360+360)%360/360,l=rt(o[1]),u=rt(o[2]),h=u<=.5?u*(l+1):u+l-u*l,f=2*u-h;return[$(255*nt(f,h,c+1/3)),$(255*nt(f,h,c)),$(255*nt(f,h,c-1/3)),s];default:return null}}return null}}catch(t){}class it{constructor(t,e,r,n=1){this.r=t,this.g=e,this.b=r,this.a=n}static parse(t){if(!t)return;if(t instanceof it)return t;if("string"!=typeof t)return;const e=J(t);return e?new it(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3]):void 0}toString(){const[t,e,r,n]=this.toArray();return`rgba(${Math.round(t)},${Math.round(e)},${Math.round(r)},${n})`}toArray(){const{r:t,g:e,b:r,a:n}=this;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*r/n,n]}toArray01(){const{r:t,g:e,b:r,a:n}=this;return 0===n?[0,0,0,0]:[t/n,e/n,r/n,n]}toArray01PremultipliedAlpha(){const{r:t,g:e,b:r,a:n}=this;return[t,e,r,n]}}it.black=new it(0,0,0,1),it.white=new it(1,1,1,1),it.transparent=new it(0,0,0,0),it.red=new it(1,0,0,1),it.blue=new it(0,0,1,1);var at=it;class ot{constructor(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class st{constructor(t,e,r,n,i){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i}}class ct{constructor(t){this.sections=t}static fromString(t){return new ct([new st(t,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((t=>0!==t.text.length||t.image&&0!==t.image.name.length))}static factory(t){return t instanceof ct?t:ct.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map((t=>t.text)).join("")}serialize(){const t=["format"];for(const e of this.sections){if(e.image){t.push(["image",e.image.name]);continue}t.push(e.text);const r={};e.fontStack&&(r["text-font"]=["literal",e.fontStack.split(",")]),e.scale&&(r["font-scale"]=e.scale),e.textColor&&(r["text-color"]=["rgba"].concat(e.textColor.toArray())),t.push(r)}return t}}class lt{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new lt({name:t,available:!1}):null}serialize(){return["image",this.name]}}function ut(t,e,r,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[t,e,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function ht(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof at)return!0;if(t instanceof ot)return!0;if(t instanceof ct)return!0;if(t instanceof lt)return!0;if(Array.isArray(t)){for(const e of t)if(!ht(e))return!1;return!0}if("object"==typeof t){for(const e in t)if(!ht(t[e]))return!1;return!0}return!1}function ft(t){if(null===t)return D;if("string"==typeof t)return O;if("boolean"==typeof t)return F;if("number"==typeof t)return U;if(t instanceof at)return N;if(t instanceof ot)return Z;if(t instanceof ct)return V;if(t instanceof lt)return Q;if(Array.isArray(t)){const e=t.length;let r;for(const e of t){const t=ft(e);if(r){if(r===t)continue;r=G;break}r=t}return j(r||G,e)}return z}function dt(t){const e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof at||t instanceof ct||t instanceof lt?t.toString():JSON.stringify(t)}class pt{constructor(t,e){this.type=t,this.value=e}static parse(t,e){if(2!==t.length)return e.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!ht(t[1]))return e.error("invalid value");const r=t[1];let n=ft(r);const i=e.expectedType;return"array"!==n.kind||0!==n.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(n=i),new pt(n,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof at?["rgba"].concat(this.value.toArray()):this.value instanceof ct?this.value.serialize():this.value}}var mt=pt,gt=class{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}};const At={string:O,number:U,boolean:F,object:z};class vt{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let r,n=1;const i=t[0];if("array"===i){let i,a;if(t.length>2){const r=t[1];if("string"!=typeof r||!(r in At)||"object"===r)return e.error('The item type argument of "array" must be one of string, number, boolean',1);i=At[r],n++}else i=G;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=t[2],n++}r=j(i,a)}else r=At[i];const a=[];for(;nt.outputDefined()))}serialize(){const t=this.type,e=[t.kind];if("array"===t.kind){const r=t.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){e.push(r.kind);const n=t.N;("number"==typeof n||this.args.length>1)&&e.push(n)}}return e.concat(this.args.map((t=>t.serialize())))}}var yt=vt;class bt{constructor(t){this.type=V,this.sections=t}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");const n=[];let i=!1;for(let r=1;r<=t.length-1;++r){const a=t[r];if(i&&"object"==typeof a&&!Array.isArray(a)){i=!1;let t=null;if(a["font-scale"]&&(t=e.parse(a["font-scale"],1,U),!t))return null;let r=null;if(a["text-font"]&&(r=e.parse(a["text-font"],1,j(O)),!r))return null;let o=null;if(a["text-color"]&&(o=e.parse(a["text-color"],1,N),!o))return null;const s=n[n.length-1];s.scale=t,s.font=r,s.textColor=o}else{const a=e.parse(t[r],1,G);if(!a)return null;const o=a.type.kind;if("string"!==o&&"value"!==o&&"null"!==o&&"resolvedImage"!==o)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:a,scale:null,font:null,textColor:null})}}return new bt(n)}evaluate(t){return new ct(this.sections.map((e=>{const r=e.content.evaluate(t);return ft(r)===Q?new st("",r,null,null,null):new st(dt(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))}eachChild(t){for(const e of this.sections)t(e.content),e.scale&&t(e.scale),e.font&&t(e.font),e.textColor&&t(e.textColor)}outputDefined(){return!1}serialize(){const t=["format"];for(const e of this.sections){t.push(e.content.serialize());const r={};e.scale&&(r["font-scale"]=e.scale.serialize()),e.font&&(r["text-font"]=e.font.serialize()),e.textColor&&(r["text-color"]=e.textColor.serialize()),t.push(r)}return t}}class xt{constructor(t){this.type=Q,this.input=t}static parse(t,e){if(2!==t.length)return e.error("Expected two arguments.");const r=e.parse(t[1],1,O);return r?new xt(r):e.error("No image name provided.")}evaluate(t){const e=this.input.evaluate(t),r=lt.fromString(e);return r&&t.availableImages&&(r.available=t.availableImages.indexOf(e)>-1),r}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const wt={"to-boolean":F,"to-color":N,"to-number":U,"to-string":O};class _t{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");const n=wt[r],i=[];for(let r=1;r4?`Invalid rbga value ${JSON.stringify(e)}: expected an array containing either three or four numeric values.`:ut(e[0],e[1],e[2],e[3]),!r))return new at(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new gt(r||`Could not parse color from value '${"string"==typeof e?e:String(JSON.stringify(e))}'`)}if("number"===this.type.kind){let e=null;for(const r of this.args){if(e=r.evaluate(t),null===e)return 0;const n=Number(e);if(!isNaN(n))return n}throw new gt(`Could not convert ${JSON.stringify(e)} to number.`)}return"formatted"===this.type.kind?ct.fromString(dt(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?lt.fromString(dt(this.args[0].evaluate(t))):dt(this.args[0].evaluate(t))}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){if("formatted"===this.type.kind)return new bt([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new xt(this.args[0]).serialize();const t=[`to-${this.type.kind}`];return this.eachChild((e=>{t.push(e.serialize())})),t}}var Et=_t;const Mt=["Unknown","Point","LineString","Polygon"];var St=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&void 0!==this.feature.id?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?Mt[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const t=this.featureDistanceData.center,e=this.featureDistanceData.scale,{x:r,y:n}=this.featureTileCoord,i=r*e-t[0],a=n*e-t[1];return this.featureDistanceData.bearing[0]*i+this.featureDistanceData.bearing[1]*a}return 0}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=at.parse(t)),e}};class Ct{constructor(t,e,r,n){this.name=t,this.type=e,this._evaluate=r,this.args=n}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map((t=>t.serialize())))}static parse(t,e){const r=t[0],n=Ct.definitions[r];if(!n)return e.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const i=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,o=a.filter((([e])=>!Array.isArray(e)||e.length===t.length-1));let s=null;for(const[n,a]of o){s=new ee(e.registry,e.path,null,e.scope);const o=[];let c=!1;for(let e=1;e{return e=t,Array.isArray(e)?`(${e.map(W).join(", ")})`:`(${W(e.type)}...)`;var e})).join(" | "),n=[];for(let r=1;r=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Lt(t,e){const r=(180+t[0])/360,n=(i=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360);var i;const a=Math.pow(2,e.z);return[Math.round(r*a*Rt),Math.round(n*a*Rt)]}function Pt(t,e,r){const n=t[0]-e[0],i=t[1]-e[1],a=t[0]-r[0],o=t[1]-r[1];return n*o-a*i==0&&n*a<=0&&i*o<=0}function Dt(t,e){let r=!1;for(let o=0,s=e.length;on[1]!=a[1]>n[1]&&n[0]<(a[0]-i[0])*(n[1]-i[1])/(a[1]-i[1])+i[0]&&(r=!r)}}var n,i,a;return r}function Ut(t,e){for(let r=0;r0&&h<0||u<0&&h>0}function Ft(t,e,r,n){const i=[e[0]-t[0],e[1]-t[1]];return 0!=(a=[n[0]-r[0],n[1]-r[1]])[0]*(o=i)[1]-a[1]*o[0]&&!(!Ot(t,e,r,n)||!Ot(r,n,t,e));var a,o}function Nt(t,e,r){for(const n of r)for(let r=0;rr[2]){const e=.5*n;let i=t[0]-r[0]>e?-n:r[0]-t[0]>e?n:0;0===i&&(i=t[0]-r[2]>e?-n:r[2]-t[0]>e?n:0),t[0]+=i}Bt(e,t)}function jt(t,e,r,n){const i=Math.pow(2,n.z)*Rt,a=[n.x*Rt,n.y*Rt],o=[];if(!t)return o;for(const n of t)for(const t of n){const n=[t.x+a[0],t.y+a[1]];Qt(n,e,r,i),o.push(n)}return o}function Wt(t,e,r,n){const i=Math.pow(2,n.z)*Rt,a=[n.x*Rt,n.y*Rt],o=[];if(!t)return o;for(const r of t){const t=[];for(const n of r){const r=[n.x+a[0],n.y+a[1]];Bt(e,r),t.push(r)}o.push(t)}if(e[2]-e[0]<=i/2){(s=e)[0]=s[1]=1/0,s[2]=s[3]=-1/0;for(const t of o)for(const n of t)Qt(n,e,r,i)}var s;return o}class Ht{constructor(t,e){this.type=F,this.geojson=t,this.geometries=e}static parse(t,e){if(2!==t.length)return e.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(ht(t[1])){const e=t[1];if("FeatureCollection"===e.type)for(let t=0;t{e&&!qt(t)&&(e=!1)})),e}function Yt(t){if(t instanceof Tt&&"feature-state"===t.name)return!1;let e=!0;return t.eachChild((t=>{e&&!Yt(t)&&(e=!1)})),e}function Jt(t,e){if(t instanceof Tt&&e.indexOf(t.name)>=0)return!1;let r=!0;return t.eachChild((t=>{r&&!Jt(t,e)&&(r=!1)})),r}class Kt{constructor(t,e){this.type=e.type,this.name=t,this.boundExpression=e}static parse(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");const r=t[1];return e.scope.has(r)?new Kt(r,e.scope.get(r)):e.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var $t=Kt;class te{constructor(t,e=[],r,n=new P,i=[]){this.registry=t,this.path=e,this.key=e.map((t=>`[${t}]`)).join(""),this.scope=n,this.errors=i,this.expectedType=r}parse(t,e,r,n,i={}){return e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)}_parse(t,e){function r(t,e,r){return"assert"===r?new yt(e,[t]):"coerce"===r?new Et(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const n=t[0];if("string"!=typeof n)return this.error(`Expression name must be a string, but found ${typeof n} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const i=this.registry[n];if(i){let n=i.parse(t,this);if(!n)return null;if(this.expectedType){const t=this.expectedType,i=n.type;if("string"!==t.kind&&"number"!==t.kind&&"boolean"!==t.kind&&"object"!==t.kind&&"array"!==t.kind||"value"!==i.kind)if("color"!==t.kind&&"formatted"!==t.kind&&"resolvedImage"!==t.kind||"value"!==i.kind&&"string"!==i.kind){if(this.checkSubtype(t,i))return null}else n=r(n,t,e.typeAnnotation||"coerce");else n=r(n,t,e.typeAnnotation||"assert")}if(!(n instanceof mt)&&"resolvedImage"!==n.type.kind&&re(n)){const t=new St;try{n=new mt(n.type,n.evaluate(t))}catch(t){return this.error(t.message),null}}return n}return this.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof t} instead.`)}concat(t,e,r){const n="number"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new te(this.registry,n,e||null,i,this.errors)}error(t,...e){const r=`${this.key}${e.map((t=>`[${t}]`)).join("")}`;this.errors.push(new k(r,t))}checkSubtype(t,e){const r=X(t,e);return r&&this.error(r),r}}var ee=te;function re(t){if(t instanceof $t)return re(t.boundExpression);if(t instanceof Tt&&"error"===t.name)return!1;if(t instanceof It)return!1;if(t instanceof Xt)return!1;const e=t instanceof Et||t instanceof yt;let r=!0;return t.eachChild((t=>{r=e?r&&re(t):r&&t instanceof mt})),!!r&&qt(t)&&Jt(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function ne(t,e){const r=t.length-1;let n,i,a=0,o=r,s=0;for(;a<=o;)if(s=Math.floor((a+o)/2),n=t[s],i=t[s+1],n<=e){if(s===r||ee))throw new gt("Input is not a number.");o=s-1}return 0}class ie{constructor(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(const[t,e]of r)this.labels.push(t),this.outputs.push(e)}static parse(t,e){if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");const r=e.parse(t[1],1,U);if(!r)return null;const n=[];let i=null;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(let r=1;r=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);const l=e.parse(o,c,i);if(!l)return null;i=i||l.type,n.push([a,l])}return new ie(i,r,n)}evaluate(t){const e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);const n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);const i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[ne(e,n)].evaluate(t)}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){const t=["step",this.input.serialize()];for(let e=0;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t}}var ae=ie,oe=se;function se(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=e,this.p2x=r,this.p2y=n}function ce(t,e,r){return t*(1-r)+e*r}se.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,e){if(void 0===e&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(var r=t,n=0;n<8;n++){var i=this.sampleCurveX(r)-t;if(Math.abs(i)i?o=r:s=r,r=.5*(s-o)+o;return r},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}};var le=Object.freeze({__proto__:null,number:ce,color:function(t,e,r){return new at(ce(t.r,e.r,r),ce(t.g,e.g,r),ce(t.b,e.b,r),ce(t.a,e.a,r))},array:function(t,e,r){return t.map(((t,n)=>ce(t,e[n],r)))}});const ue=.95047,he=1.08883,fe=4/29,de=6/29,pe=3*de*de,me=de*de*de,ge=Math.PI/180,Ae=180/Math.PI;function ve(t){return t>me?Math.pow(t,1/3):t/pe+fe}function ye(t){return t>de?t*t*t:pe*(t-fe)}function be(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function xe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function we(t){const e=xe(t.r),r=xe(t.g),n=xe(t.b),i=ve((.4124564*e+.3575761*r+.1804375*n)/ue),a=ve((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*a-16,a:500*(i-a),b:200*(a-ve((.0193339*e+.119192*r+.9503041*n)/he)),alpha:t.a}}function _e(t){let e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=1*ye(e),r=ue*ye(r),n=he*ye(n),new at(be(3.2404542*r-1.5371385*e-.4985314*n),be(-.969266*r+1.8760108*e+.041556*n),be(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function Ee(t,e,r){const n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}const Me={forward:we,reverse:_e,interpolate:function(t,e,r){return{l:ce(t.l,e.l,r),a:ce(t.a,e.a,r),b:ce(t.b,e.b,r),alpha:ce(t.alpha,e.alpha,r)}}},Se={forward:function(t){const{l:e,a:r,b:n}=we(t),i=Math.atan2(n,r)*Ae;return{h:i<0?i+360:i,c:Math.sqrt(r*r+n*n),l:e,alpha:t.a}},reverse:function(t){const e=t.h*ge,r=t.c;return _e({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:Ee(t.h,e.h,r),c:ce(t.c,e.c,r),l:ce(t.l,e.l,r),alpha:ce(t.alpha,e.alpha,r)}}};var Ce=Object.freeze({__proto__:null,lab:Me,hcl:Se});class Te{constructor(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(const[t,e]of i)this.labels.push(t),this.outputs.push(e)}static interpolationFactor(t,e,r,n){let i=0;if("exponential"===t.name)i=Ie(e,t.base,r,n);else if("linear"===t.name)i=Ie(e,1,r,n);else if("cubic-bezier"===t.name){const a=t.controlPoints;i=new oe(a[0],a[1],a[2],a[3]).solve(Ie(e,1,r,n))}return i}static parse(t,e){let[r,n,i,...a]=t;if(!Array.isArray(n)||0===n.length)return e.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){const t=n[1];if("number"!=typeof t)return e.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:t}}else{if("cubic-bezier"!==n[0])return e.error(`Unknown interpolation type ${String(n[0])}`,1,0);{const t=n.slice(1);if(4!==t.length||t.some((t=>"number"!=typeof t||t<0||t>1)))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:t}}}if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(i=e.parse(i,2,U),!i)return null;const o=[];let s=null;"interpolate-hcl"===r||"interpolate-lab"===r?s=N:e.expectedType&&"value"!==e.expectedType.kind&&(s=e.expectedType);for(let t=0;t=r)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',i);const l=e.parse(n,c,s);if(!l)return null;s=s||l.type,o.push([r,l])}return"number"===s.kind||"color"===s.kind||"array"===s.kind&&"number"===s.itemType.kind&&"number"==typeof s.N?new Te(s,r,n,i,o):e.error(`Type ${W(s)} is not interpolatable.`)}evaluate(t){const e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);const n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);const i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);const a=ne(e,n),o=e[a],s=e[a+1],c=Te.interpolationFactor(this.interpolation,n,o,s),l=r[a].evaluate(t),u=r[a+1].evaluate(t);return"interpolate"===this.operator?le[this.type.kind.toLowerCase()](l,u,c):"interpolate-hcl"===this.operator?Se.reverse(Se.interpolate(Se.forward(l),Se.forward(u),c)):Me.reverse(Me.interpolate(Me.forward(l),Me.forward(u),c))}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){let t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const e=[this.operator,t,this.input.serialize()];for(let t=0;tX(n,t.type)));return new Be(a?G:r,i)}evaluate(t){let e,r=null,n=0;for(const i of this.args){if(n++,r=i.evaluate(t),r&&r instanceof lt&&!r.available&&(e||(e=r),r=null,n===this.args.length))return e;if(null!==r)break}return r}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){const t=["coalesce"];return this.eachChild((e=>{t.push(e.serialize())})),t}}var ke=Be;class Le{constructor(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const e of this.bindings)t(e[1]);t(this.result)}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const r=[];for(let n=1;n=r.length)throw new gt(`Array index out of bounds: ${e} > ${r.length-1}.`);if(e!==Math.floor(e))throw new gt(`Array index must be an integer, but found ${e} instead.`);return r[e]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var Ue=De;class Oe{constructor(t,e){this.type=F,this.needle=t,this.haystack=e}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,G),n=e.parse(t[2],2,G);return r&&n?q(r.type,[F,O,U,D,G])?new Oe(r,n):e.error(`Expected first argument to be of type boolean, string, number or null, but found ${W(r.type)} instead`):null}evaluate(t){const e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(null==r)return!1;if(!Y(e,["boolean","string","number","null"]))throw new gt(`Expected first argument to be of type boolean, string, number or null, but found ${W(ft(e))} instead.`);if(!Y(r,["string","array"]))throw new gt(`Expected second argument to be of type array or string, but found ${W(ft(r))} instead.`);return r.indexOf(e)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var Fe=Oe;class Ne{constructor(t,e,r){this.type=U,this.needle=t,this.haystack=e,this.fromIndex=r}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,G),n=e.parse(t[2],2,G);if(!r||!n)return null;if(!q(r.type,[F,O,U,D,G]))return e.error(`Expected first argument to be of type boolean, string, number or null, but found ${W(r.type)} instead`);if(4===t.length){const i=e.parse(t[3],3,U);return i?new Ne(r,n,i):null}return new Ne(r,n)}evaluate(t){const e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!Y(e,["boolean","string","number","null"]))throw new gt(`Expected first argument to be of type boolean, string, number or null, but found ${W(ft(e))} instead.`);if(!Y(r,["string","array"]))throw new gt(`Expected second argument to be of type array or string, but found ${W(ft(r))} instead.`);if(this.fromIndex){const n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var ze=Ne;class Ge{constructor(t,e,r,n,i,a){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a}static parse(t,e){if(t.length<5)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return e.error("Expected an even number of arguments.");let r,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);const i={},a=[];for(let o=2;oNumber.MAX_SAFE_INTEGER)return l.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof t&&Math.floor(t)!==t)return l.error("Numeric branch labels must be integer values.");if(r){if(l.checkSubtype(r,ft(t)))return null}else r=ft(t);if(void 0!==i[String(t)])return l.error("Branch labels must be unique.");i[String(t)]=a.length}const u=e.parse(c,o,n);if(!u)return null;n=n||u.type,a.push(u)}const o=e.parse(t[1],1,G);if(!o)return null;const s=e.parse(t[t.length-1],t.length-1,n);return s?"value"!==o.type.kind&&e.concat(1).checkSubtype(r,o.type)?null:new Ge(r,n,o,i,a,s):null}evaluate(t){const e=this.input.evaluate(t);return(ft(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["match",this.input.serialize()],e=Object.keys(this.cases).sort(),r=[],n={};for(const t of e){const e=n[this.cases[t]];void 0===e?(n[this.cases[t]]=r.length,r.push([this.cases[t],[t]])):r[e][1].push(t)}const i=t=>"number"===this.inputType.kind?Number(t):t;for(const[e,n]of r)1===n.length?t.push(i(n[0])):t.push(n.map(i)),t.push(this.outputs[e].serialize());return t.push(this.otherwise.serialize()),t}}var Ze=Ge;class Ve{constructor(t,e,r){this.type=t,this.branches=e,this.otherwise=r}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return e.error("Expected an odd number of arguments.");let r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);const n=[];for(let i=1;ie.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["case"];return this.eachChild((e=>{t.push(e.serialize())})),t}}var Qe=Ve;class je{constructor(t,e,r,n){this.type=t,this.input=e,this.beginIndex=r,this.endIndex=n}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,G),n=e.parse(t[2],2,U);if(!r||!n)return null;if(!q(r.type,[j(G),O,G]))return e.error(`Expected first argument to be of type array or string, but found ${W(r.type)} instead`);if(4===t.length){const i=e.parse(t[3],3,U);return i?new je(r.type,r,n,i):null}return new je(r.type,r,n)}evaluate(t){const e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!Y(e,["string","array"]))throw new gt(`Expected first argument to be of type array or string, but found ${W(ft(e))} instead.`);if(this.endIndex){const n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var We=je;function He(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function Xe(t,e,r,n){return 0===n.compare(e,r)}function qe(t,e,r){const n="=="!==t&&"!="!==t;return class i{constructor(t,e,r){this.type=F,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}static parse(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");const r=t[0];let a=e.parse(t[1],1,G);if(!a)return null;if(!He(r,a.type))return e.concat(1).error(`"${r}" comparisons are not supported for type '${W(a.type)}'.`);let o=e.parse(t[2],2,G);if(!o)return null;if(!He(r,o.type))return e.concat(2).error(`"${r}" comparisons are not supported for type '${W(o.type)}'.`);if(a.type.kind!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return e.error(`Cannot compare types '${W(a.type)}' and '${W(o.type)}'.`);n&&("value"===a.type.kind&&"value"!==o.type.kind?a=new yt(o.type,[a]):"value"!==a.type.kind&&"value"===o.type.kind&&(o=new yt(a.type,[o])));let s=null;if(4===t.length){if("string"!==a.type.kind&&"string"!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return e.error("Cannot use collator to compare non-string types.");if(s=e.parse(t[3],3,Z),!s)return null}return new i(a,o,s)}evaluate(i){const a=this.lhs.evaluate(i),o=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){const e=ft(a),r=ft(o);if(e.kind!==r.kind||"string"!==e.kind&&"number"!==e.kind)throw new gt(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${e.kind}, ${r.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const t=ft(a),r=ft(o);if("string"!==t.kind||"string"!==r.kind)return e(i,a,o)}return this.collator?r(i,a,o,this.collator.evaluate(i)):e(i,a,o)}eachChild(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}outputDefined(){return!0}serialize(){const e=[t];return this.eachChild((t=>{e.push(t.serialize())})),e}}}const Ye=qe("==",(function(t,e,r){return e===r}),Xe),Je=qe("!=",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!Xe(0,e,r,n)})),Ke=qe("<",(function(t,e,r){return e",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),tr=qe("<=",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),er=qe(">=",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0}));class rr{constructor(t,e,r,n,i,a){this.type=O,this.number=t,this.locale=e,this.currency=r,this.unit=n,this.minFractionDigits=i,this.maxFractionDigits=a}static parse(t,e){if(3!==t.length)return e.error("Expected two arguments.");const r=e.parse(t[1],1,U);if(!r)return null;const n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");let i=null;if(n.locale&&(i=e.parse(n.locale,1,O),!i))return null;let a=null;if(n.currency&&(a=e.parse(n.currency,1,O),!a))return null;let o=null;if(n.unit&&(o=e.parse(n.unit,1,O),!o))return null;let s=null;if(n["min-fraction-digits"]&&(s=e.parse(n["min-fraction-digits"],1,U),!s))return null;let c=null;return n["max-fraction-digits"]&&(c=e.parse(n["max-fraction-digits"],1,U),!c)?null:new rr(r,i,a,o,s,c)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(t):void 0,unit:this.unit?this.unit.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.unit&&t(this.unit),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.unit&&(t.unit=this.unit.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]}}class nr{constructor(t){this.type=U,this.input=t}static parse(t,e){if(2!==t.length)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error(`Expected argument of type string or array, but found ${W(r.type)} instead.`):new nr(r):null}evaluate(t){const e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new gt(`Expected value to be of type string or array, but found ${W(ft(e))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){const t=["length"];return this.eachChild((e=>{t.push(e.serialize())})),t}}const ir={"==":Ye,"!=":Je,">":$e,"<":Ke,">=":er,"<=":tr,array:yt,at:Ue,boolean:yt,case:Qe,coalesce:ke,collator:It,format:bt,image:xt,in:Fe,"index-of":ze,interpolate:Re,"interpolate-hcl":Re,"interpolate-lab":Re,length:nr,let:Pe,literal:mt,match:Ze,number:yt,"number-format":rr,object:yt,slice:We,step:ae,string:yt,"to-boolean":Et,"to-color":Et,"to-number":Et,"to-string":Et,var:$t,within:Xt};function ar(t,[e,r,n,i]){e=e.evaluate(t),r=r.evaluate(t),n=n.evaluate(t);const a=i?i.evaluate(t):1,o=ut(e,r,n,a);if(o)throw new gt(o);return new at(e/255*a,r/255*a,n/255*a,a)}function or(t,e){return t in e}function sr(t,e){const r=e[t];return void 0===r?null:r}function cr(t){return{type:t}}Tt.register(ir,{error:[{kind:"error"},[O],(t,[e])=>{throw new gt(e.evaluate(t))}],typeof:[O,[G],(t,[e])=>W(ft(e.evaluate(t)))],"to-rgba":[j(U,4),[N],(t,[e])=>e.evaluate(t).toArray()],rgb:[N,[U,U,U],ar],rgba:[N,[U,U,U,U],ar],has:{type:F,overloads:[[[O],(t,[e])=>or(e.evaluate(t),t.properties())],[[O,z],(t,[e,r])=>or(e.evaluate(t),r.evaluate(t))]]},get:{type:G,overloads:[[[O],(t,[e])=>sr(e.evaluate(t),t.properties())],[[O,z],(t,[e,r])=>sr(e.evaluate(t),r.evaluate(t))]]},"feature-state":[G,[O],(t,[e])=>sr(e.evaluate(t),t.featureState||{})],properties:[z,[],t=>t.properties()],"geometry-type":[O,[],t=>t.geometryType()],id:[G,[],t=>t.id()],zoom:[U,[],t=>t.globals.zoom],pitch:[U,[],t=>t.globals.pitch||0],"distance-from-center":[U,[],t=>t.distanceFromCenter()],"heatmap-density":[U,[],t=>t.globals.heatmapDensity||0],"line-progress":[U,[],t=>t.globals.lineProgress||0],"sky-radial-progress":[U,[],t=>t.globals.skyRadialProgress||0],accumulated:[G,[],t=>void 0===t.globals.accumulated?null:t.globals.accumulated],"+":[U,cr(U),(t,e)=>{let r=0;for(const n of e)r+=n.evaluate(t);return r}],"*":[U,cr(U),(t,e)=>{let r=1;for(const n of e)r*=n.evaluate(t);return r}],"-":{type:U,overloads:[[[U,U],(t,[e,r])=>e.evaluate(t)-r.evaluate(t)],[[U],(t,[e])=>-e.evaluate(t)]]},"/":[U,[U,U],(t,[e,r])=>e.evaluate(t)/r.evaluate(t)],"%":[U,[U,U],(t,[e,r])=>e.evaluate(t)%r.evaluate(t)],ln2:[U,[],()=>Math.LN2],pi:[U,[],()=>Math.PI],e:[U,[],()=>Math.E],"^":[U,[U,U],(t,[e,r])=>Math.pow(e.evaluate(t),r.evaluate(t))],sqrt:[U,[U],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[U,[U],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[U,[U],(t,[e])=>Math.log(e.evaluate(t))],log2:[U,[U],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[U,[U],(t,[e])=>Math.sin(e.evaluate(t))],cos:[U,[U],(t,[e])=>Math.cos(e.evaluate(t))],tan:[U,[U],(t,[e])=>Math.tan(e.evaluate(t))],asin:[U,[U],(t,[e])=>Math.asin(e.evaluate(t))],acos:[U,[U],(t,[e])=>Math.acos(e.evaluate(t))],atan:[U,[U],(t,[e])=>Math.atan(e.evaluate(t))],min:[U,cr(U),(t,e)=>Math.min(...e.map((e=>e.evaluate(t))))],max:[U,cr(U),(t,e)=>Math.max(...e.map((e=>e.evaluate(t))))],abs:[U,[U],(t,[e])=>Math.abs(e.evaluate(t))],round:[U,[U],(t,[e])=>{const r=e.evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[U,[U],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[U,[U],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[F,[O,G],(t,[e,r])=>t.properties()[e.value]===r.value],"filter-id-==":[F,[G],(t,[e])=>t.id()===e.value],"filter-type-==":[F,[O],(t,[e])=>t.geometryType()===e.value],"filter-<":[F,[O,G],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n{const r=t.id(),n=e.value;return typeof r==typeof n&&r":[F,[O,G],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n>i}],"filter-id->":[F,[G],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r>n}],"filter-<=":[F,[O,G],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n<=i}],"filter-id-<=":[F,[G],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r<=n}],"filter->=":[F,[O,G],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n>=i}],"filter-id->=":[F,[G],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r>=n}],"filter-has":[F,[G],(t,[e])=>e.value in t.properties()],"filter-has-id":[F,[],t=>null!==t.id()&&void 0!==t.id()],"filter-type-in":[F,[j(O)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[F,[j(G)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[F,[O,j(G)],(t,[e,r])=>r.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[F,[O,j(G)],(t,[e,r])=>function(t,e,r,n){for(;r<=n;){const i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}(t.properties()[e.value],r.value,0,r.value.length-1)],all:{type:F,overloads:[[[F,F],(t,[e,r])=>e.evaluate(t)&&r.evaluate(t)],[cr(F),(t,e)=>{for(const r of e)if(!r.evaluate(t))return!1;return!0}]]},any:{type:F,overloads:[[[F,F],(t,[e,r])=>e.evaluate(t)||r.evaluate(t)],[cr(F),(t,e)=>{for(const r of e)if(r.evaluate(t))return!0;return!1}]]},"!":[F,[F],(t,[e])=>!e.evaluate(t)],"is-supported-script":[F,[O],(t,[e])=>{const r=t.globals&&t.globals.isSupportedScript;return!r||r(e.evaluate(t))}],upcase:[O,[O],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[O,[O],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[O,cr(G),(t,e)=>e.map((e=>dt(e.evaluate(t)))).join("")],"resolved-locale":[O,[Z],(t,[e])=>e.evaluate(t).resolvedLocale()]});var lr=ir;function ur(t){return{result:"success",value:t}}function hr(t){return{result:"error",value:t}}function fr(t){return!!t.expression&&t.expression.interpolated}function dr(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function pr(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function mr(t){return t}function gr(t,e){const r="color"===e.type,n=t.stops&&"object"==typeof t.stops[0][0],i=n||void 0!==t.property,a=n||!i,o=t.type||(fr(e)?"exponential":"interval");if(r&&((t=R({},t)).stops&&(t.stops=t.stops.map((t=>[t[0],at.parse(t[1])]))),t.default?t.default=at.parse(t.default):t.default=at.parse(e.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!Ce[t.colorSpace])throw new Error(`Unknown color space: ${t.colorSpace}`);let s,c,l;if("exponential"===o)s=br;else if("interval"===o)s=yr;else if("categorical"===o){s=vr,c=Object.create(null);for(const e of t.stops)c[e[0]]=e[1];l=typeof t.stops[0][0]}else{if("identity"!==o)throw new Error(`Unknown function type "${o}"`);s=xr}if(n){const r={},n=[];for(let e=0;et[0])),evaluate:({zoom:r},n)=>br({stops:i,base:t.base},e,r).evaluate(r,n)}}if(a){const r="exponential"===o?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:r,interpolationFactor:Re.interpolationFactor.bind(void 0,r),zoomStops:t.stops.map((t=>t[0])),evaluate:({zoom:r})=>s(t,e,r,c,l)}}return{kind:"source",evaluate(r,n){const i=n&&n.properties?n.properties[t.property]:void 0;return void 0===i?Ar(t.default,e.default):s(t,e,i,c,l)}}}function Ar(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function vr(t,e,r,n,i){return Ar(typeof r===i?n[r]:void 0,t.default,e.default)}function yr(t,e,r){if("number"!==dr(r))return Ar(t.default,e.default);const n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];const i=ne(t.stops.map((t=>t[0])),r);return t.stops[i][1]}function br(t,e,r){const n=void 0!==t.base?t.base:1;if("number"!==dr(r))return Ar(t.default,e.default);const i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];const a=ne(t.stops.map((t=>t[0])),r),o=function(t,e,r,n){const i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[a][0],t.stops[a+1][0]),s=t.stops[a][1],c=t.stops[a+1][1];let l=le[e.type]||mr;if(t.colorSpace&&"rgb"!==t.colorSpace){const e=Ce[t.colorSpace];l=(t,r)=>e.reverse(e.interpolate(e.forward(t),e.forward(r),o))}return"function"==typeof s.evaluate?{evaluate(...t){const e=s.evaluate.apply(void 0,t),r=c.evaluate.apply(void 0,t);if(void 0!==e&&void 0!==r)return l(e,r,o)}}:l(s,c,o)}function xr(t,e,r){return"color"===e.type?r=at.parse(r):"formatted"===e.type?r=ct.fromString(r.toString()):"resolvedImage"===e.type?r=lt.fromString(r.toString()):dr(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),Ar(r,t.default,e.default)}class wr{constructor(t,e){var r;this.expression=t,this._warningHistory={},this._evaluator=new St,this._defaultValue=e?"color"===(r=e).type&&(pr(r.default)||Array.isArray(r.default))?new at(0,0,0,0):"color"===r.type?at.parse(r.default)||null:void 0===r.default?null:r.default:null,this._enumValues=e&&"enum"===e.type?e.values:null}evaluateWithoutErrorHandling(t,e,r,n,i,a,o,s){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n||null,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this._evaluator.featureTileCoord=o||null,this._evaluator.featureDistanceData=s||null,this.expression.evaluate(this._evaluator)}evaluate(t,e,r,n,i,a,o,s){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n||null,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null,this._evaluator.featureTileCoord=o||null,this._evaluator.featureDistanceData=s||null;try{const t=this.expression.evaluate(this._evaluator);if(null==t||"number"==typeof t&&t!=t)return this._defaultValue;if(this._enumValues&&!(t in this._enumValues))throw new gt(`Expected value to be one of ${Object.keys(this._enumValues).map((t=>JSON.stringify(t))).join(", ")}, but found ${JSON.stringify(t)} instead.`);return t}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}function _r(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in lr}function Er(t,e){const r=new ee(lr,[],e?function(t){const e={color:N,string:O,number:U,enum:O,boolean:F,formatted:V,resolvedImage:Q};return"array"===t.type?j(e[t.value]||G,t.length):e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?ur(new wr(n,e)):hr(r.errors)}class Mr{constructor(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Yt(e.expression)}evaluateWithoutErrorHandling(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)}evaluate(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)}}class Sr{constructor(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Yt(e.expression),this.interpolationType=n}evaluateWithoutErrorHandling(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)}evaluate(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)}interpolationFactor(t,e,r){return this.interpolationType?Re.interpolationFactor(this.interpolationType,t,e,r):0}}function Cr(t,e){if("error"===(t=Er(t,e)).result)return t;const r=t.value.expression,n=qt(r);if(!n&&"data-driven"!==e["property-type"])return hr([new k("","data expressions not supported")]);const i=Jt(r,["zoom","pitch","distance-from-center"]);if(!i&&!function(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}(e))return hr([new k("","zoom expressions not supported")]);const a=Ir(r);if(!a&&!i)return hr([new k("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(a instanceof k)return hr([a]);if(a instanceof Re&&!fr(e))return hr([new k("",'"interpolate" expressions cannot be used with this property')]);if(!a)return ur(new Mr(n?"constant":"source",t.value));const o=a instanceof Re?a.interpolation:void 0;return ur(new Sr(n?"camera":"composite",t.value,a.labels,o))}class Tr{constructor(t,e){this._parameters=t,this._specification=e,R(this,gr(this._parameters,this._specification))}static deserialize(t){return new Tr(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function Ir(t){let e=null;if(t instanceof Pe)e=Ir(t.result);else if(t instanceof ke){for(const r of t.args)if(e=Ir(r),e)break}else(t instanceof ae||t instanceof Re)&&t.input instanceof Tt&&"zoom"===t.input.name&&(e=t);return e instanceof k||t.eachChild((t=>{const r=Ir(t);r instanceof k?e=r:!e&&r?e=new k("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&r&&e!==r&&(e=new k("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}function Rr(t){if(Array.isArray(t))return t.map(Rr);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const r in t)e[r]=Rr(t[r]);return e}return function(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}(t)}function Br(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!Br(e)&&"boolean"!=typeof e)return!1;return!0;default:return!0}}function kr(t,e="fill"){if(null==t)return{filter:()=>!0,needGeometry:!1,needFeature:!1};Br(t)||(t=Nr(t));const r=t;let i=!0;try{i=function(t){if(!Dr(t))return t;let e=Rr(t);return Pr(e),e=Lr(e),e}(r)}catch(t){console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(r,null,2)}\n `)}const a=n[`filter_${e}`],o=Er(i,a);let s=null;if("error"===o.result)throw new Error(o.value.map((t=>`${t.key}: ${t.message}`)).join(", "));s=(t,e,r)=>o.value.evaluate(t,e,{},r);let c=null,l=null;if(i!==r){const t=Er(r,a);if("error"===t.result)throw new Error(t.value.map((t=>`${t.key}: ${t.message}`)).join(", "));c=(e,r,n,i,a)=>t.value.evaluate(e,r,{},n,void 0,void 0,i,a),l=!qt(t.value.expression)}return{filter:s,dynamicFilter:c||void 0,needGeometry:Fr(i),needFeature:!!l}}function Lr(t){if(!Array.isArray(t))return t;const e=function(t){if(Ur.has(t[0]))for(let e=1;eLr(t)))}function Pr(t){let e=!1;const r=[];if("case"===t[0]){for(let n=1;n",">=","<","<=","to-boolean"]);function Or(t,e){return te?1:0}function Fr(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(let e=1;e"===e||"<="===e||">="===e?zr(t[1],t[2],e):"any"===e?(r=t.slice(1),["any"].concat(r.map(Nr))):"all"===e?["all"].concat(t.slice(1).map(Nr)):"none"===e?["all"].concat(t.slice(1).map(Nr).map(Vr)):"in"===e?Gr(t[1],t.slice(2)):"!in"===e?Vr(Gr(t[1],t.slice(2))):"has"===e?Zr(t[1]):"!has"===e?Vr(Zr(t[1])):"within"!==e||t;var r}function zr(t,e,r){switch(t){case"$type":return[`filter-type-${r}`,e];case"$id":return[`filter-id-${r}`,e];default:return[`filter-${r}`,t,e]}}function Gr(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((t=>typeof t!=typeof e[0]))?["filter-in-large",t,["literal",e.sort(Or)]]:["filter-in-small",t,["literal",e]]}}function Zr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Vr(t){return["!",t]}function Qr(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}!function(t){var e=function(){var t=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},e=[1,12],r=[1,13],n=[1,9],i=[1,10],a=[1,11],o=[1,14],s=[1,15],c=[14,18,22,24],l=[18,22],u=[22,24],h={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:this.$=new String(t.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b")),this.$.__line__=this._$.first_line;break;case 2:this.$=new Number(t),this.$.__line__=this._$.first_line;break;case 3:this.$=null;break;case 4:this.$=new Boolean(!0),this.$.__line__=this._$.first_line;break;case 5:this.$=new Boolean(!1),this.$.__line__=this._$.first_line;break;case 6:return this.$=a[s-1];case 13:this.$={},Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=a[s-1],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[a[s-2],a[s]];break;case 16:this.$={},this.$[a[s][0]]=a[s][1];break;case 17:this.$=a[s-2],a[s-2][a[s][0]]=a[s][1];break;case 18:this.$=[],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[a[s]];break;case 21:this.$=a[s-2],a[s-2].push(a[s])}},table:[{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:a,12:1,13:2,15:7,16:8,17:o,23:s},{1:[3]},{14:[1,16]},t(c,[2,7]),t(c,[2,8]),t(c,[2,9]),t(c,[2,10]),t(c,[2,11]),t(c,[2,12]),t(c,[2,3]),t(c,[2,4]),t(c,[2,5]),t([14,18,21,22,24],[2,1]),t(c,[2,2]),{3:20,4:e,18:[1,17],19:18,20:19},{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:a,13:23,15:7,16:8,17:o,23:s,24:[1,21],25:22},{1:[2,6]},t(c,[2,13]),{18:[1,24],22:[1,25]},t(l,[2,16]),{21:[1,26]},t(c,[2,18]),{22:[1,28],24:[1,27]},t(u,[2,20]),t(c,[2,14]),{3:20,4:e,20:29},{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:a,13:30,15:7,16:8,17:o,23:s},t(c,[2,19]),{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:a,13:31,15:7,16:8,17:o,23:s},t(l,[2,17]),t(l,[2,15]),t(u,[2,21])],defaultActions:{16:[2,6]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var e=[0],r=[null],n=[],i=this.table,a="",o=0,s=0,c=n.slice.call(arguments,1),l=Object.create(this.lexer),u={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(u.yy[h]=this.yy[h]);l.setInput(t,u.yy),u.yy.lexer=l,u.yy.parser=this,void 0===l.yylloc&&(l.yylloc={});var f=l.yylloc;n.push(f);var d=l.options&&l.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var p,m,g,A,v,y,b,x,w,_={};;){if(m=e[e.length-1],this.defaultActions[m]?g=this.defaultActions[m]:(null==p&&(w=void 0,"number"!=typeof(w=l.lex()||1)&&(w=this.symbols_[w]||w),p=w),g=i[m]&&i[m][p]),void 0===g||!g.length||!g[0]){var E;for(v in x=[],i[m])this.terminals_[v]&&v>2&&x.push("'"+this.terminals_[v]+"'");E=l.showPosition?"Parse error on line "+(o+1)+":\n"+l.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[p]||p)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(E,{text:l.match,token:this.terminals_[p]||p,line:l.yylineno,loc:f,expected:x})}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+p);switch(g[0]){case 1:e.push(p),r.push(l.yytext),n.push(l.yylloc),e.push(g[1]),p=null,s=l.yyleng,a=l.yytext,o=l.yylineno,f=l.yylloc;break;case 2:if(y=this.productions_[g[1]][1],_.$=r[r.length-y],_._$={first_line:n[n.length-(y||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(y||1)].first_column,last_column:n[n.length-1].last_column},d&&(_._$.range=[n[n.length-(y||1)].range[0],n[n.length-1].range[1]]),void 0!==(A=this.performAction.apply(_,[a,s,o,u.yy,g[1],r,n].concat(c))))return A;y&&(e=e.slice(0,-1*y*2),r=r.slice(0,-1*y),n=n.slice(0,-1*y)),e.push(this.productions_[g[1]][0]),r.push(_.$),n.push(_._$),b=i[e[e.length-2]][e[e.length-1]],e.push(b);break;case 3:return!0}}return!0}},f={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,n){switch(r){case 0:break;case 1:return 6;case 2:return e.yytext=e.yytext.substr(1,e.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function d(){this.yy={}}return h.lexer=f,d.prototype=h,h.Parser=d,new d}();void 0!==Qr&&(t.parser=e,t.Parser=e.Parser,t.parse=function(){return e.parse.apply(e,arguments)})}({}),new Set(["vector","raster","raster-dem"]);const jr={StyleExpression:wr,isExpression:_r,isExpressionFilter:Br,createExpression:Er,createPropertyExpression:Cr,normalizePropertyExpression:function(t,e){if(pr(t))return new Tr(t,e);if(_r(t)){const r=Cr(t,e);if("error"===r.result)throw new Error(r.value.map((t=>`${t.key}: ${t.message}`)).join(", "));return r.value}{let r=t;return"string"==typeof t&&"color"===e.type&&(r=at.parse(t)),{kind:"constant",evaluate:()=>r}}},ZoomConstantExpression:Mr,ZoomDependentExpression:Sr,StylePropertyFunction:Tr}},75153:(t,e,r)=>{"use strict";function n(t,e){return Array.from(t.getElementsByTagName(e))}function i(t){return"#"===t[0]?t:`#${t}`}function a(t){return t?.normalize(),t&&t.textContent||""}function o(t,e,r){const n=t.getElementsByTagName(e),i=n.length?n[0]:null;return i&&r&&r(i),i}function s(t,e,r){const n={};if(!t)return n;const i=t.getElementsByTagName(e),a=i.length?i[0]:null;return a&&r?r(a,n):n}function c(t,e,r){const n=a(o(t,e));return n&&r&&r(n)||{}}function l(t,e,r){const n=parseFloat(a(o(t,e)));if(!isNaN(n))return n&&r&&r(n)||{}}function u(t,e,r){const n=parseFloat(a(o(t,e)));if(!isNaN(n))return r&&r(n),n}function h(t,e){const r={};for(const n of e)c(t,n,(t=>{r[n]=t}));return r}function f(t){return 1===t?.nodeType}function d(t){return s(t,"line",(t=>Object.assign({},c(t,"color",(t=>({stroke:`#${t}`}))),l(t,"opacity",(t=>({"stroke-opacity":t}))),l(t,"width",(t=>({"stroke-width":96*t/25.4}))))))}function p(t){let e=[];if(null===t)return e;for(const r of Array.from(t.childNodes)){if(!f(r))continue;const t=m(r.nodeName);if("gpxtpx:TrackPointExtension"===t)e=e.concat(p(r));else{const n=a(r);e.push([t,g(n)])}}return e}function m(t){return["heart","gpxtpx:hr","hr"].includes(t)?"heart":t}function g(t){const e=parseFloat(t);return isNaN(e)?t:e}function A(t){const e=[parseFloat(t.getAttribute("lon")||""),parseFloat(t.getAttribute("lat")||"")];if(isNaN(e[0])||isNaN(e[1]))return null;u(t,"ele",(t=>{e.push(t)}));const r=o(t,"time");return{coordinates:e,time:r?a(r):null,extendedValues:p(o(t,"extensions"))}}function v(t){const e=h(t,["name","cmt","desc","type","time","keywords"]),r=Array.from(t.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/GpxExtensions/v3","*"));for(const n of r)n.parentNode?.parentNode===t&&(e[n.tagName.replace(":","_")]=a(n));const i=n(t,"link");return i.length&&(e.links=i.map((t=>Object.assign({href:t.getAttribute("href")},h(t,["text","type"]))))),e}function y(t,e){const r=n(t,e),i=[],a=[],o={};for(let t=0;t1,c=Object.assign({_gpxType:"trk"},v(t),d(o(t,"extensions")),i.length?{coordinateProperties:{times:s?i:i[0]}}:{});for(const t of a){r.push(t.line),c.coordinateProperties||(c.coordinateProperties={});const e=c.coordinateProperties,n=Object.entries(t.extendedValues);for(let t=0;tnew Array(t.line.length).fill(null)))),e[r][t]=i):e[r]=i}}return{type:"Feature",properties:c,geometry:s?{type:"MultiLineString",coordinates:r}:{type:"LineString",coordinates:r[0]}}}function w(t){const e=Object.assign(v(t),h(t,["sym"])),r=A(t);return r?{type:"Feature",properties:e,geometry:{type:"Point",coordinates:r.coordinates}}:null}function*_(t){for(const e of n(t,"trk")){const t=x(e);t&&(yield t)}for(const e of n(t,"rte")){const t=b(e);t&&(yield t)}for(const e of n(t,"wpt")){const t=w(e);t&&(yield t)}}function E(t){return{type:"FeatureCollection",features:Array.from(_(t))}}function M(t,e){const r={},n="stroke"==e||"fill"===e?e:e+"-color";return"#"===t[0]&&(t=t.substring(1)),6===t.length||3===t.length?r[n]="#"+t:8===t.length&&(r[e+"-opacity"]=parseInt(t.substring(0,2),16)/255,r[n]="#"+t.substring(6,8)+t.substring(4,6)+t.substring(2,4)),r}function S(t,e,r){const n={};return u(t,e,(t=>{n[r]=t})),n}function C(t,e){return s(t,"color",(t=>M(a(t),e)))}function T(t){return s(t,"Icon",((t,e)=>(c(t,"href",(t=>{e.icon=t})),e)))}function I(t){return Object.assign({},function(t){return s(t,"PolyStyle",((t,e)=>Object.assign(e,s(t,"color",(t=>M(a(t),"fill"))),c(t,"fill",(t=>{if("0"===t)return{"fill-opacity":0}})),c(t,"outline",(t=>{if("0"===t)return{"stroke-opacity":0}})))))}(t),function(t){return s(t,"LineStyle",(t=>Object.assign(C(t,"stroke"),S(t,"width","stroke-width"))))}(t),function(t){return s(t,"LabelStyle",(t=>Object.assign(C(t,"label"),S(t,"scale","label-scale"))))}(t),function(t){return s(t,"IconStyle",(t=>Object.assign(C(t,"icon"),S(t,"scale","icon-scale"),S(t,"heading","icon-heading"),s(t,"hotSpot",(t=>{const e=parseFloat(t.getAttribute("x")||""),r=parseFloat(t.getAttribute("y")||""),n=t.getAttribute("xunits")||"",i=t.getAttribute("yunits")||"";return isNaN(e)||isNaN(r)?{}:{"icon-offset":[e,r],"icon-offset-units":[n,i]}})),T(t))))}(t))}r.d(e,{DS:()=>J,ng:()=>E});const R=t=>Number(t),B={string:t=>t,int:R,uint:R,short:R,ushort:R,float:R,double:R,bool:t=>Boolean(t)};function k(t,e){return s(t,"ExtendedData",((t,r)=>{for(const e of n(t,"Data"))r[e.getAttribute("name")||""]=a(o(e,"value"));for(const i of n(t,"SimpleData")){const t=i.getAttribute("name")||"",n=e[t]||B.string;r[t]=n(a(i))}return r}))}function L(t){const e=o(t,"description");for(const t of Array.from(e?.childNodes||[]))if(4===t.nodeType)return{description:{"@type":"html",value:a(t)}};return{}}function P(t){return s(t,"TimeSpan",(t=>({timespan:{begin:a(o(t,"begin")),end:a(o(t,"end"))}})))}function D(t){return s(t,"TimeStamp",(t=>({timestamp:a(o(t,"when"))})))}function U(t,e){return c(t,"styleUrl",(t=>(t=i(t),e[t]?Object.assign({styleUrl:t},e[t]):{styleUrl:t})))}const O=/\s*/g,F=/^\s*|\s*$/g,N=/\s+/;function z(t){return t.replace(O,"").split(",").map(parseFloat).filter((t=>!isNaN(t))).slice(0,3)}function G(t){return t.replace(F,"").split(N).map(z).filter((t=>t.length>=2))}function Z(t){let e=n(t,"coord");var r;0===e.length&&(r=t,"coord","*",e=Array.from(r.getElementsByTagNameNS("*","coord")));const i=e.map((t=>a(t).split(" ").map(parseFloat)));return 0===i.length?null:{geometry:i.length>2?{type:"LineString",coordinates:i}:{type:"Point",coordinates:i[0]},times:n(t,"when").map((t=>a(t)))}}function V(t){if(0===t.length)return t;const e=t[0],r=t[t.length-1];let n=!0;for(let t=0;t=2&&e.push({type:"Point",coordinates:t});break}case"LinearRing":case"LineString":{const t=G(Q(a));t.length>=2&&e.push({type:"LineString",coordinates:t});break}case"Polygon":{const t=[];for(const e of n(a,"LinearRing")){const r=V(G(Q(e)));r.length>=4&&t.push(r)}t.length&&e.push({type:"Polygon",coordinates:t});break}case"Track":case"gx:Track":{const t=Z(a);if(!t)break;const{times:n,geometry:i}=t;e.push(i),n.length&&r.push(n);break}}}return{geometries:e,coordTimes:r}}function W(t,e,r,n){const{coordTimes:i,geometries:a}=j(t),o=function(t){return 0===t.length?null:1===t.length?t[0]:{type:"GeometryCollection",geometries:t}}(a);if(!o&&n.skipNullGeometry)return null;const s={type:"Feature",geometry:o,properties:Object.assign(h(t,["name","address","visibility","open","phoneNumber","description"]),L(t),U(t,e),I(t),k(t,r),P(t),D(t),i.length?{coordinateProperties:{times:1===i.length?i[0]:i}}:{})};void 0!==s.properties?.visibility&&(s.properties.visibility="0"!==s.properties.visibility);const c=t.getAttribute("id");return null!==c&&""!==c&&(s.id=c),s}const H=Math.PI/180;function X(t,e,r,n){const i=function(t){return o(t,"gx:LatLonQuad")?{geometry:{type:"Polygon",coordinates:[V(G(Q(t)))]}}:function(t){const e=o(t,"LatLonBox");if(e){const t=u(e,"north"),r=u(e,"west"),n=u(e,"east"),i=u(e,"south"),a=u(e,"rotation");if("number"==typeof t&&"number"==typeof i&&"number"==typeof r&&"number"==typeof n){const e=[r,i,n,t];let o=[[[r,t],[n,t],[n,i],[r,i],[r,t]]];return"number"==typeof a&&(o=function(t,e,r){const n=[(t[0]+t[2])/2,(t[1]+t[3])/2];return[e[0].map((t=>{const e=t[1]-n[1],i=t[0]-n[0],a=Math.sqrt(Math.pow(e,2)+Math.pow(i,2)),o=Math.atan2(e,i)+r*H;return[n[0]+Math.cos(o)*a,n[1]+Math.sin(o)*a]}))]}(e,o,a)),{bbox:e,geometry:{type:"Polygon",coordinates:o}}}}return null}(t)}(t),a=i?.geometry||null;if(!a&&n.skipNullGeometry)return null;const s={type:"Feature",geometry:a,properties:Object.assign({"@geometry-type":"groundoverlay"},h(t,["name","address","visibility","open","phoneNumber","description"]),L(t),U(t,e),I(t),T(t),k(t,r),P(t),D(t))};i?.bbox&&(s.bbox=i.bbox),void 0!==s.properties?.visibility&&(s.properties.visibility="0"!==s.properties.visibility);const c=t.getAttribute("id");return null!==c&&""!==c&&(s.id=c),s}function q(t){let e=t.getAttribute("id");const r=t.parentNode;return!e&&f(r)&&"CascadingStyle"===r.localName&&(e=r.getAttribute("kml:id")||r.getAttribute("id")),i(e||"")}function*Y(t,e={skipNullGeometry:!1}){const r=function(t){const e={};for(const r of n(t,"Style"))e[q(r)]=I(r);for(const r of n(t,"StyleMap")){const t=i(r.getAttribute("id")||"");c(r,"styleUrl",(r=>{r=i(r),e[r]&&(e[t]=e[r])}))}return e}(t),a=function(t){const e={};for(const r of n(t,"SimpleField"))e[r.getAttribute("name")||""]=B[r.getAttribute("type")||""]||B.string;return e}(t);for(const i of n(t,"Placemark")){const t=W(i,r,a,e);t&&(yield t)}for(const i of n(t,"GroundOverlay")){const t=X(i,r,a,e);t&&(yield t)}}function J(t,e={skipNullGeometry:!1}){return{type:"FeatureCollection",features:Array.from(Y(t,e))}}},99477:(t,e,r)=>{"use strict";r.r(e),r.d(e,{ACESFilmicToneMapping:()=>at,AddEquation:()=>E,AddOperation:()=>tt,AdditiveAnimationBlendMode:()=>Fe,AdditiveBlending:()=>b,AlphaFormat:()=>Nt,AlwaysCompare:()=>Sr,AlwaysDepth:()=>j,AlwaysStencilFunc:()=>vr,AmbientLight:()=>sd,AnimationAction:()=>Yd,AnimationClip:()=>Bf,AnimationLoader:()=>zf,AnimationMixer:()=>Kd,AnimationObjectGroup:()=>qd,AnimationUtils:()=>vf,ArcCurve:()=>Uu,ArrayCamera:()=>Vc,ArrowHelper:()=>Vp,AttachedBindMode:()=>st,Audio:()=>Pd,AudioAnalyser:()=>zd,AudioContext:()=>xd,AudioListener:()=>Ld,AudioLoader:()=>wd,AxesHelper:()=>Qp,BackSide:()=>m,BasicDepthPacking:()=>Qe,BasicShadowMap:()=>u,BatchedMesh:()=>lu,Bone:()=>Ll,BooleanKeyframeTrack:()=>Ef,Box2:()=>up,Box3:()=>Fn,Box3Helper:()=>Fp,BoxGeometry:()=>qa,BoxHelper:()=>Op,BufferAttribute:()=>ha,BufferGeometry:()=>Ia,BufferGeometryLoader:()=>pd,ByteType:()=>It,Cache:()=>Lf,Camera:()=>eo,CameraHelper:()=>Pp,CanvasTexture:()=>Lu,CapsuleGeometry:()=>nh,CatmullRomCurve3:()=>Zu,CineonToneMapping:()=>it,CircleGeometry:()=>ih,ClampToEdgeWrapping:()=>gt,Clock:()=>Cd,Color:()=>$i,ColorKeyframeTrack:()=>Mf,ColorManagement:()=>gn,CompressedArrayTexture:()=>Bu,CompressedCubeTexture:()=>ku,CompressedTexture:()=>Ru,CompressedTextureLoader:()=>Gf,ConeGeometry:()=>oh,ConstantAlphaFactor:()=>Z,ConstantColorFactor:()=>z,CubeCamera:()=>io,CubeReflectionMapping:()=>ut,CubeRefractionMapping:()=>ht,CubeTexture:()=>ao,CubeTextureLoader:()=>Vf,CubeUVReflectionMapping:()=>pt,CubicBezierCurve:()=>Wu,CubicBezierCurve3:()=>Hu,CubicInterpolant:()=>bf,CullFaceBack:()=>s,CullFaceFront:()=>c,CullFaceFrontBack:()=>l,CullFaceNone:()=>o,Curve:()=>Pu,CurvePath:()=>th,CustomBlending:()=>_,CustomToneMapping:()=>ot,CylinderGeometry:()=>ah,Cylindrical:()=>cp,Data3DTexture:()=>Bn,DataArrayTexture:()=>In,DataTexture:()=>Pl,DataTextureLoader:()=>Qf,DataUtils:()=>ca,DecrementStencilOp:()=>sr,DecrementWrapStencilOp:()=>lr,DefaultLoadingManager:()=>Df,DepthFormat:()=>Vt,DepthStencilFormat:()=>Qt,DepthTexture:()=>Ko,DetachedBindMode:()=>ct,DirectionalLight:()=>od,DirectionalLightHelper:()=>Bp,DiscreteInterpolant:()=>wf,DisplayP3ColorSpace:()=>Je,DodecahedronGeometry:()=>ch,DoubleSide:()=>g,DstAlphaFactor:()=>D,DstColorFactor:()=>O,DynamicCopyUsage:()=>Pr,DynamicDrawUsage:()=>Tr,DynamicReadUsage:()=>Br,EdgesGeometry:()=>dh,EllipseCurve:()=>Du,EqualCompare:()=>xr,EqualDepth:()=>X,EqualStencilFunc:()=>dr,EquirectangularReflectionMapping:()=>ft,EquirectangularRefractionMapping:()=>dt,Euler:()=>xi,EventDispatcher:()=>Gr,ExtrudeGeometry:()=>Zh,FileLoader:()=>Nf,Float16BufferAttribute:()=>ya,Float32BufferAttribute:()=>ba,Float64BufferAttribute:()=>xa,FloatType:()=>Pt,Fog:()=>$c,FogExp2:()=>Kc,FramebufferTexture:()=>Iu,FrontSide:()=>p,Frustum:()=>po,GLBufferAttribute:()=>np,GLSL1:()=>Ur,GLSL3:()=>Or,GreaterCompare:()=>_r,GreaterDepth:()=>Y,GreaterEqualCompare:()=>Mr,GreaterEqualDepth:()=>q,GreaterEqualStencilFunc:()=>Ar,GreaterStencilFunc:()=>mr,GridHelper:()=>Sp,Group:()=>Qc,HalfFloatType:()=>Dt,HemisphereLight:()=>Hf,HemisphereLightHelper:()=>Mp,IcosahedronGeometry:()=>Qh,ImageBitmapLoader:()=>yd,ImageLoader:()=>Zf,ImageUtils:()=>bn,IncrementStencilOp:()=>or,IncrementWrapStencilOp:()=>cr,InstancedBufferAttribute:()=>Fl,InstancedBufferGeometry:()=>dd,InstancedInterleavedBuffer:()=>rp,InstancedMesh:()=>Wl,Int16BufferAttribute:()=>ma,Int32BufferAttribute:()=>Aa,Int8BufferAttribute:()=>fa,IntType:()=>kt,InterleavedBuffer:()=>el,InterleavedBufferAttribute:()=>nl,Interpolant:()=>yf,InterpolateDiscrete:()=>Be,InterpolateLinear:()=>ke,InterpolateSmooth:()=>Le,InvertStencilOp:()=>ur,KeepStencilOp:()=>ir,KeyframeTrack:()=>_f,LOD:()=>wl,LatheGeometry:()=>rh,Layers:()=>wi,LessCompare:()=>br,LessDepth:()=>W,LessEqualCompare:()=>wr,LessEqualDepth:()=>H,LessEqualStencilFunc:()=>pr,LessStencilFunc:()=>fr,Light:()=>Wf,LightProbe:()=>ud,Line:()=>gu,Line3:()=>dp,LineBasicMaterial:()=>uu,LineCurve:()=>Xu,LineCurve3:()=>qu,LineDashedMaterial:()=>ff,LineLoop:()=>bu,LineSegments:()=>yu,LinearDisplayP3ColorSpace:()=>Ke,LinearEncoding:()=>Ze,LinearFilter:()=>_t,LinearInterpolant:()=>xf,LinearMipMapLinearFilter:()=>Ct,LinearMipMapNearestFilter:()=>Mt,LinearMipmapLinearFilter:()=>St,LinearMipmapNearestFilter:()=>Et,LinearSRGBColorSpace:()=>Ye,LinearToneMapping:()=>rt,LinearTransfer:()=>$e,Loader:()=>Uf,LoaderUtils:()=>fd,LoadingManager:()=>Pf,LoopOnce:()=>Te,LoopPingPong:()=>Re,LoopRepeat:()=>Ie,LuminanceAlphaFormat:()=>Zt,LuminanceFormat:()=>Gt,MOUSE:()=>i,Material:()=>ra,MaterialLoader:()=>hd,MathUtils:()=>tn,Matrix3:()=>rn,Matrix4:()=>hi,MaxEquation:()=>T,Mesh:()=>Ha,MeshBasicMaterial:()=>na,MeshDepthMaterial:()=>Oc,MeshDistanceMaterial:()=>Fc,MeshLambertMaterial:()=>uf,MeshMatcapMaterial:()=>hf,MeshNormalMaterial:()=>lf,MeshPhongMaterial:()=>sf,MeshPhysicalMaterial:()=>of,MeshStandardMaterial:()=>af,MeshToonMaterial:()=>cf,MinEquation:()=>C,MirroredRepeatWrapping:()=>At,MixOperation:()=>$,MultiplyBlending:()=>w,MultiplyOperation:()=>K,NearestFilter:()=>vt,NearestMipMapLinearFilter:()=>wt,NearestMipMapNearestFilter:()=>bt,NearestMipmapLinearFilter:()=>xt,NearestMipmapNearestFilter:()=>yt,NeverCompare:()=>yr,NeverDepth:()=>Q,NeverStencilFunc:()=>hr,NoBlending:()=>v,NoColorSpace:()=>Xe,NoToneMapping:()=>et,NormalAnimationBlendMode:()=>Oe,NormalBlending:()=>y,NotEqualCompare:()=>Er,NotEqualDepth:()=>J,NotEqualStencilFunc:()=>gr,NumberKeyframeTrack:()=>Sf,Object3D:()=>Ui,ObjectLoader:()=>md,ObjectSpaceNormalMap:()=>He,OctahedronGeometry:()=>jh,OneFactor:()=>R,OneMinusConstantAlphaFactor:()=>V,OneMinusConstantColorFactor:()=>G,OneMinusDstAlphaFactor:()=>U,OneMinusDstColorFactor:()=>F,OneMinusSrcAlphaFactor:()=>P,OneMinusSrcColorFactor:()=>k,OrthographicCamera:()=>To,P3Primaries:()=>rr,PCFShadowMap:()=>h,PCFSoftShadowMap:()=>f,PMREMGenerator:()=>Fo,Path:()=>eh,PerspectiveCamera:()=>ro,Plane:()=>uo,PlaneGeometry:()=>Ao,PlaneHelper:()=>Np,PointLight:()=>id,PointLightHelper:()=>xp,Points:()=>Su,PointsMaterial:()=>xu,PolarGridHelper:()=>Cp,PolyhedronGeometry:()=>sh,PositionalAudio:()=>Nd,PropertyBinding:()=>Xd,PropertyMixer:()=>Gd,QuadraticBezierCurve:()=>Yu,QuadraticBezierCurve3:()=>Ju,Quaternion:()=>Pn,QuaternionKeyframeTrack:()=>Tf,QuaternionLinearInterpolant:()=>Cf,RED_GREEN_RGTC2_Format:()=>Se,RED_RGTC1_Format:()=>Ee,REVISION:()=>n,RGBADepthPacking:()=>je,RGBAFormat:()=>zt,RGBAIntegerFormat:()=>qt,RGBA_ASTC_10x10_Format:()=>ve,RGBA_ASTC_10x5_Format:()=>me,RGBA_ASTC_10x6_Format:()=>ge,RGBA_ASTC_10x8_Format:()=>Ae,RGBA_ASTC_12x10_Format:()=>ye,RGBA_ASTC_12x12_Format:()=>be,RGBA_ASTC_4x4_Format:()=>se,RGBA_ASTC_5x4_Format:()=>ce,RGBA_ASTC_5x5_Format:()=>le,RGBA_ASTC_6x5_Format:()=>ue,RGBA_ASTC_6x6_Format:()=>he,RGBA_ASTC_8x5_Format:()=>fe,RGBA_ASTC_8x6_Format:()=>de,RGBA_ASTC_8x8_Format:()=>pe,RGBA_BPTC_Format:()=>xe,RGBA_ETC2_EAC_Format:()=>oe,RGBA_PVRTC_2BPPV1_Format:()=>ne,RGBA_PVRTC_4BPPV1_Format:()=>re,RGBA_S3TC_DXT1_Format:()=>Jt,RGBA_S3TC_DXT3_Format:()=>Kt,RGBA_S3TC_DXT5_Format:()=>$t,RGB_BPTC_SIGNED_Format:()=>we,RGB_BPTC_UNSIGNED_Format:()=>_e,RGB_ETC1_Format:()=>ie,RGB_ETC2_Format:()=>ae,RGB_PVRTC_2BPPV1_Format:()=>ee,RGB_PVRTC_4BPPV1_Format:()=>te,RGB_S3TC_DXT1_Format:()=>Yt,RGFormat:()=>Ht,RGIntegerFormat:()=>Xt,RawShaderMaterial:()=>nf,Ray:()=>ui,Raycaster:()=>ip,Rec709Primaries:()=>er,RectAreaLight:()=>cd,RedFormat:()=>jt,RedIntegerFormat:()=>Wt,ReinhardToneMapping:()=>nt,RenderTarget:()=>Cn,RepeatWrapping:()=>mt,ReplaceStencilOp:()=>ar,ReverseSubtractEquation:()=>S,RingGeometry:()=>Wh,SIGNED_RED_GREEN_RGTC2_Format:()=>Ce,SIGNED_RED_RGTC1_Format:()=>Me,SRGBColorSpace:()=>qe,SRGBTransfer:()=>tr,Scene:()=>tl,ShaderChunk:()=>vo,ShaderLib:()=>bo,ShaderMaterial:()=>to,ShadowMaterial:()=>rf,Shape:()=>ph,ShapeGeometry:()=>Hh,ShapePath:()=>jp,ShapeUtils:()=>Nh,ShortType:()=>Rt,Skeleton:()=>Ol,SkeletonHelper:()=>yp,SkinnedMesh:()=>kl,Source:()=>wn,Sphere:()=>ri,SphereGeometry:()=>Xh,Spherical:()=>sp,SphericalHarmonics3:()=>ld,SplineCurve:()=>Ku,SpotLight:()=>$f,SpotLightHelper:()=>mp,Sprite:()=>vl,SpriteMaterial:()=>il,SrcAlphaFactor:()=>L,SrcAlphaSaturateFactor:()=>N,SrcColorFactor:()=>B,StaticCopyUsage:()=>Lr,StaticDrawUsage:()=>Cr,StaticReadUsage:()=>Rr,StereoCamera:()=>Sd,StreamCopyUsage:()=>Dr,StreamDrawUsage:()=>Ir,StreamReadUsage:()=>kr,StringKeyframeTrack:()=>If,SubtractEquation:()=>M,SubtractiveBlending:()=>x,TOUCH:()=>a,TangentSpaceNormalMap:()=>We,TetrahedronGeometry:()=>qh,Texture:()=>Mn,TextureLoader:()=>jf,TorusGeometry:()=>Yh,TorusKnotGeometry:()=>Jh,Triangle:()=>Xi,TriangleFanDrawMode:()=>Ge,TriangleStripDrawMode:()=>ze,TrianglesDrawMode:()=>Ne,TubeGeometry:()=>Kh,TwoPassDoubleSide:()=>A,UVMapping:()=>lt,Uint16BufferAttribute:()=>ga,Uint32BufferAttribute:()=>va,Uint8BufferAttribute:()=>da,Uint8ClampedBufferAttribute:()=>pa,Uniform:()=>$d,UniformsGroup:()=>ep,UniformsLib:()=>yo,UniformsUtils:()=>$a,UnsignedByteType:()=>Tt,UnsignedInt248Type:()=>Ft,UnsignedIntType:()=>Lt,UnsignedShort4444Type:()=>Ut,UnsignedShort5551Type:()=>Ot,UnsignedShortType:()=>Bt,VSMShadowMap:()=>d,Vector2:()=>en,Vector3:()=>Dn,Vector4:()=>Sn,VectorKeyframeTrack:()=>Rf,VideoTexture:()=>Tu,WebGL1Renderer:()=>Jc,WebGL3DRenderTarget:()=>kn,WebGLArrayRenderTarget:()=>Rn,WebGLCoordinateSystem:()=>Nr,WebGLCubeRenderTarget:()=>oo,WebGLMultipleRenderTargets:()=>Ln,WebGLRenderTarget:()=>Tn,WebGLRenderer:()=>Yc,WebGLUtils:()=>Zc,WebGPUCoordinateSystem:()=>zr,WireframeGeometry:()=>$h,WrapAroundEnding:()=>Ue,ZeroCurvatureEnding:()=>Pe,ZeroFactor:()=>I,ZeroSlopeEnding:()=>De,ZeroStencilOp:()=>nr,_SRGBAFormat:()=>Fr,createCanvasElement:()=>ln,sRGBEncoding:()=>Ve});const n="159",i={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},a={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},o=0,s=1,c=2,l=3,u=0,h=1,f=2,d=3,p=0,m=1,g=2,A=2,v=0,y=1,b=2,x=3,w=4,_=5,E=100,M=101,S=102,C=103,T=104,I=200,R=201,B=202,k=203,L=204,P=205,D=206,U=207,O=208,F=209,N=210,z=211,G=212,Z=213,V=214,Q=0,j=1,W=2,H=3,X=4,q=5,Y=6,J=7,K=0,$=1,tt=2,et=0,rt=1,nt=2,it=3,at=4,ot=5,st="attached",ct="detached",lt=300,ut=301,ht=302,ft=303,dt=304,pt=306,mt=1e3,gt=1001,At=1002,vt=1003,yt=1004,bt=1004,xt=1005,wt=1005,_t=1006,Et=1007,Mt=1007,St=1008,Ct=1008,Tt=1009,It=1010,Rt=1011,Bt=1012,kt=1013,Lt=1014,Pt=1015,Dt=1016,Ut=1017,Ot=1018,Ft=1020,Nt=1021,zt=1023,Gt=1024,Zt=1025,Vt=1026,Qt=1027,jt=1028,Wt=1029,Ht=1030,Xt=1031,qt=1033,Yt=33776,Jt=33777,Kt=33778,$t=33779,te=35840,ee=35841,re=35842,ne=35843,ie=36196,ae=37492,oe=37496,se=37808,ce=37809,le=37810,ue=37811,he=37812,fe=37813,de=37814,pe=37815,me=37816,ge=37817,Ae=37818,ve=37819,ye=37820,be=37821,xe=36492,we=36494,_e=36495,Ee=36283,Me=36284,Se=36285,Ce=36286,Te=2200,Ie=2201,Re=2202,Be=2300,ke=2301,Le=2302,Pe=2400,De=2401,Ue=2402,Oe=2500,Fe=2501,Ne=0,ze=1,Ge=2,Ze=3e3,Ve=3001,Qe=3200,je=3201,We=0,He=1,Xe="",qe="srgb",Ye="srgb-linear",Je="display-p3",Ke="display-p3-linear",$e="linear",tr="srgb",er="rec709",rr="p3",nr=0,ir=7680,ar=7681,or=7682,sr=7683,cr=34055,lr=34056,ur=5386,hr=512,fr=513,dr=514,pr=515,mr=516,gr=517,Ar=518,vr=519,yr=512,br=513,xr=514,wr=515,_r=516,Er=517,Mr=518,Sr=519,Cr=35044,Tr=35048,Ir=35040,Rr=35045,Br=35049,kr=35041,Lr=35046,Pr=35050,Dr=35042,Ur="100",Or="300 es",Fr=1035,Nr=2e3,zr=2001;class Gr{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const r=this._listeners;void 0===r[t]&&(r[t]=[]),-1===r[t].indexOf(e)&&r[t].push(e)}hasEventListener(t,e){if(void 0===this._listeners)return!1;const r=this._listeners;return void 0!==r[t]&&-1!==r[t].indexOf(e)}removeEventListener(t,e){if(void 0===this._listeners)return;const r=this._listeners[t];if(void 0!==r){const t=r.indexOf(e);-1!==t&&r.splice(t,1)}}dispatchEvent(t){if(void 0===this._listeners)return;const e=this._listeners[t.type];if(void 0!==e){t.target=this;const r=e.slice(0);for(let e=0,n=r.length;e>8&255]+Zr[t>>16&255]+Zr[t>>24&255]+"-"+Zr[255&e]+Zr[e>>8&255]+"-"+Zr[e>>16&15|64]+Zr[e>>24&255]+"-"+Zr[63&r|128]+Zr[r>>8&255]+"-"+Zr[r>>16&255]+Zr[r>>24&255]+Zr[255&n]+Zr[n>>8&255]+Zr[n>>16&255]+Zr[n>>24&255]).toLowerCase()}function Hr(t,e,r){return Math.max(e,Math.min(r,t))}function Xr(t,e){return(t%e+e)%e}function qr(t,e,r){return(1-r)*t+r*e}function Yr(t){return 0==(t&t-1)&&0!==t}function Jr(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function Kr(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function $r(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(4294967295*t);case Uint16Array:return Math.round(65535*t);case Uint8Array:return Math.round(255*t);case Int32Array:return Math.round(2147483647*t);case Int16Array:return Math.round(32767*t);case Int8Array:return Math.round(127*t);default:throw new Error("Invalid component type.")}}const tn={DEG2RAD:Qr,RAD2DEG:jr,generateUUID:Wr,clamp:Hr,euclideanModulo:Xr,mapLinear:function(t,e,r,n,i){return n+(t-e)*(i-n)/(r-e)},inverseLerp:function(t,e,r){return t!==e?(r-t)/(e-t):0},lerp:qr,damp:function(t,e,r,n){return qr(t,e,1-Math.exp(-r*n))},pingpong:function(t,e=1){return e-Math.abs(Xr(t,2*e)-e)},smoothstep:function(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e))*t*(3-2*t)},smootherstep:function(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},seededRandom:function(t){void 0!==t&&(Vr=t);let e=Vr+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296},degToRad:function(t){return t*Qr},radToDeg:function(t){return t*jr},isPowerOfTwo:Yr,ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:Jr,setQuaternionFromProperEuler:function(t,e,r,n,i){const a=Math.cos,o=Math.sin,s=a(r/2),c=o(r/2),l=a((e+n)/2),u=o((e+n)/2),h=a((e-n)/2),f=o((e-n)/2),d=a((n-e)/2),p=o((n-e)/2);switch(i){case"XYX":t.set(s*u,c*h,c*f,s*l);break;case"YZY":t.set(c*f,s*u,c*h,s*l);break;case"ZXZ":t.set(c*h,c*f,s*u,s*l);break;case"XZX":t.set(s*u,c*p,c*d,s*l);break;case"YXY":t.set(c*d,s*u,c*p,s*l);break;case"ZYZ":t.set(c*p,c*d,s*u,s*l);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:$r,denormalize:Kr};class en{constructor(t=0,e=0){en.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,r=this.y,n=t.elements;return this.x=n[0]*e+n[3]*r+n[6],this.y=n[1]*e+n[4]*r+n[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(t,Math.min(e,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const r=this.dot(t)/e;return Math.acos(Hr(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y;return e*e+r*r}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const r=Math.cos(e),n=Math.sin(e),i=this.x-t.x,a=this.y-t.y;return this.x=i*r-a*n+t.x,this.y=i*n+a*r+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class rn{constructor(t,e,r,n,i,a,o,s,c){rn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==t&&this.set(t,e,r,n,i,a,o,s,c)}set(t,e,r,n,i,a,o,s,c){const l=this.elements;return l[0]=t,l[1]=n,l[2]=o,l[3]=e,l[4]=i,l[5]=s,l[6]=r,l[7]=a,l[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,r=t.elements;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],this}extractBasis(t,e,r){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const r=t.elements,n=e.elements,i=this.elements,a=r[0],o=r[3],s=r[6],c=r[1],l=r[4],u=r[7],h=r[2],f=r[5],d=r[8],p=n[0],m=n[3],g=n[6],A=n[1],v=n[4],y=n[7],b=n[2],x=n[5],w=n[8];return i[0]=a*p+o*A+s*b,i[3]=a*m+o*v+s*x,i[6]=a*g+o*y+s*w,i[1]=c*p+l*A+u*b,i[4]=c*m+l*v+u*x,i[7]=c*g+l*y+u*w,i[2]=h*p+f*A+d*b,i[5]=h*m+f*v+d*x,i[8]=h*g+f*y+d*w,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8];return e*a*l-e*o*c-r*i*l+r*o*s+n*i*c-n*a*s}invert(){const t=this.elements,e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=l*a-o*c,h=o*s-l*i,f=c*i-a*s,d=e*u+r*h+n*f;if(0===d)return this.set(0,0,0,0,0,0,0,0,0);const p=1/d;return t[0]=u*p,t[1]=(n*c-l*r)*p,t[2]=(o*r-n*a)*p,t[3]=h*p,t[4]=(l*e-n*s)*p,t[5]=(n*i-o*e)*p,t[6]=f*p,t[7]=(r*s-c*e)*p,t[8]=(a*e-r*i)*p,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,r,n,i,a,o){const s=Math.cos(i),c=Math.sin(i);return this.set(r*s,r*c,-r*(s*a+c*o)+a+t,-n*c,n*s,-n*(-c*a+s*o)+o+e,0,0,1),this}scale(t,e){return this.premultiply(nn.makeScale(t,e)),this}rotate(t){return this.premultiply(nn.makeRotation(-t)),this}translate(t,e){return this.premultiply(nn.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,-r,0,r,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,r=t.elements;for(let t=0;t<9;t++)if(e[t]!==r[t])return!1;return!0}fromArray(t,e=0){for(let r=0;r<9;r++)this.elements[r]=t[r+e];return this}toArray(t=[],e=0){const r=this.elements;return t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=r[3],t[e+4]=r[4],t[e+5]=r[5],t[e+6]=r[6],t[e+7]=r[7],t[e+8]=r[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}const nn=new rn;function an(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const on={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function sn(t,e){return new on[t](e)}function cn(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function ln(){const t=cn("canvas");return t.style.display="block",t}const un={};function hn(t){t in un||(un[t]=!0,console.warn(t))}const fn=(new rn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),dn=(new rn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),pn={[Ye]:{transfer:$e,primaries:er,toReference:t=>t,fromReference:t=>t},[qe]:{transfer:tr,primaries:er,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[Ke]:{transfer:$e,primaries:rr,toReference:t=>t.applyMatrix3(dn),fromReference:t=>t.applyMatrix3(fn)},[Je]:{transfer:tr,primaries:rr,toReference:t=>t.convertSRGBToLinear().applyMatrix3(dn),fromReference:t=>t.applyMatrix3(fn).convertLinearToSRGB()}},mn=new Set([Ye,Ke]),gn={enabled:!0,_workingColorSpace:Ye,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!mn.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,r){if(!1===this.enabled||e===r||!e||!r)return t;const n=pn[e].toReference;return(0,pn[r].fromReference)(n(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return pn[t].primaries},getTransfer:function(t){return t===Xe?$e:pn[t].transfer}};function An(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function vn(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}let yn;class bn{static getDataURL(t){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===yn&&(yn=cn("canvas")),yn.width=t.width,yn.height=t.height;const r=yn.getContext("2d");t instanceof ImageData?r.putImageData(t,0,0):r.drawImage(t,0,0,t.width,t.height),e=yn}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const e=cn("canvas");e.width=t.width,e.height=t.height;const r=e.getContext("2d");r.drawImage(t,0,0,t.width,t.height);const n=r.getImageData(0,0,t.width,t.height),i=n.data;for(let t=0;t0&&(r.userData=this.userData),e||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==lt)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case mt:t.x=t.x-Math.floor(t.x);break;case gt:t.x=t.x<0?0:1;break;case At:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case mt:t.y=t.y-Math.floor(t.y);break;case gt:t.y=t.y<0?0:1;break;case At:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return hn("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===qe?Ve:Ze}set encoding(t){hn("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=t===Ve?qe:Xe}}Mn.DEFAULT_IMAGE=null,Mn.DEFAULT_MAPPING=lt,Mn.DEFAULT_ANISOTROPY=1;class Sn{constructor(t=0,e=0,r=0,n=1){Sn.prototype.isVector4=!0,this.x=t,this.y=e,this.z=r,this.w=n}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,r,n){return this.x=t,this.y=e,this.z=r,this.w=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){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: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,r=this.y,n=this.z,i=this.w,a=t.elements;return this.x=a[0]*e+a[4]*r+a[8]*n+a[12]*i,this.y=a[1]*e+a[5]*r+a[9]*n+a[13]*i,this.z=a[2]*e+a[6]*r+a[10]*n+a[14]*i,this.w=a[3]*e+a[7]*r+a[11]*n+a[15]*i,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,r,n,i;const a=.01,o=.1,s=t.elements,c=s[0],l=s[4],u=s[8],h=s[1],f=s[5],d=s[9],p=s[2],m=s[6],g=s[10];if(Math.abs(l-h)s&&t>A?tA?s=0?1:-1,n=1-e*e;if(n>Number.EPSILON){const i=Math.sqrt(n),a=Math.atan2(i,e*r);t=Math.sin(t*a)/i,o=Math.sin(o*a)/i}const i=o*r;if(s=s*t+h*i,c=c*t+f*i,l=l*t+d*i,u=u*t+p*i,t===1-o){const t=1/Math.sqrt(s*s+c*c+l*l+u*u);s*=t,c*=t,l*=t,u*=t}}t[e]=s,t[e+1]=c,t[e+2]=l,t[e+3]=u}static multiplyQuaternionsFlat(t,e,r,n,i,a){const o=r[n],s=r[n+1],c=r[n+2],l=r[n+3],u=i[a],h=i[a+1],f=i[a+2],d=i[a+3];return t[e]=o*d+l*u+s*f-c*h,t[e+1]=s*d+l*h+c*u-o*f,t[e+2]=c*d+l*f+o*h-s*u,t[e+3]=l*d-o*u-s*h-c*f,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,r,n){return this._x=t,this._y=e,this._z=r,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e){const r=t._x,n=t._y,i=t._z,a=t._order,o=Math.cos,s=Math.sin,c=o(r/2),l=o(n/2),u=o(i/2),h=s(r/2),f=s(n/2),d=s(i/2);switch(a){case"XYZ":this._x=h*l*u+c*f*d,this._y=c*f*u-h*l*d,this._z=c*l*d+h*f*u,this._w=c*l*u-h*f*d;break;case"YXZ":this._x=h*l*u+c*f*d,this._y=c*f*u-h*l*d,this._z=c*l*d-h*f*u,this._w=c*l*u+h*f*d;break;case"ZXY":this._x=h*l*u-c*f*d,this._y=c*f*u+h*l*d,this._z=c*l*d+h*f*u,this._w=c*l*u-h*f*d;break;case"ZYX":this._x=h*l*u-c*f*d,this._y=c*f*u+h*l*d,this._z=c*l*d-h*f*u,this._w=c*l*u+h*f*d;break;case"YZX":this._x=h*l*u+c*f*d,this._y=c*f*u+h*l*d,this._z=c*l*d-h*f*u,this._w=c*l*u-h*f*d;break;case"XZY":this._x=h*l*u-c*f*d,this._y=c*f*u-h*l*d,this._z=c*l*d+h*f*u,this._w=c*l*u+h*f*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!1!==e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const r=e/2,n=Math.sin(r);return this._x=t.x*n,this._y=t.y*n,this._z=t.z*n,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,r=e[0],n=e[4],i=e[8],a=e[1],o=e[5],s=e[9],c=e[2],l=e[6],u=e[10],h=r+o+u;if(h>0){const t=.5/Math.sqrt(h+1);this._w=.25/t,this._x=(l-s)*t,this._y=(i-c)*t,this._z=(a-n)*t}else if(r>o&&r>u){const t=2*Math.sqrt(1+r-o-u);this._w=(l-s)/t,this._x=.25*t,this._y=(n+a)/t,this._z=(i+c)/t}else if(o>u){const t=2*Math.sqrt(1+o-r-u);this._w=(i-c)/t,this._x=(n+a)/t,this._y=.25*t,this._z=(s+l)/t}else{const t=2*Math.sqrt(1+u-r-o);this._w=(a-n)/t,this._x=(i+c)/t,this._y=(s+l)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let r=t.dot(e)+1;return rMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=r):(this._x=0,this._y=-t.z,this._z=t.y,this._w=r)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=r),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Hr(this.dot(t),-1,1)))}rotateTowards(t,e){const r=this.angleTo(t);if(0===r)return this;const n=Math.min(1,e/r);return this.slerp(t,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const r=t._x,n=t._y,i=t._z,a=t._w,o=e._x,s=e._y,c=e._z,l=e._w;return this._x=r*l+a*o+n*c-i*s,this._y=n*l+a*s+i*o-r*c,this._z=i*l+a*c+r*s-n*o,this._w=a*l-r*o-n*s-i*c,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const r=this._x,n=this._y,i=this._z,a=this._w;let o=a*t._w+r*t._x+n*t._y+i*t._z;if(o<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,o=-o):this.copy(t),o>=1)return this._w=a,this._x=r,this._y=n,this._z=i,this;const s=1-o*o;if(s<=Number.EPSILON){const t=1-e;return this._w=t*a+e*this._w,this._x=t*r+e*this._x,this._y=t*n+e*this._y,this._z=t*i+e*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(s),l=Math.atan2(c,o),u=Math.sin((1-e)*l)/c,h=Math.sin(e*l)/c;return this._w=a*u+this._w*h,this._x=r*u+this._x*h,this._y=n*u+this._y*h,this._z=i*u+this._z*h,this._onChangeCallback(),this}slerpQuaternions(t,e,r){return this.copy(t).slerp(e,r)}random(){const t=Math.random(),e=Math.sqrt(1-t),r=Math.sqrt(t),n=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(e*Math.cos(n),r*Math.sin(i),r*Math.cos(i),e*Math.sin(n))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Dn{constructor(t=0,e=0,r=0){Dn.prototype.isVector3=!0,this.x=t,this.y=e,this.z=r}set(t,e,r){return void 0===r&&(r=this.z),this.x=t,this.y=e,this.z=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(On.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(On.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,r=this.y,n=this.z,i=t.elements;return this.x=i[0]*e+i[3]*r+i[6]*n,this.y=i[1]*e+i[4]*r+i[7]*n,this.z=i[2]*e+i[5]*r+i[8]*n,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,r=this.y,n=this.z,i=t.elements,a=1/(i[3]*e+i[7]*r+i[11]*n+i[15]);return this.x=(i[0]*e+i[4]*r+i[8]*n+i[12])*a,this.y=(i[1]*e+i[5]*r+i[9]*n+i[13])*a,this.z=(i[2]*e+i[6]*r+i[10]*n+i[14])*a,this}applyQuaternion(t){const e=this.x,r=this.y,n=this.z,i=t.x,a=t.y,o=t.z,s=t.w,c=2*(a*n-o*r),l=2*(o*e-i*n),u=2*(i*r-a*e);return this.x=e+s*c+a*u-o*l,this.y=r+s*l+o*c-i*u,this.z=n+s*u+i*l-a*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,r=this.y,n=this.z,i=t.elements;return this.x=i[0]*e+i[4]*r+i[8]*n,this.y=i[1]*e+i[5]*r+i[9]*n,this.z=i[2]*e+i[6]*r+i[10]*n,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(t,Math.min(e,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this.z=t.z+(e.z-t.z)*r,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const r=t.x,n=t.y,i=t.z,a=e.x,o=e.y,s=e.z;return this.x=n*s-i*o,this.y=i*a-r*s,this.z=r*o-n*a,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const r=t.dot(this)/e;return this.copy(t).multiplyScalar(r)}projectOnPlane(t){return Un.copy(this).projectOnVector(t),this.sub(Un)}reflect(t){return this.sub(Un.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const r=this.dot(t)/e;return Math.acos(Hr(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y,n=this.z-t.z;return e*e+r*r+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,r){const n=Math.sin(e)*t;return this.x=n*Math.sin(r),this.y=Math.cos(e)*t,this.z=n*Math.cos(r),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,r){return this.x=t*Math.sin(e),this.y=r,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),r=this.setFromMatrixColumn(t,1).length(),n=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=r,this.z=n,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=2*(Math.random()-.5),e=Math.random()*Math.PI*2,r=Math.sqrt(1-t**2);return this.x=r*Math.cos(e),this.y=r*Math.sin(e),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Un=new Dn,On=new Pn;class Fn{constructor(t=new Dn(1/0,1/0,1/0),e=new Dn(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,r=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,zn),zn.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,r;return t.normal.x>0?(e=t.normal.x*this.min.x,r=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,r=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,r+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,r+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,r+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,r+=t.normal.z*this.min.z),e<=-t.constant&&r>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Xn),qn.subVectors(this.max,Xn),Zn.subVectors(t.a,Xn),Vn.subVectors(t.b,Xn),Qn.subVectors(t.c,Xn),jn.subVectors(Vn,Zn),Wn.subVectors(Qn,Vn),Hn.subVectors(Zn,Qn);let e=[0,-jn.z,jn.y,0,-Wn.z,Wn.y,0,-Hn.z,Hn.y,jn.z,0,-jn.x,Wn.z,0,-Wn.x,Hn.z,0,-Hn.x,-jn.y,jn.x,0,-Wn.y,Wn.x,0,-Hn.y,Hn.x,0];return!!Kn(e,Zn,Vn,Qn,qn)&&(e=[1,0,0,0,1,0,0,0,1],!!Kn(e,Zn,Vn,Qn,qn)&&(Yn.crossVectors(jn,Wn),e=[Yn.x,Yn.y,Yn.z],Kn(e,Zn,Vn,Qn,qn)))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,zn).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(zn).length()),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(Nn[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Nn[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Nn[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Nn[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Nn[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Nn[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Nn[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Nn[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Nn)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const Nn=[new Dn,new Dn,new Dn,new Dn,new Dn,new Dn,new Dn,new Dn],zn=new Dn,Gn=new Fn,Zn=new Dn,Vn=new Dn,Qn=new Dn,jn=new Dn,Wn=new Dn,Hn=new Dn,Xn=new Dn,qn=new Dn,Yn=new Dn,Jn=new Dn;function Kn(t,e,r,n,i){for(let a=0,o=t.length-3;a<=o;a+=3){Jn.fromArray(t,a);const o=i.x*Math.abs(Jn.x)+i.y*Math.abs(Jn.y)+i.z*Math.abs(Jn.z),s=e.dot(Jn),c=r.dot(Jn),l=n.dot(Jn);if(Math.max(-Math.max(s,c,l),Math.min(s,c,l))>o)return!1}return!0}const $n=new Fn,ti=new Dn,ei=new Dn;class ri{constructor(t=new Dn,e=-1){this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const r=this.center;void 0!==e?r.copy(e):$n.setFromPoints(t).getCenter(r);let n=0;for(let e=0,i=t.length;ethis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;ti.subVectors(t,this.center);const e=ti.lengthSq();if(e>this.radius*this.radius){const t=Math.sqrt(e),r=.5*(t-this.radius);this.center.addScaledVector(ti,r/t),this.radius+=r}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(!0===this.center.equals(t.center)?this.radius=Math.max(this.radius,t.radius):(ei.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(ti.copy(t.center).add(ei)),this.expandByPoint(ti.copy(t.center).sub(ei))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const ni=new Dn,ii=new Dn,ai=new Dn,oi=new Dn,si=new Dn,ci=new Dn,li=new Dn;class ui{constructor(t=new Dn,e=new Dn(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,ni)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const r=e.dot(this.direction);return r<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=ni.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(ni.copy(this.origin).addScaledVector(this.direction,e),ni.distanceToSquared(t))}distanceSqToSegment(t,e,r,n){ii.copy(t).add(e).multiplyScalar(.5),ai.copy(e).sub(t).normalize(),oi.copy(this.origin).sub(ii);const i=.5*t.distanceTo(e),a=-this.direction.dot(ai),o=oi.dot(this.direction),s=-oi.dot(ai),c=oi.lengthSq(),l=Math.abs(1-a*a);let u,h,f,d;if(l>0)if(u=a*s-o,h=a*o-s,d=i*l,u>=0)if(h>=-d)if(h<=d){const t=1/l;u*=t,h*=t,f=u*(u+a*h+2*o)+h*(a*u+h+2*s)+c}else h=i,u=Math.max(0,-(a*h+o)),f=-u*u+h*(h+2*s)+c;else h=-i,u=Math.max(0,-(a*h+o)),f=-u*u+h*(h+2*s)+c;else h<=-d?(u=Math.max(0,-(-a*i+o)),h=u>0?-i:Math.min(Math.max(-i,-s),i),f=-u*u+h*(h+2*s)+c):h<=d?(u=0,h=Math.min(Math.max(-i,-s),i),f=h*(h+2*s)+c):(u=Math.max(0,-(a*i+o)),h=u>0?i:Math.min(Math.max(-i,-s),i),f=-u*u+h*(h+2*s)+c);else h=a>0?-i:i,u=Math.max(0,-(a*h+o)),f=-u*u+h*(h+2*s)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,u),n&&n.copy(ii).addScaledVector(ai,h),f}intersectSphere(t,e){ni.subVectors(t.center,this.origin);const r=ni.dot(this.direction),n=ni.dot(ni)-r*r,i=t.radius*t.radius;if(n>i)return null;const a=Math.sqrt(i-n),o=r-a,s=r+a;return s<0?null:o<0?this.at(s,e):this.at(o,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;const r=-(this.origin.dot(t.normal)+t.constant)/e;return r>=0?r:null}intersectPlane(t,e){const r=this.distanceToPlane(t);return null===r?null:this.at(r,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let r,n,i,a,o,s;const c=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,h=this.origin;return c>=0?(r=(t.min.x-h.x)*c,n=(t.max.x-h.x)*c):(r=(t.max.x-h.x)*c,n=(t.min.x-h.x)*c),l>=0?(i=(t.min.y-h.y)*l,a=(t.max.y-h.y)*l):(i=(t.max.y-h.y)*l,a=(t.min.y-h.y)*l),r>a||i>n?null:((i>r||isNaN(r))&&(r=i),(a=0?(o=(t.min.z-h.z)*u,s=(t.max.z-h.z)*u):(o=(t.max.z-h.z)*u,s=(t.min.z-h.z)*u),r>s||o>n?null:((o>r||r!=r)&&(r=o),(s=0?r:n,e)))}intersectsBox(t){return null!==this.intersectBox(t,ni)}intersectTriangle(t,e,r,n,i){si.subVectors(e,t),ci.subVectors(r,t),li.crossVectors(si,ci);let a,o=this.direction.dot(li);if(o>0){if(n)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}oi.subVectors(this.origin,t);const s=a*this.direction.dot(ci.crossVectors(oi,ci));if(s<0)return null;const c=a*this.direction.dot(si.cross(oi));if(c<0)return null;if(s+c>o)return null;const l=-a*oi.dot(li);return l<0?null:this.at(l/o,i)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class hi{constructor(t,e,r,n,i,a,o,s,c,l,u,h,f,d,p,m){hi.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==t&&this.set(t,e,r,n,i,a,o,s,c,l,u,h,f,d,p,m)}set(t,e,r,n,i,a,o,s,c,l,u,h,f,d,p,m){const g=this.elements;return g[0]=t,g[4]=e,g[8]=r,g[12]=n,g[1]=i,g[5]=a,g[9]=o,g[13]=s,g[2]=c,g[6]=l,g[10]=u,g[14]=h,g[3]=f,g[7]=d,g[11]=p,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new hi).fromArray(this.elements)}copy(t){const e=this.elements,r=t.elements;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],this}copyPosition(t){const e=this.elements,r=t.elements;return e[12]=r[12],e[13]=r[13],e[14]=r[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,r){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(t,e,r){return this.set(t.x,e.x,r.x,0,t.y,e.y,r.y,0,t.z,e.z,r.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,r=t.elements,n=1/fi.setFromMatrixColumn(t,0).length(),i=1/fi.setFromMatrixColumn(t,1).length(),a=1/fi.setFromMatrixColumn(t,2).length();return e[0]=r[0]*n,e[1]=r[1]*n,e[2]=r[2]*n,e[3]=0,e[4]=r[4]*i,e[5]=r[5]*i,e[6]=r[6]*i,e[7]=0,e[8]=r[8]*a,e[9]=r[9]*a,e[10]=r[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,r=t.x,n=t.y,i=t.z,a=Math.cos(r),o=Math.sin(r),s=Math.cos(n),c=Math.sin(n),l=Math.cos(i),u=Math.sin(i);if("XYZ"===t.order){const t=a*l,r=a*u,n=o*l,i=o*u;e[0]=s*l,e[4]=-s*u,e[8]=c,e[1]=r+n*c,e[5]=t-i*c,e[9]=-o*s,e[2]=i-t*c,e[6]=n+r*c,e[10]=a*s}else if("YXZ"===t.order){const t=s*l,r=s*u,n=c*l,i=c*u;e[0]=t+i*o,e[4]=n*o-r,e[8]=a*c,e[1]=a*u,e[5]=a*l,e[9]=-o,e[2]=r*o-n,e[6]=i+t*o,e[10]=a*s}else if("ZXY"===t.order){const t=s*l,r=s*u,n=c*l,i=c*u;e[0]=t-i*o,e[4]=-a*u,e[8]=n+r*o,e[1]=r+n*o,e[5]=a*l,e[9]=i-t*o,e[2]=-a*c,e[6]=o,e[10]=a*s}else if("ZYX"===t.order){const t=a*l,r=a*u,n=o*l,i=o*u;e[0]=s*l,e[4]=n*c-r,e[8]=t*c+i,e[1]=s*u,e[5]=i*c+t,e[9]=r*c-n,e[2]=-c,e[6]=o*s,e[10]=a*s}else if("YZX"===t.order){const t=a*s,r=a*c,n=o*s,i=o*c;e[0]=s*l,e[4]=i-t*u,e[8]=n*u+r,e[1]=u,e[5]=a*l,e[9]=-o*l,e[2]=-c*l,e[6]=r*u+n,e[10]=t-i*u}else if("XZY"===t.order){const t=a*s,r=a*c,n=o*s,i=o*c;e[0]=s*l,e[4]=-u,e[8]=c*l,e[1]=t*u+i,e[5]=a*l,e[9]=r*u-n,e[2]=n*u-r,e[6]=o*l,e[10]=i*u+t}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(pi,t,mi)}lookAt(t,e,r){const n=this.elements;return vi.subVectors(t,e),0===vi.lengthSq()&&(vi.z=1),vi.normalize(),gi.crossVectors(r,vi),0===gi.lengthSq()&&(1===Math.abs(r.z)?vi.x+=1e-4:vi.z+=1e-4,vi.normalize(),gi.crossVectors(r,vi)),gi.normalize(),Ai.crossVectors(vi,gi),n[0]=gi.x,n[4]=Ai.x,n[8]=vi.x,n[1]=gi.y,n[5]=Ai.y,n[9]=vi.y,n[2]=gi.z,n[6]=Ai.z,n[10]=vi.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const r=t.elements,n=e.elements,i=this.elements,a=r[0],o=r[4],s=r[8],c=r[12],l=r[1],u=r[5],h=r[9],f=r[13],d=r[2],p=r[6],m=r[10],g=r[14],A=r[3],v=r[7],y=r[11],b=r[15],x=n[0],w=n[4],_=n[8],E=n[12],M=n[1],S=n[5],C=n[9],T=n[13],I=n[2],R=n[6],B=n[10],k=n[14],L=n[3],P=n[7],D=n[11],U=n[15];return i[0]=a*x+o*M+s*I+c*L,i[4]=a*w+o*S+s*R+c*P,i[8]=a*_+o*C+s*B+c*D,i[12]=a*E+o*T+s*k+c*U,i[1]=l*x+u*M+h*I+f*L,i[5]=l*w+u*S+h*R+f*P,i[9]=l*_+u*C+h*B+f*D,i[13]=l*E+u*T+h*k+f*U,i[2]=d*x+p*M+m*I+g*L,i[6]=d*w+p*S+m*R+g*P,i[10]=d*_+p*C+m*B+g*D,i[14]=d*E+p*T+m*k+g*U,i[3]=A*x+v*M+y*I+b*L,i[7]=A*w+v*S+y*R+b*P,i[11]=A*_+v*C+y*B+b*D,i[15]=A*E+v*T+y*k+b*U,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],r=t[4],n=t[8],i=t[12],a=t[1],o=t[5],s=t[9],c=t[13],l=t[2],u=t[6],h=t[10],f=t[14];return t[3]*(+i*s*u-n*c*u-i*o*h+r*c*h+n*o*f-r*s*f)+t[7]*(+e*s*f-e*c*h+i*a*h-n*a*f+n*c*l-i*s*l)+t[11]*(+e*c*u-e*o*f-i*a*u+r*a*f+i*o*l-r*c*l)+t[15]*(-n*o*l-e*s*u+e*o*h+n*a*u-r*a*h+r*s*l)}transpose(){const t=this.elements;let e;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}setPosition(t,e,r){const n=this.elements;return t.isVector3?(n[12]=t.x,n[13]=t.y,n[14]=t.z):(n[12]=t,n[13]=e,n[14]=r),this}invert(){const t=this.elements,e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],m=t[14],g=t[15],A=u*m*c-p*h*c+p*s*f-o*m*f-u*s*g+o*h*g,v=d*h*c-l*m*c-d*s*f+a*m*f+l*s*g-a*h*g,y=l*p*c-d*u*c+d*o*f-a*p*f-l*o*g+a*u*g,b=d*u*s-l*p*s-d*o*h+a*p*h+l*o*m-a*u*m,x=e*A+r*v+n*y+i*b;if(0===x)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const w=1/x;return t[0]=A*w,t[1]=(p*h*i-u*m*i-p*n*f+r*m*f+u*n*g-r*h*g)*w,t[2]=(o*m*i-p*s*i+p*n*c-r*m*c-o*n*g+r*s*g)*w,t[3]=(u*s*i-o*h*i-u*n*c+r*h*c+o*n*f-r*s*f)*w,t[4]=v*w,t[5]=(l*m*i-d*h*i+d*n*f-e*m*f-l*n*g+e*h*g)*w,t[6]=(d*s*i-a*m*i-d*n*c+e*m*c+a*n*g-e*s*g)*w,t[7]=(a*h*i-l*s*i+l*n*c-e*h*c-a*n*f+e*s*f)*w,t[8]=y*w,t[9]=(d*u*i-l*p*i-d*r*f+e*p*f+l*r*g-e*u*g)*w,t[10]=(a*p*i-d*o*i+d*r*c-e*p*c-a*r*g+e*o*g)*w,t[11]=(l*o*i-a*u*i-l*r*c+e*u*c+a*r*f-e*o*f)*w,t[12]=b*w,t[13]=(l*p*n-d*u*n+d*r*h-e*p*h-l*r*m+e*u*m)*w,t[14]=(d*o*n-a*p*n-d*r*s+e*p*s+a*r*m-e*o*m)*w,t[15]=(a*u*n-l*o*n+l*r*s-e*u*s-a*r*h+e*o*h)*w,this}scale(t){const e=this.elements,r=t.x,n=t.y,i=t.z;return e[0]*=r,e[4]*=n,e[8]*=i,e[1]*=r,e[5]*=n,e[9]*=i,e[2]*=r,e[6]*=n,e[10]*=i,e[3]*=r,e[7]*=n,e[11]*=i,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,r,n))}makeTranslation(t,e,r){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,r,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),r=Math.sin(t);return this.set(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const r=Math.cos(e),n=Math.sin(e),i=1-r,a=t.x,o=t.y,s=t.z,c=i*a,l=i*o;return this.set(c*a+r,c*o-n*s,c*s+n*o,0,c*o+n*s,l*o+r,l*s-n*a,0,c*s-n*o,l*s+n*a,i*s*s+r,0,0,0,0,1),this}makeScale(t,e,r){return this.set(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1),this}makeShear(t,e,r,n,i,a){return this.set(1,r,i,0,t,1,a,0,e,n,1,0,0,0,0,1),this}compose(t,e,r){const n=this.elements,i=e._x,a=e._y,o=e._z,s=e._w,c=i+i,l=a+a,u=o+o,h=i*c,f=i*l,d=i*u,p=a*l,m=a*u,g=o*u,A=s*c,v=s*l,y=s*u,b=r.x,x=r.y,w=r.z;return n[0]=(1-(p+g))*b,n[1]=(f+y)*b,n[2]=(d-v)*b,n[3]=0,n[4]=(f-y)*x,n[5]=(1-(h+g))*x,n[6]=(m+A)*x,n[7]=0,n[8]=(d+v)*w,n[9]=(m-A)*w,n[10]=(1-(h+p))*w,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this}decompose(t,e,r){const n=this.elements;let i=fi.set(n[0],n[1],n[2]).length();const a=fi.set(n[4],n[5],n[6]).length(),o=fi.set(n[8],n[9],n[10]).length();this.determinant()<0&&(i=-i),t.x=n[12],t.y=n[13],t.z=n[14],di.copy(this);const s=1/i,c=1/a,l=1/o;return di.elements[0]*=s,di.elements[1]*=s,di.elements[2]*=s,di.elements[4]*=c,di.elements[5]*=c,di.elements[6]*=c,di.elements[8]*=l,di.elements[9]*=l,di.elements[10]*=l,e.setFromRotationMatrix(di),r.x=i,r.y=a,r.z=o,this}makePerspective(t,e,r,n,i,a,o=Nr){const s=this.elements,c=2*i/(e-t),l=2*i/(r-n),u=(e+t)/(e-t),h=(r+n)/(r-n);let f,d;if(o===Nr)f=-(a+i)/(a-i),d=-2*a*i/(a-i);else{if(o!==zr)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);f=-a/(a-i),d=-a*i/(a-i)}return s[0]=c,s[4]=0,s[8]=u,s[12]=0,s[1]=0,s[5]=l,s[9]=h,s[13]=0,s[2]=0,s[6]=0,s[10]=f,s[14]=d,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(t,e,r,n,i,a,o=Nr){const s=this.elements,c=1/(e-t),l=1/(r-n),u=1/(a-i),h=(e+t)*c,f=(r+n)*l;let d,p;if(o===Nr)d=(a+i)*u,p=-2*u;else{if(o!==zr)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);d=i*u,p=-1*u}return s[0]=2*c,s[4]=0,s[8]=0,s[12]=-h,s[1]=0,s[5]=2*l,s[9]=0,s[13]=-f,s[2]=0,s[6]=0,s[10]=p,s[14]=-d,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(t){const e=this.elements,r=t.elements;for(let t=0;t<16;t++)if(e[t]!==r[t])return!1;return!0}fromArray(t,e=0){for(let r=0;r<16;r++)this.elements[r]=t[r+e];return this}toArray(t=[],e=0){const r=this.elements;return t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=r[3],t[e+4]=r[4],t[e+5]=r[5],t[e+6]=r[6],t[e+7]=r[7],t[e+8]=r[8],t[e+9]=r[9],t[e+10]=r[10],t[e+11]=r[11],t[e+12]=r[12],t[e+13]=r[13],t[e+14]=r[14],t[e+15]=r[15],t}}const fi=new Dn,di=new hi,pi=new Dn(0,0,0),mi=new Dn(1,1,1),gi=new Dn,Ai=new Dn,vi=new Dn,yi=new hi,bi=new Pn;class xi{constructor(t=0,e=0,r=0,n=xi.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=r,this._order=n}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,r,n=this._order){return this._x=t,this._y=e,this._z=r,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,r=!0){const n=t.elements,i=n[0],a=n[4],o=n[8],s=n[1],c=n[5],l=n[9],u=n[2],h=n[6],f=n[10];switch(e){case"XYZ":this._y=Math.asin(Hr(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-l,f),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Hr(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(o,f),this._z=Math.atan2(s,c)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(Hr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-u,f),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(s,i));break;case"ZYX":this._y=Math.asin(-Hr(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(h,f),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(Hr(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-l,c),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(o,f));break;case"XZY":this._z=Math.asin(-Hr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(o,i)):(this._x=Math.atan2(-l,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===r&&this._onChangeCallback(),this}setFromQuaternion(t,e,r){return yi.makeRotationFromQuaternion(t),this.setFromRotationMatrix(yi,e,r)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return bi.setFromEuler(this),this.setFromQuaternion(bi,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}xi.DEFAULT_ORDER="XYZ";class wi{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<1){for(let t=0;t1){for(let t=0;t0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(n.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(n.type="BatchedMesh",n.perObjectFrustumCulled=this.perObjectFrustumCulled,n.sortObjects=this.sortObjects,n.drawRanges=this._drawRanges,n.reservedRanges=this._reservedRanges,n.visibility=this._visibility,n.active=this._active,n.bounds=this._bounds.map((t=>({boxInitialized:t.boxInitialized,boxMin:t.box.min.toArray(),boxMax:t.box.max.toArray(),sphereInitialized:t.sphereInitialized,sphereRadius:t.sphere.radius,sphereCenter:t.sphere.center.toArray()}))),n.maxGeometryCount=this._maxGeometryCount,n.maxVertexCount=this._maxVertexCount,n.maxIndexCount=this._maxIndexCount,n.geometryInitialized=this._geometryInitialized,n.geometryCount=this._geometryCount,n.matricesTexture=this._matricesTexture.toJSON(t),null!==this.boundingSphere&&(n.boundingSphere={center:n.boundingSphere.center.toArray(),radius:n.boundingSphere.radius}),null!==this.boundingBox&&(n.boundingBox={min:n.boundingBox.min.toArray(),max:n.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(n.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=i(t.geometries,this.geometry);const e=this.geometry.parameters;if(void 0!==e&&void 0!==e.shapes){const r=e.shapes;if(Array.isArray(r))for(let e=0,n=r.length;e0){n.children=[];for(let e=0;e0){n.animations=[];for(let e=0;e0&&(r.geometries=e),n.length>0&&(r.materials=n),i.length>0&&(r.textures=i),o.length>0&&(r.images=o),s.length>0&&(r.shapes=s),c.length>0&&(r.skeletons=c),l.length>0&&(r.animations=l),u.length>0&&(r.nodes=u)}return r.object=n,r;function a(t){const e=[];for(const r in t){const n=t[r];delete n.metadata,e.push(n)}return e}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e0?n.multiplyScalar(1/Math.sqrt(i)):n.set(0,0,0)}static getBarycoord(t,e,r,n,i){Oi.subVectors(n,e),Fi.subVectors(r,e),Ni.subVectors(t,e);const a=Oi.dot(Oi),o=Oi.dot(Fi),s=Oi.dot(Ni),c=Fi.dot(Fi),l=Fi.dot(Ni),u=a*c-o*o;if(0===u)return i.set(-2,-1,-1);const h=1/u,f=(c*s-o*l)*h,d=(a*l-o*s)*h;return i.set(1-f-d,d,f)}static containsPoint(t,e,r,n){return this.getBarycoord(t,e,r,n,zi),zi.x>=0&&zi.y>=0&&zi.x+zi.y<=1}static getUV(t,e,r,n,i,a,o,s){return!1===Hi&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Hi=!0),this.getInterpolation(t,e,r,n,i,a,o,s)}static getInterpolation(t,e,r,n,i,a,o,s){return this.getBarycoord(t,e,r,n,zi),s.setScalar(0),s.addScaledVector(i,zi.x),s.addScaledVector(a,zi.y),s.addScaledVector(o,zi.z),s}static isFrontFacing(t,e,r,n){return Oi.subVectors(r,e),Fi.subVectors(t,e),Oi.cross(Fi).dot(n)<0}set(t,e,r){return this.a.copy(t),this.b.copy(e),this.c.copy(r),this}setFromPointsAndIndices(t,e,r,n){return this.a.copy(t[e]),this.b.copy(t[r]),this.c.copy(t[n]),this}setFromAttributeAndIndices(t,e,r,n){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,r),this.c.fromBufferAttribute(t,n),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return Oi.subVectors(this.c,this.b),Fi.subVectors(this.a,this.b),.5*Oi.cross(Fi).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Xi.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Xi.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,r,n,i){return!1===Hi&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Hi=!0),Xi.getInterpolation(t,this.a,this.b,this.c,e,r,n,i)}getInterpolation(t,e,r,n,i){return Xi.getInterpolation(t,this.a,this.b,this.c,e,r,n,i)}containsPoint(t){return Xi.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Xi.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const r=this.a,n=this.b,i=this.c;let a,o;Gi.subVectors(n,r),Zi.subVectors(i,r),Qi.subVectors(t,r);const s=Gi.dot(Qi),c=Zi.dot(Qi);if(s<=0&&c<=0)return e.copy(r);ji.subVectors(t,n);const l=Gi.dot(ji),u=Zi.dot(ji);if(l>=0&&u<=l)return e.copy(n);const h=s*u-l*c;if(h<=0&&s>=0&&l<=0)return a=s/(s-l),e.copy(r).addScaledVector(Gi,a);Wi.subVectors(t,i);const f=Gi.dot(Wi),d=Zi.dot(Wi);if(d>=0&&f<=d)return e.copy(i);const p=f*c-s*d;if(p<=0&&c>=0&&d<=0)return o=c/(c-d),e.copy(r).addScaledVector(Zi,o);const m=l*d-f*u;if(m<=0&&u-l>=0&&f-d>=0)return Vi.subVectors(i,n),o=(u-l)/(u-l+(f-d)),e.copy(n).addScaledVector(Vi,o);const g=1/(m+p+h);return a=p*g,o=h*g,e.copy(r).addScaledVector(Gi,a).addScaledVector(Zi,o)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const qi={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},Yi={h:0,s:0,l:0},Ji={h:0,s:0,l:0};function Ki(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+6*(e-t)*(2/3-r):t}class $i{constructor(t,e,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,r)}set(t,e,r){if(void 0===e&&void 0===r){const e=t;e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e)}else this.setRGB(t,e,r);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=qe){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,gn.toWorkingColorSpace(this,e),this}setRGB(t,e,r,n=gn.workingColorSpace){return this.r=t,this.g=e,this.b=r,gn.toWorkingColorSpace(this,n),this}setHSL(t,e,r,n=gn.workingColorSpace){if(t=Xr(t,1),e=Hr(e,0,1),r=Hr(r,0,1),0===e)this.r=this.g=this.b=r;else{const n=r<=.5?r*(1+e):r+e-r*e,i=2*r-n;this.r=Ki(i,n,t+1/3),this.g=Ki(i,n,t),this.b=Ki(i,n,t-1/3)}return gn.toWorkingColorSpace(this,n),this}setStyle(t,e=qe){function r(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(t)){let i;const a=n[1],o=n[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,e);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,e);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(t)){const r=n[1],i=r.length;if(3===i)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,e);if(6===i)return this.setHex(parseInt(r,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=qe){const r=qi[t.toLowerCase()];return void 0!==r?this.setHex(r,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=An(t.r),this.g=An(t.g),this.b=An(t.b),this}copyLinearToSRGB(t){return this.r=vn(t.r),this.g=vn(t.g),this.b=vn(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=qe){return gn.fromWorkingColorSpace(ta.copy(this),t),65536*Math.round(Hr(255*ta.r,0,255))+256*Math.round(Hr(255*ta.g,0,255))+Math.round(Hr(255*ta.b,0,255))}getHexString(t=qe){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=gn.workingColorSpace){gn.fromWorkingColorSpace(ta.copy(this),e);const r=ta.r,n=ta.g,i=ta.b,a=Math.max(r,n,i),o=Math.min(r,n,i);let s,c;const l=(o+a)/2;if(o===a)s=0,c=0;else{const t=a-o;switch(c=l<=.5?t/(a+o):t/(2-a-o),a){case r:s=(n-i)/t+(n0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(const e in t){const r=t[e];if(void 0===r){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}const n=this[e];void 0!==n?n&&n.isColor?n.set(r):n&&n.isVector3&&r&&r.isVector3?n.copy(r):this[e]=r:console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`)}}toJSON(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});const r={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function n(t){const e=[];for(const r in t){const n=t[r];delete n.metadata,e.push(n)}return e}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),void 0!==this.roughness&&(r.roughness=this.roughness),void 0!==this.metalness&&(r.metalness=this.metalness),void 0!==this.sheen&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(r.shininess=this.shininess),void 0!==this.clearcoat&&(r.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(r.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(r.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),void 0!==this.anisotropy&&(r.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(t).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(t).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(t).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(t).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(t).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(r.combine=this.combine)),void 0!==this.envMapIntensity&&(r.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(r.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(r.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(r.size=this.size),null!==this.shadowSide&&(r.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==y&&(r.blending=this.blending),this.side!==p&&(r.side=this.side),!0===this.vertexColors&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),!0===this.transparent&&(r.transparent=!0),this.blendSrc!==L&&(r.blendSrc=this.blendSrc),this.blendDst!==P&&(r.blendDst=this.blendDst),this.blendEquation!==E&&(r.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(r.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(r.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(r.blendAlpha=this.blendAlpha),this.depthFunc!==H&&(r.depthFunc=this.depthFunc),!1===this.depthTest&&(r.depthTest=this.depthTest),!1===this.depthWrite&&(r.depthWrite=this.depthWrite),!1===this.colorWrite&&(r.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(r.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==vr&&(r.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(r.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==ir&&(r.stencilFail=this.stencilFail),this.stencilZFail!==ir&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==ir&&(r.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(r.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(r.rotation=this.rotation),!0===this.polygonOffset&&(r.polygonOffset=!0),0!==this.polygonOffsetFactor&&(r.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(r.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(r.linewidth=this.linewidth),void 0!==this.dashSize&&(r.dashSize=this.dashSize),void 0!==this.gapSize&&(r.gapSize=this.gapSize),void 0!==this.scale&&(r.scale=this.scale),!0===this.dithering&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),!0===this.alphaHash&&(r.alphaHash=!0),!0===this.alphaToCoverage&&(r.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(r.premultipliedAlpha=!0),!0===this.forceSinglePass&&(r.forceSinglePass=!0),!0===this.wireframe&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(r.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(r.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(r.flatShading=!0),!1===this.visible&&(r.visible=!1),!1===this.toneMapped&&(r.toneMapped=!1),!1===this.fog&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData),e){const e=n(t.textures),i=n(t.images);e.length>0&&(r.textures=e),i.length>0&&(r.images=i)}return r}clone(){return(new this.constructor).copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let r=null;if(null!==e){const t=e.length;r=new Array(t);for(let n=0;n!==t;++n)r[n]=e[n].clone()}return this.clippingPlanes=r,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}}class na extends ra{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new $i(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=K,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const ia=aa();function aa(){const t=new ArrayBuffer(4),e=new Float32Array(t),r=new Uint32Array(t),n=new Uint32Array(512),i=new Uint32Array(512);for(let t=0;t<256;++t){const e=t-127;e<-27?(n[t]=0,n[256|t]=32768,i[t]=24,i[256|t]=24):e<-14?(n[t]=1024>>-e-14,n[256|t]=1024>>-e-14|32768,i[t]=-e-1,i[256|t]=-e-1):e<=15?(n[t]=e+15<<10,n[256|t]=e+15<<10|32768,i[t]=13,i[256|t]=13):e<128?(n[t]=31744,n[256|t]=64512,i[t]=24,i[256|t]=24):(n[t]=31744,n[256|t]=64512,i[t]=13,i[256|t]=13)}const a=new Uint32Array(2048),o=new Uint32Array(64),s=new Uint32Array(64);for(let t=1;t<1024;++t){let e=t<<13,r=0;for(;0==(8388608&e);)e<<=1,r-=8388608;e&=-8388609,r+=947912704,a[t]=e|r}for(let t=1024;t<2048;++t)a[t]=939524096+(t-1024<<13);for(let t=1;t<31;++t)o[t]=t<<23;o[31]=1199570944,o[32]=2147483648;for(let t=33;t<63;++t)o[t]=2147483648+(t-32<<23);o[63]=3347054592;for(let t=1;t<64;++t)32!==t&&(s[t]=1024);return{floatView:e,uint32View:r,baseTable:n,shiftTable:i,mantissaTable:a,exponentTable:o,offsetTable:s}}function oa(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Hr(t,-65504,65504),ia.floatView[0]=t;const e=ia.uint32View[0],r=e>>23&511;return ia.baseTable[r]+((8388607&e)>>ia.shiftTable[r])}function sa(t){const e=t>>10;return ia.uint32View[0]=ia.mantissaTable[ia.offsetTable[e]+(1023&t)]+ia.exponentTable[e],ia.floatView[0]}const ca={toHalfFloat:oa,fromHalfFloat:sa},la=new Dn,ua=new en;class ha{constructor(t,e,r=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=r,this.usage=Cr,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Pt,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return console.warn('THREE.BufferAttribute: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,r){t*=this.itemSize,r*=e.itemSize;for(let n=0,i=this.itemSize;n0&&(t.userData=this.userData),void 0!==this.parameters){const e=this.parameters;for(const r in e)void 0!==e[r]&&(t[r]=e[r]);return t}t.data={attributes:{}};const e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const r=this.attributes;for(const e in r){const n=r[e];t.data.attributes[e]=n.toJSON(t.data)}const n={};let i=!1;for(const e in this.morphAttributes){const r=this.morphAttributes[e],a=[];for(let e=0,n=r.length;e0&&(n[e]=a,i=!0)}i&&(t.data.morphAttributes=n,t.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(t.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return null!==o&&(t.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),t}clone(){return(new this.constructor).copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const r=t.index;null!==r&&this.setIndex(r.clone(e));const n=t.attributes;for(const t in n){const r=n[t];this.setAttribute(t,r.clone(e))}const i=t.morphAttributes;for(const t in i){const r=[],n=i[t];for(let t=0,i=n.length;t0){const r=t[e[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=r.length;t(t.far-t.near)**2)return}Ra.copy(i).invert(),Ba.copy(t.ray).applyMatrix4(Ra),null!==r.boundingBox&&!1===Ba.intersectsBox(r.boundingBox)||this._computeIntersections(t,e,Ba)}}_computeIntersections(t,e,r){let n;const i=this.geometry,a=this.material,o=i.index,s=i.attributes.position,c=i.attributes.uv,l=i.attributes.uv1,u=i.attributes.normal,h=i.groups,f=i.drawRange;if(null!==o)if(Array.isArray(a))for(let i=0,s=h.length;ir.far?null:{distance:l,point:Wa.clone(),object:t}}(t,e,r,n,Pa,Da,Ua,ja);if(u){i&&(Na.fromBufferAttribute(i,s),za.fromBufferAttribute(i,c),Ga.fromBufferAttribute(i,l),u.uv=Xi.getInterpolation(ja,Pa,Da,Ua,Na,za,Ga,new en)),a&&(Na.fromBufferAttribute(a,s),za.fromBufferAttribute(a,c),Ga.fromBufferAttribute(a,l),u.uv1=Xi.getInterpolation(ja,Pa,Da,Ua,Na,za,Ga,new en),u.uv2=u.uv1),o&&(Za.fromBufferAttribute(o,s),Va.fromBufferAttribute(o,c),Qa.fromBufferAttribute(o,l),u.normal=Xi.getInterpolation(ja,Pa,Da,Ua,Za,Va,Qa,new Dn),u.normal.dot(n.direction)>0&&u.normal.multiplyScalar(-1));const t={a:s,b:c,c:l,normal:new Dn,materialIndex:0};Xi.getNormal(Pa,Da,Ua,t.normal),u.face=t}return u}class qa extends Ia{constructor(t=1,e=1,r=1,n=1,i=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:r,widthSegments:n,heightSegments:i,depthSegments:a};const o=this;n=Math.floor(n),i=Math.floor(i),a=Math.floor(a);const s=[],c=[],l=[],u=[];let h=0,f=0;function d(t,e,r,n,i,a,d,p,m,g,A){const v=a/m,y=d/g,b=a/2,x=d/2,w=p/2,_=m+1,E=g+1;let M=0,S=0;const C=new Dn;for(let a=0;a0?1:-1,l.push(C.x,C.y,C.z),u.push(s/m),u.push(1-a/g),M+=1}}for(let t=0;t0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e.lights=this.lights,e.clipping=this.clipping;const r={};for(const t in this.extensions)!0===this.extensions[t]&&(r[t]=!0);return Object.keys(r).length>0&&(e.extensions=r),e}}class eo extends Ui{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new hi,this.projectionMatrix=new hi,this.projectionMatrixInverse=new hi,this.coordinateSystem=Nr}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class ro extends eo{constructor(t=50,e=1,r=.1,n=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=r,this.far=n,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=2*jr*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Qr*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*jr*Math.atan(Math.tan(.5*Qr*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,r,n,i,a){this.aspect=t/e,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=t,this.view.fullHeight=e,this.view.offsetX=r,this.view.offsetY=n,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(.5*Qr*this.fov)/this.zoom,r=2*e,n=this.aspect*r,i=-.5*n;const a=this.view;if(null!==this.view&&this.view.enabled){const t=a.fullWidth,o=a.fullHeight;i+=a.offsetX*n/t,e-=a.offsetY*r/o,n*=a.width/t,r*=a.height/o}const o=this.filmOffset;0!==o&&(i+=t*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+n,e,e-r,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}const no=-90;class io extends Ui{constructor(t,e,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const n=new ro(no,1,t,e);n.layers=this.layers,this.add(n);const i=new ro(no,1,t,e);i.layers=this.layers,this.add(i);const a=new ro(no,1,t,e);a.layers=this.layers,this.add(a);const o=new ro(no,1,t,e);o.layers=this.layers,this.add(o);const s=new ro(no,1,t,e);s.layers=this.layers,this.add(s);const c=new ro(no,1,t,e);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const t=this.coordinateSystem,e=this.children.concat(),[r,n,i,a,o,s]=e;for(const t of e)this.remove(t);if(t===Nr)r.up.set(0,1,0),r.lookAt(1,0,0),n.up.set(0,1,0),n.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),s.up.set(0,1,0),s.lookAt(0,0,-1);else{if(t!==zr)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);r.up.set(0,-1,0),r.lookAt(-1,0,0),n.up.set(0,-1,0),n.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),s.up.set(0,-1,0),s.lookAt(0,0,-1)}for(const t of e)this.add(t),t.updateMatrixWorld()}update(t,e){null===this.parent&&this.updateMatrixWorld();const{renderTarget:r,activeMipmapLevel:n}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[i,a,o,s,c,l]=this.children,u=t.getRenderTarget(),h=t.getActiveCubeFace(),f=t.getActiveMipmapLevel(),d=t.xr.enabled;t.xr.enabled=!1;const p=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,t.setRenderTarget(r,0,n),t.render(e,i),t.setRenderTarget(r,1,n),t.render(e,a),t.setRenderTarget(r,2,n),t.render(e,o),t.setRenderTarget(r,3,n),t.render(e,s),t.setRenderTarget(r,4,n),t.render(e,c),r.texture.generateMipmaps=p,t.setRenderTarget(r,5,n),t.render(e,l),t.setRenderTarget(u,h,f),t.xr.enabled=d,r.texture.needsPMREMUpdate=!0}}class ao extends Mn{constructor(t,e,r,n,i,a,o,s,c,l){super(t=void 0!==t?t:[],e=void 0!==e?e:ut,r,n,i,a,o,s,c,l),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class oo extends Tn{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const r={width:t,height:t,depth:1},n=[r,r,r,r,r,r];void 0!==e.encoding&&(hn("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),e.colorSpace=e.encoding===Ve?qe:Xe),this.texture=new ao(n,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:_t}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.colorSpace=e.colorSpace,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const r={tEquirect:{value:null}},n="\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 \n\t\t\t\t\t#include \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 \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 qa(5,5,5),o=new to({name:"CubemapFromEquirect",uniforms:Ya(r),vertexShader:n,fragmentShader:i,side:m,blending:v});o.uniforms.tEquirect.value=e;const s=new Ha(a,o),c=e.minFilter;return e.minFilter===St&&(e.minFilter=_t),new io(1,10,this).update(t,s),e.minFilter=c,s.geometry.dispose(),s.material.dispose(),this}clear(t,e,r,n){const i=t.getRenderTarget();for(let i=0;i<6;i++)t.setRenderTarget(this,i),t.clear(e,r,n);t.setRenderTarget(i)}}const so=new Dn,co=new Dn,lo=new rn;class uo{constructor(t=new Dn(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,r,n){return this.normal.set(t,e,r),this.constant=n,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,r){const n=so.subVectors(r,e).cross(co.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(n,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const r=t.delta(so),n=this.normal.dot(r);if(0===n)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const i=-(t.start.dot(this.normal)+this.constant)/n;return i<0||i>1?null:e.copy(t.start).addScaledVector(r,i)}intersectsLine(t){const e=this.distanceToPoint(t.start),r=this.distanceToPoint(t.end);return e<0&&r>0||r<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const r=e||lo.getNormalMatrix(t),n=this.coplanarPoint(so).applyMatrix4(t),i=this.normal.applyMatrix3(r).normalize();return this.constant=-n.dot(i),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const ho=new ri,fo=new Dn;class po{constructor(t=new uo,e=new uo,r=new uo,n=new uo,i=new uo,a=new uo){this.planes=[t,e,r,n,i,a]}set(t,e,r,n,i,a){const o=this.planes;return o[0].copy(t),o[1].copy(e),o[2].copy(r),o[3].copy(n),o[4].copy(i),o[5].copy(a),this}copy(t){const e=this.planes;for(let r=0;r<6;r++)e[r].copy(t.planes[r]);return this}setFromProjectionMatrix(t,e=Nr){const r=this.planes,n=t.elements,i=n[0],a=n[1],o=n[2],s=n[3],c=n[4],l=n[5],u=n[6],h=n[7],f=n[8],d=n[9],p=n[10],m=n[11],g=n[12],A=n[13],v=n[14],y=n[15];if(r[0].setComponents(s-i,h-c,m-f,y-g).normalize(),r[1].setComponents(s+i,h+c,m+f,y+g).normalize(),r[2].setComponents(s+a,h+l,m+d,y+A).normalize(),r[3].setComponents(s-a,h-l,m-d,y-A).normalize(),r[4].setComponents(s-o,h-u,m-p,y-v).normalize(),e===Nr)r[5].setComponents(s+o,h+u,m+p,y+v).normalize();else{if(e!==zr)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);r[5].setComponents(o,u,p,v).normalize()}return this}intersectsObject(t){if(void 0!==t.boundingSphere)null===t.boundingSphere&&t.computeBoundingSphere(),ho.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),ho.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(ho)}intersectsSprite(t){return ho.center.set(0,0,0),ho.radius=.7071067811865476,ho.applyMatrix4(t.matrixWorld),this.intersectsSphere(ho)}intersectsSphere(t){const e=this.planes,r=t.center,n=-t.radius;for(let t=0;t<6;t++)if(e[t].distanceToPoint(r)0?t.max.x:t.min.x,fo.y=n.normal.y>0?t.max.y:t.min.y,fo.z=n.normal.z>0?t.max.z:t.min.z,n.distanceToPoint(fo)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let r=0;r<6;r++)if(e[r].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function mo(){let t=null,e=!1,r=null,n=null;function i(e,a){r(e,a),n=t.requestAnimationFrame(i)}return{start:function(){!0!==e&&null!==r&&(n=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(t){r=t},setContext:function(e){t=e}}}function go(t,e){const r=e.isWebGL2,n=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),n.get(t)},remove:function(e){e.isInterleavedBufferAttribute&&(e=e.data);const r=n.get(e);r&&(t.deleteBuffer(r.buffer),n.delete(e))},update:function(e,i){if(e.isGLBufferAttribute){const t=n.get(e);return void((!t||t.version 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};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\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}\nvec3 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} // validated",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_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 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, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\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:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef 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#ifdef 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\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\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, vLightMapUv );\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 vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, 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 vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, 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;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\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 ( LEGACY_LIGHTS )\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#else\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#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, 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 vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\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 vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\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 vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, 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 vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, 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( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\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 USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\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, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).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, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).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_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\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\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\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}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\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 = F_Schlick( f0, f90, dotVH );\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\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.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\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\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\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 vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\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 vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, 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 vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, 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( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, 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:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\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, geometryPosition, 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, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, 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, geometryPosition, 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, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, 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, 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, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, 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, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, 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\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\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 ], geometryNormal );\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, vLightMapUv );\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( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, 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, vMapUv );\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\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\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\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_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\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, vMetalnessMapUv );\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 *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).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( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\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 USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.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 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\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",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\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 depth, const in float near, const in float far ) {\n\treturn depth * ( 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 depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - 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_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\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, vRoughnessMapUv );\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\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform 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\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying 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\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\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, vSpecularMapUv );\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 saturate( 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, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = 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, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.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\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\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 lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\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 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 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_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\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 \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",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 \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 \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",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 \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \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 \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\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 \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#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 \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\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 \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \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 USE_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 USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\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_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \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 + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},yo={common:{diffuse:{value:new $i(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new rn},alphaMap:{value:null},alphaMapTransform:{value:new rn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new rn}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new rn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new rn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new rn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new rn},normalScale:{value:new en(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new rn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new rn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new rn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new rn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new $i(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 $i(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new rn},alphaTest:{value:0},uvTransform:{value:new rn}},sprite:{diffuse:{value:new $i(16777215)},opacity:{value:1},center:{value:new en(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new rn},alphaMap:{value:null},alphaMapTransform:{value:new rn},alphaTest:{value:0}}},bo={basic:{uniforms:Ja([yo.common,yo.specularmap,yo.envmap,yo.aomap,yo.lightmap,yo.fog]),vertexShader:vo.meshbasic_vert,fragmentShader:vo.meshbasic_frag},lambert:{uniforms:Ja([yo.common,yo.specularmap,yo.envmap,yo.aomap,yo.lightmap,yo.emissivemap,yo.bumpmap,yo.normalmap,yo.displacementmap,yo.fog,yo.lights,{emissive:{value:new $i(0)}}]),vertexShader:vo.meshlambert_vert,fragmentShader:vo.meshlambert_frag},phong:{uniforms:Ja([yo.common,yo.specularmap,yo.envmap,yo.aomap,yo.lightmap,yo.emissivemap,yo.bumpmap,yo.normalmap,yo.displacementmap,yo.fog,yo.lights,{emissive:{value:new $i(0)},specular:{value:new $i(1118481)},shininess:{value:30}}]),vertexShader:vo.meshphong_vert,fragmentShader:vo.meshphong_frag},standard:{uniforms:Ja([yo.common,yo.envmap,yo.aomap,yo.lightmap,yo.emissivemap,yo.bumpmap,yo.normalmap,yo.displacementmap,yo.roughnessmap,yo.metalnessmap,yo.fog,yo.lights,{emissive:{value:new $i(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:vo.meshphysical_vert,fragmentShader:vo.meshphysical_frag},toon:{uniforms:Ja([yo.common,yo.aomap,yo.lightmap,yo.emissivemap,yo.bumpmap,yo.normalmap,yo.displacementmap,yo.gradientmap,yo.fog,yo.lights,{emissive:{value:new $i(0)}}]),vertexShader:vo.meshtoon_vert,fragmentShader:vo.meshtoon_frag},matcap:{uniforms:Ja([yo.common,yo.bumpmap,yo.normalmap,yo.displacementmap,yo.fog,{matcap:{value:null}}]),vertexShader:vo.meshmatcap_vert,fragmentShader:vo.meshmatcap_frag},points:{uniforms:Ja([yo.points,yo.fog]),vertexShader:vo.points_vert,fragmentShader:vo.points_frag},dashed:{uniforms:Ja([yo.common,yo.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:vo.linedashed_vert,fragmentShader:vo.linedashed_frag},depth:{uniforms:Ja([yo.common,yo.displacementmap]),vertexShader:vo.depth_vert,fragmentShader:vo.depth_frag},normal:{uniforms:Ja([yo.common,yo.bumpmap,yo.normalmap,yo.displacementmap,{opacity:{value:1}}]),vertexShader:vo.meshnormal_vert,fragmentShader:vo.meshnormal_frag},sprite:{uniforms:Ja([yo.sprite,yo.fog]),vertexShader:vo.sprite_vert,fragmentShader:vo.sprite_frag},background:{uniforms:{uvTransform:{value:new rn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:vo.background_vert,fragmentShader:vo.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:vo.backgroundCube_vert,fragmentShader:vo.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:vo.cube_vert,fragmentShader:vo.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:vo.equirect_vert,fragmentShader:vo.equirect_frag},distanceRGBA:{uniforms:Ja([yo.common,yo.displacementmap,{referencePosition:{value:new Dn},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:vo.distanceRGBA_vert,fragmentShader:vo.distanceRGBA_frag},shadow:{uniforms:Ja([yo.lights,yo.fog,{color:{value:new $i(0)},opacity:{value:1}}]),vertexShader:vo.shadow_vert,fragmentShader:vo.shadow_frag}};bo.physical={uniforms:Ja([bo.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new rn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new rn},clearcoatNormalScale:{value:new en(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new rn},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new rn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new rn},sheen:{value:0},sheenColor:{value:new $i(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new rn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new rn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new rn},transmissionSamplerSize:{value:new en},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new rn},attenuationDistance:{value:0},attenuationColor:{value:new $i(0)},specularColor:{value:new $i(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new rn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new rn},anisotropyVector:{value:new en},anisotropyMap:{value:null},anisotropyMapTransform:{value:new rn}}]),vertexShader:vo.meshphysical_vert,fragmentShader:vo.meshphysical_frag};const xo={r:0,b:0,g:0};function wo(t,e,r,n,i,a,o){const s=new $i(0);let c,l,u=!0===a?0:1,h=null,f=0,d=null;function g(e,r){e.getRGB(xo,Ka(t)),n.buffers.color.setClear(xo.r,xo.g,xo.b,r,o)}return{getClearColor:function(){return s},setClearColor:function(t,e=1){s.set(t),u=e,g(s,u)},getClearAlpha:function(){return u},setClearAlpha:function(t){u=t,g(s,u)},render:function(a,A){let v=!1,y=!0===A.isScene?A.background:null;y&&y.isTexture&&(y=(A.backgroundBlurriness>0?r:e).get(y)),null===y?g(s,u):y&&y.isColor&&(g(y,1),v=!0);const b=t.xr.getEnvironmentBlendMode();"additive"===b?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===b&&n.buffers.color.setClear(0,0,0,0,o),(t.autoClear||v)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),y&&(y.isCubeTexture||y.mapping===pt)?(void 0===l&&(l=new Ha(new qa(1,1,1),new to({name:"BackgroundCubeMaterial",uniforms:Ya(bo.backgroundCube.uniforms),vertexShader:bo.backgroundCube.vertexShader,fragmentShader:bo.backgroundCube.fragmentShader,side:m,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(t,e,r){this.matrixWorld.copyPosition(r.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(l)),l.material.uniforms.envMap.value=y,l.material.uniforms.flipEnvMap.value=y.isCubeTexture&&!1===y.isRenderTargetTexture?-1:1,l.material.uniforms.backgroundBlurriness.value=A.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,l.material.toneMapped=gn.getTransfer(y.colorSpace)!==tr,h===y&&f===y.version&&d===t.toneMapping||(l.material.needsUpdate=!0,h=y,f=y.version,d=t.toneMapping),l.layers.enableAll(),a.unshift(l,l.geometry,l.material,0,0,null)):y&&y.isTexture&&(void 0===c&&(c=new Ha(new Ao(2,2),new to({name:"BackgroundMaterial",uniforms:Ya(bo.background.uniforms),vertexShader:bo.background.vertexShader,fragmentShader:bo.background.fragmentShader,side:p,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=y,c.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,c.material.toneMapped=gn.getTransfer(y.colorSpace)!==tr,!0===y.matrixAutoUpdate&&y.updateMatrix(),c.material.uniforms.uvTransform.value.copy(y.matrix),h===y&&f===y.version&&d===t.toneMapping||(c.material.needsUpdate=!0,h=y,f=y.version,d=t.toneMapping),c.layers.enableAll(),a.unshift(c,c.geometry,c.material,0,0,null))}}}function _o(t,e,r,n){const i=t.getParameter(t.MAX_VERTEX_ATTRIBS),a=n.isWebGL2?null:e.get("OES_vertex_array_object"),o=n.isWebGL2||null!==a,s={},c=d(null);let l=c,u=!1;function h(e){return n.isWebGL2?t.bindVertexArray(e):a.bindVertexArrayOES(e)}function f(e){return n.isWebGL2?t.deleteVertexArray(e):a.deleteVertexArrayOES(e)}function d(t){const e=[],r=[],n=[];for(let t=0;t=0){const r=i[e];let n=a[e];if(void 0===n&&("instanceMatrix"===e&&t.instanceMatrix&&(n=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(n=t.instanceColor)),void 0===r)return!0;if(r.attribute!==n)return!0;if(n&&r.data!==n.data)return!0;o++}return l.attributesNum!==o||l.index!==n}(i,y,f,b),x&&function(t,e,r,n){const i={},a=e.attributes;let o=0;const s=r.getAttributes();for(const e in s)if(s[e].location>=0){let r=a[e];void 0===r&&("instanceMatrix"===e&&t.instanceMatrix&&(r=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(r=t.instanceColor));const n={};n.attribute=r,r&&r.data&&(n.data=r.data),i[e]=n,o++}l.attributes=i,l.attributesNum=o,l.index=n}(i,y,f,b)}else{const t=!0===c.wireframe;l.geometry===y.id&&l.program===f.id&&l.wireframe===t||(l.geometry=y.id,l.program=f.id,l.wireframe=t,x=!0)}null!==b&&r.update(b,t.ELEMENT_ARRAY_BUFFER),(x||u)&&(u=!1,function(i,a,o,s){if(!1===n.isWebGL2&&(i.isInstancedMesh||s.isInstancedBufferGeometry)&&null===e.get("ANGLE_instanced_arrays"))return;p();const c=s.attributes,l=o.getAttributes(),u=a.defaultAttributeValues;for(const e in l){const a=l[e];if(a.location>=0){let o=c[e];if(void 0===o&&("instanceMatrix"===e&&i.instanceMatrix&&(o=i.instanceMatrix),"instanceColor"===e&&i.instanceColor&&(o=i.instanceColor)),void 0!==o){const e=o.normalized,c=o.itemSize,l=r.get(o);if(void 0===l)continue;const u=l.buffer,h=l.type,f=l.bytesPerElement,d=!0===n.isWebGL2&&(h===t.INT||h===t.UNSIGNED_INT||o.gpuType===kt);if(o.isInterleavedBufferAttribute){const r=o.data,n=r.stride,l=o.offset;if(r.isInstancedInterleavedBuffer){for(let t=0;t0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const a="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===t.constructor.name;let o=void 0!==r.precision?r.precision:"highp";const s=i(o);s!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",s,"instead."),o=s);const c=a||e.has("WEBGL_draw_buffers"),l=!0===r.logarithmicDepthBuffer,u=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),f=t.getParameter(t.MAX_TEXTURE_SIZE),d=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),m=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),g=t.getParameter(t.MAX_VARYING_VECTORS),A=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=h>0,y=a||e.has("OES_texture_float");return{isWebGL2:a,drawBuffers:c,getMaxAnisotropy:function(){if(void 0!==n)return n;if(!0===e.has("EXT_texture_filter_anisotropic")){const r=e.get("EXT_texture_filter_anisotropic");n=t.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else n=0;return n},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:l,maxTextures:u,maxVertexTextures:h,maxTextureSize:f,maxCubemapSize:d,maxAttributes:p,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:A,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:a?t.getParameter(t.MAX_SAMPLES):0}}function So(t){const e=this;let r=null,n=0,i=!1,a=!1;const o=new uo,s=new rn,c={value:null,needsUpdate:!1};function l(t,r,n,i){const a=null!==t?t.length:0;let l=null;if(0!==a){if(l=c.value,!0!==i||null===l){const e=n+4*a,i=r.matrixWorldInverse;s.getNormalMatrix(i),(null===l||l.length0),e.numPlanes=n,e.numIntersection=0);else{const t=a?0:n,e=4*t;let i=p.clippingState||null;c.value=i,i=l(h,s,e,u);for(let t=0;t!==e;++t)i[t]=r[t];p.clippingState=i,this.numIntersection=f?this.numPlanes:0,this.numPlanes+=t}}}function Co(t){let e=new WeakMap;function r(t,e){return e===ft?t.mapping=ut:e===dt&&(t.mapping=ht),t}function n(t){const r=t.target;r.removeEventListener("dispose",n);const i=e.get(r);void 0!==i&&(e.delete(r),i.dispose())}return{get:function(i){if(i&&i.isTexture){const a=i.mapping;if(a===ft||a===dt){if(e.has(i))return r(e.get(i).texture,i.mapping);{const a=i.image;if(a&&a.height>0){const o=new oo(a.height/2);return o.fromEquirectangularTexture(t,i),e.set(i,o),i.addEventListener("dispose",n),r(o.texture,i.mapping)}return null}}}return i},dispose:function(){e=new WeakMap}}}class To extends eo{constructor(t=-1,e=1,r=1,n=-1,i=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=r,this.bottom=n,this.near=i,this.far=a,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this}setViewOffset(t,e,r,n,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=t,this.view.fullHeight=e,this.view.offsetX=r,this.view.offsetY=n,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,n=(this.top+this.bottom)/2;let i=r-t,a=r+t,o=n+e,s=n-e;if(null!==this.view&&this.view.enabled){const t=(this.right-this.left)/this.view.fullWidth/this.zoom,e=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=t*this.view.offsetX,a=i+t*this.view.width,o-=e*this.view.offsetY,s=o-e*this.view.height}this.projectionMatrix.makeOrthographic(i,a,o,s,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}const Io=[.125,.215,.35,.446,.526,.582],Ro=new To,Bo=new $i;let ko=null,Lo=0,Po=0;const Do=(1+Math.sqrt(5))/2,Uo=1/Do,Oo=[new Dn(1,1,1),new Dn(-1,1,1),new Dn(1,1,-1),new Dn(-1,1,-1),new Dn(0,Do,Uo),new Dn(0,Do,-Uo),new Dn(Uo,0,Do),new Dn(-Uo,0,Do),new Dn(Do,Uo,0),new Dn(-Do,Uo,0)];class Fo{constructor(t){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)}fromScene(t,e=0,r=.1,n=100){ko=this._renderer.getRenderTarget(),Lo=this._renderer.getActiveCubeFace(),Po=this._renderer.getActiveMipmapLevel(),this._setSize(256);const i=this._allocateTargets();return i.depthBuffer=!0,this._sceneToCubeUV(t,r,n,i),e>0&&this._blur(i,0,0,e),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=Zo(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=Go(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let t=0;tt-4?s=Io[o-t+4-1]:0===o&&(s=0),n.push(s);const c=1/(a-2),l=-c,u=1+c,h=[l,l,u,l,u,u,l,l,u,u,l,u],f=6,d=6,p=3,m=2,g=1,A=new Float32Array(p*d*f),v=new Float32Array(m*d*f),y=new Float32Array(g*d*f);for(let t=0;t2?0:-1,n=[e,r,0,e+2/3,r,0,e+2/3,r+1,0,e,r,0,e+2/3,r+1,0,e,r+1,0];A.set(n,p*d*t),v.set(h,m*d*t);const i=[t,t,t,t,t,t];y.set(i,g*d*t)}const b=new Ia;b.setAttribute("position",new ha(A,p)),b.setAttribute("uv",new ha(v,m)),b.setAttribute("faceIndex",new ha(y,g)),e.push(b),i>4&&i--}return{lodPlanes:e,sizeLods:r,sigmas:n}}(n)),this._blurMaterial=function(t,e,r){const n=new Float32Array(20),i=new Dn(0,1,0);return new to({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/r,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},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 \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:v,depthTest:!1,depthWrite:!1})}(n,t,e)}return n}_compileMaterial(t){const e=new Ha(this._lodPlanes[0],t);this._renderer.compile(e,Ro)}_sceneToCubeUV(t,e,r,n){const i=new ro(90,1,e,r),a=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],s=this._renderer,c=s.autoClear,l=s.toneMapping;s.getClearColor(Bo),s.toneMapping=et,s.autoClear=!1;const u=new na({name:"PMREM.Background",side:m,depthWrite:!1,depthTest:!1}),h=new Ha(new qa,u);let f=!1;const d=t.background;d?d.isColor&&(u.color.copy(d),t.background=null,f=!0):(u.color.copy(Bo),f=!0);for(let e=0;e<6;e++){const r=e%3;0===r?(i.up.set(0,a[e],0),i.lookAt(o[e],0,0)):1===r?(i.up.set(0,0,a[e]),i.lookAt(0,o[e],0)):(i.up.set(0,a[e],0),i.lookAt(0,0,o[e]));const c=this._cubeSize;zo(n,r*c,e>2?c:0,c,c),s.setRenderTarget(n),f&&s.render(h,i),s.render(t,i)}h.geometry.dispose(),h.material.dispose(),s.toneMapping=l,s.autoClear=c,t.background=d}_textureToCubeUV(t,e){const r=this._renderer,n=t.mapping===ut||t.mapping===ht;n?(null===this._cubemapMaterial&&(this._cubemapMaterial=Zo()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=Go());const i=n?this._cubemapMaterial:this._equirectMaterial,a=new Ha(this._lodPlanes[0],i);i.uniforms.envMap.value=t;const o=this._cubeSize;zo(e,0,0,3*o,2*o),r.setRenderTarget(e),r.render(a,Ro)}_applyPMREM(t){const e=this._renderer,r=e.autoClear;e.autoClear=!1;for(let e=1;e20&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${p} samples when the maximum is set to 20`);const m=[];let g=0;for(let t=0;t<20;++t){const e=t/d,r=Math.exp(-e*e/2);m.push(r),0===t?g+=r:tA-4?n-A+4:0),4*(this._cubeSize-v),3*v,2*v),s.setRenderTarget(e),s.render(l,Ro)}}function No(t,e,r){const n=new Tn(t,e,r);return n.texture.mapping=pt,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function zo(t,e,r,n,i){t.viewport.set(e,r,n,i),t.scissor.set(e,r,n,i)}function Go(){return new to({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 \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:v,depthTest:!1,depthWrite:!1})}function Zo(){return new to({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:v,depthTest:!1,depthWrite:!1})}function Vo(t){let e=new WeakMap,r=null;function n(t){const r=t.target;r.removeEventListener("dispose",n);const i=e.get(r);void 0!==i&&(e.delete(r),i.dispose())}return{get:function(i){if(i&&i.isTexture){const a=i.mapping,o=a===ft||a===dt,s=a===ut||a===ht;if(o||s){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;let n=e.get(i);return null===r&&(r=new Fo(t)),n=o?r.fromEquirectangular(i,n):r.fromCubemap(i,n),e.set(i,n),n.texture}if(e.has(i))return e.get(i).texture;{const a=i.image;if(o&&a&&a.height>0||s&&a&&function(t){let e=0;for(let r=0;r<6;r++)void 0!==t[r]&&e++;return 6===e}(a)){null===r&&(r=new Fo(t));const a=o?r.fromEquirectangular(i):r.fromCubemap(i);return e.set(i,a),i.addEventListener("dispose",n),a.texture}return null}}}return i},dispose:function(){e=new WeakMap,null!==r&&(r.dispose(),r=null)}}}function Qo(t){const e={};function r(r){if(void 0!==e[r])return e[r];let n;switch(r){case"WEBGL_depth_texture":n=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=t.getExtension(r)}return e[r]=n,n}return{has:function(t){return null!==r(t)},init:function(t){t.isWebGL2?r("EXT_color_buffer_float"):(r("WEBGL_depth_texture"),r("OES_texture_float"),r("OES_texture_half_float"),r("OES_texture_half_float_linear"),r("OES_standard_derivatives"),r("OES_element_index_uint"),r("OES_vertex_array_object"),r("ANGLE_instanced_arrays")),r("OES_texture_float_linear"),r("EXT_color_buffer_half_float"),r("WEBGL_multisampled_render_to_texture")},get:function(t){const e=r(t);return null===e&&console.warn("THREE.WebGLRenderer: "+t+" extension not supported."),e}}}function jo(t,e,r,n){const i={},a=new WeakMap;function o(t){const s=t.target;null!==s.index&&e.remove(s.index);for(const t in s.attributes)e.remove(s.attributes[t]);for(const t in s.morphAttributes){const r=s.morphAttributes[t];for(let t=0,n=r.length;te.maxTextureSize&&(M=Math.ceil(E/e.maxTextureSize),E=e.maxTextureSize);const S=new Float32Array(E*M*4*d),C=new In(S,E,M,d);C.type=Pt,C.needsUpdate=!0;const T=4*_;for(let R=0;R0)return t;const i=e*r;let a=is[i];if(void 0===a&&(a=new Float32Array(i),is[i]=a),0!==e){n.toArray(a,0);for(let n=1,i=0;n!==e;++n)i+=r,t[n].toArray(a,i)}return a}function us(t,e){if(t.length!==e.length)return!1;for(let r=0,n=t.length;r":" "} ${i}: ${r[t]}`)}return n.join("\n")}(t.getShaderSource(e),n)}return i}function cc(t,e){const r=function(t){const e=gn.getPrimaries(gn.workingColorSpace),r=gn.getPrimaries(t);let n;switch(e===r?n="":e===rr&&r===er?n="LinearDisplayP3ToLinearSRGB":e===er&&r===rr&&(n="LinearSRGBToLinearDisplayP3"),t){case Ye:case Ke:return[n,"LinearTransferOETF"];case qe:case Je:return[n,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[n,"LinearTransferOETF"]}}(e);return`vec4 ${t}( vec4 value ) { return ${r[0]}( ${r[1]}( value ) ); }`}function lc(t,e){let r;switch(e){case rt:r="Linear";break;case nt:r="Reinhard";break;case it:r="OptimizedCineon";break;case at:r="ACESFilmic";break;case ot:r="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),r="Linear"}return"vec3 "+t+"( vec3 color ) { return "+r+"ToneMapping( color ); }"}function uc(t){return""!==t}function hc(t,e){const r=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,r).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function fc(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const dc=/^[ \t]*#include +<([\w\d./]+)>/gm;function pc(t){return t.replace(dc,gc)}const mc=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function gc(t,e){let r=vo[e];if(void 0===r){const t=mc.get(e);if(void 0===t)throw new Error("Can not resolve #include <"+e+">");r=vo[t],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,t)}return pc(r)}const Ac=/#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 vc(t){return t.replace(Ac,yc)}function yc(t,e,r,n){let i="";for(let t=parseInt(e);t0&&(y+="\n"),b=[g,"#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,A].filter(uc).join("\n"),b.length>0&&(b+="\n")):(y=[bc(r),"#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,A,r.batching?"#define USE_BATCHING":"",r.instancing?"#define USE_INSTANCING":"",r.instancingColor?"#define USE_INSTANCING_COLOR":"",r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+u:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",r.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",r.displacementMap?"#define USE_DISPLACEMENTMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.anisotropy?"#define USE_ANISOTROPY":"",r.anisotropyMap?"#define USE_ANISOTROPYMAP":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",r.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",r.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.alphaHash?"#define USE_ALPHAHASH":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",r.mapUv?"#define MAP_UV "+r.mapUv:"",r.alphaMapUv?"#define ALPHAMAP_UV "+r.alphaMapUv:"",r.lightMapUv?"#define LIGHTMAP_UV "+r.lightMapUv:"",r.aoMapUv?"#define AOMAP_UV "+r.aoMapUv:"",r.emissiveMapUv?"#define EMISSIVEMAP_UV "+r.emissiveMapUv:"",r.bumpMapUv?"#define BUMPMAP_UV "+r.bumpMapUv:"",r.normalMapUv?"#define NORMALMAP_UV "+r.normalMapUv:"",r.displacementMapUv?"#define DISPLACEMENTMAP_UV "+r.displacementMapUv:"",r.metalnessMapUv?"#define METALNESSMAP_UV "+r.metalnessMapUv:"",r.roughnessMapUv?"#define ROUGHNESSMAP_UV "+r.roughnessMapUv:"",r.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+r.anisotropyMapUv:"",r.clearcoatMapUv?"#define CLEARCOATMAP_UV "+r.clearcoatMapUv:"",r.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+r.clearcoatNormalMapUv:"",r.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+r.clearcoatRoughnessMapUv:"",r.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+r.iridescenceMapUv:"",r.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+r.iridescenceThicknessMapUv:"",r.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+r.sheenColorMapUv:"",r.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+r.sheenRoughnessMapUv:"",r.specularMapUv?"#define SPECULARMAP_UV "+r.specularMapUv:"",r.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+r.specularColorMapUv:"",r.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+r.specularIntensityMapUv:"",r.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+r.transmissionMapUv:"",r.thicknessMapUv?"#define THICKNESSMAP_UV "+r.thicknessMapUv:"",r.vertexTangents&&!1===r.flatShading?"#define USE_TANGENT":"",r.vertexColors?"#define USE_COLOR":"",r.vertexAlphas?"#define USE_COLOR_ALPHA":"",r.vertexUv1s?"#define USE_UV1":"",r.vertexUv2s?"#define USE_UV2":"",r.vertexUv3s?"#define USE_UV3":"",r.pointsUvs?"#define USE_POINTS_UV":"",r.flatShading?"#define FLAT_SHADED":"",r.skinning?"#define USE_SKINNING":"",r.morphTargets?"#define USE_MORPHTARGETS":"",r.morphNormals&&!1===r.flatShading?"#define USE_MORPHNORMALS":"",r.morphColors&&r.isWebGL2?"#define USE_MORPHCOLORS":"",r.morphTargetsCount>0&&r.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",r.morphTargetsCount>0&&r.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+r.morphTextureStride:"",r.morphTargetsCount>0&&r.isWebGL2?"#define MORPHTARGETS_COUNT "+r.morphTargetsCount:"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+c:"",r.sizeAttenuation?"#define USE_SIZEATTENUATION":"",r.numLightProbes>0?"#define USE_LIGHT_PROBES":"",r.useLegacyLights?"#define LEGACY_LIGHTS":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&r.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_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#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(uc).join("\n"),b=[g,bc(r),"#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,A,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.matcap?"#define USE_MATCAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+l:"",r.envMap?"#define "+u:"",r.envMap?"#define "+p:"",m?"#define CUBEUV_TEXEL_WIDTH "+m.texelWidth:"",m?"#define CUBEUV_TEXEL_HEIGHT "+m.texelHeight:"",m?"#define CUBEUV_MAX_MIP "+m.maxMip+".0":"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",r.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.anisotropy?"#define USE_ANISOTROPY":"",r.anisotropyMap?"#define USE_ANISOTROPYMAP":"",r.clearcoat?"#define USE_CLEARCOAT":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.iridescence?"#define USE_IRIDESCENCE":"",r.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",r.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",r.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.alphaTest?"#define USE_ALPHATEST":"",r.alphaHash?"#define USE_ALPHAHASH":"",r.sheen?"#define USE_SHEEN":"",r.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.vertexTangents&&!1===r.flatShading?"#define USE_TANGENT":"",r.vertexColors||r.instancingColor?"#define USE_COLOR":"",r.vertexAlphas?"#define USE_COLOR_ALPHA":"",r.vertexUv1s?"#define USE_UV1":"",r.vertexUv2s?"#define USE_UV2":"",r.vertexUv3s?"#define USE_UV3":"",r.pointsUvs?"#define USE_POINTS_UV":"",r.gradientMap?"#define USE_GRADIENTMAP":"",r.flatShading?"#define FLAT_SHADED":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+c:"",r.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",r.numLightProbes>0?"#define USE_LIGHT_PROBES":"",r.useLegacyLights?"#define LEGACY_LIGHTS":"",r.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&r.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",r.toneMapping!==et?"#define TONE_MAPPING":"",r.toneMapping!==et?vo.tonemapping_pars_fragment:"",r.toneMapping!==et?lc("toneMapping",r.toneMapping):"",r.dithering?"#define DITHERING":"",r.opaque?"#define OPAQUE":"",vo.colorspace_pars_fragment,cc("linearToOutputTexel",r.outputColorSpace),r.useDepthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(uc).join("\n")),o=pc(o),o=hc(o,r),o=fc(o,r),s=pc(s),s=hc(s,r),s=fc(s,r),o=vc(o),s=vc(s),r.isWebGL2&&!0!==r.isRawShaderMaterial&&(x="#version 300 es\n",y=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+y,b=["precision mediump sampler2DArray;","#define varying in",r.glslVersion===Or?"":"layout(location = 0) out highp vec4 pc_fragColor;",r.glslVersion===Or?"":"#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"+b);const w=x+y+o,_=x+b+s,E=ic(i,i.VERTEX_SHADER,w),M=ic(i,i.FRAGMENT_SHADER,_);function S(e){if(t.debug.checkShaderErrors){const r=i.getProgramInfoLog(v).trim(),n=i.getShaderInfoLog(E).trim(),a=i.getShaderInfoLog(M).trim();let o=!0,s=!0;if(!1===i.getProgramParameter(v,i.LINK_STATUS))if(o=!1,"function"==typeof t.debug.onShaderError)t.debug.onShaderError(i,v,E,M);else{const t=sc(i,E,"vertex"),e=sc(i,M,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(v,i.VALIDATE_STATUS)+"\n\nProgram Info Log: "+r+"\n"+t+"\n"+e)}else""!==r?console.warn("THREE.WebGLProgram: Program Info Log:",r):""!==n&&""!==a||(s=!1);s&&(e.diagnostics={runnable:o,programLog:r,vertexShader:{log:n,prefix:y},fragmentShader:{log:a,prefix:b}})}i.deleteShader(E),i.deleteShader(M),C=new nc(i,v),T=function(t,e){const r={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i0,q=a.clearcoat>0,Y=a.iridescence>0,J=a.sheen>0,K=a.transmission>0,$=X&&!!a.anisotropyMap,tt=q&&!!a.clearcoatMap,rt=q&&!!a.clearcoatNormalMap,nt=q&&!!a.clearcoatRoughnessMap,it=Y&&!!a.iridescenceMap,at=Y&&!!a.iridescenceThicknessMap,ot=J&&!!a.sheenColorMap,st=J&&!!a.sheenRoughnessMap,ct=!!a.specularMap,lt=!!a.specularColorMap,ut=!!a.specularIntensityMap,ht=K&&!!a.transmissionMap,ft=K&&!!a.thicknessMap,dt=!!a.gradientMap,mt=!!a.alphaMap,gt=a.alphaTest>0,At=!!a.alphaHash,vt=!!a.extensions,yt=!!w.attributes.uv1,bt=!!w.attributes.uv2,xt=!!w.attributes.uv3;let wt=et;return a.toneMapped&&(null!==P&&!0!==P.isXRRenderTarget||(wt=t.toneMapping)),{isWebGL2:u,shaderID:S,shaderType:a.type,shaderName:a.name,vertexShader:I,fragmentShader:R,defines:a.defines,customVertexShaderID:B,customFragmentShaderID:k,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:d,batching:U,instancing:D,instancingColor:D&&null!==b.instanceColor,supportsVertexTextures:f,outputColorSpace:null===P?t.outputColorSpace:!0===P.isXRRenderTarget?P.texture.colorSpace:Ye,map:O,matcap:F,envMap:N,envMapMode:N&&E.mapping,envMapCubeUVHeight:M,aoMap:z,lightMap:G,bumpMap:Z,normalMap:V,displacementMap:f&&Q,emissiveMap:j,normalMapObjectSpace:V&&a.normalMapType===He,normalMapTangentSpace:V&&a.normalMapType===We,metalnessMap:W,roughnessMap:H,anisotropy:X,anisotropyMap:$,clearcoat:q,clearcoatMap:tt,clearcoatNormalMap:rt,clearcoatRoughnessMap:nt,iridescence:Y,iridescenceMap:it,iridescenceThicknessMap:at,sheen:J,sheenColorMap:ot,sheenRoughnessMap:st,specularMap:ct,specularColorMap:lt,specularIntensityMap:ut,transmission:K,transmissionMap:ht,thicknessMap:ft,gradientMap:dt,opaque:!1===a.transparent&&a.blending===y,alphaMap:mt,alphaTest:gt,alphaHash:At,combine:a.combine,mapUv:O&&A(a.map.channel),aoMapUv:z&&A(a.aoMap.channel),lightMapUv:G&&A(a.lightMap.channel),bumpMapUv:Z&&A(a.bumpMap.channel),normalMapUv:V&&A(a.normalMap.channel),displacementMapUv:Q&&A(a.displacementMap.channel),emissiveMapUv:j&&A(a.emissiveMap.channel),metalnessMapUv:W&&A(a.metalnessMap.channel),roughnessMapUv:H&&A(a.roughnessMap.channel),anisotropyMapUv:$&&A(a.anisotropyMap.channel),clearcoatMapUv:tt&&A(a.clearcoatMap.channel),clearcoatNormalMapUv:rt&&A(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:nt&&A(a.clearcoatRoughnessMap.channel),iridescenceMapUv:it&&A(a.iridescenceMap.channel),iridescenceThicknessMapUv:at&&A(a.iridescenceThicknessMap.channel),sheenColorMapUv:ot&&A(a.sheenColorMap.channel),sheenRoughnessMapUv:st&&A(a.sheenRoughnessMap.channel),specularMapUv:ct&&A(a.specularMap.channel),specularColorMapUv:lt&&A(a.specularColorMap.channel),specularIntensityMapUv:ut&&A(a.specularIntensityMap.channel),transmissionMapUv:ht&&A(a.transmissionMap.channel),thicknessMapUv:ft&&A(a.thicknessMap.channel),alphaMapUv:mt&&A(a.alphaMap.channel),vertexTangents:!!w.attributes.tangent&&(V||X),vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!w.attributes.color&&4===w.attributes.color.itemSize,vertexUv1s:yt,vertexUv2s:bt,vertexUv3s:xt,pointsUvs:!0===b.isPoints&&!!w.attributes.uv&&(O||mt),fog:!!x,useFog:!0===a.fog,fogExp2:x&&x.isFogExp2,flatShading:!0===a.flatShading,sizeAttenuation:!0===a.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===b.isSkinnedMesh,morphTargets:void 0!==w.morphAttributes.position,morphNormals:void 0!==w.morphAttributes.normal,morphColors:void 0!==w.morphAttributes.color,morphTargetsCount:T,morphTextureStride:L,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numSpotLightMaps:s.spotLightMap.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numSpotLightShadowsWithMaps:s.numSpotLightShadowsWithMaps,numLightProbes:s.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:a.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.length>0,shadowMapType:t.shadowMap.type,toneMapping:wt,useLegacyLights:t._useLegacyLights,decodeVideoTexture:O&&!0===a.map.isVideoTexture&&gn.getTransfer(a.map.colorSpace)===tr,premultipliedAlpha:a.premultipliedAlpha,doubleSided:a.side===g,flipSided:a.side===m,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionDerivatives:vt&&!0===a.extensions.derivatives,extensionFragDepth:vt&&!0===a.extensions.fragDepth,extensionDrawBuffers:vt&&!0===a.extensions.drawBuffers,extensionShaderTextureLOD:vt&&!0===a.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||n.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:a.customProgramCacheKey()}},getProgramCacheKey:function(e){const r=[];if(e.shaderID?r.push(e.shaderID):(r.push(e.customVertexShaderID),r.push(e.customFragmentShaderID)),void 0!==e.defines)for(const t in e.defines)r.push(t),r.push(e.defines[t]);return!1===e.isRawShaderMaterial&&(function(t,e){t.push(e.precision),t.push(e.outputColorSpace),t.push(e.envMapMode),t.push(e.envMapCubeUVHeight),t.push(e.mapUv),t.push(e.alphaMapUv),t.push(e.lightMapUv),t.push(e.aoMapUv),t.push(e.bumpMapUv),t.push(e.normalMapUv),t.push(e.displacementMapUv),t.push(e.emissiveMapUv),t.push(e.metalnessMapUv),t.push(e.roughnessMapUv),t.push(e.anisotropyMapUv),t.push(e.clearcoatMapUv),t.push(e.clearcoatNormalMapUv),t.push(e.clearcoatRoughnessMapUv),t.push(e.iridescenceMapUv),t.push(e.iridescenceThicknessMapUv),t.push(e.sheenColorMapUv),t.push(e.sheenRoughnessMapUv),t.push(e.specularMapUv),t.push(e.specularColorMapUv),t.push(e.specularIntensityMapUv),t.push(e.transmissionMapUv),t.push(e.thicknessMapUv),t.push(e.combine),t.push(e.fogExp2),t.push(e.sizeAttenuation),t.push(e.morphTargetsCount),t.push(e.morphAttributeCount),t.push(e.numDirLights),t.push(e.numPointLights),t.push(e.numSpotLights),t.push(e.numSpotLightMaps),t.push(e.numHemiLights),t.push(e.numRectAreaLights),t.push(e.numDirLightShadows),t.push(e.numPointLightShadows),t.push(e.numSpotLightShadows),t.push(e.numSpotLightShadowsWithMaps),t.push(e.numLightProbes),t.push(e.shadowMapType),t.push(e.toneMapping),t.push(e.numClippingPlanes),t.push(e.numClipIntersection),t.push(e.depthPacking)}(r,e),function(t,e){s.disableAll(),e.isWebGL2&&s.enable(0),e.supportsVertexTextures&&s.enable(1),e.instancing&&s.enable(2),e.instancingColor&&s.enable(3),e.matcap&&s.enable(4),e.envMap&&s.enable(5),e.normalMapObjectSpace&&s.enable(6),e.normalMapTangentSpace&&s.enable(7),e.clearcoat&&s.enable(8),e.iridescence&&s.enable(9),e.alphaTest&&s.enable(10),e.vertexColors&&s.enable(11),e.vertexAlphas&&s.enable(12),e.vertexUv1s&&s.enable(13),e.vertexUv2s&&s.enable(14),e.vertexUv3s&&s.enable(15),e.vertexTangents&&s.enable(16),e.anisotropy&&s.enable(17),e.alphaHash&&s.enable(18),e.batching&&s.enable(19),t.push(s.mask),s.disableAll(),e.fog&&s.enable(0),e.useFog&&s.enable(1),e.flatShading&&s.enable(2),e.logarithmicDepthBuffer&&s.enable(3),e.skinning&&s.enable(4),e.morphTargets&&s.enable(5),e.morphNormals&&s.enable(6),e.morphColors&&s.enable(7),e.premultipliedAlpha&&s.enable(8),e.shadowMapEnabled&&s.enable(9),e.useLegacyLights&&s.enable(10),e.doubleSided&&s.enable(11),e.flipSided&&s.enable(12),e.useDepthPacking&&s.enable(13),e.dithering&&s.enable(14),e.transmission&&s.enable(15),e.sheen&&s.enable(16),e.opaque&&s.enable(17),e.pointsUvs&&s.enable(18),e.decodeVideoTexture&&s.enable(19),t.push(s.mask)}(r,e),r.push(t.outputColorSpace)),r.push(e.customProgramCacheKey),r.join()},getUniforms:function(t){const e=p[t.type];let r;if(e){const t=bo[e];r=$a.clone(t.uniforms)}else r=t.uniforms;return r},acquireProgram:function(e,r){let n;for(let t=0,e=l.length;t0?n.push(u):!0===o.transparent?i.push(u):r.push(u)},unshift:function(t,e,o,s,c,l){const u=a(t,e,o,s,c,l);o.transmission>0?n.unshift(u):!0===o.transparent?i.unshift(u):r.unshift(u)},finish:function(){for(let r=e,n=t.length;r1&&r.sort(t||Cc),n.length>1&&n.sort(e||Tc),i.length>1&&i.sort(e||Tc)}}}function Rc(){let t=new WeakMap;return{get:function(e,r){const n=t.get(e);let i;return void 0===n?(i=new Ic,t.set(e,[i])):r>=n.length?(i=new Ic,n.push(i)):i=n[r],i},dispose:function(){t=new WeakMap}}}function Bc(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let r;switch(e.type){case"DirectionalLight":r={direction:new Dn,color:new $i};break;case"SpotLight":r={position:new Dn,direction:new Dn,color:new $i,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":r={position:new Dn,color:new $i,distance:0,decay:0};break;case"HemisphereLight":r={direction:new Dn,skyColor:new $i,groundColor:new $i};break;case"RectAreaLight":r={color:new $i,position:new Dn,halfWidth:new Dn,halfHeight:new Dn}}return t[e.id]=r,r}}}let kc=0;function Lc(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function Pc(t,e){const r=new Bc,n=function(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let r;switch(e.type){case"DirectionalLight":case"SpotLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new en};break;case"PointLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new en,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=r,r}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-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,numLightProbes:0};for(let t=0;t<9;t++)i.probe.push(new Dn);const a=new Dn,o=new hi,s=new hi;return{setup:function(a,o){let s=0,c=0,l=0;for(let t=0;t<9;t++)i.probe[t].set(0,0,0);let u=0,h=0,f=0,d=0,p=0,m=0,g=0,A=0,v=0,y=0,b=0;a.sort(Lc);const x=!0===o?Math.PI:1;for(let t=0,e=a.length;t0&&(e.isWebGL2||!0===t.has("OES_texture_float_linear")?(i.rectAreaLTC1=yo.LTC_FLOAT_1,i.rectAreaLTC2=yo.LTC_FLOAT_2):!0===t.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=yo.LTC_HALF_1,i.rectAreaLTC2=yo.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=s,i.ambient[1]=c,i.ambient[2]=l;const w=i.hash;w.directionalLength===u&&w.pointLength===h&&w.spotLength===f&&w.rectAreaLength===d&&w.hemiLength===p&&w.numDirectionalShadows===m&&w.numPointShadows===g&&w.numSpotShadows===A&&w.numSpotMaps===v&&w.numLightProbes===b||(i.directional.length=u,i.spot.length=f,i.rectArea.length=d,i.point.length=h,i.hemi.length=p,i.directionalShadow.length=m,i.directionalShadowMap.length=m,i.pointShadow.length=g,i.pointShadowMap.length=g,i.spotShadow.length=A,i.spotShadowMap.length=A,i.directionalShadowMatrix.length=m,i.pointShadowMatrix.length=g,i.spotLightMatrix.length=A+v-y,i.spotLightMap.length=v,i.numSpotLightShadowsWithMaps=y,i.numLightProbes=b,w.directionalLength=u,w.pointLength=h,w.spotLength=f,w.rectAreaLength=d,w.hemiLength=p,w.numDirectionalShadows=m,w.numPointShadows=g,w.numSpotShadows=A,w.numSpotMaps=v,w.numLightProbes=b,i.version=kc++)},setupView:function(t,e){let r=0,n=0,c=0,l=0,u=0;const h=e.matrixWorldInverse;for(let e=0,f=t.length;e=a.length?(o=new Dc(t,e),a.push(o)):o=a[i],o},dispose:function(){r=new WeakMap}}}class Oc extends ra{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Qe,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class Fc extends ra{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}function Nc(t,e,r){let n=new po;const i=new en,a=new en,o=new Sn,s=new Oc({depthPacking:je}),c=new Fc,l={},u=r.maxTextureSize,f={[p]:m,[m]:p,[g]:g},A=new to({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new en},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \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}"}),y=A.clone();y.defines.HORIZONTAL_PASS=1;const b=new Ia;b.setAttribute("position",new ha(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new Ha(b,A),w=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=h;let _=this.type;function E(r,n){const a=e.update(x);A.defines.VSM_SAMPLES!==r.blurSamples&&(A.defines.VSM_SAMPLES=r.blurSamples,y.defines.VSM_SAMPLES=r.blurSamples,A.needsUpdate=!0,y.needsUpdate=!0),null===r.mapPass&&(r.mapPass=new Tn(i.x,i.y)),A.uniforms.shadow_pass.value=r.map.texture,A.uniforms.resolution.value=r.mapSize,A.uniforms.radius.value=r.radius,t.setRenderTarget(r.mapPass),t.clear(),t.renderBufferDirect(n,null,a,A,x,null),y.uniforms.shadow_pass.value=r.mapPass.texture,y.uniforms.resolution.value=r.mapSize,y.uniforms.radius.value=r.radius,t.setRenderTarget(r.map),t.clear(),t.renderBufferDirect(n,null,a,y,x,null)}function M(e,r,n,i){let a=null;const o=!0===n.isPointLight?e.customDistanceMaterial:e.customDepthMaterial;if(void 0!==o)a=o;else if(a=!0===n.isPointLight?c:s,t.localClippingEnabled&&!0===r.clipShadows&&Array.isArray(r.clippingPlanes)&&0!==r.clippingPlanes.length||r.displacementMap&&0!==r.displacementScale||r.alphaMap&&r.alphaTest>0||r.map&&r.alphaTest>0){const t=a.uuid,e=r.uuid;let n=l[t];void 0===n&&(n={},l[t]=n);let i=n[e];void 0===i&&(i=a.clone(),n[e]=i),a=i}return a.visible=r.visible,a.wireframe=r.wireframe,a.side=i===d?null!==r.shadowSide?r.shadowSide:r.side:null!==r.shadowSide?r.shadowSide:f[r.side],a.alphaMap=r.alphaMap,a.alphaTest=r.alphaTest,a.map=r.map,a.clipShadows=r.clipShadows,a.clippingPlanes=r.clippingPlanes,a.clipIntersection=r.clipIntersection,a.displacementMap=r.displacementMap,a.displacementScale=r.displacementScale,a.displacementBias=r.displacementBias,a.wireframeLinewidth=r.wireframeLinewidth,a.linewidth=r.linewidth,!0===n.isPointLight&&!0===a.isMeshDistanceMaterial&&(t.properties.get(a).light=n),a}function S(r,i,a,o,s){if(!1===r.visible)return;if(r.layers.test(i.layers)&&(r.isMesh||r.isLine||r.isPoints)&&(r.castShadow||r.receiveShadow&&s===d)&&(!r.frustumCulled||n.intersectsObject(r))){r.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,r.matrixWorld);const n=e.update(r),c=r.material;if(Array.isArray(c)){const e=n.groups;for(let l=0,u=e.length;lu||i.y>u)&&(i.x>u&&(a.x=Math.floor(u/g.x),i.x=a.x*g.x,h.mapSize.x=a.x),i.y>u&&(a.y=Math.floor(u/g.y),i.y=a.y*g.y,h.mapSize.y=a.y)),null===h.map||!0===p||!0===m){const t=this.type!==d?{minFilter:vt,magFilter:vt}:{};null!==h.map&&h.map.dispose(),h.map=new Tn(i.x,i.y,t),h.map.texture.name=l.name+".shadowMap",h.camera.updateProjectionMatrix()}t.setRenderTarget(h.map),t.clear();const A=h.getViewportCount();for(let t=0;t=1):-1!==vt.indexOf("OpenGL ES")&&(At=parseFloat(/^OpenGL ES (\d)/.exec(vt)[1]),gt=At>=2);let yt=null,bt={};const xt=t.getParameter(t.SCISSOR_BOX),wt=t.getParameter(t.VIEWPORT),_t=(new Sn).fromArray(xt),Et=(new Sn).fromArray(wt);function Mt(e,r,i,a){const o=new Uint8Array(4),s=t.createTexture();t.bindTexture(e,s),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let s=0;sn||t.height>n)&&(i=n/Math.max(t.width,t.height)),i<1||!0===e){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const n=e?Jr:Math.floor,a=n(i*t.width),o=n(i*t.height);void 0===m&&(m=v(a,o));const s=r?v(a,o):m;return s.width=a,s.height=o,s.getContext("2d").drawImage(t,0,0,a,o),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+t.width+"x"+t.height+") to ("+a+"x"+o+")."),s}return"data"in t&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+t.width+"x"+t.height+")."),t}return t}function b(t){return Yr(t.width)&&Yr(t.height)}function x(t,e){return t.generateMipmaps&&e&&t.minFilter!==vt&&t.minFilter!==_t}function w(e){t.generateMipmap(e)}function _(r,n,i,a,o=!1){if(!1===s)return n;if(null!==r){if(void 0!==t[r])return t[r];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+r+"'")}let c=n;if(n===t.RED&&(i===t.FLOAT&&(c=t.R32F),i===t.HALF_FLOAT&&(c=t.R16F),i===t.UNSIGNED_BYTE&&(c=t.R8)),n===t.RED_INTEGER&&(i===t.UNSIGNED_BYTE&&(c=t.R8UI),i===t.UNSIGNED_SHORT&&(c=t.R16UI),i===t.UNSIGNED_INT&&(c=t.R32UI),i===t.BYTE&&(c=t.R8I),i===t.SHORT&&(c=t.R16I),i===t.INT&&(c=t.R32I)),n===t.RG&&(i===t.FLOAT&&(c=t.RG32F),i===t.HALF_FLOAT&&(c=t.RG16F),i===t.UNSIGNED_BYTE&&(c=t.RG8)),n===t.RGBA){const e=o?$e:gn.getTransfer(a);i===t.FLOAT&&(c=t.RGBA32F),i===t.HALF_FLOAT&&(c=t.RGBA16F),i===t.UNSIGNED_BYTE&&(c=e===tr?t.SRGB8_ALPHA8:t.RGBA8),i===t.UNSIGNED_SHORT_4_4_4_4&&(c=t.RGBA4),i===t.UNSIGNED_SHORT_5_5_5_1&&(c=t.RGB5_A1)}return c!==t.R16F&&c!==t.R32F&&c!==t.RG16F&&c!==t.RG32F&&c!==t.RGBA16F&&c!==t.RGBA32F||e.get("EXT_color_buffer_float"),c}function E(t,e,r){return!0===x(t,r)||t.isFramebufferTexture&&t.minFilter!==vt&&t.minFilter!==_t?Math.log2(Math.max(e.width,e.height))+1:void 0!==t.mipmaps&&t.mipmaps.length>0?t.mipmaps.length:t.isCompressedTexture&&Array.isArray(t.image)?e.mipmaps.length:1}function M(e){return e===vt||e===yt||e===xt?t.NEAREST:t.LINEAR}function S(t){const e=t.target;e.removeEventListener("dispose",S),function(t){const e=n.get(t);if(void 0===e.__webglInit)return;const r=t.source,i=g.get(r);if(i){const n=i[e.__cacheKey];n.usedTimes--,0===n.usedTimes&&T(t),0===Object.keys(i).length&&g.delete(r)}n.remove(t)}(e),e.isVideoTexture&&p.delete(e)}function C(e){const r=e.target;r.removeEventListener("dispose",C),function(e){const r=e.texture,i=n.get(e),a=n.get(r);if(void 0!==a.__webglTexture&&(t.deleteTexture(a.__webglTexture),o.memory.textures--),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLCubeRenderTarget)for(let e=0;e<6;e++){if(Array.isArray(i.__webglFramebuffer[e]))for(let r=0;r0&&a.__version!==e.version){const t=e.image;if(null===t)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==t.complete)return void U(a,e,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}r.bindTexture(t.TEXTURE_2D,a.__webglTexture,t.TEXTURE0+i)}const B={[mt]:t.REPEAT,[gt]:t.CLAMP_TO_EDGE,[At]:t.MIRRORED_REPEAT},k={[vt]:t.NEAREST,[yt]:t.NEAREST_MIPMAP_NEAREST,[xt]:t.NEAREST_MIPMAP_LINEAR,[_t]:t.LINEAR,[Et]:t.LINEAR_MIPMAP_NEAREST,[St]:t.LINEAR_MIPMAP_LINEAR},L={[yr]:t.NEVER,[Sr]:t.ALWAYS,[br]:t.LESS,[wr]:t.LEQUAL,[xr]:t.EQUAL,[Mr]:t.GEQUAL,[_r]:t.GREATER,[Er]:t.NOTEQUAL};function P(r,a,o){if(o?(t.texParameteri(r,t.TEXTURE_WRAP_S,B[a.wrapS]),t.texParameteri(r,t.TEXTURE_WRAP_T,B[a.wrapT]),r!==t.TEXTURE_3D&&r!==t.TEXTURE_2D_ARRAY||t.texParameteri(r,t.TEXTURE_WRAP_R,B[a.wrapR]),t.texParameteri(r,t.TEXTURE_MAG_FILTER,k[a.magFilter]),t.texParameteri(r,t.TEXTURE_MIN_FILTER,k[a.minFilter])):(t.texParameteri(r,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(r,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),r!==t.TEXTURE_3D&&r!==t.TEXTURE_2D_ARRAY||t.texParameteri(r,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),a.wrapS===gt&&a.wrapT===gt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(r,t.TEXTURE_MAG_FILTER,M(a.magFilter)),t.texParameteri(r,t.TEXTURE_MIN_FILTER,M(a.minFilter)),a.minFilter!==vt&&a.minFilter!==_t&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),a.compareFunction&&(t.texParameteri(r,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(r,t.TEXTURE_COMPARE_FUNC,L[a.compareFunction])),!0===e.has("EXT_texture_filter_anisotropic")){const o=e.get("EXT_texture_filter_anisotropic");if(a.magFilter===vt)return;if(a.minFilter!==xt&&a.minFilter!==St)return;if(a.type===Pt&&!1===e.has("OES_texture_float_linear"))return;if(!1===s&&a.type===Dt&&!1===e.has("OES_texture_half_float_linear"))return;(a.anisotropy>1||n.get(a).__currentAnisotropy)&&(t.texParameterf(r,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),n.get(a).__currentAnisotropy=a.anisotropy)}}function D(e,r){let n=!1;void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",S));const i=r.source;let a=g.get(i);void 0===a&&(a={},g.set(i,a));const s=function(t){const e=[];return e.push(t.wrapS),e.push(t.wrapT),e.push(t.wrapR||0),e.push(t.magFilter),e.push(t.minFilter),e.push(t.anisotropy),e.push(t.internalFormat),e.push(t.format),e.push(t.type),e.push(t.generateMipmaps),e.push(t.premultiplyAlpha),e.push(t.flipY),e.push(t.unpackAlignment),e.push(t.colorSpace),e.join()}(r);if(s!==e.__cacheKey){void 0===a[s]&&(a[s]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,n=!0),a[s].usedTimes++;const i=a[e.__cacheKey];void 0!==i&&(a[e.__cacheKey].usedTimes--,0===i.usedTimes&&T(r)),e.__cacheKey=s,e.__webglTexture=a[s].texture}return n}function U(e,i,o){let c=t.TEXTURE_2D;(i.isDataArrayTexture||i.isCompressedArrayTexture)&&(c=t.TEXTURE_2D_ARRAY),i.isData3DTexture&&(c=t.TEXTURE_3D);const l=D(e,i),h=i.source;r.bindTexture(c,e.__webglTexture,t.TEXTURE0+o);const f=n.get(h);if(h.version!==f.__version||!0===l){r.activeTexture(t.TEXTURE0+o);const e=gn.getPrimaries(gn.workingColorSpace),n=i.colorSpace===Xe?null:gn.getPrimaries(i.colorSpace),d=i.colorSpace===Xe||e===n?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,i.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,i.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);const p=function(t){return!s&&(t.wrapS!==gt||t.wrapT!==gt||t.minFilter!==vt&&t.minFilter!==_t)}(i)&&!1===b(i.image);let m=y(i.image,p,!1,u);m=Z(i,m);const g=b(m)||s,A=a.convert(i.format,i.colorSpace);let v,M=a.convert(i.type),S=_(i.internalFormat,A,M,i.colorSpace,i.isVideoTexture);P(c,i,g);const C=i.mipmaps,T=s&&!0!==i.isVideoTexture&&S!==ie,I=void 0===f.__version||!0===l,R=E(i,m,g);if(i.isDepthTexture)S=t.DEPTH_COMPONENT,s?S=i.type===Pt?t.DEPTH_COMPONENT32F:i.type===Lt?t.DEPTH_COMPONENT24:i.type===Ft?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT16:i.type===Pt&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===Vt&&S===t.DEPTH_COMPONENT&&i.type!==Bt&&i.type!==Lt&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=Lt,M=a.convert(i.type)),i.format===Qt&&S===t.DEPTH_COMPONENT&&(S=t.DEPTH_STENCIL,i.type!==Ft&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=Ft,M=a.convert(i.type))),I&&(T?r.texStorage2D(t.TEXTURE_2D,1,S,m.width,m.height):r.texImage2D(t.TEXTURE_2D,0,S,m.width,m.height,0,A,M,null));else if(i.isDataTexture)if(C.length>0&&g){T&&I&&r.texStorage2D(t.TEXTURE_2D,R,S,C[0].width,C[0].height);for(let e=0,n=C.length;e>=1,n>>=1}}else if(C.length>0&&g){T&&I&&r.texStorage2D(t.TEXTURE_2D,R,S,C[0].width,C[0].height);for(let e=0,n=C.length;e>l),n=Math.max(1,i.height>>l);c===t.TEXTURE_3D||c===t.TEXTURE_2D_ARRAY?r.texImage3D(c,l,d,e,n,i.depth,0,u,h,null):r.texImage2D(c,l,d,e,n,0,u,h,null)}r.bindFramebuffer(t.FRAMEBUFFER,e),G(i)?f.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,s,c,n.get(o).__webglTexture,0,z(i)):(c===t.TEXTURE_2D||c>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&c<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,s,c,n.get(o).__webglTexture,l),r.bindFramebuffer(t.FRAMEBUFFER,null)}function F(e,r,n){if(t.bindRenderbuffer(t.RENDERBUFFER,e),r.depthBuffer&&!r.stencilBuffer){let i=!0===s?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(n||G(r)){const e=r.depthTexture;e&&e.isDepthTexture&&(e.type===Pt?i=t.DEPTH_COMPONENT32F:e.type===Lt&&(i=t.DEPTH_COMPONENT24));const n=z(r);G(r)?f.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,n,i,r.width,r.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,n,i,r.width,r.height)}else t.renderbufferStorage(t.RENDERBUFFER,i,r.width,r.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)}else if(r.depthBuffer&&r.stencilBuffer){const i=z(r);n&&!1===G(r)?t.renderbufferStorageMultisample(t.RENDERBUFFER,i,t.DEPTH24_STENCIL8,r.width,r.height):G(r)?f.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,i,t.DEPTH24_STENCIL8,r.width,r.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,r.width,r.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)}else{const e=!0===r.isWebGLMultipleRenderTargets?r.texture:[r.texture];for(let i=0;i0&&!0===e.has("WEBGL_multisampled_render_to_texture")&&!1!==r.__useRenderToTexture}function Z(t,r){const n=t.colorSpace,i=t.format,a=t.type;return!0===t.isCompressedTexture||!0===t.isVideoTexture||t.format===Fr||n!==Ye&&n!==Xe&&(gn.getTransfer(n)===tr?!1===s?!0===e.has("EXT_sRGB")&&i===zt?(t.format=Fr,t.minFilter=_t,t.generateMipmaps=!1):r=bn.sRGBToLinear(r):i===zt&&a===Tt||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",n)),r}this.allocateTextureUnit=function(){const t=I;return t>=c&&console.warn("THREE.WebGLTextures: Trying to use "+t+" texture units while this GPU supports only "+c),I+=1,t},this.resetTextureUnits=function(){I=0},this.setTexture2D=R,this.setTexture2DArray=function(e,i){const a=n.get(e);e.version>0&&a.__version!==e.version?U(a,e,i):r.bindTexture(t.TEXTURE_2D_ARRAY,a.__webglTexture,t.TEXTURE0+i)},this.setTexture3D=function(e,i){const a=n.get(e);e.version>0&&a.__version!==e.version?U(a,e,i):r.bindTexture(t.TEXTURE_3D,a.__webglTexture,t.TEXTURE0+i)},this.setTextureCube=function(e,i){const o=n.get(e);e.version>0&&o.__version!==e.version?function(e,i,o){if(6!==i.image.length)return;const c=D(e,i),u=i.source;r.bindTexture(t.TEXTURE_CUBE_MAP,e.__webglTexture,t.TEXTURE0+o);const h=n.get(u);if(u.version!==h.__version||!0===c){r.activeTexture(t.TEXTURE0+o);const e=gn.getPrimaries(gn.workingColorSpace),n=i.colorSpace===Xe?null:gn.getPrimaries(i.colorSpace),f=i.colorSpace===Xe||e===n?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,i.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,i.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,f);const d=i.isCompressedTexture||i.image[0].isCompressedTexture,p=i.image[0]&&i.image[0].isDataTexture,m=[];for(let t=0;t<6;t++)m[t]=d||p?p?i.image[t].image:i.image[t]:y(i.image[t],!1,!0,l),m[t]=Z(i,m[t]);const g=m[0],A=b(g)||s,v=a.convert(i.format,i.colorSpace),M=a.convert(i.type),S=_(i.internalFormat,v,M,i.colorSpace),C=s&&!0!==i.isVideoTexture,T=void 0===h.__version||!0===c;let I,R=E(i,g,A);if(P(t.TEXTURE_CUBE_MAP,i,A),d){C&&T&&r.texStorage2D(t.TEXTURE_CUBE_MAP,R,S,g.width,g.height);for(let e=0;e<6;e++){I=m[e].mipmaps;for(let n=0;n0&&R++,r.texStorage2D(t.TEXTURE_CUBE_MAP,R,S,m[0].width,m[0].height));for(let e=0;e<6;e++)if(p){C?r.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,0,0,m[e].width,m[e].height,v,M,m[e].data):r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,S,m[e].width,m[e].height,0,v,M,m[e].data);for(let n=0;n0){l.__webglFramebuffer[e]=[];for(let r=0;r0){l.__webglFramebuffer=[];for(let e=0;e0&&!1===G(e)){const n=f?c:[c];l.__webglMultisampledFramebuffer=t.createFramebuffer(),l.__webglColorRenderbuffer=[],r.bindFramebuffer(t.FRAMEBUFFER,l.__webglMultisampledFramebuffer);for(let r=0;r0)for(let n=0;n0)for(let r=0;r0&&!1===G(e)){const i=e.isWebGLMultipleRenderTargets?e.texture:[e.texture],a=e.width,o=e.height;let s=t.COLOR_BUFFER_BIT;const c=[],l=e.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,u=n.get(e),h=!0===e.isWebGLMultipleRenderTargets;if(h)for(let e=0;es+l?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!c.inputState.pinching&&o<=s-l&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==s&&t.gripSpace&&(i=e.getPose(t.gripSpace,r),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));null!==o&&(n=e.getPose(t.targetRaySpace,r),null===n&&null!==i&&(n=i),null!==n&&(o.matrix.fromArray(n.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,n.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(n.linearVelocity)):o.hasLinearVelocity=!1,n.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(n.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(jc)))}return null!==o&&(o.visible=null!==n),null!==s&&(s.visible=null!==i),null!==c&&(c.visible=null!==a),this}_getHandJoint(t,e){if(void 0===t.joints[e.jointName]){const r=new Qc;r.matrixAutoUpdate=!1,r.visible=!1,t.joints[e.jointName]=r,t.add(r)}return t.joints[e.jointName]}}class Hc extends Gr{constructor(t,e){super();const r=this;let n=null,i=1,a=null,o="local-floor",s=1,c=null,l=null,u=null,h=null,f=null,d=null;const p=e.getContextAttributes();let m=null,g=null;const A=[],v=[],y=new en;let b=null;const x=new ro;x.layers.enable(1),x.viewport=new Sn;const w=new ro;w.layers.enable(2),w.viewport=new Sn;const _=[x,w],E=new Vc;E.layers.enable(1),E.layers.enable(2);let M=null,S=null;function C(t){const e=v.indexOf(t.inputSource);if(-1===e)return;const r=A[e];void 0!==r&&(r.update(t.inputSource,t.frame,c||a),r.dispatchEvent({type:t.type,data:t.inputSource}))}function T(){n.removeEventListener("select",C),n.removeEventListener("selectstart",C),n.removeEventListener("selectend",C),n.removeEventListener("squeeze",C),n.removeEventListener("squeezestart",C),n.removeEventListener("squeezeend",C),n.removeEventListener("end",T),n.removeEventListener("inputsourceschange",I);for(let t=0;t=0&&(v[n]=null,A[n].disconnect(r))}for(let e=0;e=v.length){v.push(r),n=t;break}if(null===v[t]){v[t]=r,n=t;break}}if(-1===n)break}const i=A[n];i&&i.connect(r)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(t){let e=A[t];return void 0===e&&(e=new Wc,A[t]=e),e.getTargetRaySpace()},this.getControllerGrip=function(t){let e=A[t];return void 0===e&&(e=new Wc,A[t]=e),e.getGripSpace()},this.getHand=function(t){let e=A[t];return void 0===e&&(e=new Wc,A[t]=e),e.getHandSpace()},this.setFramebufferScaleFactor=function(t){i=t,!0===r.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(t){o=t,!0===r.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||a},this.setReferenceSpace=function(t){c=t},this.getBaseLayer=function(){return null!==h?h:f},this.getBinding=function(){return u},this.getFrame=function(){return d},this.getSession=function(){return n},this.setSession=async function(l){if(n=l,null!==n){if(m=t.getRenderTarget(),n.addEventListener("select",C),n.addEventListener("selectstart",C),n.addEventListener("selectend",C),n.addEventListener("squeeze",C),n.addEventListener("squeezestart",C),n.addEventListener("squeezeend",C),n.addEventListener("end",T),n.addEventListener("inputsourceschange",I),!0!==p.xrCompatible&&await e.makeXRCompatible(),b=t.getPixelRatio(),t.getSize(y),void 0===n.renderState.layers||!1===t.capabilities.isWebGL2){const r={antialias:void 0!==n.renderState.layers||p.antialias,alpha:!0,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:i};f=new XRWebGLLayer(n,e,r),n.updateRenderState({baseLayer:f}),t.setPixelRatio(1),t.setSize(f.framebufferWidth,f.framebufferHeight,!1),g=new Tn(f.framebufferWidth,f.framebufferHeight,{format:zt,type:Tt,colorSpace:t.outputColorSpace,stencilBuffer:p.stencil})}else{let r=null,a=null,o=null;p.depth&&(o=p.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,r=p.stencil?Qt:Vt,a=p.stencil?Ft:Lt);const s={colorFormat:e.RGBA8,depthFormat:o,scaleFactor:i};u=new XRWebGLBinding(n,e),h=u.createProjectionLayer(s),n.updateRenderState({layers:[h]}),t.setPixelRatio(1),t.setSize(h.textureWidth,h.textureHeight,!1),g=new Tn(h.textureWidth,h.textureHeight,{format:zt,type:Tt,depthTexture:new Ko(h.textureWidth,h.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,r),stencilBuffer:p.stencil,colorSpace:t.outputColorSpace,samples:p.antialias?4:0}),t.properties.get(g).__ignoreDepthValues=h.ignoreDepthValues}g.isXRRenderTarget=!0,this.setFoveation(s),c=null,a=await n.requestReferenceSpace(o),P.setContext(n),P.start(),r.isPresenting=!0,r.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==n)return n.environmentBlendMode};const R=new Dn,B=new Dn;function k(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.copy(t.matrixWorld).invert()}this.updateCamera=function(t){if(null===n)return;E.near=w.near=x.near=t.near,E.far=w.far=x.far=t.far,M===E.near&&S===E.far||(n.updateRenderState({depthNear:E.near,depthFar:E.far}),M=E.near,S=E.far);const e=t.parent,r=E.cameras;k(E,e);for(let t=0;t0&&(n.alphaTest.value=i.alphaTest);const a=e.get(i).envMap;if(a&&(n.envMap.value=a,n.flipEnvMap.value=a.isCubeTexture&&!1===a.isRenderTargetTexture?-1:1,n.reflectivity.value=i.reflectivity,n.ior.value=i.ior,n.refractionRatio.value=i.refractionRatio),i.lightMap){n.lightMap.value=i.lightMap;const e=!0===t._useLegacyLights?Math.PI:1;n.lightMapIntensity.value=i.lightMapIntensity*e,r(i.lightMap,n.lightMapTransform)}i.aoMap&&(n.aoMap.value=i.aoMap,n.aoMapIntensity.value=i.aoMapIntensity,r(i.aoMap,n.aoMapTransform))}return{refreshFogUniforms:function(e,r){r.color.getRGB(e.fogColor.value,Ka(t)),r.isFog?(e.fogNear.value=r.near,e.fogFar.value=r.far):r.isFogExp2&&(e.fogDensity.value=r.density)},refreshMaterialUniforms:function(t,i,a,o,s){i.isMeshBasicMaterial||i.isMeshLambertMaterial?n(t,i):i.isMeshToonMaterial?(n(t,i),function(t,e){e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(t,i)):i.isMeshPhongMaterial?(n(t,i),function(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4)}(t,i)):i.isMeshStandardMaterial?(n(t,i),function(t,n){t.metalness.value=n.metalness,n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap,r(n.metalnessMap,t.metalnessMapTransform)),t.roughness.value=n.roughness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap,r(n.roughnessMap,t.roughnessMapTransform));e.get(n).envMap&&(t.envMapIntensity.value=n.envMapIntensity)}(t,i),i.isMeshPhysicalMaterial&&function(t,e,n){t.ior.value=e.ior,e.sheen>0&&(t.sheenColor.value.copy(e.sheenColor).multiplyScalar(e.sheen),t.sheenRoughness.value=e.sheenRoughness,e.sheenColorMap&&(t.sheenColorMap.value=e.sheenColorMap,r(e.sheenColorMap,t.sheenColorMapTransform)),e.sheenRoughnessMap&&(t.sheenRoughnessMap.value=e.sheenRoughnessMap,r(e.sheenRoughnessMap,t.sheenRoughnessMapTransform))),e.clearcoat>0&&(t.clearcoat.value=e.clearcoat,t.clearcoatRoughness.value=e.clearcoatRoughness,e.clearcoatMap&&(t.clearcoatMap.value=e.clearcoatMap,r(e.clearcoatMap,t.clearcoatMapTransform)),e.clearcoatRoughnessMap&&(t.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap,r(e.clearcoatRoughnessMap,t.clearcoatRoughnessMapTransform)),e.clearcoatNormalMap&&(t.clearcoatNormalMap.value=e.clearcoatNormalMap,r(e.clearcoatNormalMap,t.clearcoatNormalMapTransform),t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),e.side===m&&t.clearcoatNormalScale.value.negate())),e.iridescence>0&&(t.iridescence.value=e.iridescence,t.iridescenceIOR.value=e.iridescenceIOR,t.iridescenceThicknessMinimum.value=e.iridescenceThicknessRange[0],t.iridescenceThicknessMaximum.value=e.iridescenceThicknessRange[1],e.iridescenceMap&&(t.iridescenceMap.value=e.iridescenceMap,r(e.iridescenceMap,t.iridescenceMapTransform)),e.iridescenceThicknessMap&&(t.iridescenceThicknessMap.value=e.iridescenceThicknessMap,r(e.iridescenceThicknessMap,t.iridescenceThicknessMapTransform))),e.transmission>0&&(t.transmission.value=e.transmission,t.transmissionSamplerMap.value=n.texture,t.transmissionSamplerSize.value.set(n.width,n.height),e.transmissionMap&&(t.transmissionMap.value=e.transmissionMap,r(e.transmissionMap,t.transmissionMapTransform)),t.thickness.value=e.thickness,e.thicknessMap&&(t.thicknessMap.value=e.thicknessMap,r(e.thicknessMap,t.thicknessMapTransform)),t.attenuationDistance.value=e.attenuationDistance,t.attenuationColor.value.copy(e.attenuationColor)),e.anisotropy>0&&(t.anisotropyVector.value.set(e.anisotropy*Math.cos(e.anisotropyRotation),e.anisotropy*Math.sin(e.anisotropyRotation)),e.anisotropyMap&&(t.anisotropyMap.value=e.anisotropyMap,r(e.anisotropyMap,t.anisotropyMapTransform))),t.specularIntensity.value=e.specularIntensity,t.specularColor.value.copy(e.specularColor),e.specularColorMap&&(t.specularColorMap.value=e.specularColorMap,r(e.specularColorMap,t.specularColorMapTransform)),e.specularIntensityMap&&(t.specularIntensityMap.value=e.specularIntensityMap,r(e.specularIntensityMap,t.specularIntensityMapTransform))}(t,i,s)):i.isMeshMatcapMaterial?(n(t,i),function(t,e){e.matcap&&(t.matcap.value=e.matcap)}(t,i)):i.isMeshDepthMaterial?n(t,i):i.isMeshDistanceMaterial?(n(t,i),function(t,r){const n=e.get(r).light;t.referencePosition.value.setFromMatrixPosition(n.matrixWorld),t.nearDistance.value=n.shadow.camera.near,t.farDistance.value=n.shadow.camera.far}(t,i)):i.isMeshNormalMaterial?n(t,i):i.isLineBasicMaterial?(function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,e.map&&(t.map.value=e.map,r(e.map,t.mapTransform))}(t,i),i.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(t,i)):i.isPointsMaterial?function(t,e,n,i){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.size.value=e.size*n,t.scale.value=.5*i,e.map&&(t.map.value=e.map,r(e.map,t.uvTransform)),e.alphaMap&&(t.alphaMap.value=e.alphaMap,r(e.alphaMap,t.alphaMapTransform)),e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,i,a,o):i.isSpriteMaterial?function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.rotation.value=e.rotation,e.map&&(t.map.value=e.map,r(e.map,t.mapTransform)),e.alphaMap&&(t.alphaMap.value=e.alphaMap,r(e.alphaMap,t.alphaMapTransform)),e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,i):i.isShadowMaterial?(t.color.value.copy(i.color),t.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function qc(t,e,r,n){let i={},a={},o=[];const s=r.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function c(t,e,r){const n=t.value;if(void 0===r[e]){if("number"==typeof n)r[e]=n;else{const t=Array.isArray(n)?n:[n],i=[];for(let e=0;e0&&(n=r%16,0!==n&&16-n-a.boundary<0&&(r+=16-n,i.__offset=r)),r+=a.storage}n=r%16,n>0&&(r+=16-n),t.__size=r,t.__cache={}}(r),f=function(e){const r=function(){for(let t=0;t0),h=!!r.morphAttributes.position,f=!!r.morphAttributes.normal,d=!!r.morphAttributes.color;let p=et;n.toneMapped&&(null!==S&&!0!==S.isXRRenderTarget||(p=w.toneMapping));const m=r.morphAttributes.position||r.morphAttributes.normal||r.morphAttributes.color,g=void 0!==m?m.length:0,A=rt.get(n),v=y.state.lights;if(!0===V&&(!0===Q||t!==T)){const e=t===T&&n.id===C;dt.setState(n,t,e)}let b=!1;n.version===A.__version?A.needsLights&&A.lightsStateVersion!==v.state.version||A.outputColorSpace!==s||i.isBatchedMesh&&!1===A.batching?b=!0:i.isBatchedMesh||!0!==A.batching?i.isInstancedMesh&&!1===A.instancing?b=!0:i.isInstancedMesh||!0!==A.instancing?i.isSkinnedMesh&&!1===A.skinning?b=!0:i.isSkinnedMesh||!0!==A.skinning?i.isInstancedMesh&&!0===A.instancingColor&&null===i.instanceColor||i.isInstancedMesh&&!1===A.instancingColor&&null!==i.instanceColor||A.envMap!==c||!0===n.fog&&A.fog!==a?b=!0:void 0===A.numClippingPlanes||A.numClippingPlanes===dt.numPlanes&&A.numIntersection===dt.numIntersection?(A.vertexAlphas!==l||A.vertexTangents!==u||A.morphTargets!==h||A.morphNormals!==f||A.morphColors!==d||A.toneMapping!==p||!0===K.isWebGL2&&A.morphTargetsCount!==g)&&(b=!0):b=!0:b=!0:b=!0:b=!0:(b=!0,A.__version=n.version);let x=A.currentProgram;!0===b&&(x=Kt(n,e,i));let _=!1,E=!1,M=!1;const I=x.getUniforms(),R=A.uniforms;if($.useProgram(x.program)&&(_=!0,E=!0,M=!0),n.id!==C&&(C=n.id,E=!0),_||T!==t){I.setValue(wt,"projectionMatrix",t.projectionMatrix),I.setValue(wt,"viewMatrix",t.matrixWorldInverse);const e=I.map.cameraPosition;void 0!==e&&e.setValue(wt,X.setFromMatrixPosition(t.matrixWorld)),K.logarithmicDepthBuffer&&I.setValue(wt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&I.setValue(wt,"isOrthographic",!0===t.isOrthographicCamera),T!==t&&(T=t,E=!0,M=!0)}if(i.isSkinnedMesh){I.setOptional(wt,i,"bindMatrix"),I.setOptional(wt,i,"bindMatrixInverse");const t=i.skeleton;t&&(K.floatVertexTextures?(null===t.boneTexture&&t.computeBoneTexture(),I.setValue(wt,"boneTexture",t.boneTexture,nt)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}i.isBatchedMesh&&(I.setOptional(wt,i,"batchingTexture"),I.setValue(wt,"batchingTexture",i._matricesTexture,nt));const B=r.morphAttributes;var k,L;if((void 0!==B.position||void 0!==B.normal||void 0!==B.color&&!0===K.isWebGL2)&>.update(i,r,x),(E||A.receiveShadow!==i.receiveShadow)&&(A.receiveShadow=i.receiveShadow,I.setValue(wt,"receiveShadow",i.receiveShadow)),n.isMeshGouraudMaterial&&null!==n.envMap&&(R.envMap.value=c,R.flipEnvMap.value=c.isCubeTexture&&!1===c.isRenderTargetTexture?-1:1),E&&(I.setValue(wt,"toneMappingExposure",w.toneMappingExposure),A.needsLights&&(L=M,(k=R).ambientLightColor.needsUpdate=L,k.lightProbe.needsUpdate=L,k.directionalLights.needsUpdate=L,k.directionalLightShadows.needsUpdate=L,k.pointLights.needsUpdate=L,k.pointLightShadows.needsUpdate=L,k.spotLights.needsUpdate=L,k.spotLightShadows.needsUpdate=L,k.rectAreaLights.needsUpdate=L,k.hemisphereLights.needsUpdate=L),a&&!0===n.fog&&ut.refreshFogUniforms(R,a),ut.refreshMaterialUniforms(R,n,U,D,j),nc.upload(wt,$t(A),R,nt)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(nc.upload(wt,$t(A),R,nt),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&I.setValue(wt,"center",i.center),I.setValue(wt,"modelViewMatrix",i.modelViewMatrix),I.setValue(wt,"normalMatrix",i.normalMatrix),I.setValue(wt,"modelMatrix",i.matrixWorld),n.isShaderMaterial||n.isRawShaderMaterial){const t=n.uniformsGroups;for(let e=0,r=t.length;e{function r(){n.forEach((function(t){rt.get(t).currentProgram.isReady()&&n.delete(t)})),0!==n.size?setTimeout(r,10):e(t)}null!==J.get("KHR_parallel_shader_compile")?r():setTimeout(r,10)}))};let Gt=null;function Zt(){Qt.stop()}function Vt(){Qt.start()}const Qt=new mo;function jt(t,e,r,n){if(!1===t.visible)return;if(t.layers.test(e.layers))if(t.isGroup)r=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(e);else if(t.isLight)y.pushLight(t),t.castShadow&&y.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||Z.intersectsSprite(t)){n&&X.setFromMatrixPosition(t.matrixWorld).applyMatrix4(W);const e=ct.update(t),i=t.material;i.visible&&v.push(t,e,i,r,X.z,null)}}else if((t.isMesh||t.isLine||t.isPoints)&&(!t.frustumCulled||Z.intersectsObject(t))){const e=ct.update(t),i=t.material;if(n&&(void 0!==t.boundingSphere?(null===t.boundingSphere&&t.computeBoundingSphere(),X.copy(t.boundingSphere.center)):(null===e.boundingSphere&&e.computeBoundingSphere(),X.copy(e.boundingSphere.center)),X.applyMatrix4(t.matrixWorld).applyMatrix4(W)),Array.isArray(i)){const n=e.groups;for(let a=0,o=n.length;a0&&function(t,e,r,n){if(null!==(!0===r.isScene?r.overrideMaterial:null))return;const i=K.isWebGL2;null===j&&(j=new Tn(1,1,{generateMipmaps:!0,type:J.has("EXT_color_buffer_half_float")?Dt:Tt,minFilter:St,samples:i?4:0})),w.getDrawingBufferSize(H),i?j.setSize(H.x,H.y):j.setSize(Jr(H.x),Jr(H.y));const a=w.getRenderTarget();w.setRenderTarget(j),w.getClearColor(k),L=w.getClearAlpha(),L<1&&w.setClearColor(16777215,.5),w.clear();const o=w.toneMapping;w.toneMapping=et,Yt(t,r,n),nt.updateMultisampleRenderTarget(j),nt.updateRenderTargetMipmap(j);let s=!1;for(let t=0,i=e.length;t0&&Yt(i,e,r),a.length>0&&Yt(a,e,r),o.length>0&&Yt(o,e,r),$.buffers.depth.setTest(!0),$.buffers.depth.setMask(!0),$.buffers.color.setMask(!0),$.setPolygonOffset(!1)}function Yt(t,e,r){const n=!0===e.isScene?e.overrideMaterial:null;for(let i=0,a=t.length;i0?x[x.length-1]:null,b.pop(),v=b.length>0?b[b.length-1]:null},this.getActiveCubeFace=function(){return E},this.getActiveMipmapLevel=function(){return M},this.getRenderTarget=function(){return S},this.setRenderTargetTextures=function(t,e,r){rt.get(t.texture).__webglTexture=e,rt.get(t.depthTexture).__webglTexture=r;const n=rt.get(t);n.__hasExternalTextures=!0,n.__hasExternalTextures&&(n.__autoAllocateDepthBuffer=void 0===r,n.__autoAllocateDepthBuffer||!0===J.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),n.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(t,e){const r=rt.get(t);r.__webglFramebuffer=e,r.__useDefaultFramebuffer=void 0===e},this.setRenderTarget=function(t,e=0,r=0){S=t,E=e,M=r;let n=!0,i=null,a=!1,o=!1;if(t){const s=rt.get(t);void 0!==s.__useDefaultFramebuffer?($.bindFramebuffer(wt.FRAMEBUFFER,null),n=!1):void 0===s.__webglFramebuffer?nt.setupRenderTarget(t):s.__hasExternalTextures&&nt.rebindTextures(t,rt.get(t.texture).__webglTexture,rt.get(t.depthTexture).__webglTexture);const c=t.texture;(c.isData3DTexture||c.isDataArrayTexture||c.isCompressedArrayTexture)&&(o=!0);const l=rt.get(t).__webglFramebuffer;t.isWebGLCubeRenderTarget?(i=Array.isArray(l[e])?l[e][r]:l[e],a=!0):i=K.isWebGL2&&t.samples>0&&!1===nt.useMultisampledRTT(t)?rt.get(t).__webglMultisampledFramebuffer:Array.isArray(l)?l[r]:l,I.copy(t.viewport),R.copy(t.scissor),B=t.scissorTest}else I.copy(N).multiplyScalar(U).floor(),R.copy(z).multiplyScalar(U).floor(),B=G;if($.bindFramebuffer(wt.FRAMEBUFFER,i)&&K.drawBuffers&&n&&$.drawBuffers(t,i),$.viewport(I),$.scissor(R),$.setScissorTest(B),a){const n=rt.get(t.texture);wt.framebufferTexture2D(wt.FRAMEBUFFER,wt.COLOR_ATTACHMENT0,wt.TEXTURE_CUBE_MAP_POSITIVE_X+e,n.__webglTexture,r)}else if(o){const n=rt.get(t.texture),i=e||0;wt.framebufferTextureLayer(wt.FRAMEBUFFER,wt.COLOR_ATTACHMENT0,n.__webglTexture,r||0,i)}C=-1},this.readRenderTargetPixels=function(t,e,r,n,i,a,o){if(!t||!t.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let s=rt.get(t).__webglFramebuffer;if(t.isWebGLCubeRenderTarget&&void 0!==o&&(s=s[o]),s){$.bindFramebuffer(wt.FRAMEBUFFER,s);try{const o=t.texture,s=o.format,c=o.type;if(s!==zt&&yt.convert(s)!==wt.getParameter(wt.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const l=c===Dt&&(J.has("EXT_color_buffer_half_float")||K.isWebGL2&&J.has("EXT_color_buffer_float"));if(!(c===Tt||yt.convert(c)===wt.getParameter(wt.IMPLEMENTATION_COLOR_READ_TYPE)||c===Pt&&(K.isWebGL2||J.has("OES_texture_float")||J.has("WEBGL_color_buffer_float"))||l))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");e>=0&&e<=t.width-n&&r>=0&&r<=t.height-i&&wt.readPixels(e,r,n,i,yt.convert(s),yt.convert(c),a)}finally{const t=null!==S?rt.get(S).__webglFramebuffer:null;$.bindFramebuffer(wt.FRAMEBUFFER,t)}}},this.copyFramebufferToTexture=function(t,e,r=0){const n=Math.pow(2,-r),i=Math.floor(e.image.width*n),a=Math.floor(e.image.height*n);nt.setTexture2D(e,0),wt.copyTexSubImage2D(wt.TEXTURE_2D,r,0,0,t.x,t.y,i,a),$.unbindTexture()},this.copyTextureToTexture=function(t,e,r,n=0){const i=e.image.width,a=e.image.height,o=yt.convert(r.format),s=yt.convert(r.type);nt.setTexture2D(r,0),wt.pixelStorei(wt.UNPACK_FLIP_Y_WEBGL,r.flipY),wt.pixelStorei(wt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),wt.pixelStorei(wt.UNPACK_ALIGNMENT,r.unpackAlignment),e.isDataTexture?wt.texSubImage2D(wt.TEXTURE_2D,n,t.x,t.y,i,a,o,s,e.image.data):e.isCompressedTexture?wt.compressedTexSubImage2D(wt.TEXTURE_2D,n,t.x,t.y,e.mipmaps[0].width,e.mipmaps[0].height,o,e.mipmaps[0].data):wt.texSubImage2D(wt.TEXTURE_2D,n,t.x,t.y,o,s,e.image),0===n&&r.generateMipmaps&&wt.generateMipmap(wt.TEXTURE_2D),$.unbindTexture()},this.copyTextureToTexture3D=function(t,e,r,n,i=0){if(w.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const a=t.max.x-t.min.x+1,o=t.max.y-t.min.y+1,s=t.max.z-t.min.z+1,c=yt.convert(n.format),l=yt.convert(n.type);let u;if(n.isData3DTexture)nt.setTexture3D(n,0),u=wt.TEXTURE_3D;else{if(!n.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");nt.setTexture2DArray(n,0),u=wt.TEXTURE_2D_ARRAY}wt.pixelStorei(wt.UNPACK_FLIP_Y_WEBGL,n.flipY),wt.pixelStorei(wt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),wt.pixelStorei(wt.UNPACK_ALIGNMENT,n.unpackAlignment);const h=wt.getParameter(wt.UNPACK_ROW_LENGTH),f=wt.getParameter(wt.UNPACK_IMAGE_HEIGHT),d=wt.getParameter(wt.UNPACK_SKIP_PIXELS),p=wt.getParameter(wt.UNPACK_SKIP_ROWS),m=wt.getParameter(wt.UNPACK_SKIP_IMAGES),g=r.isCompressedTexture?r.mipmaps[0]:r.image;wt.pixelStorei(wt.UNPACK_ROW_LENGTH,g.width),wt.pixelStorei(wt.UNPACK_IMAGE_HEIGHT,g.height),wt.pixelStorei(wt.UNPACK_SKIP_PIXELS,t.min.x),wt.pixelStorei(wt.UNPACK_SKIP_ROWS,t.min.y),wt.pixelStorei(wt.UNPACK_SKIP_IMAGES,t.min.z),r.isDataTexture||r.isData3DTexture?wt.texSubImage3D(u,i,e.x,e.y,e.z,a,o,s,c,l,g.data):r.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),wt.compressedTexSubImage3D(u,i,e.x,e.y,e.z,a,o,s,c,g.data)):wt.texSubImage3D(u,i,e.x,e.y,e.z,a,o,s,c,l,g),wt.pixelStorei(wt.UNPACK_ROW_LENGTH,h),wt.pixelStorei(wt.UNPACK_IMAGE_HEIGHT,f),wt.pixelStorei(wt.UNPACK_SKIP_PIXELS,d),wt.pixelStorei(wt.UNPACK_SKIP_ROWS,p),wt.pixelStorei(wt.UNPACK_SKIP_IMAGES,m),0===i&&n.generateMipmaps&&wt.generateMipmap(u),$.unbindTexture()},this.initTexture=function(t){t.isCubeTexture?nt.setTextureCube(t,0):t.isData3DTexture?nt.setTexture3D(t,0):t.isDataArrayTexture||t.isCompressedArrayTexture?nt.setTexture2DArray(t,0):nt.setTexture2D(t,0),$.unbindTexture()},this.resetState=function(){E=0,M=0,S=null,$.reset(),bt.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Nr}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===Je?"display-p3":"srgb",e.unpackColorSpace=gn.workingColorSpace===Ke?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(t){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!t}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===qe?Ve:Ze}set outputEncoding(t){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=t===Ve?qe:Ye}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(t){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=t}}class Jc extends Yc{}Jc.prototype.isWebGL1Renderer=!0;class Kc{constructor(t,e=25e-5){this.isFogExp2=!0,this.name="",this.color=new $i(t),this.density=e}clone(){return new Kc(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class $c{constructor(t,e=1,r=1e3){this.isFog=!0,this.name="",this.color=new $i(t),this.near=e,this.far=r}clone(){return new $c(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class tl extends Ui{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return null!==this.fog&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(e.object.backgroundIntensity=this.backgroundIntensity),e}}class el{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=Cr,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Wr()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return console.warn('THREE.InterleavedBuffer: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,r){t*=this.stride,r*=e.stride;for(let n=0,i=this.stride;nt.far||e.push({distance:s,point:ol.clone(),uv:Xi.getInterpolation(ol,fl,dl,pl,ml,gl,Al,new en),face:null,object:this})}copy(t,e){return super.copy(t,e),void 0!==t.center&&this.center.copy(t.center),this.material=t.material,this}}function yl(t,e,r,n,i,a){ll.subVectors(t,r).addScalar(.5).multiply(n),void 0!==i?(ul.x=a*ll.x-i*ll.y,ul.y=i*ll.x+a*ll.y):ul.copy(ll),t.copy(e),t.x+=ul.x,t.y+=ul.y,t.applyMatrix4(hl)}const bl=new Dn,xl=new Dn;class wl extends Ui{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);const e=t.levels;for(let t=0,r=e.length;t0){let r,n;for(r=1,n=e.length;r0){bl.setFromMatrixPosition(this.matrixWorld);const r=t.ray.origin.distanceTo(bl);this.getObjectForDistance(r).raycast(t,e)}}update(t){const e=this.levels;if(e.length>1){bl.setFromMatrixPosition(t.matrixWorld),xl.setFromMatrixPosition(this.matrixWorld);const r=bl.distanceTo(xl)/t.zoom;let n,i;for(e[0].object.visible=!0,n=1,i=e.length;n=t))break;e[n-1].object.visible=!1,e[n].object.visible=!0}for(this._currentLevel=n-1;n=r.length&&r.push({start:-1,count:-1,z:-1});const i=r[this.index];n.push(i),this.index++,i.start=t.start,i.count=t.count,i.z=e}reset(){this.list.length=0,this.index=0}}const Yl="batchId",Jl=new hi,Kl=new hi,$l=new hi,tu=new hi,eu=new po,ru=new Fn,nu=new ri,iu=new Dn,au=new ql,ou=new Ha,su=[];function cu(t,e,r=0){const n=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){const i=t.count;for(let a=0;a65536?new Uint32Array(i):new Uint16Array(i);e.setIndex(new ha(t,1))}const a=n>65536?new Uint32Array(r):new Uint16Array(r);e.setAttribute(Yl,new ha(a,1)),this._geometryInitialized=!0}}_validateGeometry(t){if(t.getAttribute(Yl))throw new Error(`BatchedMesh: Geometry cannot use attribute "${Yl}"`);const e=this.geometry;if(Boolean(t.getIndex())!==Boolean(e.getIndex()))throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const r in e.attributes){if(r===Yl)continue;if(!t.hasAttribute(r))throw new Error(`BatchedMesh: Added geometry missing "${r}". All geometries must have consistent attributes.`);const n=t.getAttribute(r),i=e.getAttribute(r);if(n.itemSize!==i.itemSize||n.normalized!==i.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(t){return this.customSort=t,this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new Fn);const t=this._geometryCount,e=this.boundingBox,r=this._active;e.makeEmpty();for(let n=0;n=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const n={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let i=null;const a=this._reservedRanges,o=this._drawRanges,s=this._bounds;0!==this._geometryCount&&(i=a[a.length-1]),n.vertexCount=-1===e?t.getAttribute("position").count:e,n.vertexStart=null===i?0:i.vertexStart+i.vertexCount;const c=t.getIndex(),l=null!==c;if(l&&(n.indexCount=-1===r?c.count:r,n.indexStart=null===i?0:i.indexStart+i.indexCount),-1!==n.indexStart&&n.indexStart+n.indexCount>this._maxIndexCount||n.vertexStart+n.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const u=this._visibility,h=this._active,f=this._matricesTexture,d=this._matricesTexture.image.data;u.push(!0),h.push(!0);const p=this._geometryCount;this._geometryCount++,$l.toArray(d,16*p),f.needsUpdate=!0,a.push(n),o.push({start:l?n.indexStart:n.vertexStart,count:-1}),s.push({boxInitialized:!1,box:new Fn,sphereInitialized:!1,sphere:new ri});const m=this.geometry.getAttribute(Yl);for(let t=0;t=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(e);const r=this.geometry,n=null!==r.getIndex(),i=r.getIndex(),a=e.getIndex(),o=this._reservedRanges[t];if(n&&a.count>o.indexCount||e.attributes.position.count>o.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const s=o.vertexStart,c=o.vertexCount;for(const t in r.attributes){if(t===Yl)continue;const n=e.getAttribute(t),i=r.getAttribute(t);cu(n,i,s);const a=n.itemSize;for(let t=n.count,e=c;t=e.length||!1===e[t]||(e[t]=!1,this._visibilityChanged=!0),this}getBoundingBoxAt(t,e){if(!1===this._active[t])return this;const r=this._bounds[t],n=r.box,i=this.geometry;if(!1===r.boxInitialized){n.makeEmpty();const e=i.index,a=i.attributes.position,o=this._drawRanges[t];for(let t=o.start,r=o.start+o.count;t=this._geometryCount||!1===r[t]||(e.toArray(i,16*t),n.needsUpdate=!0),this}getMatrixAt(t,e){const r=this._active,n=this._matricesTexture.image.data;return t>=this._geometryCount||!1===r[t]?null:e.fromArray(n,16*t)}setVisibleAt(t,e){const r=this._visibility,n=this._active;return t>=this._geometryCount||!1===n[t]||r[t]===e||(r[t]=e,this._visibilityChanged=!0),this}getVisibleAt(t){const e=this._visibility,r=this._active;return!(t>=this._geometryCount||!1===r[t])&&e[t]}raycast(t,e){const r=this._visibility,n=this._active,i=this._drawRanges,a=this._geometryCount,o=this.matrixWorld,s=this.geometry;ou.material=this.material,ou.geometry.index=s.index,ou.geometry.attributes=s.attributes,null===ou.geometry.boundingBox&&(ou.geometry.boundingBox=new Fn),null===ou.geometry.boundingSphere&&(ou.geometry.boundingSphere=new ri);for(let s=0;s({...t}))),this._reservedRanges=t._reservedRanges.map((t=>({...t}))),this._visibility=t._visibility.slice(),this._active=t._active.slice(),this._bounds=t._bounds.map((t=>({boxInitialized:t.boxInitialized,box:t.box.clone(),sphereInitialized:t.sphereInitialized,sphere:t.sphere.clone()}))),this._maxGeometryCount=t._maxGeometryCount,this._maxVertexCount=t._maxVertexCount,this._maxIndexCount=t._maxIndexCount,this._geometryInitialized=t._geometryInitialized,this._geometryCount=t._geometryCount,this._multiDrawCounts=t._multiDrawCounts.slice(),this._multiDrawStarts=t._multiDrawStarts.slice(),this._matricesTexture=t._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.slice(),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}onBeforeRender(t,e,r,n,i){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const a=n.getIndex(),o=null===a?1:a.array.BYTES_PER_ELEMENT,s=this._visibility,c=this._multiDrawStarts,l=this._multiDrawCounts,u=this._drawRanges,h=this.perObjectFrustumCulled;h&&(tu.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse).multiply(this.matrixWorld),eu.setFromProjectionMatrix(tu,t.isWebGPURenderer?zr:Nr));let f=0;if(this.sortObjects){Kl.copy(this.matrixWorld).invert(),iu.setFromMatrixPosition(r.matrixWorld).applyMatrix4(Kl);for(let t=0,e=s.length;ts)continue;h.applyMatrix4(this.matrixWorld);const a=t.ray.origin.distanceTo(h);at.far||e.push({distance:a,point:u.clone().applyMatrix4(this.matrixWorld),index:r,face:null,faceIndex:null,object:this})}else for(let r=Math.max(0,a.start),n=Math.min(p.count,a.start+a.count)-1;rs)continue;h.applyMatrix4(this.matrixWorld);const n=t.ray.origin.distanceTo(h);nt.far||e.push({distance:n,point:u.clone().applyMatrix4(this.matrixWorld),index:r,face:null,faceIndex:null,object:this})}}updateMorphTargets(){const t=this.geometry.morphAttributes,e=Object.keys(t);if(e.length>0){const r=t[e[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=r.length;t0){const r=t[e[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=r.length;ti.far)return;a.push({distance:c,distanceToRay:Math.sqrt(s),point:r,index:e,face:null,object:o})}}class Tu extends Mn{constructor(t,e,r,n,i,a,o,s,c){super(t,e,r,n,i,a,o,s,c),this.isVideoTexture=!0,this.minFilter=void 0!==a?a:_t,this.magFilter=void 0!==i?i:_t,this.generateMipmaps=!1;const l=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback((function e(){l.needsUpdate=!0,t.requestVideoFrameCallback(e)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;!1=="requestVideoFrameCallback"in t&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class Iu extends Mn{constructor(t,e){super({width:t,height:e}),this.isFramebufferTexture=!0,this.magFilter=vt,this.minFilter=vt,this.generateMipmaps=!1,this.needsUpdate=!0}}class Ru extends Mn{constructor(t,e,r,n,i,a,o,s,c,l,u,h){super(null,a,o,s,c,l,n,i,u,h),this.isCompressedTexture=!0,this.image={width:e,height:r},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class Bu extends Ru{constructor(t,e,r,n,i,a){super(t,e,r,i,a),this.isCompressedArrayTexture=!0,this.image.depth=n,this.wrapR=gt}}class ku extends Ru{constructor(t,e,r){super(void 0,t[0].width,t[0].height,e,r,ut),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class Lu extends Mn{constructor(t,e,r,n,i,a,o,s,c){super(t,e,r,n,i,a,o,s,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Pu{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,e){const r=this.getUtoTmapping(t);return this.getPoint(r,e)}getPoints(t=5){const e=[];for(let r=0;r<=t;r++)e.push(this.getPoint(r/t));return e}getSpacedPoints(t=5){const e=[];for(let r=0;r<=t;r++)e.push(this.getPointAt(r/t));return e}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const e=[];let r,n=this.getPoint(0),i=0;e.push(0);for(let a=1;a<=t;a++)r=this.getPoint(a/t),i+=r.distanceTo(n),e.push(i),n=r;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,e){const r=this.getLengths();let n=0;const i=r.length;let a;a=e||t*r[i-1];let o,s=0,c=i-1;for(;s<=c;)if(n=Math.floor(s+(c-s)/2),o=r[n]-a,o<0)s=n+1;else{if(!(o>0)){c=n;break}c=n-1}if(n=c,r[n]===a)return n/(i-1);const l=r[n];return(n+(a-l)/(r[n+1]-l))/(i-1)}getTangent(t,e){const r=1e-4;let n=t-r,i=t+r;n<0&&(n=0),i>1&&(i=1);const a=this.getPoint(n),o=this.getPoint(i),s=e||(a.isVector2?new en:new Dn);return s.copy(o).sub(a).normalize(),s}getTangentAt(t,e){const r=this.getUtoTmapping(t);return this.getTangent(r,e)}computeFrenetFrames(t,e){const r=new Dn,n=[],i=[],a=[],o=new Dn,s=new hi;for(let e=0;e<=t;e++){const r=e/t;n[e]=this.getTangentAt(r,new Dn)}i[0]=new Dn,a[0]=new Dn;let c=Number.MAX_VALUE;const l=Math.abs(n[0].x),u=Math.abs(n[0].y),h=Math.abs(n[0].z);l<=c&&(c=l,r.set(1,0,0)),u<=c&&(c=u,r.set(0,1,0)),h<=c&&r.set(0,0,1),o.crossVectors(n[0],r).normalize(),i[0].crossVectors(n[0],o),a[0].crossVectors(n[0],i[0]);for(let e=1;e<=t;e++){if(i[e]=i[e-1].clone(),a[e]=a[e-1].clone(),o.crossVectors(n[e-1],n[e]),o.length()>Number.EPSILON){o.normalize();const t=Math.acos(Hr(n[e-1].dot(n[e]),-1,1));i[e].applyMatrix4(s.makeRotationAxis(o,t))}a[e].crossVectors(n[e],i[e])}if(!0===e){let e=Math.acos(Hr(i[0].dot(i[t]),-1,1));e/=t,n[0].dot(o.crossVectors(i[0],i[t]))>0&&(e=-e);for(let r=1;r<=t;r++)i[r].applyMatrix4(s.makeRotationAxis(n[r],e*r)),a[r].crossVectors(n[r],i[r])}return{tangents:n,normals:i,binormals:a}}clone(){return(new this.constructor).copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class Du extends Pu{constructor(t=0,e=0,r=1,n=1,i=0,a=2*Math.PI,o=!1,s=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=r,this.yRadius=n,this.aStartAngle=i,this.aEndAngle=a,this.aClockwise=o,this.aRotation=s}getPoint(t,e){const r=e||new en,n=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const a=Math.abs(i)n;)i-=n;i0?0:(Math.floor(Math.abs(c)/i)+1)*i:0===l&&c===i-1&&(c=i-2,l=1),this.closed||c>0?o=n[(c-1)%i]:(Fu.subVectors(n[0],n[1]).add(n[0]),o=Fu);const u=n[c%i],h=n[(c+1)%i];if(this.closed||c+2n.length-2?n.length-1:a+1],u=n[a>n.length-3?n.length-1:a+2];return r.set(Vu(o,s.x,c.x,l.x,u.x),Vu(o,s.y,c.y,l.y,u.y)),r}copy(t){super.copy(t),this.points=[];for(let e=0,r=t.points.length;e=r){const t=n[i]-r,a=this.curves[i],o=a.getLength(),s=0===o?0:1-t/o;return a.getPointAt(s,e)}i++}return null}getLength(){const t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let e=0;for(let r=0,n=this.curves.length;r1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(t){super.copy(t),this.curves=[];for(let e=0,r=t.curves.length;e0){const t=c.getPoint(0);t.equals(this.currentPoint)||this.lineTo(t.x,t.y)}this.curves.push(c);const l=c.getPoint(1);return this.currentPoint.copy(l),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class rh extends Ia{constructor(t=[new en(0,-.5),new en(.5,0),new en(0,.5)],e=12,r=0,n=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:r,phiLength:n},e=Math.floor(e),n=Hr(n,0,2*Math.PI);const i=[],a=[],o=[],s=[],c=[],l=1/e,u=new Dn,h=new en,f=new Dn,d=new Dn,p=new Dn;let m=0,g=0;for(let e=0;e<=t.length-1;e++)switch(e){case 0:m=t[e+1].x-t[e].x,g=t[e+1].y-t[e].y,f.x=1*g,f.y=-m,f.z=0*g,p.copy(f),f.normalize(),s.push(f.x,f.y,f.z);break;case t.length-1:s.push(p.x,p.y,p.z);break;default:m=t[e+1].x-t[e].x,g=t[e+1].y-t[e].y,f.x=1*g,f.y=-m,f.z=0*g,d.copy(f),f.x+=p.x,f.y+=p.y,f.z+=p.z,f.normalize(),s.push(f.x,f.y,f.z),p.copy(d)}for(let i=0;i<=e;i++){const f=r+i*l*n,d=Math.sin(f),p=Math.cos(f);for(let r=0;r<=t.length-1;r++){u.x=t[r].x*d,u.y=t[r].y,u.z=t[r].x*p,a.push(u.x,u.y,u.z),h.x=i/e,h.y=r/(t.length-1),o.push(h.x,h.y);const n=s[3*r+0]*d,l=s[3*r+1],f=s[3*r+0]*p;c.push(n,l,f)}}for(let r=0;r0&&A(!0),e>0&&A(!1)),this.setIndex(l),this.setAttribute("position",new ba(u,3)),this.setAttribute("normal",new ba(h,3)),this.setAttribute("uv",new ba(f,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new ah(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class oh extends ah{constructor(t=1,e=1,r=32,n=1,i=!1,a=0,o=2*Math.PI){super(0,t,e,r,n,i,a,o),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:r,heightSegments:n,openEnded:i,thetaStart:a,thetaLength:o}}static fromJSON(t){return new oh(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class sh extends Ia{constructor(t=[],e=[],r=1,n=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:r,detail:n};const i=[],a=[];function o(t,e,r,n){const i=n+1,a=[];for(let n=0;n<=i;n++){a[n]=[];const o=t.clone().lerp(r,n/i),s=e.clone().lerp(r,n/i),c=i-n;for(let t=0;t<=c;t++)a[n][t]=0===t&&n===i?o:o.clone().lerp(s,t/c)}for(let t=0;t.9&&o<.1&&(e<.2&&(a[t+0]+=1),r<.2&&(a[t+2]+=1),n<.2&&(a[t+4]+=1))}}()}(),this.setAttribute("position",new ba(i,3)),this.setAttribute("normal",new ba(i.slice(),3)),this.setAttribute("uv",new ba(a,2)),0===n?this.computeVertexNormals():this.normalizeNormals()}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new sh(t.vertices,t.indices,t.radius,t.details)}}class ch extends sh{constructor(t=1,e=0){const r=(1+Math.sqrt(5))/2,n=1/r;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-n,-r,0,-n,r,0,n,-r,0,n,r,-n,-r,0,-n,r,0,n,-r,0,n,r,0,-r,0,-n,r,0,-n,-r,0,n,r,0,n],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new ch(t.radius,t.detail)}}const lh=new Dn,uh=new Dn,hh=new Dn,fh=new Xi;class dh extends Ia{constructor(t=null,e=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:t,thresholdAngle:e},null!==t){const r=4,n=Math.pow(10,r),i=Math.cos(Qr*e),a=t.getIndex(),o=t.getAttribute("position"),s=a?a.count:o.count,c=[0,0,0],l=["a","b","c"],u=new Array(3),h={},f=[];for(let t=0;t0)for(a=e;a=e;a-=n)o=Uh(a,t[a],t[a+1],o);return o&&Rh(o,o.next)&&(Oh(o),o=o.next),o}function gh(t,e){if(!t)return t;e||(e=t);let r,n=t;do{if(r=!1,n.steiner||!Rh(n,n.next)&&0!==Ih(n.prev,n,n.next))n=n.next;else{if(Oh(n),n=e=n.prev,n===n.next)break;r=!0}}while(r||n!==e);return e}function Ah(t,e,r,n,i,a,o){if(!t)return;!o&&a&&function(t,e,r,n){let i=t;do{0===i.z&&(i.z=Mh(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){let e,r,n,i,a,o,s,c,l=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||c>0&&n;)0!==s&&(0===c||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,c--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,l*=2}while(o>1)}(i)}(t,n,i,a);let s,c,l=t;for(;t.prev!==t.next;)if(s=t.prev,c=t.next,a?yh(t,n,i,a):vh(t))e.push(s.i/r|0),e.push(t.i/r|0),e.push(c.i/r|0),Oh(t),t=c.next,l=c.next;else if((t=c)===l){o?1===o?Ah(t=bh(gh(t),e,r),e,r,n,i,a,2):2===o&&xh(t,e,r,n,i,a):Ah(gh(t),e,r,n,i,a,1);break}}function vh(t){const e=t.prev,r=t,n=t.next;if(Ih(e,r,n)>=0)return!1;const i=e.x,a=r.x,o=n.x,s=e.y,c=r.y,l=n.y,u=ia?i>o?i:o:a>o?a:o,d=s>c?s>l?s:l:c>l?c:l;let p=n.next;for(;p!==e;){if(p.x>=u&&p.x<=f&&p.y>=h&&p.y<=d&&Ch(i,s,a,c,o,l,p.x,p.y)&&Ih(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function yh(t,e,r,n){const i=t.prev,a=t,o=t.next;if(Ih(i,a,o)>=0)return!1;const s=i.x,c=a.x,l=o.x,u=i.y,h=a.y,f=o.y,d=sc?s>l?s:l:c>l?c:l,g=u>h?u>f?u:f:h>f?h:f,A=Mh(d,p,e,r,n),v=Mh(m,g,e,r,n);let y=t.prevZ,b=t.nextZ;for(;y&&y.z>=A&&b&&b.z<=v;){if(y.x>=d&&y.x<=m&&y.y>=p&&y.y<=g&&y!==i&&y!==o&&Ch(s,u,c,h,l,f,y.x,y.y)&&Ih(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,b.x>=d&&b.x<=m&&b.y>=p&&b.y<=g&&b!==i&&b!==o&&Ch(s,u,c,h,l,f,b.x,b.y)&&Ih(b.prev,b,b.next)>=0)return!1;b=b.nextZ}for(;y&&y.z>=A;){if(y.x>=d&&y.x<=m&&y.y>=p&&y.y<=g&&y!==i&&y!==o&&Ch(s,u,c,h,l,f,y.x,y.y)&&Ih(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;b&&b.z<=v;){if(b.x>=d&&b.x<=m&&b.y>=p&&b.y<=g&&b!==i&&b!==o&&Ch(s,u,c,h,l,f,b.x,b.y)&&Ih(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function bh(t,e,r){let n=t;do{const i=n.prev,a=n.next.next;!Rh(i,a)&&Bh(i,n,n.next,a)&&Ph(i,a)&&Ph(a,i)&&(e.push(i.i/r|0),e.push(n.i/r|0),e.push(a.i/r|0),Oh(n),Oh(n.next),n=t=a),n=n.next}while(n!==t);return gh(n)}function xh(t,e,r,n,i,a){let o=t;do{let t=o.next.next;for(;t!==o.prev;){if(o.i!==t.i&&Th(o,t)){let s=Dh(o,t);return o=gh(o,o.next),s=gh(s,s.next),Ah(o,e,r,n,i,a,0),void Ah(s,e,r,n,i,a,0)}t=t.next}o=o.next}while(o!==t)}function wh(t,e){return t.x-e.x}function _h(t,e){const r=function(t,e){let r,n=e,i=-1/0;const a=t.x,o=t.y;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){const t=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=a&&t>i&&(i=t,r=n.x=n.x&&n.x>=c&&a!==n.x&&Ch(or.x||n.x===r.x&&Eh(r,n)))&&(r=n,h=u)),n=n.next}while(n!==s);return r}(t,e);if(!r)return e;const n=Dh(r,t);return gh(n,n.next),gh(r,r.next)}function Eh(t,e){return Ih(t.prev,t,e.prev)<0&&Ih(e.next,t,t.next)<0}function Mh(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Sh(t){let e=t,r=t;do{(e.x=(t-o)*(a-s)&&(t-o)*(n-s)>=(r-o)*(e-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function Th(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&Bh(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(Ph(t,e)&&Ph(e,t)&&function(t,e){let r=t,n=!1;const i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(Ih(t.prev,t,e.prev)||Ih(t,e.prev,e))||Rh(t,e)&&Ih(t.prev,t,t.next)>0&&Ih(e.prev,e,e.next)>0)}function Ih(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Rh(t,e){return t.x===e.x&&t.y===e.y}function Bh(t,e,r,n){const i=Lh(Ih(t,e,r)),a=Lh(Ih(t,e,n)),o=Lh(Ih(r,n,t)),s=Lh(Ih(r,n,e));return i!==a&&o!==s||!(0!==i||!kh(t,r,e))||!(0!==a||!kh(t,n,e))||!(0!==o||!kh(r,t,n))||!(0!==s||!kh(r,e,n))}function kh(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function Lh(t){return t>0?1:t<0?-1:0}function Ph(t,e){return Ih(t.prev,t,t.next)<0?Ih(t,e,t.next)>=0&&Ih(t,t.prev,e)>=0:Ih(t,e,t.prev)<0||Ih(t,t.next,e)<0}function Dh(t,e){const r=new Fh(t.i,t.x,t.y),n=new Fh(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Uh(t,e,r,n){const i=new Fh(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Oh(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Fh(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class Nh{static area(t){const e=t.length;let r=0;for(let n=e-1,i=0;i80*r){s=l=t[0],c=u=t[1];for(let e=r;el&&(l=h),f>u&&(u=f);d=Math.max(l-s,u-c),d=0!==d?32767/d:0}return Ah(a,o,r,s,c,d,0),o}(r,n);for(let t=0;t2&&t[e-1].equals(t[0])&&t.pop()}function Gh(t,e){for(let r=0;rNumber.EPSILON){const h=Math.sqrt(u),f=Math.sqrt(c*c+l*l),d=e.x-s/h,p=e.y+o/h,m=((r.x-l/f-d)*l-(r.y+c/f-p)*c)/(o*l-s*c);n=d+o*m-t.x,i=p+s*m-t.y;const g=n*n+i*i;if(g<=2)return new en(n,i);a=Math.sqrt(g/2)}else{let t=!1;o>Number.EPSILON?c>Number.EPSILON&&(t=!0):o<-Number.EPSILON?c<-Number.EPSILON&&(t=!0):Math.sign(s)===Math.sign(l)&&(t=!0),t?(n=-s,i=o,a=Math.sqrt(u)):(n=o,i=s,a=Math.sqrt(u/2))}return new en(n/a,i/a)}const B=[];for(let t=0,e=S.length,r=e-1,n=t+1;t=0;t--){const e=t/d,r=u*Math.cos(e*Math.PI/2),n=h*Math.sin(e*Math.PI/2)+f;for(let t=0,e=S.length;t=0;){const n=r;let i=r-1;i<0&&(i=t.length-1);for(let t=0,r=s+2*d;t0)&&f.push(e,i,c),(t!==r-1||s0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class sf extends ra{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new $i(16777215),this.specular=new $i(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new $i(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=We,this.normalScale=new en(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=K,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class cf extends ra{constructor(t){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new $i(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new $i(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=We,this.normalScale=new en(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}class lf extends ra{constructor(t){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=We,this.normalScale=new en(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}class uf extends ra{constructor(t){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new $i(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new $i(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=We,this.normalScale=new en(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=K,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class hf extends ra{constructor(t){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new $i(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=We,this.normalScale=new en(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this.fog=t.fog,this}}class ff extends uu{constructor(t){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}function df(t,e,r){return!t||!r&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)}function pf(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function mf(t){const e=t.length,r=new Array(e);for(let t=0;t!==e;++t)r[t]=t;return r.sort((function(e,r){return t[e]-t[r]})),r}function gf(t,e,r){const n=t.length,i=new t.constructor(n);for(let a=0,o=0;o!==n;++a){const n=r[a]*e;for(let r=0;r!==e;++r)i[o++]=t[n+r]}return i}function Af(t,e,r,n){let i=1,a=t[0];for(;void 0!==a&&void 0===a[n];)a=t[i++];if(void 0===a)return;let o=a[n];if(void 0!==o)if(Array.isArray(o))do{o=a[n],void 0!==o&&(e.push(a.time),r.push.apply(r,o)),a=t[i++]}while(void 0!==a);else if(void 0!==o.toArray)do{o=a[n],void 0!==o&&(e.push(a.time),o.toArray(r,r.length)),a=t[i++]}while(void 0!==a);else do{o=a[n],void 0!==o&&(e.push(a.time),r.push(o)),a=t[i++]}while(void 0!==a)}const vf={convertArray:df,isTypedArray:pf,getKeyframeOrder:mf,sortedArray:gf,flattenJSON:Af,subclip:function(t,e,r,n,i=30){const a=t.clone();a.name=e;const o=[];for(let t=0;t=n)){c.push(e.times[t]);for(let r=0;ra.tracks[t].times[0]&&(s=a.tracks[t].times[0]);for(let t=0;t=n.times[h]){const t=h*c+s,e=t+c-s;f=n.values.slice(t,e)}else{const t=n.createInterpolant(),e=s,r=c-s;t.evaluate(a),f=t.resultBuffer.slice(e,r)}"quaternion"===i&&(new Pn).fromArray(f).normalize().conjugate().toArray(f);const d=o.times.length;for(let t=0;t=i)break t;{const o=e[1];t=i)break e}a=r,r=0}}for(;r>>1;te;)--a;if(++a,0!==i||a!==n){i>=a&&(a=Math.max(a,1),i=a-1);const t=this.getValueSize();this.times=r.slice(i,a),this.values=this.values.slice(i*t,a*t)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const r=this.times,n=this.values,i=r.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let a=null;for(let e=0;e!==i;e++){const n=r[e];if("number"==typeof n&&isNaN(n)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,e,n),t=!1;break}if(null!==a&&a>n){console.error("THREE.KeyframeTrack: Out of order keys.",this,e,n,a),t=!1;break}a=n}if(void 0!==n&&pf(n))for(let e=0,r=n.length;e!==r;++e){const r=n[e];if(isNaN(r)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,e,r),t=!1;break}}return t}optimize(){const t=this.times.slice(),e=this.values.slice(),r=this.getValueSize(),n=this.getInterpolation()===Le,i=t.length-1;let a=1;for(let o=1;o0){t[a]=t[i];for(let t=i*r,n=a*r,o=0;o!==r;++o)e[n+o]=e[t+o];++a}return a!==t.length?(this.times=t.slice(0,a),this.values=e.slice(0,a*r)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),r=new(0,this.constructor)(this.name,t,e);return r.createInterpolant=this.createInterpolant,r}}_f.prototype.TimeBufferType=Float32Array,_f.prototype.ValueBufferType=Float32Array,_f.prototype.DefaultInterpolation=ke;class Ef extends _f{}Ef.prototype.ValueTypeName="bool",Ef.prototype.ValueBufferType=Array,Ef.prototype.DefaultInterpolation=Be,Ef.prototype.InterpolantFactoryMethodLinear=void 0,Ef.prototype.InterpolantFactoryMethodSmooth=void 0;class Mf extends _f{}Mf.prototype.ValueTypeName="color";class Sf extends _f{}Sf.prototype.ValueTypeName="number";class Cf extends yf{constructor(t,e,r,n){super(t,e,r,n)}interpolate_(t,e,r,n){const i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(r-e)/(n-e);let c=t*o;for(let t=c+o;c!==t;c+=4)Pn.slerpFlat(i,0,a,c-o,a,c,s);return i}}class Tf extends _f{InterpolantFactoryMethodLinear(t){return new Cf(this.times,this.values,this.getValueSize(),t)}}Tf.prototype.ValueTypeName="quaternion",Tf.prototype.DefaultInterpolation=ke,Tf.prototype.InterpolantFactoryMethodSmooth=void 0;class If extends _f{}If.prototype.ValueTypeName="string",If.prototype.ValueBufferType=Array,If.prototype.DefaultInterpolation=Be,If.prototype.InterpolantFactoryMethodLinear=void 0,If.prototype.InterpolantFactoryMethodSmooth=void 0;class Rf extends _f{}Rf.prototype.ValueTypeName="vector";class Bf{constructor(t,e=-1,r,n=Oe){this.name=t,this.tracks=r,this.duration=e,this.blendMode=n,this.uuid=Wr(),this.duration<0&&this.resetDuration()}static parse(t){const e=[],r=t.tracks,n=1/(t.fps||1);for(let t=0,i=r.length;t!==i;++t)e.push(kf(r[t]).scale(n));const i=new this(t.name,t.duration,e,t.blendMode);return i.uuid=t.uuid,i}static toJSON(t){const e=[],r=t.tracks,n={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let t=0,n=r.length;t!==n;++t)e.push(_f.toJSON(r[t]));return n}static CreateFromMorphTargetSequence(t,e,r,n){const i=e.length,a=[];for(let t=0;t1){const t=a[1];let e=n[t];e||(n[t]=e=[]),e.push(r)}}const a=[];for(const t in n)a.push(this.CreateFromMorphTargetSequence(t,n[t],e,r));return a}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(t,e,r,n,i){if(0!==r.length){const a=[],o=[];Af(r,a,o,n),0!==a.length&&i.push(new t(e,a,o))}},n=[],i=t.name||"default",a=t.fps||30,o=t.blendMode;let s=t.length||-1;const c=t.hierarchy||[];for(let t=0;t{e&&e(i),this.manager.itemEnd(t)}),0),i;if(void 0!==Of[t])return void Of[t].push({onLoad:e,onProgress:r,onError:n});Of[t]=[],Of[t].push({onLoad:e,onProgress:r,onError:n});const a=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),o=this.mimeType,s=this.responseType;fetch(a).then((e=>{if(200===e.status||0===e.status){if(0===e.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===e.body||void 0===e.body.getReader)return e;const r=Of[t],n=e.body.getReader(),i=e.headers.get("Content-Length")||e.headers.get("X-File-Size"),a=i?parseInt(i):0,o=0!==a;let s=0;const c=new ReadableStream({start(t){!function e(){n.read().then((({done:n,value:i})=>{if(n)t.close();else{s+=i.byteLength;const n=new ProgressEvent("progress",{lengthComputable:o,loaded:s,total:a});for(let t=0,e=r.length;t{switch(s){case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"document":return t.text().then((t=>(new DOMParser).parseFromString(t,o)));case"json":return t.json();default:if(void 0===o)return t.text();{const e=/charset="?([^;"\s]*)"?/i.exec(o),r=e&&e[1]?e[1].toLowerCase():void 0,n=new TextDecoder(r);return t.arrayBuffer().then((t=>n.decode(t)))}}})).then((e=>{Lf.add(t,e);const r=Of[t];delete Of[t];for(let t=0,n=r.length;t{const r=Of[t];if(void 0===r)throw this.manager.itemError(t),e;delete Of[t];for(let t=0,n=r.length;t{this.manager.itemEnd(t)})),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class zf extends Uf{constructor(t){super(t)}load(t,e,r,n){const i=this,a=new Nf(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,(function(r){try{e(i.parse(JSON.parse(r)))}catch(e){n?n(e):console.error(e),i.manager.itemError(t)}}),r,n)}parse(t){const e=[];for(let r=0;r0:n.vertexColors=t.vertexColors),void 0!==t.uniforms)for(const e in t.uniforms){const i=t.uniforms[e];switch(n.uniforms[e]={},i.type){case"t":n.uniforms[e].value=r(i.value);break;case"c":n.uniforms[e].value=(new $i).setHex(i.value);break;case"v2":n.uniforms[e].value=(new en).fromArray(i.value);break;case"v3":n.uniforms[e].value=(new Dn).fromArray(i.value);break;case"v4":n.uniforms[e].value=(new Sn).fromArray(i.value);break;case"m3":n.uniforms[e].value=(new rn).fromArray(i.value);break;case"m4":n.uniforms[e].value=(new hi).fromArray(i.value);break;default:n.uniforms[e].value=i.value}}if(void 0!==t.defines&&(n.defines=t.defines),void 0!==t.vertexShader&&(n.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(n.fragmentShader=t.fragmentShader),void 0!==t.glslVersion&&(n.glslVersion=t.glslVersion),void 0!==t.extensions)for(const e in t.extensions)n.extensions[e]=t.extensions[e];if(void 0!==t.lights&&(n.lights=t.lights),void 0!==t.clipping&&(n.clipping=t.clipping),void 0!==t.size&&(n.size=t.size),void 0!==t.sizeAttenuation&&(n.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(n.map=r(t.map)),void 0!==t.matcap&&(n.matcap=r(t.matcap)),void 0!==t.alphaMap&&(n.alphaMap=r(t.alphaMap)),void 0!==t.bumpMap&&(n.bumpMap=r(t.bumpMap)),void 0!==t.bumpScale&&(n.bumpScale=t.bumpScale),void 0!==t.normalMap&&(n.normalMap=r(t.normalMap)),void 0!==t.normalMapType&&(n.normalMapType=t.normalMapType),void 0!==t.normalScale){let e=t.normalScale;!1===Array.isArray(e)&&(e=[e,e]),n.normalScale=(new en).fromArray(e)}return void 0!==t.displacementMap&&(n.displacementMap=r(t.displacementMap)),void 0!==t.displacementScale&&(n.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(n.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(n.roughnessMap=r(t.roughnessMap)),void 0!==t.metalnessMap&&(n.metalnessMap=r(t.metalnessMap)),void 0!==t.emissiveMap&&(n.emissiveMap=r(t.emissiveMap)),void 0!==t.emissiveIntensity&&(n.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(n.specularMap=r(t.specularMap)),void 0!==t.specularIntensityMap&&(n.specularIntensityMap=r(t.specularIntensityMap)),void 0!==t.specularColorMap&&(n.specularColorMap=r(t.specularColorMap)),void 0!==t.envMap&&(n.envMap=r(t.envMap)),void 0!==t.envMapIntensity&&(n.envMapIntensity=t.envMapIntensity),void 0!==t.reflectivity&&(n.reflectivity=t.reflectivity),void 0!==t.refractionRatio&&(n.refractionRatio=t.refractionRatio),void 0!==t.lightMap&&(n.lightMap=r(t.lightMap)),void 0!==t.lightMapIntensity&&(n.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(n.aoMap=r(t.aoMap)),void 0!==t.aoMapIntensity&&(n.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(n.gradientMap=r(t.gradientMap)),void 0!==t.clearcoatMap&&(n.clearcoatMap=r(t.clearcoatMap)),void 0!==t.clearcoatRoughnessMap&&(n.clearcoatRoughnessMap=r(t.clearcoatRoughnessMap)),void 0!==t.clearcoatNormalMap&&(n.clearcoatNormalMap=r(t.clearcoatNormalMap)),void 0!==t.clearcoatNormalScale&&(n.clearcoatNormalScale=(new en).fromArray(t.clearcoatNormalScale)),void 0!==t.iridescenceMap&&(n.iridescenceMap=r(t.iridescenceMap)),void 0!==t.iridescenceThicknessMap&&(n.iridescenceThicknessMap=r(t.iridescenceThicknessMap)),void 0!==t.transmissionMap&&(n.transmissionMap=r(t.transmissionMap)),void 0!==t.thicknessMap&&(n.thicknessMap=r(t.thicknessMap)),void 0!==t.anisotropyMap&&(n.anisotropyMap=r(t.anisotropyMap)),void 0!==t.sheenColorMap&&(n.sheenColorMap=r(t.sheenColorMap)),void 0!==t.sheenRoughnessMap&&(n.sheenRoughnessMap=r(t.sheenRoughnessMap)),n}setTextures(t){return this.textures=t,this}static createMaterialFromType(t){return new{ShadowMaterial:rf,SpriteMaterial:il,RawShaderMaterial:nf,ShaderMaterial:to,PointsMaterial:xu,MeshPhysicalMaterial:of,MeshStandardMaterial:af,MeshPhongMaterial:sf,MeshToonMaterial:cf,MeshNormalMaterial:lf,MeshLambertMaterial:uf,MeshDepthMaterial:Oc,MeshDistanceMaterial:Fc,MeshBasicMaterial:na,MeshMatcapMaterial:hf,LineDashedMaterial:ff,LineBasicMaterial:uu,Material:ra}[t]}}class fd{static decodeText(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);let e="";for(let r=0,n=t.length;r0){const r=new Pf(e);i=new Zf(r),i.setCrossOrigin(this.crossOrigin);for(let e=0,r=t.length;e0){n=new Zf(this.manager),n.setCrossOrigin(this.crossOrigin);for(let e=0,n=t.length;e{const e=new Fn;e.min.fromArray(t.boxMin),e.max.fromArray(t.boxMax);const r=new ri;return r.radius=t.sphereRadius,r.center.fromArray(t.sphereCenter),{boxInitialized:t.boxInitialized,box:e,sphereInitialized:t.sphereInitialized,sphere:r}})),a._maxGeometryCount=t.maxGeometryCount,a._maxVertexCount=t.maxVertexCount,a._maxIndexCount=t.maxIndexCount,a._geometryInitialized=t.geometryInitialized,a._geometryCount=t.geometryCount,a._matricesTexture=u(t.matricesTexture.uuid);break;case"LOD":a=new wl;break;case"Line":a=new gu(c(t.geometry),l(t.material));break;case"LineLoop":a=new bu(c(t.geometry),l(t.material));break;case"LineSegments":a=new yu(c(t.geometry),l(t.material));break;case"PointCloud":case"Points":a=new Su(c(t.geometry),l(t.material));break;case"Sprite":a=new vl(l(t.material));break;case"Group":a=new Qc;break;case"Bone":a=new Ll;break;default:a=new Ui}if(a.uuid=t.uuid,void 0!==t.name&&(a.name=t.name),void 0!==t.matrix?(a.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(a.matrixAutoUpdate=t.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(void 0!==t.position&&a.position.fromArray(t.position),void 0!==t.rotation&&a.rotation.fromArray(t.rotation),void 0!==t.quaternion&&a.quaternion.fromArray(t.quaternion),void 0!==t.scale&&a.scale.fromArray(t.scale)),void 0!==t.up&&a.up.fromArray(t.up),void 0!==t.castShadow&&(a.castShadow=t.castShadow),void 0!==t.receiveShadow&&(a.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(a.shadow.bias=t.shadow.bias),void 0!==t.shadow.normalBias&&(a.shadow.normalBias=t.shadow.normalBias),void 0!==t.shadow.radius&&(a.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&a.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(a.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(a.visible=t.visible),void 0!==t.frustumCulled&&(a.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(a.renderOrder=t.renderOrder),void 0!==t.userData&&(a.userData=t.userData),void 0!==t.layers&&(a.layers.mask=t.layers),void 0!==t.children){const o=t.children;for(let t=0;t0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t0&&this._mixBufferRegionAdditive(r,n,this._addIndex*e,1,e);for(let t=e,i=e+e;t!==i;++t)if(r[t]!==r[t+e]){o.setValue(r,n);break}}saveOriginalState(){const t=this.binding,e=this.buffer,r=this.valueSize,n=r*this._origIndex;t.getValue(e,n);for(let t=r,i=n;t!==i;++t)e[t]=e[n+t%r];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=3*this.valueSize;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let r=t;r=.5)for(let n=0;n!==i;++n)t[e+n]=t[r+n]}_slerp(t,e,r,n){Pn.slerpFlat(t,e,t,e,t,r,n)}_slerpAdditive(t,e,r,n,i){const a=this._workIndex*i;Pn.multiplyQuaternionsFlat(t,a,t,e,t,r),Pn.slerpFlat(t,e,t,e,t,a,n)}_lerp(t,e,r,n,i){const a=1-n;for(let o=0;o!==i;++o){const i=e+o;t[i]=t[i]*a+t[r+o]*n}}_lerpAdditive(t,e,r,n,i){for(let a=0;a!==i;++a){const i=e+a;t[i]=t[i]+t[r+a]*n}}}const Zd="\\[\\]\\.:\\/",Vd=new RegExp("["+Zd+"]","g"),Qd="[^"+Zd+"]",jd="[^"+Zd.replace("\\.","")+"]",Wd=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",Qd)+/(WCOD+)?/.source.replace("WCOD",jd)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Qd)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Qd)+"$"),Hd=["material","materials","bones","map"];class Xd{constructor(t,e,r){this.path=e,this.parsedPath=r||Xd.parseTrackName(e),this.node=Xd.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,r){return t&&t.isAnimationObjectGroup?new Xd.Composite(t,e,r):new Xd(t,e,r)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Vd,"")}static parseTrackName(t){const e=Wd.exec(t);if(null===e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const r={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},n=r.nodeName&&r.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){const t=r.nodeName.substring(n+1);-1!==Hd.indexOf(t)&&(r.nodeName=r.nodeName.substring(0,n),r.objectName=t)}if(null===r.propertyName||0===r.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return r}static findNode(t,e){if(void 0===e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){const r=t.skeleton.getBoneByName(e);if(void 0!==r)return r}if(t.children){const r=function(t){for(let n=0;n=i){const a=i++,l=t[a];e[l.uuid]=c,t[c]=l,e[s]=a,t[a]=o;for(let t=0,e=n;t!==e;++t){const e=r[t],n=e[a],i=e[c];e[c]=n,e[a]=i}}}this.nCachedObjects_=i}uncache(){const t=this._objects,e=this._indicesByUUID,r=this._bindings,n=r.length;let i=this.nCachedObjects_,a=t.length;for(let o=0,s=arguments.length;o!==s;++o){const s=arguments[o].uuid,c=e[s];if(void 0!==c)if(delete e[s],c0&&(e[o.uuid]=c),t[c]=o,t.pop();for(let t=0,e=n;t!==e;++t){const e=r[t];e[c]=e[i],e.pop()}}}this.nCachedObjects_=i}subscribe_(t,e){const r=this._bindingsIndicesByPath;let n=r[t];const i=this._bindings;if(void 0!==n)return i[n];const a=this._paths,o=this._parsedPaths,s=this._objects,c=s.length,l=this.nCachedObjects_,u=new Array(c);n=i.length,r[t]=n,a.push(t),o.push(e),i.push(u);for(let r=l,n=s.length;r!==n;++r){const n=s[r];u[r]=new Xd(n,t,e)}return u}unsubscribe_(t){const e=this._bindingsIndicesByPath,r=e[t];if(void 0!==r){const n=this._paths,i=this._parsedPaths,a=this._bindings,o=a.length-1,s=a[o];e[t[o]]=r,a[r]=s,a.pop(),i[r]=i[o],i.pop(),n[r]=n[o],n.pop()}}}class Yd{constructor(t,e,r=null,n=e.blendMode){this._mixer=t,this._clip=e,this._localRoot=r,this.blendMode=n;const i=e.tracks,a=i.length,o=new Array(a),s={endingStart:Pe,endingEnd:Pe};for(let t=0;t!==a;++t){const e=i[t].createInterpolant(null);o[t]=e,e.settings=s}this._interpolantSettings=s,this._interpolants=o,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ie,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,e){return this.loop=t,this.repetitions=e,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,e,r){if(t.fadeOut(e),this.fadeIn(e),r){const r=this._clip.duration,n=t._clip.duration,i=n/r,a=r/n;t.warp(1,i,e),this.warp(a,1,e)}return this}crossFadeTo(t,e,r){return t.crossFadeFrom(this,e,r)}stopFading(){const t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,e,r){const n=this._mixer,i=n.time,a=this.timeScale;let o=this._timeScaleInterpolant;null===o&&(o=n._lendControlInterpolant(),this._timeScaleInterpolant=o);const s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+r,c[0]=t/a,c[1]=e/a,this}stopWarping(){const t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,e,r,n){if(!this.enabled)return void this._updateWeight(t);const i=this._startTime;if(null!==i){const n=(t-i)*r;n<0||0===r?e=0:(this._startTime=null,e=r*n)}e*=this._updateTimeScale(t);const a=this._updateTime(e),o=this._updateWeight(t);if(o>0){const t=this._interpolants,e=this._propertyBindings;if(this.blendMode===Fe)for(let r=0,n=t.length;r!==n;++r)t[r].evaluate(a),e[r].accumulateAdditive(o);else for(let r=0,i=t.length;r!==i;++r)t[r].evaluate(a),e[r].accumulate(n,o)}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;const r=this._weightInterpolant;if(null!==r){const n=r.evaluate(t)[0];e*=n,t>r.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;const r=this._timeScaleInterpolant;null!==r&&(e*=r.evaluate(t)[0],t>r.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e))}return this._effectiveTimeScale=e,e}_updateTime(t){const e=this._clip.duration,r=this.loop;let n=this.time+t,i=this._loopCount;const a=r===Re;if(0===t)return-1===i?n:a&&1==(1&i)?e-n:n;if(r===Te){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(n>=e)n=e;else{if(!(n<0)){this.time=n;break t}n=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),n>=e||n<0){const r=Math.floor(n/e);n-=e*r,i+=Math.abs(r);const o=this.repetitions-i;if(o<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,n=t>0?e:0,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===o){const e=t<0;this._setEndings(e,!e,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:r})}}else this.time=n;if(a&&1==(1&i))return e-n}return n}_setEndings(t,e,r){const n=this._interpolantSettings;r?(n.endingStart=De,n.endingEnd=De):(n.endingStart=t?this.zeroSlopeAtStart?De:Pe:Ue,n.endingEnd=e?this.zeroSlopeAtEnd?De:Pe:Ue)}_scheduleFading(t,e,r){const n=this._mixer,i=n.time;let a=this._weightInterpolant;null===a&&(a=n._lendControlInterpolant(),this._weightInterpolant=a);const o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=e,o[1]=i+t,s[1]=r,this}}const Jd=new Float32Array(1);class Kd extends Gr{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,e){const r=t._localRoot||this._root,n=t._clip.tracks,i=n.length,a=t._propertyBindings,o=t._interpolants,s=r.uuid,c=this._bindingsByRootAndName;let l=c[s];void 0===l&&(l={},c[s]=l);for(let t=0;t!==i;++t){const i=n[t],c=i.name;let u=l[c];if(void 0!==u)++u.referenceCount,a[t]=u;else{if(u=a[t],void 0!==u){null===u._cacheIndex&&(++u.referenceCount,this._addInactiveBinding(u,s,c));continue}const n=e&&e._propertyBindings[t].binding.parsedPath;u=new Gd(Xd.create(r,c,n),i.ValueTypeName,i.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,s,c),a[t]=u}o[t].resultBuffer=u.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){const e=(t._localRoot||this._root).uuid,r=t._clip.uuid,n=this._actionsByClip[r];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,r,e)}const e=t._propertyBindings;for(let t=0,r=e.length;t!==r;++t){const r=e[t];0==r.useCount++&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const e=t._propertyBindings;for(let t=0,r=e.length;t!==r;++t){const r=e[t];0==--r.useCount&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const e=t._cacheIndex;return null!==e&&e=0;--e)t[e].stop();return this}update(t){t*=this.timeScale;const e=this._actions,r=this._nActiveActions,n=this.time+=t,i=Math.sign(t),a=this._accuIndex^=1;for(let o=0;o!==r;++o)e[o]._update(n,t,i,a);const o=this._bindings,s=this._nActiveBindings;for(let t=0;t!==s;++t)o[t].apply(a);return this}setTime(t){this.time=0;for(let t=0;tthis.max.x||t.ythis.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,lp).distanceTo(t)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const hp=new Dn,fp=new Dn;class dp{constructor(t=new Dn,e=new Dn){this.start=t,this.end=e}set(t,e){return this.start.copy(t),this.end.copy(e),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,e){return this.delta(e).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,e){hp.subVectors(t,this.start),fp.subVectors(this.end,this.start);const r=fp.dot(fp);let n=fp.dot(hp)/r;return e&&(n=Hr(n,0,1)),n}closestPointToPoint(t,e,r){const n=this.closestPointToPointParameter(t,e);return this.delta(r).multiplyScalar(n).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}const pp=new Dn;class mp extends Ui{constructor(t,e){super(),this.light=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,this.type="SpotLightHelper";const r=new Ia,n=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let t=0,e=1,r=32;t1)for(let r=0;r.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{zp.set(t.z,0,-t.x).normalize();const e=Math.acos(t.y);this.quaternion.setFromAxisAngle(zp,e)}}setLength(t,e=.2*t,r=.2*e){this.line.scale.set(1,Math.max(1e-4,t-e),1),this.line.updateMatrix(),this.cone.scale.set(r,e,r),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Qp extends yu{constructor(t=1){const e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],r=new Ia;r.setAttribute("position",new ba(e,3)),r.setAttribute("color",new ba([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(r,new uu({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(t,e,r){const n=new $i,i=this.geometry.attributes.color.array;return n.set(t),n.toArray(i,0),n.toArray(i,3),n.set(e),n.toArray(i,6),n.toArray(i,9),n.set(r),n.toArray(i,12),n.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class jp{constructor(){this.type="ShapePath",this.color=new $i,this.subPaths=[],this.currentPath=null}moveTo(t,e){return this.currentPath=new eh,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e),this}lineTo(t,e){return this.currentPath.lineTo(t,e),this}quadraticCurveTo(t,e,r,n){return this.currentPath.quadraticCurveTo(t,e,r,n),this}bezierCurveTo(t,e,r,n,i,a){return this.currentPath.bezierCurveTo(t,e,r,n,i,a),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t){function e(t,e){const r=e.length;let n=!1;for(let i=r-1,a=0;aNumber.EPSILON){if(c<0&&(r=e[a],s=-s,o=e[i],c=-c),t.yo.y)continue;if(t.y===r.y){if(t.x===r.x)return!0}else{const e=c*(t.x-r.x)-s*(t.y-r.y);if(0===e)return!0;if(e<0)continue;n=!n}}else{if(t.y!==r.y)continue;if(o.x<=t.x&&t.x<=r.x||r.x<=t.x&&t.x<=o.x)return!0}}return n}const r=Nh.isClockWise,n=this.subPaths;if(0===n.length)return[];let i,a,o;const s=[];if(1===n.length)return a=n[0],o=new ph,o.curves=a.curves,s.push(o),s;let c=!r(n[0].getPoints());c=t?!c:c;const l=[],u=[];let h,f,d=[],p=0;u[p]=void 0,d[p]=[];for(let e=0,o=n.length;e1){let t=!1,r=0;for(let t=0,e=u.length;t0&&!1===t&&(d=l)}for(let t=0,e=u.length;t{if(!r){var o=1/0;for(u=0;u=a)&&Object.keys(n.O).every((t=>n.O[t](r[c])))?r.splice(c--,1):(s=!1,a0&&t[u-1][2]>a;u--)t[u]=t[u-1];t[u]=[r,i,a]},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={764:0};n.O.j=e=>0===t[e];var e=(e,r)=>{var i,a,[o,s,c]=r,l=0;if(o.some((e=>0!==t[e]))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(c)var u=c(n)}for(e&&e(r);l { "imports": { - "three": "https://unpkg.com/three@0.154.0/build/three.module.js", - "three/addons/": "https://unpkg.com/three@0.154.0/examples/jsm/" + "three": "https://unpkg.com/three@0.159.0/build/three.module.js", + "three/addons/": "https://unpkg.com/three@0.159.0/examples/jsm/" } } diff --git a/itowns/dev/examples/misc_collada.html b/itowns/dev/examples/misc_collada.html index 5a21bb9b..02e22f8f 100644 --- a/itowns/dev/examples/misc_collada.html +++ b/itowns/dev/examples/misc_collada.html @@ -25,8 +25,8 @@ diff --git a/itowns/dev/examples/view_3d_map_webxr.html b/itowns/dev/examples/view_3d_map_webxr.html index 56bfee0a..7511decd 100644 --- a/itowns/dev/examples/view_3d_map_webxr.html +++ b/itowns/dev/examples/view_3d_map_webxr.html @@ -14,7 +14,7 @@ diff --git a/itowns/dev/examples/view_multi_25d.html b/itowns/dev/examples/view_multi_25d.html index f502222b..983225db 100644 --- a/itowns/dev/examples/view_multi_25d.html +++ b/itowns/dev/examples/view_multi_25d.html @@ -17,8 +17,8 @@