diff --git a/website/README.md b/website/README.md index 0c6c2c27..8d7189c5 100644 --- a/website/README.md +++ b/website/README.md @@ -24,6 +24,34 @@ $ yarn build This command generates static content into the `build` directory and can be served using any static contents hosting service. +### Update the hero graph + +The landing page's graph is a prebuilt from +panorama in `static/graph-viz/`. +To rebuild it from the latest panorama, run from `website/`: + +- Linux/macOS: + + ``` + export PANORAMA_DIR=/path/to/panorama + git -C "$PANORAMA_DIR" pull + npm --prefix "$PANORAMA_DIR" install + npm install + node graph-viz/build.mjs + ``` + +- PowerShell: + + ``` + $env:PANORAMA_DIR = "C:\path\to\panorama" + git -C $env:PANORAMA_DIR pull + npm --prefix $env:PANORAMA_DIR install + npm install + node graph-viz/build.mjs + ``` + +Commit `static/graph-viz/` and `src/data/graphViz.js`. + ### Deployment Using SSH: diff --git a/website/src/data/graphViz.js b/website/src/data/graphViz.js index f3f4f029..f833ef46 100644 --- a/website/src/data/graphViz.js +++ b/website/src/data/graphViz.js @@ -1,9 +1,9 @@ // Generated by graph-viz/build.mjs. export default { - "script": "graph-viz-DIeGNbOt.js", - "style": "graph-viz-oybI3Lk_.css", + "script": "graph-viz-BA42Dzr2.js", + "style": "graph-viz-cNH1DNKR.css", "panorama": { - "commit": "b5a908ad065aaec8bf6a4d322c748a3391f84d52", + "commit": "d3d3283b87bd1667540e55dea4890178bb07b165", "dirty": false } }; diff --git a/website/static/graph-viz/chunks/8rplBK4i.js b/website/static/graph-viz/chunks/8rplBK4i.js new file mode 100644 index 00000000..daa2c381 --- /dev/null +++ b/website/static/graph-viz/chunks/8rplBK4i.js @@ -0,0 +1 @@ +function e(e,t){return S(t- -800,e)}(function(e,t){function n(e,t){return S(e- -340,t)}let r=e();function i(e,t){return S(e-859,t)}for(;;)try{if(parseInt(i(1089,1127))/1*(parseInt(i(1017,1030))/2)+-parseInt(i(1086,1038))/3+parseInt(n(-181,-214))/4*(parseInt(n(-145,-197))/5)+-parseInt(n(-186,-194))/6*(-parseInt(n(-133,-132))/7)+-parseInt(n(-164,-127))/8+-parseInt(i(1047,1016))/9*(-parseInt(i(1053,1097))/10)+parseInt(n(-159,-135))/11*(-parseInt(n(-86,-100))/12)===t)break;r.push(r.shift())}catch{r.push(r.shift())}})(D,763233);import{b as t,m as n,x as r,y as i}from"./DJgKbydu.js";import{M as a,N as o,j as s}from"./DtItaGi-.js";import{r as c}from"./BKnszYrW.js";import{n as l,t as u}from"./CNgXtaZj.js";var d=.7548776662466927;function f(e,t,n,r,i,a=0){if(e<=0)return;function c(e,t){return S(e- -188,t)}function l(e,t){return S(e- -270,t)}let u=o(r,24301);for(let r=0;r0){for(let n=0;n0?r[o(-149,-170)]/l:1:r[f(809,806)],d=new Float32Array(i*3);function f(e,t){return S(e-610,t)}for(let t=0;t0?Math[f(857,905)](l*u,r[f(801,846)]*.05):r[o(-149,-179)]}}function m(e){if(typeof e===n(377,357)&&Number[t(72,94)](e))return String(e);if(typeof e===t(42,35)&&e!==``)return e;function t(e,t){return S(e- -166,t)}function n(e,t){return S(e-129,t)}return null}function h(e,t){let n=e[a(480,451)][a(482,443)],r=Array(n),i=new Set;function a(e,t){return S(t-274,e)}for(let o=0;oNumber[a(522,512)](Number(e)));o[u(691,644)](s?(e,t)=>Number(e)-Number(t):(e,t)=>et));let c=new Map(o[u(625,632)]((e,t)=>[e,t])),l=o[a(494,443)];function u(e,t){return S(t-452,e)}let d=new Int32Array(n),f=new Int32Array(l+1);for(let e=0;e(n,r)=>t[e(-593,-623)][n].idt[T(940,938)][r].id);function x(e,t,n,r){let i={};i[a(153,189)]=n;function a(e,t){return T(t,e- -777)}function o(e,t){return T(t,e- -1690)}let s=Array[a(239,207)](i,()=>[]);for(let e=0;e>(-2*n&6))))i=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=`.indexOf(i);for(let e=0,r=t.length;e0?s+1:s;if(l===0)return;let u=r[g(381,388)]??y,d=new Float64Array(l),p=new Float64Array(l),m=new Int32Array(l);for(let e=0;e!0);for(let e=0;ea[o(-94,-76)](n[g(327,328)](t*3,t*3+3),e*3))}}function w(t,n,r,i,a){let o=n[b(426,425)][b(348,372)],s=i[b(424,372)],c=new Float64Array(o*3),l=new Float64Array(o),u=0,d=0,p=0,m=0;function h(t,n){return e(t,n-1414)}for(let e=0;e0?c[e*3+t]/l[e]:0;let _=new Float64Array(o),y=0;function b(t,n){return e(t,n-1003)}for(let e=0;e!i[e]),C=0;for(let e=0;e{function a(e,t){return b(e,t-515)}function o(e,t){return b(t,e-438)}r[o(819,777)](n[a(884,892)](t*3,t*3+3),e*3),i[e]=1}),C+=t[b(341,372)]}return C}function T(e,t){return S(t-761,e)}function E(t,n,r){let i=typeof performance===I(766,738)?0:performance[I(708,675)](),o=t[I(706,738)][I(698,685)],s=h(t,n[I(732,694)]),c=s[I(751,714)][F(497,496)],l=n[I(742,757)]??I(700,669),u,d,f,m,v=n[F(576,526)],y=l===I(684,730)?null:g(t,n.x,n.y,n.z);y&&(l===F(507,498)||y[I(726,749)]>0)?(m=F(527,498),{raw:u,placed:d,placedCount:f}=y,l===I(694,746)&&(f+=w(t,s,u,d,n[F(512,489)]))):(m=I(684,659),u=new Float64Array(o*3),d=new Uint8Array(o)[F(561,531)](1),f=o,v=I(694,721),C(t,s,n,r,u));let x={};x[F(560,526)]=v,x[I(720,690)]=n[I(720,766)],x[I(740,760)]=n[F(573,538)];let S=p(u,d,f,x),T=S[I(735,768)],E=S[I(731,775)],D=[];for(let e=0;e0){D[F(514,519)](b(t));let e=f>0?_*E:n[I(720,749)],r=new Float32Array(D[F(454,496)]*3),i={};i[I(744,779)]=-1,i[I(780,751)]=e,i[F(508,532)]=D[I(698,661)],i[I(691,718)]=n[F(481,489)],a[F(546,544)](i,r),D[F(583,567)]((e,t)=>T[F(492,505)](r[F(507,501)](t*3,t*3+3),e*3)),E=Math[F(538,574)](E,e)}let O=new Float64Array(c),k=new Float64Array(c*3);for(let e=0;e{let n=O[t]||1,r={};r[a(1159,1127)]=e;function i(e,t){return F(t,e- -457)}r[a(1139,1105)]=t;function a(e,t){return F(t,e-596)}return r[i(75,62)]=s[a(1165,1186)][t],r[a(1112,1160)]=[k[t*3]/n,k[t*3+1]/n,k[t*3+2]/n],r[a(1174,1133)]=0,r});for(let e=0;eA[t][F(546,578)]&&(A[t][I(780,738)]=a)}let j=o-f,M=typeof performance===I(766,799)?0:performance[I(708,656)](),N={};N[F(530,577)]=j;let P={};P[F(503,533)]=T;function F(t,n){return e(t,n-1127)}P[F(536,576)]=s[F(495,528)],P[I(731,744)]=E,P[F(617,579)]=N,P[I(768,802)]=M-i,P[F(560,528)]=s[I(730,754)],P[I(755,760)]=A;function I(t,n){return e(n,t-1329)}return P[F(530,514)]=d,P[I(779,778)]=j,P[F(580,540)]=m,P}function D(){let e=`ig5VzgvZigf0ihrOzwLYig93BIaZrcbJB29YzgLUyxrLCYbHBMqG.C3rYAw5NAwz5.oe9IzNHZvG.igvKz2vZlG.yw5PBwf0zvrYyw5ZAxrPB25Z.iZuYnti1mG.y2X1C3rLCLnWywnPBMC.zxzLCNK.A2v5.Dw5KzwzPBMvK.AxngAw5PDgu.Bgf5B3v0txm.zM9YrwfJAa.EvbYB3bLCNr5.y291BNrZ.C2LU.AgLNAgXPz2H0uM9VDhm.ELbYB3bLCNr5.y29SB3i.Bwf4.BNvTyMvY.z3jVDxa.Dw5WBgfJzwq.CMfKAxvZ.Aw5MBW.y2fJAgu.mtjQEgLMDw4.zNjVBq.ywrK.C3fYDa.mtq5mtu2nff0ru1Jvq.y29TChv0zwq.C2vWyxjHDgLVBG.C2HVD1vUCgXHy2vK.mZi4mdiYA1zIwNLd.mZuWndrpzKvUEKK.CgXHBKv4DhjHtM9KzunVBg9YCW.ChjVChm.C2vLza.CMvZB2X2zq.AhLWB3q.yxv0BW.CgfSzxr0zq.CMDI.Bgf5B3v0.BgvUz3rO.yNLdBhvZDgvY.y29VCMrPBMf0zxm.y29Z.y2X1C3rLCLbYB3bLCNr5.C3vIyxjYyxK.EfbYB3bLCNr5.mtG2ndqYngzVBwDMuq.BM9Kzxm.C2v0.BM93.BwfW.mtGXmtu2nJLbug1Wy0m.C2vWyxjHDgu.CMf3.zwrNzxm.zwrNzvrHCMDLDa.Dg9WB2XVz3K.CgXHy2vK.nJG1otyXmvjKz21kAq.y2vUDhjVAwq.zg9J.D29YBgrsywrPDxm.C29YDa.zMXHz2DLza.mtbwq3f2wMS.ntiWCNLsBKDi.y2X1C3rLCKnVBg9YCW.CgXHy2vKq291BNq.ChvZAa.C2nHBgu.z2v0.y2X1C3rLCK9M.yM91BMrPBMDsywrPDxm.y2X1C3rLCG.zMLSBa.y291BNq.Cg9ZAxrPB25Z.mtrLBeDktuC.C3rYAw5N.BM9KzvzPC2LIBgu.zwrNzunVDw50.y2vUDgvY.Dw5PzM9YBunVBg9Y.C291CMnL.zxH0CMffzgDLq29SB3i.Ag9W.Aw5KzxG.CgXHy2u.u3bHDgLHBcb2Awv3oIa.C2nOzwr1BgviB3bZ.B3b0Aw9UCW.zwrNzvnVDxjJzq.A2v5CW.y29TChv0zuXHEw91Da.y2jYDa.Bgf5B3v0s2v5t2y.y2X1C3rLCNm.mJuXodmWmMH3y3Dowq`.split(`.`);return D=function(){return e},D()}var O=T(951,994),k=t(O),A=class extends u{[e(-505,-547)]={layout:null,palette:``,rgb:new Float32Array};[T(966,986)](e){function t(e,t){return T(e,t- -183)}function n(e,t){return T(t,e- -621)}return JSON[n(369,415)](e[t(756,746)])}[T(1003,993)](e){function t(e,t){return T(t,e- -1126)}function n(e,t){return T(t,e- -1743)}return e[n(-814,-775)][t(-133,-162)]}[e(-539,-556)](){return!1}[T(1026,984)](e,t){let n={};n.x=t[r(-501,-476)][i(292,261)],n.y=t[r(-504,-476)][r(-436,-403)];function r(e,t){return T(e,t- -1405)}n.z=t[i(285,271)][i(362,390)],n[r(-420,-441)]=t[i(285,263)][r(-463,-471)],n[r(-467,-431)]=t[r(-481,-476)][r(-436,-431)],n[r(-498,-488)]=t[r(-443,-476)][i(273,232)];function i(e,t){return T(t,e- -644)}return n[r(-432,-410)]=t[r(-518,-476)][i(351,321)],n[r(-441,-445)]=t[r(-470,-476)][i(316,272)],n[i(308,333)]=t[i(285,280)][i(308,286)],n[r(-445,-433)]=t[i(285,283)][r(-414,-433)],n[i(279,328)]=1,Promise[i(280,252)](E(e[i(307,285)],n,e[i(303,298)]))}[e(-650,-604)](e,t){if(this[l(-324,-308)][l(-410,-393)]===t&&this[l(-309,-308)][l(-366,-395)]===e)return this[n(1140,1140)][l(-420,-394)];function n(e,t){return T(t,e-126)}let a=r(e),o=t[n(1113,1150)][n(1056,1096)],s=new Float32Array(o*3);for(let e=0;enew A(e,t),ariaLabel:({nodes:t,edges:n})=>e(-631,-582)+t+e(-613,-572)+n+e(-536,-569)});export{j as default}; \ No newline at end of file diff --git a/website/static/graph-viz/chunks/BKnszYrW.js b/website/static/graph-viz/chunks/BKnszYrW.js new file mode 100644 index 00000000..00e77190 --- /dev/null +++ b/website/static/graph-viz/chunks/BKnszYrW.js @@ -0,0 +1 @@ +(function(e,t){let n=e();function r(e,t){return m(t-564,e)}function i(e,t){return m(e-495,t)}for(;;)try{if(-parseInt(i(813,803))/1+-parseInt(r(880,892))/2+-parseInt(i(832,823))/3+parseInt(r(868,876))/4+parseInt(r(897,897))/5+-parseInt(r(907,902))/6*(parseInt(i(821,836))/7)+parseInt(r(901,896))/8===t)break;n.push(n.shift())}catch{n.push(n.shift())}})(d,829683);import{N as e,j as t}from"./DtItaGi-.js";function n(e,t,n=1e-9){let r=t[a(643,627)];function i(e,t){return m(e-618,t)}for(let a=0;a=d)continue;if(u<1e-12){let e=(r*7+o*13)*.618;a=Math[i(1124,1140)](e),s=Math[i(1116,1121)](e*1.3),c=Math[l(306,304)](e),u=Math[l(287,292)](a,s,c),a/=u,s/=u,c/=u,u=0}else a/=u,s/=u,c/=u;let f=(d-u)/2;e[r*3]-=a*f,e[r*3+1]-=s*f,e[r*3+2]-=c*f,e[o*3]+=a*f,e[o*3+1]+=s*f,e[o*3+2]+=c*f,n=!0}if(!n)return}if(n(e,t))return;let o=0,s=0,c=0;for(let t=0;tt)[u(773,761)]((e,t)=>r[t]-r[e]||e-t),f=new Float64Array(c*3),m=e(o,c);d[h(194,197)]((e,n)=>{let r=1-2*(n+.5)/c,i=Math[a(-27,-32)](Math[s(-641,-646)](0,1-r*r));function a(e,t){return u(t- -794,e)}let o=n*t+m;function s(e,t){return u(t- -1396,e)}f[e*3]=Math[a(-43,-30)](o)*i,f[e*3+1]=r,f[e*3+2]=Math[a(-43,-38)](o)*i});function h(e,t){return p(t-729,e)}let g=0;for(let e=0;e>(-2*n&6))))i=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=`.indexOf(i);for(let e=0,r=t.length;et.id===e)??o}export{l as n,h as r,f as t}; \ No newline at end of file diff --git a/website/static/graph-viz/chunks/Bc5L5tt_.js b/website/static/graph-viz/chunks/Bc5L5tt_.js new file mode 100644 index 00000000..f82e919e --- /dev/null +++ b/website/static/graph-viz/chunks/Bc5L5tt_.js @@ -0,0 +1 @@ +function e(){let t=`CMfKAxvZ.CgXHy2vTzw50.igvKz2vZig9UignVBMnLBNrYAwmGC2HLBgXZigj5igHVCcbKAxn0yw5JzsbMCM9TihrOzsbYB290CY4.Ag9WCW.y3nY.Bw9KDwXL.DxnLCKrHDge.CMfKAxvZtw9Kzq.DgvYBwLUyxrL.CMvXDwvZDa.yNvPBgq.i2zMzMzMzG.zNjVBq.yxv0BW.odK5ntG0yMLQqw1P.BM9KzunVDw50.zM9YrwfJAa.DuDYywrPzw50.Aw5MBW.zMLSDgvY.D29YA2vY.Aw5bzgO.yw5PBwf0zvrYyw5ZAxrPB25Z.Dw5PzM9YBq.zgvSzxrL.otr1AuPLDvi.zgvUC2L0Eq.y2vUDgvY.Bg9Uz2L0DwrL.DhLWzq.y291BNq.Bgf5B3v0q2XPzw50.zwrNzvrHCMDLDa.BM9KzvzPC2LIBgu.CMvZB2X2zq.CMvTB3zL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nVBg9Yid0GBgLUzwfYvg9pDxrWDxruzxHLBcHZuKDcvhjHBNnMzxjft1rgkhzLyZqOyYWGDu9WywnPDhKGkIbMCMvZBMvSksKPoYb9cG.mtyYntKWmdrfs2vqBwq.ntGXmZyZmLzyB2TbAq.Ag9W.zgLYzwn0Aw9U.zwrNzvnVDxjJzq.sg9WihnOzwXSCYb2Awv3oIa.ywrK.Dw5KzwzPBMvK.CgfSzxr0zq.BMvHCG.Ag9WrgvMyxvSDhm.DunVBg9Yqq.B3v0t2zM.CMf5y2fZDa.BgvUz3rO.DMLZAwjSzq.CM9VDhm.z3jHzgLLBNq.Dg9WB2XVz3K.B25eAxnWB3nL.CgvUzgLUzW.CMvZDwX0.C2XPy2u`.split(`.`);return e=function(){return t},e()}(function(e,t){function n(e,t){return E(e-849,t)}let r=e();function i(e,t){return E(t- -897,e)}for(;;)try{if(parseInt(n(1049,976))/1+parseInt(n(1026,1082))/2*(parseInt(n(1067,1078))/3)+parseInt(n(1015,989))/4+-parseInt(i(-706,-685))/5*(-parseInt(n(1085,1061))/6)+parseInt(n(1037,1076))/7+parseInt(i(-622,-608))/8+-parseInt(n(1137,1066))/9===t)break;r.push(r.shift())}catch{r.push(r.shift())}})(e,402494);import{C as t,O as n,w as r,x as i}from"./DJgKbydu.js";import{R as a}from"./DtItaGi-.js";import{a as o,c as s,n as c,r as l}from"./Cb_SCBtG.js";import{C as u,I as d,P as f,U as p,b as m,h,u as g,y as _}from"./vendor-three-COuzUgS2.js";import{n as v,t as y}from"./CNgXtaZj.js";function b(e,t){let n=e[o(1117,1070)],r=new Float64Array(n);if(n===0)return r;function i(e,t){return E(e- -915,t)}let a=t[o(975,1048)];if(t[i(-756,-677)]===i(-740,-677)){for(let e=0;e1?.4*a:0}else{let t=0;for(let i=0;i1?Math[o(918,981)](n,.4):0:Math[o(1004,981)](t+1,n);r[i]=a,t=a}let s=r[n-1],c=a*Math[i(-702,-718)](1,n-1);if(s>0){let e=c/s;for(let t=0;t=0&&e=0&&(r[e]=a);return r}function x(e){let t=typeof performance===v(260,315)?0:performance[v(337,279)](),n=e[v(118,176)][y(-316,-310)],r=e[v(398,324)][y(-181,-127)]>0?a(e[v(179,176)],e[v(354,324)],e[v(259,311)]):new Int32Array(n)[v(155,231)](0),i=0,o=0;for(let e=0;ei&&(i=r[e]),r[e]<0&&o++;let c=i+1;for(let e=0;e0?c+1:i+1,u=Array(l)[v(209,231)](0);for(let e=0;e{function i(e,t){return y(e-984,t)}if(r[t]!==r[n])return r[t]-r[n];let a=e[c(920,856)][t],o=e[c(874,856)][n];if(a!==o)return al)});let h=new Float32Array(n*3),g=s(e[y(-330,-265)]),_=0;function v(e,t){return E(t-20,e)}for(let t=0;t0&&e===c});let S=typeof performance===y(-188,-266)?0:performance[v(344,279)](),C={};return C[y(-293,-313)]=e[v(201,210)],C[y(-201,-222)]=h,C[y(-328,-329)]=r,C[v(224,215)]=x,C[v(149,227)]=i,C[y(-202,-196)]=o,C[v(245,273)]=S-t,C}function S(e){function t(e,t){return E(t-212,e)}function r(e,t){return E(t- -585,e)}return n(e)&&e[t(459,494)]instanceof Float32Array&&e[t(315,367)]instanceof Int32Array&&Array[t(534,482)](e[r(-380,-390)])}var C=class{[N(171,242)]=null;[N(242,220)]=0;[I(-441,-376)]=new Map;[I(-512,-523)](e,t,n,r){this[i(837,796)]=e;function i(e,t){return N(e-595,t)}let a={revision:e,nodeIds:t[s(923,855)],nodeTypes:n,...r};if(t[s(684,747)]<5e3||typeof Worker===s(816,875))return Promise[i(780,829)](x({...a,csr:t}));let o=this[s(847,843)]();function s(e,t){return N(t-581,e)}let c={nodeCount:t[i(761,735)],outAdj:t[i(828,863)][s(754,731)](),outOff:t[s(930,880)][i(745,798)](),inAdj:t[s(680,753)][s(703,731)](),inOff:t[s(911,832)][i(745,761)](),edgeSource:t[i(886,843)][s(808,731)](),edgeTarget:t[s(705,764)][i(745,763)]()};return new Promise(t=>{this[n(-123,-188)][s(-746,-766)](e,t);function n(e,t){return i(e- -1025,t)}let r={...a};function s(e,t){return i(e- -1543,t)}r[s(-793,-754)]=c;let l={};l[s(-768,-800)]=s(-710,-658),l[n(-270,-273)]=r,o[n(-191,-126)](l,[c[n(-197,-226)][n(-154,-213)],c[s(-649,-584)][n(-154,-130)],c[n(-258,-321)][s(-672,-651)],c[s(-697,-703)][s(-672,-628)],c[s(-657,-672)][s(-672,-647)],c[s(-765,-686)][s(-672,-727)]])})}[N(262,336)](){function e(e,t){return N(t-516,e)}if(this[e(682,687)])return this[i(468,396)];let t={};t[i(477,477)]=i(453,440);let r=new Worker(new URL(new URL(`../assets/DaSQ0xeX.js`,import.meta.url)[i(579,548)],``+import.meta.url),t);r[e(721,772)]=e=>{let t=e[a(1193,1127)];function r(e,t){return i(e-128,t)}function a(e,t){return i(t-546,e)}if(!n(t)||t[r(605,568)]!==a(1053,1091)||!S(t[a(1194,1151)]))return;let o=t[r(733,744)],s=this[a(1071,1150)][a(1121,1061)](o[r(614,578)]);this[a(1199,1150)][r(600,637)](o[a(962,1032)]),s?.(o[a(1098,1032)]===this[r(667,678)]?o:null)},this[e(738,687)]=r;function i(e,t){return N(e-297,t)}return r}[I(-468,-482)](){function e(e,t){return N(t-290,e)}this[e(538,461)]?.[e(376,449)](),this[e(435,461)]=null;for(let n of this[t(834,792)][e(585,551)]())n(null);function t(e,t){return N(t-485,e)}this[e(524,597)][e(541,513)]()}},w=I(-410,-455),T=I(-400,-397);function E(t,n){t-=151;let r=e(),i=r[t];E.hjXtlR===void 0&&(E.SqyOtO=function(e){let t=``,n=``;for(let n=0,r,i,a=0;i=e.charAt(a++);~i&&(r=n%4?r*64+i:i,n++%4)&&(t+=String.fromCharCode(255&r>>(-2*n&6))))i=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=`.indexOf(i);for(let e=0,r=t.length;e0){if(r[n(-458,-535)]===n(-505,-561)){let e=Math[t(-386,-457)](A,Math[n(-524,-495)](j,Math[t(-392,-361)](r[t(-398,-354)]))),i=new d(r[t(-455,-472)],e,Math[t(-394,-354)](4,Math[t(-392,-416)](e/2))),a=new p(i);i[t(-405,-380)]();let o=new m(a,new _({color:new g(r[t(-372,-398)]),transparent:!0,opacity:r[t(-342,-276)],depthWrite:!1}));o[t(-329,-273)][n(-579,-563)][t(-416,-416)]=o[t(-329,-268)][n(-472,-448)],o[t(-360,-400)]=-1,o[n(-436,-403)]=()=>{},this[t(-313,-279)](o,r[t(-428,-461)])}else{let e=new d(r[t(-455,-509)],64,40);for(let i of[1,0]){let a=k(i);a[t(-352,-348)][n(-438,-385)][t(-413,-390)]=new g(r[t(-372,-434)]),a[t(-352,-313)][n(-500,-559)][n(-543,-619)]=new g(r[t(-321,-398)]),a[n(-482,-471)][n(-527,-604)][n(-543,-484)]=O[r[n(-487,-488)]],a[n(-482,-448)][n(-568,-591)][t(-413,-442)]=+(r[t(-328,-379)]===t(-302,-259)),a[n(-482,-432)][n(-492,-415)][n(-543,-476)]=r[t(-342,-349)],a[t(-449,-422)][n(-546,-471)]=r[t(-342,-267)];let o=new u(e,a);o[n(-490,-511)]=i===1?-2:-1,o[t(-306,-301)]=()=>{},this[t(-313,-374)](o,r[t(-428,-429)])}}}this[n(-504,-451)](this[n(-461,-381)])}[I(-415,-451)](e){function t(e,t){return N(t-606,e)}this[t(802,881)]=e;function n(e,t){return N(e-912,t)}for(let r of this[n(1117,1192)]){if(!(r instanceof u||r instanceof m))continue;let i=r[n(1189,1134)];if(Array[n(1181,1258)](i))continue;let a=typeof i[n(1069,990)][n(1102,1028)]===t(770,810)?i[t(740,763)][n(1102,1039)]:1,o=e?M(a):a;i instanceof f?i[n(1166,1240)][t(874,850)][n(1105,1109)]=o:i[t(881,870)]=o}}[I(-327,-390)](e,t){function n(e,t){return N(t-147,e)}e[r(-49,22)][r(-120,-148)](t[0],t[1],t[2]),e[n(397,343)](),e[n(381,407)]=!1;function r(e,t){return N(e- -322,t)}this[n(287,352)][n(386,404)](e),this[n(430,388)][n(511,440)](e)}[N(223,214)](){let e=new Set;function t(e,t){return N(t-508,e)}for(let r of this[n(1045,966)])if(this[t(769,749)][n(946,947)](r),r instanceof u||r instanceof m){e[n(1103,1054)](r[n(926,968)]);let i=r[n(1077,1038)];Array[t(701,777)](i)?i[n(877,928)](e=>e[t(643,709)]()):i[n(1013,962)]()}for(let t of e)t[n(909,962)]();function n(e,t){return N(t-761,e)}this[t(719,713)]=[]}[N(201,234)](){function e(e,t){return I(t,e- -220)}this[e(-680,-619)]()}},F=class extends y{[N(182,249)]=new C;[I(-494,-489)];constructor(e,t){super(e,t);function n(e,t){return I(e,t-408)}function r(e,t){return I(e,t-1381)}this[r(857,892)]=new P(this[n(33,-34)])}[N(245,301)](e){function t(e,t){return N(e- -366,t)}function n(e,t){return N(t-301,e)}return JSON[t(-168,-166)]([e[t(-128,-107)],Object[t(-169,-119)](e[t(-212,-153)])[n(433,471)](([,e])=>e[n(402,452)]!==void 0)[n(545,554)](([e,t])=>[e,t[n(399,452)]]),e[t(-69,5)][n(410,452)]])}[N(229,156)](){return!0}[I(-505,-510)](e){function t(e,t){return I(t,e-1331)}return e[t(886,880)][t(821,834)]}async[N(240,162)](e,t,n){let r=e[s(-13,-18)],i=[];for(let t of e[s(28,-20)]){let e=r[s(-121,-64)][u(780,786)](t);e!==void 0&&i[u(833,825)](e)}let a=[];for(let[e,n]of Object[s(-51,-126)](t[u(724,722)]))typeof n[u(745,719)]===s(-186,-119)&&a[u(858,825)]([Number(e),n[u(655,719)]]);let o=await this[u(719,750)][u(663,728)](n,r,e[u(821,835)][u(754,783)][s(-80,-70)](e=>e[u(702,748)]),{roots:Int32Array[s(-237,-160)](i),direction:t[u(760,806)][s(-103,-102)],radiusMode:t[s(-24,-85)][u(761,726)],baseRadius:t[s(-48,-85)][u(795,847)],overrides:a,placement:t[u(829,806)][s(-239,-171)],seed:1});if(!o)return null;function s(e,t){return N(t- -323,e)}let c=o[s(-82,-129)][s(-55,-86)]((e,t)=>Math[s(-41,-111)](e,t[s(-136,-172)]),0),l={...o};l[u(763,787)]=o[s(-207,-169)],l[u(769,781)]=c||t[s(-6,-85)][s(0,-44)],l[u(700,737)]={};function u(e,t){return N(t-568,e)}return l[u(700,737)][s(-12,-73)]=o[u(826,774)],l[u(700,737)][u(924,848)]=o[s(-5,-43)],l}[N(265,285)](e,t){function n(e,t){return N(t-131,e)}let r={};r[n(442,427)]=t[i(569,621)][i(597,662)];function i(e,t){return N(t-383,e)}return r[n(471,397)]=e[n(337,344)],r}[I(-506,-467)](e,t,n,r){if(e!==s(-202,-161))return;r[s(-179,-114)]=!0;let{hops:i,maxHop:a}=n;function o(e,t){return N(e-938,t)}function s(e,t){return N(t- -385,e)}for(let e=0;e0?Math[s(-222,-165)](1,i[e]/a):0}[I(-417,-456)](e,t,n,i,a,o){function s(e,t){return I(t,e-1443)}if(e!==u(305,328))return;let{hops:c,maxHop:l}=i[u(319,257)];function u(e,t){return I(t,e-764)}let d=Math[u(301,343)](c[t],c[n],l);a[s(962,1002)](r(i[s(1055,1112)],l>0?d/l:0),o)}[N(272,218)](e){function t(e,t){return I(e,t-146)}function n(e,t){return I(t,e- -119)}return{hops:e[n(-648,-646)],hopTransitions:Math[n(-590,-563)](1,e[t(-337,-331)])}}[N(188,216)](e){function t(e,t){return I(e,t- -153)}function n(e,t){return I(t,e-1617)}return[e[n(1088,1081)],e[t(-464,-539)]]}[I(-567,-499)](e,t,n){let r=n[i(953,999)][e];function i(e,t){return I(t,e-1482)}return o(t,r>n[i(1005,933)]?-1:r)[i(1025,1016)]}[N(268,330)](e,n){let{maxHop:a}=e,s=Math[p(111,185)](1,n[p(261,211)][p(215,252)]/4);function u(e,t){return I(t,e-1153)}let d=i(n[u(704,720)][p(260,188)][p(288,268)]),f=[];function p(e,t){return I(e,t-656)}for(let i of e[p(115,167)]){if(i[p(105,154)]===0||i[u(621,622)]<=0)continue;let e=i[p(331,253)]?-1:i[p(206,262)],m=o(n,e);if(!(m[p(209,275)]===`on`||m[u(772,721)]===p(119,137)&&!i[p(194,253)]&&i[p(332,262)]===a)||m[p(241,251)]===p(158,164))continue;let h=n[u(704,655)][p(247,188)][p(131,195)]===u(694,683)&&l(n,e)===void 0?t(r(d,a>0?i[p(340,262)]/a:0)):m[p(160,207)];f[p(202,230)]({center:[0,0,0],radius:i[u(621,548)],surface:m[u(748,683)],color:h,colorB:m[p(332,258)],gradientAxis:m[u(719,796)],opacity:m[p(239,237)]===u(634,569)?c(m[p(268,251)]):m[p(305,237)],segments:m[u(647,617)]===u(634,557)?Math[p(116,187)](2*Math.PI*i[u(621,592)]/s):m[p(215,150)]})}this[u(664,678)][p(172,134)](f)}[I(-449,-488)](e){function t(e,t){return I(t,e-1144)}function n(e,t){return I(t,e- -172)}this[n(-661,-657)][t(693,668)](e)}[N(306,362)](){function e(e,t){return I(e,t-1458)}this[t(960,1040)][e(912,976)]();function t(e,t){return I(t,e-1461)}this[t(972,964)][t(979,952)]()}};function I(e,t){return E(t- -684,e)}var L=v({create:(e,t)=>new F(e,t),ariaLabel:({nodes:e,edges:t})=>I(-387,-391)+e+N(270,303)+t+N(153,107)});export{L as default}; \ No newline at end of file diff --git a/website/static/graph-viz/chunks/CNgXtaZj.js b/website/static/graph-viz/chunks/CNgXtaZj.js new file mode 100644 index 00000000..a7910bfb --- /dev/null +++ b/website/static/graph-viz/chunks/CNgXtaZj.js @@ -0,0 +1 @@ +(function(e,t){function n(e,t){return W(e-35,t)}function r(e,t){return W(t- -634,e)}let i=e();for(;;)try{if(parseInt(r(-608,-352))/1+parseInt(r(-92,118))/2+-parseInt(r(-285,-117))/3*(-parseInt(n(694,430))/4)+-parseInt(n(485,468))/5*(-parseInt(n(820,1008))/6)+-parseInt(n(642,944))/7*(-parseInt(r(-471,-361))/8)+-parseInt(n(591,706))/9+-parseInt(n(920,882))/10===t)break;i.push(i.shift())}catch{i.push(i.shift())}})(ie,346383);import{r as e}from"./1rRgETmZ.js";import{i as t,t as n}from"./vendor-react-CwL591ZI.js";import{E as r,S as i,a,b as o,g as s,h as c,m as l,o as u,p as d,r as f,t as p,w as m,x as h}from"./DJgKbydu.js";import{F as g,I as _,L as v,a as y,b,c as x,f as S,h as C,i as w,o as ee,p as T,s as te,t as E,x as ne,y as D,z as re}from"./DtItaGi-.js";function ie(){let e=`yxbWBhLrDwf0zxjUAw9U.zgvNCMvL.BM9Kzv9OzwLNAhq.yvaWBG.y2H1BMTZ.BM9YBwfSAxPL.DvbHBgv0Dgu.Cg9ZAxrPB25Z.C2LU.BxvSDgLWBhK.C2nOzwr1Bgu.DhvYBG.zML4zwq.Bg93.Ag9Tzq.Cg93zxjqCMvMzxjLBMnL.DxnLu3rHDgu.CM9VDhm.B25dB250zxH0twvUDq.C2v0u2vSzwn0Aw9U.y3LJBgu.Aw1WB3n0B3juAhjLC2HVBgrqEa.zw5ZDxjLq29TCg9Zzxi.y29TCg9Zzxi.cMLUihzLyZmGyvbVC1bYzxy7igLUihzLyZmGyvbVC05LEhq7igLUihzLyZqGyvvwoYbPBIb2zwmYigftAxPLoYb1BMLMB3jTigzSB2f0ihvmyxLVDxruoYb1BMLMB3jTihzLyZiGDvzPzxDWB3j0oYbVDxqGDMvJmIb2vxy7ihzVAwqGBwfPBIGPihSGDMvJmYbJzw50zxiGpsbTAxGOyvbVC1bYzxySigfqB3nozxH0lcb1tgf5B3v0vcK7ihzLyZqGy2XPCca9ihbYB2PLy3rPB25nyxrYAxGGkIbTB2rLBfzPzxDnyxrYAxGGkIb2zwm0kgnLBNrLCIWGms4WktSGDMvJmIbWEca9ihzLyZiOCg9ZAxrPB24UEcaQigftAxPLlNGSicHWB3nPDgLVBI55ic0Gmc41ksaQigftAxPLlNKGlsaXmI4WktSGy2XPCc54EsaRpsbWEcaQidiUmcaVihvwAwv3Cg9YDcaQignSAxaUDZSGz2XFug9ZAxrPB24GpsbJBgLWoYb2vxyGpsbTAxGOyvvwlNH5lcbHvvyUENCSihv2ktSGFqO.CM9SBa.C2vNBwvUDhm.y29Z.Cg9ZtMv4Da.CM9SBerPCNr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2v0.BwLUsg9WCW.CMvUzgvYzxi.zwrNzv9OzwLNAhq.y2fWDhvYzq.zgLYzwn0Aw9U.CMvUzgvY.DMfSDwvqCM9Wzxj0Eq.C2v0u3rHDgu.zM9JDxnhzw9TzxrYEq.qM94mW.mJCWnJLKzMj5DvK.CMvJB3jK.CgfPCKDYB3vWCW.Aw5bzgO.CgfU.C2v0qwXSu3rHDgvZ.Bgf5B3v0ia.Dg9WB2XVz3K.C29Tzq.y2XPzw50wq.C2HPzNrlzxK.CgXHBMu.z2v0ug9Zzq.DMfSDwu.zhjHz2DPBMDtBw9VDgHuAw1L.CMfKAxvZ.yxv0B1jLC2v0.yw50AwfSAwfZ.B3b0Aw9UCW.zML0vg9tCgHLCMu.yxzNu2nHBgu.BM9Kzq.zgLZCg9Zzu1LC2G.CgLJA0f0.Bw90Aw9UuMvKDwnLza.Aw1N.CMvZzxq.Cg9PBNrLCNvW.y29UDhjVBhm.yNvPBgrnCW.zMfY.zwrNzxnbBMLTyxrLza.yxbWBhLwAxn1ywXZ.AwnVC2fOzwrYB24.y29WEq.C2v0rNjVBvbYB2PLy3rPB25nyxrYAxG.rwzMzwn0ugfZCW.C2v0qxr0CMLIDxrL.BwfNrMLSDgvY.mtaZnJK4meTxzhbysG.u3bOzxjPy2fS.C2f2zwq.B3v0Chv0q29SB3jtCgfJzq.yxbWBhLmyxLVDxq.AgLZDg9YEq.C2fTzvzPzxC.twf0CML4na.BM9KzuLKCW.y2vPBa.ig5VzgvZimk3ia.C3bLzwq.B25qB2LUDgvYrg93BG.C2v0t2zMC2v0.BgvMDa`.split(`.`);return ie=function(){return e},ie()}import{A as O,B as k,C as A,D as j,E as ae,F as M,H as oe,I as se,L as ce,M as N,N as le,O as P,P as F,R as ue,S as de,T as fe,V as pe,_ as I,a as L,c as me,d as he,f as ge,g as _e,h as R,i as ve,j as ye,k as be,l as xe,m as Se,o as Ce,p as we,r as Te,s as Ee,t as z,u as B,v as V,w as De,x as Oe,z as ke}from"./vendor-three-COuzUgS2.js";var H=e(t(),1),U=n();function Ae(e){function t(e,t){return W(e- -858,t)}function n(e,t){return W(e- -311,t)}return{doc:e[n(385,259)],revision:e[n(27,-37)],topology:re(e[t(-162,-123)]),roots:e[t(-270,-177)],selected:e[t(-523,-305)],focus:e[n(525,699)],schema:e[t(-600,-400)]}}function je(e){function t({scene:t,style:n,options:r,width:i,height:a,interactions:o,onHandle:s,config:c,inputScheme:l}){let u=(0,H[y(189,381)])(null),d=(0,H[y(294,381)])(null),f=(0,H[_(37,-35)])(o),[p,m]=(0,H[_(86,52)])(null),[h,g]=(0,H[_(-22,52)])(()=>{let e=t[n(-57,185)]();function n(e,t){return y(e,t- -308)}let r={};function i(e,t){return y(e,t- -665)}return r[i(-206,-382)]=e[n(548,269)][i(-90,-382)][i(-397,-123)],r[n(300,28)]=e[n(98,269)][i(-390,-329)][i(-261,-123)],r});function _(e,t){return W(t- -535,e)}(0,H[y(433,772)])(()=>{function e(e,t){return _(t,e-1280)}f[e(1006,1072)]=o},[o]);let v={};v[_(155,0)]=r;function y(e,t){return W(t- -119,e)}v[_(-60,-143)]=n,v[_(21,284)]=i,v[_(-74,223)]=a,v[y(494,323)]=c[y(623,323)],v[y(862,621)]=l;let b=(0,H[y(583,381)])(v);(0,H[y(1066,772)])(()=>{function e(e,t){return y(e,t-401)}let t={};t[e(659,817)]=r,t[e(507,674)]=n,t[o(-83,160)]=i,t[e(956,1040)]=a,t[e(633,724)]=c[o(-460,-555)],t[e(1194,1022)]=l;function o(e,t){return y(t,e- -783)}b[e(340,543)]=t}),(0,H[_(210,356)])(()=>{function n(e,t){return y(t,e- -298)}let r=u[h(-405,-244)];if(!r)return;let i=new Set,a=e[n(502,212)](r,{onHover:(e,t)=>f[h(-119,-244)][h(-9,335)](e,t),onClick:(e,t)=>f[n(-156,-493)][h(-145,135)](e,t),onDoubleClick:e=>f[n(-156,-241)][h(123,-35)](e),onContextMenu:(e,t)=>f[h(-220,-244)][h(-156,84)](e,t),onInfo:e=>f[n(-156,-358)][n(342,523)]?.(e),onStats:m,onView:e=>{for(let t of i)t(e)}});d[n(-156,-191)]=a;let o=b[h(-413,-244)];a[n(298,110)](o[h(206,235)]),a[n(-88,207)](o[n(402,692)],o[h(352,253)]),a[n(-85,21)](o[h(251,30)]),a[h(-169,-235)](o[n(-25,-38)]),a[h(465,243)](o[h(-281,-63)]),a[h(5,-164)](Ae(t[h(-156,107)]()));let c=t[n(14,264)]((e,t)=>{function r(e,t){return n(e- -16,t)}function i(e,t){return n(e- -49,t)}if(e[r(263,0)]!==t[r(263,159)]||e[i(-128,-2)]!==t[r(-95,-113)]||e[i(122,-219)]!==t[r(155,494)]||e[r(-98,-347)]!==t[i(-131,82)]||e[r(403,390)]!==t[i(370,370)]||e[r(-175,-400)]!==t[r(-175,-285)]){a[i(-125,15)](Ae(e));let t={};t[r(-31,151)]=e[i(230,466)][i(-64,-46)][i(195,5)],t[r(22,346)]=e[r(263,21)][i(-11,-320)][r(228,269)],g(t)}});s({fit:e=>a[h(-152,-157)](e),toggleAutoRotate:()=>a[n(403,362)](),view:{get:()=>a[n(-94,-165)](),look:e=>a[n(6,-217)](e),orbit:(e,t)=>a[n(230,294)](e,t),turn:(e,t)=>a[n(165,-26)](e,t),roll:e=>a[n(179,171)](e),home:()=>a[n(168,171)](),setHome:()=>a[h(602,283)](),dolly:e=>a[n(366,269)](e),panToScreen:(e,t)=>a[n(192,291)](e,t),undoView:()=>a[n(338,386)](),redoView:()=>a[n(275,66)](),subscribe:e=>{i[n(1118,1214)](e);function t(e,t){return h(e,t- -366)}e(a[t(-303,-548)]());function n(e,t){return h(e,t-1399)}return()=>i[t(-795,-607)](e)}}});let l=window[n(510,828)](n(-99,177)),p=()=>a[n(241,67)](l[n(238,449)]);p();function h(e,t){return y(e,t- -386)}return l[n(233,99)](h(7,-148),p),()=>{function e(e,t){return n(t-847,e)}l[t(1715,1446)](e(981,787),p),c(),i[e(672,670)]();function t(e,t){return n(t-943,e)}s(null),a[t(1028,1337)](),d[e(448,691)]=null}},[t,s]),(0,H[y(956,772)])(()=>{function e(e,t){return y(e,t- -418)}function t(e,t){return y(e,t- -644)}d[e(-26,-276)]?.[t(-445,-431)](r)},[r]),(0,H[_(574,356)])(()=>{function e(e,t){return y(e,t- -21)}function t(e,t){return y(e,t- -29)}d[e(-127,121)]?.[t(507,567)](l)},[l]),(0,H[_(543,356)])(()=>{function e(e,t){return _(e,t-1142)}function t(e,t){return _(e,t-685)}d[e(871,868)]?.[t(202,420)](n)},[n]),(0,H[_(542,356)])(()=>{function e(e,t){return _(e,t- -318)}d[e(-793,-592)]?.[e(-324,-105)](c[e(-635,-411)])},[c[y(289,323)]]),(0,H[_(274,356)])(()=>{function e(e,t){return _(t,e- -426)}d[e(-700,-670)]?.[e(-632,-599)](i,a)},[i,a]);let x={};x[y(464,700)]=i,x[y(299,639)]=a;let S={};return S[y(874,700)]=i,S[y(473,639)]=a,S[y(455,632)]=y(107,122),S[y(4,284)]=_(-444,-177),(0,U[y(848,773)])(_(-305,-45),{className:_(111,-202),style:x,children:[(0,U[_(-111,-116)])(y(404,672),{ref:u,role:y(448,423),"aria-label":e[_(-400,-282)](h),style:S}),r[y(1056,789)][_(592,386)]&&p&&(0,U[_(633,357)])(_(-149,-45),{className:_(-183,-141),children:[(0,U[_(544,357)])(y(685,371),{children:[p[y(596,663)],y(943,737),p[y(504,316)],_(587,361),Math[y(245,519)](p[_(513,313)]/1e3),y(492,305)]}),(0,U[y(916,773)])(y(344,371),{className:_(24,-292),children:[p[y(132,144)][y(753,703)](),_(250,31),p[y(380,541)][_(497,287)](),_(168,-153)]}),(0,U[y(801,773)])(y(369,371),{className:_(-107,-211),children:[_(253,-12),Math[_(35,103)](p[y(227,247)]),_(-433,-124),Math[y(723,519)](p[y(643,427)]),_(272,164),` `,Math[y(301,519)](p[y(87,317)]),_(-546,-238),p[y(596,671)]]})]})]})}return t}var Me=class{[$(1340,1679)];[$(1474,1577)];[J(297,322)]=[];[$(1070,1161)]=[];[J(271,440)]=-1/0;constructor(e=32,t=500){function n(e,t){return J(e-381,t)}function r(e,t){return J(t- -258,e)}this[n(501,623)]=e,this[r(312,-4)]=t}[$(1436,1475)](e,t,n=!1){let r=t-this[a(1098,1403)]this[a(1207,1252)]&&this[i(1109,923)][a(1216,956)]();function a(e,t){return J(t-1132,e)}this[a(712,982)][i(488,654)]=0}[$(1207,1405)](e){let t=this[n(1350,1078)][n(887,964)]();if(t===void 0)return null;this[r(-447,-319)][n(876,997)](e),this[n(1024,1052)]=-1/0;function n(e,t){return $(t- -439,e)}function r(e,t){return $(e- -1517,t)}return t}[$(1253,1412)](e){function t(e,t){return $(e- -358,t)}let n=this[t(712,965)][r(-47,-31)]();if(n===void 0)return null;this[t(1159,814)][r(-306,2)](e),this[t(1133,1473)]=-1/0;function r(e,t){return $(t- -1434,e)}return n}get[J(127,-158)](){function e(e,t){return $(e- -1340,t)}function t(e,t){return $(e- -208,t)}return this[t(1309,1382)][e(-92,82)]>0}get[$(1069,962)](){function e(e,t){return $(e-133,t)}return this[e(1203,870)][e(1381,1494)]>0}},Ne=1e-5;function Pe(e){let t=C(e[i(640,830)]),n=C(e.up);if(Math[i(883,785)](t[1])>1-1e-9){let e=D(n,-Math[i(1178,952)](t[1])*Ne);t=C([t[0]+e[0],t[1]+e[1],t[2]+e[2]])}let r=C(S(x,t));function i(e,t){return J(t-952,e)}function a(e,t){return J(t-25,e)}let o=S(t,r);return{direction:t,roll:Math[a(-281,-291)](-T(n,r),T(n,o))}}function Fe(e,t){let n=C(e),r=S(x,n),i=Math[u(909,750)](r[0],r[1],r[2])>1e-12?C(r):[1,0,0];function a(e,t){return J(t-578,e)}let o=S(n,i),s=Math[a(406,543)](t),c=Math[a(777,524)](t),l={};l[a(307,456)]=n,l.up=[o[0]*s-i[0]*c,o[1]*s-i[1]*c,o[2]*s-i[2]*c];function u(e,t){return J(e-1066,t)}return l}function Ie(e,t){let n=(t-e)%(2*Math.PI);return n>Math.PI&&(n-=2*Math.PI),n<=-Math.PI&&(n+=2*Math.PI),n}var Le=!1;const Re={};Re[$(1234,1411)]=z[J(-23,-117)][$(1024,1279)],Re[$(1108,952)]=z[$(1197,919)][J(-264,-287)],Re[$(1370,1331)]=z[$(1197,1249)][$(1208,1140)],Re[$(945,1100)]=z[J(-23,175)][$(1308,1654)];var ze=Re,Be=1,Ve=.15,He=32,Ue=.45,We={direction:[0,60/Math[$(1063,1377)](60,260),260/Math[$(1063,779)](60,260)],up:[0,1,0]};function Ge(e){return e<.5?2*e*e:1-(-2*e+2)**2/2}var Ke=class{[$(1378,1037)];[J(285,-17)];[$(1132,1463)];[J(-250,-34)]=!1;[J(198,178)]=.15;[J(91,-70)]=100;[$(980,1236)]=0;[$(1406,1184)]=1;[J(125,317)]=1;[$(1438,1763)]=new k;[$(1065,1391)]=new k;[J(57,123)]=new be;[$(1183,1075)]=0;[J(-160,-174)]=0;[J(-330,-194)]=0;[$(891,684)]=1;[$(1187,1381)]=!1;[J(-263,-53)]=We;[J(23,-132)]=te;[J(36,178)]=y(typeof navigator===J(-199,-409)?void 0:navigator);[$(1148,1317)]=new Me(He);[J(111,420)]=null;[$(1048,1327)]=new ye;[$(1115,940)]=new ae;[J(-161,-378)]=null;constructor(e){if(this[i(1506,1315)]=e,!Le){let e={};e[r(1153,1093)]=ke,e[r(1374,1044)]=k,e[r(1800,1599)]=pe,e[r(1603,1335)]=be,e[i(756,1087)]=de,e[r(1460,1393)]=ce,e[r(1419,1739)]=ve,e[i(1238,1244)]=M,e[i(1435,1358)]=ye;let t={};t[i(1069,1311)]=e,z[i(1059,851)](t),Le=!0}this[i(1244,1442)]=new fe(45,1,.1,5e3),this[r(1821,2030)][r(1635,1889)][r(1397,1644)](0,60,260),this[i(884,1069)]=new z(this[r(1821,1769)],e),this[i(1210,1069)][i(1127,1321)]=.25,this[i(855,1069)][r(1434,1691)]=.08,this[r(1448,1451)][r(1706,2013)][i(935,887)]=z[i(1181,1134)][i(1107,1245)],this[i(1323,1069)][r(1706,1386)][r(1681,1358)]=z[r(1513,1683)][r(1272,1410)],this[i(1217,1069)][i(1133,1174)](i(1647,1430),()=>{this[t(170,-126)]=!1,this[e(322,431)]=this[e(213,55)]();function e(e,t){return r(t- -1216,e)}this[t(571,355)]();function t(e,t){return r(t- -1412,e)}this[e(136,159)]?.()}),this[i(1048,1069)][r(1553,1391)](i(1087,834),()=>{function e(e,t){return r(e- -41,t)}this[e(1606,1370)]&&!this[e(1424,1764)](this[t(1679,1638)],this[e(1230,1030)]())&&this[t(1496,1316)][e(1711,1791)](this[t(1679,1342)],performance[t(1840,1506)]());function t(e,t){return r(e-32,t)}this[t(1679,1382)]=null});let t={};t[i(938,1034)]=!0,e[i(1489,1174)](i(989,1259),this[r(1708,1667)],t);let n={};n[i(844,1034)]=!0;function r(e,t){return $(e-316,t)}function i(e,t){return $(t- -63,e)}n[r(1539,1223)]=!0,e[r(1553,1385)](r(1659,1811),this[r(1642,1841)],n),e[i(1428,1174)](r(1586,1505),this[r(1611,1414)])}[J(75,-184)]=e=>{function t(e,t){return $(e- -670,t)}e[t(745,774)]===1&&e[t(588,289)]()};[$(1302,1187)](e){function t(e,t){return J(e-891,t)}this[t(914,842)]=e}[$(1392,1493)]=e=>{let t=e[n(551,631)]===0?n(134,373):e[i(2004,1774)]===1?n(889,581):null;if(!t)return;function n(e,t){return J(t-436,e)}let r=ze[E(this[n(618,459)],t,w(e,this[n(692,472)]))];function i(e,t){return J(t-1579,e)}t===n(647,373)?this[n(512,348)][i(1484,1749)][n(424,373)]=r:this[i(1365,1491)][n(349,606)][n(339,581)]=r};[J(106,182)]=e=>{this[n(-290,-100)][t(1562,1831)]=Be*ee(this[n(308,11)],w(e,this[t(1778,1614)]));function t(e,t){return $(t-358,e)}function n(e,t){return $(t- -1232,e)}this[t(1397,1506)][n(364,204)](this[n(-247,-277)](),performance[n(194,260)](),!0)};[$(1336,1415)](e,t){this[n(-244,35)]=Math[n(-250,-142)](t,e);function n(e,t){return J(e- -335,t)}function r(e,t){return J(t-214,e)}this[r(22,126)][n(-617,-630)]=.2*e,this[r(101,126)][n(-624,-377)]=6*this[r(281,305)],this[n(-50,-360)][r(160,128)]=50*this[n(-244,-246)],this[n(-50,-246)][n(-73,76)]()}[J(-304,-647)](e,t){this[n(477,399)]=Math[r(1514,1468)](1,e),this[n(629,338)]=Math[r(1514,1414)](1,t);function n(e,t){return $(t- -1007,e)}this[n(535,498)][n(275,393)]=this[r(1615,1278)]/this[n(122,338)];function r(e,t){return $(e-209,t)}this[n(122,245)]()}[J(-64,182)](e){if(e===this[t(873,585)])return;function t(e,t){return J(t-825,e)}this[t(481,585)]=e,this[t(1046,857)]()}[J(32,-52)](){this[t(484,231)]===0?this[t(1009,1329)][t(597,442)]():this[t(1009,743)][t(1e3,1108)](this[e(1314,1543)],this[e(1253,1316)],-this[t(484,722)]*this[e(1314,1106)],0,this[e(1314,974)],this[e(1253,1135)]);function e(e,t){return J(e-1128,t)}function t(e,t){return J(e-724,t)}this[t(1009,811)][e(1390,1555)]()}[$(1043,1275)](e=!0){function t(e,t){return J(t- -40,e)}function n(e,t){return J(t-528,e)}this[t(195,-128)][n(305,431)](new M(new k,this[n(821,619)]*1.05),e)}[J(-285,-223)](e){this[t(1276,1175)]();function t(e,t){return J(t-1290,e)}this[t(1188,1113)](e)}[J(141,279)](e,t,n){this[r(1269,1202)]();function r(e,t){return $(t-97,e)}function i(e,t){return $(t- -162,e)}this[i(1255,970)][r(939,1220)](new M(e,Math[i(1165,1143)](t,this[i(1438,1149)]*.05)),n)}[$(1370,1351)](e,t){function n(e,t){return J(t-1016,e)}function r(e,t){return J(t-229,e)}this[n(731,901)](!0),this[r(271,141)][n(989,1166)](this[n(852,928)][n(1258,1198)]*Ve*e,t)}[$(1196,1299)](e,t,n){if(e<0||t<0||e>this[r(1109,1420)]||t>this[r(1048,1374)])return;function r(e,t){return $(e- -297,t)}this[o(393,133)][o(-116,-109)](),this[r(751,449)][o(225,347)](new ke(e/this[r(1109,800)]*2-1,-(t/this[r(1048,1063)])*2+1),this[o(393,556)]),this[r(835,964)][o(312,427)](this[o(326,565)]),this[o(20,308)][r(1031,1339)](this[r(768,643)]);let i=this[o(326,503)][o(160,374)](this[r(768,589)])[o(51,-155)]();this[o(3,268)][r(719,385)](i,this[o(-47,-383)]);let a=this[r(751,906)][o(-254,-8)][r(934,1169)](this[r(818,1084)],new k);function o(e,t){return $(e- -1112,t)}a&&(this[r(808,527)](),this[r(835,892)][r(1107,966)](a.x,a.y,a.z,n))}[$(1342,1266)](e){let t=this[r(1498,1209)][n(329,246)](this[n(77,-78)]());function n(e,t){return J(e-342,t)}function r(e,t){return J(e-1570,t)}t&&this[r(1250,931)](t,e)}[J(59,-257)](e){function t(e,t){return J(e- -249,t)}let n=this[t(-321,-637)][t(-216,-178)](this[r(-338,-318)]());function r(e,t){return J(t- -53,e)}n&&this[t(-569,-246)](n,e)}[J(-115,75)](e=!1){function t(e,t){return J(t- -303,e)}function n(e,t){return J(e-616,t)}this[t(-418,-375)][t(237,-87)](this[t(-823,-568)](),performance[n(888,1099)](),e)}[$(955,730)](){function e(e,t){return $(e- -1041,t)}function t(e,t){return $(t- -700,e)}return{position:this[t(251,432)][t(678,724)](new k,!0),target:this[e(91,272)][e(287,52)](new k,!0),roll:this[t(170,190)]}}[$(1149,1137)](e,t){function n(e,t){return J(t-525,e)}function r(e,t){return J(t-43,e)}let i=1e-6*Math[r(330,128)](1,this[n(691,616)]);return e[r(373,142)][r(-291,-89)](t[n(833,624)])=1)return!1;function t(e,t){return $(e- -836,t)}this[n(-688,-615)]=Math[t(72,254)](1,this[t(55,-100)]+e/Ue),this[n(-150,-323)]=this[n(-685,-446)]+(this[t(54,74)]-this[t(224,116)])*Ge(this[n(-451,-615)]);function n(e,t){return $(t- -1506,e)}return this[n(-581,-615)]>=1&&(this[t(347,476)]=Math[n(-324,-453)](this[n(-403,-616)])<1e-9?0:this[n(-595,-616)]),!0}[J(-194,-52)](e){function t(e,t){return $(e-200,t)}this[t(1170,1066)]&&this[n(926,1127)]>0&&(this[n(1262,1160)](),this[t(1332,1269)][t(1586,1424)](this[t(1618,1722)]*e,0,!1));function n(e,t){return $(t- -291,e)}let r=this[n(667,841)][t(1226,1510)](e),i=this[n(721,1066)](e)||this[n(1112,896)];return this[t(1387,1327)]=!1,this[n(1187,892)]!==0&&(this[t(1477,1491)][t(1432,1127)](this[n(1427,1147)][n(1036,790)](0,0,1),this[t(1383,1079)]),this[t(1705,1884)][n(732,1034)][n(1016,876)](this[t(1477,1561)])),this[n(1280,1214)][n(714,705)](),r||i}[J(178,97)](){let e={};e[r(793,526)]=!0,this[t(238,-105)][t(367,210)](t(182,144),this[r(853,821)],e);function t(e,t){return $(e- -1140,t)}let n={};n[t(-43,-217)]=!0,this[r(743,807)][t(367,631)](t(203,-59),this[t(186,286)],n);function r(e,t){return $(t- -571,e)}this[t(238,-34)][r(685,936)](t(130,54),this[r(884,724)]),this[t(-8,279)][r(885,827)]()}};function W(e,t){e-=240;let n=ie(),r=n[e];W.WYXvNE===void 0&&(W.wKaNTy=function(e){let t=``,n=``;for(let n=0,r,i,a=0;i=e.charAt(a++);~i&&(r=n%4?r*64+i:i,n++%4)&&(t+=String.fromCharCode(255&r>>(-2*n&6))))i=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=`.indexOf(i);for(let e=0,r=t.length;eYe&&this[t(693,1031)][t(470,419)](),ee+t,0)/Ye>Je&&this[n(1547,1369)]=Xe&&this[n(1071,1369)]>this[n(1123,1225)]&&(this[n(1182,1369)]--,this[n(1355,1324)]=0,this[n(1787,1617)]=[],!0)}get[J(-372,-26)](){function e(e,t){return $(e- -686,t)}return qe[this[e(333,642)]]}};function Qe(e){let t=new he(i(h(e)),256,1,O,ue);t[n(-100,142)]=Oe,t[n(-213,-156)]=Oe;function n(e,t){return J(t-220,e)}t[r(591,413)]=xe;function r(e,t){return J(e-909,t)}return t[n(314,40)]=xe,t[n(-48,-159)]=!0,t}function $e(e){let t={};t[l(39,254)]=0;let n={};n[l(413,254)]=1;let r={};r[p(651,506)]=6;let i={};i[l(321,254)]=0;let a={};a[p(444,506)]=.1;let o={};o[p(705,506)]=0;let s={};s[p(313,506)]=.35;let c={};function l(e,t){return J(t-357,e)}c[l(246,254)]=1;let u={};u[p(206,506)]=1;let d={};d[l(-72,254)]=1;let f={};function p(e,t){return J(t-609,e)}f[l(143,254)]=.5;let m={};m[p(241,506)]=0;let h={};return h[p(669,506)]=500,{uTime:t,uLayoutT:n,uCycle:r,uViewport:{value:new ke(1,1)},uColorMode:i,uPalette:{value:Qe(e)},uDimming:a,uEdgeMode:o,uTrail:s,uCometScale:c,uEdgeAlpha:u,uWidthScale:d,uMinWidth:f,uLinearBlend:m,uPointScale:h}}var et=$(958,1253);function tt(e){return e[0]+e[1]*256+e[2]*65536}var nt=2048,rt=4096;function Z(e,t){let n=new I(e,t);function r(e,t){return $(t-260,e)}return n[r(1371,1175)](ge),n}function it(e,t){let n=new Ce(e,t);function r(e,t){return J(t-528,e)}return n[r(528,223)](ge),n}function at(e,t=1){function n(e,t){return J(t- -366,e)}function r(e,t){return J(e-369,t)}switch(e){case n(-462,-274):return new De(1.25);case r(359,46):return new L(1.5,1.5,1.5);case n(-605,-449):return new _e(1.15);case r(152,429):return new j(2.6,2.6);default:return new se(1,Math[n(-125,-281)](6,Math[r(374,311)](16*t)),Math[n(-297,-281)](4,Math[n(-468,-361)](12*t)))}}var ot=new k;function st(e,t,n,r){let i=1/0,a=1/0,o=1/0,s=-1/0;function c(e,t){return J(t-188,e)}let l=-1/0,u=-1/0;for(let n of e)for(let e=0;es&&(s=t),r>l&&(l=r),c>u&&(u=c)}if(!Number[c(371,319)](i))return r[c(-45,-180)][f(279,251)](0,0,0),r[c(37,87)]=0,r;r[f(164,22)][f(489,251)]((i+s)/2,(a+l)/2,(o+u)/2);let d=0;for(let n of e)for(let e=0;ed&&(d=t)}function f(e,t){return J(t-390,e)}return r[f(327,289)]=Math[c(428,227)](d)+n,r}var ct=$(1055,927)+et+$(1280,1126),lt=$(1393,1144);function ut(e,t){let n={};n[o(-159,-58)]=1;let r={};function i(e,t){return J(t-351,e)}r[o(-109,18)]=4;let a={};a[i(231,513)]=R,a[i(107,396)]=ct,a[o(226,414)]=lt,a[o(190,110)]=t?n:{},a[i(-168,55)]={},a[i(255,187)]=2,a[o(264,321)]=!t,a[o(565,362)]=t,a[i(-168,55)][i(440,176)]=e[i(175,176)],a[i(-168,55)][o(-3,-152)]=e[o(151,-152)];function o(e,t){return J(t-121,e)}return a[i(-168,55)][i(709,481)]=e[o(-27,251)],a[i(-168,55)][i(610,404)]=t?r:e[o(-2,174)],a[i(-168,55)][i(54,138)]=e[o(-65,-92)],a[i(-168,55)][o(-390,-162)]=e[o(-36,-162)],a[i(-168,55)][o(218,343)]=e[o(-3,343)],a[i(-168,55)][i(529,207)]=e[i(318,207)],a[i(-168,55)][i(309,124)]=e[o(142,-106)],a[i(-168,55)][i(143,319)]=e[o(371,89)],a[i(-168,55)][o(-33,-212)]=e[o(-371,-212)],a[i(-168,55)][o(-308,-135)]=e[o(-406,-135)],new F(a)}function dt(e,t){function n(e,t){return $(t- -662,e)}function r(e,t){return $(e- -306,t)}let i=t?2:1;e[n(304,173)]!==i&&(e[n(-74,173)]=i,e[r(535,636)]=!0)}function ft(e){let t=new Ee,n=new Float32Array((e+1)*2*2),r=[];for(let t=0;t<=e;t++){let o=t/e;if(n[a(87,-187)]([o,-1,o,1],t*4),te[t(1230,1233)])}[$(1028,1327)](e){function t(e,t){return J(t-764,e)}dt(this[t(821,1014)],e)}[$(1079,1143)](e){if(e===this[r(599,379)])return;this[r(599,300)]=e;function t(e,t){return $(e- -1106,t)}let n=this[r(403,651)];this[t(-118,-205)]=ft(e);for(let e of this[t(56,238)])this[r(311,331)](e[t(-239,72)]);function r(e,t){return $(e- -585,t)}n[r(813,608)]()}[J(-324,-47)](e){function t(e,t){return J(e-200,t)}e[t(184,263)]=this[i(1382,1250)][i(1150,1466)];let n=this[t(-32,-271)][i(1307,1478)](i(1040,1154)),r=this[t(-32,257)][t(196,407)](i(1775,1581));function i(e,t){return J(t-1482,e)}n&&e[t(121,336)](i(1051,1154),n),r&&e[t(121,255)](t(299,397),r)}[$(967,1199)](e){this[i(260,450)]();function t(e,t){return J(t-554,e)}let{count:n}=e;this[t(807,730)]=new Int32Array(n)[i(923,947)](-1),this[i(1361,1108)]=new Int32Array(n)[t(900,658)](-1);let r=new Map;function i(e,t){return J(t-843,e)}for(let a=0;a{for(let i=0;i<3;i++)a[r*3+i]=t[e[l(1393,1349)]*3+i],o[r*3+i]=n[e[l(1297,1349)]*3+i];function c(e,t){return i(e-327,t)}function l(e,t){return i(t-701,e)}s[c(931,972)]([e[l(1281,1343)],e[c(1086,797)][0],e[c(1086,1182)][1],e[l(1399,1460)][2]],r*4)});let c=new V;c[d(1376,1052)]=this[i(931,834)][i(727,626)];let l=this[d(1580,1900)][d(1388,1144)](d(1491,1441)),u=this[i(931,663)][d(1388,1446)](`uv`);l&&c[d(1313,1592)](d(1491,1392),l),u&&c[d(1313,1461)](`uv`,u),c[i(664,722)](i(1024,746),Z(a,3));function d(e,t){return J(e-1392,t)}c[i(664,417)](i(910,571),Z(o,3)),c[i(664,558)](d(1416,1518),Z(s,4)),c[i(532,314)]=r;let f=new A(c,this[i(714,1039)]);f[i(784,751)]=!1,f[d(1124,1214)]=!1,f[i(942,673)]=5,this[i(832,686)]=f,this[i(603,552)][d(1079,1097)](f)}[J(-277,-115)](e,t,n){if(this[l(214,347)](),!e||e[l(45,237)]===a(1055,963))return;let r=at(e[l(-99,237)]),i=new V;i[l(282,612)]=r[a(1494,1164)];for(let e of[l(719,727),l(699,726),`uv`]){let t=r[a(995,1176)](e);t&&i[l(363,549)](e,t)}function a(e,t){return J(t-1180,e)}let o=new B(e[l(433,644)]),s=e[a(1360,1085)]*3;i[l(716,549)](l(668,909),Z(Float32Array.of(t[s],t[s+1],t[s+2]),3)),i[a(1311,1101)](a(1539,1347),Z(Float32Array.of(n[s],n[s+1],n[s+2]),3)),i[a(1397,1101)](l(628,884),Z(Float32Array.of(o.r,o.g,o.b),3)),i[a(801,1101)](l(215,251),Z(Float32Array.of(e[a(1175,1248)],0,0,0),4)),i[l(579,549)](l(432,240),Z(new Float32Array(4),4)),i[l(171,417)]=1;let c=new A(i,this[a(1020,1264)]);c[l(547,669)]=!1,c[l(410,360)]=!1,c[l(1026,827)]=4;function l(e,t){return J(t-628,e)}this[l(689,831)]=c,this[a(1390,1062)]=r,this[a(1345,1040)][a(655,867)](c)}[$(1282,1003)](){function e(e,t){return J(t-652,e)}if(!this[e(805,741)])return;this[e(711,512)][t(585,548)](this[t(816,912)]);function t(e,t){return J(e-727,t)}let n=this[e(728,741)][e(574,299)];n[t(711,867)]=null,n[t(724,977)](t(826,1154)),n[t(724,1040)](`uv`),n[t(905,1040)](),this[e(706,741)]=null}[J(-281,-249)](){if(!this[t(1408,1444)])return;function e(e,t){return $(t- -1538,e)}function t(e,t){return $(e- -15,t)}this[e(-445,-458)][e(-150,-460)](this[t(1408,1686)]),this[e(136,-115)][t(852,1093)][e(-203,-140)](),this[t(1087,788)]?.[e(-153,-140)](),this[e(-227,-115)]=null,this[e(-227,-436)]=null}[J(178,194)](){this[t(222,388)](),this[t(-121,-23)](),this[e(386,371)][t(338,649)](),this[t(131,328)][e(429,361)]();function e(e,t){return J(t-183,e)}function t(e,t){return J(e-160,t)}this[t(244,159)][t(338,498)]()}},Ct=J(-38,193),wt=$(982,1035);function Tt(e,t){function n(e,t){return $(e- -1288,t)}let r={};r[n(-171,-293)]=t;let i={};i[n(-243,-74)]=e[o(1013,1345)],i[n(-341,-112)]=e[o(1509,1247)],i[o(1578,1676)]=r;let a={};a[o(1666,1682)]=R,a[n(-23,-91)]=Ct,a[o(2056,1813)]=wt,a[n(-364,-495)]=i,a[n(-232,-318)]=2;function o(e,t){return $(t-300,e)}return a[n(132,85)]=!0,a[n(-90,72)]=!1,a[o(1698,1761)]=!1,new F(a)}var Et=22,Q=30,Dt=2048,Ot=6,kt=24;function At(e){function t(e,t){return J(t-1446,e)}function n(e,t){return J(t-868,e)}return e[t(1326,1474)]>kt?e[t(1082,1127)](0,10)+`…`+e[n(833,549)](-8):e}var jt=class{[$(1080,1332)];[$(1333,1565)]=null;[$(909,601)]=null;[J(250,-9)];[J(188,155)]=new j(1,1);[$(1422,1396)]=``;[J(-242,-495)]=[];constructor(e,t){this[n(1413,1320)]=t;function n(e,t){return J(e-1553,t)}function r(e,t){return J(e-853,t)}this[r(1103,1191)]=Tt(e,null)}[J(-253,-401)](e,t,n){let r=e[a(1069,953)](e=>e[a(1123,821)]+`:`+ +!!e[a(942,972)]+`:`+e[i(256,63)])[i(114,-49)](`|`);function i(e,t){return $(e- -719,t)}function a(e,t){return $(t- -304,e)}(r!==this[i(703,600)]||!this[a(1347,1029)])&&(this[a(1096,1118)]=r,this[a(873,674)]=e,this[i(149,125)]()),this[a(1184,1045)](t,n)}[$(868,879)](){if(this[l(1306,1483)](),this[m(-153,-186)][m(117,441)]===0)return;let e=document[l(1207,1376)](m(247,86)),t=e[l(1058,1393)](`2d`);if(!t)return;t[l(1165,1023)]=Et+l(1638,1548);let n=this[l(1158,877)][l(1437,1371)](e=>At(e[m(-156,-502)])),r=n[m(126,184)](e=>Math[l(1332,1389)](t[m(308,-10)](e)[l(1586,1457)])+12),i=[],a=0,o=0;for(let e of r)a+e>Dt&&(a=0,o+=Q),i[m(305,279)]([a,o]),a+=e;let s=Math[m(174,412)](Q,2**Math[l(1332,1662)](Math[l(1172,954)](o+Q)));e[l(1586,1472)]=Dt,e[m(214,172)]=s;let c=e[m(-253,-75)](`2d`);if(!c)return;function l(e,t){return $(e-180,t)}c[m(-146,-101)]=Et+l(1638,1479),c[m(-67,44)]=m(234,175);let u=this[l(1158,1138)][l(1428,1102)],d=new Float32Array(u*4),f=new Float32Array(u*2);for(let e=0;e{function i(e,t){return c(e-555,t)}function o(e,t){return c(e- -271,t)}for(let c=0;c<3;c++)a[r*3+c]=e[n[o(341,583)]*3+c],s[r*3+c]=t[n[i(1167,1429)]*3+c]}),r[o(-511,-381)]=!0,i[o(-511,-247)]=!0}[$(1126,1004)](){if(this[e(-181,-8)]){this[t(909,728)][t(485,726)](this[t(1288,981)]);let n=this[e(-181,-527)][t(189,515)];n[t(996,852)]=null,n[e(-297,-221)](t(938,967)),n[t(791,865)](`uv`),n[t(759,1046)](),this[e(-181,115)]=null}function e(e,t){return J(e- -294,t)}function t(e,t){return J(t-868,e)}this[e(-605,-570)]?.[e(-116,18)](),this[e(-605,-421)]=null}[J(178,345)](){this[e(802,593)]();function e(e,t){return $(e- -324,t)}function t(e,t){return $(t- -1083,e)}this[e(1084,1311)][e(1074,1198)](),this[e(1146,1445)][t(179,315)]()}},Mt=[J(-146,-158),$(1312,1388),$(1210,1228),J(-83,3),J(-217,-378)],Nt=new M,Pt=new k,Ft=class{[$(1080,880)];[$(1062,933)];[J(-58,-328)]=[];[$(1389,1385)]=new Int32Array;[$(1285,1314)]=new Int32Array;[$(1263,990)]=new Map;[J(250,559)];[$(1444,1282)];[$(1450,1104)];[J(19,-95)];[$(1499,1235)];[J(-255,-299)];[$(1509,1761)]=0;constructor(e,t,n){this[c(957,659)]=t,this[i(207,324)]=n;let r={};r[c(885,829)]=!1,r[c(1098,1277)]=!1,r[c(1288,1246)]=null,this[c(1347,1325)]=gt(e,r);function i(e,t){return $(e- -855,t)}let a={};a[c(885,747)]=!1,a[i(366,446)]=!0,a[i(556,415)]=null,this[i(589,264)]=gt(e,a);let o={};o[c(885,694)]=!0,o[c(1098,774)]=!1,o[i(556,568)]=null,this[i(595,608)]=gt(e,o);let s={};function c(e,t){return $(e- -123,t)}s[c(885,808)]=!0,s[i(366,613)]=!0,s[c(1288,1018)]=null,this[i(384,719)]=gt(e,s),this[c(1376,1567)]=yt(e,!1),this[c(842,923)]=yt(e,!0);for(let e of Mt)this[c(1140,1064)][i(226,159)](e,at(e))}[J(-381,-173)](e){function t(e,t){return J(e-1075,t)}function n(e,t){return J(e-1173,t)}this[t(1299,1007)][n(877,587)][n(1393,1432)][n(1070,1408)]=e,this[t(1094,825)][t(779,704)][t(1295,1425)][t(972,1129)]=e}[$(967,794)](e){function t(e,t){return $(t-311,e)}this[i(314,104)]();let{count:n}=e;this[i(876,1119)]=new Int32Array(n)[t(1307,1635)](-1),this[i(772,753)]=new Int32Array(n)[i(811,558)](-1);let r=new Map;for(let a=0;a=0|(o>=0?2:0)|(s>=0?4:0),l=e[t(859,1140)](a)+`|`+e[t(1946,1743)][a]+`|`+c,u=r[i(341,88)](l);u?u[t(1677,1747)](a):r[t(1378,1392)](l,[a])}function i(e,t){return $(e- -513,t)}for(let[n,a]of r){let r=Mt[t(1575,1539)](e=>n[t(1669,1579)](e+`|`))??t(1395,1385);for(let n=0;n0?d/r:1,dirty:!1};st([o,s],r,3*S[m(6,340)],S[m(511,290)]),this[g(1018,1231)][g(1584,1505)](S)}[$(1101,1061)](e,t){let n=this[a(907,1253)][e];if(n<0)return;let r=this[a(680,462)][n],i=this[o(1516,1657)][e];if(r[a(984,812)][i*4+2]===t)return;function a(e,t){return J(e-738,t)}function o(e,t){return J(t-1592,e)}r[o(1663,1838)][i*4+2]=t,r[o(1610,1594)]=!0}[J(-111,-258)](e){function t(e,t){return $(t- -535,e)}function n(e,t){return $(t- -594,e)}for(let r of this[n(331,568)])for(let i=0;i=0}[J(-259,-505)](e,t,n,r){function i(e,t){return J(e-62,t)}function a(e,t){return J(e-564,t)}let o=n/2/Math[a(335,412)](e[a(380,606)]*Math.PI/360),s=0;for(let n of this[a(506,482)]){Nt[i(-20,-104)](n[a(418,688)]);let c=t[i(-245,-376)](Nt),l=!1;if(c){let t=Math[i(147,444)](.1,e[a(663,962)][i(-70,21)](Pt[i(-20,295)](Nt[i(-306,-17)]))-Nt[a(463,208)]);l=2*n[a(468,541)]*o/t=r||n>=i)return 0;let o=this[a(685,380)],s=this[l(442,285)][a(287,232)][a(222,402)],c=s.x;function l(e,t){return $(e- -475,t)}let u=s.y;s[a(614,366)](1,1);let d=e[l(819,830)]?.[l(367,488)]?{...e[a(270,579)]}:null;e[l(1021,1007)](r,i,Math[l(525,865)](t)+(d?.[l(505,280)]??0),Math[l(525,257)](n)+(d?.[l(471,554)]??0),1,1),o[a(944,686)](this[a(643,430)]);let f=o[l(828,942)]();return o[a(505,638)](this[a(914,583)]),o[l(881,795)](this[a(377,112)],1),o[a(130,112)](),o[l(624,441)](this[l(587,472)],e),o[a(977,800)](this[l(823,826)],0,0,1,1,this[l(725,880)]),o[l(878,696)](null),o[a(841,641)](this[l(670,728)],f),d?e[l(1021,1248)](d[l(413,269)],d[l(418,427)],d[l(505,620)],d[l(471,728)],d[a(651,691)],d[l(870,1209)]):e[l(618,290)](),s[l(606,685)](c,u),tt(this[l(725,472)])}[J(178,363)](){function e(e,t){return J(e-388,t)}function t(e,t){return J(t-634,e)}this[e(466,174)][t(876,812)]()}},Lt=.6,Rt=4,zt=2,Bt=500,Vt=5e4,Ht=1.5;const Ut={};Ut[$(1320,1160)]=0,Ut[$(1240,1396)]=1,Ut[J(226,355)]=2,Ut[$(966,814)]=3;var Wt=Ut;function $(e,t){return W(e-587,t)}function Gt(e){return e<.5?2*e*e:1-(-2*e+2)**2/2}var Kt=class{[$(1378,1301)];[J(-266,-362)];[J(-125,-52)];[$(1080,1292)]=new le;[$(1062,1381)]=new le;[J(-303,-159)];[J(-325,-115)];[$(871,960)];[J(-231,-212)];[J(-178,-261)];[$(1238,1194)];[$(1195,1107)];[J(157,199)]=new Ze;[$(1315,1096)]=new Se;[J(225,231)]=new de;[J(218,238)]=new k;[$(1406,1392)]=1;[$(1345,1588)]=1;[J(163,282)]=0;[$(1321,1408)]=0;[J(2,-99)]=!0;[J(-189,-174)]=!1;[$(926,1154)]=null;[$(979,638)]=null;[J(-98,-19)]=null;[J(179,171)]=!1;[$(1002,1024)]=!1;[$(1029,1046)]=()=>!1;[J(260,402)]=null;[$(941,721)]=null;[J(251,514)]=0;[$(1316,1330)]=``;[$(876,995)]=``;[J(-257,-350)]=``;[J(30,-176)]=new Float32Array;[J(-128,-292)]=new Float32Array;[J(-337,-223)]=1;[$(1512,1616)]=!1;[$(959,688)]=0;[$(1299,1575)]=new Int32Array;[J(93,286)]=new Map;[$(1214,1039)]=null;[J(291,559)]={x:0,y:0,inside:!1};[J(-347,-634)]={x:-1e9,y:-1e9};[J(-341,-367)]=!1;[J(61,-253)]=null;[$(1510,1218)]=null;[J(244,35)]=new Uint8Array;[$(929,886)]=new Uint8Array;[J(177,160)]=new Float32Array;[J(296,111)]={direction:[0,0,1],up:[0,1,0]};[J(-382,-148)]=null;[J(-130,-223)]=null;[J(193,305)]=``;[$(1067,898)]=new Map;[$(1181,1291)]=null;[J(175,458)]=!1;[J(42,164)]=0;[J(-293,-453)]=0;[J(-258,-434)]={fps:0,draws:0,triangles:0,nodesDrawn:0,edgesDrawn:0,quality:$(855,836),layoutMs:0,buildMs:0,firstFrameMs:0};[J(277,61)]=0;[J(249,107)]=!1;constructor(e,t){this[r(875,1079)]=e,this[i(572,745)]=t;let n={};n[r(875,1132)]=e,n[r(618,615)]=!0;function r(e,t){return J(e-717,t)}n[i(968,1092)]=!1,n[i(640,964)]=r(907,1098),this[r(592,312)]=new Te(n),this[r(592,566)][r(483,543)](Math[r(405,267)](window[i(841,650)]||1,2)),this[i(605,886)][i(665,937)]=N,this[i(1106,1002)](ne[r(992,1239)][r(814,774)]),this[i(819,886)][i(622,823)][i(860,911)]=!1,this[i(406,708)]=$e(i(734,857)),this[i(848,686)]=new Ke(e),this[r(392,209)][i(816,850)]=()=>{this[e(1075,899)]=!0;function e(e,t){return r(e-66,t)}function t(e,t){return r(t- -850,e)}this[t(174,-131)]=!0},this[r(368,528)]=new It(this[r(592,446)],this[r(559,525)],this[r(414,178)]),this[r(486,267)]=new Ft(this[i(590,708)],this[i(1101,871)],this[i(1183,853)]),this[i(902,833)]=new pt(this[i(466,708)],this[i(594,871)],this[i(572,853)]),this[i(689,1029)]=new jt(this[r(414,441)],this[i(1195,871)]),this[r(692,400)]=new St(this[i(881,708)],this[r(577,535)]),e[i(1081,1028)](i(1209,1268),this[i(993,873)]),e[r(734,686)](r(819,799),this[r(652,889)]),e[r(734,975)](r(628,875),this[r(952,955)]);function i(e,t){return J(t-1011,e)}e[r(734,744)](i(1038,981),this[i(1075,1006)]),e[r(734,779)](i(1278,1176),this[r(554,403)]),e[r(734,742)](i(1379,1291),this[i(1272,967)]),this[i(992,1174)]=requestAnimationFrame(this[i(821,840)])}[J(-8,-309)](){return!1}[J(-374,-260)](){return!0}[J(-252,-486)](e){return null}[J(128,117)](e,t,n){return!0}[J(-269,-253)](e,t){}[J(135,124)](e,t){function n(e,t){return $(e- -30,t)}function r(e,t){return $(t- -431,e)}return{near:Math[r(881,874)](1,e[n(1445,1350)]/5),outer:e[n(1445,1501)]}}[J(214,99)](e){}[$(1014,1104)](){}[J(-292,-329)](e){let t=this[r(834,1171)];function n(e,t){return J(e-370,t)}this[n(76,260)]=e;function r(e,t){return J(e-1128,t)}let i=!!t&&!Jt(t[n(325,416)],e[r(1083,1142)]);!t||t[n(75,400)]!==e[r(833,886)]||t[r(1019,1181)]!==e[n(261,220)]||i&&this[r(1120,1101)]()?this[r(994,916)]():t&&(t[r(830,591)]!==e[n(72,-77)]||t[r(1331,1669)]!==e[r(1331,1527)]||i)&&this[n(170,-76)]()}[$(857,1086)](e){if(this[n(776,865)]===e)return;this[t(1085,772)]=e;function t(e,t){return $(t- -207,e)}this[t(970,669)]=``;function n(e,t){return $(t- -114,e)}this[t(836,929)]()}[$(919,691)](e){this[i(495,428)]=e;let t=this[r(-71,94)](e);t!==this[i(809,622)]&&(this[r(450,342)]=t,this[r(256,-48)]&&this[i(535,392)]()),this[r(-177,-57)][i(310,313)][r(-103,143)]=e[i(398,729)][i(694,732)],this[r(62,-57)][r(-316,19)][i(675,423)]=e[r(-19,68)][i(193,290)],this[i(282,223)][r(205,-87)][r(-166,143)]=e[r(-195,68)][r(-303,-26)];let n=this[r(234,-57)][i(226,470)][r(-86,143)];function r(e,t){return J(t-246,e)}if(n[i(141,356)].id!==e[i(759,542)][r(106,15)][r(342,442)]){n[r(153,424)]();let t=Qe(e[i(437,542)][r(169,15)][r(708,442)]);t[i(643,356)].id=e[i(779,542)][i(253,295)][r(687,442)],this[r(133,-57)][r(-81,190)][i(365,423)]=t}this[i(350,517)](e[r(176,521)][i(856,623)]),this[r(240,420)](),this[r(369,162)]();function i(e,t){return J(t-526,e)}this[i(269,528)]=!0}[J(-9,291)](e){if(this[t(833,498)][t(1046,735)]instanceof B&&this[t(705,498)][t(868,735)][n(1225,1e3)]()===new B(e)[t(778,702)]())return;function t(e,t){return J(t-638,e)}function n(e,t){return J(t-936,e)}this[n(921,811)][t(751,774)](new B(e),1),this[t(540,498)][t(421,735)]=new B(e)}[$(1335,1110)](e){if(this[n(-102,-184)]===e)return;function t(e,t){return $(e- -330,t)}function n(e,t){return $(t- -1213,e)}this[t(699,490)]=e,this[n(-20,-337)]=``,this[t(806,813)]()}[$(1245,1493)](e){function t(e,t){return $(e- -43,t)}function n(e,t){return $(t- -1274,e)}this[t(1356,1441)]=e,this[n(-93,120)](),this[t(833,960)]=``,this[n(-412,-138)]()}[$(916,780)](e,t){this[i(922,603)]=Math[n(1658,1518)](1,e),this[i(523,542)]=Math[i(225,502)](1,t);function n(e,t){return J(t-1433,e)}let r=this[i(847,574)][n(1114,1061)];this[i(125,292)][i(111,183)](Math[i(426,105)](window[n(1070,1072)]||1,r[i(727,699)])),this[n(1398,1308)][i(-155,69)](this[i(881,603)],this[i(409,542)],!1),this[n(1438,1108)][i(-42,113)](this[i(845,603)],this[n(1476,1558)]),this[n(900,1130)][n(1295,1160)][n(1307,1330)][n(1626,1294)](this[i(531,603)],this[n(1243,1558)]);function i(e,t){return J(t-417,e)}this[n(812,1130)][i(739,578)][n(1469,1330)]=this[n(1583,1558)]/2/Math[n(1095,1204)](this[n(1087,1108)][n(1376,1718)][i(-12,233)]*Math.PI/360),this[n(1148,1394)]?.[i(281,69)](this[i(502,603)],this[i(602,542)]),this[i(301,419)]=!0}[$(935,1003)](e=$(1084,1195)){let t=e===r(103,-46)?this[r(46,-78)]():null;function n(e,t){return $(e-403,t)}function r(e,t){return $(e- -894,t)}t?(this[r(618,915)]=!0,this[n(1298,1588)][n(1764,1916)](t[n(1255,1256)],t[n(1522,1736)],!this[r(234,549)]())):(this[n(1915,1751)]=!1,this[n(1298,1160)][r(41,-60)](!this[n(1531,1497)]())),this[r(328,61)]=!0}[J(-280,-373)](){let e=this[n(-818,-546)],t=this[n(-447,-531)];function n(e,t){return J(t- -252,e)}if(!e||!t||e[c(907,1190)][n(-204,-421)]===0)return null;let r=this[n(-257,-555)][c(1030,746)][c(1102,941)],i=(e,t)=>this[c(1235,1096)][e*3+t]+(this[n(-418,-380)][e*3+t]-this[n(110,-222)][e*3+t])*r,a=[];for(let r of e[n(-600,-550)]){let e=t[n(-33,-243)][c(839,952)](r);e!==void 0&&this[n(-469,-483)][c(865,948)](e)&&a[c(1421,1592)](e)}if(a[c(1233,1069)]===0)return null;let o=[1/0,1/0,1/0],s=[-1/0,-1/0,-1/0];function c(e,t){return J(e-1205,t)}for(let e of a)for(let t=0;t<3;t++)o[t]=Math[n(-656,-564)](o[t],i(e,t)),s[t]=Math[n(-83,-167)](s[t],i(e,t));let l=new k((o[0]+s[0])/2,(o[1]+s[1])/2,(o[2]+s[2])/2),u=0;for(let e of a){let t=Math[c(1048,882)](i(e,0)-l.x,i(e,1)-l.y,i(e,2)-l.z)+this[c(1382,1682)][e]*2;u=Math[c(1290,1099)](u,t)}let d={};return d[n(-415,-620)]=l,d[n(-427,-353)]=u*1.15,d}[$(1407,1541)](){function e(e,t){return $(e- -169,t)}let t=this[n(117,32)]?.[e(1336,1480)][e(1249,1533)]??.15;function n(e,t){return $(e- -1005,t)}this[e(726,530)][n(349,385)](!this[e(726,872)][n(230,405)],t),this[n(217,344)]=!0}[J(-310,-3)](){this[t(925,1210)][e(743,593)](this[t(2141,1831)]);function e(e,t){return J(t-697,e)}function t(e,t){return J(t-1535,e)}return this[e(728,993)]}[$(1010,1347)](e){this[n(1357,1089)]();function t(e,t){return J(t-309,e)}function n(e,t){return J(t-821,e)}this[n(342,496)][n(469,611)](e,!this[t(451,217)]())}[J(14,-287)](e,t){this[r(1083,776)]();function n(e,t){return $(e- -264,t)}function r(e,t){return $(e- -405,t)}this[r(490,243)][n(970,1062)](e,t,!this[r(723,640)]())}[$(1172,978)](){this[t(-74,-25)][e(695,886)](!1,this[t(153,440)]?.[t(536,592)][e(759,1009)]??.15),this[t(543,335)]=!1;function e(e,t){return J(e-561,t)}this[t(-74,208)][t(203,276)](!this[e(469,672)]());function t(e,t){return J(e-251,t)}this[t(253,93)]=!0}[$(1375,1573)](){function e(e,t){return $(t- -1304,e)}this[e(-468,-409)][e(-169,110)]()}[J(-51,293)](e,t){function n(e,t){return J(e- -231,t)}this[n(37,366)]();function r(e,t){return J(e-1622,t)}this[r(1297,1120)][r(1571,1361)](e,t)}[$(1183,1089)](e){function t(e,t){return J(e-325,t)}this[n(1918,1631)]();function n(e,t){return J(t-1363,e)}this[t(0,-13)][t(-32,-62)](e)}[J(150,-41)](e){this[n(1631,1492)]();function t(e,t){return $(e-43,t)}function n(e,t){return $(e-143,t)}this[t(938,928)][t(1413,1731)](e,!this[n(1271,1395)]())}[J(-24,-75)](e,t){function n(e,t){return J(t-1607,e)}this[n(2131,1875)]();function r(e,t){return J(e- -190,t)}this[r(-515,-719)][r(-214,-177)](e,t,!this[n(1280,1515)]())}[$(1342,1251)](){function e(e,t){return $(t- -705,e)}this[t(1474,1284)]();function t(e,t){return $(t- -204,e)}this[e(58,190)][t(1033,1138)](!this[t(955,924)]())}[J(59,-214)](){function e(e,t){return J(e-207,t)}this[e(475,622)]();function t(e,t){return J(t- -316,e)}this[e(-118,-50)][t(-40,-257)](!this[e(115,-202)]())}[$(1302,1259)](e){function t(e,t){return $(t- -671,e)}this[t(227,224)][t(933,631)](e)}[$(1488,1502)](){this[e(-353,-628)][e(-395,-169)](!1,this[e(-311,-401)]?.[t(637,656)][e(56,-105)]??.15);function e(e,t){return $(t- -1523,e)}function t(e,t){return $(t- -849,e)}this[e(-76,-11)]=!0,this[e(-371,-301)]=!0}get[J(76,206)](){function e(e,t){return $(e- -1567,t)}return this[e(-605,-524)]}[$(1128,1314)](){function e(e,t){return $(e- -298,t)}let t=this[e(824,613)]?.[n(1051,1396)][e(1101,821)]??n(1513,1360);function n(e,t){return $(t- -99,e)}return t===`on`||t===n(1583,1360)&&this[e(1101,1365)]}[$(1135,921)](){function e(e,t){return $(t- -165,e)}function t(e,t){return $(e- -219,t)}return(this[e(1066,957)]?.[t(823,599)][e(893,874)]??e(1008,716))===e(627,716)&&!this[t(909,949)]()}[J(174,467)](){let e=this[n(879,1128)];function t(e,t){return J(e-1247,t)}function n(e,t){return J(e-977,t)}if(!e)return;let r=this[t(1162,1494)]();this[t(944,1110)][n(833,1136)][t(1144,1359)]=+!r,this[t(1069,880)][t(1055,1235)](r),this[t(1069,1080)][t(1100,862)]=!r||e[n(799,868)][n(639,578)];let i=e[t(1532,1369)][t(997,1198)]&&!this[t(1155,1119)]();this[t(922,697)][n(1111,1166)](i&&!this[t(1537,1500)],e[n(1262,1316)][t(1445,1303)]),this[n(652,477)][t(1183,981)](e[n(1262,1446)][n(737,826)])}[$(1086,886)](){let e=this[a(625,387)],t=this[n(396,129)];if(!e||!t)return;function n(e,t){return $(e- -726,t)}let r=++this[a(818,932)],i=e[a(369,572)];function a(e,t){return $(t- -539,e)}this[a(1088,958)]=performance[n(766,623)](),this[n(705,775)](e,t,r)[n(216,-64)](e=>{function t(e,t){return a(e,t-146)}function n(e,t){return a(e,t-273)}e&&!this[n(773,765)]&&r===this[n(982,1205)]&&this[t(219,533)]?.[t(833,718)]===i&&this[n(618,881)](e,i)})}[$(1147,1450)](e,t){let n=this[c(415,440)];if(!n)return;let r=t[c(233,289)],i=new Float32Array(r*3),a=this[l(1200,1001)],o=this[l(1705,1517)](n)&&!this[c(658,446)]()&&a!==null;if(o&&a){let e=this[c(238,235)][c(567,363)][c(595,435)],n=(t,n,r)=>{function i(e,t){return l(t,e- -317)}function a(e,t){return l(t,e- -884)}for(let o=0;o<3;o++)n[r+o]=this[i(993,1131)][t*3+o]+(this[a(268,-71)][t*3+o]-this[a(426,772)][t*3+o])*e},o=new Uint8Array(r);for(let e=0;e=0&&i[l(1337,1141)](i[l(1287,1293)](n*3,n*3+3),e*3)}}else i[l(828,1141)](e[c(687,483)]);this[c(297,568)]=i,this[c(737,410)]=e[l(1127,1225)],this[l(1664,1540)]=e,this[l(1009,1001)]=t,this[c(197,201)]=+!o,this[c(259,235)][c(559,363)][c(103,435)]=+!o,this[l(926,1022)][l(842,1013)]=e[c(-20,271)];let s=new Int32Array(r);for(let e=0;et[c(740,477)][n]-t[l(1240,1219)][e]),this[l(1219,1359)]=s[l(1005,1293)](0,Math[l(1278,968)](r,256));function l(e,t){return J(t-1280,e)}this[l(1552,1373)]=new Map(t[l(1374,1412)][l(1400,1317)]((e,t)=>[e,t]));let{near:u,outer:d}=this[l(1717,1415)](e,n);this[c(16,213)][l(1663,1396)](u,d),!this[c(1142,830)]&&Math[c(628,371)](d-this[c(108,277)])>.001&&(this[c(-92,213)][l(1105,1103)](this[c(174,277)]>0),this[c(179,277)]=d),this[c(602,272)][l(1579,1406)](e[l(1186,1092)]),this[c(267,194)]=``,this[l(1079,1023)]=``,this[l(1814,1529)]=!0,this[c(562,454)]()}[$(1136,821)](){let e=this[F(-770,-513)],t=this[F(-327,-317)],n=this[F(-437,-460)],i=this[D(1859,1678)],a=this[D(855,1139)];if(!e||!t||!n||!i||!a||a!==e[F(-78,-328)])return;let f=JSON[D(1399,1259)]([t[D(856,1187)],t[D(991,1240)][D(1010,1027)],t[F(-721,-397)][F(100,-33)],t[F(-376,-397)][D(1083,1104)],t[F(-263,-397)][F(87,-2)],t[F(119,-203)],t[D(941,1240)][D(1141,1237)],this[D(1357,1326)](),this[F(-326,-26)],this[F(-20,-62)][D(1232,1217)],this[D(1242,1166)](t)]);if(f===this[D(1322,1074)]){this[D(1823,1666)]();return}this[D(916,1074)]=f;let g=performance[D(1774,1690)](),_=a[D(1072,1169)],v=e[F(146,-156)],y=new Float32Array(_*3),b=new Float32Array(_),x=new Float32Array(_),S=new Uint8Array(_),C=new Float32Array(_*4),w=new Uint8Array(_),ee=Array(_),T=new Set,te=t[D(1424,1187)][D(1227,1063)]?t[F(-329,-450)][F(-478,-339)]:null,E=t[F(-314,-203)][D(1448,1187)],ne=Yt(v,te);function D(e,t){return $(t-198,e)}let re=new Map;for(let e=0;e<_;e++){let t=v[F(-155,-450)][e],r=c(n,t)[F(163,-107)];if(r[D(973,1128)]===D(1155,1096)){let e=l(t[D(1328,1097)],r[D(1218,1096)]);if(e!==null){let n=t[F(-393,-109)]+`|`+r[D(776,1096)],i=re[D(797,1052)](n);re[D(1039,1279)](n,i?[Math[D(1039,1106)](i[0],e),Math[D(1703,1503)](i[1],e)]:[e,e])}}}let ie=this[D(993,1044)]()?e[D(1460,1373)]:qt;for(let e=0;e<_;e++){let r=v[D(1511,1187)][e],a=c(n,r),s=t[D(1077,1187)][D(1070,1289)]||a[F(-273,-610)]===D(855,1201)?D(1310,1201):a[D(988,1027)];ee[e]=s===F(-640,-436)&&!this[D(1033,1036)]?F(-209,-365):s,ee[e]===F(-145,-436)&&T[F(-829,-532)](a[F(-546,-436)]),S[e]=+!!this[D(1104,1227)](r),y[F(-219,-358)](S[e]?o(u):o(a[F(-302,-203)]),e*3);let f=t[F(-262,-450)][D(1865,1684)];if(a[D(1363,1530)][D(1291,1128)]===D(1038,1096)){let e=l(r[F(-509,-540)],a[F(-158,-107)][F(-838,-541)]),t=re[F(-294,-585)](r[D(1449,1528)]+`|`+a[D(1544,1530)][D(1081,1096)]);e!==null&&t&&(f*=a[D(1425,1530)][F(-441,-531)]+(a[D(1741,1530)][F(-213,-134)]-a[D(1367,1530)][D(930,1106)])*d(e,t[0],t[1],a[F(-227,-107)][F(-83,-151)]))}if(te&&ne){let e=l(r[D(1270,1097)],te);e!==null&&(f*=.6+1.9*d(e,ne[0],ne[1],D(1518,1457)))}ie[D(1301,1231)](r.id)&&(f*=Ht),b[e]=f,w[e]=+!!this[D(1860,1546)](e,t,i)}this[F(-94,-42)]=b;let O={};O[D(1796,1631)]=!1,O[F(-197,-440)]=y,O.t=x,O[F(89,-188)]=S;let k=O;if(E[F(-716,-466)]===F(-282,-226)){let e=o(E[D(1404,1464)]);for(let t=0;t<_;t++)S[t]||y[F(-369,-358)](e,t*3)}else if(E[D(1043,1171)]===F(237,2)){k[D(1700,1631)]=!0;let e=E[F(93,-116)]??t[F(-260,-450)][F(-312,-339)],n=Yt(v,e);if(e&&n)for(let t=0;t<_;t++){let r=l(v[F(-763,-450)][t][F(-834,-540)],e);x[t]=r===null?0:d(r,n[0],n[1],F(306,15))}}else E[D(1332,1171)]!==D(1052,1083)&&this[D(1509,1467)](E[D(1318,1171)],t,i,k);if(this[D(935,1115)][D(1731,1623)][F(-665,-322)]=+!!k[D(1406,1631)],this[F(-360,-601)]&&T[F(-583,-388)]>0){let e=[...T][F(-142,-179)]()[F(-689,-606)](`,`);if(e!==this[F(282,-26)]||!this[D(1013,1288)]){let t=p(this[F(-739,-601)],T);this[D(1529,1288)]?.[D(1680,1596)](),this[D(1141,1288)]=new me(t[D(1426,1576)]),this[D(1208,1187)][F(-739,-600)](this[F(-462,-349)]),this[F(119,-26)]=e,this[F(-604,-372)]=t.uv}for(let e=0;e<_;e++){if(ee[e]!==D(1109,1201))continue;let t=this[F(-692,-372)][F(-353,-585)](c(n,v[D(1355,1187)][e])[F(-508,-436)]);t&&C[F(-395,-358)](t,e*4)}}else(T[F(-488,-388)]>0||t[D(1319,1187)][F(-316,-348)]||Object[D(1261,1273)](n[D(1056,1391)])[F(-387,-327)](e=>e[F(-613,-610)]===D(1289,1201)))&&this[F(119,-77)]();this[D(1363,1662)]=new Uint8Array(_),this[F(-377,-510)]=new Uint8Array(a[D(1697,1472)]),this[D(1502,1476)](),this[D(1433,1187)][D(1322,1165)]({count:_,prev:this[F(94,-189)],next:this[D(1487,1290)],group:i[D(1554,1630)],shape:e=>ee[e],color:y,scale:b,colorT:x,state:this[D(1435,1662)],iconUV:C,visible:w});let A=a[F(-474,-165)],j=new Float32Array(A*3),ae=new Float32Array(A),M=new Uint8Array(A),oe=new Float32Array(A),se=new Float32Array(A),ce=new Uint8Array(A),N=0;for(let e=0;ek[F(135,-6)]?m(de,x[e]):y[D(1337,1431)](e*3,e*3+3)},pe=e=>P[D(1491,1521)]?l(e[D(1067,1097)],P[D(1833,1521)]):r(e),I=1/0,L=-1/0;if(P[F(-217,-466)]===D(1702,1639))for(let e=0;e0&&(p*=d[F(162,-33)][F(-473,-531)]+(d[F(-66,-33)][D(1429,1503)]-d[D(1531,1604)][F(-433,-531)])*Math[F(-64,-180)](Math[F(-65,-134)](0,e)/N))}t[D(1322,1240)][D(916,1104)]&&N>0&&(p*=1+1.5*Math[F(132,-180)](r(i)/N)),ae[e]=p;let h=d[D(1615,1685)]===F(-340,-119)?t[F(-364,-397)][F(-683,-610)]:d[F(-277,48)];M[e]=le?3:Wt[h]??0}for(let e of a[F(-238,-333)][F(-239,-364)]()){let n=e[F(-26,-191)];e[D(1279,1158)]((e,r)=>{let i=a[s(1524,1254)][e],o=a[c(1315,1225)][e];function s(e,t){return D(e,t-84)}function c(e,t){return D(t,e-199)}if(i===o){se[e]=t[s(1352,1271)][c(1883,1560)]*3*(1+.5*r);return}if(n===1)return;let l=(r-(n-1)/2)*Math[s(1226,1190)](1,2/(n-1));oe[e]=i{if(this[n(1349,1297)])return;this[n(1156,1409)]=e,this[n(1194,1120)]=``;function n(e,n){return t(e-576,n)}this[n(1454,1721)]()})}[$(874,681)](){let e=this[r(-495,-486)];function t(e,t){return J(e-1014,t)}let n=this[t(735,902)];function r(e,t){return J(t- -192,e)}if(!e||!n)return null;let i=e[r(-235,-567)]?.[r(131,77)][t(890,1082)]??t(1139,1381),a=e[t(639,938)]?.[t(1283,1384)][t(954,820)]??t(1139,1418),o=new Float64Array(n[t(1068,855)]);for(let s=0;s=0?l(e[t(1077,1023)][r(-573,-423)][i][t(693,652)],a):null)??(o>=0?l(e[t(1077,1034)][t(783,945)][o][t(693,961)],a):null)}o[s]=u??NaN}return o}[$(834,1101)](e){function t(e,t){return $(e- -151,t)}function n(e,t){return $(t- -300,e)}return JSON[t(910,662)]([e[t(891,1114)][t(1279,1557)],e[t(891,619)][n(1067,854)],e[n(1004,742)][n(510,730)],e[n(606,742)][n(1469,1137)]])}[$(1168,844)](){let e=this[n(354,108)],t=this[a(192,433)];function n(e,t){return J(e-452,t)}let r=this[n(712,711)],i=this[n(158,430)];function a(e,t){return J(e-471,t)}if(!e||!t||!r||!i||!this[a(230,37)])return{phase:new Float32Array,duration:new Float32Array,dir:new Float32Array};let o=g(e[n(274,397)][a(681,392)]),c=this[a(551,516)](r),{period:l,travel:u}=_(e[n(274,232)][n(386,64)],o[n(85,388)]?Math[a(556,525)](1,c?.[a(732,396)]??1):1),d=o[n(400,291)]({edgeCount:t[n(506,538)],edgeSource:t[n(204,-25)],edgeTarget:t[n(150,-92)],edgeIds:t[a(603,766)],hops:c?.[n(279,-40)]??null,edgeHeight:o.id===a(561,625)?this[a(125,147)]():null,period:l,travel:u,spreadTies:e[n(274,-71)][a(281,165)]}),f=e[a(293,200)][a(688,633)]===a(611,681)?-1:1;for(let e=0;e=c[s(-1,325)]&&r<=c[e(244,421)]&&r>=0?4:8}for(let t=0;t{function n(e,t){return h(e-551,t)}function r(e,t){return h(t-1297,e)}e===void 0||d[n(686,488)]>=u||d[r(1335,1414)](e)||!this[r(1397,1370)][r(1585,1261)](e)||d[r(1745,1462)](e,t)};function p(e,t){return J(e-356,t)}this[h(298,30)]?.[h(14,-300)]===p(261,477)&&f(t[p(365,574)][p(-10,-272)](this[h(298,422)].id),!0),l!==void 0&&f(l,!0);for(let n of e[h(6,166)])f(t[h(313,189)][p(-10,-138)](n),!0);for(let e of a)f(t[h(313,505)][h(-62,-282)](e),!0);for(let t=0;t{function t(e,t){return J(e-2,t)}let n=this[r(908,1175)][r(735,921)]();this[t(293,355)].x=e[t(238,-90)]-n[r(687,652)];function r(e,t){return J(e-750,t)}this[t(293,-11)].y=e[r(643,380)]-n[t(12,-310)],this[r(1041,882)][t(31,52)]=!0,this[t(-339,-610)]=!0};[$(1215,1396)]=()=>{this[t(1441,1745)][e(1662,1970)]=!1;function e(e,t){return $(e-413,t)}function t(e,t){return $(e- -70,t)}this[e(1447,1681)](null)};[$(1155,1260)]=e=>{let t=this[n(1671,1546)][n(1106,1373)]();function n(e,t){return $(t-168,e)}let r={};r.x=e[n(1534,1624)]-t[n(1211,1325)];function i(e,t){return $(e-243,t)}r.y=e[n(1351,1281)]-t[i(1473,1473)],r[i(1658,1862)]=e[i(1658,1603)],this[n(1378,1449)]=r};[$(1455,1661)]=e=>{function t(e,t){return $(t- -1157,e)}let n=this[s(-126,-80)];if(this[s(139,-80)]=null,!n||n[s(315,54)]!==0)return;let r=this[t(67,221)][t(-228,48)](),i=e[t(271,299)]-r[t(114,0)],a=e[s(-466,-248)]-r[t(244,73)];if(Math[s(-553,-298)](i-n.x,a-n.y)>Rt)return;let o={};function s(e,t){return $(t- -1361,e)}o[t(-454,-113)]=e[t(167,-43)],o[t(155,-145)]=e[s(-339,-425)],o[s(87,105)]=e[t(-68,-86)],o[t(496,201)]=e[t(-15,35)],this[s(-370,-407)][s(-281,-134)](this[t(-113,-30)](i,a),o)};[$(1057,1139)]=e=>{function t(e,t){return J(t-1083,e)}function n(e,t){return J(t-407,e)}let r=this[n(537,565)][t(835,1068)]();this[n(188,141)][t(585,920)](this[n(343,314)](e[n(878,643)]-r[t(727,1020)],e[n(45,300)]-r[t(987,1093)]))};[$(1176,957)]=e=>{e[t(-194,-131)]();function t(e,t){return $(t- -1389,e)}let n=this[a(1469,1537)][a(1636,1364)](),r=e[t(-214,67)]-n[t(-304,-232)],i=e[a(1354,1272)]-n[t(-126,-159)];function a(e,t){return $(t-159,e)}this[a(1095,1113)][a(1404,1335)](this[a(1095,1286)](r,i),{x:r,y:i})};[$(1127,1025)](e,t){let n=this[i(551,630)];if(!n)return null;this[i(727,650)]();let r=this[i(657,560)][a(-251,-318)](this[a(-381,-431)][i(1011,1194)],e,t,this[a(-198,80)],this[a(101,19)]);if(this[i(766,911)]=!0,r<=0)return null;function i(e,t){return $(t- -311,e)}function a(e,t){return $(t- -1326,e)}if(r<=n[a(-551,-355)])return{kind:a(-33,-201),id:n[i(908,840)][r-1]};let o=r-n[a(-222,-355)]-1;return o{if(this[n(329,509)])return;this[a(181,333)]=requestAnimationFrame(this[n(347,432)]);let t=this[a(578,271)]===0?0:Math[n(206,-41)](.1,(e-this[a(71,271)])/1e3);function n(e,t){return J(e-518,t)}this[a(326,271)]=e;let r=this[n(520,639)];this[n(520,213)]=!1;let i=this[a(-257,-155)][n(324,177)](t);i&&(r=!0,this[a(-295,-171)]=this[n(809,642)][n(547,477)],this[n(252,22)][a(-42,-173)](this[a(-461,-140)]()));function a(e,t){return J(t-170,e)}if(this[n(181,126)]<1&&(this[a(35,-167)]=Math[a(-389,-142)](1,this[a(-258,-167)]+t/Lt),this[n(215,13)][a(-193,-5)][a(-144,67)]=Gt(this[n(181,97)]),r=!0),this[n(433,460)]()&&(this[a(-141,-109)]?.[a(140,224)]??0)>0&&(this[a(-373,-133)][n(235,331)][n(415,616)]=(this[a(-177,-133)][a(-113,-113)][n(415,418)]+t)%3600,r=!0),this[n(287,251)][n(588,796)]()&&(r=!0),this[a(129,-8)][a(-105,240)]()&&(r=!0),this[n(177,-58)]&&this[n(809,618)][a(74,199)]&&!this[a(121,231)]&&(Math[n(361,60)](this[a(548,461)].x-this[n(171,514)].x,this[n(809,724)].y-this[a(-287,-177)].y)>=zt||i||this[a(-207,-167)]<1)&&(this[n(177,268)]=!1,this[a(-174,-177)]={x:this[a(260,461)].x,y:this[n(809,685)].y},this[a(171,-16)](this[n(425,389)](this[n(809,950)].x,this[n(809,963)].y))),r){this[a(220,45)][a(149,-18)][n(428,199)](),this[n(259,-18)]();let e=this[a(134,417)]();e&&!this[a(111,131)]&&this[n(478,335)]();let r=e&&this[n(479,341)]!==null;r!==this[a(210,-48)]&&(this[n(300,296)]=r,this[n(215,334)][n(262,554)][n(415,155)]=+!!r,this[a(333,384)](r)),r&&this[a(-177,131)]?this[a(-87,131)][n(397,627)](t):this[a(42,45)][a(-149,49)](this[n(378,184)],this[n(193,201)][a(695,455)]),this[n(560,242)]++,this[n(433,726)]()&&t>0&&this[a(180,327)][a(300,55)](t*1e3)&&(this[a(-477,-174)]=``,this[a(72,-8)][a(308,29)](this[a(313,327)][n(146,395)][a(-17,323)]),this[n(214,457)](this[a(130,356)],this[a(-6,295)])),this[a(554,419)]&&(this[a(497,419)]=!1,this[a(-123,-88)][n(321,399)]=performance[n(790,929)]()-this[a(552,447)])}if(e-this[n(225,52)]>=Bt){let t=(e-this[n(225,-55)])/1e3,r=this[a(-15,45)][n(330,648)][a(317,49)];Object[a(355,256)](this[a(-294,-88)],{fps:this[n(225,-41)]===0?0:Math[a(195,175)](this[a(80,212)]/t),draws:r[a(182,-63)],triangles:r[n(733,950)],nodesDrawn:this[n(287,236)][a(551,459)],edgesDrawn:this[a(-143,-8)][a(263,139)],quality:this[n(675,790)][n(146,380)][n(134,238)]}),this[n(560,772)]=0,this[a(-190,-123)]=e,this[a(-439,-96)][a(28,-101)]({...this[a(226,-88)]})}};[J(247,506)](){function e(e,t){return J(t-1045,e)}let t=this[r(315,465)],n=this[e(432,766)]?.[e(833,1099)]??0;function r(e,t){return J(t-563,e)}return!!t&&t[r(534,838)][r(517,684)]&&this[e(1517,1202)][e(674,673)][e(1074,1166)]&&n>0&&n<=Vt}async[J(-40,-140)](){if(this[t(-106,-287)])return;function e(e,t){return J(t-531,e)}this[e(831,706)]=!0;function t(e,t){return J(e- -281,t)}try{let n=await a(()=>import(`./vendor-three-COuzUgS2.js`)[e(577,253)](e=>e.n),[],import.meta.url);if(this[e(267,342)])return;let r=new n[e(469,763)](this[t(-406,-263)]);r[t(-488,-418)](new n[t(-567,-725)](this[e(523,391)],this[e(343,206)][e(950,816)]));let i=new n[e(902,602)](this[t(-421,-631)],this[t(-606,-832)][t(4,142)],{intensity:this[e(721,433)]?.[e(600,806)][t(-142,152)]??1.2,luminanceThreshold:0,mipmapBlur:!0});i[e(691,535)]=!0,r[e(313,324)](new n[e(218,451)](this[e(-79,206)][e(736,816)],i)),r[t(-629,-822)](this[e(849,717)],this[e(438,656)]),this[t(-320,-188)]={render:e=>r[t(-402,-644)](e),setSize:(t,n)=>r[e(-99,183)](t,n),dispose:()=>{i[t(995,1310)]();function t(t,n){return e(n,t-286)}function n(t,n){return e(t,n-432)}r[n(1276,1141)]()},setSelection:t=>{function n(t,n){return e(t,n-918)}i[n(1305,1226)][n(1335,1056)]();for(let e of t)i[n(1348,1226)][n(1105,1136)](e)},setIntensity:e=>{function n(e,n){return t(n-564,e)}i[n(215,480)]=e}},this[e(642,492)][t(-324,-598)](this[e(319,353)][t(-640,-613)]()),this[t(-279,-14)]=!0}catch{}}[$(1398,1470)](){function e(e,t){return J(t-678,e)}this[n(356,252)]=!0,cancelAnimationFrame(this[e(959,841)]);let t=this[n(703,378)];t[e(678,965)](n(802,843),this[e(437,540)]),t[e(627,965)](n(647,527),this[e(432,613)]),t[e(648,965)](e(447,589),this[n(780,1061)]),t[e(1069,965)](n(515,619),this[e(492,673)]),t[n(832,1076)](n(710,592),this[e(746,515)]),t[e(957,965)](e(632,958),this[e(902,634)]),this[e(663,472)](),this[n(506,547)]?.[e(1169,856)](),this[n(314,71)][n(723,837)](),this[e(475,500)][e(900,856)](),this[e(1012,696)][e(631,856)](),this[e(500,653)][n(723,982)]();function n(e,t){return J(e-545,t)}this[n(196,257)][n(723,513)](),this[n(220,101)][n(723,863)](),this[e(654,548)]?.[e(682,856)](),this[e(506,375)][n(489,678)][e(902,575)][n(723,905)](),this[n(420,653)][e(784,856)]()}},qt=new Set;function Jt(e,t){function n(e,t){return J(e- -310,t)}function r(e,t){return J(t-1597,e)}if(e===t)return!0;if(e[r(1617,1428)]!==t[n(-479,-593)])return!1;for(let n of e)if(!t[r(1297,1410)](n))return!1;return!0}function Yt(e,t){if(!t)return null;function n(e,t){return $(e- -1369,t)}let r=1/0,i=-1/0;function a(e,t){return $(e- -874,t)}for(let o of e[a(115,112)]){let e=l(o[n(-470,-389)],t);e!==null&&(ei&&(i=e))}return Number[n(-18,306)](r)?[r,i]:null}export{je as n,Kt as t}; \ No newline at end of file diff --git a/website/static/graph-viz/chunks/Cb_SCBtG.js b/website/static/graph-viz/chunks/Cb_SCBtG.js new file mode 100644 index 00000000..d550204d --- /dev/null +++ b/website/static/graph-viz/chunks/Cb_SCBtG.js @@ -0,0 +1 @@ +(function(e,t){function n(e,t){return m(e-4,t)}function r(e,t){return m(t- -301,e)}let i=e();for(;;)try{if(parseInt(n(176,174))/1+parseInt(r(-137,-122))/2+-parseInt(r(-71,-88))/3*(-parseInt(n(212,213))/4)+-parseInt(r(-91,-77))/5*(-parseInt(n(203,212))/6)+parseInt(n(194,195))/7*(parseInt(n(196,188))/8)+parseInt(n(200,205))/9*(-parseInt(r(-133,-128))/10)+-parseInt(r(-81,-85))/11*(parseInt(r(-82,-107))/12)===t)break;i.push(i.shift())}catch{i.push(i.shift())}})(O,788881);import{C as e,D as t,E as n,M as r,O as i,S as a,T as o,k as s,w as c,x as l}from"./DtItaGi-.js";var u=[r],d=[p(157,176),p(165,164),p(150,170)];function f(e){function t(e,t){return p(t,e-837)}return u[t(1e3,1013)](t=>t.id===e)??u[0]}function p(e,t){return m(t- -25,e)}function m(e,t){e-=168;let n=O(),r=n[e];m.EHqZGf===void 0&&(m.yohWGT=function(e){let t=``,n=``;for(let n=0,r,i,a=0;i=e.charAt(a++);~i&&(r=n%4?r*64+i:i,n++%4)&&(t+=String.fromCharCode(255&r>>(-2*n&6))))i=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=`.indexOf(i);for(let e=0,r=t.length;ee.id));function o(e,t){return X(t- -541,e)}return{nodes:i,edges:m(e[o(-255,-172)])[o(-278,-182)](h)[n(235,166)](e=>p(e,r))[o(-128,-182)](g)[n(66,142)](e=>a[n(173,187)](e[o(-109,-48)])&&a[o(-75,-75)](e[n(60,77)]))}}function l(e){function t(e,t){return X(e- -159,t)}function n(e,t){return X(e-347,t)}return typeof e[t(330,401)]===n(820,888)&&Number[n(660,551)](e[n(836,923)])?e[n(836,746)]:0}function u(e,t){if(e.id===``)return!1;function n(e,t){return X(e-891,t)}function r(e,t){return X(t- -950,e)}return!!t&&t[r(-480,-571)][n(1308,1402)](t=>t[r(-622,-509)]===e[n(1332,1333)])}function d(e){let t=v(e.id);function n(e,t){return X(e-329,t)}function r(e,t){return X(e-785,t)}if(!t)return null;let i=v(e[n(770,648)])??r(1117,1213),a=m(e[n(799,881)])[r(1144,1079)](e=>typeof e===r(1140,1040)&&e!==``);return{id:t,type:i,labels:a[r(1100,1128)]>0?a:void 0,label:v(e[n(659,579)])??t,props:h(e[n(663,675)])?e[n(663,773)]:void 0}}function f(e,t){return X(e-502,t)}function p(e,t=[f(991,1044)]){let n=v(e.id);function r(e,t){return f(t- -777,e)}let i=v(e[c(413,376)]),a=v(e[r(85,78)]);if(!n||!i||!a)return null;let o=h(e[c(293,217)])?e[c(338,217)]:void 0,s;for(let n of t)if(s=_(e[n])??_(o?.[n]),s!==void 0)break;function c(e,t){return f(t- -619,e)}return{id:n,source:i,target:a,type:v(e[r(265,166)])??``,value:s,props:o}}function m(e){function t(e,t){return f(e- -1251,t)}return Array[t(-360,-456)](e)?e:[]}function h(e){function t(e,t){return f(t-103,e)}return typeof e===t(1075,1029)&&e!==null&&!Array[t(1097,994)](e)}function g(e){return e!==null}function _(e){function t(e,t){return f(t-249,e)}function n(e,t){return f(e- -863,t)}return typeof e===t(1183,1224)&&Number[n(-48,-151)](e)?e:void 0}function v(e){function t(e,t){return f(e- -147,t)}return typeof e===t(710,764)&&e!==``?e:void 0}function y(e,t){return X(t- -391,e)}function b(e){let t=e[a(218,186)](`#`,``),n=t[a(160,230)]===3?t[a(218,305)](/./g,e=>e+e):t[i(-523,-402)](6,`0`)[a(319,265)](0,6),r=Number[i(-259,-328)](n,16);if(!Number[a(158,195)](r))return[.5,.5,.5];function i(e,t){return f(t- -1354,e)}function a(e,t){return f(e- -657,t)}return[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255]}function ee([e,t,n]){let r=e=>Math[a(83,152)](Math[i(361,447)](1,Math[a(37,15)](0,e))*255)[i(439,429)](16)[i(428,377)](2,`0`);function i(e,t){return f(e- -490,t)}function a(e,t){return f(t- -865,e)}return`#`+r(e)+r(t)+r(n)}const x={};x.id=y(110,104),x[f(832,745)]=f(849,931),x[f(794,811)]=f(1032,1068),x[f(999,1050)]=[f(944,838),y(-69,16),y(-57,52),f(934,978),y(68,-37),f(874,995),f(921,946),y(52,76),y(-106,-74),y(96,116)];const S={};S.id=y(-21,53),S[y(-81,-61)]=y(173,90),S[f(794,819)]=y(87,139),S[y(199,106)]=[f(850,839),f(873,907),y(21,97),f(845,806),y(97,-5),f(876,940),y(-108,-82),y(41,-4),y(-49,-29),f(858,875)];const C={};C.id=y(0,-67),C[y(7,-61)]=y(123,18),C[y(-220,-99)]=y(95,139),C[f(999,1087)]=[y(-77,-11),f(936,917),f(894,787),y(-193,-103),y(-51,-64),y(149,67),y(191,77),f(879,827),f(925,888),y(118,63)];const w={};w.id=y(183,108),w[y(-53,-61)]=f(907,887),w[f(794,779)]=f(807,904),w[f(999,930)]=[y(-94,-88),y(46,6),y(133,118),f(963,928),y(204,100),y(-115,-70),y(-2,115),f(933,891),f(789,823),y(135,71)];var T=[x,S,C,w],te=y(29,104);function E(e){function t(e,t){return f(e- -134,t)}return T[t(686,751)](t=>t.id===e)??T[0]}function D(e,t){let n=e[o(110,32)],r=Math[o(-38,-129)](1,Math[c(-184,-302)](0,Number[c(-249,-331)](t)?t:0));if(e[o(-95,-42)]===o(-82,9))return b(n[Math[o(-38,-143)](n[c(-247,-248)]-1,Math[o(-54,-147)](r*n[c(-247,-223)]))]);let i=r*(n[c(-247,-165)]-1),a=Math[c(-213,-227)](n[c(-247,-339)]-2,Math[c(-229,-195)](i));function o(e,t){return f(e- -889,t)}let s=b(n[a]);function c(e,t){return f(e- -1064,t)}let l=b(n[a+1]),u=i-a;return[s[0]+(l[0]-s[0])*u,s[1]+(l[1]-s[1])*u,s[2]+(l[2]-s[2])*u]}function ne(e,t,n){if(n[i(-109,-95)]===r(793,778)){let t=n[r(934,970)];return b(t[(e%t[i(-122,-72)]+t[i(25,-72)])%t[i(-33,-72)]])}function r(e,t){return f(t- -29,e)}function i(e,t){return f(t- -889,e)}return D(n,t>1?e/(t-1):0)}function re(e,t=256){let n=new Uint8Array(t*4);function r(e,t){return f(e- -995,t)}for(let a=0;a>>0)%i[n(-600,-585)]]}var O=[y(-119,-16),f(799,870),f(897,1014),f(846,778),y(-190,-83)],ae=[y(41,-10),f(1019,1097),f(887,980),f(957,883)];function k(e,t={}){let n={};n[r(181,232)]=r(361,285);function r(e,t){return f(t- -562,e)}function i(e,t){return f(e- -86,t)}let a={color:ie(e),shape:i(791,729),icon:r(451,426),sizeRule:n,caption:null},o=t[e];return o?{...a,...o,sizeRule:{...o[r(242,346)]??a[i(822,833)]}}:a}function A(){let e={};function t(e,t){return f(t- -1490,e)}e[r(-189,-129)]=r(-136,-162),e[r(8,-78)]=1;let n={};function r(e,t){return f(e- -983,t)}return n[r(-80,-150)]=r(-79,-89),n[t(-471,-465)]=t(-439,-495),n[r(-98,-112)]=e,n[r(-85,37)]=t(-516,-607),n[r(-52,34)]=r(-44,37),n}function j(e,t={}){function n(e,t){return f(e-493,t)}let r={};for(let e of Object[n(1410,1338)](t))r[e]=k(e,t);for(let i of e?.[n(1374,1354)]??[])r[i[n(1436,1485)]]??=k(i[s(1328,1362)],t);let i={};for(let t of e?.[n(1320,1328)]??[])i[t[s(1356,1362)]]=A();let a={};a[s(1180,1213)]=s(1282,1266);let o={};function s(e,t){return f(t-419,e)}return o[n(1396,1469)]=s(1259,1323),o[n(1416,1364)]=s(1271,1296),o[n(1303,1242)]=s(1468,1407),o[s(1229,1327)]=a,o[n(1289,1261)]=null,{version:1,nodeTypes:r,relTypes:i,fallbackNode:o,fallbackRel:A()}}var M=new Map;function oe(e,t){let n=e[r(-40,57)][t[r(-7,91)]];if(n)return n;function r(e,t){return y(t,e- -57)}function i(e,t){return y(e,t- -379)}let a=M[i(-443,-410)](t[i(-219,-329)]);return!a&&(a=k(t[r(-7,-29)]),M[i(-448,-429)](t[i(-264,-329)],a)),a}function se(e,t){function n(e,t){return y(e,t-826)}function r(e,t){return y(t,e- -395)}return e[n(965,957)][t[r(-345,-240)]]??e[r(-480,-478)]}function ce(e,t){let n=e?.[t];if(typeof n===r(551,652)&&Number[i(1063,1131)](n))return n;if(typeof n===r(513,534)&&n!==``){let e=Number(n);return Number[r(544,492)](e)?e:null}function r(e,t){return y(e,t-570)}function i(e,t){return y(e,t-1209)}return null}function le(e,t,n,r){if(!(n>t))return .5;let i=e=>r===o(-88,-140)?Math[o(-199,-78)](Math[a(720,737)](0,e)):r===a(798,696)?Math[o(-66,-6)](Math[o(-109,-84)](0,e)):e;function a(e,t){return y(t,e-733)}function o(e,t){return y(e,t- -71)}let s=i(t),c=i(n);return c>s?Math[a(691,809)](1,Math[a(720,764)](0,(i(e)-s)/(c-s))):.5}var ue=/^#[0-9a-fA-F]{6}$/;function N(e,t){function n(e,t){return y(e,t- -527)}function r(e,t){return y(e,t-493)}return typeof e===r(568,457)&&ue[n(-712,-599)](e)?e:t}function P(e,t){function n(e,t){return f(t- -1363,e)}return typeof e===n(-456,-388)&&Number[n(-447,-548)](e)?e:t}function de(e){if(h(e)&&e[n(-319,-309)]===n(-84,-52)&&typeof e[n(-84,-6)]===t(556,614)&&e[t(728,786)]!==``){let r=e[n(-235,-245)]===t(680,762)||e[n(-235,-328)]===n(-289,-343)?e[t(695,635)]:t(743,715);return{kind:n(-84,-126),property:e[n(-84,-192)],min:P(e[n(-262,-210)],.6),max:P(e[t(545,637)],2.5),scale:r}}function t(e,t){return f(t- -243,e)}function n(e,t){return f(e- -1113,t)}let r={};return r[t(530,551)]=n(-266,-183),r}function fe(e,t){function n(e,t){return y(t,e- -509)}if(h(e)&&e[n(-608,-654)]===n(-373,-299)&&typeof e[n(-373,-351)]===n(-545,-627)&&e[r(-135,-81)]!==``)return{kind:n(-373,-279),property:e[r(-117,-81)],min:P(e[n(-551,-546)],.5),max:P(e[n(-522,-635)],4)};function r(e,t){return y(e,t- -217)}return h(e)&&e[n(-608,-575)]===r(-259,-263)?{kind:r(-353,-263),value:P(e[r(-3,-119)],1)}:t}function F(e,t){function n(e,t){return y(e,t-217)}function r(e,t){return y(t,e-210)}return h(e)?{color:N(e[n(225,227)],t[r(220,139)]),shape:O[n(171,144)](t=>t===e[n(294,247)])??t[r(240,216)],icon:typeof e[n(102,134)]===r(174,292)&&/^[a-z0-9-]+$/[r(138,17)](e[n(212,134)])?e[n(154,134)]:t[r(127,187)],sizeRule:de(e[r(225,274)]),caption:typeof e[r(113,187)]===n(178,181)&&e[n(141,120)]!==``?e[r(113,203)]:null}:t}function I(e,t){function n(e,t){return y(e,t-397)}if(!h(e))return t;function r(e,t){return y(t,e- -136)}let i=e[n(629,529)]===n(403,351)||e[n(569,529)]===n(338,359)||e[r(-4,-47)]===n(515,499)?e[r(-4,-33)]:t[r(-4,45)];return{color:N(e[n(481,407)],t[n(292,407)]),colorMode:i,width:fe(e[n(290,389)],t[n(276,389)]),lineStyle:ae[n(413,324)](t=>t===e[n(416,402)])??t[n(352,402)],flowDirection:e[n(341,435)]===n(381,469)?n(540,469):r(-90,-211)}}function pe(e,t={}){let n=j(null,t);if(!h(e))return n;let r={...n[i(-201,-167)]};if(h(e[a(-612,-575)]))for(let[n,a]of Object[i(-263,-349)](e[i(-201,-313)]))r[n]=F(a,k(n,t));function i(e,t){return f(e- -1111,t)}function a(e,t){return f(t- -1485,e)}let o={};if(h(e[a(-339,-461)]))for(let[t,n]of Object[i(-263,-366)](e[i(-87,-87)]))o[t]=I(n,A());return{version:1,nodeTypes:r,relTypes:o,fallbackNode:F(e[a(-566,-462)],n[a(-424,-462)]),fallbackRel:I(e[i(-303,-222)],n[i(-303,-237)])}}var me=1;function L(e,t={},n={}){let r=R[d(349,469)](e);if(r)return r;let s=n[d(627,555)]??null,c=n[l(194,131)]??{};function l(e,t){return y(t,e-91)}let u=a()(o(e=>({rendererId:s,rendererOptions:{...c},style:j(null,t),panelOpen:!0,openGroups:{},panelWidths:{},setRenderer:t=>e({rendererId:t}),setRendererOptions:(t,n)=>e(e=>({rendererOptions:{...e[d(558,603)],[t]:n}})),patchNodeStyle:(n,r)=>e(e=>({style:{...e[l(26,119)],nodeTypes:{...e[l(26,-86)][l(108,125)],[n]:{...e[l(26,-11)][l(108,147)][n]??k(n,t),...r}}}})),patchRelStyle:(t,n)=>e(e=>({style:{...e[d(547,435)],relTypes:{...e[d(473,435)][l(222,230)],[t]:{...e[l(26,-9)][d(606,631)][t]??A(),...n}}}})),resetNodeStyle:n=>e(e=>({style:{...e[l(26,-18)],nodeTypes:{...e[d(481,435)][l(108,83)],[n]:k(n,t)}}})),resetRelStyle:t=>e(e=>({style:{...e[d(517,435)],relTypes:{...e[l(26,56)][d(540,631)],[t]:A()}}})),resetStyle:()=>e({style:j(null,t)}),resetAll:()=>e({rendererOptions:{...c},style:j(null,t)}),setPanelOpen:t=>e({panelOpen:t}),setGroupOpen:(t,n)=>e(e=>({openGroups:{...e[d(489,593)],[t]:n}})),setPanelWidth:(t,n)=>e(e=>({panelWidths:{...e[l(29,30)],[t]:n}}))}),{name:e,version:me,storage:i(()=>n[d(597,562)]!==!1&&typeof localStorage!==l(172,133)?localStorage:he),partialize:e=>({rendererId:e[l(190,203)],rendererOptions:Object[d(519,513)](Object[l(46,139)](e[l(194,153)])[d(552,468)](([e,t])=>t!==c[e])),style:e[l(26,119)],panelOpen:e[d(523,522)],openGroups:e[l(184,285)],panelWidths:e[d(543,438)]}),migrate:e=>B(e,t,s,c),merge:(e,n)=>({...n,...B(e,t,s,c)})}));R[l(41,-27)](e,u);function d(e,t){return y(e,t-500)}return u}var R=new Map;const z={};z[f(852,816)]=()=>null,z[y(196,74)]=()=>{},z[f(1028,960)]=()=>{};var he=z;function B(e,t,n=null,r={}){function i(e,t){return y(e,t- -299)}function a(e,t){return y(e,t-574)}let o=h(e)?e:{},s={};if(h(o[a(770,667)]))for(let[e,t]of Object[a(428,529)](o[i(-241,-206)]))typeof t===a(557,635)&&(s[e]=t);let c={};if(h(o[i(-340,-361)]))for(let[e,t]of Object[a(476,529)](o[i(-402,-361)]))typeof t===a(730,656)&&Number[a(577,496)](t)&&(c[e]=t);return{rendererId:typeof o[i(-294,-200)]===a(621,538)?o[i(-195,-200)]:n,rendererOptions:{...r,...h(o[i(-97,-196)])?o[a(663,677)]:{}},style:pe(o[a(397,509)],t),panelOpen:typeof o[i(-336,-277)]!==a(513,635)||o[i(-270,-277)],openGroups:s,panelWidths:c}}var ge=n(),_e=y(107,114),ve=y(-55,45);function V(e={}){function t(e,t){return y(e,t-881)}function n(e,t){return y(e,t-84)}return{storageKey:e[n(166,50)]??t(986,893),nodeStyles:e[n(198,103)]??{},roleDescriptions:e[n(132,212)]??{},contextRoles:new Set(e[t(765,789)]??[]),isFlagged:e[t(870,991)]??(e=>e[t(706,824)]?.[t(872,790)]===!0),flaggedLabel:e[n(69,0)]??t(788,785),formatValue:e[t(942,860)]??(e=>e[t(998,918)]()),defaultRenderer:e[t(986,929)]??null,defaultRendererOptions:e[t(879,883)]??{},persist:e[t(969,943)]??!0}}var H=V(),U=(0,s[f(853,746)])(null);function ye({config:e,children:t}){let n=(0,s[a(1117,1028)])(()=>{let t=V(e),{storageKey:n,nodeStyles:r,defaultRenderer:i,defaultRendererOptions:o,persist:s}=t,c={};c[l(668,760)]=i;function l(e,t){return a(t,e- -443)}return c[l(716,637)]=o,c[l(675,779)]=s,{config:t,prefs:L(n,r,c)}},[e]);function r(e,t){return f(t-220,e)}let i={};i[r(1168,1211)]=n,i[r(1070,1155)]=t;function a(e,t){return f(t-163,e)}return(0,ge[r(1061,1090)])(U[r(1200,1113)],i)}function W(){function e(e,t){return f(e-30,t)}return(0,s[e(852,810)])(U)??{config:H,prefs:L(H[e(889,836)])}}function be(){function e(e,t){return f(t- -770,e)}return W()[e(243,189)]}function xe(e){function t(e,t){return f(t- -1199,e)}return r(W()[t(-412,-396)],e)}var Se=function(){function e(e,t){return f(t- -31,e)}let t=typeof document!==e(925,943)&&document[n(-165,-142)](n(-277,-364))[n(-303,-340)];function n(e,t){return f(e- -1115,t)}return t&&t[n(-97,-118)]&&t[e(1097,987)](e(748,870))?n(-214,-100):n(-135,-167)}(),Ce=function(e,t){function n(e,t){return y(t,e-102)}return new URL(e,t)[n(78,188)]},G={},K=function(e,t,n){function r(e,t){return y(e,t-819)}function i(e,t){return y(e,t-820)}let a=Promise[i(951,925)]();if(t&&t[r(623,743)]>0){let e=document[r(976,892)](i(728,765)),o=document[r(745,756)](i(1019,900)),s=o?.[i(894,878)]||o?.[i(832,740)](i(888,878));function c(e){function t(e,t){return r(e,t- -1199)}function n(e,t){return r(e,t- -762)}return Promise[t(-534,-473)](e[n(95,194)](e=>Promise[t(-299,-275)](e)[t(-378,-296)](e=>({status:t(-356,-349),value:e}),e=>({status:n(-79,3),reason:e}))))}function l(e){function t(e,t){return r(t,e-286)}return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url)[t(1081,1203)]}a=c(t[r(849,956)](t=>{function i(e,t){return r(e,t-383)}if(t=Ce(t,n),t=l(t),t in G)return;G[t]=!0;let a=t[o(-105,-18)](o(-314,-216));function o(e,t){return r(t,e- -1058)}for(let n=e[i(1104,1126)]-1;n>=0;n--){let r=e[n];if(r[i(1298,1178)]===t&&(!a||r[i(1265,1331)]===i(1203,1293)))return}let c=document[o(-182,-185)](o(-294,-226));if(c[o(-110,-116)]=a?o(-148,-122):Se,a||(c.as=o(-117,-101)),c[i(1167,1169)]=``,c[o(-263,-174)]=t,s&&c[o(-265,-307)](i(1184,1260),s),document[i(1156,1123)][o(-200,-304)](c),a)return new Promise((e,n)=>{c[r(866,965)](i(1132,1133),e);function r(e,t){return o(t-1293,e)}function i(e,t){return o(e-1410,t)}c[r(1026,965)](r(1147,1150),()=>n(Error(i(1194,1214)+t)))})})[i(886,788)](e=>e!==void 0))}function o(e){function t(e,t){return r(t,e- -416)}let n={};function i(e,t){return r(e,t- -871)}n[i(26,36)]=!0;let a=new Event(i(14,17),n);if(a[t(351,446)]=e,window[t(400,504)](a),!a[i(41,-23)])throw e}return a[i(959,904)](t=>{function n(e,t){return i(t,e- -833)}for(let e of t||[])e[n(98,-24)]===n(-67,-58)&&o(e[n(-40,-51)]);function r(e,t){return i(t,e- -188)}return e()[r(572,608)](o)})},we=f(988,872),q=null;function Te(){function e(e,t){return f(e- -263,t)}function t(e,t){return f(e-350,t)}return q??=K(()=>import(`./vendor-icons-Bc2MKLap.js`)[e(714,691)](e=>e.t)[t(1327,1351)](e=>{let n=new Map;for(let[t,a]of Object[i(-308,-201)](e[r(-311,-339)]))n[r(-405,-495)](Ee(t),a);function r(e,n){return t(e- -1598,n)}function i(e,n){return t(n- -1399,e)}return n}),[],import.meta.url),q}function Ee(e){function t(e,t){return f(e- -248,t)}function n(e,t){return f(e-396,t)}return e[t(627,711)](/([a-z0-9])([A-Z])/g,n(1202,1151))[t(627,729)](/([A-Z])([A-Z][a-z])/g,n(1202,1144))[t(627,744)](/([a-zA-Z])([0-9])/g,n(1202,1278))[t(731,626)]()}function J(e,t){function n(e,t){return f(t- -494,e)}return e[n(476,368)](t)??e[n(340,368)](n(535,494))??[]}function Y(e,t=0){let n=typeof e===r(538,619)?e:Number(e);function r(e,t){return y(e,t-537)}return Number[r(429,459)](n)?n:t}function X(e,t){e-=287;let n=$(),r=n[e];X.YOnpgg===void 0&&(X.JfIpOU=function(e){let t=``,n=``;for(let n=0,r,i,a=0;i=e.charAt(a++);~i&&(r=n%4?r*64+i:i,n++%4)&&(t+=String.fromCharCode(255&r>>(-2*n&6))))i=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=`.indexOf(i);for(let e=0,r=t.length;e{let i=n%r*Q;function o(e,t){return u(e,t- -312)}let l=Math[d(-66,-52)](n/r)*Q;function d(e,t){return u(e,t- -420)}Z(s,J(e,t),i+De,l+De,56,d(31,119));let f=r*Q,p=a*Q;c[o(160,64)](t,[i/f,1-(l+Q)/p,(i+Q)/f,1-l/p])});let d={};return d[u(507,564)]=o,d.uv=c,d}export{ee as C,u as D,l as E,h as O,re as S,c as T,te as _,K as a,b,ve as c,ae as d,O as f,se as g,oe as h,J as i,be as l,ce as m,Z as n,_e as o,le as p,Te as r,ye as s,Ae as t,xe as u,T as v,D as w,E as x,ne as y}; \ No newline at end of file diff --git a/website/static/graph-viz/chunks/DtItaGi-.js b/website/static/graph-viz/chunks/DtItaGi-.js new file mode 100644 index 00000000..78d83a6c --- /dev/null +++ b/website/static/graph-viz/chunks/DtItaGi-.js @@ -0,0 +1 @@ +(function(e,t){let n=e();function r(e,t){return R(e-858,t)}function i(e,t){return R(t-885,e)}for(;;)try{if(parseInt(r(1484,1452))/1+-parseInt(i(1555,1533))/2*(parseInt(r(1487,1531))/3)+-parseInt(r(1371,1443))/4*(parseInt(i(1403,1481))/5)+parseInt(i(1512,1521))/6+-parseInt(i(1469,1509))/7+parseInt(r(1421,1337))/8+-parseInt(r(1392,1306))/9*(-parseInt(i(1479,1388))/10)===t)break;n.push(n.shift())}catch{n.push(n.shift())}})(Re,337644);import{O as e,_ as t,f as n,v as r}from"./DJgKbydu.js";function i(e,t){return e=0&&nr)){if(u)for(let r=e[l(1412,1414)][t];r>>13,t=Math[r(1416,1476)](t,1540483477),t^=t>>>15;function n(e,t){return R(e- -195,t)}function r(e,t){return R(e-829,t)}return(t>>>0)/4294967296}function f(e){function t(e,t){return R(e- -101,t)}return{phase:new Float32Array(e),duration:new Float32Array(e),dir:new Float32Array(e)[t(389,379)](1)}}var p=[{id:C(-175,-97),label:C(-226,-168),description:X(-176,-177),schedule({edgeCount:e,edgeIds:t,travel:n}){let r=f(e);function i(e,t){return X(t,e-617)}function a(e,t){return X(e,t-614)}for(let o=0;os&&(s=r[e]);let c=Math[o(722,729)](1,s),l=i/c;for(let i=0;il&&(l=e))}let u=Math[s(206,153)](0,r-i);for(let r=0;rc?(e-c)/(l-c):0:1,p=a?d(t[r])*i*.25:0;o[m(1462,1392)][r]=Math[s(196,203)](f*u+p,u),o[m(1382,1318)][r]=i}let p={...o};p[s(208,229)]=r;function m(e,t){return X(e,t-1423)}return p}}];function m(e){function t(e,t){return X(e,t-207)}return p[t(101,139)](t=>t.id===e)??p[0]}function ee(e,t){function n(e,t){return X(e,t-1242)}function r(e,t){return X(t,e-1439)}let i=6/Math[n(1158,1219)](.05,e);return{period:i,travel:Math[n(1213,1209)](i*.35,i/Math[r(1416,1504)](1,t))}}var te=Math.PI*(3-Math[C(-250,-162)](5));function h(e,t){let n=e*2654435761^t;n=Math[r(-121,-206)](n^n>>>16,2246822507),n=Math[r(-280,-206)](n^n>>>13,3266489909);function r(e,t){return C(t- -63,e)}return((n^n>>>16)>>>0)/4294967296*Math.PI*2}var g={id:X(-140,-87),label:X(-75,-45),description:C(-128,-166),place({hop:e,radius:t,count:n,seed:r},i){function a(e,t){return C(e-137,t)}if(n===0)return;if(t===0){i[a(-103,-80)](0,0,n*3);return}function o(e,t){return C(e-1250,t)}let s=h(e,r);for(let e=0;et===e)??n}function le(e,t){function n(e,t){return X(e,t-628)}function r(e,t){return X(t,e-857)}return typeof e===n(671,614)&&ce[r(661,663)](e)?e:t}function ue(e){function t(e,t){return C(t-653,e)}return typeof e===t(516,572)&&e!==``?e:null}function de(e,t){function n(e,t){return X(e,t-931)}return typeof e===n(925,917)&&e!==``?e:t}function fe(e,t,n){function i(e,t){return X(t,e-1186)}let a=w(e);function o(e,t){return X(e,t-1422)}return{mapping:D(a[o(1463,1403)],t,n[i(1167,1103)]),palette:typeof a[i(1064,1083)]===i(1172,1196)&&r[i(1075,1136)](e=>e.id===a[o(1364,1300)])?a[i(1064,999)]:n[i(1064,1044)],heatmapProperty:ue(a[o(1327,1255)])}}function pe(e,t,r,i){let a=w(e),o=w(a[d(703,669)]),s=w(a[l(-281,-360)]),c=w(a[d(594,645)]);function l(e,t){return X(t,e- -171)}let u=w(a[l(-326,-334)]);function d(e,t){return X(e,t-813)}let f=w(a[d(704,618)]),p=w(a[l(-277,-233)]);return{version:1,nodes:{scaleByValue:E(o[d(861,773)],t[l(-315,-226)][d(717,773)]),valueProperty:ue(o[l(-305,-283)]),baseSize:T(o[l(-299,-314)],t[l(-315,-389)][l(-299,-312)],.1,20),showIcons:E(o[d(779,762)],t[d(689,669)][l(-222,-178)]),labelBudget:Math[l(-306,-229)](T(o[d(596,638)],t[l(-315,-301)][d(604,638)],0,200)),impostorThresholdPx:T(o[d(776,715)],t[d(688,669)][l(-269,-188)],0,50)},edges:{mode:D(s[l(-345,-263)],[d(688,740),d(688,701)],t[l(-281,-224)][l(-345,-410)]),shape:D(s[d(691,759)],[d(748,722),d(601,689),l(-254,-241),l(-328,-253)],t[d(710,703)][l(-225,-273)]),flowDirection:D(s[d(684,711)],[d(580,652),d(648,637)],t[l(-281,-219)][l(-273,-181)]),speed:T(s[l(-209,-185)],t[l(-281,-221)][d(743,775)],.1,3),trailLength:T(s[l(-243,-155)],t[l(-281,-260)][l(-243,-280)],.1,1),cometWidth:T(s[l(-257,-289)],t[l(-281,-267)][l(-257,-267)],.25,10),width:T(s[d(574,667)],t[d(614,703)][d(698,667)],.2,10),widthByValue:E(s[l(-187,-261)],t[l(-281,-334)][d(829,797)]),scheduler:typeof s[l(-362,-455)]===l(-185,-217)?s[l(-362,-278)]:t[d(795,703)][d(631,622)],spreadTies:E(s[l(-199,-271)],t[l(-281,-203)][l(-199,-182)]),pickAnimatedEdges:E(s[l(-313,-348)],t[d(732,703)][l(-313,-226)])},color:{nodes:{...fe(c[l(-315,-237)],r,t[d(577,645)][l(-315,-384)]),uniformColor:le(w(c[d(616,669)])[l(-217,-233)],t[l(-339,-371)][d(714,669)][l(-217,-140)])},edges:fe(c[d(683,703)],i,t[l(-339,-248)][d(791,703)])},camera:{autoRotate:E(u[l(-227,-250)],t[l(-326,-343)][l(-227,-293)]),autoRotateSpeed:T(u[d(725,676)],t[d(673,658)][d(708,676)],0,2),offsetX:T(u[d(715,788)],t[d(575,658)][d(816,788)],-.5,.5)},focus:{dimming:T(f[d(669,697)],t[l(-366,-300)][l(-287,-352)],0,1),nodeColor:le(f[d(865,772)],t[d(555,618)][l(-212,-188)]),nodeShape:f[l(-230,-195)]===l(-266,-340)?d(738,718):D(f[l(-230,-243)],n,l(-214,-185)),maxHops:Math[l(-306,-217)](T(f[l(-318,-269)],t[d(710,618)][d(618,666)],1,20))},effects:{glow:E(p[d(654,642)],t[l(-277,-293)][l(-342,-378)]),glowIntensity:T(p[d(768,738)],t[l(-277,-234)][d(713,738)],0,5),statsHud:E(p[l(-233,-183)],t[d(776,707)][d(671,751)]),reducedMotion:D(p[l(-329,-367)],[l(-297,-247),`on`,l(-363,-368)],t[l(-277,-277)][d(633,655)]),background:le(p[l(-364,-443)],t[l(-277,-239)][d(526,620)])}}}var me=[0,1,0];function O(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function k(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function A(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function j(e){let t=Math[n(173,102)](e[0],e[1],e[2]);function n(e,t){return C(t-308,e)}return t>0?[e[0]/t,e[1]/t,e[2]/t]:[0,0,0]}function he(e){let t={};t[r(783,795)]=[e[n(1257,1198)][0],e[r(795,795)][1],e[n(1257,1269)][2]];function n(e,t){return X(t,e-1421)}t.up=[e.up[0],e.up[1],e.up[2]];function r(e,t){return X(e,t-959)}return t}function ge(e){function t(e,t){return X(t,e-1204)}let n=j(e[t(1040,1111)]),r=j(k(e.up,n));return[r,k(n,r),n]}function _e(e,t){return{x:O(e[0],t),y:-O(e[1],t),depth:O(e[2],t)}}function ve(e,t=.001){let n=j(e),r=0;for(let e=1;e<3;e++)Math[o(-246,-178)](n[e])>Math[i(179,86)](n[r])&&(r=e);function i(e,t){return X(e,t-218)}if(Math[i(95,86)](n[r])<1-t)return null;let a=[0,0,0];function o(e,t){return X(e,t- -46)}return a[r]=Math[o(-264,-234)](n[r]),a}function ye(e,t=.001){function n(e,t){return C(t-375,e)}let r=ve(e[n(174,144)],t),i=ve(e.up,t);return r&&i?{face:r,up:i}:null}function be(e,t){let[n,,r]=ge(e);return{direction:r,up:A(n,-t)}}function xe(e,t,n){let r=Math[i(23,18)](n);function i(e,t){return C(t-155,e)}let a=Math[i(24,-55)](n),o=O(t,e)*(1-r),s=k(t,e);return[e[0]*r+s[0]*a+t[0]*o,e[1]*r+s[1]*a+t[1]*o,e[2]*r+s[2]*a+t[2]*o]}function Se(e,t,n){function r(e,t){return X(t,e- -159)}return{direction:xe(e[r(-323,-329)],t,n),up:xe(e.up,t,n)}}function Ce(e,t){return Se(e,me,t)}function we(e,t){function n(e,t){return C(t-787,e)}let[r,i,a]=ge(e);function o(e,t){return C(e-234,t)}switch(t){case`up`:return{direction:i,up:A(a,-1)};case n(752,657):return{direction:A(i,-1),up:a};case n(526,536):let e={};return e[o(3,0)]=r,e.up=i,e;case n(707,641):return{direction:A(r,-1),up:i}}}const M={};M[C(-132,-155)]=C(-190,-212),M[C(-218,-152)]=[],M[X(7,-18)]=X(-141,-154),M[C(-236,-239)]=C(-90,3);const N={};N[X(-114,-65)]=C(-190,-186),N[X(-233,-151)]=[C(-84,-108)],N[C(-85,-5)]=X(-137,-53),N[X(-132,-169)]=C(-90,-177);const P={};P[C(-132,-209)]=C(-190,-272),P[C(-218,-232)]=[X(-161,-71),C(-84,-88)],P[X(-106,-18)]=C(-223,-171),P[C(-236,-321)]=X(-63,-23);const F={};F[C(-132,-169)]=C(-146,-136),F[C(-218,-276)]=[],F[X(-78,-18)]=C(-120,-163),F[C(-236,-315)]=C(-200,-145);const I={};I[X(-42,-65)]=X(-103,-79),I[C(-218,-201)]=[C(-89,-176)],I[X(-39,-18)]=C(-221,-280),I[C(-236,-171)]=X(-104,-133);const Te={};Te[X(-182,-151)]=[],Te[X(17,-38)]=1,Te[C(-236,-150)]=C(-90,-36);const Ee={};Ee[C(-218,-243)]=[C(-138,-167)],Ee[C(-105,-71)]=3,Ee[C(-236,-142)]=X(-75,-23);const L={};L[C(-218,-228)]=[C(-84,-39)],L[X(-45,-38)]=.3,L[C(-236,-211)]=X(-24,-23);function R(e,t){e-=462;let n=Re(),r=n[e];R.QRpkeu===void 0&&(R.JqIaDL=function(e){let t=``,n=``;for(let n=0,r,i,a=0;i=e.charAt(a++);~i&&(r=n%4?r*64+i:i,n++%4)&&(t+=String.fromCharCode(255&r>>(-2*n&6))))i=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=`.indexOf(i);for(let e=0,r=t.length;ee[n(1384,1416)](t))}function Ge(e,t,n){function r(e,t){return C(e-1063,t)}let i=e[a(443,434)][r(928,1009)](e=>e[r(931,987)]===t&&We(n,e[r(845,780)]));if(i)return i[r(978,1006)];function a(e,t){return C(e-554,t)}return e[r(952,920)][r(928,906)](e=>e[r(931,863)]===t&&e[a(336,314)][r(844,753)]===0)?.[r(978,1001)]??a(413,425)}function Ke(e,t){function n(e,t){return C(e-1625,t)}function r(e,t){return C(e-742,t)}return e[n(1439,1489)][r(607,668)](e=>We(t,e[n(1407,1424)]))?.[n(1520,1478)]??1}function qe(e){let t=e[r(-402,-458)]??``,n=/^Key([A-Z])$/[i(1539,1517)](t)?.[1]?.[i(1552,1616)]()??Ye[t];function r(e,t){return C(e- -182,t)}function i(e,t){return C(e-1699,t)}let a=e[i(1608,1680)][i(1480,1566)]===1?e[r(-273,-286)][r(-329,-328)]():e[i(1608,1593)];return n&&!/^[a-z[\]]$/[i(1436,1516)](a)?n:a}const Je={};Je[C(-125,-90)]=`[`,Je[C(-267,-256)]=`]`;var Ye=Je;function Xe(e,t,n){function r(e,t){return C(e-583,t)}function i(e,t){return C(t-346,e)}let a=t[i(86,127)]===1?t[i(104,199)]():t;return e[r(484,571)][r(448,423)](e=>e[i(206,255)]===a&&We(n,e[r(365,274)]))?.[r(450,408)]??null}export{de as A,ne as C,T as D,pe as E,m as F,ee as I,s as L,g as M,h as N,D as O,p as P,c as R,re as S,le as T,_e as _,He as a,Se as b,me as c,he as d,k as f,Ce as g,j as h,Ue as i,te as j,w as k,we as l,ye as m,Xe as n,Ke as o,O as p,qe as r,Ve as s,Ge as t,ge as u,be as v,E as w,se as x,A as y,u as z}; \ No newline at end of file diff --git a/website/static/graph-viz/chunks/ofo-YUoe.js b/website/static/graph-viz/chunks/ofo-YUoe.js new file mode 100644 index 00000000..42279cb1 --- /dev/null +++ b/website/static/graph-viz/chunks/ofo-YUoe.js @@ -0,0 +1 @@ +function e(t,n){t-=387;let r=i(),a=r[t];e.mBUdxv===void 0&&(e.tnQyOj=function(e){let t=``,n=``;for(let n=0,r,i,a=0;i=e.charAt(a++);~i&&(r=n%4?r*64+i:i,n++%4)&&(t+=String.fromCharCode(255&r>>(-2*n&6))))i=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=`.indexOf(i);for(let e=0,r=t.length;ee[B(1240,1205)]),P=h(t,e=>e[B(1196,1195)]),F=h(t,e=>e[z(-469,-505)]),I=(0,y[z(-604,-575)])(void 0),L=(0,y[z(-627,-575)])(null),[R,te]=(0,y[B(1205,1239)])(null);function z(t,n){return e(n- -969,t)}function B(t,n){return e(t-717,n)}let[V,ne]=(0,y[B(1205,1148)])(null),H=(0,y[z(-524,-575)])(!1),U={};U.x=0,U.y=0;let W=(0,y[z(-503,-575)])(U),G={};G.id=null,G.at=0;let K=(0,y[z(-614,-575)])(G);(0,y[B(1192,1210)])(()=>{if(!r[t(-251,-259)]&&!Object[i(1344,1354)](n[i(1344,1295)])[t(-270,-319)](e=>e[t(-307,-353)]===t(-249,-317)))return;let e=!0;function t(e,t){return z(t,e-207)}function i(e,t){return z(e,t-1814)}return m()[i(1298,1245)](t=>{e&&ne(t)}),()=>{e=!1}},[r[z(-396,-458)],n]),(0,y[z(-478,-494)])(()=>(j({fit:n=>{function r(t,n){return e(n- -871,t)}function i(t,n){return e(n-177,t)}let a=t[i(664,695)]()[i(647,656)];n===i(620,608)&&a[r(-449,-442)]>0?I[i(703,697)]?.[i(578,600)](400,50,e=>a[i(678,613)](String(e.id))):I[i(741,697)]?.[i(597,600)](400,50)}}),()=>j(null)),[j,t]);let{graphData:q,maxValue:J,neighborIds:re,nodeColor:Y}=(0,y[z(-456,-468)])(()=>{let e=new Set(N[b(490,423)][x(1280,1244)](e=>e.id)),r=new Map,i=new Map,o=0,s=[];for(let t of N[x(1219,1220)]){if(!e[b(348,400)](t[x(1229,1163)])||!e[b(468,400)](t[x(1192,1249)]))continue;let n=a(t);n>o&&(o=n),r[b(354,408)](t[x(1209,1163)],(r[b(444,490)](t[b(394,354)])??0)+1),r[x(1241,1217)](t[b(406,440)],(r[x(1302,1299)](t[b(370,440)])??0)+1),i[b(373,400)](t[b(408,354)])||i[x(1146,1217)](t[x(1098,1163)],new Set),i[x(1250,1209)](t[b(453,440)])||i[b(452,408)](t[b(410,440)],new Set),i[x(1249,1299)](t[b(290,354)])?.[x(1225,1234)](t[x(1227,1249)]),i[x(1259,1299)](t[x(1300,1249)])?.[b(416,425)](t[b(295,354)]),s[b(362,375)]({id:t.id,source:t[b(419,354)],target:t[b(430,440)],type:t[x(1214,1216)],weight:n,role:_(t[x(1248,1200)])})}let l=ee(n,N[b(445,423)]),d=new Map,m=S[x(1280,1299)](t)??new Map,h=new Map,g=N[b(367,423)][b(453,435)](e=>{let t=c(n,e),i=M[g(-49,-110)](e);d[_(456,498)](e.id,i?f:t[g(-8,-76)]);let a=1;if(t[_(399,377)][g(-135,-203)]===g(-84,-84)){let n=u(e[g(-240,-173)],t[_(399,404)][_(528,483)]),r=l[g(-144,-74)](e[g(-110,-157)]+`|`+t[g(-270,-213)][_(528,566)]);n!==null&&r&&(a=t[g(-285,-213)][_(458,397)]+(t[_(399,390)][_(442,372)]-t[g(-271,-213)][_(458,518)])*p(n,r[0],r[1],t[_(399,439)][g(-130,-188)]))}let o=t[g(-199,-182)]&&e[_(439,434)]?.[t[g(-248,-182)]]!==void 0?String(e[_(439,511)][t[_(430,389)]]):e[g(-139,-103)]||e.id,s=m[_(538,510)](e.id)??{id:e.id,label:o,type:e[_(455,499)],props:e[_(439,505)],degree:0,scale:a,flagged:i};s[g(-80,-103)]=o;function g(e,t){return x(e,t- -1373)}s[_(455,409)]=e[_(455,464)],s[_(439,455)]=e[g(-217,-173)];function _(e,t){return x(t,e- -761)}return s[g(-206,-165)]=r[g(-141,-74)](e.id)??0,s[g(-245,-188)]=a,s[_(450,487)]=i,h[g(-195,-156)](e.id,s),s});S[x(1221,1217)](t,h);let v={};v[x(1286,1232)]=g,v[b(466,453)]=s;let y={};y[b(429,418)]=v;function b(e,t){return z(e,t-933)}function x(e,t){return z(e,t-1742)}return y[x(1167,1181)]=o,y[x(1332,1277)]=i,y[b(316,353)]=d,y},[N,n,t,M]);(0,y[z(-534,-494)])(()=>{function e(e,t){return B(t- -920,e)}H[e(247,317)]=!1},[N]);let ie=q[z(-490,-510)][z(-485,-489)];function X(e){function t(e,t){return B(e- -1382,t)}return R?e.id===R.id||(re[t(-139,-157)](R.id)?.[t(-229,-193)](e.id)??!1):!1}function ae(e,t,i){let a=e.x??0,s=e.y??0,u=E(e,M);function f(e,t){return B(t- -121,e)}let p=c(n,e),m=e[y(-448,-475)],h=e[y(-543,-486)]?.[f(1079,1013)]===f(981,986)||F[f(965,1032)](e.id),_=T(e,M),v=R!==null&&!X(e);function y(e,t){return B(t- -1630,e)}let b=Y[f(1116,1122)](e.id)??p[y(-364,-389)];if(t[y(-359,-408)](),t[y(-460,-503)]=v?.15:_?.55:1,m&&(t[y(-475,-460)](),t[f(930,984)](a,s,u+4,0,2*Math.PI),t[f(986,1017)]=y(-397,-436),t[f(964,1003)]()),p[f(980,1051)]===f(1152,1109)&&V)t[y(-467,-460)](),t[y(-585,-525)](a,s,u,0,2*Math.PI),t[f(1036,1017)]=y(-404,-448),t[f(942,1003)](),d(t,l(V,p[y(-450,-400)]),a-u,s-u,u*2,b);else if(t[f(1042,1017)]=b,D(t,p[y(-501,-458)],a,s,u),t[y(-553,-506)](),r[y(-472,-402)]&&V&&u*i>9){let e=u*1.1;d(t,l(V,p[f(1101,1109)]),a-e/2,s-e/2,e,y(-428,-448))}h&&(t[y(-366,-388)]=o,t[y(-452,-446)]=1,t[f(1045,1049)](),t[y(-579,-525)](a,s,u+2,0,2*Math.PI),t[f(1089,1022)]()),P[f(1027,1032)](e.id)&&(t[f(1126,1121)]=f(1091,1083),t[f(1119,1063)]=1.8,t[f(984,1049)](),t[f(930,984)](a,s,u+2.5,0,2*Math.PI),t[f(1022,1022)]()),R?.id===e.id&&(t[f(1146,1121)]=y(-424,-426),t[f(1014,1063)]=.8,t[y(-523,-460)](),t[y(-531,-525)](a,s,u+1.2,0,2*Math.PI),t[y(-449,-487)]());let x=R!==null&&X(e);(r[y(-447,-419)]===f(1160,1104)||r[y(-410,-419)]===f(1110,1047)&&(_?i>2.2||x:ie<=25||i>1.4||x))&&(t[f(1059,1065)]=Math[f(998,1042)](11/i,5)+y(-503,-499),t[y(-436,-468)]=f(1082,1021),t[f(1016,1052)]=f(1088,1126),t[f(1026,1017)]=m?f(1093,1124):y(-403,-399),t[y(-525,-514)](g(e[f(1116,1093)]),a,s+u+1.5)),t[f(997,1009)]()}function oe(e,t,n){n[r(1133,1100)]=t,n[i(803,859)]();function r(e,t){return B(t- -38,e)}function i(e,t){return B(e- -367,t)}n[i(738,677)](e.x??0,e.y??0,E(e,M)+2,0,2*Math.PI),n[i(757,738)]()}function se(e){let t=C(e[r(437,491)]);function r(e,t){return B(e- -670,t)}function i(e,t){return B(t- -1711,e)}let a=C(e[i(-463,-518)]);if(R!==null&&(t===R.id||a===R.id))return i(-594,-546);if(R)return r(450,497);let o=s(n,e),c=o[r(568,607)]===i(-587,-526)?o[i(-532,-470)]:Y[i(-448,-468)](o[i(-485,-473)]===i(-650,-604)?t:a)??o[i(-443,-470)];return e[i(-539,-577)]===r(452,442)?O(c,.85):O(c,e[r(464,480)]&&M[r(520,562)][r(483,482)](e[r(464,395)])?.3:.5)}function ce(e){function t(e,t){return B(e- -215,t)}let r=s(n,e);if(r[i(856,924)][i(966,926)]===i(1015,997)&&J<=0)return .8*r[i(901,924)][t(898,866)];function i(e,t){return B(t- -188,e)}let a=J<=0?.8:.6+3.4*Math[t(917,847)](e[t(985,923)]/J);return r[t(897,876)][i(893,926)]===t(970,924)?a*r[t(897,909)][t(898,940)]:a}function le(e){function t(e,t){return z(t,e-62)}if(r[t(-487,-546)]&&e[a(179,224)]&&M[t(-434,-503)][t(-471,-464)](e[t(-490,-493)]))return[2,1.5];let i=s(n,e)[a(219,285)];if(i===t(-395,-417))return[3,2];if(i===t(-474,-502))return[.6,1.6];function a(e,t){return z(e,t-776)}return null}function Z(e){function t(e,t){return z(e,t-392)}let n=L[t(-69,-57)]?.[r(1232,1227)]();function r(e,t){return z(t,e-1710)}return n?{x:e[t(-41,-62)]-n[r(1213,1273)],y:e[t(-83,-82)]-n[r(1271,1211)]}:W[r(1261,1241)]}function Q(e,t,n){function r(e,t){return z(e,t-989)}function i(e,t){return z(e,t-1767)}let a=e?.[i(1126,1195)]===i(1130,1200)?e.id:null,o=performance[r(400,459)]();if(K[r(497,540)].id===a&&o-K[r(568,540)].at{let t=e[i(1219,1273)][i(1187,1258)]();function n(e,t){return z(e,t-1011)}let r={};r.x=e[n(508,557)]-t[n(556,514)];function i(e,t){return z(e,t-1736)}r.y=e[i(1203,1262)]-t[n(565,572)],W[i(1253,1287)]=r},children:(0,b[B(1110,1082)])(v,{ref:I,graphData:q,width:i,height:k,backgroundColor:z(-567,-560),minZoom:.05,maxZoom:12,warmupTicks:30,autoPauseRedraw:!1,nodeLabel:()=>``,linkLabel:()=>``,nodeCanvasObject:ae,nodePointerAreaPaint:oe,onNodeHover:e=>{te(e);function t(e,t){return B(e- -1272,t)}function n(e,t){return B(t- -587,e)}A[t(-52,12)](e?{kind:n(543,532),id:String(e.id)}:null,W[n(684,650)])},onLinkHover:e=>{function t(e,t){return z(e,t-669)}if(R)return;function n(e,t){return z(e,t-829)}A[t(167,203)](e?{kind:t(81,152),id:e.id}:null,W[n(364,380)])},onNodeClick:(e,t)=>Q({kind:z(-504,-567),id:String(e.id)},t,e),onLinkClick:(e,t)=>A[B(1216,1225)]({kind:B(1169,1124),id:e.id},w(t)),onBackgroundClick:e=>Q(null,e),onNodeRightClick:(e,t)=>A[z(-426,-452)]({kind:B(1119,1076),id:String(e.id)},Z(t)),onLinkRightClick:(e,t)=>A[z(-402,-452)]({kind:B(1169,1150),id:e.id},Z(t)),onBackgroundRightClick:e=>A[z(-431,-452)](null,Z(e)),linkColor:se,linkWidth:ce,linkLineDash:le,linkDirectionalArrowLength:e=>r[B(1174,1176)]||s(n,e)[z(-518,-491)]===z(-564,-512)?3:0,linkDirectionalArrowRelPos:1,linkDirectionalParticles:e=>r[B(1199,1257)]&&e[B(1134,1103)]===B(1122,1096)?2:0,linkDirectionalParticleWidth:2.2,linkDirectionalParticleSpeed:.005,linkDirectionalParticleColor:()=>z(-494,-511),onEngineStop:()=>{function e(e,t){return B(t- -562,e)}function t(e,t){return B(t-101,e)}!H[t(1284,1338)]&&(H[e(690,675)]=!0,I[e(625,675)]?.[e(571,578)](400,50))}})})}export{k as default}; \ No newline at end of file diff --git a/website/static/graph-viz/chunks/vendor-three-COuzUgS2.js b/website/static/graph-viz/chunks/vendor-three-COuzUgS2.js new file mode 100644 index 00000000..85717498 --- /dev/null +++ b/website/static/graph-viz/chunks/vendor-three-COuzUgS2.js @@ -0,0 +1,5166 @@ +import{n as e}from"./1rRgETmZ.js";var t=1e3,n=1001,r=1002,i=1003,a=1004,o=1005,s=1006,c=1007,l=1008,u=1009,d=1010,f=1011,p=1012,m=1013,h=1014,g=1015,_=1016,v=1017,y=1018,b=1020,x=35902,S=35899,C=1021,w=1022,T=1023,E=1026,D=1027,O=1028,ee=1029,k=1030,A=1031,te=1033,ne=33776,j=33777,re=33778,M=33779,ie=35840,ae=35841,oe=35842,se=35843,ce=36196,le=37492,ue=37496,N=37488,de=37489,fe=37490,pe=37491,me=37808,he=37809,ge=37810,_e=37811,ve=37812,ye=37813,be=37814,xe=37815,Se=37816,Ce=37817,we=37818,Te=37819,Ee=37820,De=37821,Oe=36492,ke=36494,Ae=36495,je=36283,Me=36284,Ne=36285,Pe=36286,P=2300,Fe=2301,Ie=2302,Le=2303,F=2400,Re=2401,I=2402,L=3200,ze=3201,Be=`srgb`,Ve=`srgb-linear`,He=`linear`,Ue=`srgb`,We=7680,Ge=35044,Ke=35048,qe=`300 es`,Je=2e3;function Ye(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}function Xe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ze(e){return document.createElementNS(`http://www.w3.org/1999/xhtml`,e)}function Qe(){let e=Ze(`canvas`);return e.style.display=`block`,e}var $e={};function et(...e){let t=`THREE.`+e.shift();console.log(t,...e)}function tt(e){let t=e[0];if(typeof t==`string`&&t.startsWith(`TSL:`)){let t=e[1];t&&t.isStackTrace?e[0]+=` `+t.getLocation():e[1]=`Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.`}return e}function R(...e){e=tt(e);let t=`THREE.`+e.shift();{let n=e[0];n&&n.isStackTrace?console.warn(n.getError(t)):console.warn(t,...e)}}function z(...e){e=tt(e);let t=`THREE.`+e.shift();{let n=e[0];n&&n.isStackTrace?console.error(n.getError(t)):console.error(t,...e)}}function nt(...e){let t=e.join(` `);t in $e||($e[t]=!0,R(...e))}function rt(e,t,n){return new Promise(function(r,i){function a(){switch(e.clientWaitSync(t,e.SYNC_FLUSH_COMMANDS_BIT,0)){case e.WAIT_FAILED:i();break;case e.TIMEOUT_EXPIRED:setTimeout(a,n);break;default:r()}}setTimeout(a,n)})}var it={0:1,2:6,4:7,3:5,1:0,6:2,7:4,5:3},at=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n!==void 0&&n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[e];if(r!==void 0){let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let t=n.slice(0);for(let n=0,r=t.length;n>8&255]+ot[e>>16&255]+ot[e>>24&255]+`-`+ot[t&255]+ot[t>>8&255]+`-`+ot[t>>16&15|64]+ot[t>>24&255]+`-`+ot[n&63|128]+ot[n>>8&255]+`-`+ot[n>>16&255]+ot[n>>24&255]+ot[r&255]+ot[r>>8&255]+ot[r>>16&255]+ot[r>>24&255]).toLowerCase()}function B(e,t,n){return Math.max(t,Math.min(n,e))}function ut(e,t){return(e%t+t)%t}function dt(e,t,n){return(1-n)*e+n*t}function ft(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:case Uint8ClampedArray:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw Error(`THREE.MathUtils: Invalid component type.`)}}function pt(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(e*4294967295);case Uint16Array:return Math.round(e*65535);case Uint8Array:case Uint8ClampedArray:return Math.round(e*255);case Int32Array:return Math.round(e*2147483647);case Int16Array:return Math.round(e*32767);case Int8Array:return Math.round(e*127);default:throw Error(`THREE.MathUtils: Invalid component type.`)}}var V=class e{static{e.prototype.isVector2=!0}constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw Error(`THREE.Vector2: index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw Error(`THREE.Vector2: index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=B(this.x,e.x,t.x),this.y=B(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=B(this.x,e,t),this.y=B(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(B(n,e,t))}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(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.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(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(B(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},mt=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,i,a,o){let s=n[r+0],c=n[r+1],l=n[r+2],u=n[r+3],d=i[a+0],f=i[a+1],p=i[a+2],m=i[a+3];if(u!==m||s!==d||c!==f||l!==p){let e=s*d+c*f+l*p+u*m;e<0&&(d=-d,f=-f,p=-p,m=-m,e=-e);let t=1-o;if(e<.9995){let n=Math.acos(e),r=Math.sin(n);t=Math.sin(t*n)/r,o=Math.sin(o*n)/r,s=s*t+d*o,c=c*t+f*o,l=l*t+p*o,u=u*t+m*o}else{s=s*t+d*o,c=c*t+f*o,l=l*t+p*o,u=u*t+m*o;let e=1/Math.sqrt(s*s+c*c+l*l+u*u);s*=e,c*=e,l*=e,u*=e}}e[t]=s,e[t+1]=c,e[t+2]=l,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,a){let o=n[r],s=n[r+1],c=n[r+2],l=n[r+3],u=i[a],d=i[a+1],f=i[a+2],p=i[a+3];return e[t]=o*p+l*u+s*f-c*d,e[t+1]=s*p+l*d+c*u-o*f,e[t+2]=c*p+l*f+o*d-s*u,e[t+3]=l*p-o*u-s*d-c*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,r=e._y,i=e._z,a=e._order,o=Math.cos,s=Math.sin,c=o(n/2),l=o(r/2),u=o(i/2),d=s(n/2),f=s(r/2),p=s(i/2);switch(a){case`XYZ`:this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case`YXZ`:this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case`ZXY`:this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case`ZYX`:this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case`YZX`:this._x=d*l*u+c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u-d*f*p;break;case`XZY`:this._x=d*l*u-c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u+d*f*p;break;default:R(`Quaternion: .setFromEuler() encountered an unknown order: `+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],o=t[5],s=t[9],c=t[2],l=t[6],u=t[10],d=n+o+u;if(d>0){let e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(l-s)*e,this._y=(i-c)*e,this._z=(a-r)*e}else if(n>o&&n>u){let e=2*Math.sqrt(1+n-o-u);this._w=(l-s)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+c)/e}else if(o>u){let e=2*Math.sqrt(1+o-n-u);this._w=(i-c)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(s+l)/e}else{let e=2*Math.sqrt(1+u-n-o);this._w=(a-r)/e,this._x=(i+c)/e,this._y=(s+l)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(B(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);return this.slerp(e,r),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(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._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 e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x*=e,this._y*=e,this._z*=e,this._w*=e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,c=t._z,l=t._w;return this._x=n*l+a*o+r*c-i*s,this._y=r*l+a*s+i*o-n*c,this._z=i*l+a*c+n*s-r*o,this._w=a*l-n*o-r*s-i*c,this._onChangeCallback(),this}slerp(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,o=this.dot(e);o<0&&(n=-n,r=-r,i=-i,a=-a,o=-o);let s=1-t;if(o<.9995){let e=Math.acos(o),c=Math.sin(e);s=Math.sin(s*e)/c,t=Math.sin(t*e)/c,this._x=this._x*s+n*t,this._y=this._y*s+r*t,this._z=this._z*s+i*t,this._w=this._w*s+a*t,this._onChangeCallback()}else this._x=this._x*s+n*t,this._y=this._y*s+r*t,this._z=this._z*s+i*t,this._w=this._w*s+a*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),i=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),i*Math.sin(t),i*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},H=class e{static{e.prototype.isVector3=!0}constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw Error(`THREE.Vector3: index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error(`THREE.Vector3: index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(gt.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(gt.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,c=2*(a*r-o*n),l=2*(o*t-i*r),u=2*(i*n-a*t);return this.x=t+s*c+a*u-o*l,this.y=n+s*l+o*c-i*u,this.z=r+s*u+i*l-a*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=B(this.x,e.x,t.x),this.y=B(this.y,e.y,t.y),this.z=B(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=B(this.x,e,t),this.y=B(this.y,e,t),this.z=B(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(B(n,e,t))}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(e){return this.x*e.x+this.y*e.y+this.z*e.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(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return ht.copy(this).projectOnVector(e),this.sub(ht)}reflect(e){return this.sub(ht.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(B(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},ht=new H,gt=new mt,U=class e{static{e.prototype.isMatrix3=!0}constructor(e,t,n,r,i,a,o,s,c){this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,i,a,o,s,c)}set(e,t,n,r,i,a,o,s,c){let l=this.elements;return l[0]=e,l[1]=r,l[2]=o,l[3]=t,l[4]=i,l[5]=s,l[6]=n,l[7]=a,l[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[3],s=n[6],c=n[1],l=n[4],u=n[7],d=n[2],f=n[5],p=n[8],m=r[0],h=r[3],g=r[6],_=r[1],v=r[4],y=r[7],b=r[2],x=r[5],S=r[8];return i[0]=a*m+o*_+s*b,i[3]=a*h+o*v+s*x,i[6]=a*g+o*y+s*S,i[1]=c*m+l*_+u*b,i[4]=c*h+l*v+u*x,i[7]=c*g+l*y+u*S,i[2]=d*m+f*_+p*b,i[5]=d*h+f*v+p*x,i[8]=d*g+f*y+p*S,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8];return t*a*l-t*o*c-n*i*l+n*o*s+r*i*c-r*a*s}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=l*a-o*c,d=o*s-l*i,f=c*i-a*s,p=t*u+n*d+r*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let m=1/p;return e[0]=u*m,e[1]=(r*c-l*n)*m,e[2]=(o*n-r*a)*m,e[3]=d*m,e[4]=(l*t-r*s)*m,e[5]=(r*i-o*t)*m,e[6]=f*m,e[7]=(n*s-c*t)*m,e[8]=(a*t-n*i)*m,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,o){let s=Math.cos(i),c=Math.sin(i);return this.set(n*s,n*c,-n*(s*a+c*o)+a+e,-r*c,r*s,-r*(-c*a+s*o)+o+t,0,0,1),this}scale(e,t){return nt(`Matrix3: .scale() is deprecated. Use .makeScale() instead.`),this.premultiply(_t.makeScale(e,t)),this}rotate(e){return nt(`Matrix3: .rotate() is deprecated. Use .makeRotation() instead.`),this.premultiply(_t.makeRotation(-e)),this}translate(e,t){return nt(`Matrix3: .translate() is deprecated. Use .makeTranslation() instead.`),this.premultiply(_t.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}},_t=new U,vt=new U().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),yt=new U().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function bt(){let e={enabled:!0,workingColorSpace:Ve,spaces:{},convert:function(e,t,n){return this.enabled===!1||t===n||!t||!n?e:(this.spaces[t].transfer===`srgb`&&(e.r=St(e.r),e.g=St(e.g),e.b=St(e.b)),this.spaces[t].primaries!==this.spaces[n].primaries&&(e.applyMatrix3(this.spaces[t].toXYZ),e.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===`srgb`&&(e.r=Ct(e.r),e.g=Ct(e.g),e.b=Ct(e.b)),e)},workingToColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},colorSpaceToWorking:function(e,t){return this.convert(e,t,this.workingColorSpace)},getPrimaries:function(e){return this.spaces[e].primaries},getTransfer:function(e){return e===``?He:this.spaces[e].transfer},getToneMappingMode:function(e){return this.spaces[e].outputColorSpaceConfig.toneMappingMode||`standard`},getLuminanceCoefficients:function(e,t=this.workingColorSpace){return e.fromArray(this.spaces[t].luminanceCoefficients)},define:function(e){Object.assign(this.spaces,e)},_getMatrix:function(e,t,n){return e.copy(this.spaces[t].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(e){return this.spaces[e].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(e=this.workingColorSpace){return this.spaces[e].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(t,n){return nt(`ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace().`),e.workingToColorSpace(t,n)},toWorkingColorSpace:function(t,n){return nt(`ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking().`),e.colorSpaceToWorking(t,n)}},t=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return e.define({[Ve]:{primaries:t,whitePoint:r,transfer:He,toXYZ:vt,fromXYZ:yt,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:Be},outputColorSpaceConfig:{drawingBufferColorSpace:Be}},[Be]:{primaries:t,whitePoint:r,transfer:Ue,toXYZ:vt,fromXYZ:yt,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:Be}}}),e}var xt=bt();function St(e){return e<.04045?e*.0773993808:(e*.9478672986+.0521327014)**2.4}function Ct(e){return e<.0031308?e*12.92:1.055*e**.41666-.055}var wt,Tt=class{static getDataURL(e,t=`image/png`){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>`u`)return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{wt===void 0&&(wt=Ze(`canvas`)),wt.width=e.width,wt.height=e.height;let t=wt.getContext(`2d`);e instanceof ImageData?t.putImageData(e,0,0):t.drawImage(e,0,0,e.width,e.height),n=wt}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap){let t=Ze(`canvas`);t.width=e.width,t.height=e.height;let n=t.getContext(`2d`);n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e1),this.pmremVersion=0,this.normalized=!1}get width(){return this.source.getSize(At).x}get height(){return this.source.getSize(At).y}get depth(){return this.source.getSize(At).z}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.normalized=e.normalized,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(let t in e){let n=e[t];if(n===void 0){R(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){R(`Texture.setValues(): property '${t}' does not exist.`);continue}r&&n&&r.isVector2&&n.isVector2||r&&n&&r.isVector3&&n.isVector3||r&&n&&r.isMatrix3&&n.isMatrix3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e==`string`;if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let n={metadata:{version:4.7,type:`Texture`,generator:`Texture.toJSON`},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,normalized:this.normalized,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:`dispose`})}transformUv(e){if(this.mapping!==300)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case t:e.x-=Math.floor(e.x);break;case n:e.x=e.x<0?0:1;break;case r:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x-=Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case t:e.y-=Math.floor(e.y);break;case n:e.y=e.y<0?0:1;break;case r:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y-=Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}};jt.DEFAULT_IMAGE=null,jt.DEFAULT_MAPPING=300,jt.DEFAULT_ANISOTROPY=1;var Mt=class e{static{e.prototype.isVector4=!0}constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw Error(`THREE.Vector4: index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error(`THREE.Vector4: index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w===void 0?1:e.w,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i,a=.01,o=.1,s=e.elements,c=s[0],l=s[4],u=s[8],d=s[1],f=s[5],p=s[9],m=s[2],h=s[6],g=s[10];if(Math.abs(l-d)s&&e>_?e_?s1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.pivot!==null&&(r.pivot=this.pivot.toArray()),this.morphTargetDictionary!==void 0&&(r.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(r.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(r.type=`InstancedMesh`,r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type=`BatchedMesh`,r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox?e.boundingBox.toJSON():void 0,boundingSphere:e.boundingSphere?e.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(e=>({...e})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(r.boundingBox=this.boundingBox.toJSON()));function i(t,n){return t[n.uuid]===void 0&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);let t=this.geometry.parameters;if(t!==void 0&&t.shapes!==void 0){let n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t0){r.children=[];for(let t=0;t0){r.animations=[];for(let t=0;t0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),o.length>0&&(n.images=o),s.length>0&&(n.shapes=s),c.length>0&&(n.skeletons=c),l.length>0&&(n.animations=l),u.length>0&&(n.nodes=u)}return n.object=r,n;function a(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.pivot=e.pivot===null?null:e.pivot.clone(),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.static=e.static,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let t=0;t.025?(c.inputState.pinching=!1,this.dispatchEvent({type:`pinchend`,handedness:e.handedness,target:this})):!c.inputState.pinching&&o<=.015&&(c.inputState.pinching=!0,this.dispatchEvent({type:`pinchstart`,handedness:e.handedness,target:this}))}else s!==null&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),i!==null&&(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,s.eventsEnabled&&s.dispatchEvent({type:`gripUpdated`,data:e,target:this})));o!==null&&(r=t.getPose(e.targetRaySpace,n),r===null&&i!==null&&(r=i),r!==null&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(fn)))}return o!==null&&(o.visible=r!==null),s!==null&&(s.visible=i!==null),c!==null&&(c.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){let n=new dn;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}},mn={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},hn={h:0,s:0,l:0},gn={h:0,s:0,l:0};function _n(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*6*(2/3-n):e}var G=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let t=e;t&&t.isColor?this.copy(t):typeof t==`number`?this.setHex(t):typeof t==`string`&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Be){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,xt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=xt.workingColorSpace){return this.r=e,this.g=t,this.b=n,xt.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=xt.workingColorSpace){if(e=ut(e,1),t=B(t,0,1),n=B(n,0,1),t===0)this.r=this.g=this.b=n;else{let r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=_n(i,r,e+1/3),this.g=_n(i,r,e),this.b=_n(i,r,e-1/3)}return xt.colorSpaceToWorking(this,r),this}setStyle(e,t=Be){function n(t){t!==void 0&&parseFloat(t)<1&&R(`Color: Alpha component of `+e+` will be ignored.`)}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i,a=r[1],o=r[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 n(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,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(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,t);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 n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:R(`Color: Unknown color model `+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let n=r[1],i=n.length;if(i===3)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(i===6)return this.setHex(parseInt(n,16),t);R(`Color: Invalid hex color `+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Be){let n=mn[e.toLowerCase()];return n===void 0?R(`Color: Unknown color `+e):this.setHex(n,t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=St(e.r),this.g=St(e.g),this.b=St(e.b),this}copyLinearToSRGB(e){return this.r=Ct(e.r),this.g=Ct(e.g),this.b=Ct(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Be){return xt.workingToColorSpace(vn.copy(this),e),Math.round(B(vn.r*255,0,255))*65536+Math.round(B(vn.g*255,0,255))*256+Math.round(B(vn.b*255,0,255))}getHexString(e=Be){return(`000000`+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=xt.workingColorSpace){xt.workingToColorSpace(vn.copy(this),t);let n=vn.r,r=vn.g,i=vn.b,a=Math.max(n,r,i),o=Math.min(n,r,i),s,c,l=(o+a)/2;if(o===a)s=0,c=0;else{let e=a-o;switch(c=l<=.5?e/(a+o):e/(2-a-o),a){case n:s=(r-i)/e+(r0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){bn.subVectors(r,t),xn.subVectors(n,t),Sn.subVectors(e,t);let a=bn.dot(bn),o=bn.dot(xn),s=bn.dot(Sn),c=xn.dot(xn),l=xn.dot(Sn),u=a*c-o*o;if(u===0)return i.set(0,0,0),null;let d=1/u,f=(c*s-o*l)*d,p=(a*l-o*s)*d;return i.set(1-f-p,p,f)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,Cn)!==null&&Cn.x>=0&&Cn.y>=0&&Cn.x+Cn.y<=1}static getInterpolation(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,Cn)===null?(s.x=0,s.y=0,`z`in s&&(s.z=0),`w`in s&&(s.w=0),null):(s.setScalar(0),s.addScaledVector(i,Cn.x),s.addScaledVector(a,Cn.y),s.addScaledVector(o,Cn.z),s)}static getInterpolatedAttribute(e,t,n,r,i,a){return An.setScalar(0),jn.setScalar(0),Mn.setScalar(0),An.fromBufferAttribute(e,t),jn.fromBufferAttribute(e,n),Mn.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(An,i.x),a.addScaledVector(jn,i.y),a.addScaledVector(Mn,i.z),a}static isFrontFacing(e,t,n,r){return bn.subVectors(n,t),xn.subVectors(e,t),bn.cross(xn).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return bn.subVectors(this.c,this.b),xn.subVectors(this.a,this.b),bn.cross(xn).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return e.getNormal(this.a,this.b,this.c,t)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,n){return e.getBarycoord(t,this.a,this.b,this.c,n)}getInterpolation(t,n,r,i,a){return e.getInterpolation(t,this.a,this.b,this.c,n,r,i,a)}containsPoint(t){return e.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return e.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,i=this.c,a,o;wn.subVectors(r,n),Tn.subVectors(i,n),Dn.subVectors(e,n);let s=wn.dot(Dn),c=Tn.dot(Dn);if(s<=0&&c<=0)return t.copy(n);On.subVectors(e,r);let l=wn.dot(On),u=Tn.dot(On);if(l>=0&&u<=l)return t.copy(r);let d=s*u-l*c;if(d<=0&&s>=0&&l<=0)return a=s/(s-l),t.copy(n).addScaledVector(wn,a);kn.subVectors(e,i);let f=wn.dot(kn),p=Tn.dot(kn);if(p>=0&&f<=p)return t.copy(i);let m=f*c-s*p;if(m<=0&&c>=0&&p<=0)return o=c/(c-p),t.copy(n).addScaledVector(Tn,o);let h=l*p-f*u;if(h<=0&&u-l>=0&&f-p>=0)return En.subVectors(i,r),o=(u-l)/(u-l+(f-p)),t.copy(r).addScaledVector(En,o);let g=1/(h+m+d);return a=m*g,o=d*g,t.copy(n).addScaledVector(wn,a).addScaledVector(Tn,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},Pn=class{constructor(e=new H(1/0,1/0,1/0),t=new H(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,In),In.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Wn),Gn.subVectors(this.max,Wn),Rn.subVectors(e.a,Wn),zn.subVectors(e.b,Wn),Bn.subVectors(e.c,Wn),Vn.subVectors(zn,Rn),Hn.subVectors(Bn,zn),Un.subVectors(Rn,Bn);let t=[0,-Vn.z,Vn.y,0,-Hn.z,Hn.y,0,-Un.z,Un.y,Vn.z,0,-Vn.x,Hn.z,0,-Hn.x,Un.z,0,-Un.x,-Vn.y,Vn.x,0,-Hn.y,Hn.x,0,-Un.y,Un.x,0];return!Jn(t,Rn,zn,Bn,Gn)||(t=[1,0,0,0,1,0,0,0,1],!Jn(t,Rn,zn,Bn,Gn))?!1:(Kn.crossVectors(Vn,Hn),t=[Kn.x,Kn.y,Kn.z],Jn(t,Rn,zn,Bn,Gn))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,In).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(In).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Fn[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Fn[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Fn[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Fn[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Fn[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Fn[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Fn[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Fn[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Fn),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},Fn=[new H,new H,new H,new H,new H,new H,new H,new H],In=new H,Ln=new Pn,Rn=new H,zn=new H,Bn=new H,Vn=new H,Hn=new H,Un=new H,Wn=new H,Gn=new H,Kn=new H,qn=new H;function Jn(e,t,n,r,i){for(let a=0,o=e.length-3;a<=o;a+=3){qn.fromArray(e,a);let o=i.x*Math.abs(qn.x)+i.y*Math.abs(qn.y)+i.z*Math.abs(qn.z),s=t.dot(qn),c=n.dot(qn),l=r.dot(qn);if(Math.max(-Math.max(s,c,l),Math.min(s,c,l))>o)return!1}return!0}var Yn=new H,Xn=new V,Zn=0,Qn=class extends at{constructor(e,t,n=!1){if(super(),Array.isArray(e))throw TypeError(`THREE.BufferAttribute: array should be a Typed Array.`);this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:Zn++}),this.name=``,this.array=e,this.itemSize=t,this.count=e===void 0?0:e.length/t,this.normalized=n,this.usage=Ge,this.updateRanges=[],this.gpuType=g,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius*=e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;rr.subVectors(e,this.center);let t=rr.lengthSq();if(t>this.radius*this.radius){let e=Math.sqrt(t),n=(e-this.radius)*.5;this.center.addScaledVector(rr,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(ir.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(rr.copy(e.center).add(ir)),this.expandByPoint(rr.copy(e.center).sub(ir))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},or=0,sr=new It,cr=new un,lr=new H,ur=new Pn,dr=new Pn,fr=new H,pr=class e extends at{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:or++}),this.uuid=lt(),this.name=``,this.type=`BufferGeometry`,this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={},this._transformed=!1}getIndex(){return this.index}setIndex(e){return this.index=Array.isArray(e)?new(Ye(e)?er:$n)(e,1):e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let t=new U().getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this._transformed=!0,this}applyQuaternion(e){return sr.makeRotationFromQuaternion(e),this.applyMatrix4(sr),this}rotateX(e){return sr.makeRotationX(e),this.applyMatrix4(sr),this}rotateY(e){return sr.makeRotationY(e),this.applyMatrix4(sr),this}rotateZ(e){return sr.makeRotationZ(e),this.applyMatrix4(sr),this}translate(e,t,n){return sr.makeTranslation(e,t,n),this.applyMatrix4(sr),this}scale(e,t,n){return sr.makeScale(e,t,n),this.applyMatrix4(sr),this}lookAt(e){return cr.lookAt(e),cr.updateMatrix(),this.applyMatrix4(cr.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(lr).negate(),this.translate(lr.x,lr.y,lr.z),this}setFromPoints(e){let t=this.getAttribute(`position`);if(t===void 0){let t=[];for(let n=0,r=e.length;nt.count&&R(`BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry.`),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Pn);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){z(`BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.`,this),this.boundingBox.set(new H(-1/0,-1/0,-1/0),new H(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e0&&(e.userData=this.userData),this.parameters!==void 0&&this._transformed!==!0){let t=this.parameters;for(let n in t)t[n]!==void 0&&(e[n]=t[n]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let t in n){let r=n[t];e.data.attributes[t]=r.toJSON(e.data)}let r={},i=!1;for(let t in this.morphAttributes){let n=this.morphAttributes[t],a=[];for(let t=0,r=n.length;t0&&(r[t]=a,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone());let r=e.attributes;for(let e in r){let n=r[e];this.setAttribute(e,n.clone(t))}let i=e.morphAttributes;for(let e in i){let n=[],r=i[e];for(let e=0,i=r.length;e1)?null:t.copy(e.start).addScaledVector(r,a)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||gr.getNormalMatrix(e),r=this.coplanarPoint(mr).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}toJSON(){return{normal:this.normal.toArray(),constant:this.constant}}fromJSON(e){return this.normal.fromArray(e.normal),this.constant=e.constant,this}},vr=0,yr=class extends at{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:vr++}),this.uuid=lt(),this.name=``,this.type=`Material`,this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new G(0,0,0),this.blendAlpha=0,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=We,this.stencilZFail=We,this.stencilZPass=We,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.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){R(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){R(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector2&&n&&n.isVector2||r&&r.isEuler&&n&&n.isEuler||r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e==`string`;t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:`Material`,generator:`Material.toJSON`}};n.uuid=this.uuid,n.type=this.type,n.blending=this.blending,n.side=this.side,n.shadowSide=this.shadowSide,n.vertexColors=this.vertexColors,n.opacity=this.opacity,n.transparent=this.transparent,n.blendSrc=this.blendSrc,n.blendDst=this.blendDst,n.blendEquation=this.blendEquation,n.blendSrcAlpha=this.blendSrcAlpha,n.blendDstAlpha=this.blendDstAlpha,n.blendEquationAlpha=this.blendEquationAlpha,n.blendColor=this.blendColor.getHex(),n.blendAlpha=this.blendAlpha,n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.clipIntersection=this.clipIntersection,n.clipShadows=this.clipShadows,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,n.stencilWrite=this.stencilWrite,n.polygonOffset=this.polygonOffset,n.polygonOffsetFactor=this.polygonOffsetFactor,n.polygonOffsetUnits=this.polygonOffsetUnits,n.dithering=this.dithering,n.alphaTest=this.alphaTest,n.alphaHash=this.alphaHash,n.alphaToCoverage=this.alphaToCoverage,n.premultipliedAlpha=this.premultipliedAlpha,n.forceSinglePass=this.forceSinglePass,n.allowOverride=this.allowOverride,n.visible=this.visible,n.toneMapped=this.toneMapped,n.name=this.name,this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.retroreflectivity!==void 0&&(n.retroreflectivity=this.retroreflectivity),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),Array.isArray(this.clippingPlanes)&&this.clippingPlanes.length>0&&(n.clippingPlanes=this.clippingPlanes.map(e=>e.toJSON())),this.rotation!==void 0&&(n.rotation=this.rotation),this.depthPacking!==void 0&&(n.depthPacking=this.depthPacking),this.linewidth!==void 0&&(n.linewidth=this.linewidth),this.linecap!==void 0&&(n.linecap=this.linecap),this.linejoin!==void 0&&(n.linejoin=this.linejoin),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.wireframe!==void 0&&(n.wireframe=this.wireframe),this.wireframeLinewidth!==void 0&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!==void 0&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!==void 0&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading!==void 0&&(n.flatShading=this.flatShading),this.fog!==void 0&&(n.fog=this.fog),Object.keys(this.userData).length>0&&(n.userData=this.userData);function r(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}if(t){let t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}fromJSON(e,t){if(e.uuid!==void 0&&(this.uuid=e.uuid),e.name!==void 0&&(this.name=e.name),e.color!==void 0&&this.color!==void 0&&this.color.setHex(e.color),e.roughness!==void 0&&(this.roughness=e.roughness),e.metalness!==void 0&&(this.metalness=e.metalness),e.sheen!==void 0&&(this.sheen=e.sheen),e.sheenColor!==void 0&&(this.sheenColor=new G().setHex(e.sheenColor)),e.sheenRoughness!==void 0&&(this.sheenRoughness=e.sheenRoughness),e.emissive!==void 0&&this.emissive!==void 0&&this.emissive.setHex(e.emissive),e.specular!==void 0&&this.specular!==void 0&&this.specular.setHex(e.specular),e.specularIntensity!==void 0&&(this.specularIntensity=e.specularIntensity),e.specularColor!==void 0&&this.specularColor!==void 0&&this.specularColor.setHex(e.specularColor),e.shininess!==void 0&&(this.shininess=e.shininess),e.clearcoat!==void 0&&(this.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(this.clearcoatRoughness=e.clearcoatRoughness),e.dispersion!==void 0&&(this.dispersion=e.dispersion),e.retroreflectivity!==void 0&&(this.retroreflectivity=e.retroreflectivity),e.iridescence!==void 0&&(this.iridescence=e.iridescence),e.iridescenceIOR!==void 0&&(this.iridescenceIOR=e.iridescenceIOR),e.iridescenceThicknessRange!==void 0&&(this.iridescenceThicknessRange=e.iridescenceThicknessRange),e.transmission!==void 0&&(this.transmission=e.transmission),e.thickness!==void 0&&(this.thickness=e.thickness),e.attenuationDistance!==void 0&&(this.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&this.attenuationColor!==void 0&&this.attenuationColor.setHex(e.attenuationColor),e.anisotropy!==void 0&&(this.anisotropy=e.anisotropy),e.anisotropyRotation!==void 0&&(this.anisotropyRotation=e.anisotropyRotation),e.fog!==void 0&&(this.fog=e.fog),e.flatShading!==void 0&&(this.flatShading=e.flatShading),e.blending!==void 0&&(this.blending=e.blending),e.combine!==void 0&&(this.combine=e.combine),e.side!==void 0&&(this.side=e.side),e.shadowSide!==void 0&&(this.shadowSide=e.shadowSide),e.opacity!==void 0&&(this.opacity=e.opacity),e.transparent!==void 0&&(this.transparent=e.transparent),e.alphaTest!==void 0&&(this.alphaTest=e.alphaTest),e.alphaHash!==void 0&&(this.alphaHash=e.alphaHash),e.depthFunc!==void 0&&(this.depthFunc=e.depthFunc),e.depthTest!==void 0&&(this.depthTest=e.depthTest),e.depthWrite!==void 0&&(this.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(this.colorWrite=e.colorWrite),e.clippingPlanes!==void 0&&(this.clippingPlanes=e.clippingPlanes.map(e=>new _r().fromJSON(e))),e.clipIntersection!==void 0&&(this.clipIntersection=e.clipIntersection),e.clipShadows!==void 0&&(this.clipShadows=e.clipShadows),e.depthPacking!==void 0&&(this.depthPacking=e.depthPacking),e.blendSrc!==void 0&&(this.blendSrc=e.blendSrc),e.blendDst!==void 0&&(this.blendDst=e.blendDst),e.blendEquation!==void 0&&(this.blendEquation=e.blendEquation),e.blendSrcAlpha!==void 0&&(this.blendSrcAlpha=e.blendSrcAlpha),e.blendDstAlpha!==void 0&&(this.blendDstAlpha=e.blendDstAlpha),e.blendEquationAlpha!==void 0&&(this.blendEquationAlpha=e.blendEquationAlpha),e.blendColor!==void 0&&this.blendColor!==void 0&&this.blendColor.setHex(e.blendColor),e.blendAlpha!==void 0&&(this.blendAlpha=e.blendAlpha),e.stencilWriteMask!==void 0&&(this.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(this.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(this.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(this.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(this.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(this.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(this.stencilZPass=e.stencilZPass),e.stencilWrite!==void 0&&(this.stencilWrite=e.stencilWrite),e.wireframe!==void 0&&(this.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(this.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(this.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(this.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(this.rotation=e.rotation),e.linewidth!==void 0&&(this.linewidth=e.linewidth),e.linecap!==void 0&&(this.linecap=e.linecap),e.linejoin!==void 0&&(this.linejoin=e.linejoin),e.dashSize!==void 0&&(this.dashSize=e.dashSize),e.gapSize!==void 0&&(this.gapSize=e.gapSize),e.scale!==void 0&&(this.scale=e.scale),e.polygonOffset!==void 0&&(this.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(this.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(this.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(this.dithering=e.dithering),e.alphaToCoverage!==void 0&&(this.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(this.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(this.forceSinglePass=e.forceSinglePass),e.allowOverride!==void 0&&(this.allowOverride=e.allowOverride),e.visible!==void 0&&(this.visible=e.visible),e.toneMapped!==void 0&&(this.toneMapped=e.toneMapped),e.userData!==void 0&&(this.userData=e.userData),e.vertexColors!==void 0&&(this.vertexColors=typeof e.vertexColors==`number`?e.vertexColors>0:e.vertexColors),e.size!==void 0&&(this.size=e.size),e.sizeAttenuation!==void 0&&(this.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(this.map=t[e.map]||null),e.matcap!==void 0&&(this.matcap=t[e.matcap]||null),e.alphaMap!==void 0&&(this.alphaMap=t[e.alphaMap]||null),e.bumpMap!==void 0&&(this.bumpMap=t[e.bumpMap]||null),e.bumpScale!==void 0&&(this.bumpScale=e.bumpScale),e.normalMap!==void 0&&(this.normalMap=t[e.normalMap]||null),e.normalMapType!==void 0&&(this.normalMapType=e.normalMapType),e.normalScale!==void 0){let t=e.normalScale;Array.isArray(t)===!1&&(t=[t,t]),this.normalScale=new V().fromArray(t)}return e.displacementMap!==void 0&&(this.displacementMap=t[e.displacementMap]||null),e.displacementScale!==void 0&&(this.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(this.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(this.roughnessMap=t[e.roughnessMap]||null),e.metalnessMap!==void 0&&(this.metalnessMap=t[e.metalnessMap]||null),e.emissiveMap!==void 0&&(this.emissiveMap=t[e.emissiveMap]||null),e.emissiveIntensity!==void 0&&(this.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(this.specularMap=t[e.specularMap]||null),e.specularIntensityMap!==void 0&&(this.specularIntensityMap=t[e.specularIntensityMap]||null),e.specularColorMap!==void 0&&(this.specularColorMap=t[e.specularColorMap]||null),e.envMap!==void 0&&(this.envMap=t[e.envMap]||null),e.envMapRotation!==void 0&&this.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(this.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(this.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(this.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(this.lightMap=t[e.lightMap]||null),e.lightMapIntensity!==void 0&&(this.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(this.aoMap=t[e.aoMap]||null),e.aoMapIntensity!==void 0&&(this.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(this.gradientMap=t[e.gradientMap]||null),e.clearcoatMap!==void 0&&(this.clearcoatMap=t[e.clearcoatMap]||null),e.clearcoatRoughnessMap!==void 0&&(this.clearcoatRoughnessMap=t[e.clearcoatRoughnessMap]||null),e.clearcoatNormalMap!==void 0&&(this.clearcoatNormalMap=t[e.clearcoatNormalMap]||null),e.clearcoatNormalScale!==void 0&&(this.clearcoatNormalScale=new V().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(this.iridescenceMap=t[e.iridescenceMap]||null),e.iridescenceThicknessMap!==void 0&&(this.iridescenceThicknessMap=t[e.iridescenceThicknessMap]||null),e.transmissionMap!==void 0&&(this.transmissionMap=t[e.transmissionMap]||null),e.thicknessMap!==void 0&&(this.thicknessMap=t[e.thicknessMap]||null),e.anisotropyMap!==void 0&&(this.anisotropyMap=t[e.anisotropyMap]||null),e.sheenColorMap!==void 0&&(this.sheenColorMap=t[e.sheenColorMap]||null),e.sheenRoughnessMap!==void 0&&(this.sheenRoughnessMap=t[e.sheenRoughnessMap]||null),this}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let e=t.length;n=Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:`dispose`})}set needsUpdate(e){e===!0&&this.version++}},br=new H,xr=new H,Sr=new H,Cr=new H,wr=class{constructor(e=new H,t=new H(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,br)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=br.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(br.copy(this.origin).addScaledVector(this.direction,t),br.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){xr.copy(e).add(t).multiplyScalar(.5),Sr.copy(t).sub(e).normalize(),Cr.copy(this.origin).sub(xr);let i=e.distanceTo(t)*.5,a=-this.direction.dot(Sr),o=Cr.dot(this.direction),s=-Cr.dot(Sr),c=Cr.lengthSq(),l=Math.abs(1-a*a),u,d,f,p;if(l>0){if(u=a*s-o,d=a*o-s,p=i*l,u>=0){if(d>=-p){if(d<=p){let e=1/l;u*=e,d*=e,f=u*(u+a*d+2*o)+d*(a*u+d+2*s)+c}else d=i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c}else d=-i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c}else d<=-p?(u=Math.max(0,-(-a*i+o)),d=u>0?-i:Math.min(Math.max(-i,-s),i),f=-u*u+d*(d+2*s)+c):d<=p?(u=0,d=Math.min(Math.max(-i,-s),i),f=d*(d+2*s)+c):(u=Math.max(0,-(a*i+o)),d=u>0?i:Math.min(Math.max(-i,-s),i),f=-u*u+d*(d+2*s)+c)}else d=a>0?-i:i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(xr).addScaledVector(Sr,d),f}intersectSphere(e,t){if(e.radius<0)return null;br.subVectors(e.center,this.origin);let n=br.dot(this.direction),r=br.dot(br)-n*n,i=e.radius*e.radius;if(r>i)return null;let a=Math.sqrt(i-r),o=n-a,s=n+a;return s<0?null:o<0?this.at(s,t):this.at(o,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,a,o,s,c=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,d=this.origin;return c>=0?(n=(e.min.x-d.x)*c,r=(e.max.x-d.x)*c):(n=(e.max.x-d.x)*c,r=(e.min.x-d.x)*c),l>=0?(i=(e.min.y-d.y)*l,a=(e.max.y-d.y)*l):(i=(e.max.y-d.y)*l,a=(e.min.y-d.y)*l),n>a||i>r||((i>n||isNaN(n))&&(n=i),(a=0?(o=(e.min.z-d.z)*u,s=(e.max.z-d.z)*u):(o=(e.max.z-d.z)*u,s=(e.min.z-d.z)*u),n>s||o>r)||((o>n||n!==n)&&(n=o),(s=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,br)!==null}intersectTriangle(e,t,n,r,i){let a=this.origin,o=this.direction,s=o.x,c=o.y,l=o.z,u=e.x-a.x,d=e.y-a.y,f=e.z-a.z,p=t.x-a.x,m=t.y-a.y,h=t.z-a.z,g=n.x-a.x,_=n.y-a.y,v=n.z-a.z,y=Math.abs(s),b=Math.abs(c),x=Math.abs(l),S,C,w,T,E,D,O,ee,k,A,te,ne;if(y>=b&&y>=x?(w=s,D=u,k=p,ne=g,s>=0?(S=c,C=l,T=d,E=f,O=m,ee=h,A=_,te=v):(S=l,C=c,T=f,E=d,O=h,ee=m,A=v,te=_)):b>=x?(w=c,D=d,k=m,ne=_,c>=0?(S=l,C=s,T=f,E=u,O=h,ee=p,A=v,te=g):(S=s,C=l,T=u,E=f,O=p,ee=h,A=g,te=v)):(w=l,D=f,k=h,ne=v,l>=0?(S=s,C=c,T=u,E=d,O=p,ee=m,A=g,te=_):(S=c,C=s,T=d,E=u,O=m,ee=p,A=_,te=g)),w===0)return null;let j=S/w,re=C/w,M=1/w,ie=T-j*D,ae=E-re*D,oe=O-j*k,se=ee-re*k,ce=A-j*ne,le=te-re*ne,ue=ce*se-le*oe,N=ie*le-ae*ce,de=oe*ae-se*ie;if(r){if(ue<0||N<0||de<0)return null}else if((ue<0||N<0||de<0)&&(ue>0||N>0||de>0))return null;let fe=ue+N+de;if(fe===0)return null;let pe=M*(ue*D+N*k+de*ne);return(fe>0?pe<0:pe>0)?null:this.at(pe/fe,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Tr=class extends yr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type=`MeshBasicMaterial`,this.color=new G(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.envMapRotation=new Kt,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}},Er=new It,Dr=new wr,Or=new ar,kr=new H,Ar=new H,jr=new H,Mr=new H,Nr=new H,Pr=new H,Fr=new H,Ir=new H,Lr=class extends un{constructor(e=new pr,t=new Tr){super(),this.isMesh=!0,this.type=`Mesh`,this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){let n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e(e.far-e.near)**2))&&(Er.copy(i).invert(),Dr.copy(e.ray).applyMatrix4(Er),(n.boundingBox===null||Dr.intersectsBox(n.boundingBox)!==!1)&&this._computeIntersections(e,t,Dr)))}_computeIntersections(e,t,n){let r,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,d=i.groups,f=i.drawRange;if(o!==null){if(Array.isArray(a))for(let i=0,s=d.length;in.far?null:{distance:l,point:Ir.clone(),object:e}}function zr(e,t,n,r,i,a,o,s,c,l){e.getVertexPosition(s,Ar),e.getVertexPosition(c,jr),e.getVertexPosition(l,Mr);let u=Rr(e,t,n,r,Ar,jr,Mr,Fr);if(u){let e=new H;Nn.getBarycoord(Fr,Ar,jr,Mr,e),i&&(u.uv=Nn.getInterpolatedAttribute(i,s,c,l,e,new V)),a&&(u.uv1=Nn.getInterpolatedAttribute(a,s,c,l,e,new V)),o&&(u.normal=Nn.getInterpolatedAttribute(o,s,c,l,e,new H),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));let t={a:s,b:c,c:l,normal:new H,materialIndex:0};Nn.getNormal(Ar,jr,Mr,t.normal),u.face=t,u.barycoord=e}return u}var Br=class extends jt{constructor(e=null,t=1,n=1,r,a,o,s,c,l=i,u=i,d,f){super(null,o,s,c,l,u,r,a,d,f),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}},Vr=class extends Qn{constructor(e,t,n,r=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){let e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}},Hr=new ar,Ur=new V(.5,.5),Wr=new H,Gr=class{constructor(e=new _r,t=new _r,n=new _r,r=new _r,i=new _r,a=new _r){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){let o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=Je,n=!1){let r=this.planes,i=e.elements,a=i[0],o=i[1],s=i[2],c=i[3],l=i[4],u=i[5],d=i[6],f=i[7],p=i[8],m=i[9],h=i[10],g=i[11],_=i[12],v=i[13],y=i[14],b=i[15];if(r[0].setComponents(c-a,f-l,g-p,b-_).normalize(),r[1].setComponents(c+a,f+l,g+p,b+_).normalize(),r[2].setComponents(c+o,f+u,g+m,b+v).normalize(),r[3].setComponents(c-o,f-u,g-m,b-v).normalize(),n)r[4].setComponents(s,d,h,y).normalize(),r[5].setComponents(c-s,f-d,g-h,b-y).normalize();else if(r[4].setComponents(c-s,f-d,g-h,b-y).normalize(),t===2e3)r[5].setComponents(c+s,f+d,g+h,b+y).normalize();else if(t===2001)r[5].setComponents(s,d,h,y).normalize();else throw Error(`THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: `+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Hr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Hr.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Hr)}intersectsSprite(e){return Hr.center.set(0,0,0),Hr.radius=.7071067811865476+Ur.distanceTo(e.center),Hr.applyMatrix4(e.matrixWorld),this.intersectsSphere(Hr)}intersectsSphere(e){let t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(n)0?e.max.x:e.min.x,Wr.y=r.normal.y>0?e.max.y:e.min.y,Wr.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Wr)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}},Kr=class extends yr{constructor(e){super(),this.isLineBasicMaterial=!0,this.type=`LineBasicMaterial`,this.color=new G(16777215),this.map=null,this.linewidth=1,this.linecap=`round`,this.linejoin=`round`,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}},qr=new H,Jr=new H,Yr=new It,Xr=new wr,Zr=new ar,Qr=new H,$r=new H,ei=class extends un{constructor(e=new pr,t=new Kr){super(),this.isLine=!0,this.type=`Line`,this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){let e=this.geometry;if(e.index===null){let t=e.attributes.position,n=[0];for(let e=1,r=t.count;e0){let n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;er)return;Qr.applyMatrix4(e.matrixWorld);let c=t.ray.origin.distanceTo(Qr);if(!(ct.far))return{distance:c,point:$r.clone().applyMatrix4(e.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:e}}var ni=new H,ri=new H,ii=class extends ei{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type=`LineSegments`}computeLineDistances(){let e=this.geometry;if(e.index===null){let t=e.attributes.position,n=[];for(let e=0,r=t.count;e0){let n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;ei.far)return;a.push({distance:c,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,faceIndex:null,barycoord:null,object:o})}}var fi=class extends jt{constructor(e=[],t=301,n,r,i,a,o,s,c,l){super(e,t,n,r,i,a,o,s,c,l),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}},pi=class extends jt{constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r,i,a,o,s,c),this.isCanvasTexture=!0,this.needsUpdate=!0}},mi=class extends jt{constructor(e,t,n=h,r,a,o,s=i,c=i,l,u=E,d=1){if(u!==1026&&u!==1027)throw Error(`THREE.DepthTexture: format must be either THREE.DepthFormat or THREE.DepthStencilFormat`);super({width:e,height:t,depth:d},r,a,o,s,c,u,n,l),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Dt(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){let t=super.toJSON(e);return t.compareFunction=this.compareFunction,t}},hi=class extends mi{constructor(e,t=h,n=301,r,a,o=i,s=i,c,l=E){let u={width:e,height:e,depth:1},d=[u,u,u,u,u,u];super(e,e,t,n,r,a,o,s,c,l),this.image=d,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}},gi=class extends jt{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}},_i=class e extends pr{constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type=`BoxGeometry`,this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};let o=this;r=Math.floor(r),i=Math.floor(i),a=Math.floor(a);let s=[],c=[],l=[],u=[],d=0,f=0;p(`z`,`y`,`x`,-1,-1,n,t,e,a,i,0),p(`z`,`y`,`x`,1,-1,n,t,-e,a,i,1),p(`x`,`z`,`y`,1,1,e,n,t,r,a,2),p(`x`,`z`,`y`,1,-1,e,n,-t,r,a,3),p(`x`,`y`,`z`,1,-1,e,t,n,r,i,4),p(`x`,`y`,`z`,-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.setAttribute(`position`,new tr(c,3)),this.setAttribute(`normal`,new tr(l,3)),this.setAttribute(`uv`,new tr(u,2));function p(e,t,n,r,i,a,p,m,h,g,_){let v=a/h,y=p/g,b=a/2,x=p/2,S=m/2,C=h+1,w=g+1,T=0,E=0,D=new H;for(let a=0;a0?1:-1,l.push(D.x,D.y,D.z),u.push(s/h),u.push(1-a/g),T+=1}for(let e=0;e.9&&Math.min(t,n,r)<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),r<.2&&(a[e+4]+=1))}}function d(e){i.push(e.x,e.y,e.z)}function f(t,n){let r=t*3;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function p(){let e=new H,t=new H,n=new H,r=new H,o=new V,s=new V,c=new V;for(let l=0,u=0;l0)&&f.push(t,i,c),(e!==n-1||s0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;let n={};for(let e in this.extensions)this.extensions[e]===!0&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}fromJSON(e,t){if(super.fromJSON(e,t),e.uniforms!==void 0)for(let n in e.uniforms){let r=e.uniforms[n];switch(this.uniforms[n]={},r.type){case`t`:this.uniforms[n].value=t[r.value]||null;break;case`c`:this.uniforms[n].value=new G().setHex(r.value);break;case`v2`:this.uniforms[n].value=new V().fromArray(r.value);break;case`v3`:this.uniforms[n].value=new H().fromArray(r.value);break;case`v4`:this.uniforms[n].value=new Mt().fromArray(r.value);break;case`m3`:this.uniforms[n].value=new U().fromArray(r.value);break;case`m4`:this.uniforms[n].value=new It().fromArray(r.value);break;default:this.uniforms[n].value=r.value}}if(e.defines!==void 0&&(this.defines=e.defines),e.vertexShader!==void 0&&(this.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(this.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(this.glslVersion=e.glslVersion),e.extensions!==void 0)for(let t in e.extensions)this.extensions[t]=e.extensions[t];return e.lights!==void 0&&(this.lights=e.lights),e.clipping!==void 0&&(this.clipping=e.clipping),this}},Pi=class extends Ni{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type=`RawShaderMaterial`}},Fi=class extends yr{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type=`MeshNormalMaterial`,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new V(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}},Ii=class extends yr{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type=`MeshDepthMaterial`,this.depthPacking=L,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}},Li=class extends yr{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type=`MeshDistanceMaterial`,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}};function Ri(e,t){return!e||e.constructor===t?e:typeof t.BYTES_PER_ELEMENT==`number`?new t(e):Array.prototype.slice.call(e)}function zi(e){return e!==void 0&&e.inTangents!==void 0&&e.outTangents!==void 0}var Bi=class{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=r===void 0?new t.constructor(n):r,this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){let t=this.parameterPositions,n=this._cachedIndex,r=t[n],i=t[n-1];validate_interval:{seek:{let a;linear_scan:{forward_scan:if(!(e=i)){let o=t[1];e=i)break seek}a=n,n=0;break linear_scan}break validate_interval}for(;n>>1;et;)--a;if(++a,i!==0||a!==r){i>=a&&(a=Math.max(a,1),i=a-1);let e=this.getValueSize();this.times=n.slice(i,a),this.values=this.values.slice(i*e,a*e)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(z(`KeyframeTrack: Invalid value size in track.`,this),e=!1);let n=this.times,r=this.values,i=n.length;i===0&&(z(`KeyframeTrack: Track is empty.`,this),e=!1);let a=null;for(let t=0;t!==i;t++){let r=n[t];if(typeof r==`number`&&isNaN(r)){z(`KeyframeTrack: Time is not a valid number.`,this,t,r),e=!1;break}if(a!==null&&a>r){z(`KeyframeTrack: Out of order keys.`,this,t,r,a),e=!1;break}a=r}if(r!==void 0&&Xe(r))for(let t=0,n=r.length;t!==n;++t){let n=r[t];if(isNaN(n)){z(`KeyframeTrack: Value is not a valid number.`,this,t,n),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===Ie,i=e.length-1,a=1;for(let o=1;o0){e[a]=e[i];for(let e=i*n,r=a*n,o=0;o!==n;++o)t[r+o]=t[e+o];++a}return a===e.length?(this.times=e,this.values=t):(this.times=e.slice(0,a),this.values=t.slice(0,a*n)),this}clone(){let e=this.times.slice(),t=this.values.slice(),n=this.constructor,r=new n(this.name,e,t);return r.createInterpolant=this.createInterpolant,zi(this.settings)&&(r.settings={inTangents:this.settings.inTangents.slice(),outTangents:this.settings.outTangents.slice()}),r}};function Yi(e,t){for(let n=0,r=e.length;n!==r;n+=2)e[n]*=t}Ji.prototype.ValueTypeName=``,Ji.prototype.TimeBufferType=Float32Array,Ji.prototype.ValueBufferType=Float32Array,Ji.prototype.DefaultInterpolation=Fe;var Xi=class extends Ji{constructor(e,t,n){super(e,t,n)}};Xi.prototype.ValueTypeName=`bool`,Xi.prototype.ValueBufferType=Array,Xi.prototype.DefaultInterpolation=P,Xi.prototype.InterpolantFactoryMethodLinear=void 0,Xi.prototype.InterpolantFactoryMethodSmooth=void 0;var Zi=class extends Ji{constructor(e,t,n,r){super(e,t,n,r)}};Zi.prototype.ValueTypeName=`color`;var Qi=class extends Ji{constructor(e,t,n,r){super(e,t,n,r)}};Qi.prototype.ValueTypeName=`number`;var $i=class extends Bi{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(n-t)/(r-t),c=e*o;for(let e=c+o;c!==e;c+=4)mt.slerpFlat(i,0,a,c-o,a,c,s);return i}},ea=class extends Ji{constructor(e,t,n,r){super(e,t,n,r)}InterpolantFactoryMethodLinear(e){return new $i(this.times,this.values,this.getValueSize(),e)}};ea.prototype.ValueTypeName=`quaternion`,ea.prototype.InterpolantFactoryMethodSmooth=void 0;var ta=class extends Ji{constructor(e,t,n){super(e,t,n)}};ta.prototype.ValueTypeName=`string`,ta.prototype.ValueBufferType=Array,ta.prototype.DefaultInterpolation=P,ta.prototype.InterpolantFactoryMethodLinear=void 0,ta.prototype.InterpolantFactoryMethodSmooth=void 0;var na=class extends Ji{constructor(e,t,n,r){super(e,t,n,r)}};na.prototype.ValueTypeName=`vector`;var ra={enabled:!1,files:{},add:function(e,t){this.enabled!==!1&&(ia(e)||(this.files[e]=t))},get:function(e){if(this.enabled!==!1&&!ia(e))return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};function ia(e){try{let t=e.slice(e.indexOf(`:`)+1);return new URL(t).protocol===`blob:`}catch{return!1}}var aa=class{constructor(e,t,n){let r=this,i=!1,a=0,o=0,s,c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this._abortController=null,this.itemStart=function(e){o++,i===!1&&r.onStart!==void 0&&r.onStart(e,a,o),i=!0},this.itemEnd=function(e){a++,r.onProgress!==void 0&&r.onProgress(e,a,o),a===o&&(i=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(e){r.onError!==void 0&&r.onError(e)},this.resolveURL=function(e){return e=e.normalize(`NFC`),s?s(e):e},this.setURLModifier=function(e){return s=e,this},this.addHandler=function(e,t){return c.push(e,t),this},this.removeHandler=function(e){let t=c.indexOf(e);return t!==-1&&c.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=c.length;t{t&&t(i),this.manager.itemEnd(e)},0);return}if(ca[e]!==void 0){ca[e].push({onLoad:t,onProgress:n,onError:r});return}ca[e]=[],ca[e].push({onLoad:t,onProgress:n,onError:r});let a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?`include`:`same-origin`,signal:typeof AbortSignal.any==`function`?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),o=this.mimeType,s=this.responseType;fetch(a).then(t=>{if(t.status===200||t.status===0){if(t.status===0&&R(`FileLoader: HTTP Status 0 received.`),typeof ReadableStream>`u`||t.body===void 0||t.body.getReader===void 0)return t;let n=ca[e],r=t.body.getReader(),i=t.headers.get(`X-File-Size`)||t.headers.get(`Content-Length`),a=i?parseInt(i):0,o=a!==0,s=0,c=new ReadableStream({start(e){t();function t(){r.read().then(({done:r,value:i})=>{if(r)e.close();else{s+=i.byteLength;let r=new ProgressEvent(`progress`,{lengthComputable:o,loaded:s,total:a});for(let e=0,t=n.length;e{e.error(t)})}}});return new Response(c)}throw new la(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`,t)}).then(e=>{switch(s){case`arraybuffer`:return e.arrayBuffer();case`blob`:return e.blob();case`document`:return e.text().then(e=>new DOMParser().parseFromString(e,o));case`json`:return e.json();default:if(o===``)return e.text();{let t=/charset="?([^;"\s]*)"?/i.exec(o),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then(e=>r.decode(e))}}}).then(t=>{ra.add(`file:${e}`,t);let n=ca[e];delete ca[e];for(let e=0,r=n.length;e{let n=ca[e];if(n===void 0)throw this.manager.itemError(e),t;delete ca[e];for(let e=0,r=n.length;e{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}},da=new H,fa=new mt,pa=new H,ma=class extends un{constructor(){super(),this.isCamera=!0,this.type=`Camera`,this.matrixWorldInverse=new It,this.projectionMatrix=new It,this.projectionMatrixInverse=new It,this.coordinateSystem=Je,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorld.decompose(da,fa,pa),pa.x===1&&pa.y===1&&pa.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(da,fa,pa.set(1,1,1)).invert()}updateWorldMatrix(e,t,n=!1){super.updateWorldMatrix(e,t,n),this.matrixWorld.decompose(da,fa,pa),pa.x===1&&pa.y===1&&pa.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(da,fa,pa.set(1,1,1)).invert()}clone(){return new this.constructor().copy(this)}},ha=new H,ga=new V,_a=new V,va=class extends ma{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type=`PerspectiveCamera`,this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=ct*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(st*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return ct*2*Math.atan(Math.tan(st*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){ha.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(ha.x,ha.y).multiplyScalar(-e/ha.z),ha.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(ha.x,ha.y).multiplyScalar(-e/ha.z)}getViewSize(e,t){return this.getViewBounds(e,ga,_a),t.subVectors(_a,ga)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(st*.5*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,a=this.view;if(this.view!==null&&this.view.enabled){let e=a.fullWidth,o=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/o,r*=a.width/e,n*=a.height/o}let o=this.filmOffset;o!==0&&(i+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}},ya=class extends ma{constructor(e=-1,t=1,n=1,r=-1,i=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type=`OrthographicCamera`,this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,a){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-e,a=n+e,o=r+t,s=r-t;if(this.view!==null&&this.view.enabled){let e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,a=i+e*this.view.width,o-=t*this.view.offsetY,s=o-t*this.view.height}this.projectionMatrix.makeOrthographic(i,a,o,s,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}},ba=class extends pr{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type=`InstancedBufferGeometry`,this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){let e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}},xa=-90,Sa=1,Ca=class extends un{constructor(e,t,n){super(),this.type=`CubeCamera`,this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;let r=new va(xa,Sa,e,t);r.layers=this.layers,this.add(r);let i=new va(xa,Sa,e,t);i.layers=this.layers,this.add(i);let a=new va(xa,Sa,e,t);a.layers=this.layers,this.add(a);let o=new va(xa,Sa,e,t);o.layers=this.layers,this.add(o);let s=new va(xa,Sa,e,t);s.layers=this.layers,this.add(s);let c=new va(xa,Sa,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,o,s]=t;for(let e of t)this.remove(e);if(e===2e3)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.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(e===2001)n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.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 throw Error(`THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: `+e);for(let e of t)this.add(e),e.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();let{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[i,a,o,s,c,l]=this.children,u=e.getRenderTarget(),d=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;let m=n.texture.generateMipmaps;n.texture.generateMipmaps=!1;let h=!1;h=e.isWebGLRenderer===!0?e.state.buffers.depth.getReversed():e.reversedDepthBuffer,e.setRenderTarget(n,0,r),h&&e.autoClear===!1&&e.clearDepth(),e.render(t,i),e.setRenderTarget(n,1,r),h&&e.autoClear===!1&&e.clearDepth(),e.render(t,a),e.setRenderTarget(n,2,r),h&&e.autoClear===!1&&e.clearDepth(),e.render(t,o),e.setRenderTarget(n,3,r),h&&e.autoClear===!1&&e.clearDepth(),e.render(t,s),e.setRenderTarget(n,4,r),h&&e.autoClear===!1&&e.clearDepth(),e.render(t,c),n.texture.generateMipmaps=m,e.setRenderTarget(n,5,r),h&&e.autoClear===!1&&e.clearDepth(),e.render(t,l),e.setRenderTarget(u,d,f),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}},wa=class extends va{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}},Ta=`\\[\\]\\.:\\/`,Ea=RegExp(`[\\[\\]\\.:\\/]`,`g`),Da=`[^\\[\\]\\.:\\/]`,Oa=`[^`+Ta.replace(`\\.`,``)+`]`,ka=`((?:WC+[\\/:])*)`.replace(`WC`,Da),Aa=`(WCOD+)?`.replace(`WCOD`,Oa),ja=`(?:\\.(WC+)(?:\\[(.+)\\])?)?`.replace(`WC`,Da),Ma=`\\.(WC+)(?:\\[(.+)\\])?`.replace(`WC`,Da),Na=RegExp(`^`+ka+Aa+ja+Ma+`$`),Pa=[`material`,`materials`,`bones`,`map`],Fa=class{constructor(e,t,n){let r=n||Ia.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();let n=this._targetGroup.nCachedObjects_,r=this._bindings[n];r!==void 0&&r.getValue(e,t)}setValue(e,t){let n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Ia=class e{constructor(t,n,r){this.path=n,this.parsedPath=r||e.parseTrackName(n),this.node=e.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,n,r){return t&&t.isAnimationObjectGroup?new e.Composite(t,n,r):new e(t,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,`_`).replace(Ea,``)}static parseTrackName(e){let t=Na.exec(e);if(t===null)throw Error(`THREE.PropertyBinding: Cannot parse trackName: `+e);let n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(`.`);if(r!==void 0&&r!==-1){let e=n.nodeName.substring(r+1);Pa.indexOf(e)!==-1&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(n.propertyName===null||n.propertyName.length===0)throw Error(`THREE.PropertyBinding: can not parse propertyName from trackName: `+e);return n}static findNode(e,t){if(t===void 0||t===``||t===`.`||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){let n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){let n=function(e){for(let r=0;re.start-t.start);let t=0;for(let e=1;e 0 + vec4 plane; + #ifdef ALPHA_TO_COVERAGE + float distanceToPlane, distanceGradient; + float clipOpacity = 1.0; + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + if ( clipOpacity == 0.0 ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + float unionClipOpacity = 1.0; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + } + #pragma unroll_loop_end + clipOpacity *= 1.0 - unionClipOpacity; + #endif + diffuseColor.a *= clipOpacity; + if ( diffuseColor.a == 0.0 ) discard; + #else + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + bool clipped = true; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; + } + #pragma unroll_loop_end + if ( clipped ) discard; + #endif + #endif +#endif`,clipping_planes_pars_fragment:`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; +#endif`,clipping_planes_pars_vertex:`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,clipping_planes_vertex:`#if NUM_CLIPPING_PLANES > 0 + vClipPosition = - mvPosition.xyz; +#endif`,color_fragment:`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) + diffuseColor *= vColor; +#endif`,color_pars_fragment:`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#endif`,color_pars_vertex:`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) + varying vec4 vColor; +#endif`,color_vertex:`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) + vColor = vec4( 1.0 ); +#endif +#ifdef USE_COLOR_ALPHA + vColor *= color; +#elif defined( USE_COLOR ) + vColor.rgb *= color; +#endif +#ifdef USE_INSTANCING_COLOR + vColor.rgb *= instanceColor.rgb; +#endif +#ifdef USE_BATCHING_COLOR + vColor *= getBatchingColor( getIndirectIndex( gl_DrawID ) ); +#endif`,common:`#define PI 3.141592653589793 +#define PI2 6.283185307179586 +#define PI_HALF 1.5707963267948966 +#define RECIPROCAL_PI 0.3183098861837907 +#define RECIPROCAL_PI2 0.15915494309189535 +#define EPSILON 1e-6 +#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +#define whiteComplement( a ) ( 1.0 - saturate( a ) ) +float pow2( const in float x ) { return x*x; } +vec3 pow2( const in vec3 x ) { return x*x; } +float pow3( const in float x ) { return x*x*x; } +float pow4( const in float x ) { float x2 = x*x; return x2*x2; } +float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } +float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } +highp float rand( const in vec2 uv ) { + const highp float a = 12.9898, b = 78.233, c = 43758.5453; + highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); + return fract( sin( sn ) * c ); +} +#ifdef HIGH_PRECISION + float precisionSafeLength( vec3 v ) { return length( v ); } +#else + float precisionSafeLength( vec3 v ) { + float maxComponent = max3( abs( v ) ); + return length( v / maxComponent ) * maxComponent; + } +#endif +struct IncidentLight { + vec3 color; + vec3 direction; + bool visible; +}; +struct ReflectedLight { + vec3 directDiffuse; + vec3 directSpecular; + vec3 indirectDiffuse; + vec3 indirectSpecular; +}; +#ifdef USE_ALPHAHASH + varying vec3 vPosition; +#endif +vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); +} +#define inverseTransformDirection transformDirectionByInverseViewMatrix +vec3 transformNormalByInverseViewMatrix( in vec3 normal, in mat4 viewMatrix ) { + return normalize( ( vec4( normal, 0.0 ) * viewMatrix ).xyz ); +} +vec3 transformDirectionByInverseViewMatrix( in vec3 dir, in mat4 viewMatrix ) { + return normalize( ( vec4( dir, 0.0 ) * viewMatrix ).xyz ); +} +bool isPerspectiveMatrix( mat4 m ) { + return m[ 2 ][ 3 ] == - 1.0; +} +vec2 equirectUv( in vec3 dir ) { + float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; + float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; + return vec2( u, v ); +} +vec3 BRDF_Lambert( const in vec3 diffuseColor ) { + return RECIPROCAL_PI * diffuseColor; +} +vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} +float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} // validated`,cube_uv_reflection_fragment:`#ifdef ENVMAP_TYPE_CUBE_UV + #define cubeUV_minMipLevel 4.0 + #define cubeUV_minTileSize 16.0 + float getFace( vec3 direction ) { + vec3 absDirection = abs( direction ); + float face = - 1.0; + if ( absDirection.x > absDirection.z ) { + if ( absDirection.x > absDirection.y ) + face = direction.x > 0.0 ? 0.0 : 3.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } else { + if ( absDirection.z > absDirection.y ) + face = direction.z > 0.0 ? 2.0 : 5.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } + return face; + } + vec2 getUV( vec3 direction, float face ) { + vec2 uv; + if ( face == 0.0 ) { + uv = vec2( direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 1.0 ) { + uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); + } else if ( face == 2.0 ) { + uv = vec2( - direction.x, direction.y ) / abs( direction.z ); + } else if ( face == 3.0 ) { + uv = vec2( - direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 4.0 ) { + uv = vec2( - direction.x, direction.z ) / abs( direction.y ); + } else { + uv = vec2( direction.x, direction.y ) / abs( direction.z ); + } + return 0.5 * ( uv + 1.0 ); + } + vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { + float face = getFace( direction ); + float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); + mipInt = max( mipInt, cubeUV_minMipLevel ); + float faceSize = exp2( mipInt ); + highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; + if ( face > 2.0 ) { + uv.y += faceSize; + face -= 3.0; + } + uv.x += face * faceSize; + uv.x += filterInt * 3.0 * cubeUV_minTileSize; + uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); + uv.x *= CUBEUV_TEXEL_WIDTH; + uv.y *= CUBEUV_TEXEL_HEIGHT; + #ifdef texture2DGradEXT + return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; + #else + return texture2D( envMap, uv ).rgb; + #endif + } + #define cubeUV_r0 1.0 + #define cubeUV_m0 - 2.0 + #define cubeUV_r1 0.8 + #define cubeUV_m1 - 1.0 + #define cubeUV_r4 0.4 + #define cubeUV_m4 2.0 + #define cubeUV_r5 0.305 + #define cubeUV_m5 3.0 + #define cubeUV_r6 0.21 + #define cubeUV_m6 4.0 + float roughnessToMip( float roughness ) { + float mip = 0.0; + if ( roughness >= cubeUV_r1 ) { + mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; + } else if ( roughness >= cubeUV_r4 ) { + mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; + } else if ( roughness >= cubeUV_r5 ) { + mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; + } else if ( roughness >= cubeUV_r6 ) { + mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; + } else { + mip = - 2.0 * log2( 1.16 * roughness ); } + return mip; + } + vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { + float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); + float mipF = fract( mip ); + float mipInt = floor( mip ); + vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); + if ( mipF == 0.0 ) { + return vec4( color0, 1.0 ); + } else { + vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); + return vec4( mix( color0, color1, mipF ), 1.0 ); + } + } +#endif`,defaultnormal_vertex:`vec3 transformedNormal = objectNormal; +#ifdef USE_TANGENT + vec3 transformedTangent = objectTangent; +#endif +#ifdef USE_BATCHING + mat3 bm = mat3( batchingMatrix ); + transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); + transformedNormal = bm * transformedNormal; + #ifdef USE_TANGENT + transformedTangent = bm * transformedTangent; + #endif +#endif +#ifdef USE_INSTANCING + mat3 im = mat3( instanceMatrix ); + transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); + transformedNormal = im * transformedNormal; + #ifdef USE_TANGENT + transformedTangent = im * transformedTangent; + #endif +#endif +transformedNormal = normalMatrix * transformedNormal; +#ifdef FLIP_SIDED + transformedNormal = - transformedNormal; +#endif +#ifdef USE_TANGENT + transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; +#endif`,displacementmap_pars_vertex:`#ifdef USE_DISPLACEMENTMAP + uniform sampler2D displacementMap; + uniform float displacementScale; + uniform float displacementBias; +#endif`,displacementmap_vertex:`#ifdef USE_DISPLACEMENTMAP + transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); +#endif`,emissivemap_fragment:`#ifdef USE_EMISSIVEMAP + vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); + #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE + emissiveColor = sRGBTransferEOTF( emissiveColor ); + #endif + totalEmissiveRadiance *= emissiveColor.rgb; +#endif`,emissivemap_pars_fragment:`#ifdef USE_EMISSIVEMAP + uniform sampler2D emissiveMap; +#endif`,colorspace_fragment:`gl_FragColor = linearToOutputTexel( gl_FragColor );`,colorspace_pars_fragment:`vec4 LinearTransferOETF( in vec4 value ) { + return value; +} +vec4 sRGBTransferEOTF( in vec4 value ) { + return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a ); +} +vec4 sRGBTransferOETF( in vec4 value ) { + return 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 ); +}`,envmap_fragment:`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vec3 cameraToFrag; + if ( isOrthographic ) { + cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToFrag = normalize( vWorldPosition - cameraPosition ); + } + vec3 worldNormal = transformNormalByInverseViewMatrix( normal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vec3 reflectVec = reflect( cameraToFrag, worldNormal ); + #else + vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); + #endif + #else + vec3 reflectVec = vReflect; + #endif + #ifdef ENVMAP_TYPE_CUBE + vec4 envColor = textureCube( envMap, envMapRotation * reflectVec ); + #ifdef ENVMAP_BLENDING_MULTIPLY + outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_MIX ) + outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_ADD ) + outgoingLight += envColor.xyz * specularStrength * reflectivity; + #endif + #endif +#endif`,envmap_common_pars_fragment:`#ifdef USE_ENVMAP + uniform float envMapIntensity; + uniform mat3 envMapRotation; + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; + #else + uniform sampler2D envMap; + #endif +#endif`,envmap_pars_fragment:`#ifdef USE_ENVMAP + uniform float reflectivity; + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + varying vec3 vWorldPosition; + uniform float refractionRatio; + #else + varying vec3 vReflect; + #endif +#endif`,envmap_pars_vertex:`#ifdef USE_ENVMAP + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + + varying vec3 vWorldPosition; + #else + varying vec3 vReflect; + uniform float refractionRatio; + #endif +#endif`,envmap_physical_pars_fragment:`#ifdef USE_ENVMAP + vec3 getIBLIrradiance( const in vec3 normal ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 worldNormal = transformNormalByInverseViewMatrix( normal, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); + return PI * envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 reflectVec = reflect( - viewDir, normal ); + reflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) ); + reflectVec = transformDirectionByInverseViewMatrix( reflectVec, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); + return envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + #ifdef USE_RETROREFLECTION + vec3 getIBLRetroRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 retroVec = normalize( mix( viewDir, normal, pow4( roughness ) ) ); + retroVec = transformDirectionByInverseViewMatrix( retroVec, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * retroVec, roughness ); + return envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + #endif + #ifdef USE_ANISOTROPY + vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 bentNormal = cross( bitangent, viewDir ); + bentNormal = normalize( cross( bentNormal, bitangent ) ); + bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); + return getIBLRadiance( viewDir, bentNormal, roughness ); + #else + return vec3( 0.0 ); + #endif + } + #ifdef USE_RETROREFLECTION + vec3 getIBLAnisotropyRetroRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 bentNormal = cross( bitangent, viewDir ); + bentNormal = normalize( cross( bentNormal, bitangent ) ); + bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); + return getIBLRetroRadiance( viewDir, bentNormal, roughness ); + #else + return vec3( 0.0 ); + #endif + } + #endif + #endif +#endif`,envmap_vertex:`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vWorldPosition = worldPosition.xyz; + #else + vec3 cameraToVertex; + if ( isOrthographic ) { + cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); + } + vec3 worldNormal = transformNormalByInverseViewMatrix( transformedNormal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vReflect = reflect( cameraToVertex, worldNormal ); + #else + vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); + #endif + #endif +#endif`,fog_vertex:`#ifdef USE_FOG + vFogDepth = - mvPosition.z; +#endif`,fog_pars_vertex:`#ifdef USE_FOG + varying float vFogDepth; +#endif`,fog_fragment:`#ifdef USE_FOG + #ifdef FOG_EXP2 + float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); + #else + float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); + #endif + gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); +#endif`,fog_pars_fragment:`#ifdef USE_FOG + uniform vec3 fogColor; + varying float vFogDepth; + #ifdef FOG_EXP2 + uniform float fogDensity; + #else + uniform float fogNear; + uniform float fogFar; + #endif +#endif`,gradientmap_pars_fragment:`#ifdef USE_GRADIENTMAP + uniform sampler2D gradientMap; +#endif +vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { + float dotNL = dot( normal, lightDirection ); + vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); + #ifdef USE_GRADIENTMAP + return vec3( texture2D( gradientMap, coord ).r ); + #else + vec2 fw = fwidth( coord ) * 0.5; + return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); + #endif +}`,lightmap_pars_fragment:`#ifdef USE_LIGHTMAP + uniform sampler2D lightMap; + uniform float lightMapIntensity; +#endif`,lights_lambert_fragment:`LambertMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularStrength = specularStrength;`,lights_lambert_pars_fragment:`varying vec3 vViewPosition; +struct LambertMaterial { + vec3 diffuseColor; + float specularStrength; +}; +void 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 ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void 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 ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Lambert +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,lights_pars_begin:`uniform bool receiveShadow; +uniform vec3 ambientLightColor; +#if defined( USE_LIGHT_PROBES ) + uniform vec3 lightProbe[ 9 ]; +#endif +vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { + float x = normal.x, y = normal.y, z = normal.z; + vec3 result = shCoefficients[ 0 ] * 0.886227; + result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; + result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; + result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; + result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; + result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; + result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); + result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; + result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); + return result; +} +vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { + vec3 worldNormal = transformNormalByInverseViewMatrix( normal, viewMatrix ); + vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); + return irradiance; +} +vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { + vec3 irradiance = ambientLightColor; + return irradiance; +} +float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { + float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); + if ( cutoffDistance > 0.0 ) { + distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); + } + return distanceFalloff; +} +float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { + return smoothstep( coneCosine, penumbraCosine, angleCosine ); +} +#if NUM_SUN_LIGHTS > 0 + struct SunLight { + vec3 direction; + vec3 color; + }; + uniform SunLight sunLights[ NUM_SUN_LIGHTS ]; + void getSunLightInfo( const in SunLight sunLight, out IncidentLight light ) { + light.color = sunLight.color; + light.direction = sunLight.direction; + light.visible = true; + } +#endif +#if NUM_DIR_LIGHTS > 0 + struct DirectionalLight { + vec3 direction; + vec3 color; + }; + uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; + void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { + light.color = directionalLight.color; + light.direction = directionalLight.direction; + light.visible = true; + } +#endif +#if NUM_POINT_LIGHTS > 0 + struct PointLight { + vec3 position; + vec3 color; + float distance; + float decay; + }; + uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; + void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { + vec3 lVector = pointLight.position - geometryPosition; + light.direction = normalize( lVector ); + float lightDistance = length( lVector ); + light.color = pointLight.color; + light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } +#endif +#if NUM_SPOT_LIGHTS > 0 + struct SpotLight { + vec3 position; + vec3 direction; + vec3 color; + float distance; + float decay; + float coneCos; + float penumbraCos; + }; + uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; + void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { + vec3 lVector = spotLight.position - geometryPosition; + light.direction = normalize( lVector ); + float angleCos = dot( light.direction, spotLight.direction ); + float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); + if ( spotAttenuation > 0.0 ) { + float lightDistance = length( lVector ); + light.color = spotLight.color * spotAttenuation; + light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } else { + light.color = vec3( 0.0 ); + light.visible = false; + } + } +#endif +#if NUM_RECT_AREA_LIGHTS > 0 + struct RectAreaLight { + vec3 color; + vec3 position; + vec3 halfWidth; + vec3 halfHeight; + }; + uniform sampler2D ltc_1; uniform sampler2D ltc_2; + uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; +#endif +#if NUM_HEMI_LIGHTS > 0 + struct HemisphereLight { + vec3 direction; + vec3 skyColor; + vec3 groundColor; + }; + uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; + vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { + float dotNL = dot( normal, hemiLight.direction ); + float hemiDiffuseWeight = 0.5 * dotNL + 0.5; + vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); + return irradiance; + } +#endif +#include `,lights_toon_fragment:`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,lights_toon_pars_fragment:`varying vec3 vViewPosition; +struct ToonMaterial { + vec3 diffuseColor; +}; +void 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 ) { + vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void 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 ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Toon +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,lights_phong_fragment:`BlinnPhongMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularColor = specular; +material.specularShininess = shininess; +material.specularStrength = specularStrength;`,lights_phong_pars_fragment:`varying vec3 vViewPosition; +struct BlinnPhongMaterial { + vec3 diffuseColor; + vec3 specularColor; + float specularShininess; + float specularStrength; +}; +void 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 ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; +} +void 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 ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_BlinnPhong +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,lights_physical_fragment:`PhysicalMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor ); +material.metalness = metalnessFactor; +vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); +float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); +material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; +material.roughness = min( material.roughness, 1.0 ); +#ifdef IOR + material.ior = ior; + #ifdef USE_SPECULAR + float specularIntensityFactor = specularIntensity; + vec3 specularColorFactor = specularColor; + #ifdef USE_SPECULAR_COLORMAP + specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; + #endif + material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); + #else + float specularIntensityFactor = 1.0; + vec3 specularColorFactor = vec3( 1.0 ); + material.specularF90 = 1.0; + #endif + material.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor; + material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); +#else + material.specularColor = vec3( 0.04 ); + material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); + material.specularF90 = 1.0; +#endif +#ifdef USE_CLEARCOAT + material.clearcoat = clearcoat; + material.clearcoatRoughness = clearcoatRoughness; + material.clearcoatF0 = vec3( 0.04 ); + material.clearcoatF90 = 1.0; + #ifdef USE_CLEARCOATMAP + material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; + #endif + #ifdef USE_CLEARCOAT_ROUGHNESSMAP + material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; + #endif + material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); + material.clearcoatRoughness += geometryRoughness; + material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); +#endif +#ifdef USE_DISPERSION + material.dispersion = dispersion; +#endif +#ifdef USE_RETROREFLECTION + material.retroreflectivity = retroreflectivity; +#endif +#ifdef USE_IRIDESCENCE + material.iridescence = iridescence; + material.iridescenceIOR = iridescenceIOR; + #ifdef USE_IRIDESCENCEMAP + material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; + #endif + #ifdef USE_IRIDESCENCE_THICKNESSMAP + material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; + #else + material.iridescenceThickness = iridescenceThicknessMaximum; + #endif +#endif +#ifdef USE_SHEEN + material.sheenColor = sheenColor; + #ifdef USE_SHEEN_COLORMAP + material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; + #endif + material.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 ); + #ifdef USE_SHEEN_ROUGHNESSMAP + material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; + #endif +#endif +#ifdef USE_ANISOTROPY + #ifdef USE_ANISOTROPYMAP + mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); + vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; + vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; + #else + vec2 anisotropyV = anisotropyVector; + #endif + material.anisotropy = length( anisotropyV ); + if( material.anisotropy == 0.0 ) { + anisotropyV = vec2( 1.0, 0.0 ); + } else { + anisotropyV /= material.anisotropy; + material.anisotropy = saturate( material.anisotropy ); + } + material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); + material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; + material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; +#endif`,lights_physical_pars_fragment:`uniform sampler2D dfgLUT; +struct PhysicalMaterial { + vec3 diffuseColor; + vec3 diffuseContribution; + vec3 specularColor; + vec3 specularColorBlended; + float roughness; + float metalness; + float specularF90; + float dispersion; + vec2 dfg; + vec3 multiScatteringCompensation; + #ifdef USE_RETROREFLECTION + float retroreflectivity; + #endif + #ifdef USE_CLEARCOAT + float clearcoat; + float clearcoatRoughness; + vec3 clearcoatF0; + float clearcoatF90; + #endif + #ifdef USE_IRIDESCENCE + float iridescence; + float iridescenceIOR; + float iridescenceThickness; + vec3 iridescenceFresnel; + vec3 iridescenceF0Dielectric; + vec3 iridescenceF0Metallic; + #endif + #ifdef USE_SHEEN + vec3 sheenColor; + float sheenRoughness; + #endif + #ifdef IOR + float ior; + #endif + #ifdef USE_TRANSMISSION + float transmission; + float transmissionAlpha; + float thickness; + float attenuationDistance; + vec3 attenuationColor; + #endif + #ifdef USE_ANISOTROPY + float anisotropy; + float alphaT; + vec3 anisotropyT; + vec3 anisotropyB; + #endif +}; +vec3 clearcoatSpecularDirect = vec3( 0.0 ); +vec3 clearcoatSpecularIndirect = vec3( 0.0 ); +vec3 sheenSpecularDirect = vec3( 0.0 ); +vec3 sheenSpecularIndirect = vec3(0.0 ); +vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { + float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); + float x2 = x * x; + float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); + return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); +} +float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { + float a2 = pow2( alpha ); + float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); + float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); + return 0.5 / max( gv + gl, EPSILON ); +} +float D_GGX( const in float alpha, const in float dotNH ) { + float a2 = pow2( alpha ); + float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; + return RECIPROCAL_PI * a2 / pow2( denom ); +} +#ifdef USE_ANISOTROPY + float 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 ) { + float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); + float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); + return 0.5 / max( gv + gl, EPSILON ); + } + float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { + float a2 = alphaT * alphaB; + highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); + highp float v2 = dot( v, v ); + float w2 = a2 / v2; + return RECIPROCAL_PI * a2 * pow2 ( w2 ); + } +#endif +#ifdef USE_CLEARCOAT + vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { + vec3 f0 = material.clearcoatF0; + float f90 = material.clearcoatF90; + float roughness = material.clearcoatRoughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + return F * ( V * D ); + } +#endif +vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { + vec3 f0 = material.specularColorBlended; + float f90 = material.specularF90; + float roughness = material.roughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + #ifdef USE_IRIDESCENCE + F = mix( F, material.iridescenceFresnel, material.iridescence ); + #endif + #ifdef USE_ANISOTROPY + float dotTL = dot( material.anisotropyT, lightDir ); + float dotTV = dot( material.anisotropyT, viewDir ); + float dotTH = dot( material.anisotropyT, halfDir ); + float dotBL = dot( material.anisotropyB, lightDir ); + float dotBV = dot( material.anisotropyB, viewDir ); + float dotBH = dot( material.anisotropyB, halfDir ); + float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); + float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); + #else + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + #endif + return F * ( V * D ); +} +vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { + const float LUT_SIZE = 64.0; + const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; + const float LUT_BIAS = 0.5 / LUT_SIZE; + float dotNV = saturate( dot( N, V ) ); + vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); + uv = uv * LUT_SCALE + LUT_BIAS; + return uv; +} +float LTC_ClippedSphereFormFactor( const in vec3 f ) { + float l = length( f ); + return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); +} +vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { + float x = dot( v1, v2 ); + float y = abs( x ); + float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; + float b = 3.4175940 + ( 4.1616724 + y ) * y; + float v = a / b; + float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; + return cross( v1, v2 ) * theta_sintheta; +} +vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { + vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; + vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; + vec3 lightNormal = cross( v1, v2 ); + if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); + vec3 T1, T2; + T1 = normalize( V - N * dot( V, N ) ); + T2 = - cross( N, T1 ); + mat3 mat = mInv * transpose( mat3( T1, T2, N ) ); + vec3 coords[ 4 ]; + coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); + coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); + coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); + coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); + coords[ 0 ] = normalize( coords[ 0 ] ); + coords[ 1 ] = normalize( coords[ 1 ] ); + coords[ 2 ] = normalize( coords[ 2 ] ); + coords[ 3 ] = normalize( coords[ 3 ] ); + vec3 vectorFormFactor = vec3( 0.0 ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); + float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); + return vec3( result ); +} +#if defined( USE_SHEEN ) +float D_Charlie( float roughness, float dotNH ) { + float alpha = pow2( roughness ); + float invAlpha = 1.0 / alpha; + float cos2h = dotNH * dotNH; + float sin2h = max( 1.0 - cos2h, 0.0078125 ); + return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); +} +float V_Neubelt( float dotNV, float dotNL ) { + return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); +} +vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float D = D_Charlie( sheenRoughness, dotNH ); + float V = V_Neubelt( dotNV, dotNL ); + return sheenColor * ( D * V ); +} +#endif +float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + float r2 = roughness * roughness; + float rInv = 1.0 / ( roughness + 0.1 ); + float a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv; + float b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv; + float DG = exp( a * dotNV + b ); + return saturate( DG ); +} +vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg; + return specularColor * fab.x + specularF90 * fab.y; +} +#ifdef USE_IRIDESCENCE +void computeMultiscatteringIridescence( const in vec2 fab, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, inout vec3 singleScatter, inout vec3 multiScatter ) { +#else +void computeMultiscattering( const in vec2 fab, const in vec3 specularColor, const in float specularF90, inout vec3 singleScatter, inout vec3 multiScatter ) { +#endif + #ifdef USE_IRIDESCENCE + vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); + #else + vec3 Fr = specularColor; + #endif + vec3 FssEss = Fr * fab.x + specularF90 * fab.y; + float Ess = fab.x + fab.y; + float Ems = 1.0 - Ess; + vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); + singleScatter += FssEss; + multiScatter += Fms * Ems; +} +#if NUM_RECT_AREA_LIGHTS > 0 + void 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 ) { + vec3 normal = geometryNormal; + vec3 viewDir = geometryViewDir; + vec3 position = geometryPosition; + vec3 lightPos = rectAreaLight.position; + vec3 halfWidth = rectAreaLight.halfWidth; + vec3 halfHeight = rectAreaLight.halfHeight; + vec3 lightColor = rectAreaLight.color; + float roughness = material.roughness; + vec3 rectCoords[ 4 ]; + rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; + rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; + rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; + vec2 uv = LTC_Uv( normal, viewDir, roughness ); + vec4 t1 = texture2D( ltc_1, uv ); + vec4 t2 = texture2D( ltc_2, uv ); + mat3 mInv = mat3( + vec3( t1.x, 0, t1.y ), + vec3( 0, 1, 0 ), + vec3( t1.z, 0, t1.w ) + ); + vec3 fresnel = ( material.specularColorBlended * t2.x + ( material.specularF90 - material.specularColorBlended ) * t2.y ); + reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); + reflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); + #ifdef USE_CLEARCOAT + vec3 Ncc = geometryClearcoatNormal; + vec2 uvClearcoat = LTC_Uv( Ncc, viewDir, material.clearcoatRoughness ); + vec4 t1Clearcoat = texture2D( ltc_1, uvClearcoat ); + vec4 t2Clearcoat = texture2D( ltc_2, uvClearcoat ); + mat3 mInvClearcoat = mat3( + vec3( t1Clearcoat.x, 0, t1Clearcoat.y ), + vec3( 0, 1, 0 ), + vec3( t1Clearcoat.z, 0, t1Clearcoat.w ) + ); + vec3 fresnelClearcoat = material.clearcoatF0 * t2Clearcoat.x + ( material.clearcoatF90 - material.clearcoatF0 ) * t2Clearcoat.y; + clearcoatSpecularDirect += lightColor * fresnelClearcoat * LTC_Evaluate( Ncc, viewDir, position, mInvClearcoat, rectCoords ); + #endif + } +#endif +void 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 ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + #ifdef USE_CLEARCOAT + float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); + vec3 ccIrradiance = dotNLcc * directLight.color; + clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); + #endif + #ifdef USE_SHEEN + + sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); + + float sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); + float sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness ); + + float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL ); + + irradiance *= sheenEnergyComp; + + #endif + vec3 specularBRDF = BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); + #ifdef USE_RETROREFLECTION + vec3 retroViewDir = reflect( - geometryViewDir, geometryNormal ); + vec3 retroSpecularBRDF = BRDF_GGX( directLight.direction, retroViewDir, geometryNormal, material ); + specularBRDF = mix( specularBRDF, retroSpecularBRDF, saturate( material.retroreflectivity ) ); + #endif + reflectedLight.directSpecular += irradiance * specularBRDF * material.multiScatteringCompensation; + vec3 halfDir = normalize( directLight.direction + geometryViewDir ); + float dotVH = saturate( dot( geometryViewDir, halfDir ) ); + vec3 F = F_Schlick( material.specularColor, material.specularF90, dotVH ); + #ifdef USE_RETROREFLECTION + vec3 retroHalfDir = normalize( directLight.direction + retroViewDir ); + float dotRetroVH = saturate( dot( retroViewDir, retroHalfDir ) ); + vec3 retroF = F_Schlick( material.specularColor, material.specularF90, dotRetroVH ); + F = mix( F, retroF, saturate( material.retroreflectivity ) ); + #endif + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution ) * ( 1.0 - F ); +} +void 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 ) { + vec3 singleScattering = vec3( 0.0 ); + vec3 multiScattering = vec3( 0.0 ); + #ifdef USE_IRIDESCENCE + computeMultiscatteringIridescence( material.dfg, material.specularColor, material.specularF90, material.iridescence, material.iridescenceF0Dielectric, singleScattering, multiScattering ); + #else + computeMultiscattering( material.dfg, material.specularColor, material.specularF90, singleScattering, multiScattering ); + #endif + vec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution ) * ( 1.0 - singleScattering - multiScattering ); + #ifdef USE_SHEEN + float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); + sheenSpecularIndirect += irradiance * material.sheenColor * sheenAlbedo * RECIPROCAL_PI; + float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; + diffuse *= sheenEnergyComp; + #endif + reflectedLight.indirectDiffuse += diffuse; +} +void 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) { + #ifdef USE_CLEARCOAT + clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); + #endif + #ifdef USE_SHEEN + sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI; + #endif + vec3 singleScatteringDielectric = vec3( 0.0 ); + vec3 multiScatteringDielectric = vec3( 0.0 ); + vec3 singleScatteringMetallic = vec3( 0.0 ); + vec3 multiScatteringMetallic = vec3( 0.0 ); + #ifdef USE_IRIDESCENCE + computeMultiscatteringIridescence( material.dfg, material.specularColor, material.specularF90, material.iridescence, material.iridescenceF0Dielectric, singleScatteringDielectric, multiScatteringDielectric ); + computeMultiscatteringIridescence( material.dfg, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceF0Metallic, singleScatteringMetallic, multiScatteringMetallic ); + #else + computeMultiscattering( material.dfg, material.specularColor, material.specularF90, singleScatteringDielectric, multiScatteringDielectric ); + computeMultiscattering( material.dfg, material.diffuseColor, material.specularF90, singleScatteringMetallic, multiScatteringMetallic ); + #endif + vec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness ); + vec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness ); + vec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric; + vec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric ); + vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; + vec3 indirectSpecular = radiance * singleScattering; + indirectSpecular += multiScattering * cosineWeightedIrradiance; + vec3 indirectDiffuse = diffuse * cosineWeightedIrradiance; + #ifdef USE_SHEEN + float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); + float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; + indirectSpecular *= sheenEnergyComp; + indirectDiffuse *= sheenEnergyComp; + #endif + reflectedLight.indirectSpecular += indirectSpecular; + reflectedLight.indirectDiffuse += indirectDiffuse; +} +#define RE_Direct RE_Direct_Physical +#define RE_Direct_RectArea RE_Direct_RectArea_Physical +#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical +#define RE_IndirectSpecular RE_IndirectSpecular_Physical +float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { + return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); +}`,lights_fragment_begin:` +vec3 geometryPosition = - vViewPosition; +vec3 geometryNormal = normal; +vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); +vec3 geometryClearcoatNormal = vec3( 0.0 ); +#ifdef USE_CLEARCOAT + geometryClearcoatNormal = clearcoatNormal; +#endif +#ifdef USE_IRIDESCENCE + float dotNVi = saturate( dot( normal, geometryViewDir ) ); + if ( material.iridescenceThickness == 0.0 ) { + material.iridescence = 0.0; + } else { + material.iridescence = saturate( material.iridescence ); + } + if ( material.iridescence > 0.0 ) { + vec3 iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); + vec3 iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor ); + material.iridescenceFresnel = mix( iridescenceFresnelDielectric, iridescenceFresnelMetallic, material.metalness ); + material.iridescenceF0Dielectric = Schlick_to_F0( iridescenceFresnelDielectric, 1.0, dotNVi ); + material.iridescenceF0Metallic = Schlick_to_F0( iridescenceFresnelMetallic, 1.0, dotNVi ); + } +#endif +#ifdef STANDARD + float dotNVms = saturate( dot( geometryNormal, geometryViewDir ) ); + material.dfg = texture2D( dfgLUT, vec2( material.roughness, dotNVms ) ).rg; + #if ( NUM_SUN_LIGHTS > 0 || NUM_DIR_LIGHTS > 0 || NUM_POINT_LIGHTS > 0 || NUM_SPOT_LIGHTS > 0 ) + float EssMs = material.dfg.x + material.dfg.y; + material.multiScatteringCompensation = 1.0 + material.specularColorBlended * ( 1.0 / EssMs - 1.0 ); + #endif +#endif +IncidentLight directLight; +#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) + PointLight pointLight; + #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + pointLight = pointLights[ i ]; + getPointLightInfo( pointLight, geometryPosition, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) + pointLightShadow = pointLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) + SpotLight spotLight; + vec4 spotColor; + vec3 spotLightCoord; + bool inSpotLightMap; + #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + spotLight = spotLights[ i ]; + getSpotLightInfo( spotLight, geometryPosition, directLight ); + #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX + #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS + #else + #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #endif + #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) + spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; + inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); + spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); + directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; + #endif + #undef SPOT_LIGHT_MAP_INDEX + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + spotLightShadow = spotLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_SUN_LIGHTS > 0 ) && defined( RE_Direct ) + SunLight sunLight; + #if defined( USE_SHADOWMAP ) && NUM_SUN_LIGHT_SHADOWS > 0 + SunLightShadow sunLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SUN_LIGHTS; i ++ ) { + sunLight = sunLights[ i ]; + getSunLightInfo( sunLight, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SUN_LIGHT_SHADOWS ) + sunLightShadow = sunLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getSunShadow( sunShadowMap[ i ], sunLightShadow, UNROLLED_LOOP_INDEX ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) + DirectionalLight directionalLight; + #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + directionalLight = directionalLights[ i ]; + getDirectionalLightInfo( directionalLight, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + directionalLightShadow = directionalLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) + RectAreaLight rectAreaLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + rectAreaLight = rectAreaLights[ i ]; + RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if defined( RE_IndirectDiffuse ) + vec3 iblIrradiance = vec3( 0.0 ); + vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); + #if defined( USE_LIGHT_PROBES ) + irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); + #endif + #if ( NUM_HEMI_LIGHTS > 0 ) + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); + } + #pragma unroll_loop_end + #endif + #ifdef USE_LIGHT_PROBES_GRID + vec3 probeWorldPos = ( ( vec4( geometryPosition, 1.0 ) - viewMatrix[ 3 ] ) * viewMatrix ).xyz; + vec3 probeWorldNormal = transformNormalByInverseViewMatrix( geometryNormal, viewMatrix ); + irradiance += getLightProbeGridIrradiance( probeWorldPos, probeWorldNormal ); + #endif +#endif +#if defined( RE_IndirectSpecular ) + vec3 radiance = vec3( 0.0 ); + vec3 clearcoatRadiance = vec3( 0.0 ); +#endif`,lights_fragment_maps:`#if defined( RE_IndirectDiffuse ) + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + irradiance += lightMapIrradiance; + #endif + #if defined( USE_ENVMAP ) && defined( ENVMAP_TYPE_CUBE_UV ) + #if defined( STANDARD ) || defined( LAMBERT ) || defined( PHONG ) + iblIrradiance += getIBLIrradiance( geometryNormal ); + #endif + #endif +#endif +#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) + #ifdef USE_ANISOTROPY + vec3 iblRadiance = getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); + #else + vec3 iblRadiance = getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); + #endif + #ifdef USE_RETROREFLECTION + #ifdef USE_ANISOTROPY + vec3 retroIBLRadiance = getIBLAnisotropyRetroRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); + #else + vec3 retroIBLRadiance = getIBLRetroRadiance( geometryViewDir, geometryNormal, material.roughness ); + #endif + iblRadiance = mix( iblRadiance, retroIBLRadiance, saturate( material.retroreflectivity ) ); + #endif + radiance += iblRadiance; + #ifdef USE_CLEARCOAT + clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); + #endif +#endif`,lights_fragment_end:`#if defined( RE_IndirectDiffuse ) + #if defined( LAMBERT ) || defined( PHONG ) + irradiance += iblIrradiance; + #endif + RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); +#endif +#if defined( RE_IndirectSpecular ) + RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); +#endif`,lightprobes_pars_fragment:`#ifdef USE_LIGHT_PROBES_GRID +uniform highp sampler3D probesSH; +uniform vec3 probesMin; +uniform vec3 probesMax; +uniform vec3 probesResolution; +vec3 getLightProbeGridIrradiance( vec3 worldPos, vec3 worldNormal ) { + vec3 res = probesResolution; + vec3 gridRange = probesMax - probesMin; + vec3 resMinusOne = res - 1.0; + vec3 probeSpacing = gridRange / resMinusOne; + vec3 samplePos = worldPos + worldNormal * probeSpacing * 0.5; + vec3 uvw = clamp( ( samplePos - probesMin ) / gridRange, 0.0, 1.0 ); + uvw = uvw * resMinusOne / res + 0.5 / res; + float nz = res.z; + float paddedSlices = nz + 2.0; + float atlasDepth = 7.0 * paddedSlices; + float uvZBase = uvw.z * nz + 1.0; + vec4 s0 = texture( probesSH, vec3( uvw.xy, ( uvZBase ) / atlasDepth ) ); + vec4 s1 = texture( probesSH, vec3( uvw.xy, ( uvZBase + paddedSlices ) / atlasDepth ) ); + vec4 s2 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 2.0 * paddedSlices ) / atlasDepth ) ); + vec4 s3 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 3.0 * paddedSlices ) / atlasDepth ) ); + vec4 s4 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 4.0 * paddedSlices ) / atlasDepth ) ); + vec4 s5 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 5.0 * paddedSlices ) / atlasDepth ) ); + vec4 s6 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 6.0 * paddedSlices ) / atlasDepth ) ); + vec3 c0 = s0.xyz; + vec3 c1 = vec3( s0.w, s1.xy ); + vec3 c2 = vec3( s1.zw, s2.x ); + vec3 c3 = s2.yzw; + vec3 c4 = s3.xyz; + vec3 c5 = vec3( s3.w, s4.xy ); + vec3 c6 = vec3( s4.zw, s5.x ); + vec3 c7 = s5.yzw; + vec3 c8 = s6.xyz; + float x = worldNormal.x, y = worldNormal.y, z = worldNormal.z; + vec3 result = c0 * 0.886227; + result += c1 * 2.0 * 0.511664 * y; + result += c2 * 2.0 * 0.511664 * z; + result += c3 * 2.0 * 0.511664 * x; + result += c4 * 2.0 * 0.429043 * x * y; + result += c5 * 2.0 * 0.429043 * y * z; + result += c6 * ( 0.743125 * z * z - 0.247708 ); + result += c7 * 2.0 * 0.429043 * x * z; + result += c8 * 0.429043 * ( x * x - y * y ); + return max( result, vec3( 0.0 ) ); +} +#endif`,logdepthbuf_fragment:`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) + gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,logdepthbuf_pars_fragment:`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) + uniform float logDepthBufFC; + varying float vFragDepth; + varying float vIsPerspective; +#endif`,logdepthbuf_pars_vertex:`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER + varying float vFragDepth; + varying float vIsPerspective; +#endif`,logdepthbuf_vertex:`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER + vFragDepth = 1.0 + gl_Position.w; + vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); +#endif`,map_fragment:`#ifdef USE_MAP + vec4 sampledDiffuseColor = texture2D( map, vMapUv ); + #ifdef DECODE_VIDEO_TEXTURE + sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); + #endif + diffuseColor *= sampledDiffuseColor; +#endif`,map_pars_fragment:`#ifdef USE_MAP + uniform sampler2D map; +#endif`,map_particle_fragment:`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + #if defined( USE_POINTS_UV ) + vec2 uv = vUv; + #else + vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; + #endif +#endif +#ifdef USE_MAP + diffuseColor *= texture2D( map, uv ); +#endif +#ifdef USE_ALPHAMAP + diffuseColor.a *= texture2D( alphaMap, uv ).g; +#endif`,map_particle_pars_fragment:`#if defined( USE_POINTS_UV ) + varying vec2 vUv; +#else + #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + uniform mat3 uvTransform; + #endif +#endif +#ifdef USE_MAP + uniform sampler2D map; +#endif +#ifdef USE_ALPHAMAP + uniform sampler2D alphaMap; +#endif`,metalnessmap_fragment:`float metalnessFactor = metalness; +#ifdef USE_METALNESSMAP + vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); + metalnessFactor *= texelMetalness.b; +#endif`,metalnessmap_pars_fragment:`#ifdef USE_METALNESSMAP + uniform sampler2D metalnessMap; +#endif`,morphinstance_vertex:`#ifdef USE_INSTANCING_MORPH + float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; + } +#endif`,morphcolor_vertex:`#if defined( USE_MORPHCOLORS ) + vColor *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + #if defined( USE_COLOR_ALPHA ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; + #elif defined( USE_COLOR ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; + #endif + } +#endif`,morphnormal_vertex:`#ifdef USE_MORPHNORMALS + objectNormal *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; + } +#endif`,morphtarget_pars_vertex:`#ifdef USE_MORPHTARGETS + #ifndef USE_INSTANCING_MORPH + uniform float morphTargetBaseInfluence; + uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + #endif + uniform sampler2DArray morphTargetsTexture; + uniform ivec2 morphTargetsTextureSize; + vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { + int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; + int y = texelIndex / morphTargetsTextureSize.x; + int x = texelIndex - y * morphTargetsTextureSize.x; + ivec3 morphUV = ivec3( x, y, morphTargetIndex ); + return texelFetch( morphTargetsTexture, morphUV, 0 ); + } +#endif`,morphtarget_vertex:`#ifdef USE_MORPHTARGETS + transformed *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; + } +#endif`,normal_fragment_begin:`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#ifdef FLAT_SHADED + vec3 fdx = dFdx( vViewPosition ); + vec3 fdy = dFdy( vViewPosition ); + vec3 normal = normalize( cross( fdx, fdy ) ); +#else + vec3 normal = normalize( vNormal ); + #ifdef DOUBLE_SIDED + normal *= faceDirection; + #endif +#endif +#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) + #ifdef USE_TANGENT + mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn = getTangentFrame( - vViewPosition, normal, + #if defined( USE_NORMALMAP ) + vNormalMapUv + #elif defined( USE_CLEARCOAT_NORMALMAP ) + vClearcoatNormalMapUv + #else + vUv + #endif + ); + #endif + #ifdef DOUBLE_SIDED + tbn[0] *= faceDirection; + tbn[1] *= faceDirection; + #endif +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + #ifdef USE_TANGENT + mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); + #endif + #ifdef DOUBLE_SIDED + tbn2[0] *= faceDirection; + tbn2[1] *= faceDirection; + #endif +#endif +vec3 nonPerturbedNormal = normal;`,normal_fragment_maps:`#ifdef USE_NORMALMAP_OBJECTSPACE + normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + #ifdef FLIP_SIDED + normal = - normal; + #endif + #ifdef DOUBLE_SIDED + normal = normal * faceDirection; + #endif + normal = normalize( normalMatrix * normal ); +#elif defined( USE_NORMALMAP_TANGENTSPACE ) + vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + #if defined( USE_PACKED_NORMALMAP ) + mapN = vec3( mapN.xy, sqrt( saturate( 1.0 - dot( mapN.xy, mapN.xy ) ) ) ); + #endif + mapN.xy *= normalScale; + normal = normalize( tbn * mapN ); +#elif defined( USE_BUMPMAP ) + normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); +#endif`,normal_pars_fragment:`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,normal_pars_vertex:`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,normal_vertex:`#ifndef FLAT_SHADED + vNormal = normalize( transformedNormal ); + #ifdef USE_TANGENT + vTangent = normalize( transformedTangent ); + vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); + #ifdef FLIP_SIDED + vBitangent = - vBitangent; + #endif + #endif +#endif`,normalmap_pars_fragment:`#ifdef USE_NORMALMAP + uniform sampler2D normalMap; + uniform vec2 normalScale; +#endif +#ifdef USE_NORMALMAP_OBJECTSPACE + uniform mat3 normalMatrix; +#endif +#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) + mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { + vec3 q0 = dFdx( eye_pos.xyz ); + vec3 q1 = dFdy( eye_pos.xyz ); + vec2 st0 = dFdx( uv.st ); + vec2 st1 = dFdy( uv.st ); + vec3 N = surf_norm; + vec3 q1perp = cross( q1, N ); + vec3 q0perp = cross( N, q0 ); + vec3 T = q1perp * st0.x + q0perp * st1.x; + vec3 B = q1perp * st0.y + q0perp * st1.y; + float det = max( dot( T, T ), dot( B, B ) ); + float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); + return mat3( T * scale, B * scale, N ); + } +#endif`,clearcoat_normal_fragment_begin:`#ifdef USE_CLEARCOAT + vec3 clearcoatNormal = nonPerturbedNormal; +#endif`,clearcoat_normal_fragment_maps:`#ifdef USE_CLEARCOAT_NORMALMAP + vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; + clearcoatMapN.xy *= clearcoatNormalScale; + clearcoatNormal = normalize( tbn2 * clearcoatMapN ); +#endif`,clearcoat_pars_fragment:`#ifdef USE_CLEARCOATMAP + uniform sampler2D clearcoatMap; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform sampler2D clearcoatNormalMap; + uniform vec2 clearcoatNormalScale; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform sampler2D clearcoatRoughnessMap; +#endif`,iridescence_pars_fragment:`#ifdef USE_IRIDESCENCEMAP + uniform sampler2D iridescenceMap; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform sampler2D iridescenceThicknessMap; +#endif`,opaque_fragment:`#ifdef OPAQUE +diffuseColor.a = 1.0; +#endif +#ifdef USE_TRANSMISSION +diffuseColor.a *= material.transmissionAlpha; +#endif +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,packing:`vec3 packNormalToRGB( const in vec3 normal ) { + return normalize( normal ) * 0.5 + 0.5; +} +vec3 unpackRGBToNormal( const in vec3 rgb ) { + return 2.0 * rgb.xyz - 1.0; +} +const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.; +const float Inv255 = 1. / 255.; +const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 ); +const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g ); +const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b ); +const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a ); +vec4 packDepthToRGBA( const in float v ) { + if( v <= 0.0 ) + return vec4( 0., 0., 0., 0. ); + if( v >= 1.0 ) + return vec4( 1., 1., 1., 1. ); + float vuf; + float af = modf( v * PackFactors.a, vuf ); + float bf = modf( vuf * ShiftRight8, vuf ); + float gf = modf( vuf * ShiftRight8, vuf ); + return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af ); +} +vec3 packDepthToRGB( const in float v ) { + if( v <= 0.0 ) + return vec3( 0., 0., 0. ); + if( v >= 1.0 ) + return vec3( 1., 1., 1. ); + float vuf; + float bf = modf( v * PackFactors.b, vuf ); + float gf = modf( vuf * ShiftRight8, vuf ); + return vec3( vuf * Inv255, gf * PackUpscale, bf ); +} +vec2 packDepthToRG( const in float v ) { + if( v <= 0.0 ) + return vec2( 0., 0. ); + if( v >= 1.0 ) + return vec2( 1., 1. ); + float vuf; + float gf = modf( v * 256., vuf ); + return vec2( vuf * Inv255, gf ); +} +float unpackRGBAToDepth( const in vec4 v ) { + return dot( v, UnpackFactors4 ); +} +float unpackRGBToDepth( const in vec3 v ) { + return dot( v, UnpackFactors3 ); +} +float unpackRGToDepth( const in vec2 v ) { + return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g; +} +vec4 pack2HalfToRGBA( const in vec2 v ) { + vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); + return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); +} +vec2 unpackRGBATo2Half( const in vec4 v ) { + return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); +} +float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { + return ( viewZ + near ) / ( near - far ); +} +float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { + #ifdef USE_REVERSED_DEPTH_BUFFER + + return depth * ( far - near ) - far; + #else + return depth * ( near - far ) - near; + #endif +} +float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { + return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); +} +float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { + + #ifdef USE_REVERSED_DEPTH_BUFFER + return ( near * far ) / ( ( near - far ) * depth - near ); + #else + return ( near * far ) / ( ( far - near ) * depth - far ); + #endif +}`,premultiplied_alpha_fragment:`#ifdef PREMULTIPLIED_ALPHA + gl_FragColor.rgb *= gl_FragColor.a; +#endif`,project_vertex:`vec4 mvPosition = vec4( transformed, 1.0 ); +#ifdef USE_BATCHING + mvPosition = batchingMatrix * mvPosition; +#endif +#ifdef USE_INSTANCING + mvPosition = instanceMatrix * mvPosition; +#endif +mvPosition = modelViewMatrix * mvPosition; +gl_Position = projectionMatrix * mvPosition;`,dithering_fragment:`#ifdef DITHERING + gl_FragColor.rgb = dithering( gl_FragColor.rgb ); +#endif`,dithering_pars_fragment:`#ifdef DITHERING + vec3 dithering( vec3 color ) { + float grid_position = rand( gl_FragCoord.xy ); + vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); + dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); + return color + dither_shift_RGB; + } +#endif`,roughnessmap_fragment:`float roughnessFactor = roughness; +#ifdef USE_ROUGHNESSMAP + vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); + roughnessFactor *= texelRoughness.g; +#endif`,roughnessmap_pars_fragment:`#ifdef USE_ROUGHNESSMAP + uniform sampler2D roughnessMap; +#endif`,shadowmap_pars_fragment:`#if NUM_SPOT_LIGHT_COORDS > 0 + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#if NUM_SPOT_LIGHT_MAPS > 0 + uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_SUN_LIGHT_SHADOWS > 0 + #define SUN_LIGHT_CASCADES 2 + #if defined( SHADOWMAP_TYPE_PCF ) + uniform sampler2DShadow sunShadowMap[ NUM_SUN_LIGHT_SHADOWS ]; + #else + uniform sampler2D sunShadowMap[ NUM_SUN_LIGHT_SHADOWS ]; + #endif + uniform mat4 sunShadowMatrix[ NUM_SUN_LIGHT_SHADOWS * SUN_LIGHT_CASCADES ]; + uniform vec4 sunShadowCascade[ NUM_SUN_LIGHT_SHADOWS * SUN_LIGHT_CASCADES ]; + varying vec4 vSunShadowWorldPosition; + varying vec3 vSunShadowWorldNormal; + struct SunLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SunLightShadow sunLightShadows[ NUM_SUN_LIGHT_SHADOWS ]; + #endif + #if NUM_DIR_LIGHT_SHADOWS > 0 + #if defined( SHADOWMAP_TYPE_PCF ) + uniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; + #else + uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + #if defined( SHADOWMAP_TYPE_PCF ) + uniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; + #else + uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + struct SpotLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + #if defined( SHADOWMAP_TYPE_PCF ) + uniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; + #elif defined( SHADOWMAP_TYPE_BASIC ) + uniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; + #endif + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif + #if defined( SHADOWMAP_TYPE_PCF ) + float interleavedGradientNoise( vec2 position ) { + return fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) ); + } + vec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) { + const float goldenAngle = 2.399963229728653; + float r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) ); + float theta = float( sampleIndex ) * goldenAngle + phi; + return vec2( cos( theta ), sin( theta ) ) * r; + } + #endif + #if defined( SHADOWMAP_TYPE_PCF ) + float getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + float shadow = 1.0; + shadowCoord.xyz /= shadowCoord.w; + shadowCoord.z += shadowBias; + bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; + bool frustumTest = inFrustum && shadowCoord.z <= 1.0; + if ( frustumTest ) { + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float radius = shadowRadius * texelSize.x; + float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2; + shadow = ( + texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) + + texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) + + texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) + + texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) + + texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) ) + ) * 0.2; + } + return mix( 1.0, shadow, shadowIntensity ); + } + #elif defined( SHADOWMAP_TYPE_VSM ) + float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + float shadow = 1.0; + shadowCoord.xyz /= shadowCoord.w; + #ifdef USE_REVERSED_DEPTH_BUFFER + shadowCoord.z -= shadowBias; + #else + shadowCoord.z += shadowBias; + #endif + bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; + bool frustumTest = inFrustum && shadowCoord.z <= 1.0; + if ( frustumTest ) { + vec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg; + float mean = distribution.x; + float variance = distribution.y * distribution.y; + #ifdef USE_REVERSED_DEPTH_BUFFER + float hard_shadow = step( mean, shadowCoord.z ); + #else + float hard_shadow = step( shadowCoord.z, mean ); + #endif + + if ( hard_shadow == 1.0 ) { + shadow = 1.0; + } else { + variance = max( variance, 0.0000001 ); + float d = shadowCoord.z - mean; + float p_max = variance / ( variance + d * d ); + p_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 ); + shadow = max( hard_shadow, p_max ); + } + } + return mix( 1.0, shadow, shadowIntensity ); + } + #else + float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + float shadow = 1.0; + shadowCoord.xyz /= shadowCoord.w; + #ifdef USE_REVERSED_DEPTH_BUFFER + shadowCoord.z -= shadowBias; + #else + shadowCoord.z += shadowBias; + #endif + bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; + bool frustumTest = inFrustum && shadowCoord.z <= 1.0; + if ( frustumTest ) { + float depth = texture2D( shadowMap, shadowCoord.xy ).r; + #ifdef USE_REVERSED_DEPTH_BUFFER + shadow = step( depth, shadowCoord.z ); + #else + shadow = step( shadowCoord.z, depth ); + #endif + } + return mix( 1.0, shadow, shadowIntensity ); + } + #endif + #if NUM_SUN_LIGHT_SHADOWS > 0 + float getSunShadow( + #if defined( SHADOWMAP_TYPE_PCF ) + sampler2DShadow shadowMap, + #else + sampler2D shadowMap, + #endif + SunLightShadow sunLightShadow, + int shadowIndex + ) { + vec4 shadowWorldPosition = vec4( vSunShadowWorldPosition.xyz + vSunShadowWorldNormal * sunLightShadow.shadowNormalBias, 1.0 ); + float viewDepth = vSunShadowWorldPosition.w; + int cascadeOffset = shadowIndex * SUN_LIGHT_CASCADES; + float shadow = 1.0; + for ( int i = SUN_LIGHT_CASCADES - 1; i >= 0; i -- ) { + vec4 cascade = sunShadowCascade[ cascadeOffset + i ]; + if ( viewDepth >= cascade.x && viewDepth < cascade.y ) { + float cascadeShadow = getShadow( + shadowMap, + sunLightShadow.shadowMapSize, + sunLightShadow.shadowIntensity, + sunLightShadow.shadowBias, + sunLightShadow.shadowRadius, + sunShadowMatrix[ cascadeOffset + i ] * shadowWorldPosition + ); + shadow = mix( cascadeShadow, shadow, smoothstep( cascade.z, cascade.y, viewDepth ) ); + } + } + return shadow; + } + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + #if defined( SHADOWMAP_TYPE_PCF ) + float getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { + float shadow = 1.0; + vec3 lightToPosition = shadowCoord.xyz; + vec3 bd3D = normalize( lightToPosition ); + vec3 absVec = abs( lightToPosition ); + float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); + if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { + #ifdef USE_REVERSED_DEPTH_BUFFER + float dp = ( shadowCameraNear * ( shadowCameraFar - viewSpaceZ ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); + dp -= shadowBias; + #else + float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); + dp += shadowBias; + #endif + float texelSize = shadowRadius / shadowMapSize.x; + vec3 absDir = abs( bd3D ); + vec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 ); + tangent = normalize( cross( bd3D, tangent ) ); + vec3 bitangent = cross( bd3D, tangent ); + float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2; + vec2 sample0 = vogelDiskSample( 0, 5, phi ); + vec2 sample1 = vogelDiskSample( 1, 5, phi ); + vec2 sample2 = vogelDiskSample( 2, 5, phi ); + vec2 sample3 = vogelDiskSample( 3, 5, phi ); + vec2 sample4 = vogelDiskSample( 4, 5, phi ); + shadow = ( + texture( shadowMap, vec4( bd3D + ( tangent * sample0.x + bitangent * sample0.y ) * texelSize, dp ) ) + + texture( shadowMap, vec4( bd3D + ( tangent * sample1.x + bitangent * sample1.y ) * texelSize, dp ) ) + + texture( shadowMap, vec4( bd3D + ( tangent * sample2.x + bitangent * sample2.y ) * texelSize, dp ) ) + + texture( shadowMap, vec4( bd3D + ( tangent * sample3.x + bitangent * sample3.y ) * texelSize, dp ) ) + + texture( shadowMap, vec4( bd3D + ( tangent * sample4.x + bitangent * sample4.y ) * texelSize, dp ) ) + ) * 0.2; + } + return mix( 1.0, shadow, shadowIntensity ); + } + #elif defined( SHADOWMAP_TYPE_BASIC ) + float getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { + float shadow = 1.0; + vec3 lightToPosition = shadowCoord.xyz; + vec3 absVec = abs( lightToPosition ); + float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); + if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { + float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); + dp += shadowBias; + vec3 bd3D = normalize( lightToPosition ); + float depth = textureCube( shadowMap, bd3D ).r; + #ifdef USE_REVERSED_DEPTH_BUFFER + depth = 1.0 - depth; + #endif + shadow = step( dp, depth ); + } + return mix( 1.0, shadow, shadowIntensity ); + } + #endif + #endif +#endif`,shadowmap_pars_vertex:`#if NUM_SPOT_LIGHT_COORDS > 0 + uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_SUN_LIGHT_SHADOWS > 0 + varying vec4 vSunShadowWorldPosition; + varying vec3 vSunShadowWorldNormal; + #endif + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + struct SpotLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif +#endif`,shadowmap_vertex:`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SUN_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) + #ifdef HAS_NORMAL + vec3 shadowWorldNormal = transformNormalByInverseViewMatrix( transformedNormal, viewMatrix ); + #else + vec3 shadowWorldNormal = vec3( 0.0 ); + #endif + vec4 shadowWorldPosition; +#endif +#if defined( USE_SHADOWMAP ) + #if NUM_SUN_LIGHT_SHADOWS > 0 + vSunShadowWorldPosition = vec4( worldPosition.xyz, - mvPosition.z ); + vSunShadowWorldNormal = shadowWorldNormal; + #endif + #if NUM_DIR_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); + vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); + vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif +#endif +#if NUM_SPOT_LIGHT_COORDS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { + shadowWorldPosition = worldPosition; + #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; + #endif + vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end +#endif`,shadowmask_pars_fragment:`float getShadowMask() { + float shadow = 1.0; + #ifdef USE_SHADOWMAP + #if NUM_SUN_LIGHT_SHADOWS > 0 + SunLightShadow sunLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SUN_LIGHT_SHADOWS; i ++ ) { + sunLight = sunLightShadows[ i ]; + shadow *= receiveShadow ? getSunShadow( sunShadowMap[ i ], sunLight, UNROLLED_LOOP_INDEX ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + directionalLight = directionalLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { + spotLight = spotLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) + PointLightShadow pointLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + pointLight = pointLightShadows[ i ]; + shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; + } + #pragma unroll_loop_end + #endif + #endif + return shadow; +}`,skinbase_vertex:`#ifdef USE_SKINNING + mat4 boneMatX = getBoneMatrix( skinIndex.x ); + mat4 boneMatY = getBoneMatrix( skinIndex.y ); + mat4 boneMatZ = getBoneMatrix( skinIndex.z ); + mat4 boneMatW = getBoneMatrix( skinIndex.w ); +#endif`,skinning_pars_vertex:`#ifdef USE_SKINNING + uniform mat4 bindMatrix; + uniform mat4 bindMatrixInverse; + uniform highp sampler2D boneTexture; + mat4 getBoneMatrix( const in float i ) { + int size = textureSize( boneTexture, 0 ).x; + int j = int( i ) * 4; + int x = j % size; + int y = j / size; + vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); + vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); + vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); + vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); + return mat4( v1, v2, v3, v4 ); + } +#endif`,skinning_vertex:`#ifdef USE_SKINNING + vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); + vec4 skinned = vec4( 0.0 ); + skinned += boneMatX * skinVertex * skinWeight.x; + skinned += boneMatY * skinVertex * skinWeight.y; + skinned += boneMatZ * skinVertex * skinWeight.z; + skinned += boneMatW * skinVertex * skinWeight.w; + transformed = ( bindMatrixInverse * skinned ).xyz; +#endif`,skinnormal_vertex:`#ifdef USE_SKINNING + mat4 skinMatrix = mat4( 0.0 ); + skinMatrix += skinWeight.x * boneMatX; + skinMatrix += skinWeight.y * boneMatY; + skinMatrix += skinWeight.z * boneMatZ; + skinMatrix += skinWeight.w * boneMatW; + skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; + objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; + #ifdef USE_TANGENT + objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; + #endif +#endif`,specularmap_fragment:`float specularStrength; +#ifdef USE_SPECULARMAP + vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); + specularStrength = texelSpecular.r; +#else + specularStrength = 1.0; +#endif`,specularmap_pars_fragment:`#ifdef USE_SPECULARMAP + uniform sampler2D specularMap; +#endif`,tonemapping_fragment:`#if defined( TONE_MAPPING ) + gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); +#endif`,tonemapping_pars_fragment:`#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +uniform float toneMappingExposure; +vec3 LinearToneMapping( vec3 color ) { + return saturate( toneMappingExposure * color ); +} +vec3 ReinhardToneMapping( vec3 color ) { + color *= toneMappingExposure; + return saturate( color / ( vec3( 1.0 ) + color ) ); +} +vec3 CineonToneMapping( vec3 color ) { + color *= toneMappingExposure; + color = max( vec3( 0.0 ), color - 0.004 ); + return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); +} +vec3 RRTAndODTFit( vec3 v ) { + vec3 a = v * ( v + 0.0245786 ) - 0.000090537; + vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; + return a / b; +} +vec3 ACESFilmicToneMapping( vec3 color ) { + const mat3 ACESInputMat = mat3( + vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), + vec3( 0.04823, 0.01566, 0.83777 ) + ); + const mat3 ACESOutputMat = mat3( + vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), + vec3( -0.07367, -0.00605, 1.07602 ) + ); + color *= toneMappingExposure / 0.6; + color = ACESInputMat * color; + color = RRTAndODTFit( color ); + color = ACESOutputMat * color; + return saturate( color ); +} +const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( + vec3( 1.6605, - 0.1246, - 0.0182 ), + vec3( - 0.5876, 1.1329, - 0.1006 ), + vec3( - 0.0728, - 0.0083, 1.1187 ) +); +const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( + vec3( 0.6274, 0.0691, 0.0164 ), + vec3( 0.3293, 0.9195, 0.0880 ), + vec3( 0.0433, 0.0113, 0.8956 ) +); +vec3 agxDefaultContrastApprox( vec3 x ) { + vec3 x2 = x * x; + vec3 x4 = x2 * x2; + return + 15.5 * x4 * x2 + - 40.14 * x4 * x + + 31.96 * x4 + - 6.868 * x2 * x + + 0.4298 * x2 + + 0.1191 * x + - 0.00232; +} +vec3 AgXToneMapping( vec3 color ) { + const mat3 AgXInsetMatrix = mat3( + vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), + vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), + vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) + ); + const mat3 AgXOutsetMatrix = mat3( + vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), + vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), + vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) + ); + const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; + color *= toneMappingExposure; + color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; + color = AgXInsetMatrix * color; + color = max( color, 1e-10 ); color = log2( color ); + color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); + color = clamp( color, 0.0, 1.0 ); + color = agxDefaultContrastApprox( color ); + color = AgXOutsetMatrix * color; + color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); + color = LINEAR_REC2020_TO_LINEAR_SRGB * color; + color = clamp( color, 0.0, 1.0 ); + return color; +} +vec3 NeutralToneMapping( vec3 color ) { + const float StartCompression = 0.8 - 0.04; + const float Desaturation = 0.15; + color *= toneMappingExposure; + float x = min( color.r, min( color.g, color.b ) ); + float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; + color -= offset; + float peak = max( color.r, max( color.g, color.b ) ); + if ( peak < StartCompression ) return color; + float d = 1. - StartCompression; + float newPeak = 1. - d * d / ( peak + d - StartCompression ); + color *= newPeak / peak; + float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); + return mix( color, vec3( newPeak ), g ); +} +vec3 CustomToneMapping( vec3 color ) { return color; }`,transmission_fragment:`#ifdef USE_TRANSMISSION + material.transmission = transmission; + material.transmissionAlpha = 1.0; + material.thickness = thickness; + material.attenuationDistance = attenuationDistance; + material.attenuationColor = attenuationColor; + #ifdef USE_TRANSMISSIONMAP + material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; + #endif + #ifdef USE_THICKNESSMAP + material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; + #endif + vec3 pos = vWorldPosition; + vec3 v = normalize( cameraPosition - pos ); + vec3 n = transformNormalByInverseViewMatrix( normal, viewMatrix ); + vec4 transmitted = getIBLVolumeRefraction( + n, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90, + pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, + material.attenuationColor, material.attenuationDistance ); + material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); + totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); +#endif`,transmission_pars_fragment:`#ifdef USE_TRANSMISSION + uniform float transmission; + uniform float thickness; + uniform float attenuationDistance; + uniform vec3 attenuationColor; + #ifdef USE_TRANSMISSIONMAP + uniform sampler2D transmissionMap; + #endif + #ifdef USE_THICKNESSMAP + uniform sampler2D thicknessMap; + #endif + uniform vec2 transmissionSamplerSize; + uniform sampler2D transmissionSamplerMap; + uniform mat4 modelMatrix; + uniform mat4 projectionMatrix; + varying vec3 vWorldPosition; + float w0( float a ) { + return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); + } + float w1( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); + } + float w2( float a ){ + return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); + } + float w3( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * a ); + } + float g0( float a ) { + return w0( a ) + w1( a ); + } + float g1( float a ) { + return w2( a ) + w3( a ); + } + float h0( float a ) { + return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); + } + float h1( float a ) { + return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); + } + vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { + uv = uv * texelSize.zw + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + float g0x = g0( fuv.x ); + float g1x = g1( fuv.x ); + float h0x = h0( fuv.x ); + float h1x = h1( fuv.x ); + float h0y = h0( fuv.y ); + float h1y = h1( fuv.y ); + vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + + g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); + } + vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { + vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); + vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); + vec2 fLodSizeInv = 1.0 / fLodSize; + vec2 cLodSizeInv = 1.0 / cLodSize; + vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); + vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); + return mix( fSample, cSample, fract( lod ) ); + } + vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { + vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); + vec3 modelScale; + modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); + modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); + modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); + return normalize( refractionVector ) * thickness * modelScale; + } + float applyIorToRoughness( const in float roughness, const in float ior ) { + return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); + } + vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { + float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); + return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); + } + vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { + if ( isinf( attenuationDistance ) ) { + return vec3( 1.0 ); + } else { + vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; + vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; + } + } + vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, + const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, + const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, + const in vec3 attenuationColor, const in float attenuationDistance ) { + vec4 transmittedLight; + vec3 transmittance; + #ifdef USE_DISPERSION + float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; + vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); + for ( int i = 0; i < 3; i ++ ) { + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); + transmittedLight[ i ] = transmissionSample[ i ]; + transmittedLight.a += transmissionSample.a; + transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; + } + transmittedLight.a /= 3.0; + #else + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); + transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); + #endif + vec3 attenuatedColor = transmittance * transmittedLight.rgb; + vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); + float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; + return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); + } +#endif`,uv_pars_fragment:`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + varying vec2 vUv; +#endif +#ifdef USE_MAP + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + varying vec2 vNormalMapUv; +#endif +#ifdef USE_EMISSIVEMAP + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_ANISOTROPYMAP + varying vec2 vAnisotropyMapUv; +#endif +#ifdef USE_CLEARCOATMAP + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_SPECULARMAP + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,uv_pars_vertex:`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + varying vec2 vUv; +#endif +#ifdef USE_MAP + uniform mat3 mapTransform; + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + uniform mat3 alphaMapTransform; + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + uniform mat3 lightMapTransform; + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + uniform mat3 aoMapTransform; + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + uniform mat3 bumpMapTransform; + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + uniform mat3 normalMapTransform; + varying vec2 vNormalMapUv; +#endif +#ifdef USE_DISPLACEMENTMAP + uniform mat3 displacementMapTransform; + varying vec2 vDisplacementMapUv; +#endif +#ifdef USE_EMISSIVEMAP + uniform mat3 emissiveMapTransform; + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + uniform mat3 metalnessMapTransform; + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + uniform mat3 roughnessMapTransform; + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_ANISOTROPYMAP + uniform mat3 anisotropyMapTransform; + varying vec2 vAnisotropyMapUv; +#endif +#ifdef USE_CLEARCOATMAP + uniform mat3 clearcoatMapTransform; + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform mat3 clearcoatNormalMapTransform; + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform mat3 clearcoatRoughnessMapTransform; + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + uniform mat3 sheenColorMapTransform; + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + uniform mat3 sheenRoughnessMapTransform; + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + uniform mat3 iridescenceMapTransform; + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform mat3 iridescenceThicknessMapTransform; + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SPECULARMAP + uniform mat3 specularMapTransform; + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + uniform mat3 specularColorMapTransform; + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + uniform mat3 specularIntensityMapTransform; + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,uv_vertex:`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + vUv = vec3( uv, 1 ).xy; +#endif +#ifdef USE_MAP + vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ALPHAMAP + vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_LIGHTMAP + vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_AOMAP + vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_BUMPMAP + vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_NORMALMAP + vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_DISPLACEMENTMAP + vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_EMISSIVEMAP + vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_METALNESSMAP + vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ROUGHNESSMAP + vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ANISOTROPYMAP + vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOATMAP + vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCEMAP + vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_COLORMAP + vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULARMAP + vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_COLORMAP + vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_TRANSMISSIONMAP + vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_THICKNESSMAP + vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; +#endif`,worldpos_vertex:`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 + vec4 worldPosition = vec4( transformed, 1.0 ); + #ifdef USE_BATCHING + worldPosition = batchingMatrix * worldPosition; + #endif + #ifdef USE_INSTANCING + worldPosition = instanceMatrix * worldPosition; + #endif + worldPosition = modelMatrix * worldPosition; +#endif`,background_vert:`varying vec2 vUv; +uniform mat3 uvTransform; +void main() { + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + gl_Position = vec4( position.xy, 1.0, 1.0 ); +}`,background_frag:`uniform sampler2D t2D; +uniform float backgroundIntensity; +varying vec2 vUv; +void main() { + vec4 texColor = texture2D( t2D, vUv ); + #ifdef DECODE_VIDEO_TEXTURE + texColor = 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 ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,backgroundCube_vert:`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,backgroundCube_frag:`#ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; +#elif defined( ENVMAP_TYPE_CUBE_UV ) + uniform sampler2D envMap; +#endif +uniform float backgroundBlurriness; +uniform float backgroundIntensity; +uniform mat3 backgroundRotation; +varying vec3 vWorldDirection; +#include +void main() { + #ifdef ENVMAP_TYPE_CUBE + vec4 texColor = textureCube( envMap, backgroundRotation * vWorldDirection ); + #elif defined( ENVMAP_TYPE_CUBE_UV ) + vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); + #else + vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,cube_vert:`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,cube_frag:`uniform samplerCube tCube; +uniform float tFlip; +uniform float opacity; +varying vec3 vWorldDirection; +void main() { + vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); + gl_FragColor = texColor; + gl_FragColor.a *= opacity; + #include + #include +}`,depth_vert:`#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + #include + #include + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vHighPrecisionZW = gl_Position.zw; +}`,depth_frag:`#if DEPTH_PACKING == 3200 + uniform float opacity; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + vec4 diffuseColor = vec4( 1.0 ); + #include + #if DEPTH_PACKING == 3200 + diffuseColor.a = opacity; + #endif + #include + #include + #include + #include + #include + #ifdef USE_REVERSED_DEPTH_BUFFER + float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ]; + #else + float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5; + #endif + #if DEPTH_PACKING == 3200 + gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); + #elif DEPTH_PACKING == 3201 + gl_FragColor = packDepthToRGBA( fragCoordZ ); + #elif DEPTH_PACKING == 3202 + gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 ); + #elif DEPTH_PACKING == 3203 + gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); + #endif +}`,distance_vert:`#define DISTANCE +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vWorldPosition = worldPosition.xyz; +}`,distance_frag:`#define DISTANCE +uniform vec3 referencePosition; +uniform float nearDistance; +uniform float farDistance; +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( 1.0 ); + #include + #include + #include + #include + #include + float dist = length( vWorldPosition - referencePosition ); + dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); + dist = saturate( dist ); + gl_FragColor = vec4( dist, 0.0, 0.0, 1.0 ); +}`,equirect_vert:`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include +}`,equirect_frag:`uniform sampler2D tEquirect; +varying vec3 vWorldDirection; +#include +void main() { + vec3 direction = normalize( vWorldDirection ); + vec2 sampleUV = equirectUv( direction ); + gl_FragColor = texture2D( tEquirect, sampleUV ); + #include + #include +}`,linedashed_vert:`uniform float scale; +attribute float lineDistance; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vLineDistance = scale * lineDistance; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,linedashed_frag:`uniform vec3 diffuse; +uniform float opacity; +uniform float dashSize; +uniform float totalSize; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + if ( mod( vLineDistance, totalSize ) > dashSize ) { + discard; + } + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,meshbasic_vert:`#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) + #include + #include + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,meshbasic_frag:`uniform vec3 diffuse; +uniform float opacity; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; + #else + reflectedLight.indirectDiffuse += vec3( 1.0 ); + #endif + #include + reflectedLight.indirectDiffuse *= diffuseColor.rgb; + vec3 outgoingLight = reflectedLight.indirectDiffuse; + #include + #include + #include + #include + #include + #include + #include +}`,meshlambert_vert:`#define LAMBERT +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,meshlambert_frag:`#define LAMBERT +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,meshmatcap_vert:`#define MATCAP +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; +}`,meshmatcap_frag:`#define MATCAP +uniform vec3 diffuse; +uniform float opacity; +uniform sampler2D matcap; +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 viewDir = normalize( vViewPosition ); + vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); + vec3 y = cross( viewDir, x ); + vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; + #ifdef USE_MATCAP + vec4 matcapColor = texture2D( matcap, uv ); + #else + vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); + #endif + vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; + #include + #include + #include + #include + #include + #include +}`,meshnormal_vert:`#define NORMAL +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + vViewPosition = - mvPosition.xyz; +#endif +}`,meshnormal_frag:`#define NORMAL +uniform float opacity; +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); + #include + #include + #include + #include + gl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a ); + #ifdef OPAQUE + gl_FragColor.a = 1.0; + #endif +}`,meshphong_vert:`#define PHONG +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,meshphong_frag:`#define PHONG +uniform vec3 diffuse; +uniform vec3 emissive; +uniform vec3 specular; +uniform float shininess; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,meshphysical_vert:`#define STANDARD +varying vec3 vViewPosition; +#ifdef USE_TRANSMISSION + varying vec3 vWorldPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +#ifdef USE_TRANSMISSION + vWorldPosition = worldPosition.xyz; +#endif +}`,meshphysical_frag:`#define STANDARD +#ifdef PHYSICAL + #define IOR + #define USE_SPECULAR +#endif +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float roughness; +uniform float metalness; +uniform float opacity; +#ifdef IOR + uniform float ior; +#endif +#ifdef USE_SPECULAR + uniform float specularIntensity; + uniform vec3 specularColor; + #ifdef USE_SPECULAR_COLORMAP + uniform sampler2D specularColorMap; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + uniform sampler2D specularIntensityMap; + #endif +#endif +#ifdef USE_CLEARCOAT + uniform float clearcoat; + uniform float clearcoatRoughness; +#endif +#ifdef USE_DISPERSION + uniform float dispersion; +#endif +#ifdef USE_RETROREFLECTION + uniform float retroreflectivity; +#endif +#ifdef USE_IRIDESCENCE + uniform float iridescence; + uniform float iridescenceIOR; + uniform float iridescenceThicknessMinimum; + uniform float iridescenceThicknessMaximum; +#endif +#ifdef USE_SHEEN + uniform vec3 sheenColor; + uniform float sheenRoughness; + #ifdef USE_SHEEN_COLORMAP + uniform sampler2D sheenColorMap; + #endif + #ifdef USE_SHEEN_ROUGHNESSMAP + uniform sampler2D sheenRoughnessMap; + #endif +#endif +#ifdef USE_ANISOTROPY + uniform vec2 anisotropyVector; + #ifdef USE_ANISOTROPYMAP + uniform sampler2D anisotropyMap; + #endif +#endif +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; + vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; + #include + vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; + #ifdef USE_SHEEN + + outgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect; + + #endif + #ifdef USE_CLEARCOAT + float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); + vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); + outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; + #endif + #include + #include + #include + #include + #include + #include +}`,meshtoon_vert:`#define TOON +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +}`,meshtoon_frag:`#define TOON +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include +}`,points_vert:`uniform float size; +uniform float scale; +#include +#include +#include +#include +#include +#include +#ifdef USE_POINTS_UV + varying vec2 vUv; + uniform mat3 uvTransform; +#endif +void main() { + #ifdef USE_POINTS_UV + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + #endif + #include + #include + #include + #include + #include + #include + gl_PointSize = size; + #ifdef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); + #endif + #include + #include + #include + #include +}`,points_frag:`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,shadow_vert:`#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,shadow_frag:`uniform vec3 color; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); + #include + #include + #include + #include +}`,sprite_vert:`uniform float rotation; +uniform vec2 center; +#include +#include +#include +#include +#include +void main() { + #include + vec4 mvPosition = modelViewMatrix[ 3 ]; + vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) ); + #ifndef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + #endif + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + gl_Position = projectionMatrix * mvPosition; + #include + #include + #include +}`,sprite_frag:`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include +}`},J={common:{diffuse:{value:new G(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new U},alphaMap:{value:null},alphaMapTransform:{value:new U},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new U}},envmap:{envMap:{value:null},envMapRotation:{value:new U},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new U}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new U}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new U},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new U},normalScale:{value:new V(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new U},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new U}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new U}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new U}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new G(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},sunLights:{value:[],properties:{direction:{},color:{}}},sunLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},sunShadowMatrix:{value:[]},sunShadowCascade:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null},probesSH:{value:null},probesMin:{value:new H},probesMax:{value:new H},probesResolution:{value:new H}},points:{diffuse:{value:new G(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new U},alphaTest:{value:0},uvTransform:{value:new U}},sprite:{diffuse:{value:new G(16777215)},opacity:{value:1},center:{value:new V(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new U},alphaMap:{value:null},alphaMapTransform:{value:new U},alphaTest:{value:0}}},Ka={basic:{uniforms:Ei([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.fog]),vertexShader:q.meshbasic_vert,fragmentShader:q.meshbasic_frag},lambert:{uniforms:Ei([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.fog,J.lights,{emissive:{value:new G(0)},envMapIntensity:{value:1}}]),vertexShader:q.meshlambert_vert,fragmentShader:q.meshlambert_frag},phong:{uniforms:Ei([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.fog,J.lights,{emissive:{value:new G(0)},specular:{value:new G(1118481)},shininess:{value:30},envMapIntensity:{value:1}}]),vertexShader:q.meshphong_vert,fragmentShader:q.meshphong_frag},standard:{uniforms:Ei([J.common,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.roughnessmap,J.metalnessmap,J.fog,J.lights,{emissive:{value:new G(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:q.meshphysical_vert,fragmentShader:q.meshphysical_frag},toon:{uniforms:Ei([J.common,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.gradientmap,J.fog,J.lights,{emissive:{value:new G(0)}}]),vertexShader:q.meshtoon_vert,fragmentShader:q.meshtoon_frag},matcap:{uniforms:Ei([J.common,J.bumpmap,J.normalmap,J.displacementmap,J.fog,{matcap:{value:null}}]),vertexShader:q.meshmatcap_vert,fragmentShader:q.meshmatcap_frag},points:{uniforms:Ei([J.points,J.fog]),vertexShader:q.points_vert,fragmentShader:q.points_frag},dashed:{uniforms:Ei([J.common,J.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:q.linedashed_vert,fragmentShader:q.linedashed_frag},depth:{uniforms:Ei([J.common,J.displacementmap]),vertexShader:q.depth_vert,fragmentShader:q.depth_frag},normal:{uniforms:Ei([J.common,J.bumpmap,J.normalmap,J.displacementmap,{opacity:{value:1}}]),vertexShader:q.meshnormal_vert,fragmentShader:q.meshnormal_frag},sprite:{uniforms:Ei([J.sprite,J.fog]),vertexShader:q.sprite_vert,fragmentShader:q.sprite_frag},background:{uniforms:{uvTransform:{value:new U},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:q.background_vert,fragmentShader:q.background_frag},backgroundCube:{uniforms:{envMap:{value:null},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new U}},vertexShader:q.backgroundCube_vert,fragmentShader:q.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:q.cube_vert,fragmentShader:q.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:q.equirect_vert,fragmentShader:q.equirect_frag},distance:{uniforms:Ei([J.common,J.displacementmap,{referencePosition:{value:new H},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:q.distance_vert,fragmentShader:q.distance_frag},shadow:{uniforms:Ei([J.lights,J.fog,{color:{value:new G(0)},opacity:{value:1}}]),vertexShader:q.shadow_vert,fragmentShader:q.shadow_frag}};Ka.physical={uniforms:Ei([Ka.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new U},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new U},clearcoatNormalScale:{value:new V(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new U},dispersion:{value:0},retroreflectivity:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new U},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new U},sheen:{value:0},sheenColor:{value:new G(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new U},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new U},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new U},transmissionSamplerSize:{value:new V},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new U},attenuationDistance:{value:0},attenuationColor:{value:new G(0)},specularColor:{value:new G(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new U},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new U},anisotropyVector:{value:new V},anisotropyMap:{value:null},anisotropyMapTransform:{value:new U}}]),vertexShader:q.meshphysical_vert,fragmentShader:q.meshphysical_frag};var qa={r:0,b:0,g:0},Ja=new It,Ya=new U;Ya.set(-1,0,0,0,1,0,0,0,1);function Xa(e,t,n,r,i,a){let o=new G(0),s=i===!0?0:1,c,l,u=null,d=0,f=null;function p(e){let n=e.isScene===!0?e.background:null;if(n&&n.isTexture){let r=e.backgroundBlurriness>0;n=t.get(n,r)}return n}function m(t){let r=!1,i=p(t);i===null?g(o,s):i&&i.isColor&&(g(i,1),r=!0);let c=e.xr.getEnvironmentBlendMode();c===`additive`?n.buffers.color.setClear(0,0,0,1,a):c===`alpha-blend`&&n.buffers.color.setClear(0,0,0,0,a),(e.autoClear||r)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil))}function h(t,n){let i=p(n);i&&(i.isCubeTexture||i.mapping===306)?(l===void 0&&(l=new Lr(new _i(1,1,1),new Ni({name:`BackgroundCubeMaterial`,uniforms:Ti(Ka.backgroundCube.uniforms),vertexShader:Ka.backgroundCube.vertexShader,fragmentShader:Ka.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),l.geometry.deleteAttribute(`normal`),l.geometry.deleteAttribute(`uv`),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(l)),l.material.uniforms.envMap.value=i,l.material.uniforms.backgroundBlurriness.value=n.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,l.material.uniforms.backgroundRotation.value.setFromMatrix4(Ja.makeRotationFromEuler(n.backgroundRotation)).transpose(),i.isCubeTexture&&i.isRenderTargetTexture===!1&&l.material.uniforms.backgroundRotation.value.premultiply(Ya),l.material.toneMapped=xt.getTransfer(i.colorSpace)!==Ue,(u!==i||d!==i.version||f!==e.toneMapping)&&(l.material.needsUpdate=!0,u=i,d=i.version,f=e.toneMapping),l.layers.enableAll(),t.unshift(l,l.geometry,l.material,0,0,null)):i&&i.isTexture&&(c===void 0&&(c=new Lr(new xi(2,2),new Ni({name:`BackgroundMaterial`,uniforms:Ti(Ka.background.uniforms),vertexShader:Ka.background.vertexShader,fragmentShader:Ka.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute(`normal`),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(c)),c.material.uniforms.t2D.value=i,c.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,c.material.toneMapped=xt.getTransfer(i.colorSpace)!==Ue,i.matrixAutoUpdate===!0&&i.updateMatrix(),c.material.uniforms.uvTransform.value.copy(i.matrix),(u!==i||d!==i.version||f!==e.toneMapping)&&(c.material.needsUpdate=!0,u=i,d=i.version,f=e.toneMapping),c.layers.enableAll(),t.unshift(c,c.geometry,c.material,0,0,null))}function g(t,r){t.getRGB(qa,ki(e)),n.buffers.color.setClear(qa.r,qa.g,qa.b,r,a)}function _(){l!==void 0&&(l.geometry.dispose(),l.material.dispose(),l=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return o},setClearColor:function(e,t=1){o.set(e),s=t,g(o,s)},getClearAlpha:function(){return s},setClearAlpha:function(e){s=e,g(o,s)},render:m,addToRenderList:h,dispose:_}}function Za(e,t){let n=e.getParameter(e.MAX_VERTEX_ATTRIBS),r={},i=f(null),a=i,o=!1;function s(n,r,i,s,c){let u=!1,f=d(n,s,i,r);a!==f&&(a=f,l(a.object)),u=p(n,s,i,c),u&&m(n,s,i,c),c!==null&&t.update(c,e.ELEMENT_ARRAY_BUFFER),(u||o)&&(o=!1,b(n,r,i,s),c!==null&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.get(c).buffer))}function c(){return e.createVertexArray()}function l(t){return e.bindVertexArray(t)}function u(t){return e.deleteVertexArray(t)}function d(e,t,n,i){let a=i.wireframe===!0,o=r[t.id];o===void 0&&(o={},r[t.id]=o);let s=e.isInstancedMesh===!0?e.id:0,l=o[s];l===void 0&&(l={},o[s]=l);let u=l[n.id];u===void 0&&(u={},l[n.id]=u);let d=u[a];return d===void 0&&(d=f(c()),u[a]=d),d}function f(e){let t=[],r=[],i=[];for(let e=0;e=0){let n=i[t],r=o[t];if(r===void 0&&(t===`instanceMatrix`&&e.instanceMatrix&&(r=e.instanceMatrix),t===`instanceColor`&&e.instanceColor&&(r=e.instanceColor)),n===void 0||n.attribute!==r||r&&n.data!==r.data)return!0;s++}return a.attributesNum!==s||a.index!==r}function m(e,t,n,r){let i={},o=t.attributes,s=0,c=n.getAttributes();for(let t in c)if(c[t].location>=0){let n=o[t];n===void 0&&(t===`instanceMatrix`&&e.instanceMatrix&&(n=e.instanceMatrix),t===`instanceColor`&&e.instanceColor&&(n=e.instanceColor));let r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,s++}a.attributes=i,a.attributesNum=s,a.index=r}function h(){let e=a.newAttributes;for(let t=0,n=e.length;t=0){let s=o[r];if(s===void 0&&(r===`instanceMatrix`&&n.instanceMatrix&&(s=n.instanceMatrix),r===`instanceColor`&&n.instanceColor&&(s=n.instanceColor)),s!==void 0){let r=s.normalized,o=s.itemSize,c=t.get(s);if(c===void 0)continue;let l=c.buffer,u=c.type,d=c.bytesPerElement,f=u===e.INT||u===e.UNSIGNED_INT||s.gpuType===1013;if(s.isInterleavedBufferAttribute){let t=s.data,c=t.stride,p=s.offset;if(t.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return`highp`;t=`mediump`}return t===`mediump`&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?`mediump`:`lowp`}let l=n.precision===void 0?`highp`:n.precision,u=c(l);u!==l&&(R(`WebGLRenderer:`,l,`not supported, using`,u,`instead.`),l=u);let d=n.logarithmicDepthBuffer===!0,f=n.reversedDepthBuffer===!0&&t.has(`EXT_clip_control`);n.reversedDepthBuffer===!0&&f===!1&&R(`WebGLRenderer: Unable to use reversed depth buffer due to missing EXT_clip_control extension. Fallback to default depth buffer.`);let p=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),m=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),h=e.getParameter(e.MAX_TEXTURE_SIZE),g=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),_=e.getParameter(e.MAX_VERTEX_ATTRIBS),v=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),y=e.getParameter(e.MAX_VARYING_VECTORS),b=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),x=e.getParameter(e.MAX_SAMPLES),S=e.getParameter(e.SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:a,getMaxPrecision:c,textureFormatReadable:o,textureTypeReadable:s,precision:l,logarithmicDepthBuffer:d,reversedDepthBuffer:f,maxTextures:p,maxVertexTextures:m,maxTextureSize:h,maxCubemapSize:g,maxAttributes:_,maxVertexUniforms:v,maxVaryings:y,maxFragmentUniforms:b,maxSamples:x,samples:S}}function eo(e){let t=this,n=null,r=0,i=!1,a=!1,o=new _r,s=new U,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t){let n=e.length!==0||t||r!==0||i;return i=t,r=e.length,n},this.beginShadows=function(){a=!0,u(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(e,t){n=u(e,t,0)},this.setState=function(t,o,s){let d=t.clippingPlanes,f=t.clipIntersection,p=t.clipShadows,m=e.get(t);if(!i||d===null||d.length===0||a&&!p)a?u(null):l();else{let e=a?0:r,t=e*4,i=m.clippingState||null;c.value=i,i=u(d,o,t,s);for(let e=0;e!==t;++e)i[e]=n[e];m.clippingState=i,this.numIntersection=f?this.numPlanes:0,this.numPlanes+=e}};function l(){c.value!==n&&(c.value=n,c.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){let a=e===null?0:e.length,l=null;if(a!==0){if(l=c.value,i!==!0||l===null){let t=r+a*4,i=n.matrixWorldInverse;s.getNormalMatrix(i),(l===null||l.length0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=xo(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=bo(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=2**this._lodMax}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._ggxMaterial!==null&&this._ggxMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?l:0,l,l),c.setRenderTarget(r),p&&c.render(d,a),c.render(e,a)}c.toneMapping=u,c.autoClear=l,e.background=m}_textureToCubeUV(e,t){let n=this._renderer,r=e.mapping===301||e.mapping===302;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=xo()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=bo());let i=r?this._cubemapMaterial:this._equirectMaterial,a=this._lodMeshes[0];a.material=i;let o=i.uniforms;o.envMap.value=e;let s=this._cubeSize;_o(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(a,ao)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;let r=this._lodMeshes.length;for(let t=1;td-to?n-d+to:0),m=4*(this._cubeSize-f);s.envMap.value=e.texture,s.roughness.value=u,s.mipInt.value=d-t,_o(i,p,m,3*f,2*f),r.setRenderTarget(i),r.render(o,ao),s.envMap.value=i.texture,s.roughness.value=0,s.mipInt.value=d-n,_o(e,p,m,3*f,2*f),r.setRenderTarget(e),r.render(o,ao)}_blur(e,t,n,r){let i=this._pingPongRenderTarget,a=Math.min(r,Math.PI)/Math.SQRT2;this._blurPass(e,i,t,n,a),this._blurPass(i,e,n,n,a)}_blurPass(e,t,n,r,i){let a=this._renderer,o=this._blurMaterial,s=this._lodMeshes[r];s.material=o;let c=o.uniforms;c.envMap.value=e.texture,c.sigma.value=i,c.mipInt.value=this._lodMax-n;let l=this._sizeLods[r];_o(t,3*l*(r>this._lodMax-to?r-this._lodMax+to:0),4*(this._cubeSize-l),3*l,2*l),a.setRenderTarget(t),a.render(s,ao)}};function ho(e){let t=[],n=[],r=e,i=e-to+1+no;for(let e=0;e2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];c.set(r,18*e);for(let t=0;t<6;t++){let n=s[t*2]*2-1,r=s[t*2+1]*2-1;e===0?po.set(1,r,n):e===1?po.set(-n,1,-r):e===2?po.set(-n,r,1):e===3?po.set(-1,r,-n):e===4?po.set(-n,-1,r):po.set(n,r,-1),po.toArray(l,(e*6+t)*3)}}let u=new pr;u.setAttribute(`position`,new Qn(c,3)),u.setAttribute(`outputDirection`,new Qn(l,3)),n.push(new Lr(u,null)),r>to&&r--}return{lodMeshes:n,sizeLods:t}}function go(e,t,n){let r=new W(e,t,n);return r.texture.mapping=306,r.texture.name=`PMREM.cubeUv`,r.scissorTest=!0,r}function _o(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function vo(e,t,n){return new Ni({name:`PMREMGGXConvolution`,defines:{GGX_SAMPLES:io,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:So(),fragmentShader:` + + precision highp float; + precision highp int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform float roughness; + uniform float mipInt; + + #define ENVMAP_TYPE_CUBE_UV + #include + + #define PI 3.14159265359 + + // Van der Corput radical inverse + float radicalInverse_VdC(uint bits) { + bits = (bits << 16u) | (bits >> 16u); + bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); + bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); + bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); + bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); + return float(bits) * 2.3283064365386963e-10; // / 0x100000000 + } + + // Hammersley sequence + vec2 hammersley(uint i, uint N) { + return vec2(float(i) / float(N), radicalInverse_VdC(i)); + } + + // GGX VNDF importance sampling (Eric Heitz 2018) + // "Sampling the GGX Distribution of Visible Normals" + // https://jcgt.org/published/0007/04/01/ + vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) { + float alpha = roughness * roughness; + + // Section 4.1: Orthonormal basis + vec3 T1 = vec3(1.0, 0.0, 0.0); + vec3 T2 = cross(V, T1); + + // Section 4.2: Parameterization of projected area + float r = sqrt(Xi.x); + float phi = 2.0 * PI * Xi.y; + float t1 = r * cos(phi); + float t2 = r * sin(phi); + float s = 0.5 * (1.0 + V.z); + t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2; + + // Section 4.3: Reprojection onto hemisphere + vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * V; + + // Section 3.4: Transform back to ellipsoid configuration + return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z))); + } + + void main() { + vec3 N = normalize(vOutputDirection); + vec3 V = N; // Assume view direction equals normal for pre-filtering + + vec3 prefilteredColor = vec3(0.0); + float totalWeight = 0.0; + + // For very low roughness, just sample the environment directly + if (roughness < 0.001) { + gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0); + return; + } + + // Tangent space basis for VNDF sampling + vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); + vec3 tangent = normalize(cross(up, N)); + vec3 bitangent = cross(N, tangent); + + for(uint i = 0u; i < uint(GGX_SAMPLES); i++) { + vec2 Xi = hammersley(i, uint(GGX_SAMPLES)); + + // For PMREM, V = N, so in tangent space V is always (0, 0, 1) + vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness); + + // Transform H back to world space + vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z); + vec3 L = normalize(2.0 * dot(V, H) * H - V); + + float NdotL = max(dot(N, L), 0.0); + + if(NdotL > 0.0) { + // Sample environment at fixed mip level + // VNDF importance sampling handles the distribution filtering + vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt); + + // Weight by NdotL for the split-sum approximation + // VNDF PDF naturally accounts for the visible microfacet distribution + prefilteredColor += sampleColor * NdotL; + totalWeight += NdotL; + } + } + + if (totalWeight > 0.0) { + prefilteredColor = prefilteredColor / totalWeight; + } + + gl_FragColor = vec4(prefilteredColor, 1.0); + } + `,blending:0,depthTest:!1,depthWrite:!1})}function yo(e,t,n){return new Ni({name:`SphericalGaussianBlur`,defines:{SAMPLES:ro,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},sigma:{value:0},mipInt:{value:0}},vertexShader:So(),fragmentShader:` + + precision highp float; + precision highp int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform float sigma; + uniform float mipInt; + + #define ENVMAP_TYPE_CUBE_UV + #include + + #define PI 3.14159265359 + #define GOLDEN_ANGLE 2.39996322973 + + void main() { + + if ( sigma == 0.0 ) { + + gl_FragColor = vec4( bilinearCubeUV( envMap, vOutputDirection, mipInt ), 1.0 ); + return; + + } + + vec3 outputDirection = normalize( vOutputDirection ); + + vec3 up = abs( outputDirection.z ) < 0.999 ? vec3( 0.0, 0.0, 1.0 ) : vec3( 1.0, 0.0, 0.0 ); + vec3 tangent = normalize( cross( up, outputDirection ) ); + vec3 bitangent = cross( outputDirection, tangent ); + + // Truncate the kernel at three standard deviations or at the antipode. + float thetaMax = min( 3.0 * sigma, PI ); + float truncation = 1.0 - exp( - 0.5 * thetaMax * thetaMax / ( sigma * sigma ) ); + + vec3 accumColor = vec3( 0.0 ); + float accumWeight = 0.0; + + for ( int i = 0; i < SAMPLES; i ++ ) { + + // Stratified inverse-CDF sampling of the Gaussian, placed on a golden-angle spiral. + float stratum = ( float( i ) + 0.5 ) / float( SAMPLES ); + float theta = sigma * sqrt( - 2.0 * log( 1.0 - stratum * truncation ) ); + float phi = float( i ) * GOLDEN_ANGLE; + + vec3 offset = cos( phi ) * tangent + sin( phi ) * bitangent; + vec3 sampleDirection = cos( theta ) * outputDirection + sin( theta ) * offset; + + // Correct the planar sample density to solid angle. + float weight = sin( theta ) / theta; + + accumColor += weight * bilinearCubeUV( envMap, sampleDirection, mipInt ); + accumWeight += weight; + + } + + gl_FragColor = vec4( accumColor / accumWeight, 1.0 ); + + } + `,blending:0,depthTest:!1,depthWrite:!1})}function bo(){return new Ni({name:`EquirectangularToCubeUV`,uniforms:{envMap:{value:null}},vertexShader:So(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + + #include + + void main() { + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + + } + `,blending:0,depthTest:!1,depthWrite:!1})}function xo(){return new Ni({name:`CubemapToCubeUV`,uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:So(),fragmentShader:` + + precision mediump float; + precision mediump int; + + uniform float flipEnvMap; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + void main() { + + gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + + } + `,blending:0,depthTest:!1,depthWrite:!1})}function So(){return` + + precision mediump float; + precision mediump int; + + attribute vec3 outputDirection; + + varying vec3 vOutputDirection; + + void main() { + + vOutputDirection = outputDirection; + gl_Position = vec4( position, 1.0 ); + + } + `}var Co=class extends W{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;let n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];this.texture=new fi(r),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `,fragmentShader:` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + `},r=new _i(5,5,5),i=new Ni({name:`CubemapFromEquirect`,uniforms:Ti(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});i.uniforms.tEquirect.value=t;let a=new Lr(r,i),o=t.minFilter;return t.minFilter===1008&&(t.minFilter=s),new Ca(1,10,this).update(e,a),t.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,t=!0,n=!0,r=!0){let i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}};function wo(e){let t=new WeakMap,n=new WeakMap,r=null;function i(e,t=!1){return e==null?null:t?o(e):a(e)}function a(n){if(n&&n.isTexture){let r=n.mapping;if(r===303||r===304){if(t.has(n)){let e=t.get(n).texture;return s(e,n.mapping)}{let r=n.image;if(r&&r.height>0){let i=new Co(r.height);return i.fromEquirectangularTexture(e,n),t.set(n,i),n.addEventListener(`dispose`,l),s(i.texture,n.mapping)}return null}}}return n}function o(t){if(t&&t.isTexture){let i=t.mapping,a=i===303||i===304,o=i===301||i===302;if(a||o){let i=n.get(t),s=i===void 0?0:i.texture.pmremVersion;if(t.isRenderTargetTexture&&t.pmremVersion!==s)return r===null&&(r=new mo(e)),i=a?r.fromEquirectangular(t,i):r.fromCubemap(t,i),i.texture.pmremVersion=t.pmremVersion,n.set(t,i),i.texture;if(i!==void 0)return i.texture;{let s=t.image;return a&&s&&s.height>0||o&&s&&c(s)?(r===null&&(r=new mo(e)),i=a?r.fromEquirectangular(t):r.fromCubemap(t),i.texture.pmremVersion=t.pmremVersion,n.set(t,i),t.addEventListener(`dispose`,u),i.texture):null}}}return t}function s(e,t){return t===303?e.mapping=301:t===304&&(e.mapping=302),e}function c(e){let t=0;for(let n=0;n<6;n++)e[n]!==void 0&&t++;return t===6}function l(e){let n=e.target;n.removeEventListener(`dispose`,l);let r=t.get(n);r!==void 0&&(t.delete(n),r.dispose())}function u(e){let t=e.target;t.removeEventListener(`dispose`,u);let r=n.get(t);r!==void 0&&(n.delete(t),r.dispose())}function d(){t=new WeakMap,n=new WeakMap,r!==null&&(r.dispose(),r=null)}return{get:i,dispose:d}}function To(e){let t={};function n(n){if(t[n]!==void 0)return t[n];let r=e.getExtension(n);return t[n]=r,r}return{has:function(e){return n(e)!==null},init:function(){n(`EXT_color_buffer_float`),n(`WEBGL_clip_cull_distance`),n(`OES_texture_float_linear`),n(`EXT_color_buffer_half_float`),n(`WEBGL_multisampled_render_to_texture`),n(`WEBGL_render_shared_exponent`)},get:function(e){let t=n(e);return t===null&&nt(`WebGLRenderer: `+e+` extension not supported.`),t}}}function Eo(e,t,n,r){let i={},a=new WeakMap;function o(e){let s=e.target;s.index!==null&&t.remove(s.index);for(let e in s.attributes)t.remove(s.attributes[e]);s.removeEventListener(`dispose`,o),delete i[s.id];let c=a.get(s);c&&(t.remove(c),a.delete(s)),r.releaseStatesOfGeometry(s),s.isInstancedBufferGeometry===!0&&delete s._maxInstanceCount,n.memory.geometries--}function s(e,t){return i[t.id]===!0?t:(t.addEventListener(`dispose`,o),i[t.id]=!0,n.memory.geometries++,t)}function c(n){let r=n.attributes;for(let n in r)t.update(r[n],e.ARRAY_BUFFER)}function l(e){let n=[],r=e.index,i=e.attributes.position,o=0;if(i===void 0)return;if(r!==null){let e=r.array;o=r.version;for(let t=0,r=e.length;t=65535?er:$n)(n,1);s.version=o;let c=a.get(e);c&&t.remove(c),a.set(e,s)}function u(e){let t=a.get(e);if(t){let n=e.index;n!==null&&t.versiont.maxTextureSize&&(m=Math.ceil(p/t.maxTextureSize),p=t.maxTextureSize);let h=new Float32Array(p*m*4*u),_=new Pt(h,p,m,u);_.type=g,_.needsUpdate=!0;let v=f*4;for(let t=0;t + #include + + void main() { + gl_FragColor = texture2D( tDiffuse, vUv ); + + #ifdef LINEAR_TONE_MAPPING + gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb ); + #elif defined( REINHARD_TONE_MAPPING ) + gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb ); + #elif defined( CINEON_TONE_MAPPING ) + gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb ); + #elif defined( ACES_FILMIC_TONE_MAPPING ) + gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb ); + #elif defined( AGX_TONE_MAPPING ) + gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb ); + #elif defined( NEUTRAL_TONE_MAPPING ) + gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb ); + #elif defined( CUSTOM_TONE_MAPPING ) + gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb ); + #endif + + #ifdef SRGB_TRANSFER + gl_FragColor = sRGBTransferOETF( gl_FragColor ); + #endif + }`,depthTest:!1,depthWrite:!1}),d=new Lr(l,u),f=new ya(-1,1,1,-1,0,1),p=null,m=null,h=!1,g,v=null,y=[],b=!1;this.setSize=function(e,t){o.setSize(e,t),s!==null&&s.setSize(e,t),c!==null&&c.setSize(e,t);for(let n=0;n0&&y[0].isRenderPass===!0;let t=o.width,n=o.height;y.length>0&&s===null&&(s=new W(t,n,{type:_,depthBuffer:!1,stencilBuffer:!1}),c=new W(t,n,{type:_,depthBuffer:!1,stencilBuffer:!1}));for(let e=0;e0)return e;let i=t*n,a=Ro[i];if(a===void 0&&(a=new Float32Array(i),Ro[i]=a),t!==0){r.toArray(a,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(a,i)}return a}function Wo(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n0&&(this.seq=r.concat(i))}setValue(e,t,n,r){let i=this.map[t];i!==void 0&&i.setValue(e,n,r)}setOptional(e,t,n){let r=t[n];r!==void 0&&this.setValue(e,n,r)}static upload(e,t,n,r){for(let i=0,a=t.length;i!==a;++i){let a=t[i],o=n[a.id];o.needsUpdate!==!1&&a.setValue(e,o.value,r)}}static seqWithValue(e,t){let n=[];for(let r=0,i=e.length;r!==i;++r){let i=e[r];i.id in t&&n.push(i)}return n}};function Bs(e,t,n){let r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}var Vs=37297,Hs=0;function Us(e,t){let n=e.split(` +`),r=[],i=Math.max(t-6,0),a=Math.min(t+6,n.length);for(let e=i;e`:` `} ${i}: ${n[e]}`)}return r.join(` +`)}var Ws=new U;function Gs(e){xt._getMatrix(Ws,xt.workingColorSpace,e);let t=`mat3( ${Ws.elements.map(e=>e.toFixed(4))} )`;switch(xt.getTransfer(e)){case He:return[t,`LinearTransferOETF`];case Ue:return[t,`sRGBTransferOETF`];default:return R(`WebGLProgram: Unsupported color space: `,e),[t,`LinearTransferOETF`]}}function Ks(e,t,n){let r=e.getShaderParameter(t,e.COMPILE_STATUS),i=(e.getShaderInfoLog(t)||``).trim();if(r&&i===``)return``;let a=/ERROR: 0:(\d+)/.exec(i);if(a){let r=parseInt(a[1]);return n.toUpperCase()+` + +`+i+` + +`+Us(e.getShaderSource(t),r)}return i}function qs(e,t){let n=Gs(t);return[`vec4 ${e}( vec4 value ) {`,` return ${n[1]}( vec4( value.rgb * ${n[0]}, value.a ) );`,`}`].join(` +`)}var Js={1:`Linear`,2:`Reinhard`,3:`Cineon`,4:`ACESFilmic`,6:`AgX`,7:`Neutral`,5:`Custom`};function Ys(e,t){let n=Js[t];return n===void 0?(R(`WebGLProgram: Unsupported toneMapping:`,t),`vec3 `+e+`( vec3 color ) { return LinearToneMapping( color ); }`):`vec3 `+e+`( vec3 color ) { return `+n+`ToneMapping( color ); }`}var Xs=new H;function Zs(){return xt.getLuminanceCoefficients(Xs),[`float luminance( const in vec3 rgb ) {`,` const vec3 weights = vec3( ${Xs.x.toFixed(4)}, ${Xs.y.toFixed(4)}, ${Xs.z.toFixed(4)} );`,` return dot( weights, rgb );`,`}`].join(` +`)}function Qs(e){return[e.extensionClipCullDistance?`#extension GL_ANGLE_clip_cull_distance : require`:``,e.extensionMultiDraw?`#extension GL_ANGLE_multi_draw : require`:``].filter(tc).join(` +`)}function $s(e){let t=[];for(let n in e){let r=e[n];r!==!1&&t.push(`#define `+n+` `+r)}return t.join(` +`)}function ec(e,t){let n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function ac(e){return e.replace(ic,sc)}var oc=new Map;function sc(e,t){let n=q[t];if(n===void 0){let e=oc.get(t);if(e!==void 0)n=q[e],R(`WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.`,t,e);else throw Error(`THREE.WebGLProgram: Can not resolve #include <`+t+`>`)}return ac(n)}var cc=/#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 lc(e){return e.replace(cc,uc)}function uc(e,t,n,r){let i=``;for(let e=parseInt(t);e0&&(g+=` +`),_=[`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m].filter(tc).join(` +`),_.length>0&&(_+=` +`)):(g=[dc(n),`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m,n.extensionClipCullDistance?`#define USE_CLIP_DISTANCE`:``,n.batching?`#define USE_BATCHING`:``,n.batchingColor?`#define USE_BATCHING_COLOR`:``,n.instancing?`#define USE_INSTANCING`:``,n.instancingColor?`#define USE_INSTANCING_COLOR`:``,n.instancingMorph?`#define USE_INSTANCING_MORPH`:``,n.useFog&&n.fog?`#define USE_FOG`:``,n.useFog&&n.fogExp2?`#define FOG_EXP2`:``,n.map?`#define USE_MAP`:``,n.envMap?`#define USE_ENVMAP`:``,n.envMap?`#define `+u:``,n.lightMap?`#define USE_LIGHTMAP`:``,n.aoMap?`#define USE_AOMAP`:``,n.bumpMap?`#define USE_BUMPMAP`:``,n.normalMap?`#define USE_NORMALMAP`:``,n.normalMapObjectSpace?`#define USE_NORMALMAP_OBJECTSPACE`:``,n.normalMapTangentSpace?`#define USE_NORMALMAP_TANGENTSPACE`:``,n.displacementMap?`#define USE_DISPLACEMENTMAP`:``,n.emissiveMap?`#define USE_EMISSIVEMAP`:``,n.anisotropy?`#define USE_ANISOTROPY`:``,n.anisotropyMap?`#define USE_ANISOTROPYMAP`:``,n.clearcoatMap?`#define USE_CLEARCOATMAP`:``,n.clearcoatRoughnessMap?`#define USE_CLEARCOAT_ROUGHNESSMAP`:``,n.clearcoatNormalMap?`#define USE_CLEARCOAT_NORMALMAP`:``,n.iridescenceMap?`#define USE_IRIDESCENCEMAP`:``,n.iridescenceThicknessMap?`#define USE_IRIDESCENCE_THICKNESSMAP`:``,n.specularMap?`#define USE_SPECULARMAP`:``,n.specularColorMap?`#define USE_SPECULAR_COLORMAP`:``,n.specularIntensityMap?`#define USE_SPECULAR_INTENSITYMAP`:``,n.roughnessMap?`#define USE_ROUGHNESSMAP`:``,n.metalnessMap?`#define USE_METALNESSMAP`:``,n.alphaMap?`#define USE_ALPHAMAP`:``,n.alphaHash?`#define USE_ALPHAHASH`:``,n.transmission?`#define USE_TRANSMISSION`:``,n.transmissionMap?`#define USE_TRANSMISSIONMAP`:``,n.thicknessMap?`#define USE_THICKNESSMAP`:``,n.sheenColorMap?`#define USE_SHEEN_COLORMAP`:``,n.sheenRoughnessMap?`#define USE_SHEEN_ROUGHNESSMAP`:``,n.mapUv?`#define MAP_UV `+n.mapUv:``,n.alphaMapUv?`#define ALPHAMAP_UV `+n.alphaMapUv:``,n.lightMapUv?`#define LIGHTMAP_UV `+n.lightMapUv:``,n.aoMapUv?`#define AOMAP_UV `+n.aoMapUv:``,n.emissiveMapUv?`#define EMISSIVEMAP_UV `+n.emissiveMapUv:``,n.bumpMapUv?`#define BUMPMAP_UV `+n.bumpMapUv:``,n.normalMapUv?`#define NORMALMAP_UV `+n.normalMapUv:``,n.displacementMapUv?`#define DISPLACEMENTMAP_UV `+n.displacementMapUv:``,n.metalnessMapUv?`#define METALNESSMAP_UV `+n.metalnessMapUv:``,n.roughnessMapUv?`#define ROUGHNESSMAP_UV `+n.roughnessMapUv:``,n.anisotropyMapUv?`#define ANISOTROPYMAP_UV `+n.anisotropyMapUv:``,n.clearcoatMapUv?`#define CLEARCOATMAP_UV `+n.clearcoatMapUv:``,n.clearcoatNormalMapUv?`#define CLEARCOAT_NORMALMAP_UV `+n.clearcoatNormalMapUv:``,n.clearcoatRoughnessMapUv?`#define CLEARCOAT_ROUGHNESSMAP_UV `+n.clearcoatRoughnessMapUv:``,n.iridescenceMapUv?`#define IRIDESCENCEMAP_UV `+n.iridescenceMapUv:``,n.iridescenceThicknessMapUv?`#define IRIDESCENCE_THICKNESSMAP_UV `+n.iridescenceThicknessMapUv:``,n.sheenColorMapUv?`#define SHEEN_COLORMAP_UV `+n.sheenColorMapUv:``,n.sheenRoughnessMapUv?`#define SHEEN_ROUGHNESSMAP_UV `+n.sheenRoughnessMapUv:``,n.specularMapUv?`#define SPECULARMAP_UV `+n.specularMapUv:``,n.specularColorMapUv?`#define SPECULAR_COLORMAP_UV `+n.specularColorMapUv:``,n.specularIntensityMapUv?`#define SPECULAR_INTENSITYMAP_UV `+n.specularIntensityMapUv:``,n.transmissionMapUv?`#define TRANSMISSIONMAP_UV `+n.transmissionMapUv:``,n.thicknessMapUv?`#define THICKNESSMAP_UV `+n.thicknessMapUv:``,n.vertexTangents&&n.flatShading===!1?`#define USE_TANGENT`:``,n.vertexNormals?`#define HAS_NORMAL`:``,n.vertexColors?`#define USE_COLOR`:``,n.vertexAlphas?`#define USE_COLOR_ALPHA`:``,n.vertexUv1s?`#define USE_UV1`:``,n.vertexUv2s?`#define USE_UV2`:``,n.vertexUv3s?`#define USE_UV3`:``,n.pointsUvs?`#define USE_POINTS_UV`:``,n.flatShading?`#define FLAT_SHADED`:``,n.skinning?`#define USE_SKINNING`:``,n.morphTargets?`#define USE_MORPHTARGETS`:``,n.morphNormals&&n.flatShading===!1?`#define USE_MORPHNORMALS`:``,n.morphColors?`#define USE_MORPHCOLORS`:``,n.morphTargetsCount>0?`#define MORPHTARGETS_TEXTURE_STRIDE `+n.morphTextureStride:``,n.morphTargetsCount>0?`#define MORPHTARGETS_COUNT `+n.morphTargetsCount:``,n.doubleSided?`#define DOUBLE_SIDED`:``,n.flipSided?`#define FLIP_SIDED`:``,n.shadowMapEnabled?`#define USE_SHADOWMAP`:``,n.shadowMapEnabled?`#define `+c:``,n.sizeAttenuation?`#define USE_SIZEATTENUATION`:``,n.numLightProbes>0?`#define USE_LIGHT_PROBES`:``,n.logarithmicDepthBuffer?`#define USE_LOGARITHMIC_DEPTH_BUFFER`:``,n.reversedDepthBuffer?`#define USE_REVERSED_DEPTH_BUFFER`:``,`uniform mat4 modelMatrix;`,`uniform mat4 modelViewMatrix;`,`uniform mat4 projectionMatrix;`,`uniform mat4 viewMatrix;`,`uniform mat3 normalMatrix;`,`uniform vec3 cameraPosition;`,`uniform bool isOrthographic;`,`#ifdef USE_INSTANCING`,` attribute mat4 instanceMatrix;`,`#endif`,`#ifdef USE_INSTANCING_COLOR`,` attribute vec3 instanceColor;`,`#endif`,`#ifdef USE_INSTANCING_MORPH`,` uniform sampler2D morphTexture;`,`#endif`,`attribute vec3 position;`,`attribute vec3 normal;`,`attribute vec2 uv;`,`#ifdef USE_UV1`,` attribute vec2 uv1;`,`#endif`,`#ifdef USE_UV2`,` attribute vec2 uv2;`,`#endif`,`#ifdef USE_UV3`,` attribute vec2 uv3;`,`#endif`,`#ifdef USE_TANGENT`,` attribute vec4 tangent;`,`#endif`,`#if defined( USE_COLOR_ALPHA )`,` attribute vec4 color;`,`#elif defined( USE_COLOR )`,` attribute vec3 color;`,`#endif`,`#ifdef USE_SKINNING`,` attribute vec4 skinIndex;`,` attribute vec4 skinWeight;`,`#endif`,` +`].filter(tc).join(` +`),_=[dc(n),`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m,n.useFog&&n.fog?`#define USE_FOG`:``,n.useFog&&n.fogExp2?`#define FOG_EXP2`:``,n.alphaToCoverage?`#define ALPHA_TO_COVERAGE`:``,n.map?`#define USE_MAP`:``,n.matcap?`#define USE_MATCAP`:``,n.envMap?`#define USE_ENVMAP`:``,n.envMap?`#define `+l:``,n.envMap?`#define `+u:``,n.envMap?`#define `+d:``,f?`#define CUBEUV_TEXEL_WIDTH `+f.texelWidth:``,f?`#define CUBEUV_TEXEL_HEIGHT `+f.texelHeight:``,f?`#define CUBEUV_MAX_MIP `+f.maxMip+`.0`:``,n.lightMap?`#define USE_LIGHTMAP`:``,n.aoMap?`#define USE_AOMAP`:``,n.bumpMap?`#define USE_BUMPMAP`:``,n.normalMap?`#define USE_NORMALMAP`:``,n.normalMapObjectSpace?`#define USE_NORMALMAP_OBJECTSPACE`:``,n.normalMapTangentSpace?`#define USE_NORMALMAP_TANGENTSPACE`:``,n.packedNormalMap?`#define USE_PACKED_NORMALMAP`:``,n.emissiveMap?`#define USE_EMISSIVEMAP`:``,n.anisotropy?`#define USE_ANISOTROPY`:``,n.anisotropyMap?`#define USE_ANISOTROPYMAP`:``,n.clearcoat?`#define USE_CLEARCOAT`:``,n.clearcoatMap?`#define USE_CLEARCOATMAP`:``,n.clearcoatRoughnessMap?`#define USE_CLEARCOAT_ROUGHNESSMAP`:``,n.clearcoatNormalMap?`#define USE_CLEARCOAT_NORMALMAP`:``,n.dispersion?`#define USE_DISPERSION`:``,n.retroreflection?`#define USE_RETROREFLECTION`:``,n.iridescence?`#define USE_IRIDESCENCE`:``,n.iridescenceMap?`#define USE_IRIDESCENCEMAP`:``,n.iridescenceThicknessMap?`#define USE_IRIDESCENCE_THICKNESSMAP`:``,n.specularMap?`#define USE_SPECULARMAP`:``,n.specularColorMap?`#define USE_SPECULAR_COLORMAP`:``,n.specularIntensityMap?`#define USE_SPECULAR_INTENSITYMAP`:``,n.roughnessMap?`#define USE_ROUGHNESSMAP`:``,n.metalnessMap?`#define USE_METALNESSMAP`:``,n.alphaMap?`#define USE_ALPHAMAP`:``,n.alphaTest?`#define USE_ALPHATEST`:``,n.alphaHash?`#define USE_ALPHAHASH`:``,n.sheen?`#define USE_SHEEN`:``,n.sheenColorMap?`#define USE_SHEEN_COLORMAP`:``,n.sheenRoughnessMap?`#define USE_SHEEN_ROUGHNESSMAP`:``,n.transmission?`#define USE_TRANSMISSION`:``,n.transmissionMap?`#define USE_TRANSMISSIONMAP`:``,n.thicknessMap?`#define USE_THICKNESSMAP`:``,n.vertexTangents&&n.flatShading===!1?`#define USE_TANGENT`:``,n.vertexColors||n.instancingColor?`#define USE_COLOR`:``,n.vertexAlphas||n.batchingColor?`#define USE_COLOR_ALPHA`:``,n.vertexUv1s?`#define USE_UV1`:``,n.vertexUv2s?`#define USE_UV2`:``,n.vertexUv3s?`#define USE_UV3`:``,n.pointsUvs?`#define USE_POINTS_UV`:``,n.gradientMap?`#define USE_GRADIENTMAP`:``,n.flatShading?`#define FLAT_SHADED`:``,n.doubleSided?`#define DOUBLE_SIDED`:``,n.flipSided?`#define FLIP_SIDED`:``,n.shadowMapEnabled?`#define USE_SHADOWMAP`:``,n.shadowMapEnabled?`#define `+c:``,n.premultipliedAlpha?`#define PREMULTIPLIED_ALPHA`:``,n.numLightProbes>0?`#define USE_LIGHT_PROBES`:``,n.numLightProbeGrids>0?`#define USE_LIGHT_PROBES_GRID`:``,n.decodeVideoTexture?`#define DECODE_VIDEO_TEXTURE`:``,n.decodeVideoTextureEmissive?`#define DECODE_VIDEO_TEXTURE_EMISSIVE`:``,n.logarithmicDepthBuffer?`#define USE_LOGARITHMIC_DEPTH_BUFFER`:``,n.reversedDepthBuffer?`#define USE_REVERSED_DEPTH_BUFFER`:``,`uniform mat4 viewMatrix;`,`uniform vec3 cameraPosition;`,`uniform bool isOrthographic;`,n.toneMapping===0?``:`#define TONE_MAPPING`,n.toneMapping===0?``:q.tonemapping_pars_fragment,n.toneMapping===0?``:Ys(`toneMapping`,n.toneMapping),n.dithering?`#define DITHERING`:``,n.opaque?`#define OPAQUE`:``,q.colorspace_pars_fragment,qs(`linearToOutputTexel`,n.outputColorSpace),Zs(),n.useDepthPacking?`#define DEPTH_PACKING `+n.depthPacking:``,` +`].filter(tc).join(` +`)),o=ac(o),o=nc(o,n),o=rc(o,n),s=ac(s),s=nc(s,n),s=rc(s,n),o=lc(o),s=lc(s),n.isRawShaderMaterial!==!0&&(v=`#version 300 es +`,g=[p,`#define attribute in`,`#define varying out`,`#define texture2D texture`].join(` +`)+` +`+g,_=[`#define varying in`,n.glslVersion===`300 es`?``:`layout(location = 0) out highp vec4 pc_fragColor;`,n.glslVersion===`300 es`?``:`#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(` +`)+` +`+_);let y=v+g+o,b=v+_+s,x=Bs(i,i.VERTEX_SHADER,y),S=Bs(i,i.FRAGMENT_SHADER,b);i.attachShader(h,x),i.attachShader(h,S),n.index0AttributeName===void 0?n.hasPositionAttribute===!0&&i.bindAttribLocation(h,0,`position`):i.bindAttribLocation(h,0,n.index0AttributeName),i.linkProgram(h);function C(t){if(e.debug.checkShaderErrors){let n=i.getProgramInfoLog(h)||``,r=i.getShaderInfoLog(x)||``,a=i.getShaderInfoLog(S)||``,o=n.trim(),s=r.trim(),c=a.trim(),l=!0,u=!0;if(i.getProgramParameter(h,i.LINK_STATUS)===!1){if(l=!1,typeof e.debug.onShaderError==`function`)e.debug.onShaderError(i,h,x,S);else{let e=Ks(i,x,`vertex`),n=Ks(i,S,`fragment`);z(`WebGLProgram: Shader Error `+i.getError()+` - VALIDATE_STATUS `+i.getProgramParameter(h,i.VALIDATE_STATUS)+` + +Material Name: `+t.name+` +Material Type: `+t.type+` + +Program Info Log: `+o+` +`+e+` +`+n)}}else o===``?(s===``||c===``)&&(u=!1):R(`WebGLProgram: Program Info Log:`,o);u&&(t.diagnostics={runnable:l,programLog:o,vertexShader:{log:s,prefix:g},fragmentShader:{log:c,prefix:_}})}i.deleteShader(x),i.deleteShader(S),w=new zs(i,h),T=ec(i,h)}let w;this.getUniforms=function(){return w===void 0&&C(this),w};let T;this.getAttributes=function(){return T===void 0&&C(this),T};let E=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return E===!1&&(E=i.getProgramParameter(h,Vs)),E},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(h),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=Hs++,this.cacheKey=t,this.usedTimes=1,this.program=h,this.vertexShader=x,this.fragmentShader=S,this}var Sc=0,Cc=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e,t,n){let r=this._getShaderCacheForMaterial(e);return r.has(t)===!1&&(r.add(t),t.usedTimes++),r.has(n)===!1&&(r.add(n),n.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let e of t)e.usedTimes--,e.usedTimes===0&&this.shaderCache.delete(e.code);return this.materialCache.delete(e),this}getVertexShaderStage(e){return this._getShaderStage(e.vertexShader)}getFragmentShaderStage(e){return this._getShaderStage(e.fragmentShader)}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache,n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){let t=this.shaderCache,n=t.get(e);return n===void 0&&(n=new wc(e),t.set(e,n)),n}},wc=class{constructor(e){this.id=Sc++,this.code=e,this.usedTimes=0}};function Tc(e){return e===1030||e===37490||e===36285}function Ec(e,t,n,r,i,a){let o=new qt,s=new Cc,c=new Set,l=[],u=new Map,d=r.logarithmicDepthBuffer,f=r.precision,p={MeshDepthMaterial:`depth`,MeshDistanceMaterial:`distance`,MeshNormalMaterial:`normal`,MeshBasicMaterial:`basic`,MeshLambertMaterial:`lambert`,MeshPhongMaterial:`phong`,MeshToonMaterial:`toon`,MeshStandardMaterial:`physical`,MeshPhysicalMaterial:`physical`,MeshMatcapMaterial:`matcap`,LineBasicMaterial:`basic`,LineDashedMaterial:`dashed`,PointsMaterial:`points`,ShadowMaterial:`shadow`,SpriteMaterial:`sprite`};function m(e){return c.add(e),e===0?`uv`:`uv${e}`}function h(i,o,l,u,h,g){let _=u.fog,v=h.geometry,y=i.isMeshStandardMaterial||i.isMeshLambertMaterial||i.isMeshPhongMaterial?u.environment:null,b=i.isMeshStandardMaterial||i.isMeshLambertMaterial&&!i.envMap||i.isMeshPhongMaterial&&!i.envMap,x=t.get(i.envMap||y,b),S=x&&x.mapping===306?x.image.height:null,C=p[i.type];i.precision!==null&&(f=r.getMaxPrecision(i.precision),f!==i.precision&&R(`WebGLProgram.getParameters:`,i.precision,`not supported, using`,f,`instead.`));let w=v.morphAttributes.position||v.morphAttributes.normal||v.morphAttributes.color,T=w===void 0?0:w.length,E=0;v.morphAttributes.position!==void 0&&(E=1),v.morphAttributes.normal!==void 0&&(E=2),v.morphAttributes.color!==void 0&&(E=3);let D,O,ee,k;if(C){let e=Ka[C];D=e.vertexShader,O=e.fragmentShader}else{D=i.vertexShader,O=i.fragmentShader;let e=s.getVertexShaderStage(i),t=s.getFragmentShaderStage(i);s.update(i,e,t),ee=e.id,k=t.id}let A=e.getRenderTarget(),te=e.state.buffers.depth.getReversed(),ne=h.isInstancedMesh===!0,j=h.isBatchedMesh===!0,re=!!i.map,M=!!i.matcap,ie=!!x,ae=!!i.aoMap,oe=!!i.lightMap,se=!!i.bumpMap&&i.wireframe===!1,ce=!!i.normalMap,le=!!i.displacementMap,ue=!!i.emissiveMap,N=!!i.metalnessMap,de=!!i.roughnessMap,fe=i.anisotropy>0,pe=i.clearcoat>0,me=i.dispersion>0,he=i.retroreflectivity>0,ge=i.iridescence>0,_e=i.sheen>0,ve=i.transmission>0,ye=fe&&!!i.anisotropyMap,be=pe&&!!i.clearcoatMap,xe=pe&&!!i.clearcoatNormalMap,Se=pe&&!!i.clearcoatRoughnessMap,Ce=ge&&!!i.iridescenceMap,we=ge&&!!i.iridescenceThicknessMap,Te=_e&&!!i.sheenColorMap,Ee=_e&&!!i.sheenRoughnessMap,De=!!i.specularMap,Oe=!!i.specularColorMap,ke=!!i.specularIntensityMap,Ae=ve&&!!i.transmissionMap,je=ve&&!!i.thicknessMap,Me=!!i.gradientMap,Ne=!!i.alphaMap,Pe=i.alphaTest>0,P=!!i.alphaHash,Fe=!!i.extensions,Ie=0;i.toneMapped&&(A===null||A.isXRRenderTarget===!0)&&(Ie=e.toneMapping);let Le={shaderID:C,shaderType:i.type,shaderName:i.name,vertexShader:D,fragmentShader:O,defines:i.defines,customVertexShaderID:ee,customFragmentShaderID:k,isRawShaderMaterial:i.isRawShaderMaterial===!0,glslVersion:i.glslVersion,precision:f,batching:j,batchingColor:j&&h._colorsTexture!==null,instancing:ne,instancingColor:ne&&h.instanceColor!==null,instancingMorph:ne&&h.morphTexture!==null,outputColorSpace:A===null?e.outputColorSpace:A.isXRRenderTarget===!0?A.texture.colorSpace:xt.workingColorSpace,alphaToCoverage:!!i.alphaToCoverage,map:re,matcap:M,envMap:ie,envMapMode:ie&&x.mapping,envMapCubeUVHeight:S,aoMap:ae,lightMap:oe,bumpMap:se,normalMap:ce,displacementMap:le,emissiveMap:ue,normalMapObjectSpace:ce&&i.normalMapType===1,normalMapTangentSpace:ce&&i.normalMapType===0,packedNormalMap:ce&&i.normalMapType===0&&Tc(i.normalMap.format),metalnessMap:N,roughnessMap:de,anisotropy:fe,anisotropyMap:ye,clearcoat:pe,clearcoatMap:be,clearcoatNormalMap:xe,clearcoatRoughnessMap:Se,dispersion:me,retroreflection:he,iridescence:ge,iridescenceMap:Ce,iridescenceThicknessMap:we,sheen:_e,sheenColorMap:Te,sheenRoughnessMap:Ee,specularMap:De,specularColorMap:Oe,specularIntensityMap:ke,transmission:ve,transmissionMap:Ae,thicknessMap:je,gradientMap:Me,opaque:i.transparent===!1&&i.blending===1&&i.alphaToCoverage===!1,alphaMap:Ne,alphaTest:Pe,alphaHash:P,combine:i.combine,mapUv:re&&m(i.map.channel),aoMapUv:ae&&m(i.aoMap.channel),lightMapUv:oe&&m(i.lightMap.channel),bumpMapUv:se&&m(i.bumpMap.channel),normalMapUv:ce&&m(i.normalMap.channel),displacementMapUv:le&&m(i.displacementMap.channel),emissiveMapUv:ue&&m(i.emissiveMap.channel),metalnessMapUv:N&&m(i.metalnessMap.channel),roughnessMapUv:de&&m(i.roughnessMap.channel),anisotropyMapUv:ye&&m(i.anisotropyMap.channel),clearcoatMapUv:be&&m(i.clearcoatMap.channel),clearcoatNormalMapUv:xe&&m(i.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Se&&m(i.clearcoatRoughnessMap.channel),iridescenceMapUv:Ce&&m(i.iridescenceMap.channel),iridescenceThicknessMapUv:we&&m(i.iridescenceThicknessMap.channel),sheenColorMapUv:Te&&m(i.sheenColorMap.channel),sheenRoughnessMapUv:Ee&&m(i.sheenRoughnessMap.channel),specularMapUv:De&&m(i.specularMap.channel),specularColorMapUv:Oe&&m(i.specularColorMap.channel),specularIntensityMapUv:ke&&m(i.specularIntensityMap.channel),transmissionMapUv:Ae&&m(i.transmissionMap.channel),thicknessMapUv:je&&m(i.thicknessMap.channel),alphaMapUv:Ne&&m(i.alphaMap.channel),vertexTangents:!!v.attributes.tangent&&(ce||fe),vertexNormals:!!v.attributes.normal,vertexColors:i.vertexColors,vertexAlphas:i.vertexColors===!0&&!!v.attributes.color&&v.attributes.color.itemSize===4,pointsUvs:h.isPoints===!0&&!!v.attributes.uv&&(re||Ne),fog:!!_,useFog:i.fog===!0,fogExp2:!!_&&_.isFogExp2,flatShading:i.wireframe===!1&&(i.flatShading===!0||v.attributes.normal===void 0&&ce===!1&&(i.isMeshLambertMaterial||i.isMeshPhongMaterial||i.isMeshStandardMaterial||i.isMeshPhysicalMaterial)),sizeAttenuation:i.sizeAttenuation===!0,logarithmicDepthBuffer:d,reversedDepthBuffer:te,skinning:h.isSkinnedMesh===!0,hasPositionAttribute:v.attributes.position!==void 0,morphTargets:v.morphAttributes.position!==void 0,morphNormals:v.morphAttributes.normal!==void 0,morphColors:v.morphAttributes.color!==void 0,morphTargetsCount:T,morphTextureStride:E,numSunLights:o.sun.length,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numSpotLightMaps:o.spotLightMap.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numSunLightShadows:o.sunShadowMap.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numSpotLightShadowsWithMaps:o.numSpotLightShadowsWithMaps,numLightProbes:o.numLightProbes,numLightProbeGrids:g.length,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:i.dithering,shadowMapEnabled:e.shadowMap.enabled&&l.length>0,shadowMapType:e.shadowMap.type,toneMapping:Ie,decodeVideoTexture:re&&i.map.isVideoTexture===!0&&xt.getTransfer(i.map.colorSpace)===`srgb`,decodeVideoTextureEmissive:ue&&i.emissiveMap.isVideoTexture===!0&&xt.getTransfer(i.emissiveMap.colorSpace)===`srgb`,premultipliedAlpha:i.premultipliedAlpha,doubleSided:i.side===2,flipSided:i.side===1,useDepthPacking:i.depthPacking>=0,depthPacking:i.depthPacking||0,index0AttributeName:i.index0AttributeName,extensionClipCullDistance:Fe&&i.extensions.clipCullDistance===!0&&n.has(`WEBGL_clip_cull_distance`),extensionMultiDraw:(Fe&&i.extensions.multiDraw===!0||j)&&n.has(`WEBGL_multi_draw`),rendererExtensionParallelShaderCompile:n.has(`KHR_parallel_shader_compile`),customProgramCacheKey:i.customProgramCacheKey()};return Le.vertexUv1s=c.has(1),Le.vertexUv2s=c.has(2),Le.vertexUv3s=c.has(3),c.clear(),Le}function g(t){let n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),t.defines!==void 0)for(let e in t.defines)n.push(e),n.push(t.defines[e]);return t.isRawShaderMaterial===!1&&(_(n,t),v(n,t),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()}function _(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numSunLights),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numSunLightShadows),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.numLightProbes),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}function v(e,t){o.disableAll(),t.instancing&&o.enable(0),t.instancingColor&&o.enable(1),t.instancingMorph&&o.enable(2),t.matcap&&o.enable(3),t.envMap&&o.enable(4),t.normalMapObjectSpace&&o.enable(5),t.normalMapTangentSpace&&o.enable(6),t.clearcoat&&o.enable(7),t.iridescence&&o.enable(8),t.alphaTest&&o.enable(9),t.vertexColors&&o.enable(10),t.vertexAlphas&&o.enable(11),t.vertexUv1s&&o.enable(12),t.vertexUv2s&&o.enable(13),t.vertexUv3s&&o.enable(14),t.vertexTangents&&o.enable(15),t.anisotropy&&o.enable(16),t.alphaHash&&o.enable(17),t.batching&&o.enable(18),t.dispersion&&o.enable(19),t.retroreflection&&o.enable(24),t.batchingColor&&o.enable(20),t.gradientMap&&o.enable(21),t.packedNormalMap&&o.enable(22),t.vertexNormals&&o.enable(23),e.push(o.mask),o.disableAll(),t.fog&&o.enable(0),t.useFog&&o.enable(1),t.flatShading&&o.enable(2),t.logarithmicDepthBuffer&&o.enable(3),t.reversedDepthBuffer&&o.enable(4),t.skinning&&o.enable(5),t.morphTargets&&o.enable(6),t.morphNormals&&o.enable(7),t.morphColors&&o.enable(8),t.premultipliedAlpha&&o.enable(9),t.shadowMapEnabled&&o.enable(10),t.doubleSided&&o.enable(11),t.flipSided&&o.enable(12),t.useDepthPacking&&o.enable(13),t.dithering&&o.enable(14),t.transmission&&o.enable(15),t.sheen&&o.enable(16),t.opaque&&o.enable(17),t.pointsUvs&&o.enable(18),t.decodeVideoTexture&&o.enable(19),t.decodeVideoTextureEmissive&&o.enable(20),t.alphaToCoverage&&o.enable(21),t.numLightProbeGrids>0&&o.enable(22),t.hasPositionAttribute&&o.enable(23),e.push(o.mask)}function y(e){let t=p[e.type],n;if(t){let e=Ka[t];n=Ai.clone(e.uniforms)}else n=e.uniforms;return n}function b(t,n){let r=u.get(n);return r===void 0?(r=new xc(e,n,t,i),l.push(r),u.set(n,r)):++r.usedTimes,r}function x(e){if(--e.usedTimes===0){let t=l.indexOf(e);l[t]=l[l.length-1],l.pop(),u.delete(e.cacheKey),e.destroy()}}function S(e){s.remove(e)}function C(){s.dispose()}return{getParameters:h,getProgramCacheKey:g,getUniforms:y,acquireProgram:b,releaseProgram:x,releaseShaderCache:S,programs:l,dispose:C}}function Dc(){let e=new WeakMap;function t(t){return e.has(t)}function n(t){let n=e.get(t);return n===void 0&&(n={},e.set(t,n)),n}function r(t){e.delete(t)}function i(t,n,r){e.get(t)[n]=r}function a(){e=new WeakMap}return{has:t,get:n,remove:r,update:i,dispose:a}}function Oc(e,t){return e.groupOrder===t.groupOrder?e.renderOrder===t.renderOrder?e.material.id===t.material.id?e.materialVariant===t.materialVariant?e.z===t.z?e.id-t.id:e.z-t.z:e.materialVariant-t.materialVariant:e.material.id-t.material.id:e.renderOrder-t.renderOrder:e.groupOrder-t.groupOrder}function kc(e,t){return e.groupOrder===t.groupOrder?e.renderOrder===t.renderOrder?e.z===t.z?e.id-t.id:t.z-e.z:e.renderOrder-t.renderOrder:e.groupOrder-t.groupOrder}function Ac(){let e=[],t=0,n=[],r=[],i=[];function a(){t=0,n.length=0,r.length=0,i.length=0}function o(e){let t=0;return e.isInstancedMesh&&(t+=2),e.isSkinnedMesh&&(t+=1),t}function s(n,r,i,a,s,c){let l=e[t];return l===void 0?(l={id:n.id,object:n,geometry:r,material:i,materialVariant:o(n),groupOrder:a,renderOrder:n.renderOrder,z:s,group:c},e[t]=l):(l.id=n.id,l.object=n,l.geometry=r,l.material=i,l.materialVariant=o(n),l.groupOrder=a,l.renderOrder=n.renderOrder,l.z=s,l.group=c),t++,l}function c(e,t,a,o,c,l,u){u.reversedDepth===!0&&(c=-c);let d=s(e,t,a,o,c,l);a.transmission>0?r.push(d):a.transparent===!0?i.push(d):n.push(d)}function l(e,t,a,o,c,l){let u=s(e,t,a,o,c,l);a.transmission>0?r.unshift(u):a.transparent===!0?i.unshift(u):n.unshift(u)}function u(e,t){n.length>1&&n.sort(e||Oc),r.length>1&&r.sort(t||kc),i.length>1&&i.sort(t||kc)}function d(){for(let n=t,r=e.length;n=r.length?(i=new Ac,r.push(i)):i=r[n],i}function n(){e=new WeakMap}return{get:t,dispose:n}}function Mc(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case`SunLight`:case`DirectionalLight`:n={direction:new H,color:new G};break;case`SpotLight`:n={position:new H,direction:new H,color:new G,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case`PointLight`:n={position:new H,color:new G,distance:0,decay:0};break;case`HemisphereLight`:n={direction:new H,skyColor:new G,groundColor:new G};break;case`RectAreaLight`:n={color:new G,position:new H,halfWidth:new H,halfHeight:new H}}return e[t.id]=n,n}}}function Nc(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case`SunLight`:case`DirectionalLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new V};break;case`SpotLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new V};break;case`PointLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new V,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}var Pc=0;function Fc(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+ +!!t.map-!!e.map}function Ic(e){let t=new Mc,n=Nc(),r={version:0,hash:{sunLength:-1,directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numSunShadows:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],sun:[],sunShadow:[],sunShadowMap:[],sunShadowMatrix:[],sunShadowCascade:[],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 e=0;e<9;e++)r.probe.push(new H);let i=new H,a=new It,o=new It;function s(i){let a=0,o=0,s=0;for(let e=0;e<9;e++)r.probe[e].set(0,0,0);let c=0,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0,y=0,b=0,x=0;i.sort(Fc);for(let e=0,S=i.length;e0&&(e.has(`OES_texture_float_linear`)===!0?(r.rectAreaLTC1=J.LTC_FLOAT_1,r.rectAreaLTC2=J.LTC_FLOAT_2):(r.rectAreaLTC1=J.LTC_HALF_1,r.rectAreaLTC2=J.LTC_HALF_2)),r.ambient[0]=a,r.ambient[1]=o,r.ambient[2]=s;let S=r.hash;(S.sunLength!==c||S.directionalLength!==d||S.pointLength!==f||S.spotLength!==p||S.rectAreaLength!==m||S.hemiLength!==h||S.numSunShadows!==l||S.numDirectionalShadows!==g||S.numPointShadows!==_||S.numSpotShadows!==v||S.numSpotMaps!==y||S.numLightProbes!==x)&&(r.sun.length=c,r.directional.length=d,r.spot.length=p,r.rectArea.length=m,r.point.length=f,r.hemi.length=h,r.sunShadow.length=l,r.sunShadowMap.length=l,r.sunShadowMatrix.length=u,r.sunShadowCascade.length=u,r.directionalShadow.length=g,r.directionalShadowMap.length=g,r.directionalShadowMatrix.length=g,r.pointShadow.length=_,r.pointShadowMap.length=_,r.pointShadowMatrix.length=_,r.spotShadow.length=v,r.spotShadowMap.length=v,r.spotLightMatrix.length=v+y-b,r.spotLightMap.length=y,r.numSpotLightShadowsWithMaps=b,r.numLightProbes=x,S.sunLength=c,S.directionalLength=d,S.pointLength=f,S.spotLength=p,S.rectAreaLength=m,S.hemiLength=h,S.numSunShadows=l,S.numDirectionalShadows=g,S.numPointShadows=_,S.numSpotShadows=v,S.numSpotMaps=y,S.numLightProbes=x,r.version=Pc++)}function c(e,t){let n=0,s=0,c=0,l=0,u=0,d=0,f=t.matrixWorldInverse;for(let t=0,p=e.length;t=i.length?(a=new Lc(e),i.push(a)):a=i[r],a}function r(){t=new WeakMap}return{get:n,dispose:r}}var zc=`void main() { + gl_Position = vec4( position, 1.0 ); +}`,Bc=`uniform sampler2D shadow_pass; +uniform vec2 resolution; +uniform float radius; +void main() { + const float samples = float( VSM_SAMPLES ); + float mean = 0.0; + float squared_mean = 0.0; + float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); + float uvStart = samples <= 1.0 ? 0.0 : - 1.0; + for ( float i = 0.0; i < samples; i ++ ) { + float uvOffset = uvStart + i * uvStride; + #ifdef HORIZONTAL_PASS + vec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg; + mean += distribution.x; + squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; + #else + float depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r; + mean += depth; + squared_mean += depth * depth; + #endif + } + mean = mean / samples; + squared_mean = squared_mean / samples; + float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) ); + gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 ); +}`,Vc=[new H(1,0,0),new H(-1,0,0),new H(0,1,0),new H(0,-1,0),new H(0,0,1),new H(0,0,-1)],Hc=[new H(0,-1,0),new H(0,-1,0),new H(0,0,1),new H(0,0,-1),new H(0,-1,0),new H(0,-1,0)],Uc=new It,Wc=new H,Gc=new H;function Kc(e,t,n){let r=new Gr,a=new V,o=new V,c=new Mt,l=new Ii,u=new Li,d={},f=n.maxTextureSize,p={0:1,1:0,2:2},m=new Ni({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new V},radius:{value:4}},vertexShader:zc,fragmentShader:Bc}),v=m.clone();v.defines.HORIZONTAL_PASS=1;let y=new pr;y.setAttribute(`position`,new Qn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let b=new Lr(y,m),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let S=this.type;this.render=function(t,n,l){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||t.length===0)return;this.type===2&&(R(`WebGLShadowMap: PCFSoftShadowMap has been removed. Using PCFShadowMap instead.`),this.type=1);let u=e.getRenderTarget(),d=e.getActiveCubeFace(),p=e.getActiveMipmapLevel(),m=e.state;m.setBlending(0),m.buffers.depth.getReversed()===!0?m.buffers.color.setClear(0,0,0,0):m.buffers.color.setClear(1,1,1,1),m.buffers.depth.setTest(!0),m.setScissorTest(!1);let v=S!==this.type;v&&n.traverse(function(e){e.material&&(Array.isArray(e.material)?e.material.forEach(e=>e.needsUpdate=!0):e.material.needsUpdate=!0)});for(let u=0,d=t.length;uf||a.y>f)&&(a.x>f&&(o.x=Math.floor(f/y.x),a.x=o.x*y.x,p.mapSize.x=o.x),a.y>f&&(o.y=Math.floor(f/y.y),a.y=o.y*y.y,p.mapSize.y=o.y));let b=e.state.buffers.depth.getReversed();if(p.camera._reversedDepth=b,p.map===null||v===!0){if(p.map!==null&&(p.map.depthTexture!==null&&(p.map.depthTexture.dispose(),p.map.depthTexture=null),p.map.dispose()),this.type===3){if(d.isPointLight){R(`WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.`);continue}p.map=new W(a.x,a.y,{format:k,type:_,minFilter:s,magFilter:s,generateMipmaps:!1}),p.map.texture.name=d.name+`.shadowMap`,p.map.depthTexture=new mi(a.x,a.y,g),p.map.depthTexture.name=d.name+`.shadowMapDepth`,p.map.depthTexture.format=E,p.map.depthTexture.compareFunction=null,p.map.depthTexture.minFilter=i,p.map.depthTexture.magFilter=i}else d.isPointLight?(p.map=new Co(a.x),p.map.depthTexture=new hi(a.x,h)):(p.map=new W(a.x,a.y),p.map.depthTexture=new mi(a.x,a.y,h)),p.map.depthTexture.name=d.name+`.shadowMap`,p.map.depthTexture.format=E,this.type===1?(p.map.depthTexture.compareFunction=b?518:515,p.map.depthTexture.minFilter=s,p.map.depthTexture.magFilter=s):(p.map.depthTexture.compareFunction=null,p.map.depthTexture.minFilter=i,p.map.depthTexture.magFilter=i);p.camera.updateProjectionMatrix()}p.map.isWebGLCubeRenderTarget!==!0&&(p.map.width!==a.x||p.map.height!==a.y)&&p.map.setSize(a.x,a.y);let x=p.map.isWebGLCubeRenderTarget?6:p.getViewportCount();d.isPointLight!==!0&&p.updateMatrices(d,l);for(let t=0;t0||n.map&&n.alphaTest>0||n.alphaToCoverage===!0){let e=a.uuid,t=n.uuid,r=d[e];r===void 0&&(r={},d[e]=r);let i=r[t];i===void 0&&(i=a.clone(),r[t]=i,n.addEventListener(`dispose`,D)),a=i}if(a.visible=n.visible,a.wireframe=n.wireframe,i===3?a.side=n.shadowSide===null?n.side:n.shadowSide:a.side=n.shadowSide===null?p[n.side]:n.shadowSide,a.alphaMap=n.alphaMap,a.alphaTest=n.alphaToCoverage===!0?.5:n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,r.isPointLight===!0&&a.isMeshDistanceMaterial===!0){let t=e.properties.get(a);t.light=r}return a}function T(n,i,a,o,s){if(n.visible===!1)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&s===3)&&(!n.frustumCulled||n.intersectsFrustum(r))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);let r=t.update(n),c=n.material;if(Array.isArray(c)){let t=r.groups;for(let l=0,u=t.length;l=2):(j=parseFloat(/^WebGL (\d)/.exec(re)[1]),ne=j>=1);let M=null,ie={},ae=e.getParameter(e.SCISSOR_BOX),oe=e.getParameter(e.VIEWPORT),se=new Mt().fromArray(ae),ce=new Mt().fromArray(oe);function le(t,n,r,i){let a=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let o=0;o`u`?!1:/OculusBrowser/g.test(navigator.userAgent),v=new V,y=new WeakMap,b=new Set,x,S=new WeakMap,C=!1;try{C=typeof OffscreenCanvas<`u`&&new OffscreenCanvas(1,1).getContext(`2d`)!==null}catch{}function w(e,t){return C?new OffscreenCanvas(e,t):Ze(`canvas`)}function T(e,t,n){let r=1,i=Ie(e);if((i.width>n||i.height>n)&&(r=n/Math.max(i.width,i.height)),r<1){if(typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap||typeof VideoFrame<`u`&&e instanceof VideoFrame){let n=Math.floor(r*i.width),a=Math.floor(r*i.height);x===void 0&&(x=w(n,a));let o=t?w(n,a):x;return o.width=n,o.height=a,o.getContext(`2d`).drawImage(e,0,0,n,a),R(`WebGLRenderer: Texture has been resized from (`+i.width+`x`+i.height+`) to (`+n+`x`+a+`).`),o}return`data`in e&&R(`WebGLRenderer: Image in DataTexture is too big (`+i.width+`x`+i.height+`).`),e}return e}function E(e){return e.generateMipmaps}function O(t){e.generateMipmap(t)}function ee(t){return t.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:t.isWebGL3DRenderTarget?e.TEXTURE_3D:t.isWebGLArrayRenderTarget||t.isCompressedArrayTexture?e.TEXTURE_2D_ARRAY:e.TEXTURE_2D}function k(t,n,r,i,a,o=!1){if(t!==null){if(e[t]!==void 0)return e[t];R(`WebGLRenderer: Attempt to use non-existing WebGL internal format '`+t+`'`)}let s;i&&(s=u.get(`EXT_texture_norm16`),s||R(`WebGLRenderer: Unable to use normalized textures without EXT_texture_norm16 extension`));let c=n;if(n===e.RED&&(r===e.FLOAT&&(c=e.R32F),r===e.HALF_FLOAT&&(c=e.R16F),r===e.UNSIGNED_BYTE&&(c=e.R8),r===e.UNSIGNED_SHORT&&s&&(c=s.R16_EXT),r===e.SHORT&&s&&(c=s.R16_SNORM_EXT)),n===e.RED_INTEGER&&(r===e.UNSIGNED_BYTE&&(c=e.R8UI),r===e.UNSIGNED_SHORT&&(c=e.R16UI),r===e.UNSIGNED_INT&&(c=e.R32UI),r===e.BYTE&&(c=e.R8I),r===e.SHORT&&(c=e.R16I),r===e.INT&&(c=e.R32I)),n===e.RG&&(r===e.FLOAT&&(c=e.RG32F),r===e.HALF_FLOAT&&(c=e.RG16F),r===e.UNSIGNED_BYTE&&(c=e.RG8),r===e.UNSIGNED_SHORT&&s&&(c=s.RG16_EXT),r===e.SHORT&&s&&(c=s.RG16_SNORM_EXT)),n===e.RG_INTEGER&&(r===e.UNSIGNED_BYTE&&(c=e.RG8UI),r===e.UNSIGNED_SHORT&&(c=e.RG16UI),r===e.UNSIGNED_INT&&(c=e.RG32UI),r===e.BYTE&&(c=e.RG8I),r===e.SHORT&&(c=e.RG16I),r===e.INT&&(c=e.RG32I)),n===e.RGB_INTEGER&&(r===e.UNSIGNED_BYTE&&(c=e.RGB8UI),r===e.UNSIGNED_SHORT&&(c=e.RGB16UI),r===e.UNSIGNED_INT&&(c=e.RGB32UI),r===e.BYTE&&(c=e.RGB8I),r===e.SHORT&&(c=e.RGB16I),r===e.INT&&(c=e.RGB32I)),n===e.RGBA_INTEGER&&(r===e.UNSIGNED_BYTE&&(c=e.RGBA8UI),r===e.UNSIGNED_SHORT&&(c=e.RGBA16UI),r===e.UNSIGNED_INT&&(c=e.RGBA32UI),r===e.BYTE&&(c=e.RGBA8I),r===e.SHORT&&(c=e.RGBA16I),r===e.INT&&(c=e.RGBA32I)),n===e.RGB&&(r===e.UNSIGNED_SHORT&&s&&(c=s.RGB16_EXT),r===e.SHORT&&s&&(c=s.RGB16_SNORM_EXT),r===e.UNSIGNED_INT_5_9_9_9_REV&&(c=e.RGB9_E5),r===e.UNSIGNED_INT_10F_11F_11F_REV&&(c=e.R11F_G11F_B10F)),n===e.RGBA){let t=o?He:xt.getTransfer(a);r===e.FLOAT&&(c=e.RGBA32F),r===e.HALF_FLOAT&&(c=e.RGBA16F),r===e.UNSIGNED_BYTE&&(c=t===`srgb`?e.SRGB8_ALPHA8:e.RGBA8),r===e.UNSIGNED_SHORT&&s&&(c=s.RGBA16_EXT),r===e.SHORT&&s&&(c=s.RGBA16_SNORM_EXT),r===e.UNSIGNED_SHORT_4_4_4_4&&(c=e.RGBA4),r===e.UNSIGNED_SHORT_5_5_5_1&&(c=e.RGB5_A1)}return(c===e.R16F||c===e.R32F||c===e.RG16F||c===e.RG32F||c===e.RGBA16F||c===e.RGBA32F)&&u.get(`EXT_color_buffer_float`),c}function A(t,n){let r;return t?n===null||n===1014||n===1020?r=e.DEPTH24_STENCIL8:n===1015?r=e.DEPTH32F_STENCIL8:n===1012&&(r=e.DEPTH24_STENCIL8,R(`DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.`)):n===null||n===1014||n===1020?r=e.DEPTH_COMPONENT24:n===1015?r=e.DEPTH_COMPONENT32F:n===1012&&(r=e.DEPTH_COMPONENT16),r}function te(e,t){return E(e)===!0||e.isFramebufferTexture&&e.minFilter!==1003&&e.minFilter!==1006?Math.log2(Math.max(t.width,t.height))+1:e.mipmaps!==void 0&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function ne(e){let t=e.target;t.removeEventListener(`dispose`,ne),re(t),t.isVideoTexture&&y.delete(t),t.isHTMLTexture&&b.delete(t)}function j(e){let t=e.target;t.removeEventListener(`dispose`,j),ie(t)}function re(e){let t=f.get(e);if(t.__webglInit===void 0)return;let n=e.source,r=S.get(n);if(r){let i=r[t.__cacheKey];i.usedTimes--,i.usedTimes===0&&M(e),Object.keys(r).length===0&&S.delete(n)}f.remove(e)}function M(t){let n=f.get(t);e.deleteTexture(n.__webglTexture);let r=t.source,i=S.get(r);delete i[n.__cacheKey],h.memory.textures--}function ie(t){let n=f.get(t);if(t.depthTexture&&(t.depthTexture.dispose(),f.remove(t.depthTexture)),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(n.__webglFramebuffer[t]))for(let r=0;r=p.maxTextures&&R(`WebGLTextures: Trying to use `+(e+1)+` texture units while this GPU supports only `+p.maxTextures),ae+=1,e}function ue(e){let t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}function N(t,n){let r=f.get(t);if(t.isVideoTexture&&P(t),t.isRenderTargetTexture===!1&&t.isExternalTexture!==!0&&t.version>0&&r.__version!==t.version){let e=t.image;if(e===null)R(`WebGLRenderer: Texture marked for update but no image data found.`);else if(e.complete===!1)R(`WebGLRenderer: Texture marked for update but image is incomplete`);else{xe(r,t,n);return}}else t.isExternalTexture&&(r.__webglTexture=t.sourceTexture?t.sourceTexture:null);d.bindTexture(e.TEXTURE_2D,r.__webglTexture,e.TEXTURE0+n)}function de(t,n){let r=f.get(t);if(t.isRenderTargetTexture===!1&&t.version>0&&r.__version!==t.version){xe(r,t,n);return}t.isExternalTexture&&(r.__webglTexture=t.sourceTexture?t.sourceTexture:null),d.bindTexture(e.TEXTURE_2D_ARRAY,r.__webglTexture,e.TEXTURE0+n)}function fe(t,n){let r=f.get(t);if(t.isRenderTargetTexture===!1&&t.version>0&&r.__version!==t.version){xe(r,t,n);return}d.bindTexture(e.TEXTURE_3D,r.__webglTexture,e.TEXTURE0+n)}function pe(t,n){let r=f.get(t);if(t.isCubeDepthTexture!==!0&&t.version>0&&r.__version!==t.version){Se(r,t,n);return}d.bindTexture(e.TEXTURE_CUBE_MAP,r.__webglTexture,e.TEXTURE0+n)}let me={[t]:e.REPEAT,[n]:e.CLAMP_TO_EDGE,[r]:e.MIRRORED_REPEAT},he={[i]:e.NEAREST,[a]:e.NEAREST_MIPMAP_NEAREST,[o]:e.NEAREST_MIPMAP_LINEAR,[s]:e.LINEAR,[c]:e.LINEAR_MIPMAP_NEAREST,[l]:e.LINEAR_MIPMAP_LINEAR},ge={512:e.NEVER,519:e.ALWAYS,513:e.LESS,515:e.LEQUAL,514:e.EQUAL,518:e.GEQUAL,516:e.GREATER,517:e.NOTEQUAL};function _e(t,n){if(n.type===1015&&u.has(`OES_texture_float_linear`)===!1&&(n.magFilter===1006||n.magFilter===1007||n.magFilter===1005||n.magFilter===1008||n.minFilter===1006||n.minFilter===1007||n.minFilter===1005||n.minFilter===1008)&&R(`WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device.`),e.texParameteri(t,e.TEXTURE_WRAP_S,me[n.wrapS]),e.texParameteri(t,e.TEXTURE_WRAP_T,me[n.wrapT]),(t===e.TEXTURE_3D||t===e.TEXTURE_2D_ARRAY)&&e.texParameteri(t,e.TEXTURE_WRAP_R,me[n.wrapR]),e.texParameteri(t,e.TEXTURE_MAG_FILTER,he[n.magFilter]),e.texParameteri(t,e.TEXTURE_MIN_FILTER,he[n.minFilter]),n.compareFunction&&(e.texParameteri(t,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(t,e.TEXTURE_COMPARE_FUNC,ge[n.compareFunction])),u.has(`EXT_texture_filter_anisotropic`)===!0){if(n.magFilter===1003||n.minFilter!==1005&&n.minFilter!==1008||n.type===1015&&u.has(`OES_texture_float_linear`)===!1)return;if(n.anisotropy>1||f.get(n).__currentAnisotropy){let r=u.get(`EXT_texture_filter_anisotropic`);e.texParameterf(t,r.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(n.anisotropy,p.getMaxAnisotropy())),f.get(n).__currentAnisotropy=n.anisotropy}}}function ve(t,n){let r=!1;t.__webglInit===void 0&&(t.__webglInit=!0,n.addEventListener(`dispose`,ne));let i=n.source,a=S.get(i);a===void 0&&(a={},S.set(i,a));let o=ue(n);if(o!==t.__cacheKey){a[o]===void 0&&(a[o]={texture:e.createTexture(),usedTimes:0},h.memory.textures++,r=!0),a[o].usedTimes++;let i=a[t.__cacheKey];i!==void 0&&(a[t.__cacheKey].usedTimes--,i.usedTimes===0&&M(n)),t.__cacheKey=o,t.__webglTexture=a[o].texture}return r}function ye(e,t,n){return Math.floor(Math.floor(e/n)/t)}function be(t,n,r,i){let a=t.updateRanges;if(a.length===0)d.texSubImage2D(e.TEXTURE_2D,0,0,0,n.width,n.height,r,i,n.data);else{a.sort((e,t)=>e.start-t.start);let o=0;for(let e=1;e0){g&&_&&d.texStorage2D(e.TEXTURE_2D,y,u,h[0].width,h[0].height);for(let t=0,n=h.length;t0){let t=Ha(f.width,f.height,n.format,n.type);for(let i of n.layerUpdates){let n=f.data.subarray(i*t/f.data.BYTES_PER_ELEMENT,(i+1)*t/f.data.BYTES_PER_ELEMENT);d.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,r,0,0,i,f.width,f.height,1,c,n)}}else d.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,r,0,0,0,f.width,f.height,t.depth,c,f.data)}}else d.compressedTexImage3D(e.TEXTURE_2D_ARRAY,r,u,f.width,f.height,t.depth,0,f.data,0,0)}else R(`WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()`)}else g?v&&d.texSubImage3D(e.TEXTURE_2D_ARRAY,r,0,0,0,f.width,f.height,t.depth,c,l,f.data):d.texImage3D(e.TEXTURE_2D_ARRAY,r,u,f.width,f.height,t.depth,0,c,l,f.data);n.layerUpdates.size>0&&n.clearLayerUpdates()}else{g&&_&&d.texStorage2D(e.TEXTURE_2D,y,u,h[0].width,h[0].height);for(let t=0,r=h.length;t0){let r=Ha(t.width,t.height,n.format,n.type);for(let i of n.layerUpdates){let n=t.data.subarray(i*r/t.data.BYTES_PER_ELEMENT,(i+1)*r/t.data.BYTES_PER_ELEMENT);d.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,i,t.width,t.height,1,c,l,n)}n.clearLayerUpdates()}else d.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,t.width,t.height,t.depth,c,l,t.data)}}else d.texImage3D(e.TEXTURE_2D_ARRAY,0,u,t.width,t.height,t.depth,0,c,l,t.data)}else if(n.isData3DTexture)g?(_&&d.texStorage3D(e.TEXTURE_3D,y,u,t.width,t.height,t.depth),v&&d.texSubImage3D(e.TEXTURE_3D,0,0,0,0,t.width,t.height,t.depth,c,l,t.data)):d.texImage3D(e.TEXTURE_3D,0,u,t.width,t.height,t.depth,0,c,l,t.data);else if(n.isFramebufferTexture){if(_){if(g)d.texStorage2D(e.TEXTURE_2D,y,u,t.width,t.height);else{let n=t.width,r=t.height;for(let t=0;t>=1,r>>=1}}}else if(n.isHTMLTexture){if(`texElementImage2D`in e){let r=e.canvas;if(r.hasAttribute(`layoutsubtree`)||r.setAttribute(`layoutsubtree`,`true`),t.parentNode!==r){r.appendChild(t),b.add(n),r.onpaint=e=>{let t=e.changedElements;for(let e of b)t.includes(e.image)&&(e.needsUpdate=!0)},r.requestPaint();return}if(e.texElementImage2D.length===3)e.texElementImage2D(e.TEXTURE_2D,e.RGBA8,t);else{let n=e.RGBA,r=e.RGBA,i=e.UNSIGNED_BYTE;e.texElementImage2D(e.TEXTURE_2D,0,n,r,i,t)}e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}}else if(h.length>0){if(g&&_){let t=Ie(h[0]);d.texStorage2D(e.TEXTURE_2D,y,u,t.width,t.height)}for(let t=0,n=h.length;t0&&S++;let t=Ie(f[0]);d.texStorage2D(e.TEXTURE_CUBE_MAP,S,v,t.width,t.height)}for(let t=0;t<6;t++)if(u){y?x&&d.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,f[t].width,f[t].height,g,_,f[t].data):d.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,v,f[t].width,f[t].height,0,g,_,f[t].data);for(let n=0;n>o),r=Math.max(1,n.height>>o);a===e.TEXTURE_3D||a===e.TEXTURE_2D_ARRAY?d.texImage3D(a,o,l,t,r,n.depth,0,s,c,null):d.texImage2D(a,o,l,t,r,0,s,c,null)}d.bindFramebuffer(e.FRAMEBUFFER,t),Pe(n)?g.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,i,a,p.__webglTexture,0,Ne(n)):(a===e.TEXTURE_2D||a>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&a<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,i,a,p.__webglTexture,o),d.bindFramebuffer(e.FRAMEBUFFER,null)}function we(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer){let i=n.depthTexture,a=i&&i.isDepthTexture?i.type:null,o=A(n.stencilBuffer,a),s=n.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;Pe(n)?g.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,Ne(n),o,n.width,n.height):r?e.renderbufferStorageMultisample(e.RENDERBUFFER,Ne(n),o,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,o,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,s,e.RENDERBUFFER,t)}else{let t=n.textures;for(let i=0;i{delete n.__boundDepthTexture,delete n.__depthDisposeCallback,e.removeEventListener(`dispose`,t)};e.addEventListener(`dispose`,t),n.__depthDisposeCallback=t}n.__boundDepthTexture=e}if(t.depthTexture&&!n.__autoAllocateDepthBuffer){if(r)for(let e=0;e<6;e++)Te(n.__webglFramebuffer[e],t,e);else{let e=t.texture.mipmaps;e&&e.length>0?Te(n.__webglFramebuffer[0],t,0):Te(n.__webglFramebuffer,t,0)}}else if(r){n.__webglDepthbuffer=[];for(let r=0;r<6;r++)if(d.bindFramebuffer(e.FRAMEBUFFER,n.__webglFramebuffer[r]),n.__webglDepthbuffer[r]===void 0)n.__webglDepthbuffer[r]=e.createRenderbuffer(),we(n.__webglDepthbuffer[r],t,!1);else{let i=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,a=n.__webglDepthbuffer[r];e.bindRenderbuffer(e.RENDERBUFFER,a),e.framebufferRenderbuffer(e.FRAMEBUFFER,i,e.RENDERBUFFER,a)}}else{let r=t.texture.mipmaps;if(r&&r.length>0?d.bindFramebuffer(e.FRAMEBUFFER,n.__webglFramebuffer[0]):d.bindFramebuffer(e.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer===void 0)n.__webglDepthbuffer=e.createRenderbuffer(),we(n.__webglDepthbuffer,t,!1);else{let r=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,i=n.__webglDepthbuffer;e.bindRenderbuffer(e.RENDERBUFFER,i),e.framebufferRenderbuffer(e.FRAMEBUFFER,r,e.RENDERBUFFER,i)}}d.bindFramebuffer(e.FRAMEBUFFER,null)}function De(t,n,r){let i=f.get(t);n!==void 0&&Ce(i.__webglFramebuffer,t,t.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,0),r!==void 0&&Ee(t)}function Oe(t){let n=t.texture,r=f.get(t),i=f.get(n);t.addEventListener(`dispose`,j);let a=t.textures,o=t.isWebGLCubeRenderTarget===!0,s=a.length>1;if(s||(i.__webglTexture===void 0&&(i.__webglTexture=e.createTexture()),i.__version=n.version,h.memory.textures++),o){r.__webglFramebuffer=[];for(let t=0;t<6;t++)if(n.mipmaps&&n.mipmaps.length>0){r.__webglFramebuffer[t]=[];for(let i=0;i0){r.__webglFramebuffer=[];for(let t=0;t0&&Pe(t)===!1){r.__webglMultisampledFramebuffer=e.createFramebuffer(),r.__webglColorRenderbuffer=[],d.bindFramebuffer(e.FRAMEBUFFER,r.__webglMultisampledFramebuffer);for(let n=0;n0)for(let a=0;a0)for(let i=0;i0){if(Pe(t)===!1){let n=t.textures,r=t.width,i=t.height,a=e.COLOR_BUFFER_BIT,o=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,s=f.get(t),c=n.length>1;if(c)for(let t=0;t0?d.bindFramebuffer(e.DRAW_FRAMEBUFFER,s.__webglFramebuffer[0]):d.bindFramebuffer(e.DRAW_FRAMEBUFFER,s.__webglFramebuffer);for(let l=0;l0&&u.has(`WEBGL_multisampled_render_to_texture`)===!0&&t.__useRenderToTexture!==!1}function P(e){let t=h.render.frame;y.get(e)!==t&&(y.set(e,t),e.update())}function Fe(e,t){let n=e.colorSpace,r=e.format,i=e.type;return e.isCompressedTexture===!0||e.isVideoTexture===!0||n!==`srgb-linear`&&n!==``&&(xt.getTransfer(n)===`srgb`?(r!==1023||i!==1009)&&R(`WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.`):z(`WebGLTextures: Unsupported texture color space:`,n)),t}function Ie(e){return typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement?(v.width=e.naturalWidth||e.width,v.height=e.naturalHeight||e.height):typeof VideoFrame<`u`&&e instanceof VideoFrame?(v.width=e.displayWidth,v.height=e.displayHeight):(v.width=e.width,v.height=e.height),v}this.allocateTextureUnit=le,this.resetTextureUnits=oe,this.getTextureUnits=se,this.setTextureUnits=ce,this.setTexture2D=N,this.setTexture2DArray=de,this.setTexture3D=fe,this.setTextureCube=pe,this.rebindTextures=De,this.setupRenderTarget=Oe,this.updateRenderTargetMipmap=ke,this.updateMultisampleRenderTarget=Me,this.setupDepthRenderbuffer=Ee,this.setupFrameBufferTexture=Ce,this.useMultisampledRTT=Pe,this.isReversedDepthBuffer=function(){return d.buffers.depth.getReversed()}}function Yc(e,t){function n(n,r=``){let i,a=xt.getTransfer(r);if(n===1009)return e.UNSIGNED_BYTE;if(n===1017)return e.UNSIGNED_SHORT_4_4_4_4;if(n===1018)return e.UNSIGNED_SHORT_5_5_5_1;if(n===35902)return e.UNSIGNED_INT_5_9_9_9_REV;if(n===35899)return e.UNSIGNED_INT_10F_11F_11F_REV;if(n===1010)return e.BYTE;if(n===1011)return e.SHORT;if(n===1012)return e.UNSIGNED_SHORT;if(n===1013)return e.INT;if(n===1014)return e.UNSIGNED_INT;if(n===1015)return e.FLOAT;if(n===1016)return e.HALF_FLOAT;if(n===1021)return e.ALPHA;if(n===1022)return e.RGB;if(n===1023)return e.RGBA;if(n===1026)return e.DEPTH_COMPONENT;if(n===1027)return e.DEPTH_STENCIL;if(n===1028)return e.RED;if(n===1029)return e.RED_INTEGER;if(n===1030)return e.RG;if(n===1031)return e.RG_INTEGER;if(n===1033)return e.RGBA_INTEGER;if(n===33776||n===33777||n===33778||n===33779){if(a===`srgb`){if(i=t.get(`WEBGL_compressed_texture_s3tc_srgb`),i!==null){if(n===33776)return i.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===33777)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===33778)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===33779)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null}else if(i=t.get(`WEBGL_compressed_texture_s3tc`),i!==null){if(n===33776)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===33777)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===33778)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===33779)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null}if(n===35840||n===35841||n===35842||n===35843){if(i=t.get(`WEBGL_compressed_texture_pvrtc`),i!==null){if(n===35840)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===35841)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===35842)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===35843)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null}if(n===36196||n===37492||n===37496||n===37488||n===37489||n===37490||n===37491){if(i=t.get(`WEBGL_compressed_texture_etc`),i!==null){if(n===36196||n===37492)return a===`srgb`?i.COMPRESSED_SRGB8_ETC2:i.COMPRESSED_RGB8_ETC2;if(n===37496)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:i.COMPRESSED_RGBA8_ETC2_EAC;if(n===37488)return i.COMPRESSED_R11_EAC;if(n===37489)return i.COMPRESSED_SIGNED_R11_EAC;if(n===37490)return i.COMPRESSED_RG11_EAC;if(n===37491)return i.COMPRESSED_SIGNED_RG11_EAC}else return null}if(n===37808||n===37809||n===37810||n===37811||n===37812||n===37813||n===37814||n===37815||n===37816||n===37817||n===37818||n===37819||n===37820||n===37821){if(i=t.get(`WEBGL_compressed_texture_astc`),i!==null){if(n===37808)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:i.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===37809)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:i.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===37810)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:i.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===37811)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:i.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===37812)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:i.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===37813)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:i.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===37814)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:i.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===37815)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:i.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===37816)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:i.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===37817)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:i.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===37818)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:i.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===37819)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:i.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===37820)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:i.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===37821)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:i.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null}if(n===36492||n===36494||n===36495){if(i=t.get(`EXT_texture_compression_bptc`),i!==null){if(n===36492)return a===`srgb`?i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:i.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===36494)return i.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===36495)return i.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null}if(n===36283||n===36284||n===36285||n===36286){if(i=t.get(`EXT_texture_compression_rgtc`),i!==null){if(n===36283)return i.COMPRESSED_RED_RGTC1_EXT;if(n===36284)return i.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===36285)return i.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===36286)return i.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null}return n===1020?e.UNSIGNED_INT_24_8:e[n]===void 0?null:e[n]}return{convert:n}}var Xc=` +void main() { + + gl_Position = vec4( position, 1.0 ); + +}`,Zc=` +uniform sampler2DArray depthColor; +uniform float depthWidth; +uniform float depthHeight; + +void main() { + + vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); + + if ( coord.x >= 1.0 ) { + + gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; + + } else { + + gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; + + } + +}`,Qc=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){let n=new gi(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(this.texture!==null&&this.mesh===null){let t=e.cameras[0].viewport,n=new Ni({vertexShader:Xc,fragmentShader:Zc,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Lr(new xi(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}},$c=class extends at{constructor(e,t){super();let n=this,r=null,i=1,a=null,o=`local-floor`,s=1,c=null,l=null,d=null,f=null,p=null,m=null,g=typeof XRWebGLBinding<`u`,_=new Qc,v={},y=t.getContextAttributes(),x=null,S=null,C=[],w=[],O=new V,ee=null,k=null,A=new va;A.viewport=new Mt;let te=new va;te.viewport=new Mt;let ne=[A,te],j=new wa,re=null,M=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=C[e];return t===void 0&&(t=new pn,C[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=C[e];return t===void 0&&(t=new pn,C[e]=t),t.getGripSpace()},this.getHand=function(e){let t=C[e];return t===void 0&&(t=new pn,C[e]=t),t.getHandSpace()};function ie(e){let t=w.indexOf(e.inputSource);if(t===-1)return;let n=C[t];n!==void 0&&(n.update(e.inputSource,e.frame,c||a),n.dispatchEvent({type:e.type,data:e.inputSource}))}function ae(){r.removeEventListener(`select`,ie),r.removeEventListener(`selectstart`,ie),r.removeEventListener(`selectend`,ie),r.removeEventListener(`squeeze`,ie),r.removeEventListener(`squeezestart`,ie),r.removeEventListener(`squeezeend`,ie),r.removeEventListener(`end`,ae),r.removeEventListener(`inputsourceschange`,oe);for(let e=0;e=0&&(w[r]=null,C[r].disconnect(n))}for(let t=0;t=w.length){w.push(n),r=e;break}else if(w[e]===null){w[e]=n,r=e;break}if(r===-1)break}let i=C[r];i&&i.connect(n)}}let se=new H,ce=new H;function le(e,t,n){se.setFromMatrixPosition(t.matrixWorld),ce.setFromMatrixPosition(n.matrixWorld);let r=se.distanceTo(ce),i=t.projectionMatrix.elements,a=n.projectionMatrix.elements,o=i[14]/(i[10]-1),s=i[14]/(i[10]+1),c=(i[9]+1)/i[5],l=(i[9]-1)/i[5],u=(i[8]-1)/i[0],d=(a[8]+1)/a[0],f=o*u,p=o*d,m=r/(-u+d),h=m*-u;if(t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(h),e.translateZ(m),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert(),i[10]===-1)e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse);else{let t=o+m,n=s+m,i=f-h,a=p+(r-h),u=c*s/n*t,d=l*s/n*t;e.projectionMatrix.makePerspective(i,a,u,d,t,n),e.projectionMatrixInverse.copy(e.projectionMatrix).invert()}}function ue(e,t){t===null?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(r===null)return;let t=e.near,n=e.far;_.texture!==null&&(_.depthNear>0&&(t=_.depthNear),_.depthFar>0&&(n=_.depthFar)),j.near=te.near=A.near=t,j.far=te.far=A.far=n,(re!==j.near||M!==j.far)&&(r.updateRenderState({depthNear:j.near,depthFar:j.far}),re=j.near,M=j.far),j.layers.mask=e.layers.mask|6,A.layers.mask=j.layers.mask&-5,te.layers.mask=j.layers.mask&-3;let i=e.parent,a=j.cameras;ue(j,i);for(let e=0;e0&&(e.alphaTest.value=r.alphaTest);let i=t.get(r),a=i.envMap,o=i.envMapRotation;a&&(e.envMap.value=a,e.envMapRotation.value.setFromMatrix4(el.makeRotationFromEuler(o)).transpose(),a.isCubeTexture&&a.isRenderTargetTexture===!1&&e.envMapRotation.value.premultiply(tl),e.reflectivity.value=r.reflectivity,e.ior.value=r.ior,e.refractionRatio.value=r.refractionRatio),r.lightMap&&(e.lightMap.value=r.lightMap,e.lightMapIntensity.value=r.lightMapIntensity,n(r.lightMap,e.lightMapTransform)),r.aoMap&&(e.aoMap.value=r.aoMap,e.aoMapIntensity.value=r.aoMapIntensity,n(r.aoMap,e.aoMapTransform))}function o(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform))}function s(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}function c(e,t,r,i){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*r,e.scale.value=i*.5,t.map&&(e.map.value=t.map,n(t.map,e.uvTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}function l(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}function u(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}function d(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}function f(e,t){e.metalness.value=t.metalness,t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap,n(t.metalnessMap,e.metalnessMapTransform)),e.roughness.value=t.roughness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap,n(t.roughnessMap,e.roughnessMapTransform)),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}function p(e,t,r){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,n(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,n(t.sheenRoughnessMap,e.sheenRoughnessMapTransform))),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,n(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,n(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,n(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),t.side===1&&e.clearcoatNormalScale.value.negate())),t.dispersion>0&&(e.dispersion.value=t.dispersion),t.retroreflectivity>0&&(e.retroreflectivity.value=t.retroreflectivity),t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,n(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,n(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform))),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,n(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,n(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,n(t.anisotropyMap,e.anisotropyMapTransform))),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,n(t.specularColorMap,e.specularColorMapTransform)),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,n(t.specularIntensityMap,e.specularIntensityMapTransform))}function m(e,t){t.matcap&&(e.matcap.value=t.matcap)}function h(e,n){let r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function rl(e,t,n,r){let i={},a={},o=[],s=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function c(e,t){let n=t.program;r.uniformBlockBinding(e,n)}function l(e,n){let o=i[e.id];o===void 0&&(g(e),o=u(e),i[e.id]=o,e.addEventListener(`dispose`,v));let s=n.program;r.updateUBOMapping(e,s);let c=t.render.frame;a[e.id]!==c&&(f(e),a[e.id]=c)}function u(t){let n=d();t.__bindingPointIndex=n;let r=e.createBuffer(),i=t.__size,a=t.usage;return e.bindBuffer(e.UNIFORM_BUFFER,r),e.bufferData(e.UNIFORM_BUFFER,i,a),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,n,r),r}function d(){for(let e=0;e0&&(n+=16-r),e.__size=n,e.__cache={},this}function _(e){let t={boundary:0,storage:0};return typeof e==`number`||typeof e==`boolean`?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?R(`WebGLRenderer: Texture samplers can not be part of an uniforms group.`):ArrayBuffer.isView(e)?(t.boundary=16,t.storage=e.byteLength):R(`WebGLRenderer: Unsupported uniform value type.`,e),t}function v(t){let n=t.target;n.removeEventListener(`dispose`,v);let r=o.indexOf(n.__bindingPointIndex);o.splice(r,1),e.deleteBuffer(i[n.id]),delete i[n.id],delete a[n.id]}function y(){for(let t in i)e.deleteBuffer(i[t]);o=[],i={},a={}}return{bind:c,update:l,dispose:y}}var il=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,14942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]),al=null;function ol(){return al===null&&(al=new Br(il,16,16,k,_),al.name=`DFG_LUT`,al.minFilter=s,al.magFilter=s,al.wrapS=n,al.wrapT=n,al.generateMipmaps=!1,al.needsUpdate=!0),al}var sl=class{constructor(e={}){let{canvas:t=Qe(),context:n=null,depth:r=!0,stencil:i=!1,alpha:a=!1,antialias:o=!1,premultipliedAlpha:s=!0,preserveDrawingBuffer:c=!1,powerPreference:d=`default`,failIfMajorPerformanceCaveat:f=!1,reversedDepthBuffer:m=!1,outputBufferType:g=u}=e;this.isWebGLRenderer=!0;let x;if(n!==null){if(typeof WebGLRenderingContext<`u`&&n instanceof WebGLRenderingContext)throw Error(`THREE.WebGLRenderer: WebGL 1 is not supported since r163.`);x=n.getContextAttributes().alpha}else x=a;let S=g,C=new Set([te,A,ee]),w=new Set([u,h,p,b,v,y]),T=new Uint32Array(4),E=new Int32Array(4),D=new H,O=null,k=null,ne=[],j=[],re=null;this.domElement=t,this.debug={checkShaderErrors:!0,diagnostics:{keywords:!1},onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=0,this.toneMappingExposure=1,this.transmissionResolutionScale=1;let M=this,ie=!1,ae=null,oe=null,se=null,ce=null;this._outputColorSpace=Be;let le=0,ue=0,N=null,de=-1,fe=null,pe=new Mt,me=new Mt,he=null,ge=new G(0),_e=0,ve=t.width,ye=t.height,be=1,xe=null,Se=null,Ce=new Mt(0,0,ve,ye),we=new Mt(0,0,ve,ye),Te=!1,Ee=new Gr,De=!1,Oe=!1,ke=new It,Ae=new H,je=new Mt,Me={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},Ne=!1;function Pe(){return N===null?be:1}let P=n;function Fe(e,n){return t.getContext(e,n)}let Ie,Le,F,Re,I,L,ze,Ve,He,Ue,We,Ge,Ke,qe,Ye,Xe,Ze,$e,tt,nt,it,at,ot;try{let e={alpha:!0,depth:r,stencil:i,antialias:o,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:d,failIfMajorPerformanceCaveat:f};if(`setAttribute`in t&&t.setAttribute(`data-engine`,`three.js r186`),t.addEventListener(`webglcontextlost`,lt,!1),t.addEventListener(`webglcontextrestored`,B,!1),t.addEventListener(`webglcontextcreationerror`,ut,!1),P===null){let t=`webgl2`;if(P=Fe(t,e),P===null)throw Fe(t)?Error(`THREE.WebGLRenderer: Error creating WebGL context with your selected attributes.`):Error(`THREE.WebGLRenderer: Error creating WebGL context.`)}st()}catch(e){throw t.removeEventListener(`webglcontextlost`,lt,!1),t.removeEventListener(`webglcontextrestored`,B,!1),t.removeEventListener(`webglcontextcreationerror`,ut,!1),z(`WebGLRenderer: `+e.message),e}function st(){Ie=new To(P),Ie.init(),it=new Yc(P,Ie),Le=new $a(P,Ie,e,it),F=new qc(P,Ie),Le.reversedDepthBuffer&&m&&F.buffers.depth.setReversed(!0),oe=P.createFramebuffer(),se=P.createFramebuffer(),ce=P.createFramebuffer(),Re=new Oo(P),I=new Dc,L=new Jc(P,Ie,F,I,Le,it,Re),ze=new wo(M),Ve=new Ga(P),at=new Za(P,Ve),He=new Eo(P,Ve,Re,at),Ue=new Ao(P,He,Ve,at,Re),$e=new ko(P,Le,L),Ye=new eo(I),We=new Ec(M,ze,Ie,Le,at,Ye),Ge=new nl(M,I),Ke=new jc,qe=new Rc(Ie),Ze=new Xa(M,ze,F,Ue,x,s),Xe=new Kc(M,Ue,Le),ot=new rl(P,Re,Le,F),tt=new Qa(P,Ie,Re),nt=new Do(P,Ie,Re),Re.programs=We.programs,M.capabilities=Le,M.extensions=Ie,M.properties=I,M.renderLists=Ke,M.shadowMap=Xe,M.state=F,M.info=Re}S!==1009&&(re=new Mo(S,t.width,t.height,o,r,i));let ct=new $c(M,P);this.xr=ct,this.getContext=function(){return P},this.getContextAttributes=function(){return P.getContextAttributes()},this.forceContextLoss=function(){let e=Ie.get(`WEBGL_lose_context`);e&&e.loseContext()},this.forceContextRestore=function(){let e=Ie.get(`WEBGL_lose_context`);e&&e.restoreContext()},this.getPixelRatio=function(){return be},this.setPixelRatio=function(e){e!==void 0&&(be=e,this.setSize(ve,ye,!1))},this.getSize=function(e){return e.set(ve,ye)},this.setSize=function(e,n,r=!0){if(ct.isPresenting){R(`WebGLRenderer: Can't change size while VR device is presenting.`);return}ve=e,ye=n,t.width=Math.floor(e*be),t.height=Math.floor(n*be),r===!0&&(t.style.width=e+`px`,t.style.height=n+`px`),re!==null&&re.setSize(t.width,t.height),this.setViewport(0,0,e,n)},this.getDrawingBufferSize=function(e){return e.set(ve*be,ye*be).floor()},this.setDrawingBufferSize=function(e,n,r){ve=e,ye=n,be=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.setEffects=function(e){if(S===1009){z(`WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.`);return}if(e){for(let t=0;t{function n(){if(r.forEach(function(e){let t=I.get(e).currentProgram;(t===void 0||t.isReady())&&r.delete(e)}),r.size===0){t(e);return}setTimeout(n,10)}Ie.get(`KHR_parallel_shader_compile`)===null?setTimeout(n,10):n()})};let mt=null;function ht(e){mt&&mt(e)}function gt(){_t.stop()}function U(){_t.start()}let _t=new Wa;_t.setAnimationLoop(ht),typeof self<`u`&&_t.setContext(self),this.setAnimationLoop=function(e){mt=e,ct.setAnimationLoop(e),e===null?_t.stop():_t.start()},ct.addEventListener(`sessionstart`,gt),ct.addEventListener(`sessionend`,U),this.render=function(e,t){if(t!==void 0&&t.isCamera!==!0){z(`WebGLRenderer.render: camera is not an instance of THREE.Camera.`);return}if(ie===!0)return;ae!==null&&ae.renderStart(e,t);let n=ct.enabled===!0&&ct.isPresenting===!0,r=re!==null&&(N===null||n)&&re.begin(M,N);if(e.matrixWorldAutoUpdate===!0&&e.updateMatrixWorld(),t.parent===null&&t.matrixWorldAutoUpdate===!0&&t.updateMatrixWorld(),ct.enabled===!0&&ct.isPresenting===!0&&(re===null||re.isCompositing()===!1)&&(ct.cameraAutoUpdate===!0&&ct.updateCamera(t),t=ct.getCamera()),e.isScene===!0&&e.onBeforeRender(M,e,t,N),k=qe.get(e,j.length),k.init(t),k.state.textureUnits=L.getTextureUnits(),j.push(k),ke.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),Ee.setFromProjectionMatrix(ke,Je,t.reversedDepth),Oe=this.localClippingEnabled,De=Ye.init(this.clippingPlanes,Oe),O=Ke.get(e,ne.length),O.init(),ne.push(O),ct.enabled===!0&&ct.isPresenting===!0){let e=M.xr.getDepthSensingMesh();e!==null&&vt(e,t,-1/0,M.sortObjects)}vt(e,t,0,M.sortObjects),O.finish(),ae!==null&&ae.updateLights(k.state.lightsArray),M.sortObjects===!0&&O.sort(xe,Se),Ne=ct.enabled===!1||ct.isPresenting===!1||ct.hasDepthSensing()===!1,Ne&&Ze.addToRenderList(O,e),this.info.render.frame++,this.info.autoReset===!0&&this.info.reset(),De===!0&&Ye.beginShadows();let i=k.state.shadowsArray;if(Xe.render(i,e,t),De===!0&&Ye.endShadows(),(r&&re.hasRenderPass())===!1){let n=O.opaque,r=O.transmissive;if(k.setupLights(),t.isArrayCamera){let i=t.cameras;if(r.length>0)for(let t=0,a=i.length;t0&&bt(n,r,e,t),Ne&&Ze.render(e),yt(O,e,t)}N!==null&&ue===0&&(L.updateMultisampleRenderTarget(N),L.updateRenderTargetMipmap(N)),r&&re.end(M),e.isScene===!0&&e.onAfterRender(M,e,t),at.resetDefaultState(),de=-1,fe=null,j.pop(),j.length>0?(k=j[j.length-1],L.setTextureUnits(k.state.textureUnits),De===!0&&Ye.setGlobalState(M.clippingPlanes,k.state.camera)):k=null,ne.pop(),O=ne.length>0?ne[ne.length-1]:null,ae!==null&&ae.renderEnd()};function vt(e,t,n,r){if(e.visible===!1)return;if(e.layers.test(t.layers)){if(e.isGroup)n=e.renderOrder;else if(e.isLOD)e.autoUpdate===!0&&e.update(t);else if(e.isLightProbeGrid)k.pushLightProbeGrid(e);else if(e.isLight)k.pushLight(e),e.castShadow&&k.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||e.intersectsFrustum(Ee)){r&&je.setFromMatrixPosition(e.matrixWorld).applyMatrix4(ke);let i=Ue.update(e),a=e.material;a.visible&&O.push(e,i,a,n,je.z,null,t)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||e.intersectsFrustum(Ee))){let i=Ue.update(e),a=e.material;if(r&&(e.boundingSphere===void 0?(i.boundingSphere===null&&i.computeBoundingSphere(),je.copy(i.boundingSphere.center)):(e.boundingSphere===null&&e.computeBoundingSphere(),je.copy(e.boundingSphere.center)),je.applyMatrix4(e.matrixWorld).applyMatrix4(ke)),Array.isArray(a)){let r=i.groups;for(let o=0,s=r.length;o0&&St(i,t,n),a.length>0&&St(a,t,n),o.length>0&&St(o,t,n),F.buffers.depth.setTest(!0),F.buffers.depth.setMask(!0),F.buffers.color.setMask(!0),F.setPolygonOffset(!1)}function bt(e,t,n,r){if((n.isScene===!0?n.overrideMaterial:null)!==null)return;if(k.state.transmissionRenderTarget[r.id]===void 0){let e=Ie.has(`EXT_color_buffer_half_float`)||Ie.has(`EXT_color_buffer_float`);k.state.transmissionRenderTarget[r.id]=new W(1,1,{generateMipmaps:!0,type:e?_:u,minFilter:l,samples:Math.max(4,Le.samples),stencilBuffer:i,resolveDepthBuffer:!1,resolveStencilBuffer:!1,storeMultisampledDepthBuffer:!1,storeMultisampledStencilBuffer:!1,colorSpace:xt.workingColorSpace})}let a=k.state.transmissionRenderTarget[r.id],o=r.viewport||pe;a.setSize(o.z*M.transmissionResolutionScale,o.w*M.transmissionResolutionScale);let s=M.getRenderTarget(),c=M.getActiveCubeFace(),d=M.getActiveMipmapLevel();M.setRenderTarget(a),M.getClearColor(ge),_e=M.getClearAlpha(),_e<1&&M.setClearColor(16777215,.5),M.clear(),Ne&&Ze.render(n);let f=M.toneMapping;M.toneMapping=0;let p=r.viewport;if(r.viewport!==void 0&&(r.viewport=void 0),k.setupLightsView(r),De===!0&&Ye.setGlobalState(M.clippingPlanes,r),St(e,n,r),L.updateMultisampleRenderTarget(a),L.updateRenderTargetMipmap(a),Ie.has(`WEBGL_multisampled_render_to_texture`)===!1){let e=!1;for(let i=0,a=t.length;i0,r.currentProgram=d,r.uniformsList=null,d}function Tt(e){if(e.uniformsList===null){let t=e.currentProgram.getUniforms();e.uniformsList=zs.seqWithValue(t.seq,e.uniforms)}return e.uniformsList}function Et(e,t){let n=I.get(e);n.outputColorSpace=t.outputColorSpace,n.batching=t.batching,n.batchingColor=t.batchingColor,n.instancing=t.instancing,n.instancingColor=t.instancingColor,n.instancingMorph=t.instancingMorph,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}function Dt(e,t){if(e.length===0)return null;if(e.length===1)return e[0].texture===null?null:e[0];D.setFromMatrixPosition(t.matrixWorld);for(let t=0,n=e.length;t0),f=!!n.morphAttributes.position,p=!!n.morphAttributes.normal,m=!!n.morphAttributes.color,h=0;r.toneMapped&&(N===null||N.isXRRenderTarget===!0)&&(h=M.toneMapping);let g=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,_=g===void 0?0:g.length,v=I.get(r),y=k.state.lights;if(De===!0&&(Oe===!0||e!==fe)){let t=e===fe&&r.id===de;Ye.setState(r,e,t)}let b=!1;r.version===v.__version?v.needsLights&&v.lightsStateVersion!==y.state.version?b=!0:v.outputColorSpace===s?i.isBatchedMesh&&v.batching===!1||!i.isBatchedMesh&&v.batching===!0||i.isBatchedMesh&&v.batchingColor===!0&&i._colorsTexture===null||i.isBatchedMesh&&v.batchingColor===!1&&i._colorsTexture!==null||i.isInstancedMesh&&v.instancing===!1||!i.isInstancedMesh&&v.instancing===!0||i.isSkinnedMesh&&v.skinning===!1||!i.isSkinnedMesh&&v.skinning===!0||i.isInstancedMesh&&v.instancingColor===!0&&i.instanceColor===null||i.isInstancedMesh&&v.instancingColor===!1&&i.instanceColor!==null||i.isInstancedMesh&&v.instancingMorph===!0&&i.morphTexture===null||i.isInstancedMesh&&v.instancingMorph===!1&&i.morphTexture!==null?b=!0:v.envMap===l?r.fog===!0&&v.fog!==a||v.numClippingPlanes!==void 0&&(v.numClippingPlanes!==Ye.numPlanes||v.numIntersection!==Ye.numIntersection)?b=!0:v.vertexAlphas===u&&v.vertexTangents===d&&v.morphTargets===f&&v.morphNormals===p&&v.morphColors===m&&v.toneMapping===h&&v.morphTargetsCount===_?!!v.lightProbeGrid!=k.state.lightProbeGridArray.length>0&&(b=!0):b=!0:b=!0:b=!0:(b=!0,v.__version=r.version);let x=v.currentProgram;b===!0&&(x=wt(r,t,i),ae&&r.isNodeMaterial&&ae.onUpdateProgram(r,x,v));let S=!1,C=!1,w=!1,T=x.getUniforms(),E=v.uniforms;if(F.useProgram(x.program)&&(S=!0,C=!0,w=!0),r.id!==de&&(de=r.id,C=!0),v.needsLights){let e=Dt(k.state.lightProbeGridArray,i);v.lightProbeGrid!==e&&(v.lightProbeGrid=e,C=!0)}if(S||fe!==e){F.buffers.depth.getReversed()&&e.reversedDepth!==!0&&(e._reversedDepth=!0,e.updateProjectionMatrix()),T.setValue(P,`projectionMatrix`,e.projectionMatrix),T.setValue(P,`viewMatrix`,e.matrixWorldInverse);let t=T.map.cameraPosition;t!==void 0&&t.setValue(P,Ae.setFromMatrixPosition(e.matrixWorld)),Le.logarithmicDepthBuffer&&T.setValue(P,`logDepthBufFC`,2/(Math.log(e.far+1)/Math.LN2)),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&T.setValue(P,`isOrthographic`,e.isOrthographicCamera===!0),fe!==e&&(fe=e,C=!0,w=!0)}if(v.needsLights&&(y.state.sunShadowMap.length>0&&T.setValue(P,`sunShadowMap`,y.state.sunShadowMap,L),y.state.directionalShadowMap.length>0&&T.setValue(P,`directionalShadowMap`,y.state.directionalShadowMap,L),y.state.spotShadowMap.length>0&&T.setValue(P,`spotShadowMap`,y.state.spotShadowMap,L),y.state.pointShadowMap.length>0&&T.setValue(P,`pointShadowMap`,y.state.pointShadowMap,L)),i.isSkinnedMesh){T.setOptional(P,i,`bindMatrix`),T.setOptional(P,i,`bindMatrixInverse`);let e=i.skeleton;e&&(e.boneTexture===null&&e.computeBoneTexture(),T.setValue(P,`boneTexture`,e.boneTexture,L))}i.isBatchedMesh&&(T.setOptional(P,i,`batchingTexture`),T.setValue(P,`batchingTexture`,i._matricesTexture,L),T.setOptional(P,i,`batchingIdTexture`),T.setValue(P,`batchingIdTexture`,i._indirectTexture,L),T.setOptional(P,i,`batchingColorTexture`),i._colorsTexture!==null&&T.setValue(P,`batchingColorTexture`,i._colorsTexture,L));let D=n.morphAttributes;if((D.position!==void 0||D.normal!==void 0||D.color!==void 0)&&$e.update(i,n,x),(C||v.receiveShadow!==i.receiveShadow)&&(v.receiveShadow=i.receiveShadow,T.setValue(P,`receiveShadow`,i.receiveShadow)),(r.isMeshStandardMaterial||r.isMeshLambertMaterial||r.isMeshPhongMaterial)&&r.envMap===null&&t.environment!==null&&(E.envMapIntensity.value=t.environmentIntensity),E.dfgLUT!==void 0&&(E.dfgLUT.value=ol()),C){if(T.setValue(P,`toneMappingExposure`,M.toneMappingExposure),v.needsLights&&kt(E,w),a&&r.fog===!0&&Ge.refreshFogUniforms(E,a),Ge.refreshMaterialUniforms(E,r,be,ye,k.state.transmissionRenderTarget[e.id]),v.needsLights&&v.lightProbeGrid){let e=v.lightProbeGrid;E.probesSH.value=e.texture,E.probesMin.value.copy(e.boundingBox.min),E.probesMax.value.copy(e.boundingBox.max),E.probesResolution.value.copy(e.resolution)}zs.upload(P,Tt(v),E,L)}if(r.isShaderMaterial&&r.uniformsNeedUpdate===!0&&(zs.upload(P,Tt(v),E,L),r.uniformsNeedUpdate=!1),r.isSpriteMaterial&&T.setValue(P,`center`,i.center),T.setValue(P,`modelViewMatrix`,i.modelViewMatrix),T.setValue(P,`normalMatrix`,i.normalMatrix),T.setValue(P,`modelMatrix`,i.matrixWorld),r.uniformsGroups!==void 0){let e=r.uniformsGroups;for(let t=0,n=e.length;t0&&L.useMultisampledRTT(e)===!1?I.get(e).__webglMultisampledFramebuffer:Array.isArray(c)?c[n]:c,pe.copy(e.viewport),me.copy(e.scissor),he=e.scissorTest}else pe.copy(Ce).multiplyScalar(be).floor(),me.copy(we).multiplyScalar(be).floor(),he=Te;if(n!==0&&(r=oe),F.bindFramebuffer(P.FRAMEBUFFER,r)&&F.drawBuffers(e,r),F.viewport(pe),F.scissor(me),F.setScissorTest(he),i){let r=I.get(e.texture);P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(a){let r=t;for(let t=0;t1&&P.readBuffer(P.COLOR_ATTACHMENT0+s);let u=jt(o);if(u.__formatReadable===!1){z(`WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.`);return}if(u.__typeReadable===!1){z(`WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.`);return}t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&P.readPixels(t,n,r,i,it.convert(c),it.convert(l),a)}finally{let e=N===null?null:I.get(N).__webglFramebuffer;F.bindFramebuffer(P.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,t,n,r,i,a,o,s=0){if(!(e&&e.isWebGLRenderTarget))throw Error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.`);let c=I.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&o!==void 0&&(c=c[o]),c){if(t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i){F.bindFramebuffer(P.FRAMEBUFFER,c);let o=e.textures[s],l=o.format,u=o.type;e.textures.length>1&&P.readBuffer(P.COLOR_ATTACHMENT0+s);let d=jt(o);if(d.__formatReadable===!1)throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.`);if(d.__typeReadable===!1)throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.`);let f=P.createBuffer();P.bindBuffer(P.PIXEL_PACK_BUFFER,f),P.bufferData(P.PIXEL_PACK_BUFFER,a.byteLength,P.STREAM_READ),P.readPixels(t,n,r,i,it.convert(l),it.convert(u),0),P.bindBuffer(P.PIXEL_PACK_BUFFER,null);let p=N===null?null:I.get(N).__webglFramebuffer;F.bindFramebuffer(P.FRAMEBUFFER,p);let m=P.fenceSync(P.SYNC_GPU_COMMANDS_COMPLETE,0);return P.flush(),await rt(P,m,4),P.bindBuffer(P.PIXEL_PACK_BUFFER,f),P.getBufferSubData(P.PIXEL_PACK_BUFFER,0,a),P.bindBuffer(P.PIXEL_PACK_BUFFER,null),P.deleteBuffer(f),P.deleteSync(m),a}throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.`)}},this.copyFramebufferToTexture=function(e,t=null,n=0){let r=2**-n,i=Math.floor(e.image.width*r),a=Math.floor(e.image.height*r),o=t===null?0:t.x,s=t===null?0:t.y;L.setTexture2D(e,0),P.copyTexSubImage2D(P.TEXTURE_2D,n,0,0,o,s,i,a),F.unbindTexture()},this.copyTextureToTexture=function(e,t,n=null,r=null,i=0,a=0){let o,s,c,l,u,d,f,p,m,h=e.isCompressedTexture?e.mipmaps[a]:e.image;if(n!==null)o=n.max.x-n.min.x,s=n.max.y-n.min.y,c=n.isBox3?n.max.z-n.min.z:1,l=n.min.x,u=n.min.y,d=n.isBox3?n.min.z:0;else{let t=2**-i;o=Math.floor(h.width*t),s=Math.floor(h.height*t),c=e.isDataArrayTexture?h.depth:e.isData3DTexture?Math.floor(h.depth*t):1,l=0,u=0,d=0}r===null?(f=0,p=0,m=0):(f=r.x,p=r.y,m=r.z);let g=it.convert(t.format),_=it.convert(t.type),v;t.isData3DTexture?(L.setTexture3D(t,0),v=P.TEXTURE_3D):t.isDataArrayTexture||t.isCompressedArrayTexture?(L.setTexture2DArray(t,0),v=P.TEXTURE_2D_ARRAY):(L.setTexture2D(t,0),v=P.TEXTURE_2D),F.activeTexture(P.TEXTURE0),F.pixelStorei(P.UNPACK_FLIP_Y_WEBGL,t.flipY),F.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),F.pixelStorei(P.UNPACK_ALIGNMENT,t.unpackAlignment);let y=F.getParameter(P.UNPACK_ROW_LENGTH),b=F.getParameter(P.UNPACK_IMAGE_HEIGHT),x=F.getParameter(P.UNPACK_SKIP_PIXELS),S=F.getParameter(P.UNPACK_SKIP_ROWS),C=F.getParameter(P.UNPACK_SKIP_IMAGES);F.pixelStorei(P.UNPACK_ROW_LENGTH,h.width),F.pixelStorei(P.UNPACK_IMAGE_HEIGHT,h.height),F.pixelStorei(P.UNPACK_SKIP_PIXELS,l),F.pixelStorei(P.UNPACK_SKIP_ROWS,u),F.pixelStorei(P.UNPACK_SKIP_IMAGES,d);let w=e.isDataArrayTexture||e.isData3DTexture,T=t.isDataArrayTexture||t.isData3DTexture;if(e.isDepthTexture){let n=I.get(e),r=I.get(t),h=I.get(n.__renderTarget),g=I.get(r.__renderTarget);F.bindFramebuffer(P.READ_FRAMEBUFFER,h.__webglFramebuffer),F.bindFramebuffer(P.DRAW_FRAMEBUFFER,g.__webglFramebuffer);for(let n=0;nWl,ASCIITexture:()=>Vl,AdaptiveLuminanceMaterial:()=>Ff,AdaptiveLuminancePass:()=>If,BlendFunction:()=>X,BlendMode:()=>Bl,BloomEffect:()=>cu,BlurPass:()=>Xl,BokehEffect:()=>uu,BokehMaterial:()=>Tu,BoxBlurMaterial:()=>Kf,BoxBlurPass:()=>np,BrightnessContrastEffect:()=>fu,ChromaticAberrationEffect:()=>yu,CircleOfConfusionMaterial:()=>Du,ClearMaskPass:()=>pl,ClearPass:()=>yl,ColorAverageEffect:()=>mu,ColorChannel:()=>Su,ColorDepthEffect:()=>gu,ColorEdgesMaterial:()=>nf,ConvolutionMaterial:()=>Yl,CopyMaterial:()=>gl,CopyPass:()=>_l,DepthComparisonMaterial:()=>kd,DepthCopyMaterial:()=>Yf,DepthCopyMode:()=>_d,DepthCopyPass:()=>rp,DepthDownsamplingMaterial:()=>yf,DepthDownsamplingPass:()=>bf,DepthEffect:()=>xu,DepthMaskMaterial:()=>Xd,DepthOfFieldEffect:()=>Nu,DepthPass:()=>Nd,DepthPickingPass:()=>lp,DepthSavePass:()=>rp,DepthTestStrategy:()=>vd,Disposable:()=>ul,DotScreenEffect:()=>Fu,DownsamplingMaterial:()=>nu,EdgeDetectionMaterial:()=>nf,EdgeDetectionMode:()=>yd,Effect:()=>Hl,EffectAttribute:()=>El,EffectComposer:()=>Tl,EffectMaterial:()=>Qf,EffectPass:()=>fp,EffectShaderData:()=>Ol,EffectShaderSection:()=>Dl,FXAAEffect:()=>Ru,GammaCorrectionEffect:()=>Bu,GaussKernel:()=>Al,GaussianBlurMaterial:()=>tp,GaussianBlurPass:()=>pp,GlitchEffect:()=>qu,GlitchMode:()=>Vu,GodRaysEffect:()=>ed,GodRaysMaterial:()=>Yu,GridEffect:()=>nd,HueSaturationEffect:()=>id,ImmutableTimer:()=>jl,Initializable:()=>Ml,KawaseBlurMaterial:()=>Yl,KawaseBlurPass:()=>Xl,KernelSize:()=>Gl,LUT1DEffect:()=>cd,LUT3DEffect:()=>gd,LUT3dlLoader:()=>Vf,LUTCubeLoader:()=>Hf,LUTEffect:()=>gd,LUTOperation:()=>ld,LambdaPass:()=>mp,LensDistortionEffect:()=>od,LookupTexture:()=>md,LookupTexture3D:()=>md,LuminanceMaterial:()=>Ql,LuminancePass:()=>$l,MaskFunction:()=>Cu,MaskMaterial:()=>ku,MaskPass:()=>bl,MipmapBlurPass:()=>ou,NoiseEffect:()=>Ed,NoiseTexture:()=>Uu,NormalPass:()=>hp,OutlineEdgesMaterial:()=>Md,OutlineEffect:()=>Id,OutlineMaterial:()=>Md,OverrideMaterialManager:()=>Pl,Pass:()=>fl,PixelationEffect:()=>Rd,PredicationMode:()=>bd,RawImageData:()=>dd,RealisticBokehEffect:()=>Bd,RenderPass:()=>Xu,Resizable:()=>Fl,Resizer:()=>Y,Resolution:()=>Y,SMAAAreaImageData:()=>Up,SMAAEffect:()=>df,SMAAImageGenerator:()=>Kp,SMAAImageLoader:()=>Uf,SMAAPreset:()=>xd,SMAASearchImageData:()=>Qp,SMAAWeightsMaterial:()=>of,SSAOEffect:()=>Cf,SSAOMaterial:()=>gf,SavePass:()=>_l,ScanlineEffect:()=>Hd,Section:()=>Dl,Selection:()=>Rl,SelectiveBloomEffect:()=>Zd,SepiaEffect:()=>$d,ShaderPass:()=>Au,ShockWaveEffect:()=>Jd,TetrahedralUpscaler:()=>Sp,TextureEffect:()=>Ef,TiltShiftBlurMaterial:()=>kf,TiltShiftBlurPass:()=>Af,TiltShiftEffect:()=>Nf,Timer:()=>wl,ToneMappingEffect:()=>Rf,ToneMappingMode:()=>Sd,UpsamplingMaterial:()=>au,VignetteEffect:()=>Bf,VignetteTechnique:()=>Cd,WebGLExtension:()=>wd,version:()=>ll}),ll=`6.39.5`,ul=class{dispose(){}},dl=(()=>{let e=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),t=new Float32Array([0,0,2,0,0,2]),n=new pr;return n.setAttribute(`position`,new Qn(e,3)),n.setAttribute(`uv`,new Qn(t,2)),n})(),fl=class e{static get fullscreenGeometry(){return dl}constructor(e=`Pass`,t=new yn,n=new ya){this.name=e,this.renderer=null,this.scene=t,this.camera=n,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthBlit=!1,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(e){if(this.rtt===e){let t=this.fullscreenMaterial;t!==null&&(t.needsUpdate=!0),this.rtt=!e}}set mainScene(e){}set mainCamera(e){}setRenderer(e){this.renderer=e}isEnabled(){return this.enabled}setEnabled(e){this.enabled=e}get fullscreenMaterial(){return this.screen===null?null:this.screen.material}set fullscreenMaterial(t){let n=this.screen;n===null?(n=new Lr(e.fullscreenGeometry,t),n.frustumCulled=!1,this.scene===null&&(this.scene=new yn),this.scene.add(n),this.screen=n):n.material=t}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(e){this.fullscreenMaterial=e}getDepthTexture(){return null}setDepthTexture(e,t=L){}render(e,t,n,r,i){throw Error(`Render method not implemented!`)}setSize(e,t){}initialize(e,t,n){}dispose(){for(let t of Object.keys(this)){let n=this[t];(n instanceof W||n instanceof yr||n instanceof jt||n instanceof e)&&this[t].dispose()}this.fullscreenMaterial!==null&&this.fullscreenMaterial.dispose()}},pl=class extends fl{constructor(){super(`ClearMaskPass`,null,null),this.needsSwap=!1}render(e,t,n,r,i){let a=e.state.buffers.stencil;a.setLocked(!1),a.setTest(!1)}},ml=`#ifdef COLOR_WRITE +#include +#include +#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#endif +#ifdef DEPTH_WRITE +#include +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +return unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +return texture2D(depthBuffer,uv).r; +#endif +} +#endif +#ifdef USE_WEIGHTS +uniform vec4 channelWeights; +#endif +uniform float opacity;varying vec2 vUv;void main(){ +#ifdef COLOR_WRITE +vec4 texel=texture2D(inputBuffer,vUv); +#ifdef USE_WEIGHTS +texel*=channelWeights; +#endif +gl_FragColor=opacity*texel; +#ifdef COLOR_SPACE_CONVERSION +#include +#endif +#include +#else +gl_FragColor=vec4(0.0); +#endif +#ifdef DEPTH_WRITE +gl_FragDepth=readDepth(vUv); +#endif +}`,hl=`varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}`,gl=class extends Ni{constructor(){super({name:`CopyMaterial`,defines:{COLOR_SPACE_CONVERSION:`1`,DEPTH_PACKING:`0`,COLOR_WRITE:`1`},uniforms:{inputBuffer:new K(null),depthBuffer:new K(null),channelWeights:new K(null),opacity:new K(1)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:ml,vertexShader:hl}),this.depthFunc=1}get inputBuffer(){return this.uniforms.inputBuffer.value}set inputBuffer(e){let t=e!==null;this.colorWrite!==t&&(t?this.defines.COLOR_WRITE=!0:delete this.defines.COLOR_WRITE,this.colorWrite=t,this.needsUpdate=!0),this.uniforms.inputBuffer.value=e}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){let t=e!==null;this.depthWrite!==t&&(t?this.defines.DEPTH_WRITE=!0:delete this.defines.DEPTH_WRITE,this.depthTest=t,this.depthWrite=t,this.needsUpdate=!0),this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}get colorSpaceConversion(){return this.defines.COLOR_SPACE_CONVERSION!==void 0}set colorSpaceConversion(e){this.colorSpaceConversion!==e&&(e?this.defines.COLOR_SPACE_CONVERSION=!0:delete this.defines.COLOR_SPACE_CONVERSION,this.needsUpdate=!0)}get channelWeights(){return this.uniforms.channelWeights.value}set channelWeights(e){e===null?delete this.defines.USE_WEIGHTS:(this.defines.USE_WEIGHTS=`1`,this.uniforms.channelWeights.value=e),this.needsUpdate=!0}setInputBuffer(e){this.uniforms.inputBuffer.value=e}getOpacity(e){return this.uniforms.opacity.value}setOpacity(e){this.uniforms.opacity.value=e}},_l=class extends fl{constructor(e,t=!0){super(`CopyPass`),this.fullscreenMaterial=new gl,this.needsSwap=!1,this.renderTarget=e,e===void 0&&(this.renderTarget=new W(1,1,{minFilter:s,magFilter:s,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name=`CopyPass.Target`),this.autoResize=t}get resize(){return this.autoResize}set resize(e){this.autoResize=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(e){this.autoResize=e}render(e,t,n,r,i){this.fullscreenMaterial.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){this.autoResize&&this.renderTarget.setSize(e,t)}initialize(e,t,n){n!==void 0&&(this.renderTarget.texture.type=n,n===1009?e!==null&&e.outputColorSpace===`srgb`&&(this.renderTarget.texture.colorSpace=Be):this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH=`1`)}},vl=new G,yl=class extends fl{constructor(e=!0,t=!0,n=!1){super(`ClearPass`,null,null),this.needsSwap=!1,this.color=e,this.depth=t,this.stencil=n,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(e,t,n){this.color=e,this.depth=t,this.stencil=n}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(e){this.overrideClearColor=e}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(e){this.overrideClearAlpha=e}render(e,t,n,r,i){let a=this.overrideClearColor,o=this.overrideClearAlpha,s=e.getClearAlpha(),c=a!==null,l=o>=0;c?(e.getClearColor(vl),e.setClearColor(a,l?o:s)):l&&e.setClearAlpha(o),e.setRenderTarget(this.renderToScreen?null:t),e.clear(this.color,this.depth,this.stencil),c?e.setClearColor(vl,s):l&&e.setClearAlpha(s)}},bl=class extends fl{constructor(e,t){super(`MaskPass`,e,t),this.needsSwap=!1,this.clearPass=new yl(!1,!1,!0),this.inverse=!1}set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get inverted(){return this.inverse}set inverted(e){this.inverse=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(e){this.inverted=e}render(e,t,n,r,i){let a=e.getContext(),o=e.state.buffers,s=this.scene,c=this.camera,l=this.clearPass,u=+!this.inverted,d=1-u;o.color.setMask(!1),o.depth.setMask(!1),o.color.setLocked(!0),o.depth.setLocked(!0),o.stencil.setTest(!0),o.stencil.setOp(a.REPLACE,a.REPLACE,a.REPLACE),o.stencil.setFunc(a.ALWAYS,u,4294967295),o.stencil.setClear(d),o.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?l.render(e,null):(l.render(e,t),l.render(e,n))),this.renderToScreen?(e.setRenderTarget(null),e.render(s,c)):(e.setRenderTarget(t),e.render(s,c),e.setRenderTarget(n),e.render(s,c)),o.color.setLocked(!1),o.depth.setLocked(!1),o.stencil.setLocked(!1),o.stencil.setFunc(a.EQUAL,1,4294967295),o.stencil.setOp(a.KEEP,a.KEEP,a.KEEP),o.stencil.setLocked(!0)}};function xl(e,t){let n=e.getContext();if(t<=0||typeof n.renderbufferStorageMultisample!=`function`)return 0;let r=n.getParameter(n.MAX_SAMPLES),i=Math.min(t,r);if(i<=0)return 0;let a=n.getParameter(n.RENDERBUFFER_BINDING),o=n.createRenderbuffer();try{return n.bindRenderbuffer(n.RENDERBUFFER,o),n.renderbufferStorageMultisample(n.RENDERBUFFER,i,n.RGBA8,1,1),i}catch{return 0}finally{n.bindRenderbuffer(n.RENDERBUFFER,a),n.deleteRenderbuffer(o)}}var Sl=1/1e3,Cl=1e3,wl=class{constructor(){this.startTime=performance.now(),this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}get autoReset(){return this._autoReset}set autoReset(e){typeof document<`u`&&document.hidden!==void 0&&(e?document.addEventListener(`visibilitychange`,this):document.removeEventListener(`visibilitychange`,this),this._autoReset=e)}get delta(){return this._delta*Sl}get fixedDelta(){return this._fixedDelta*Sl}set fixedDelta(e){this._fixedDelta=e*Cl}get elapsed(){return this._elapsed*Sl}update(e){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=(e===void 0?performance.now():e)-this.startTime,this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()-this.startTime}getDelta(){return this.delta}getElapsed(){return this.elapsed}handleEvent(e){document.hidden||(this.currentTime=performance.now()-this.startTime)}dispose(){this.autoReset=!1}},Tl=class{constructor(e=null,{depthBuffer:t=!0,stencilBuffer:n=!1,multisampling:r=0,frameBufferType:i=u}={}){this.renderer=null,this.inputBuffer=this.createBuffer(t,n,i,r),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new _l,this.depthRenderTarget=null,this.passes=[],this.timer=new wl,this.autoRenderToScreen=!0,this.setRenderer(e)}get stableDepthTexture(){return this.depthRenderTarget===null?null:this.depthRenderTarget.depthTexture}get multisampling(){return this.inputBuffer.samples}set multisampling(e){let t=this.renderer===null?e:xl(this.renderer,e);this.multisampling!==t&&(this.inputBuffer.samples=t,this.outputBuffer.samples=t,this.inputBuffer.dispose(),this.outputBuffer.dispose())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(e){if(this.renderer=e,e!==null){let t=e.getSize(new V),n=e.getContext().getContextAttributes().alpha,r=this.inputBuffer.texture.type;r===1009&&e.outputColorSpace===`srgb`&&(this.inputBuffer.texture.colorSpace=Be,this.outputBuffer.texture.colorSpace=Be,this.inputBuffer.dispose(),this.outputBuffer.dispose());let i=this.multisampling;this.multisampling=i,e.autoClear=!1,this.setSize(t.width,t.height);for(let t of this.passes)t.initialize(e,n,r)}}replaceRenderer(e,t=!0){let n=this.renderer,r=n.domElement.parentNode;return this.setRenderer(e),t&&r!==null&&(r.removeChild(n.domElement),r.appendChild(e.domElement)),n}createDepthTexture(){let e=new mi;e.name=`EffectComposer.InputDepth`,this.inputBuffer.stencilBuffer?(e.format=D,e.type=b):e.type=g;let t=new mi;t.format=e.format,t.type=e.type,t.name=`EffectComposer.OutputDepth`;let n=new mi;n.format=e.format,n.type=e.type,n.name=`EffectComposer.StableDepth`,this.inputBuffer.depthTexture=e,this.outputBuffer.depthTexture=t,this.inputBuffer.dispose(),this.outputBuffer.dispose();let{width:r,height:i}=this.inputBuffer;this.depthRenderTarget=new W(r,i,{depthBuffer:!0,stencilBuffer:this.inputBuffer.stencilBuffer,depthTexture:n})}blitDepthBuffer(e){let t=this.renderer,n=this.depthRenderTarget,r=t.properties,i=t.getContext();t.setRenderTarget(n);let a=r.get(e).__webglFramebuffer,o=r.get(n).__webglFramebuffer,s=e.stencilBuffer?i.DEPTH_BUFFER_BIT|i.STENCIL_BUFFER_BIT:i.DEPTH_BUFFER_BIT;i.bindFramebuffer(i.READ_FRAMEBUFFER,a),i.bindFramebuffer(i.DRAW_FRAMEBUFFER,o),i.blitFramebuffer(0,0,e.width,e.height,0,0,n.width,n.height,s,i.NEAREST),i.bindFramebuffer(i.READ_FRAMEBUFFER,null),i.bindFramebuffer(i.DRAW_FRAMEBUFFER,null),t.setRenderTarget(null)}deleteDepthTexture(){let e=this.stableDepthTexture;for(let t of this.passes)t.getDepthTexture()===e&&t.setDepthTexture(null);this.depthRenderTarget!==null&&(this.depthRenderTarget.dispose(),this.depthRenderTarget=null),this.inputBuffer.depthTexture!==null&&(this.inputBuffer.depthTexture.dispose(),this.inputBuffer.depthTexture=null),this.outputBuffer.depthTexture!==null&&(this.outputBuffer.depthTexture.dispose(),this.outputBuffer.depthTexture=null)}createBuffer(e,t,n,r){let i=this.renderer,a=i===null?new V:i.getDrawingBufferSize(new V),o=new W(a.width,a.height,{minFilter:s,magFilter:s,samples:r,stencilBuffer:t,depthBuffer:e,type:n});return n===1009&&i!==null&&i.outputColorSpace===`srgb`&&(o.texture.colorSpace=Be),o.texture.name=`EffectComposer.Buffer`,o.texture.generateMipmaps=!1,o}setMainScene(e){for(let t of this.passes)t.mainScene=e}setMainCamera(e){for(let t of this.passes)t.mainCamera=e}addPass(e,t){let n=this.passes,r=this.renderer,i=r.getDrawingBufferSize(new V),a=r.getContext().getContextAttributes().alpha,o=this.inputBuffer.texture.type;if(e.renderer=r,e.setSize(i.width,i.height),e.initialize(r,a,o),this.autoRenderToScreen&&(n.length>0&&(n[n.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),t===void 0?n.push(e):n.splice(t,0,e),this.autoRenderToScreen&&(n[n.length-1].renderToScreen=!0),e.needsDepthTexture||this.depthRenderTarget!==null){if(this.depthRenderTarget===null){this.createDepthTexture();for(let e of n)e.setDepthTexture(this.stableDepthTexture)}else e.setDepthTexture(this.stableDepthTexture)}}removePass(e){let t=this.passes,n=t.indexOf(e);if(n!==-1&&t.splice(n,1).length>0){let r=this.stableDepthTexture;r!==null&&(t.reduce((e,t)=>e||t.needsDepthTexture,!1)||(e.getDepthTexture()===r&&e.setDepthTexture(null),this.deleteDepthTexture())),this.autoRenderToScreen&&n===t.length&&(e.renderToScreen=!1,t.length>0&&(t[t.length-1].renderToScreen=!0))}}removeAllPasses(){let e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}render(e){let t=this.renderer,n=this.copyPass,r=this.inputBuffer,i=this.outputBuffer,a,o=!1;e===void 0&&(this.timer.update(),e=this.timer.getDelta());for(let s of this.passes)if(s.enabled){if(s.render(t,r,i,e,o),s.needsDepthBlit&&this.depthRenderTarget!==null&&this.blitDepthBuffer(r),s.needsSwap){if(o){n.renderToScreen=s.renderToScreen;let a=t.getContext(),c=t.state.buffers.stencil;c.setFunc(a.NOTEQUAL,1,4294967295),n.render(t,r,i,e,o),c.setFunc(a.EQUAL,1,4294967295)}a=r,r=i,i=a}s instanceof bl?o=!0:s instanceof pl&&(o=!1)}}setSize(e,t,n){let r=this.renderer,i=r.getSize(new V);(e===void 0||t===void 0)&&(e=i.width,t=i.height),(i.width!==e||i.height!==t)&&r.setSize(e,t,n);let a=r.getDrawingBufferSize(new V);this.inputBuffer.setSize(a.width,a.height),this.outputBuffer.setSize(a.width,a.height),this.depthRenderTarget!==null&&this.depthRenderTarget.setSize(a.width,a.height);for(let e of this.passes)e.setSize(a.width,a.height)}reset(){this.dispose(),this.autoRenderToScreen=!0}dispose(){for(let e of this.passes)e.dispose();this.deleteDepthTexture(),this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.copyPass.dispose(),this.timer.dispose(),this.passes=[],fl.fullscreenGeometry.dispose()}},El={NONE:0,DEPTH:1,CONVOLUTION:2},Dl={FRAGMENT_HEAD:`FRAGMENT_HEAD`,FRAGMENT_MAIN_UV:`FRAGMENT_MAIN_UV`,FRAGMENT_MAIN_IMAGE:`FRAGMENT_MAIN_IMAGE`,VERTEX_HEAD:`VERTEX_HEAD`,VERTEX_MAIN_SUPPORT:`VERTEX_MAIN_SUPPORT`},Ol=class{constructor(){this.shaderParts=new Map([[Dl.FRAGMENT_HEAD,null],[Dl.FRAGMENT_MAIN_UV,null],[Dl.FRAGMENT_MAIN_IMAGE,null],[Dl.VERTEX_HEAD,null],[Dl.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=El.NONE,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=Ve}};function kl(e){let t;if(e===0)t=new Float64Array;else if(e===1)t=new Float64Array([1]);else if(e>1){let n=new Float64Array(e),r=new Float64Array(e);for(let i=1;i<=e;++i){for(let e=0;e1020)throw Error(`The kernel size must be in the range [3, 1020]`);let n=e+t*2,r=t>0?kl(n).slice(t,-t):kl(n),i=Math.floor((r.length-1)/2),a=r.reduce((e,t)=>e+t,0),o=r.slice(i),s=[...Array(i+1).keys()],c=new Float64Array(Math.floor(s.length/2)),l=new Float64Array(c.length);c[0]=o[0]/a;for(let e=1,t=1,n=s.length-1;ee+t,0)-c[0]*.5)*2;if(u!==0)for(let e=0,t=c.length,n=1/u;e{if(e.isMesh){let t;if(e.material.flatShading)switch(e.material.side){case 2:t=this.materialsFlatShadedDoubleSide;break;case 1:t=this.materialsFlatShadedBackSide;break;default:t=this.materialsFlatShaded}else switch(e.material.side){case 2:t=this.materialsDoubleSide;break;case 1:t=this.materialsBackSide;break;default:t=this.materials}this.originalMaterials.set(e,e.material),e.material=e.isSkinnedMesh?t[2]:e.isInstancedMesh?t[1]:t[0],++this.meshCount}}}cloneMaterial(e){if(!(e instanceof Ni))return e.clone();let t=e.uniforms,n=new Map;for(let e in t){let r=t[e].value;r.isRenderTargetTexture&&(t[e].value=null,n.set(e,r))}let r=e.clone();for(let e of n)t[e[0]].value=e[1],r.uniforms[e[0]].value=e[1];return r}setMaterial(e){if(this.disposeMaterials(),this.material=e,e!==null){let t=this.materials=[this.cloneMaterial(e),this.cloneMaterial(e),this.cloneMaterial(e)];for(let n of t)n.uniforms=Object.assign({},e.uniforms),n.side=0;t[2].skinning=!0,this.materialsBackSide=t.map(t=>{let n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.side=1,n}),this.materialsDoubleSide=t.map(t=>{let n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.side=2,n}),this.materialsFlatShaded=t.map(t=>{let n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n}),this.materialsFlatShadedBackSide=t.map(t=>{let n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n.side=1,n}),this.materialsFlatShadedDoubleSide=t.map(t=>{let n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n.side=2,n})}}render(e,t,n){let r=e.shadowMap.enabled;if(e.shadowMap.enabled=!1,Nl){let r=this.originalMaterials;this.meshCount=0,t.traverse(this.replaceMaterial),e.render(t,n);for(let e of r)e[0].material=e[1];this.meshCount!==r.size&&r.clear()}else{let r=t.overrideMaterial;t.overrideMaterial=this.material,e.render(t,n),t.overrideMaterial=r}e.shadowMap.enabled=r}disposeMaterials(){if(this.material!==null){let e=this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide);for(let t of e)t.dispose()}}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return Nl}static set workaroundEnabled(e){Nl=e}},Fl=class{setSize(e,t){}},Il=-1,Y=class extends at{constructor(e=null,t=Il,n=Il,r=1){super(),e!==null&&this.addEventListener(`change`,()=>e.setSize(this.baseSize.width,this.baseSize.height)),this.baseSize=new V(1,1),this.preferredSize=new V(t,n),this.target=this.preferredSize,this.s=r,this.effectiveSize=new V,this.addEventListener(`change`,()=>this.updateEffectiveSize()),this.updateEffectiveSize()}updateEffectiveSize(){let e=this.baseSize,t=this.preferredSize,n=this.effectiveSize,r=this.scale;n.width=t.width===Il?t.height===Il?Math.round(e.width*r):Math.round(t.height*(e.width/Math.max(e.height,1))):t.width,n.height=t.height===Il?t.width===Il?Math.round(e.height*r):Math.round(t.width/Math.max(e.width/Math.max(e.height,1),1)):t.height}get width(){return this.effectiveSize.width}set width(e){this.preferredWidth=e}get height(){return this.effectiveSize.height}set height(e){this.preferredHeight=e}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(e){this.s!==e&&(this.s=e,this.preferredSize.setScalar(Il),this.dispatchEvent({type:`change`}))}getScale(){return this.scale}setScale(e){this.scale=e}get baseWidth(){return this.baseSize.width}set baseWidth(e){this.baseSize.width!==e&&(this.baseSize.width=e,this.dispatchEvent({type:`change`}))}getBaseWidth(){return this.baseWidth}setBaseWidth(e){this.baseWidth=e}get baseHeight(){return this.baseSize.height}set baseHeight(e){this.baseSize.height!==e&&(this.baseSize.height=e,this.dispatchEvent({type:`change`}))}getBaseHeight(){return this.baseHeight}setBaseHeight(e){this.baseHeight=e}setBaseSize(e,t){(this.baseSize.width!==e||this.baseSize.height!==t)&&(this.baseSize.set(e,t),this.dispatchEvent({type:`change`}))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(e){this.preferredSize.width!==e&&(this.preferredSize.width=e,this.dispatchEvent({type:`change`}))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(e){this.preferredWidth=e}get preferredHeight(){return this.preferredSize.height}set preferredHeight(e){this.preferredSize.height!==e&&(this.preferredSize.height=e,this.dispatchEvent({type:`change`}))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(e){this.preferredHeight=e}setPreferredSize(e,t){(this.preferredSize.width!==e||this.preferredSize.height!==t)&&(this.preferredSize.set(e,t),this.dispatchEvent({type:`change`}))}copy(e){this.s=e.scale,this.baseSize.set(e.baseWidth,e.baseHeight),this.preferredSize.set(e.preferredWidth,e.preferredHeight),this.dispatchEvent({type:`change`})}static get AUTO_SIZE(){return Il}},Ll=new class{constructor(e=0){this.nextId=e}getNextId(){return this.nextId++}reset(e=0){return this.nextId=e,this}}(2),Rl=class extends Set{constructor(e,t=Ll.getNextId()){super(),this.exclusive=!1,this._layer=t,(this._layer<1||this._layer>31)&&(console.warn(`Layer out of range, resetting to 2`),Ll.reset(2),this._layer=Ll.getNextId()),e!==void 0&&this.set(e)}get layer(){return this._layer}set layer(e){let t=this._layer;for(let n of this)n.layers.disable(t),n.layers.enable(e);this._layer=e}getLayer(){return this.layer}setLayer(e){this.layer=e}isExclusive(){return this.exclusive}setExclusive(e){this.exclusive=e}clear(){let e=this.layer;for(let t of this)t.layers.disable(e);return super.clear()}set(e){this.clear();for(let t of e)this.add(t);return this}indexOf(e){return this.has(e)?0:-1}add(e){return this.exclusive?e.layers.set(this.layer):e.layers.enable(this.layer),super.add(e)}delete(e){return this.has(e)&&e.layers.disable(this.layer),super.delete(e)}toggle(e){let t;return this.has(e)?(this.delete(e),t=!1):(this.add(e),t=!0),t}setVisible(e){for(let t of this)e?t.layers.enable(0):t.layers.disable(0);return this}},X={SKIP:9,SET:30,ADD:0,ALPHA:1,AVERAGE:2,COLOR:3,COLOR_BURN:4,COLOR_DODGE:5,DARKEN:6,DIFFERENCE:7,DIVIDE:8,DST:9,EXCLUSION:10,HARD_LIGHT:11,HARD_MIX:12,HUE:13,INVERT:14,INVERT_RGB:15,LIGHTEN:16,LINEAR_BURN:17,LINEAR_DODGE:18,LINEAR_LIGHT:19,LUMINOSITY:20,MULTIPLY:21,NEGATION:22,NORMAL:23,OVERLAY:24,PIN_LIGHT:25,REFLECT:26,SATURATION:27,SCREEN:28,SOFT_LIGHT:29,SRC:30,SUBTRACT:31,VIVID_LIGHT:32},zl=new Map([[X.ADD,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb+src.rgb;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.ALPHA,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){return mix(dst,src,src.a*opacity);}`],[X.AVERAGE,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=(dst.rgb+src.rgb)*0.5;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.COLOR,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(b.xy,a.z));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.COLOR_BURN,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=dst.rgb,b=src.rgb;vec3 c=mix(step(0.0,b)*(1.0-min(vec3(1.0),(1.0-a)/max(b,1e-9))),vec3(1.0),step(1.0,a));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.COLOR_DODGE,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=dst.rgb,b=src.rgb;vec3 c=step(0.0,a)*mix(min(vec3(1.0),a/max(1.0-b,1e-9)),vec3(1.0),step(1.0,b));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.DARKEN,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=min(dst.rgb,src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.DIFFERENCE,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=abs(dst.rgb-src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.DIVIDE,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb/max(src.rgb,1e-9);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.DST,null],[X.EXCLUSION,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb+src.rgb-2.0*dst.rgb*src.rgb;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.HARD_LIGHT,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=min(dst.rgb,1.0);vec3 b=min(src.rgb,1.0);vec3 c=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,b));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.HARD_MIX,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=step(1.0,dst.rgb+src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.HUE,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(b.x,a.yz));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.INVERT,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(1.0-src.rgb,0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.INVERT_RGB,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=src.rgb*max(1.0-dst.rgb,0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.LIGHTEN,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(dst.rgb,src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.LINEAR_BURN,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=clamp(src.rgb+dst.rgb-1.0,0.0,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.LINEAR_DODGE,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=min(dst.rgb+src.rgb,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.LINEAR_LIGHT,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=clamp(2.0*src.rgb+dst.rgb-1.0,0.0,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.LUMINOSITY,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(a.xy,b.z));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.MULTIPLY,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb*src.rgb;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.NEGATION,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(1.0-abs(1.0-dst.rgb-src.rgb),0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.NORMAL,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){return mix(dst,src,opacity);}`],[X.OVERLAY,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=2.0*src.rgb*dst.rgb;vec3 b=1.0-2.0*(1.0-src.rgb)*(1.0-dst.rgb);vec3 c=mix(a,b,step(0.5,dst.rgb));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.PIN_LIGHT,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 src2=2.0*src.rgb;vec3 c=mix(mix(src2,dst.rgb,step(0.5*dst.rgb,src.rgb)),max(src2-1.0,vec3(0.0)),step(dst.rgb,src2-1.0));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.REFLECT,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=min(dst.rgb*dst.rgb/max(1.0-src.rgb,1e-9),1.0);vec3 c=mix(a,src.rgb,step(1.0,src.rgb));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.SATURATION,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(a.x,b.y,a.z));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.SCREEN,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb+src.rgb-min(dst.rgb*src.rgb,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.SOFT_LIGHT,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 src2=2.0*src.rgb;vec3 d=dst.rgb+(src2-1.0);vec3 w=step(0.5,src.rgb);vec3 a=dst.rgb-(1.0-src2)*dst.rgb*(1.0-dst.rgb);vec3 b=mix(d*(sqrt(dst.rgb)-dst.rgb),d*dst.rgb*((16.0*dst.rgb-12.0)*dst.rgb+3.0),w*(1.0-step(0.25,dst.rgb)));vec3 c=mix(a,b,w);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.SRC,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){return src;}`],[X.SUBTRACT,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(dst.rgb-src.rgb,0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`],[X.VIVID_LIGHT,`vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=mix(max(1.0-min((1.0-dst.rgb)/(2.0*src.rgb),1.0),0.0),min(dst.rgb/(2.0*(1.0-src.rgb)),1.0),step(0.5,src.rgb));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}`]]),Bl=class extends at{constructor(e,t=1){super(),this._blendFunction=e,this.opacity=new K(t)}getOpacity(){return this.opacity.value}setOpacity(e){this.opacity.value=e}get blendFunction(){return this._blendFunction}set blendFunction(e){this._blendFunction=e,this.dispatchEvent({type:`change`})}getBlendFunction(){return this.blendFunction}setBlendFunction(e){this.blendFunction=e}getShaderCode(){return zl.get(this.blendFunction)}},Vl=class extends pi{constructor({characters:e=` .:,'-^=*+?!|0#X%WM@`,font:n=`Arial`,fontSize:r=54,size:i=1024,cellCount:a=16}={}){super(document.createElement(`canvas`),void 0,t,t);let o=this.image;o.width=o.height=i;let s=o.getContext(`2d`),c=i/a;s.font=`${r}px ${n}`,s.textAlign=`center`,s.textBaseline=`middle`,s.fillStyle=`#ffffff`;for(let t=0,n=e.length;tthis.setChanged()),this._inputColorSpace=Ve,this._outputColorSpace=``}get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(e){this._inputColorSpace=e,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e,this.setChanged()}set mainScene(e){}set mainCamera(e){}getName(){return this.name}setRenderer(e){this.renderer=e}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(e){this.attributes=e,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(e){this.fragmentShader=e,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(e){this.vertexShader=e,this.setChanged()}setChanged(){this.dispatchEvent({type:`change`})}setDepthTexture(e,t=L){}update(e,t,n){}setSize(e,t){}initialize(e,t,n){}dispose(){for(let e of Object.keys(this)){let t=this[e];(t instanceof W||t instanceof yr||t instanceof jt||t instanceof fl)&&this[e].dispose()}}},Ul=`uniform sampler2D asciiTexture;uniform vec4 cellCount; +#ifdef USE_COLOR +uniform vec3 color; +#endif +void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 pixelizedUv=cellCount.zw*(0.5+floor(uv*cellCount.xy));vec4 texel=texture(inputBuffer,pixelizedUv);float lum=min(luminance(texel.rgb),1.0); +#ifdef INVERTED +lum=1.0-lum; +#endif +float characterIndex=floor(CHAR_COUNT_MINUS_ONE*lum);vec2 characterPosition=vec2(mod(characterIndex,TEX_CELL_COUNT),floor(characterIndex*INV_TEX_CELL_COUNT));vec2 offset=vec2(characterPosition.x,-characterPosition.y)*INV_TEX_CELL_COUNT;vec2 characterUv=mod(uv*(cellCount.xy*INV_TEX_CELL_COUNT),INV_TEX_CELL_COUNT);characterUv=characterUv-vec2(0.0,INV_TEX_CELL_COUNT)+offset;float asciiCharacter=texture(asciiTexture,characterUv).r; +#ifdef USE_COLOR +outputColor=vec4(color*asciiCharacter,inputColor.a); +#else +outputColor=vec4(texel.rgb*asciiCharacter,inputColor.a); +#endif +}`,Wl=class extends Hl{constructor({asciiTexture:e=new Vl,cellSize:t=16,color:n=null,inverted:r=!1}={}){super(`ASCIIEffect`,Ul,{uniforms:new Map([[`asciiTexture`,new K(null)],[`cellCount`,new K(new Mt)],[`color`,new K(new G)]])}),this._cellSize=-1,this.resolution=new V,this.asciiTexture=e,this.cellSize=t,this.color=n,this.inverted=r}get asciiTexture(){return this.uniforms.get(`asciiTexture`).value}set asciiTexture(e){let t=this.uniforms.get(`asciiTexture`).value;if(this.uniforms.get(`asciiTexture`).value=e,t!==null&&t!==e&&t.dispose(),e!==null){let t=e.cellCount;this.defines.set(`CHAR_COUNT_MINUS_ONE`,(e.characterCount-1).toFixed(1)),this.defines.set(`TEX_CELL_COUNT`,t.toFixed(1)),this.defines.set(`INV_TEX_CELL_COUNT`,(1/t).toFixed(9)),this.setChanged()}}get color(){return this.uniforms.get(`color`).value}set color(e){e!==null&&this.uniforms.get(`color`).value.set(e),this.defines.has(`USE_COLOR`)&&e===null?(this.defines.delete(`USE_COLOR`),this.setChanged()):!this.defines.has(`USE_COLOR`)&&e!==null&&(this.defines.set(`USE_COLOR`,`1`),this.setChanged())}get inverted(){return this.defines.has(`INVERTED`)}set inverted(e){this.inverted!==e&&(e?this.defines.set(`INVERTED`,`1`):this.defines.delete(`INVERTED`),this.setChanged())}get cellSize(){return this._cellSize}set cellSize(e){this._cellSize!==e&&(this._cellSize=e,this.updateCellCount())}updateCellCount(){let e=this.uniforms.get(`cellCount`).value,t=this.resolution;e.x=t.width/this.cellSize,e.y=t.height/this.cellSize,e.z=1/e.x,e.w=1/e.y}setSize(e,t){this.resolution.set(e,t),this.updateCellCount()}dispose(){this.asciiTexture!==null&&this.asciiTexture.dispose(),super.dispose()}},Gl={VERY_SMALL:0,SMALL:1,MEDIUM:2,LARGE:3,VERY_LARGE:4,HUGE:5},Kl=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25; +#include +}`,ql=`uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}`,Jl=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],Yl=class extends Ni{constructor(e=new Mt){super({name:`KawaseBlurMaterial`,uniforms:{inputBuffer:new K(null),texelSize:new K(new Mt),scale:new K(1),kernel:new K(0)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Kl,vertexShader:ql}),this.setTexelSize(e.x,e.y),this.kernelSize=Gl.MEDIUM}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.inputBuffer=e}get kernelSequence(){return Jl[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(e){this.uniforms.scale.value=e}getScale(){return this.uniforms.scale.value}setScale(e){this.uniforms.scale.value=e}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(e){this.uniforms.kernel.value=e}setKernel(e){this.kernel=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t,e*.5,t*.5)}setSize(e,t){let n=1/e,r=1/t;this.uniforms.texelSize.value.set(n,r,n*.5,r*.5)}},Xl=class extends fl{constructor({kernelSize:e=Gl.MEDIUM,resolutionScale:t=.5,width:n=Y.AUTO_SIZE,height:r=Y.AUTO_SIZE,resolutionX:i=n,resolutionY:a=r}={}){super(`KawaseBlurPass`),this.renderTargetA=new W(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name=`Blur.Target.A`,this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name=`Blur.Target.B`;let o=this.resolution=new Y(this,i,a,t);o.addEventListener(`change`,e=>this.setSize(o.baseWidth,o.baseHeight)),this._blurMaterial=new Yl,this._blurMaterial.kernelSize=e,this.copyMaterial=new gl}getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(e){this._blurMaterial=e}get dithering(){return this.copyMaterial.dithering}set dithering(e){this.copyMaterial.dithering=e}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(e){this.blurMaterial.kernelSize=e}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get scale(){return this.blurMaterial.scale}set scale(e){this.blurMaterial.scale=e}getScale(){return this.blurMaterial.scale}setScale(e){this.blurMaterial.scale=e}getKernelSize(){return this.kernelSize}setKernelSize(e){this.kernelSize=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,n,r,i){let a=this.scene,o=this.camera,s=this.renderTargetA,c=this.renderTargetB,l=this.blurMaterial,u=l.kernelSequence,d=t;this.fullscreenMaterial=l;for(let t=0,n=u.length;t +#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#ifdef RANGE +uniform vec2 range; +#elif defined(THRESHOLD) +uniform float threshold;uniform float smoothing; +#endif +varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb);float mask=1.0; +#ifdef RANGE +float low=step(range.x,l);float high=step(l,range.y);mask=low*high; +#elif defined(THRESHOLD) +mask=smoothstep(threshold,threshold+smoothing,l); +#endif +#ifdef COLOR +gl_FragColor=texel*mask; +#else +gl_FragColor=vec4(l*mask); +#endif +}`,Ql=class extends Ni{constructor(e=!1,t=null){super({name:`LuminanceMaterial`,defines:{THREE_REVISION:`186`.replace(/\D+/g,``)},uniforms:{inputBuffer:new K(null),threshold:new K(0),smoothing:new K(1),range:new K(null)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Zl,vertexShader:hl}),this.colorOutput=e,this.luminanceRange=t}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get threshold(){return this.uniforms.threshold.value}set threshold(e){this.smoothing>0||e>0?this.defines.THRESHOLD=`1`:delete this.defines.THRESHOLD,this.uniforms.threshold.value=e}getThreshold(){return this.threshold}setThreshold(e){this.threshold=e}get smoothing(){return this.uniforms.smoothing.value}set smoothing(e){this.threshold>0||e>0?this.defines.THRESHOLD=`1`:delete this.defines.THRESHOLD,this.uniforms.smoothing.value=e}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(e){this.smoothing=e}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(e){}get colorOutput(){return this.defines.COLOR!==void 0}set colorOutput(e){e?this.defines.COLOR=`1`:delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(e){return this.colorOutput}setColorOutputEnabled(e){this.colorOutput=e}get useRange(){return this.luminanceRange!==null}set useRange(e){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(e){e===null?delete this.defines.RANGE:this.defines.RANGE=`1`,this.uniforms.range.value=e,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(e){this.luminanceRange=e}},$l=class extends fl{constructor({renderTarget:e,luminanceRange:t,colorOutput:n,resolutionScale:r=1,width:i=Y.AUTO_SIZE,height:a=Y.AUTO_SIZE,resolutionX:o=i,resolutionY:s=a}={}){super(`LuminancePass`),this.fullscreenMaterial=new Ql(n,t),this.needsSwap=!1,this.renderTarget=e,this.renderTarget===void 0&&(this.renderTarget=new W(1,1,{depthBuffer:!1}),this.renderTarget.texture.name=`LuminancePass.Target`);let c=this.resolution=new Y(this,o,s,r);c.addEventListener(`change`,e=>this.setSize(c.baseWidth,c.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(e,t,n,r,i){let a=this.fullscreenMaterial;a.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}initialize(e,t,n){n!==void 0&&n!==1009&&(this.renderTarget.texture.type=n,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH=`1`)}},eu=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#define WEIGHT_INNER 0.125 +#define WEIGHT_OUTER 0.05556 +varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;float clampToBorder(const in vec2 uv){return float(uv.s>=0.0&&uv.s<=1.0&&uv.t>=0.0&&uv.t<=1.0);}void main(){vec4 c=vec4(0.0);vec4 w=WEIGHT_INNER*vec4(clampToBorder(vUv00),clampToBorder(vUv01),clampToBorder(vUv02),clampToBorder(vUv03));c+=w.x*texture2D(inputBuffer,vUv00);c+=w.y*texture2D(inputBuffer,vUv01);c+=w.z*texture2D(inputBuffer,vUv02);c+=w.w*texture2D(inputBuffer,vUv03);w=WEIGHT_OUTER*vec4(clampToBorder(vUv04),clampToBorder(vUv05),clampToBorder(vUv06),clampToBorder(vUv07));c+=w.x*texture2D(inputBuffer,vUv04);c+=w.y*texture2D(inputBuffer,vUv05);c+=w.z*texture2D(inputBuffer,vUv06);c+=w.w*texture2D(inputBuffer,vUv07);w=WEIGHT_OUTER*vec4(clampToBorder(vUv08),clampToBorder(vUv09),clampToBorder(vUv10),clampToBorder(vUv11));c+=w.x*texture2D(inputBuffer,vUv08);c+=w.y*texture2D(inputBuffer,vUv09);c+=w.z*texture2D(inputBuffer,vUv10);c+=w.w*texture2D(inputBuffer,vUv11);c+=WEIGHT_OUTER*texture2D(inputBuffer,vUv);gl_FragColor=c; +#include +}`,tu=`uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;void main(){vUv=position.xy*0.5+0.5;vUv00=vUv+texelSize*vec2(-1.0,1.0);vUv01=vUv+texelSize*vec2(1.0,1.0);vUv02=vUv+texelSize*vec2(-1.0,-1.0);vUv03=vUv+texelSize*vec2(1.0,-1.0);vUv04=vUv+texelSize*vec2(-2.0,2.0);vUv05=vUv+texelSize*vec2(0.0,2.0);vUv06=vUv+texelSize*vec2(2.0,2.0);vUv07=vUv+texelSize*vec2(-2.0,0.0);vUv08=vUv+texelSize*vec2(2.0,0.0);vUv09=vUv+texelSize*vec2(-2.0,-2.0);vUv10=vUv+texelSize*vec2(0.0,-2.0);vUv11=vUv+texelSize*vec2(2.0,-2.0);gl_Position=vec4(position.xy,1.0,1.0);}`,nu=class extends Ni{constructor(){super({name:`DownsamplingMaterial`,uniforms:{inputBuffer:new K(null),texelSize:new K(new V)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:eu,vertexShader:tu})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},ru=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer;uniform mediump sampler2D supportBuffer; +#else +uniform lowp sampler2D inputBuffer;uniform lowp sampler2D supportBuffer; +#endif +uniform float radius;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vec4 c=vec4(0.0);c+=texture2D(inputBuffer,vUv0)*0.0625;c+=texture2D(inputBuffer,vUv1)*0.125;c+=texture2D(inputBuffer,vUv2)*0.0625;c+=texture2D(inputBuffer,vUv3)*0.125;c+=texture2D(inputBuffer,vUv)*0.25;c+=texture2D(inputBuffer,vUv4)*0.125;c+=texture2D(inputBuffer,vUv5)*0.0625;c+=texture2D(inputBuffer,vUv6)*0.125;c+=texture2D(inputBuffer,vUv7)*0.0625;vec4 baseColor=texture2D(supportBuffer,vUv);gl_FragColor=mix(baseColor,c,radius); +#include +}`,iu=`uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}`,au=class extends Ni{constructor(){super({name:`UpsamplingMaterial`,uniforms:{inputBuffer:new K(null),supportBuffer:new K(null),texelSize:new K(new V),radius:new K(.85)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:ru,vertexShader:iu})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}set supportBuffer(e){this.uniforms.supportBuffer.value=e}get radius(){return this.uniforms.radius.value}set radius(e){this.uniforms.radius.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},ou=class extends fl{constructor(){super(`MipmapBlurPass`),this.needsSwap=!1,this.renderTarget=new W(1,1,{depthBuffer:!1}),this.renderTarget.texture.name=`Upsampling.Mipmap0`,this.downsamplingMipmaps=[],this.upsamplingMipmaps=[],this.downsamplingMaterial=new nu,this.upsamplingMaterial=new au,this.resolution=new V}get texture(){return this.renderTarget.texture}get levels(){return this.downsamplingMipmaps.length}set levels(e){if(this.levels!==e){let t=this.renderTarget;this.dispose(),this.downsamplingMipmaps=[],this.upsamplingMipmaps=[];for(let n=0;n=0;--t){let n=u[t];c.setSize(d.width,d.height),c.inputBuffer=d.texture,c.supportBuffer=l[t].texture,e.setRenderTarget(n),e.render(a,o),d=n}}setSize(e,t){let n=this.resolution;n.set(e,t);let r=n.width,i=n.height;for(let e=0,t=this.downsamplingMipmaps.length;ethis.setSize(p.baseWidth,p.baseHeight))}get texture(){return this.mipmapBlurPass.enabled?this.mipmapBlurPass.texture:this.renderTarget.texture}getTexture(){return this.texture}getResolution(){return this.resolution}getBlurPass(){return this.blurPass}getLuminancePass(){return this.luminancePass}get luminanceMaterial(){return this.luminancePass.fullscreenMaterial}getLuminanceMaterial(){return this.luminancePass.fullscreenMaterial}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get dithering(){return this.blurPass.dithering}set dithering(e){this.blurPass.dithering=e}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(e){this.blurPass.kernelSize=e}get distinction(){return console.warn(this.name,`distinction was removed`),1}set distinction(e){console.warn(this.name,`distinction was removed`)}get intensity(){return this.uniforms.get(`intensity`).value}set intensity(e){this.uniforms.get(`intensity`).value=e}getIntensity(){return this.intensity}setIntensity(e){this.intensity=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}update(e,t,n){let r=this.renderTarget,i=this.luminancePass;i.enabled?(i.render(e,t),this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(e,i.renderTarget):this.blurPass.render(e,i.renderTarget,r)):this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(e,t):this.blurPass.render(e,t,r)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height),this.blurPass.resolution.copy(n),this.luminancePass.setSize(e,t),this.mipmapBlurPass.setSize(e,t)}initialize(e,t,n){this.blurPass.initialize(e,t,n),this.luminancePass.initialize(e,t,n),this.mipmapBlurPass.initialize(e,t,n),n!==void 0&&(this.renderTarget.texture.type=n,e!==null&&e.outputColorSpace===`srgb`&&(this.renderTarget.texture.colorSpace=Be))}},lu=`uniform float focus;uniform float dof;uniform float aperture;uniform float maxBlur;void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){vec2 aspectCorrection=vec2(1.0,aspect); +#ifdef PERSPECTIVE_CAMERA +float viewZ=perspectiveDepthToViewZ(depth,cameraNear,cameraFar);float linearDepth=viewZToOrthographicDepth(viewZ,cameraNear,cameraFar); +#else +float linearDepth=depth; +#endif +float focusNear=clamp(focus-dof,0.0,1.0);float focusFar=clamp(focus+dof,0.0,1.0);float low=step(linearDepth,focusNear);float high=step(focusFar,linearDepth);float factor=(linearDepth-focusNear)*low+(linearDepth-focusFar)*high;vec2 dofBlur=vec2(clamp(factor*aperture,-maxBlur,maxBlur));vec2 dofblur9=dofBlur*0.9;vec2 dofblur7=dofBlur*0.7;vec2 dofblur4=dofBlur*0.4;vec4 color=inputColor;color+=texture2D(inputBuffer,uv+(vec2(0.0,0.4)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(0.15,0.37)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(0.29,0.29)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(-0.37,0.15)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(0.40,0.0)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(0.37,-0.15)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(0.29,-0.29)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(-0.15,-0.37)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(0.0,-0.4)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(-0.15,0.37)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(-0.29,0.29)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(0.37,0.15)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(-0.4,0.0)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(-0.37,-0.15)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(-0.29,-0.29)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(0.15,-0.37)*aspectCorrection)*dofBlur);color+=texture2D(inputBuffer,uv+(vec2(0.15,0.37)*aspectCorrection)*dofblur9);color+=texture2D(inputBuffer,uv+(vec2(-0.37,0.15)*aspectCorrection)*dofblur9);color+=texture2D(inputBuffer,uv+(vec2(0.37,-0.15)*aspectCorrection)*dofblur9);color+=texture2D(inputBuffer,uv+(vec2(-0.15,-0.37)*aspectCorrection)*dofblur9);color+=texture2D(inputBuffer,uv+(vec2(-0.15,0.37)*aspectCorrection)*dofblur9);color+=texture2D(inputBuffer,uv+(vec2(0.37,0.15)*aspectCorrection)*dofblur9);color+=texture2D(inputBuffer,uv+(vec2(-0.37,-0.15)*aspectCorrection)*dofblur9);color+=texture2D(inputBuffer,uv+(vec2(0.15,-0.37)*aspectCorrection)*dofblur9);color+=texture2D(inputBuffer,uv+(vec2(0.29,0.29)*aspectCorrection)*dofblur7);color+=texture2D(inputBuffer,uv+(vec2(0.40,0.0)*aspectCorrection)*dofblur7);color+=texture2D(inputBuffer,uv+(vec2(0.29,-0.29)*aspectCorrection)*dofblur7);color+=texture2D(inputBuffer,uv+(vec2(0.0,-0.4)*aspectCorrection)*dofblur7);color+=texture2D(inputBuffer,uv+(vec2(-0.29,0.29)*aspectCorrection)*dofblur7);color+=texture2D(inputBuffer,uv+(vec2(-0.4,0.0)*aspectCorrection)*dofblur7);color+=texture2D(inputBuffer,uv+(vec2(-0.29,-0.29)*aspectCorrection)*dofblur7);color+=texture2D(inputBuffer,uv+(vec2(0.0,0.4)*aspectCorrection)*dofblur7);color+=texture2D(inputBuffer,uv+(vec2(0.29,0.29)*aspectCorrection)*dofblur4);color+=texture2D(inputBuffer,uv+(vec2(0.4,0.0)*aspectCorrection)*dofblur4);color+=texture2D(inputBuffer,uv+(vec2(0.29,-0.29)*aspectCorrection)*dofblur4);color+=texture2D(inputBuffer,uv+(vec2(0.0,-0.4)*aspectCorrection)*dofblur4);color+=texture2D(inputBuffer,uv+(vec2(-0.29,0.29)*aspectCorrection)*dofblur4);color+=texture2D(inputBuffer,uv+(vec2(-0.4,0.0)*aspectCorrection)*dofblur4);color+=texture2D(inputBuffer,uv+(vec2(-0.29,-0.29)*aspectCorrection)*dofblur4);color+=texture2D(inputBuffer,uv+(vec2(0.0,0.4)*aspectCorrection)*dofblur4);outputColor=color/41.0;}`,uu=class extends Hl{constructor({blendFunction:e,focus:t=.5,dof:n=.02,aperture:r=.015,maxBlur:i=1}={}){super(`BokehEffect`,lu,{blendFunction:e,attributes:El.CONVOLUTION|El.DEPTH,uniforms:new Map([[`focus`,new K(t)],[`dof`,new K(n)],[`aperture`,new K(r)],[`maxBlur`,new K(i)]])})}},du=`uniform float brightness;uniform float contrast;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 color=inputColor.rgb+vec3(brightness-0.5);if(contrast>0.0){color/=vec3(1.0-contrast);}else{color*=vec3(1.0+contrast);}outputColor=vec4(color+vec3(0.5),inputColor.a);}`,fu=class extends Hl{constructor({blendFunction:e=X.SRC,brightness:t=0,contrast:n=0}={}){super(`BrightnessContrastEffect`,du,{blendFunction:e,uniforms:new Map([[`brightness`,new K(t)],[`contrast`,new K(n)]])}),this.inputColorSpace=Be}get brightness(){return this.uniforms.get(`brightness`).value}set brightness(e){this.uniforms.get(`brightness`).value=e}getBrightness(){return this.brightness}setBrightness(e){this.brightness=e}get contrast(){return this.uniforms.get(`contrast`).value}set contrast(e){this.uniforms.get(`contrast`).value=e}getContrast(){return this.contrast}setContrast(e){this.contrast=e}},pu=`void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=vec4(vec3(average(inputColor.rgb)),inputColor.a);}`,mu=class extends Hl{constructor(e){super(`ColorAverageEffect`,pu,{blendFunction:e})}},hu=`uniform float factor;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=vec4(floor(inputColor.rgb*factor+0.5)/factor,inputColor.a);}`,gu=class extends Hl{constructor({blendFunction:e,bits:t=16}={}){super(`ColorDepthEffect`,hu,{blendFunction:e,uniforms:new Map([[`factor`,new K(1)]])}),this.bits=0,this.bitDepth=t}get bitDepth(){return this.bits}set bitDepth(e){this.bits=e,this.uniforms.get(`factor`).value=2**(e/3)}getBitDepth(){return this.bitDepth}setBitDepth(e){this.bitDepth=e}},_u=`#ifdef RADIAL_MODULATION +uniform float modulationOffset; +#endif +varying float vActive;varying vec2 vUvR;varying vec2 vUvB;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 ra=inputColor.ra;vec2 ba=inputColor.ba; +#ifdef RADIAL_MODULATION +const vec2 center=vec2(0.5);float d=distance(uv,center)*2.0;d=max(d-modulationOffset,0.0);if(vActive>0.0&&d>0.0){ra=texture2D(inputBuffer,mix(uv,vUvR,d)).ra;ba=texture2D(inputBuffer,mix(uv,vUvB,d)).ba;} +#else +if(vActive>0.0){ra=texture2D(inputBuffer,vUvR).ra;ba=texture2D(inputBuffer,vUvB).ba;} +#endif +outputColor=vec4(ra.x,inputColor.g,ba.x,max(max(ra.y,ba.y),inputColor.a));}`,vu=`uniform vec2 offset;varying float vActive;varying vec2 vUvR;varying vec2 vUvB;void mainSupport(const in vec2 uv){vec2 shift=offset*vec2(1.0,aspect);vActive=(shift.x!=0.0||shift.y!=0.0)?1.0:0.0;vUvR=uv+shift;vUvB=uv-shift;}`,yu=class extends Hl{constructor({offset:e=new V(.001,5e-4),radialModulation:t=!1,modulationOffset:n=.15}={}){super(`ChromaticAberrationEffect`,_u,{vertexShader:vu,attributes:El.CONVOLUTION,uniforms:new Map([[`offset`,new K(e)],[`modulationOffset`,new K(n)]])}),this.radialModulation=t}get offset(){return this.uniforms.get(`offset`).value}set offset(e){this.uniforms.get(`offset`).value=e}get radialModulation(){return this.defines.has(`RADIAL_MODULATION`)}set radialModulation(e){e?this.defines.set(`RADIAL_MODULATION`,`1`):this.defines.delete(`RADIAL_MODULATION`),this.setChanged()}get modulationOffset(){return this.uniforms.get(`modulationOffset`).value}set modulationOffset(e){this.uniforms.get(`modulationOffset`).value=e}getOffset(){return this.offset}setOffset(e){this.offset=e}},bu=`void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){ +#ifdef INVERTED +vec3 color=vec3(1.0-depth); +#else +vec3 color=vec3(depth); +#endif +outputColor=vec4(color,inputColor.a);}`,xu=class extends Hl{constructor({blendFunction:e=X.SRC,inverted:t=!1}={}){super(`DepthEffect`,bu,{blendFunction:e,attributes:El.DEPTH}),this.inverted=t}get inverted(){return this.defines.has(`INVERTED`)}set inverted(e){this.inverted!==e&&(e?this.defines.set(`INVERTED`,`1`):this.defines.delete(`INVERTED`),this.setChanged())}isInverted(){return this.inverted}setInverted(e){this.inverted=e}},Su={RED:0,GREEN:1,BLUE:2,ALPHA:3},Cu={DISCARD:0,MULTIPLY:1,MULTIPLY_RGB_SET_ALPHA:2,MULTIPLY_RGB:3},wu=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#if PASS == 1 +uniform vec4 kernel64[32]; +#else +uniform vec4 kernel16[8]; +#endif +uniform lowp sampler2D cocBuffer;uniform vec2 texelSize;uniform float scale;varying vec2 vUv;void main(){ +#ifdef FOREGROUND +vec2 cocNearFar=texture2D(cocBuffer,vUv).rg*scale;float coc=cocNearFar.x; +#else +float coc=texture2D(cocBuffer,vUv).g*scale; +#endif +if(coc==0.0){gl_FragColor=texture2D(inputBuffer,vUv);}else{ +#ifdef FOREGROUND +vec2 step=texelSize*max(cocNearFar.x,cocNearFar.y); +#else +vec2 step=texelSize*coc; +#endif +#if PASS == 1 +vec4 acc=vec4(0.0);for(int i=0;i<32;++i){vec4 kernel=kernel64[i];vec2 uv=step*kernel.xy+vUv;acc+=texture2D(inputBuffer,uv);uv=step*kernel.zw+vUv;acc+=texture2D(inputBuffer,uv);}gl_FragColor=acc/64.0; +#else +vec4 maxValue=texture2D(inputBuffer,vUv);for(int i=0;i<8;++i){vec4 kernel=kernel16[i];vec2 uv=step*kernel.xy+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);uv=step*kernel.zw+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);}gl_FragColor=maxValue; +#endif +}}`,Tu=class extends Ni{constructor(e=!1,t=!1){super({name:`BokehMaterial`,defines:{PASS:e?`2`:`1`},uniforms:{inputBuffer:new K(null),cocBuffer:new K(null),texelSize:new K(new V),kernel64:new K(null),kernel16:new K(null),scale:new K(1)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:wu,vertexShader:hl}),t&&(this.defines.FOREGROUND=`1`),this.generateKernel()}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}set cocBuffer(e){this.uniforms.cocBuffer.value=e}setCoCBuffer(e){this.uniforms.cocBuffer.value=e}get scale(){return this.uniforms.scale.value}set scale(e){this.uniforms.scale.value=e}getScale(e){return this.scale}setScale(e){this.scale=e}generateKernel(){let e=new Float64Array(128),t=new Float64Array(32),n=0,r=0;for(let i=0,a=Math.sqrt(80);i<80;++i){let o=i*2.39996323,s=Math.sqrt(i)/a,c=s*Math.cos(o),l=s*Math.sin(o);i%5==0?(t[r++]=c,t[r++]=l):(e[n++]=c,e[n++]=l)}this.uniforms.kernel64.value=e,this.uniforms.kernel16.value=t}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},Eu=`#include +#include +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +uniform mat4 projectionMatrix;uniform mat4 projectionMatrixInverse;uniform float cameraNear;uniform float cameraFar;uniform float focusDistance;uniform float focusRange;varying vec2 vUv;float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +float depth=unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +float depth=texture2D(depthBuffer,uv).r; +#endif +#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH) +float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d; +#elif defined(USE_REVERSED_DEPTH_BUFFER) +depth=1.0-depth; +#endif +return depth;} +#ifdef PERSPECTIVE_CAMERA +#define getViewZ(depth) perspectiveDepthToViewZ(depth, cameraNear, cameraFar) +#else +#define getViewZ(depth) orthographicDepthToViewZ(depth, cameraNear, cameraFar) +#endif +vec3 getViewPosition(const in vec2 screenPosition,const in float depth,const in float viewZ){vec4 clipPosition=vec4(vec3(screenPosition,depth)*2.0-1.0,1.0);float clipW=projectionMatrix[2][3]*viewZ+projectionMatrix[3][3];clipPosition*=clipW;return(projectionMatrixInverse*clipPosition).xyz;}vec3 getViewPosition(const in vec2 screenPosition,const in float depth){return getViewPosition(screenPosition,depth,getViewZ(depth));} +#define getDistance(viewPosition) length(viewPosition) +void main(){float depth=readDepth(vUv);vec3 viewPosition=getViewPosition(vUv,depth);float distance=getDistance(viewPosition);float signedDistance=distance-focusDistance;float magnitude=smoothstep(0.0,focusRange,abs(signedDistance));gl_FragColor.rg=magnitude*vec2(step(signedDistance,0.0),step(0.0,signedDistance));}`,Du=class extends Ni{constructor(e=null){super({name:`CircleOfConfusionMaterial`,defines:{DEPTH_PACKING:`0`},uniforms:{depthBuffer:new K(null),projectionMatrix:new K(null),projectionMatrixInverse:new K(null),cameraNear:new K(.3),cameraFar:new K(1e3),focusDistance:new K(0),focusRange:new K(0)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Eu,vertexShader:hl}),this.uniforms.focalLength=this.uniforms.focusRange,e!==null&&this.copyCameraSettings(e)}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=L){this.depthBuffer=e,this.depthPacking=t}get focusDistance(){return this.uniforms.focusDistance.value}set focusDistance(e){this.uniforms.focusDistance.value=e}get worldFocusDistance(){return this.focusDistance}set worldFocusDistance(e){this.focusDistance=e}getFocusDistance(e){this.uniforms.focusDistance.value=e}setFocusDistance(e){this.uniforms.focusDistance.value=e}get focalLength(){return this.focusRange}set focalLength(e){this.focusRange=e}get focusRange(){return this.uniforms.focusRange.value}set focusRange(e){this.uniforms.focusRange.value=e}get worldFocusRange(){return this.focusRange}set worldFocusRange(e){this.focusRange=e}getFocalLength(e){return this.focusRange}setFocalLength(e){this.focusRange=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){this.uniforms.projectionMatrix.value=e.projectionMatrix,this.uniforms.projectionMatrixInverse.value=e.projectionMatrixInverse,this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far;let t=this.defines.PERSPECTIVE_CAMERA!==void 0;e instanceof va?t||(this.defines.PERSPECTIVE_CAMERA=!0,this.needsUpdate=!0):t&&(delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},Ou=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#ifdef MASK_PRECISION_HIGH +uniform mediump sampler2D maskTexture; +#else +uniform lowp sampler2D maskTexture; +#endif +#if MASK_FUNCTION != 0 +uniform float strength; +#endif +varying vec2 vUv;void main(){ +#if COLOR_CHANNEL == 0 +float mask=texture2D(maskTexture,vUv).r; +#elif COLOR_CHANNEL == 1 +float mask=texture2D(maskTexture,vUv).g; +#elif COLOR_CHANNEL == 2 +float mask=texture2D(maskTexture,vUv).b; +#else +float mask=texture2D(maskTexture,vUv).a; +#endif +#if MASK_FUNCTION == 0 +#ifdef INVERTED +mask=(mask>0.0)?0.0:1.0; +#else +mask=(mask>0.0)?1.0:0.0; +#endif +#else +mask=clamp(mask*strength,0.0,1.0); +#ifdef INVERTED +mask=1.0-mask; +#endif +#endif +#if MASK_FUNCTION == 3 +vec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=vec4(mask*texel.rgb,texel.a); +#elif MASK_FUNCTION == 2 +gl_FragColor=vec4(mask*texture2D(inputBuffer,vUv).rgb,mask); +#else +gl_FragColor=mask*texture2D(inputBuffer,vUv); +#endif +}`,ku=class extends Ni{constructor(e=null){super({name:`MaskMaterial`,uniforms:{maskTexture:new K(e),inputBuffer:new K(null),strength:new K(1)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Ou,vertexShader:hl}),this.colorChannel=Su.RED,this.maskFunction=Cu.DISCARD}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}set maskTexture(e){this.uniforms.maskTexture.value=e,delete this.defines.MASK_PRECISION_HIGH,e.type!==1009&&(this.defines.MASK_PRECISION_HIGH=`1`),this.needsUpdate=!0}setMaskTexture(e){this.maskTexture=e}set colorChannel(e){this.defines.COLOR_CHANNEL=e.toFixed(0),this.needsUpdate=!0}setColorChannel(e){this.colorChannel=e}set maskFunction(e){this.defines.MASK_FUNCTION=e.toFixed(0),this.needsUpdate=!0}setMaskFunction(e){this.maskFunction=e}get inverted(){return this.defines.INVERTED!==void 0}set inverted(e){this.inverted&&!e?delete this.defines.INVERTED:e&&(this.defines.INVERTED=`1`),this.needsUpdate=!0}isInverted(){return this.inverted}setInverted(e){this.inverted=e}get strength(){return this.uniforms.strength.value}set strength(e){this.uniforms.strength.value=e}getStrength(){return this.strength}setStrength(e){this.strength=e}},Au=class extends fl{constructor(e,t=`inputBuffer`){super(`ShaderPass`),this.fullscreenMaterial=e,this.input=t}setInput(e){this.input=e}render(e,t,n,r,i){let a=this.fullscreenMaterial.uniforms;t!==null&&a!==void 0&&a[this.input]!==void 0&&(a[this.input].value=t.texture),e.setRenderTarget(this.renderToScreen?null:n),e.render(this.scene,this.camera)}initialize(e,t,n){n!==void 0&&n!==1009&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH=`1`)}},ju=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D nearColorBuffer;uniform mediump sampler2D farColorBuffer; +#else +uniform lowp sampler2D nearColorBuffer;uniform lowp sampler2D farColorBuffer; +#endif +#if MASK_FUNCTION != 1 && MASK_FUNCTION != 2 +uniform lowp sampler2D farCoCBuffer; +#endif +uniform lowp sampler2D nearCoCBuffer;uniform float scale;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 colorNear=texture2D(nearColorBuffer,uv);vec4 colorFar=texture2D(farColorBuffer,uv); +#if MASK_FUNCTION == 1 || MASK_FUNCTION == 2 +vec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,colorFar.a);cocNearFar.x=min(cocNearFar.x*scale,1.0); +#else +vec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,texture2D(farCoCBuffer,uv).g);cocNearFar=min(cocNearFar*scale,1.0);colorFar.a*=cocNearFar.y; +#endif +vec4 result=inputColor*(1.0-cocNearFar.y)+colorFar;result=mix(result,colorNear,cocNearFar.x);outputColor=result;}`,Mu=new H,Nu=class extends Hl{constructor(e,{blendFunction:t,worldFocusDistance:n,worldFocusRange:r,focalLength:i,focusDistance:a=n||3,focusRange:o=r||i||2,bokehScale:s=1,resolutionScale:c=.5,width:l,height:u,resolutionX:d=l||Y.AUTO_SIZE,resolutionY:f=u||Y.AUTO_SIZE}={}){super(`DepthOfFieldEffect`,ju,{blendFunction:t,attributes:El.DEPTH,uniforms:new Map([[`nearColorBuffer`,new K(null)],[`farColorBuffer`,new K(null)],[`nearCoCBuffer`,new K(null)],[`farCoCBuffer`,new K(null)],[`scale`,new K(1)]])}),this.camera=e,this.renderTarget=new W(1,1,{depthBuffer:!1}),this.renderTarget.texture.name=`DoF.Intermediate`,this.renderTargetMasked=this.renderTarget.clone(),this.renderTargetMasked.texture.name=`DoF.Masked.Far`,this.renderTargetNear=this.renderTarget.clone(),this.renderTargetNear.texture.name=`DoF.Bokeh.Near`,this.uniforms.get(`nearColorBuffer`).value=this.renderTargetNear.texture,this.renderTargetFar=this.renderTarget.clone(),this.renderTargetFar.texture.name=`DoF.Bokeh.Far`,this.uniforms.get(`farColorBuffer`).value=this.renderTargetFar.texture,this.renderTargetCoC=this.renderTarget.clone(),this.renderTargetCoC.texture.name=`DoF.CoC`,this.uniforms.get(`farCoCBuffer`).value=this.renderTargetCoC.texture,this.renderTargetCoCBlurred=this.renderTargetCoC.clone(),this.renderTargetCoCBlurred.texture.name=`DoF.CoC.Blurred`,this.uniforms.get(`nearCoCBuffer`).value=this.renderTargetCoCBlurred.texture,this.cocPass=new Au(new Du(e));let p=this.cocMaterial;p.focusDistance=a,p.focusRange=o,this.blurPass=new Xl({resolutionScale:c,resolutionX:d,resolutionY:f,kernelSize:Gl.MEDIUM}),this.maskPass=new Au(new ku(this.renderTargetCoC.texture));let m=this.maskPass.fullscreenMaterial;m.colorChannel=Su.GREEN,this.maskFunction=Cu.MULTIPLY_RGB,this.bokehNearBasePass=new Au(new Tu(!1,!0)),this.bokehNearBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehNearFillPass=new Au(new Tu(!0,!0)),this.bokehNearFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehFarBasePass=new Au(new Tu(!1,!1)),this.bokehFarBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.bokehFarFillPass=new Au(new Tu(!0,!1)),this.bokehFarFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.target=null;let h=this.resolution=new Y(this,d,f,c);h.addEventListener(`change`,e=>this.setSize(h.baseWidth,h.baseHeight)),this.bokehScale=s}set mainCamera(e){this.camera=e,this.cocMaterial.copyCameraSettings(e)}get cocTexture(){return this.renderTargetCoC.texture}get maskFunction(){return this.maskPass.fullscreenMaterial.maskFunction}set maskFunction(e){this.maskFunction!==e&&(this.defines.set(`MASK_FUNCTION`,e.toFixed(0)),this.maskPass.fullscreenMaterial.maskFunction=e,this.setChanged())}get cocMaterial(){return this.cocPass.fullscreenMaterial}get circleOfConfusionMaterial(){return this.cocMaterial}getCircleOfConfusionMaterial(){return this.cocMaterial}getBlurPass(){return this.blurPass}getResolution(){return this.resolution}get bokehScale(){return this.uniforms.get(`scale`).value}set bokehScale(e){this.bokehNearBasePass.fullscreenMaterial.scale=e,this.bokehNearFillPass.fullscreenMaterial.scale=e,this.bokehFarBasePass.fullscreenMaterial.scale=e,this.bokehFarFillPass.fullscreenMaterial.scale=e,this.maskPass.fullscreenMaterial.strength=e,this.uniforms.get(`scale`).value=e}getBokehScale(){return this.bokehScale}setBokehScale(e){this.bokehScale=e}getTarget(){return this.target}setTarget(e){this.target=e}calculateFocusDistance(e){return this.camera.getWorldPosition(Mu).distanceTo(e)}setDepthTexture(e,t=L){this.cocMaterial.depthBuffer=e,this.cocMaterial.depthPacking=t}update(e,t,n){let r=this.renderTarget,i=this.renderTargetCoC,a=this.renderTargetCoCBlurred,o=this.renderTargetMasked;if(this.target!==null){let e=this.calculateFocusDistance(this.target);this.cocMaterial.focusDistance=e}this.cocPass.render(e,null,i),this.blurPass.render(e,i,a),this.maskPass.render(e,t,o),this.bokehFarBasePass.render(e,o,r),this.bokehFarFillPass.render(e,r,this.renderTargetFar),this.bokehNearBasePass.render(e,t,r),this.bokehNearFillPass.render(e,r,this.renderTargetNear)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t);let r=n.width,i=n.height;this.cocPass.setSize(e,t),this.blurPass.setSize(e,t),this.maskPass.setSize(e,t),this.renderTargetFar.setSize(e,t),this.renderTargetCoC.setSize(e,t),this.renderTargetMasked.setSize(e,t),this.renderTarget.setSize(r,i),this.renderTargetNear.setSize(r,i),this.renderTargetCoCBlurred.setSize(r,i),this.bokehNearBasePass.fullscreenMaterial.setSize(e,t),this.bokehNearFillPass.fullscreenMaterial.setSize(e,t),this.bokehFarBasePass.fullscreenMaterial.setSize(e,t),this.bokehFarFillPass.fullscreenMaterial.setSize(e,t)}initialize(e,t,n){this.cocPass.initialize(e,t,n),this.maskPass.initialize(e,t,n),this.bokehNearBasePass.initialize(e,t,n),this.bokehNearFillPass.initialize(e,t,n),this.bokehFarBasePass.initialize(e,t,n),this.bokehFarFillPass.initialize(e,t,n),this.blurPass.initialize(e,t,u),e.capabilities.logarithmicDepthBuffer&&(this.cocPass.fullscreenMaterial.defines.LOG_DEPTH=`1`),n!==void 0&&(this.renderTarget.texture.type=n,this.renderTargetNear.texture.type=n,this.renderTargetFar.texture.type=n,this.renderTargetMasked.texture.type=n,e!==null&&e.outputColorSpace===`srgb`&&(this.renderTarget.texture.colorSpace=Be,this.renderTargetNear.texture.colorSpace=Be,this.renderTargetFar.texture.colorSpace=Be,this.renderTargetMasked.texture.colorSpace=Be))}},Pu=`uniform vec2 angle;uniform float scale;float pattern(const in vec2 uv){vec2 point=scale*vec2(dot(angle.yx,vec2(uv.x,-uv.y)),dot(angle,uv));return(sin(point.x)*sin(point.y))*4.0;}void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 color=vec3(inputColor.rgb*10.0-5.0+pattern(uv*resolution));outputColor=vec4(color,inputColor.a);}`,Fu=class extends Hl{constructor({blendFunction:e,angle:t=Math.PI*.5,scale:n=1}={}){super(`DotScreenEffect`,Pu,{blendFunction:e,uniforms:new Map([[`angle`,new K(new V)],[`scale`,new K(n)]])}),this.angle=t}get angle(){return Math.acos(this.uniforms.get(`angle`).value.y)}set angle(e){this.uniforms.get(`angle`).value.set(Math.sin(e),Math.cos(e))}getAngle(){return this.angle}setAngle(e){this.angle=e}get scale(){return this.uniforms.get(`scale`).value}set scale(e){this.uniforms.get(`scale`).value=e}},Iu=`#define QUALITY(q) ((q) < 5 ? 1.0 : ((q) > 5 ? ((q) < 10 ? 2.0 : ((q) < 11 ? 4.0 : 8.0)) : 1.5)) +#define ONE_OVER_TWELVE 0.08333333333333333 +varying vec2 vUvDown;varying vec2 vUvUp;varying vec2 vUvLeft;varying vec2 vUvRight;varying vec2 vUvDownLeft;varying vec2 vUvUpRight;varying vec2 vUvUpLeft;varying vec2 vUvDownRight;vec4 fxaa(const in vec4 inputColor,const in vec2 uv){float lumaCenter=luminance(inputColor.rgb);float lumaDown=luminance(texture2D(inputBuffer,vUvDown).rgb);float lumaUp=luminance(texture2D(inputBuffer,vUvUp).rgb);float lumaLeft=luminance(texture2D(inputBuffer,vUvLeft).rgb);float lumaRight=luminance(texture2D(inputBuffer,vUvRight).rgb);float lumaMin=min(lumaCenter,min(min(lumaDown,lumaUp),min(lumaLeft,lumaRight)));float lumaMax=max(lumaCenter,max(max(lumaDown,lumaUp),max(lumaLeft,lumaRight)));float lumaRange=lumaMax-lumaMin;if(lumaRange=edgeVertical);float stepLength=isHorizontal?texelSize.y:texelSize.x;float luma1=isHorizontal?lumaDown:lumaLeft;float luma2=isHorizontal?lumaUp:lumaRight;float gradient1=abs(luma1-lumaCenter);float gradient2=abs(luma2-lumaCenter);bool is1Steepest=gradient1>=gradient2;float gradientScaled=0.25*max(gradient1,gradient2);float lumaLocalAverage=0.0;if(is1Steepest){stepLength=-stepLength;lumaLocalAverage=0.5*(luma1+lumaCenter);}else{lumaLocalAverage=0.5*(luma2+lumaCenter);}vec2 currentUv=uv;if(isHorizontal){currentUv.y+=stepLength*0.5;}else{currentUv.x+=stepLength*0.5;}vec2 offset=isHorizontal?vec2(texelSize.x,0.0):vec2(0.0,texelSize.y);vec2 uv1=currentUv-offset*QUALITY(0);vec2 uv2=currentUv+offset*QUALITY(0);float lumaEnd1=luminance(texture2D(inputBuffer,uv1).rgb);float lumaEnd2=luminance(texture2D(inputBuffer,uv2).rgb);lumaEnd1-=lumaLocalAverage;lumaEnd2-=lumaLocalAverage;bool reached1=abs(lumaEnd1)>=gradientScaled;bool reached2=abs(lumaEnd2)>=gradientScaled;bool reachedBoth=reached1&&reached2;if(!reached1){uv1-=offset*QUALITY(1);}if(!reached2){uv2+=offset*QUALITY(1);}if(!reachedBoth){for(int i=2;i=gradientScaled;reached2=abs(lumaEnd2)>=gradientScaled;reachedBoth=reached1&&reached2;if(!reached1){uv1-=offset*QUALITY(i);}if(!reached2){uv2+=offset*QUALITY(i);}if(reachedBoth){break;}}}float distance1=isHorizontal?(uv.x-uv1.x):(uv.y-uv1.y);float distance2=isHorizontal?(uv2.x-uv.x):(uv2.y-uv.y);bool isDirection1=distance1distortion.x-columns*random){float sx=clamp(ceil(seeds.x),0.0,1.0);uv.y=sx*(1.0-(uv.y+distortion.y))+(1.0-sx)*distortion.y;}if(uv.xdistortion.y-columns*random){float sy=clamp(ceil(seeds.y),0.0,1.0);uv.x=sy*distortion.x+(1.0-sy)*(1.0-(uv.x+distortion.x));}vec2 normal=texture2D(perturbationMap,uv*random*random).rg;uv+=normal*seeds*(random*0.2);}}`,Gu=`Glitch.Generated`;function Ku(e,t){return e+Math.random()*(t-e)}var qu=class extends Hl{constructor({chromaticAberrationOffset:e=null,delay:t=new V(1.5,3.5),duration:n=new V(.6,1),strength:r=new V(.3,1),columns:i=.05,ratio:a=.85,perturbationMap:o=null,dtSize:s=64}={}){if(super(`GlitchEffect`,Wu,{uniforms:new Map([[`perturbationMap`,new K(null)],[`columns`,new K(i)],[`active`,new K(!1)],[`random`,new K(1)],[`seeds`,new K(new V)],[`distortion`,new K(new V)]])}),o===null){let e=new Uu(s,s,T);e.name=Gu,this.perturbationMap=e}else this.perturbationMap=o;this.time=0,this.distortion=this.uniforms.get(`distortion`).value,this.delay=t,this.duration=n,this.breakPoint=new V(Ku(this.delay.x,this.delay.y),Ku(this.duration.x,this.duration.y)),this.strength=r,this.mode=Vu.SPORADIC,this.ratio=a,this.chromaticAberrationOffset=e}get seeds(){return this.uniforms.get(`seeds`).value}get active(){return this.uniforms.get(`active`).value}isActive(){return this.active}get minDelay(){return this.delay.x}set minDelay(e){this.delay.x=e}getMinDelay(){return this.delay.x}setMinDelay(e){this.delay.x=e}get maxDelay(){return this.delay.y}set maxDelay(e){this.delay.y=e}getMaxDelay(){return this.delay.y}setMaxDelay(e){this.delay.y=e}get minDuration(){return this.duration.x}set minDuration(e){this.duration.x=e}getMinDuration(){return this.duration.x}setMinDuration(e){this.duration.x=e}get maxDuration(){return this.duration.y}set maxDuration(e){this.duration.y=e}getMaxDuration(){return this.duration.y}setMaxDuration(e){this.duration.y=e}get minStrength(){return this.strength.x}set minStrength(e){this.strength.x=e}getMinStrength(){return this.strength.x}setMinStrength(e){this.strength.x=e}get maxStrength(){return this.strength.y}set maxStrength(e){this.strength.y=e}getMaxStrength(){return this.strength.y}setMaxStrength(e){this.strength.y=e}getMode(){return this.mode}setMode(e){this.mode=e}getGlitchRatio(){return 1-this.ratio}setGlitchRatio(e){this.ratio=Math.min(Math.max(1-e,0),1)}get columns(){return this.uniforms.get(`columns`).value}set columns(e){this.uniforms.get(`columns`).value=e}getGlitchColumns(){return this.columns}setGlitchColumns(e){this.columns=e}getChromaticAberrationOffset(){return this.chromaticAberrationOffset}setChromaticAberrationOffset(e){this.chromaticAberrationOffset=e}get perturbationMap(){return this.uniforms.get(`perturbationMap`).value}set perturbationMap(e){let n=this.perturbationMap;n!==null&&n.name===Gu&&n.dispose(),e.minFilter=e.magFilter=i,e.wrapS=e.wrapT=t,e.generateMipmaps=!1,this.uniforms.get(`perturbationMap`).value=e}getPerturbationMap(){return this.perturbationMap}setPerturbationMap(e){this.perturbationMap=e}generatePerturbationMap(e=64){let t=new Uu(e,e,T);return t.name=Gu,t}update(e,t,n){let r=this.mode,i=this.breakPoint,a=this.chromaticAberrationOffset,o=this.strength,s=this.time,c=!1,l=0,u=0,d;r!==Vu.DISABLED&&(r===Vu.SPORADIC&&(s+=n,d=s>i.x,s>=i.x+i.y&&(i.set(Ku(this.delay.x,this.delay.y),Ku(this.duration.x,this.duration.y)),s=0)),l=Math.random(),this.uniforms.get(`random`).value=l,d&&l>this.ratio||r===Vu.CONSTANT_WILD?(c=!0,l*=o.y*.03,u=Ku(-Math.PI,Math.PI),this.seeds.set(Ku(-o.y,o.y),Ku(-o.y,o.y)),this.distortion.set(Ku(0,1),Ku(0,1))):(d||r===Vu.CONSTANT_MILD)&&(c=!0,l*=o.x*.03,u=Ku(-Math.PI,Math.PI),this.seeds.set(Ku(-o.x,o.x),Ku(-o.x,o.x)),this.distortion.set(Ku(0,1),Ku(0,1))),this.time=s),a!==null&&(c?a.set(Math.cos(u),Math.sin(u)).multiplyScalar(l):a.set(0,0)),this.uniforms.get(`active`).value=c}dispose(){let e=this.perturbationMap;e!==null&&e.name===Gu&&e.dispose()}},Ju=`#include +#include +#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +uniform vec2 lightPosition;uniform float exposure;uniform float decay;uniform float density;uniform float weight;uniform float clampMax;varying vec2 vUv;void main(){vec2 coord=vUv;vec2 delta=lightPosition-coord;delta*=1.0/SAMPLES_FLOAT*density;float illuminationDecay=1.0;vec4 color=vec4(0.0);for(int i=0;i +}`,Yu=class extends Ni{constructor(e){super({name:`GodRaysMaterial`,defines:{SAMPLES_INT:`60`,SAMPLES_FLOAT:`60.0`},uniforms:{inputBuffer:new K(null),lightPosition:new K(e),density:new K(1),decay:new K(1),weight:new K(1),exposure:new K(1),clampMax:new K(1)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Ju,vertexShader:hl})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get lightPosition(){return this.uniforms.lightPosition.value}getLightPosition(){return this.uniforms.lightPosition.value}setLightPosition(e){this.uniforms.lightPosition.value=e}get density(){return this.uniforms.density.value}set density(e){this.uniforms.density.value=e}getDensity(){return this.uniforms.density.value}setDensity(e){this.uniforms.density.value=e}get decay(){return this.uniforms.decay.value}set decay(e){this.uniforms.decay.value=e}getDecay(){return this.uniforms.decay.value}setDecay(e){this.uniforms.decay.value=e}get weight(){return this.uniforms.weight.value}set weight(e){this.uniforms.weight.value=e}getWeight(){return this.uniforms.weight.value}setWeight(e){this.uniforms.weight.value=e}get exposure(){return this.uniforms.exposure.value}set exposure(e){this.uniforms.exposure.value=e}getExposure(){return this.uniforms.exposure.value}setExposure(e){this.uniforms.exposure.value=e}get maxIntensity(){return this.uniforms.clampMax.value}set maxIntensity(e){this.uniforms.clampMax.value=e}getMaxIntensity(){return this.uniforms.clampMax.value}setMaxIntensity(e){this.uniforms.clampMax.value=e}get samples(){return Number(this.defines.SAMPLES_INT)}set samples(e){let t=Math.floor(e);this.defines.SAMPLES_INT=t.toFixed(0),this.defines.SAMPLES_FLOAT=t.toFixed(1),this.needsUpdate=!0}getSamples(){return this.samples}setSamples(e){this.samples=e}},Xu=class extends fl{constructor(e,t,n=null){super(`RenderPass`,e,t),this.needsSwap=!1,this.needsDepthBlit=!0,this.clearPass=new yl,this.overrideMaterialManager=n===null?null:new Pl(n),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get renderToScreen(){return super.renderToScreen}set renderToScreen(e){super.renderToScreen=e,this.clearPass.renderToScreen=e}get overrideMaterial(){let e=this.overrideMaterialManager;return e===null?null:e.material}set overrideMaterial(e){let t=this.overrideMaterialManager;e===null?t!==null&&(t.dispose(),this.overrideMaterialManager=null):t===null?this.overrideMaterialManager=new Pl(e):t.setMaterial(e)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(e){this.overrideMaterial=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getSelection(){return this.selection}setSelection(e){this.selection=e}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(e){this.ignoreBackground=e}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(e){this.skipShadowMapUpdate=e}getClearPass(){return this.clearPass}render(e,t,n,r,i){let a=this.scene,o=this.camera,s=this.selection,c=o.layers.mask,l=a.background,u=e.shadowMap.autoUpdate,d=this.renderToScreen?null:t;s!==null&&o.layers.set(s.getLayer()),this.skipShadowMapUpdate&&(e.shadowMap.autoUpdate=!1),(this.ignoreBackground||this.clearPass.overrideClearColor!==null)&&(a.background=null),this.clearPass.enabled&&this.clearPass.render(e,t),e.setRenderTarget(d),this.overrideMaterialManager===null?e.render(a,o):this.overrideMaterialManager.render(e,a,o),o.layers.mask=c,a.background=l,e.shadowMap.autoUpdate=u}},Zu=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D map; +#else +uniform lowp sampler2D map; +#endif +void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv);}`,Qu=new H,$u=new It,ed=class extends Hl{constructor(e,t,{blendFunction:n=X.SCREEN,samples:r=60,density:i=.96,decay:a=.9,weight:o=.4,exposure:s=.6,clampMax:c=1,blur:l=!0,kernelSize:u=Gl.SMALL,resolutionScale:d=.5,width:f=Y.AUTO_SIZE,height:p=Y.AUTO_SIZE,resolutionX:m=f,resolutionY:h=p}={}){super(`GodRaysEffect`,Zu,{blendFunction:n,attributes:El.DEPTH,uniforms:new Map([[`map`,new K(null)]])}),this.camera=e,this._lightSource=t,this.lightSource=t,this.lightScene=new yn,this.screenPosition=new V,this.renderTargetA=new W(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name=`GodRays.Target.A`,this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name=`GodRays.Target.B`,this.uniforms.get(`map`).value=this.renderTargetB.texture,this.renderTargetLight=new W(1,1),this.renderTargetLight.texture.name=`GodRays.Light`,this.renderTargetLight.depthTexture=new mi,this.renderPassLight=new Xu(this.lightScene,e),this.renderPassLight.clearPass.enabled=!1,this.blurPass=new Xl({kernelSize:u}),this.blurPass.enabled=l,this.copyPass=new _l(this.renderTargetLight),this.copyPass.fullscreenMaterial.channelWeights=new Mt(0,0,0,1),this.godRaysPass=new Au(new Yu(this.screenPosition));let g=this.godRaysMaterial;g.density=i,g.decay=a,g.weight=o,g.exposure=s,g.maxIntensity=c,g.samples=r;let _=this.resolution=new Y(this,m,h,d);_.addEventListener(`change`,e=>this.setSize(_.baseWidth,_.baseHeight))}set mainCamera(e){this.camera=e,this.renderPassLight.mainCamera=e}get lightSource(){return this._lightSource}set lightSource(e){this._lightSource=e,e!==null&&(e.material.depthWrite=!1,e.material.transparent=!0)}getBlurPass(){return this.blurPass}get texture(){return this.renderTargetB.texture}getTexture(){return this.texture}get godRaysMaterial(){return this.godRaysPass.fullscreenMaterial}getGodRaysMaterial(){return this.godRaysMaterial}getResolution(){return this.resolution}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get dithering(){return this.godRaysMaterial.dithering}set dithering(e){let t=this.godRaysMaterial;t.dithering=e,t.needsUpdate=!0}get blur(){return this.blurPass.enabled}set blur(e){this.blurPass.enabled=e}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(e){this.blurPass.kernelSize=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}get samples(){return this.godRaysMaterial.samples}set samples(e){this.godRaysMaterial.samples=e}setDepthTexture(e,t=L){this.copyPass.fullscreenMaterial.depthBuffer=e,this.copyPass.fullscreenMaterial.depthPacking=t}update(e,t,n){let r=this.lightSource,i=r.parent,a=r.matrixAutoUpdate,o=this.renderTargetA,s=this.renderTargetLight;r.material.depthWrite=!0,r.matrixAutoUpdate=!1,r.updateWorldMatrix(!0,!1),i!==null&&(a||$u.copy(r.matrix),r.matrix.copy(r.matrixWorld)),this.lightScene.add(r),this.copyPass.render(e,t),this.renderPassLight.render(e,s),r.material.depthWrite=!1,r.matrixAutoUpdate=a,i!==null&&(a||r.matrix.copy($u),i.add(r)),Qu.setFromMatrixPosition(r.matrixWorld).project(this.camera),this.screenPosition.set(Math.min(Math.max((Qu.x+1)*.5,-1),2),Math.min(Math.max((Qu.y+1)*.5,-1),2));let c=s;this.blurPass.enabled&&(this.blurPass.render(e,c,o),c=o),this.godRaysPass.render(e,c,this.renderTargetB)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t);let r=n.width,i=n.height;this.renderTargetLight.setSize(e,t),this.renderTargetA.setSize(r,i),this.renderTargetB.setSize(r,i),this.blurPass.resolution.copy(n)}initialize(e,t,n){this.blurPass.initialize(e,t,n),this.renderPassLight.initialize(e,t,n),this.copyPass.initialize(e,t,n),this.godRaysPass.initialize(e,t,n),n!==void 0&&(this.renderTargetA.texture.type=n,this.renderTargetB.texture.type=n,this.renderTargetLight.texture.type=n,e!==null&&e.outputColorSpace===`srgb`&&(this.renderTargetA.texture.colorSpace=Be,this.renderTargetB.texture.colorSpace=Be,this.renderTargetLight.texture.colorSpace=Be))}},td=`uniform vec2 scale;uniform float lineWidth;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){float grid=0.5-max(abs(mod(uv.x*scale.x,1.0)-0.5),abs(mod(uv.y*scale.y,1.0)-0.5));outputColor=vec4(vec3(smoothstep(0.0,lineWidth,grid)),inputColor.a);}`,nd=class extends Hl{constructor({blendFunction:e=X.OVERLAY,scale:t=1,lineWidth:n=0}={}){super(`GridEffect`,td,{blendFunction:e,uniforms:new Map([[`scale`,new K(new V)],[`lineWidth`,new K(n)]])}),this.resolution=new V,this.s=0,this.scale=t,this.l=0,this.lineWidth=n}get scale(){return this.s}set scale(e){this.s=Math.max(e,1e-6),this.setSize(this.resolution.width,this.resolution.height)}getScale(){return this.scale}setScale(e){this.scale=e}get lineWidth(){return this.l}set lineWidth(e){this.l=e,this.setSize(this.resolution.width,this.resolution.height)}getLineWidth(){return this.lineWidth}setLineWidth(e){this.lineWidth=e}setSize(e,t){this.resolution.set(e,t);let n=e/t,r=this.scale*(t*.125);this.uniforms.get(`scale`).value.set(n*r,r),this.uniforms.get(`lineWidth`).value=r/t+this.lineWidth}},rd=`uniform vec3 hue;uniform float saturation;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 color=vec3(dot(inputColor.rgb,hue.xyz),dot(inputColor.rgb,hue.zxy),dot(inputColor.rgb,hue.yzx));float average=(color.r+color.g+color.b)/3.0;vec3 diff=average-color;if(saturation>0.0){color+=diff*(1.0-1.0/(1.001-saturation));}else{color+=diff*-saturation;}outputColor=vec4(min(color,1.0),inputColor.a);}`,id=class extends Hl{constructor({blendFunction:e=X.SRC,hue:t=0,saturation:n=0}={}){super(`HueSaturationEffect`,rd,{blendFunction:e,uniforms:new Map([[`hue`,new K(new H)],[`saturation`,new K(n)]])}),this.hue=t}get saturation(){return this.uniforms.get(`saturation`).value}set saturation(e){this.uniforms.get(`saturation`).value=e}getSaturation(){return this.saturation}setSaturation(e){this.saturation=e}get hue(){let e=this.uniforms.get(`hue`).value;return Math.acos((e.x*3-1)/2)}set hue(e){let t=Math.sin(e),n=Math.cos(e);this.uniforms.get(`hue`).value.set((2*n+1)/3,(-Math.sqrt(3)*t-n+1)/3,(Math.sqrt(3)*t-n+1)/3)}getHue(){return this.hue}setHue(e){this.hue=e}},ad=`uniform vec2 distortion;uniform vec2 principalPoint;uniform vec2 focalLength;uniform float skew;float mask(const in vec2 uv){return float(uv.s>=0.0&&uv.s<=1.0&&uv.t>=0.0&&uv.t<=1.0);}void mainUv(inout vec2 uv){vec2 xn=2.0*(uv.st-0.5);vec3 xDistorted=vec3((1.0+distortion*dot(xn,xn))*xn,1.0);mat3 kk=mat3(vec3(focalLength.x,0.0,0.0),vec3(skew*focalLength.x,focalLength.y,0.0),vec3(principalPoint.x,principalPoint.y,1.0));uv=(kk*xDistorted).xy*0.5+0.5;}void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=mask(uv)*inputColor;}`,od=class extends Hl{constructor({distortion:e=new V(0,0),principalPoint:t=new V(0,0),focalLength:n=new V(1,1),skew:r=0}={}){super(`LensDistortionEffect`,ad,{uniforms:new Map([[`distortion`,new K(e)],[`principalPoint`,new K(t)],[`focalLength`,new K(n)],[`skew`,new K(r)]])})}get distortion(){return this.uniforms.get(`distortion`).value}set distortion(e){this.uniforms.get(`distortion`).value=e}get principalPoint(){return this.uniforms.get(`principalPoint`).value}set principalPoint(e){this.uniforms.get(`principalPoint`).value=e}get focalLength(){return this.uniforms.get(`focalLength`).value}set focalLength(e){this.uniforms.get(`focalLength`).value=e}get skew(){return this.uniforms.get(`skew`).value}set skew(e){this.uniforms.get(`skew`).value=e}},sd=`#ifdef LUT_PRECISION_HIGH +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D lut; +#else +uniform mediump sampler2D lut; +#endif +#else +uniform lowp sampler2D lut; +#endif +void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=vec4(texture2D(lut,vec2(inputColor.r,0.5)).r,texture2D(lut,vec2(inputColor.g,0.5)).r,texture2D(lut,vec2(inputColor.b,0.5)).r,inputColor.a);}`,cd=class extends Hl{constructor(e,{blendFunction:t=X.SRC}={}){super(`LUT1DEffect`,sd,{blendFunction:t,uniforms:new Map([[`lut`,new K(null)]])}),this.lut=e}get lut(){return this.uniforms.get(`lut`).value}set lut(e){this.uniforms.get(`lut`).value=e,e!==null&&(e.type===1015||e.type===1016)&&this.defines.set(`LUT_PRECISION_HIGH`,`1`)}},ld={SCALE_UP:`lut.scaleup`};function ud(e,t,n){let r=document.createElement(`canvas`),i=r.getContext(`2d`);if(r.width=e,r.height=t,n instanceof Image)i.drawImage(n,0,0);else{let r=i.createImageData(e,t);r.data.set(n),i.putImageData(r,0,0)}return r}var dd=class e{constructor(e=0,t=0,n=null){this.width=e,this.height=t,this.data=n}toCanvas(){return typeof document>`u`?null:ud(this.width,this.height,this.data)}static from(t){let{width:n,height:r}=t,i;if(t instanceof Image){let e=ud(n,r,t);e!==null&&(i=e.getContext(`2d`).getImageData(0,0,n,r).data)}else i=t.data;return new e(n,r,i)}},fd=`(()=>{var O={SCALE_UP:"lut.scaleup"};var _=[new Float32Array(3),new Float32Array(3)],n=[new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3)],Z=[[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1])]];function d(a,t,r,m){let i=r[0]-t[0],e=r[1]-t[1],y=r[2]-t[2],h=a[0]-t[0],A=a[1]-t[1],w=a[2]-t[2],c=e*w-y*A,l=y*h-i*w,x=i*A-e*h,u=Math.sqrt(c*c+l*l+x*x),b=u*.5,s=c/u,F=l/u,f=x/u,p=-(a[0]*s+a[1]*F+a[2]*f),M=m[0]*s+m[1]*F+m[2]*f;return Math.abs(M+p)*b/3}function V(a,t,r,m,i,e){let y=(r+m*t+i*t*t)*4;e[0]=a[y+0],e[1]=a[y+1],e[2]=a[y+2]}function k(a,t,r,m,i,e){let y=r*(t-1),h=m*(t-1),A=i*(t-1),w=Math.floor(y),c=Math.floor(h),l=Math.floor(A),x=Math.ceil(y),u=Math.ceil(h),b=Math.ceil(A),s=y-w,F=h-c,f=A-l;if(w===y&&c===h&&l===A)V(a,t,y,h,A,e);else{let p;s>=F&&F>=f?p=Z[0]:s>=f&&f>=F?p=Z[1]:f>=s&&s>=F?p=Z[2]:F>=s&&s>=f?p=Z[3]:F>=f&&f>=s?p=Z[4]:f>=F&&F>=s&&(p=Z[5]);let[M,g,X,Y]=p,P=_[0];P[0]=s,P[1]=F,P[2]=f;let o=_[1],L=x-w,S=u-c,U=b-l;o[0]=L*M[0]+w,o[1]=S*M[1]+c,o[2]=U*M[2]+l,V(a,t,o[0],o[1],o[2],n[0]),o[0]=L*g[0]+w,o[1]=S*g[1]+c,o[2]=U*g[2]+l,V(a,t,o[0],o[1],o[2],n[1]),o[0]=L*X[0]+w,o[1]=S*X[1]+c,o[2]=U*X[2]+l,V(a,t,o[0],o[1],o[2],n[2]),o[0]=L*Y[0]+w,o[1]=S*Y[1]+c,o[2]=U*Y[2]+l,V(a,t,o[0],o[1],o[2],n[3]);let T=d(g,X,Y,P)*6,q=d(M,X,Y,P)*6,C=d(M,g,Y,P)*6,E=d(M,g,X,P)*6;n[0][0]*=T,n[0][1]*=T,n[0][2]*=T,n[1][0]*=q,n[1][1]*=q,n[1][2]*=q,n[2][0]*=C,n[2][1]*=C,n[2][2]*=C,n[3][0]*=E,n[3][1]*=E,n[3][2]*=E,e[0]=n[0][0]+n[1][0]+n[2][0]+n[3][0],e[1]=n[0][1]+n[1][1]+n[2][1]+n[3][1],e[2]=n[0][2]+n[1][2]+n[2][2]+n[3][2]}}var v=class{static expand(t,r){let m=Math.cbrt(t.length/4),i=new Float32Array(3),e=new t.constructor(r**3*4),y=t instanceof Uint8Array?255:1,h=r**2,A=1/(r-1);for(let w=0;w{let t=a.data,r=t.data;t.operation===O.SCALE_UP&&(r=v.expand(r,t.size)),postMessage(r,[r.buffer]),close()});})(); +`,pd=new G,md=class e extends Ft{constructor(e,t){super(e,t,t,t),this.type=g,this.format=T,this.minFilter=s,this.magFilter=s,this.wrapS=n,this.wrapT=n,this.wrapR=n,this.unpackAlignment=1,this.needsUpdate=!0,this.colorSpace=Ve,this.domainMin=new H(0,0,0),this.domainMax=new H(1,1,1)}get isLookupTexture3D(){return!0}scaleUp(t,n=!0){let r=this.image,i;return i=t<=r.width?Promise.reject(Error(`The target size must be greater than the current size`)):new Promise((i,a)=>{let o=URL.createObjectURL(new Blob([fd],{type:`text/javascript`})),s=new Worker(o);s.addEventListener(`error`,e=>a(e.error)),s.addEventListener(`message`,n=>{let r=new e(n.data,t);this.colorSpace=r.colorSpace,r.type=this.type,r.name=this.name,URL.revokeObjectURL(o),i(r)});let c=n?[r.data.buffer]:[];s.postMessage({operation:ld.SCALE_UP,data:r.data,size:t},c)}),i}applyLUT(e){let t=this.image,n=e.image,r=Math.min(t.width,t.height,t.depth);if(r!==Math.min(n.width,n.height,n.depth))console.error(`Size mismatch`);else if(e.type!==1015||this.type!==1015)console.error(`Both LUTs must be FloatType textures`);else if(e.format!==1023||this.format!==1023)console.error(`Both LUTs must be RGBA textures`);else{let e=t.data,i=n.data,a=r,o=a**2,s=a-1;for(let t=0,n=a**3;ti){o=new Uint8Array(e.length);for(let t=0;t=f.g){if(f.g>f.b){frac=f.rgb;v2=vec3(v4.x,v1.y,v1.z);v3=vec3(v4.x,v4.y,v1.z);}else if(f.r>=f.b){frac=f.rbg;v2=vec3(v4.x,v1.y,v1.z);v3=vec3(v4.x,v1.y,v4.z);}else{frac=f.brg;v2=vec3(v1.x,v1.y,v4.z);v3=vec3(v4.x,v1.y,v4.z);}}else{if(f.b>f.g){frac=f.bgr;v2=vec3(v1.x,v1.y,v4.z);v3=vec3(v1.x,v4.y,v4.z);}else if(f.r>=f.b){frac=f.grb;v2=vec3(v1.x,v4.y,v1.z);v3=vec3(v4.x,v4.y,v1.z);}else{frac=f.gbr;v2=vec3(v1.x,v4.y,v1.z);v3=vec3(v1.x,v4.y,v4.z);}}vec4 n1=texture(lut,v1);vec4 n2=texture(lut,v2);vec4 n3=texture(lut,v3);vec4 n4=texture(lut,v4);vec4 weights=vec4(1.0-frac.x,frac.x-frac.y,frac.y-frac.z,frac.z);vec4 result=weights*mat4(vec4(n1.r,n2.r,n3.r,n4.r),vec4(n1.g,n2.g,n3.g,n4.g),vec4(n1.b,n2.b,n3.b,n4.b),vec4(1.0));return vec4(result.rgb,1.0); +#else +return texture(lut,rgb); +#endif +} +#else +#ifdef LUT_PRECISION_HIGH +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D lut; +#else +uniform mediump sampler2D lut; +#endif +#else +uniform lowp sampler2D lut; +#endif +vec4 applyLUT(const in vec3 rgb){float slice=rgb.b*LUT_SIZE;float slice0=floor(slice);float interp=slice-slice0;float centeredInterp=interp-0.5;float slice1=slice0+sign(centeredInterp); +#ifdef LUT_STRIP_HORIZONTAL +float xOffset=clamp(rgb.r*LUT_TEXEL_HEIGHT,LUT_TEXEL_WIDTH*0.5,LUT_TEXEL_HEIGHT-LUT_TEXEL_WIDTH*0.5);vec2 uv0=vec2(slice0*LUT_TEXEL_HEIGHT+xOffset,rgb.g);vec2 uv1=vec2(slice1*LUT_TEXEL_HEIGHT+xOffset,rgb.g); +#else +float yOffset=clamp(rgb.g*LUT_TEXEL_WIDTH,LUT_TEXEL_HEIGHT*0.5,LUT_TEXEL_WIDTH-LUT_TEXEL_HEIGHT*0.5);vec2 uv0=vec2(rgb.r,slice0*LUT_TEXEL_WIDTH+yOffset);vec2 uv1=vec2(rgb.r,slice1*LUT_TEXEL_WIDTH+yOffset); +#endif +vec4 sample0=texture2D(lut,uv0);vec4 sample1=texture2D(lut,uv1);return mix(sample0,sample1,abs(centeredInterp));} +#endif +void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 c=inputColor.rgb; +#ifdef CUSTOM_INPUT_DOMAIN +if(c.r>=domainMin.r&&c.g>=domainMin.g&&c.b>=domainMin.b&&c.r<=domainMax.r&&c.g<=domainMax.g&&c.b<=domainMax.b){c=applyLUT(scale*c+offset).rgb;}else{c=inputColor.rgb;} +#else +#if !defined(LUT_3D) || defined(TETRAHEDRAL_INTERPOLATION) +c=clamp(c,0.0,1.0); +#endif +c=applyLUT(scale*c+offset).rgb; +#endif +outputColor=vec4(c,inputColor.a);}`,gd=class extends Hl{constructor(e,{blendFunction:t=X.SRC,tetrahedralInterpolation:n=!1,inputColorSpace:r=Be}={}){super(`LUT3DEffect`,hd,{blendFunction:t,uniforms:new Map([[`lut`,new K(null)],[`scale`,new K(new H)],[`offset`,new K(new H)],[`domainMin`,new K(null)],[`domainMax`,new K(null)]])}),this.tetrahedralInterpolation=n,this.inputColorSpace=r,this.lut=e}get lut(){return this.uniforms.get(`lut`).value}set lut(e){let t=this.defines,n=this.uniforms;if(this.lut!==e&&(n.get(`lut`).value=e,e!==null)){let r=e.image,i=this.tetrahedralInterpolation;if(t.clear(),t.set(`LUT_SIZE`,Math.min(r.width,r.height).toFixed(16)),t.set(`LUT_TEXEL_WIDTH`,(1/r.width).toFixed(16)),t.set(`LUT_TEXEL_HEIGHT`,(1/r.height).toFixed(16)),n.get(`domainMin`).value=null,n.get(`domainMax`).value=null,(e.type===1015||e.type===1016)&&t.set(`LUT_PRECISION_HIGH`,`1`),r.width>r.height?t.set(`LUT_STRIP_HORIZONTAL`,`1`):e instanceof Ft&&t.set(`LUT_3D`,`1`),e instanceof md){let r=e.domainMin,i=e.domainMax;(r.x!==0||r.y!==0||r.z!==0||i.x!==1||i.y!==1||i.z!==1)&&(t.set(`CUSTOM_INPUT_DOMAIN`,`1`),n.get(`domainMin`).value=r.clone(),n.get(`domainMax`).value=i.clone())}this.tetrahedralInterpolation=i}}getLUT(){return this.lut}setLUT(e){this.lut=e}updateScaleOffset(){let e=this.lut;if(e!==null){let t=Math.min(e.image.width,e.image.height),n=this.uniforms.get(`scale`).value,r=this.uniforms.get(`offset`).value;if(this.tetrahedralInterpolation&&e instanceof Ft){if(this.defines.has(`CUSTOM_INPUT_DOMAIN`)){let i=e.domainMax.clone().sub(e.domainMin);n.setScalar(t-1).divide(i),r.copy(e.domainMin).negate().multiply(n)}else n.setScalar(t-1),r.setScalar(0)}else if(this.defines.has(`CUSTOM_INPUT_DOMAIN`)){let i=e.domainMax.clone().sub(e.domainMin).multiplyScalar(t);n.setScalar(t-1).divide(i),r.copy(e.domainMin).negate().multiply(n).addScalar(1/(2*t))}else n.setScalar((t-1)/t),r.setScalar(1/(2*t))}}configureTetrahedralInterpolation(){let e=this.lut;e!==null&&(e.minFilter=s,e.magFilter=s,this.tetrahedralInterpolation&&(e instanceof Ft?(e.minFilter=i,e.magFilter=i):console.warn(`Tetrahedral interpolation requires a 3D texture`)),e.needsUpdate=!0)}get tetrahedralInterpolation(){return this.defines.has(`TETRAHEDRAL_INTERPOLATION`)}set tetrahedralInterpolation(e){e?this.defines.set(`TETRAHEDRAL_INTERPOLATION`,`1`):this.defines.delete(`TETRAHEDRAL_INTERPOLATION`),this.configureTetrahedralInterpolation(),this.updateScaleOffset(),this.setChanged()}setTetrahedralInterpolationEnabled(e){this.tetrahedralInterpolation=e}},_d={FULL:0,SINGLE:1},vd={DEFAULT:0,KEEP_MAX_DEPTH:1,DISCARD_MAX_DEPTH:2},yd={DEPTH:0,LUMA:1,COLOR:2},bd={DISABLED:0,DEPTH:1,CUSTOM:2},xd={LOW:0,MEDIUM:1,HIGH:2,ULTRA:3},Sd={LINEAR:0,REINHARD:1,REINHARD2:2,REINHARD2_ADAPTIVE:3,UNCHARTED2:4,OPTIMIZED_CINEON:5,CINEON:5,ACES_FILMIC:6,AGX:7,NEUTRAL:8},Cd={DEFAULT:0,ESKIL:1},wd={DERIVATIVES:`derivatives`,FRAG_DEPTH:`fragDepth`,DRAW_BUFFERS:`drawBuffers`,SHADER_TEXTURE_LOD:`shaderTextureLOD`},Td=`void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 noise=vec3(rand(uv*(1.0+time))); +#ifdef PREMULTIPLY +outputColor=vec4(min(inputColor.rgb*noise,vec3(1.0)),inputColor.a); +#else +outputColor=vec4(noise,inputColor.a); +#endif +}`,Ed=class extends Hl{constructor({blendFunction:e=X.SCREEN,premultiply:t=!1}={}){super(`NoiseEffect`,Td,{blendFunction:e}),this.premultiply=t}get premultiply(){return this.defines.has(`PREMULTIPLY`)}set premultiply(e){this.premultiply!==e&&(e?this.defines.set(`PREMULTIPLY`,`1`):this.defines.delete(`PREMULTIPLY`),this.setChanged())}isPremultiplied(){return this.premultiply}setPremultiplied(e){this.premultiply=e}},Dd=`#include +#include +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +uniform float cameraNear;uniform float cameraFar;centroid varying float vViewZ;centroid varying vec4 vProjTexCoord;void main(){ +#include +vec2 projTexCoord=(vProjTexCoord.xy/vProjTexCoord.w)*0.5+0.5; +#if DEPTH_PACKING == 3201 +float depth=unpackRGBAToDepth(texture2D(depthBuffer,projTexCoord)); +#else +float depth=texture2D(depthBuffer,projTexCoord).r; +#endif +#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH) +float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d; +#elif defined(USE_REVERSED_DEPTH_BUFFER) +depth=1.0-depth; +#endif +#ifdef PERSPECTIVE_CAMERA +float viewZ=perspectiveDepthToViewZ(depth,cameraNear,cameraFar); +#else +float viewZ=orthographicDepthToViewZ(depth,cameraNear,cameraFar); +#endif +float depthTest=(-vViewZ>-viewZ)?1.0:0.0;gl_FragColor.rg=vec2(0.0,depthTest);}`,Od=`#include +#include +#include +#include +varying float vViewZ;varying vec4 vProjTexCoord;void main(){ +#include +#include +#include +#include +#include +vViewZ=mvPosition.z;vProjTexCoord=gl_Position; +#include +}`,kd=class extends Ni{constructor(e=null,t){super({name:`DepthComparisonMaterial`,defines:{DEPTH_PACKING:`0`},uniforms:{depthBuffer:new K(null),cameraNear:new K(.3),cameraFar:new K(1e3)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Dd,vertexShader:Od}),this.depthBuffer=e,this.depthPacking=ze,this.copyCameraSettings(t)}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=ze){this.depthBuffer=e,this.depthPacking=t}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof va?this.defines.PERSPECTIVE_CAMERA=`1`:delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},Ad=`uniform lowp sampler2D inputBuffer;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 c0=texture2D(inputBuffer,vUv0).rg;vec2 c1=texture2D(inputBuffer,vUv1).rg;vec2 c2=texture2D(inputBuffer,vUv2).rg;vec2 c3=texture2D(inputBuffer,vUv3).rg;float d0=(c0.x-c1.x)*0.5;float d1=(c2.x-c3.x)*0.5;float d=length(vec2(d0,d1));float a0=min(c0.y,c1.y);float a1=min(c2.y,c3.y);float visibilityFactor=min(a0,a1);gl_FragColor.rg=(1.0-visibilityFactor>0.001)?vec2(d,0.0):vec2(0.0,d);}`,jd=`uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=vec2(uv.x+texelSize.x,uv.y);vUv1=vec2(uv.x-texelSize.x,uv.y);vUv2=vec2(uv.x,uv.y+texelSize.y);vUv3=vec2(uv.x,uv.y-texelSize.y);gl_Position=vec4(position.xy,1.0,1.0);}`,Md=class extends Ni{constructor(e=new V){super({name:`OutlineMaterial`,uniforms:{inputBuffer:new K(null),texelSize:new K(new V)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Ad,vertexShader:jd}),this.uniforms.texelSize.value.set(e.x,e.y),this.uniforms.maskTexture=this.uniforms.inputBuffer}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},Nd=class extends fl{constructor(e,t,{renderTarget:n,resolutionScale:r=1,width:a=Y.AUTO_SIZE,height:o=Y.AUTO_SIZE,resolutionX:s=a,resolutionY:c=o}={}){super(`DepthPass`),this.needsSwap=!1,this.renderPass=new Xu(e,t,new Ii({depthPacking:ze}));let l=this.renderPass;l.skipShadowMapUpdate=!0,l.ignoreBackground=!0,this.renderTarget=n,this.renderTarget===void 0&&(this.renderTarget=new W(1,1,{minFilter:i,magFilter:i}),this.renderTarget.texture.name=`DepthPass.Target`);let u=this.resolution=new Y(this,s,c,r);u.addEventListener(`change`,e=>this.setSize(u.baseWidth,u.baseHeight))}set mainScene(e){this.renderPass.mainScene=e}set mainCamera(e){this.renderPass.mainCamera=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,n,r,i){let a=this.renderToScreen?null:this.renderTarget;this.renderPass.render(e,a)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}initialize(e,t,n){let r=e.capabilities.reversedDepthBuffer?0:16777215,i=this.renderPass.clearPass;i.overrideClearColor=new G(r),i.overrideClearAlpha=1}},Pd=`uniform lowp sampler2D edgeTexture;uniform lowp sampler2D maskTexture;uniform vec3 visibleEdgeColor;uniform vec3 hiddenEdgeColor;uniform float pulse;uniform float edgeStrength; +#ifdef USE_PATTERN +uniform lowp sampler2D patternTexture;varying vec2 vUvPattern; +#endif +void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 edge=texture2D(edgeTexture,uv).rg;vec2 mask=texture2D(maskTexture,uv).rg; +#ifndef X_RAY +edge.y=0.0; +#endif +edge*=(edgeStrength*mask.x*pulse);vec3 color=edge.x*visibleEdgeColor+edge.y*hiddenEdgeColor;float visibilityFactor=0.0; +#ifdef USE_PATTERN +vec4 patternColor=texture2D(patternTexture,vUvPattern); +#ifdef X_RAY +float hiddenFactor=0.5; +#else +float hiddenFactor=0.0; +#endif +visibilityFactor=(1.0-mask.y>0.0)?1.0:hiddenFactor;visibilityFactor*=(1.0-mask.x)*patternColor.a;color+=visibilityFactor*patternColor.rgb; +#endif +float alpha=max(max(edge.x,edge.y),visibilityFactor); +#ifdef ALPHA +outputColor=vec4(color,alpha); +#else +outputColor=vec4(color,max(alpha,inputColor.a)); +#endif +}`,Fd=`uniform float patternScale;varying vec2 vUvPattern;void mainSupport(const in vec2 uv){vUvPattern=uv*vec2(aspect,1.0)*patternScale;}`,Id=class extends Hl{constructor(e,t,{blendFunction:n=X.SCREEN,patternTexture:r=null,patternScale:i=1,edgeStrength:a=1,pulseSpeed:o=0,visibleEdgeColor:s=16777215,hiddenEdgeColor:c=2230538,kernelSize:l=Gl.VERY_SMALL,blur:u=!1,xRay:d=!0,multisampling:f=0,resolutionScale:p=.5,width:m=Y.AUTO_SIZE,height:h=Y.AUTO_SIZE,resolutionX:g=m,resolutionY:_=h}={}){super(`OutlineEffect`,Pd,{uniforms:new Map([[`maskTexture`,new K(null)],[`edgeTexture`,new K(null)],[`edgeStrength`,new K(a)],[`visibleEdgeColor`,new K(new G(s))],[`hiddenEdgeColor`,new K(new G(c))],[`pulse`,new K(1)],[`patternScale`,new K(i)],[`patternTexture`,new K(null)]])}),this.blendMode.addEventListener(`change`,e=>{this.blendMode.blendFunction===X.ALPHA?this.defines.set(`ALPHA`,`1`):this.defines.delete(`ALPHA`),this.setChanged()}),this.blendMode.blendFunction=n,this.patternTexture=r,this.xRay=d,this.scene=e,this.camera=t,this.renderTargetMask=new W(1,1),this.renderTargetMask.samples=f,this.renderTargetMask.texture.name=`Outline.Mask`,this.uniforms.get(`maskTexture`).value=this.renderTargetMask.texture,this.renderTargetOutline=new W(1,1,{depthBuffer:!1}),this.renderTargetOutline.texture.name=`Outline.Edges`,this.uniforms.get(`edgeTexture`).value=this.renderTargetOutline.texture,this.clearPass=new yl,this.clearPass.overrideClearColor=new G(0),this.clearPass.overrideClearAlpha=1,this.depthPass=new Nd(e,t),this.maskPass=new Xu(e,t,new kd(this.depthPass.texture,t));let v=this.maskPass.clearPass;v.overrideClearColor=new G(16777215),v.overrideClearAlpha=1,this.blurPass=new Xl({resolutionScale:p,resolutionX:g,resolutionY:_,kernelSize:l}),this.blurPass.enabled=u;let y=this.blurPass.resolution;y.addEventListener(`change`,e=>this.setSize(y.baseWidth,y.baseHeight)),this.outlinePass=new Au(new Md);let b=this.outlinePass.fullscreenMaterial;b.inputBuffer=this.renderTargetMask.texture,this.time=0,this.forceUpdate=!0,this.selection=new Rl,this.pulseSpeed=o}set mainScene(e){this.scene=e,this.depthPass.mainScene=e,this.maskPass.mainScene=e}set mainCamera(e){this.camera=e,this.depthPass.mainCamera=e,this.maskPass.mainCamera=e,this.maskPass.overrideMaterial.copyCameraSettings(e)}get resolution(){return this.blurPass.resolution}getResolution(){return this.blurPass.getResolution()}get multisampling(){return this.renderTargetMask.samples}set multisampling(e){this.renderTargetMask.samples=e,this.renderTargetMask.dispose()}get patternScale(){return this.uniforms.get(`patternScale`).value}set patternScale(e){this.uniforms.get(`patternScale`).value=e}get edgeStrength(){return this.uniforms.get(`edgeStrength`).value}set edgeStrength(e){this.uniforms.get(`edgeStrength`).value=e}get visibleEdgeColor(){return this.uniforms.get(`visibleEdgeColor`).value}set visibleEdgeColor(e){this.uniforms.get(`visibleEdgeColor`).value=e}get hiddenEdgeColor(){return this.uniforms.get(`hiddenEdgeColor`).value}set hiddenEdgeColor(e){this.uniforms.get(`hiddenEdgeColor`).value=e}getBlurPass(){return this.blurPass}getSelection(){return this.selection}getPulseSpeed(){return this.pulseSpeed}setPulseSpeed(e){this.pulseSpeed=e}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get selectionLayer(){return this.selection.layer}set selectionLayer(e){this.selection.layer=e}get dithering(){return this.blurPass.dithering}set dithering(e){this.blurPass.dithering=e}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(e){this.blurPass.kernelSize=e}get blur(){return this.blurPass.enabled}set blur(e){this.blurPass.enabled=e}get xRay(){return this.defines.has(`X_RAY`)}set xRay(e){this.xRay!==e&&(e?this.defines.set(`X_RAY`,`1`):this.defines.delete(`X_RAY`),this.setChanged())}isXRayEnabled(){return this.xRay}setXRayEnabled(e){this.xRay=e}get patternTexture(){return this.uniforms.get(`patternTexture`).value}set patternTexture(e){e===null?(this.defines.delete(`USE_PATTERN`),this.setVertexShader(null)):(e.wrapS=e.wrapT=t,this.defines.set(`USE_PATTERN`,`1`),this.setVertexShader(Fd)),this.uniforms.get(`patternTexture`).value=e,this.setChanged()}setPatternTexture(e){this.patternTexture=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}setSelection(e){return this.selection.set(e),this}clearSelection(){return this.selection.clear(),this}selectObject(e){return this.selection.add(e),this}deselectObject(e){return this.selection.delete(e),this}update(e,t,n){let r=this.scene,i=this.camera,a=this.selection,o=this.uniforms.get(`pulse`),s=r.background,c=i.layers.mask;(this.forceUpdate||a.size>0)&&(r.background=null,o.value=1,this.pulseSpeed>0&&(o.value=Math.cos(this.time*this.pulseSpeed*10)*.375+.625),this.time+=n,a.setVisible(!1),this.depthPass.render(e),a.setVisible(!0),i.layers.set(a.layer),this.maskPass.render(e,this.renderTargetMask),i.layers.mask=c,r.background=s,this.outlinePass.render(e,null,this.renderTargetOutline),this.blurPass.enabled&&this.blurPass.render(e,this.renderTargetOutline,this.renderTargetOutline)),this.forceUpdate=a.size>0}setSize(e,t){this.blurPass.setSize(e,t),this.renderTargetMask.setSize(e,t);let n=this.resolution;n.setBaseSize(e,t);let r=n.width,i=n.height;this.depthPass.setSize(r,i),this.renderTargetOutline.setSize(r,i),this.outlinePass.fullscreenMaterial.setSize(r,i)}initialize(e,t,n){this.blurPass.initialize(e,t,u),n!==void 0&&(this.depthPass.initialize(e,t,n),this.maskPass.initialize(e,t,n),this.outlinePass.initialize(e,t,n))}},Ld=`uniform bool active;uniform vec4 d;void mainUv(inout vec2 uv){if(active){uv=d.xy*(floor(uv*d.zw)+0.5);}}`,Rd=class extends Hl{constructor(e=30){super(`PixelationEffect`,Ld,{uniforms:new Map([[`active`,new K(!1)],[`d`,new K(new Mt)]])}),this.resolution=new V,this._granularity=0,this.granularity=e}get granularity(){return this._granularity}set granularity(e){let t=Math.floor(e);t%2>0&&(t+=1),this._granularity=t,this.uniforms.get(`active`).value=t>0,this.setSize(this.resolution.width,this.resolution.height)}getGranularity(){return this.granularity}setGranularity(e){this.granularity=e}setSize(e,t){let n=this.resolution;n.set(e,t);let r=this.granularity,i=r/n.x,a=r/n.y;this.uniforms.get(`d`).value.set(i,a,1/i,1/a)}},zd=`uniform float focus;uniform float focalLength;uniform float fStop;uniform float maxBlur;uniform float luminanceThreshold;uniform float luminanceGain;uniform float bias;uniform float fringe; +#ifdef MANUAL_DOF +uniform vec4 dof; +#endif +#ifdef PENTAGON +float pentagon(const in vec2 coords){const vec4 HS0=vec4(1.0,0.0,0.0,1.0);const vec4 HS1=vec4(0.309016994,0.951056516,0.0,1.0);const vec4 HS2=vec4(-0.809016994,0.587785252,0.0,1.0);const vec4 HS3=vec4(-0.809016994,-0.587785252,0.0,1.0);const vec4 HS4=vec4(0.309016994,-0.951056516,0.0,1.0);const vec4 HS5=vec4(0.0,0.0,1.0,1.0);const vec4 ONE=vec4(1.0);const float P_FEATHER=0.4;const float N_FEATHER=-P_FEATHER;float inOrOut=-4.0;vec4 P=vec4(coords,vec2(RINGS_FLOAT-1.3));vec4 dist=vec4(dot(P,HS0),dot(P,HS1),dot(P,HS2),dot(P,HS3));dist=smoothstep(N_FEATHER,P_FEATHER,dist);inOrOut+=dot(dist,ONE);dist.x=dot(P,HS4);dist.y=HS5.w-abs(P.z);dist=smoothstep(N_FEATHER,P_FEATHER,dist);inOrOut+=dist.x;return clamp(inOrOut,0.0,1.0);} +#endif +vec3 processTexel(const in vec2 coords,const in float blur){vec2 scale=texelSize*fringe*blur;vec3 c=vec3(texture2D(inputBuffer,coords+vec2(0.0,1.0)*scale).r,texture2D(inputBuffer,coords+vec2(-0.866,-0.5)*scale).g,texture2D(inputBuffer,coords+vec2(0.866,-0.5)*scale).b);float luminance=linearToRelativeLuminance(c);float threshold=max((luminance-luminanceThreshold)*luminanceGain,0.0);return c+mix(vec3(0.0),c,threshold*blur);}float gather(const in float i,const in float j,const in float ringSamples,const in vec2 uv,const in vec2 blurFactor,const in float blur,inout vec3 color){float step=PI2/ringSamples;vec2 wh=vec2(cos(j*step)*i,sin(j*step)*i); +#ifdef PENTAGON +float p=pentagon(wh); +#else +float p=1.0; +#endif +color+=processTexel(wh*blurFactor+uv,blur)*mix(1.0,i/RINGS_FLOAT,bias)*p;return mix(1.0,i/RINGS_FLOAT,bias)*p;}void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){ +#ifdef PERSPECTIVE_CAMERA +float viewZ=perspectiveDepthToViewZ(depth,cameraNear,cameraFar);float linearDepth=viewZToOrthographicDepth(viewZ,cameraNear,cameraFar); +#else +float linearDepth=depth; +#endif +#ifdef MANUAL_DOF +float focalPlane=linearDepth-focus;float farDoF=(focalPlane-dof.z)/dof.w;float nearDoF=(-focalPlane-dof.x)/dof.y;float blur=(focalPlane>0.0)?farDoF:nearDoF; +#else +const float CIRCLE_OF_CONFUSION=0.03;float focalPlaneMM=focus*1000.0;float depthMM=linearDepth*1000.0;float focalPlane=(depthMM*focalLength)/(depthMM-focalLength);float farDoF=(focalPlaneMM*focalLength)/(focalPlaneMM-focalLength);float nearDoF=(focalPlaneMM-focalLength)/(focalPlaneMM*fStop*CIRCLE_OF_CONFUSION);float blur=abs(focalPlane-farDoF)*nearDoF; +#endif +const int MAX_RING_SAMPLES=RINGS_INT*SAMPLES_INT;blur=clamp(blur,0.0,1.0);vec3 color=inputColor.rgb;if(blur>=0.05){vec2 blurFactor=blur*maxBlur*texelSize;float s=1.0;int ringSamples;for(int i=1;i<=RINGS_INT;i++){ringSamples=i*SAMPLES_INT;for(int j=0;j=ringSamples){break;}s+=gather(float(i),float(j),float(ringSamples),uv,blurFactor,blur,color);}}color/=s;} +#ifdef SHOW_FOCUS +float edge=0.002*linearDepth;float m=clamp(smoothstep(0.0,edge,blur),0.0,1.0);float e=clamp(smoothstep(1.0-edge,1.0,blur),0.0,1.0);color=mix(color,vec3(1.0,0.5,0.0),(1.0-m)*0.6);color=mix(color,vec3(0.0,0.5,1.0),((1.0-e)-(1.0-m))*0.2); +#endif +outputColor=vec4(color,inputColor.a);}`,Bd=class extends Hl{constructor({blendFunction:e,focus:t=1,focalLength:n=24,fStop:r=.9,luminanceThreshold:i=.5,luminanceGain:a=2,bias:o=.5,fringe:s=.7,maxBlur:c=1,rings:l=3,samples:u=2,showFocus:d=!1,manualDoF:f=!1,pentagon:p=!1}={}){super(`RealisticBokehEffect`,zd,{blendFunction:e,attributes:El.CONVOLUTION|El.DEPTH,uniforms:new Map([[`focus`,new K(t)],[`focalLength`,new K(n)],[`fStop`,new K(r)],[`luminanceThreshold`,new K(i)],[`luminanceGain`,new K(a)],[`bias`,new K(o)],[`fringe`,new K(s)],[`maxBlur`,new K(c)],[`dof`,new K(null)]])}),this.rings=l,this.samples=u,this.showFocus=d,this.manualDoF=f,this.pentagon=p}get rings(){return Number.parseInt(this.defines.get(`RINGS_INT`))}set rings(e){let t=Math.floor(e);this.defines.set(`RINGS_INT`,t.toFixed(0)),this.defines.set(`RINGS_FLOAT`,t.toFixed(1)),this.setChanged()}get samples(){return Number.parseInt(this.defines.get(`SAMPLES_INT`))}set samples(e){let t=Math.floor(e);this.defines.set(`SAMPLES_INT`,t.toFixed(0)),this.defines.set(`SAMPLES_FLOAT`,t.toFixed(1)),this.setChanged()}get showFocus(){return this.defines.has(`SHOW_FOCUS`)}set showFocus(e){this.showFocus!==e&&(e?this.defines.set(`SHOW_FOCUS`,`1`):this.defines.delete(`SHOW_FOCUS`),this.setChanged())}get manualDoF(){return this.defines.has(`MANUAL_DOF`)}set manualDoF(e){this.manualDoF!==e&&(e?(this.defines.set(`MANUAL_DOF`,`1`),this.uniforms.get(`dof`).value=new Mt(.2,1,.2,2)):(this.defines.delete(`MANUAL_DOF`),this.uniforms.get(`dof`).value=null),this.setChanged())}get pentagon(){return this.defines.has(`PENTAGON`)}set pentagon(e){this.pentagon!==e&&(e?this.defines.set(`PENTAGON`,`1`):this.defines.delete(`PENTAGON`),this.setChanged())}},Vd=`uniform float count; +#ifdef SCROLL +uniform float scrollSpeed; +#endif +void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){float y=uv.y; +#ifdef SCROLL +y+=time*scrollSpeed; +#endif +vec2 sl=vec2(sin(y*count),cos(y*count));outputColor=vec4(sl.xyx,inputColor.a);}`,Hd=class extends Hl{constructor({blendFunction:e=X.OVERLAY,density:t=1.25,scrollSpeed:n=0}={}){super(`ScanlineEffect`,Vd,{blendFunction:e,uniforms:new Map([[`count`,new K(0)],[`scrollSpeed`,new K(0)]])}),this.resolution=new V,this.d=t,this.scrollSpeed=n}get density(){return this.d}set density(e){this.d=e,this.setSize(this.resolution.width,this.resolution.height)}getDensity(){return this.density}setDensity(e){this.density=e}get scrollSpeed(){return this.uniforms.get(`scrollSpeed`).value}set scrollSpeed(e){this.uniforms.get(`scrollSpeed`).value=e,e===0?this.defines.delete(`SCROLL`)&&this.setChanged():this.defines.has(`SCROLL`)||(this.defines.set(`SCROLL`,`1`),this.setChanged())}setSize(e,t){this.resolution.set(e,t),this.uniforms.get(`count`).value=Math.round(t*this.density)}},Ud=`uniform bool active;uniform vec2 center;uniform float waveSize;uniform float radius;uniform float maxRadius;uniform float amplitude;varying float vSize;void mainUv(inout vec2 uv){if(active){vec2 aspectCorrection=vec2(aspect,1.0);vec2 difference=uv*aspectCorrection-center*aspectCorrection;float distance=sqrt(dot(difference,difference))*vSize;if(distance>radius){if(distanceGd,o.value&&(a.get(`cameraDistance`).value=i.position.distanceTo(r),Kd.copy(r).project(i),this.screenPosition.set((Kd.x+1)*.5,(Kd.y+1)*.5)),this.time+=n*this.speed;let t=this.time-e;a.get(`radius`).value=t,t>=(a.get(`maxRadius`).value+e)*2&&(this.active=!1,o.value=!1)}}},Yd=`#include +#include +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D depthBuffer0;uniform highp sampler2D depthBuffer1; +#else +uniform mediump sampler2D depthBuffer0;uniform mediump sampler2D depthBuffer1; +#endif +uniform sampler2D inputBuffer;uniform vec2 cameraNearFar;float getViewZ(const in float depth){ +#ifdef PERSPECTIVE_CAMERA +return perspectiveDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); +#else +return orthographicDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); +#endif +}varying vec2 vUv;void main(){vec2 depth; +#if DEPTH_PACKING_0 == 3201 +depth.x=unpackRGBAToDepth(texture2D(depthBuffer0,vUv)); +#else +depth.x=texture2D(depthBuffer0,vUv).r; +#endif +#if DEPTH_PACKING_1 == 3201 +depth.y=unpackRGBAToDepth(texture2D(depthBuffer1,vUv)); +#else +depth.y=texture2D(depthBuffer1,vUv).r; +#endif +#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH) +float a=cameraNearFar.y/(cameraNearFar.y-cameraNearFar.x);float b=cameraNearFar.y*cameraNearFar.x/(cameraNearFar.x-cameraNearFar.y);float c=log2(cameraNearFar.y+1.0);float d=pow(2.0,depth.x*c)-1.0;depth.x=a+b/d;d=pow(2.0,depth.y*c)-1.0;depth.y=a+b/d; +#elif defined(USE_REVERSED_DEPTH_BUFFER) +depth.x=1.0-depth.x;depth.y=1.0-depth.y; +#endif +bool isMaxDepth=(depth.x==1.0); +#ifdef PERSPECTIVE_CAMERA +depth.x=viewZToOrthographicDepth(getViewZ(depth.x),cameraNearFar.x,cameraNearFar.y);depth.y=viewZToOrthographicDepth(getViewZ(depth.y),cameraNearFar.x,cameraNearFar.y); +#endif +#if DEPTH_TEST_STRATEGY == 0 +bool keep=depthTest(depth.x,depth.y); +#elif DEPTH_TEST_STRATEGY == 1 +bool keep=isMaxDepth||depthTest(depth.x,depth.y); +#else +bool keep=!isMaxDepth&&depthTest(depth.x,depth.y); +#endif +if(keep){gl_FragColor=texture2D(inputBuffer,vUv);}else{discard;}}`,Xd=class extends Ni{constructor(){super({name:`DepthMaskMaterial`,defines:{DEPTH_EPSILON:`0.0001`,DEPTH_PACKING_0:`0`,DEPTH_PACKING_1:`0`,DEPTH_TEST_STRATEGY:vd.KEEP_MAX_DEPTH},uniforms:{inputBuffer:new K(null),depthBuffer0:new K(null),depthBuffer1:new K(null),cameraNearFar:new K(new V(1,1))},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Yd,vertexShader:hl}),this.depthMode=2}set depthBuffer0(e){this.uniforms.depthBuffer0.value=e}set depthPacking0(e){this.defines.DEPTH_PACKING_0=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer0(e,t=L){this.depthBuffer0=e,this.depthPacking0=t}set depthBuffer1(e){this.uniforms.depthBuffer1.value=e}set depthPacking1(e){this.defines.DEPTH_PACKING_1=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer1(e,t=L){this.depthBuffer1=e,this.depthPacking1=t}get maxDepthStrategy(){return Number(this.defines.DEPTH_TEST_STRATEGY)}set maxDepthStrategy(e){this.defines.DEPTH_TEST_STRATEGY=e.toFixed(0),this.needsUpdate=!0}get keepFar(){return this.maxDepthStrategy}set keepFar(e){this.maxDepthStrategy=e?vd.KEEP_MAX_DEPTH:vd.DISCARD_MAX_DEPTH}getMaxDepthStrategy(){return this.maxDepthStrategy}setMaxDepthStrategy(e){this.maxDepthStrategy=e}get epsilon(){return Number(this.defines.DEPTH_EPSILON)}set epsilon(e){this.defines.DEPTH_EPSILON=e.toFixed(16),this.needsUpdate=!0}getEpsilon(){return this.epsilon}setEpsilon(e){this.epsilon=e}get depthMode(){return Number(this.defines.DEPTH_MODE)}set depthMode(e){let t;switch(e){case 0:t=`false`;break;case 1:t=`true`;break;case 4:t=`abs(d1 - d0) <= DEPTH_EPSILON`;break;case 7:t=`abs(d1 - d0) > DEPTH_EPSILON`;break;case 2:t=`d0 > d1`;break;case 3:t=`d0 >= d1`;break;case 5:t=`d0 <= d1`;break;default:t=`d0 < d1`}this.defines.DEPTH_MODE=e.toFixed(0),this.defines[`depthTest(d0, d1)`]=t,this.needsUpdate=!0}getDepthMode(){return this.depthMode}setDepthMode(e){this.depthMode=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNearFar.value.set(e.near,e.far),e instanceof va?this.defines.PERSPECTIVE_CAMERA=`1`:delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},Zd=class extends cu{constructor(e,t,n){super(n),this.setAttributes(this.getAttributes()|El.DEPTH),this.camera=t,this.depthPass=new Nd(e,t),this.clearPass=new yl(!0,!1,!1),this.clearPass.overrideClearColor=new G(0),this.depthMaskPass=new Au(new Xd);let r=this.depthMaskMaterial;r.copyCameraSettings(t),r.depthBuffer1=this.depthPass.texture,r.depthPacking1=ze,r.depthMode=4,this.renderTargetMasked=new W(1,1,{depthBuffer:!1}),this.renderTargetMasked.texture.name=`Bloom.Masked`,this.selection=new Rl,this._inverted=!1,this._ignoreBackground=!1}set mainScene(e){this.depthPass.mainScene=e}set mainCamera(e){this.camera=e,this.depthPass.mainCamera=e,this.depthMaskMaterial.copyCameraSettings(e)}getSelection(){return this.selection}get depthMaskMaterial(){return this.depthMaskPass.fullscreenMaterial}get inverted(){return this._inverted}set inverted(e){this._inverted=e,this.depthMaskMaterial.depthMode=e?7:4}isInverted(){return this.inverted}setInverted(e){this.inverted=e}get ignoreBackground(){return this._ignoreBackground}set ignoreBackground(e){this._ignoreBackground=e,this.depthMaskMaterial.maxDepthStrategy=e?vd.DISCARD_MAX_DEPTH:vd.KEEP_MAX_DEPTH}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(e){this.ignoreBackground=e}setDepthTexture(e,t=L){this.depthMaskMaterial.depthBuffer0=e,this.depthMaskMaterial.depthPacking0=t}update(e,t,n){let r=this.camera,i=this.selection,a=this.inverted,o=t;if(this.ignoreBackground||!a||i.size>0){let n=r.layers.mask;r.layers.set(i.layer),this.depthPass.render(e),r.layers.mask=n,o=this.renderTargetMasked,this.clearPass.render(e,o),this.depthMaskPass.render(e,t,o)}super.update(e,o,n)}setSize(e,t){super.setSize(e,t),this.renderTargetMasked.setSize(e,t),this.depthPass.setSize(e,t)}initialize(e,t,n){super.initialize(e,t,n),this.clearPass.initialize(e,t,n),this.depthPass.initialize(e,t,n),this.depthMaskPass.initialize(e,t,n),e!==null&&e.capabilities.logarithmicDepthBuffer&&(this.depthMaskPass.fullscreenMaterial.defines.LOG_DEPTH=`1`),n!==void 0&&(this.renderTargetMasked.texture.type=n,e!==null&&e.outputColorSpace===`srgb`&&(this.renderTargetMasked.texture.colorSpace=Be))}},Qd=`uniform vec3 weightsR;uniform vec3 weightsG;uniform vec3 weightsB;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 color=vec3(dot(inputColor.rgb,weightsR),dot(inputColor.rgb,weightsG),dot(inputColor.rgb,weightsB));outputColor=vec4(color,inputColor.a);}`,$d=class extends Hl{constructor({blendFunction:e,intensity:t=1}={}){super(`SepiaEffect`,Qd,{blendFunction:e,uniforms:new Map([[`weightsR`,new K(new H(.393,.769,.189))],[`weightsG`,new K(new H(.349,.686,.168))],[`weightsB`,new K(new H(.272,.534,.131))]])})}get intensity(){return this.blendMode.opacity.value}set intensity(e){this.blendMode.opacity.value=e}getIntensity(){return this.intensity}setIntensity(e){this.intensity=e}get weightsR(){return this.uniforms.get(`weightsR`).value}get weightsG(){return this.uniforms.get(`weightsG`).value}get weightsB(){return this.uniforms.get(`weightsB`).value}},ef=`varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1; +#if EDGE_DETECTION_MODE != 0 +varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5; +#endif +#if EDGE_DETECTION_MODE == 1 +#include +#endif +#if EDGE_DETECTION_MODE == 0 || PREDICATION_MODE == 1 +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +return unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +return texture2D(depthBuffer,uv).r; +#endif +}vec3 gatherNeighbors(){float p=readDepth(vUv);float pLeft=readDepth(vUv0);float pTop=readDepth(vUv1);return vec3(p,pLeft,pTop);} +#elif PREDICATION_MODE == 2 +uniform sampler2D predicationBuffer;vec3 gatherNeighbors(){float p=texture2D(predicationBuffer,vUv).r;float pLeft=texture2D(predicationBuffer,vUv0).r;float pTop=texture2D(predicationBuffer,vUv1).r;return vec3(p,pLeft,pTop);} +#endif +#if PREDICATION_MODE != 0 +vec2 calculatePredicatedThreshold(){vec3 neighbours=gatherNeighbors();vec2 delta=abs(neighbours.xx-neighbours.yz);vec2 edges=step(PREDICATION_THRESHOLD,delta);return PREDICATION_SCALE*EDGE_THRESHOLD*(1.0-PREDICATION_STRENGTH*edges);} +#endif +#if EDGE_DETECTION_MODE != 0 +uniform sampler2D inputBuffer; +#endif +void main(){ +#if EDGE_DETECTION_MODE == 0 +const vec2 threshold=vec2(DEPTH_THRESHOLD); +#elif PREDICATION_MODE != 0 +vec2 threshold=calculatePredicatedThreshold(); +#else +const vec2 threshold=vec2(EDGE_THRESHOLD); +#endif +#if EDGE_DETECTION_MODE == 0 +vec3 neighbors=gatherNeighbors();vec2 delta=abs(neighbors.xx-vec2(neighbors.y,neighbors.z));vec2 edges=step(threshold,delta);if(dot(edges,vec2(1.0))==0.0){discard;}gl_FragColor=vec4(edges,0.0,1.0); +#elif EDGE_DETECTION_MODE == 1 +float l=luminance(texture2D(inputBuffer,vUv).rgb);float lLeft=luminance(texture2D(inputBuffer,vUv0).rgb);float lTop=luminance(texture2D(inputBuffer,vUv1).rgb);vec4 delta;delta.xy=abs(l-vec2(lLeft,lTop));vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}float lRight=luminance(texture2D(inputBuffer,vUv2).rgb);float lBottom=luminance(texture2D(inputBuffer,vUv3).rgb);delta.zw=abs(l-vec2(lRight,lBottom));vec2 maxDelta=max(delta.xy,delta.zw);float lLeftLeft=luminance(texture2D(inputBuffer,vUv4).rgb);float lTopTop=luminance(texture2D(inputBuffer,vUv5).rgb);delta.zw=abs(vec2(lLeft,lTop)-vec2(lLeftLeft,lTopTop));maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges.xy*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0); +#elif EDGE_DETECTION_MODE == 2 +vec4 delta;vec3 c=texture2D(inputBuffer,vUv).rgb;vec3 cLeft=texture2D(inputBuffer,vUv0).rgb;vec3 t=abs(c-cLeft);delta.x=max(max(t.r,t.g),t.b);vec3 cTop=texture2D(inputBuffer,vUv1).rgb;t=abs(c-cTop);delta.y=max(max(t.r,t.g),t.b);vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}vec3 cRight=texture2D(inputBuffer,vUv2).rgb;t=abs(c-cRight);delta.z=max(max(t.r,t.g),t.b);vec3 cBottom=texture2D(inputBuffer,vUv3).rgb;t=abs(c-cBottom);delta.w=max(max(t.r,t.g),t.b);vec2 maxDelta=max(delta.xy,delta.zw);vec3 cLeftLeft=texture2D(inputBuffer,vUv4).rgb;t=abs(c-cLeftLeft);delta.z=max(max(t.r,t.g),t.b);vec3 cTopTop=texture2D(inputBuffer,vUv5).rgb;t=abs(c-cTopTop);delta.w=max(max(t.r,t.g),t.b);maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0); +#endif +}`,tf=`uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1; +#if EDGE_DETECTION_MODE != 0 +varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5; +#endif +void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,0.0);vUv1=vUv+texelSize*vec2(0.0,-1.0); +#if EDGE_DETECTION_MODE != 0 +vUv2=vUv+texelSize*vec2(1.0,0.0);vUv3=vUv+texelSize*vec2(0.0,1.0);vUv4=vUv+texelSize*vec2(-2.0,0.0);vUv5=vUv+texelSize*vec2(0.0,-2.0); +#endif +gl_Position=vec4(position.xy,1.0,1.0);}`,nf=class extends Ni{constructor(e=new V,t=yd.COLOR){super({name:`EdgeDetectionMaterial`,defines:{THREE_REVISION:`186`.replace(/\D+/g,``),LOCAL_CONTRAST_ADAPTATION_FACTOR:`2.0`,EDGE_THRESHOLD:`0.1`,DEPTH_THRESHOLD:`0.01`,PREDICATION_MODE:`0`,PREDICATION_THRESHOLD:`0.01`,PREDICATION_SCALE:`2.0`,PREDICATION_STRENGTH:`1.0`,DEPTH_PACKING:`0`},uniforms:{inputBuffer:new K(null),depthBuffer:new K(null),predicationBuffer:new K(null),texelSize:new K(e)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:ef,vertexShader:tf}),this.edgeDetectionMode=t}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=L){this.depthBuffer=e,this.depthPacking=t}get edgeDetectionMode(){return Number(this.defines.EDGE_DETECTION_MODE)}set edgeDetectionMode(e){this.defines.EDGE_DETECTION_MODE=e.toFixed(0),this.needsUpdate=!0}getEdgeDetectionMode(){return this.edgeDetectionMode}setEdgeDetectionMode(e){this.edgeDetectionMode=e}get localContrastAdaptationFactor(){return Number(this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR)}set localContrastAdaptationFactor(e){this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR=e.toFixed(`6`),this.needsUpdate=!0}getLocalContrastAdaptationFactor(){return this.localContrastAdaptationFactor}setLocalContrastAdaptationFactor(e){this.localContrastAdaptationFactor=e}get edgeDetectionThreshold(){return Number(this.defines.EDGE_THRESHOLD)}set edgeDetectionThreshold(e){this.defines.EDGE_THRESHOLD=e.toFixed(`6`),this.defines.DEPTH_THRESHOLD=(e*.1).toFixed(`6`),this.needsUpdate=!0}getEdgeDetectionThreshold(){return this.edgeDetectionThreshold}setEdgeDetectionThreshold(e){this.edgeDetectionThreshold=e}get predicationMode(){return Number(this.defines.PREDICATION_MODE)}set predicationMode(e){this.defines.PREDICATION_MODE=e.toFixed(0),this.needsUpdate=!0}getPredicationMode(){return this.predicationMode}setPredicationMode(e){this.predicationMode=e}set predicationBuffer(e){this.uniforms.predicationBuffer.value=e}setPredicationBuffer(e){this.uniforms.predicationBuffer.value=e}get predicationThreshold(){return Number(this.defines.PREDICATION_THRESHOLD)}set predicationThreshold(e){this.defines.PREDICATION_THRESHOLD=e.toFixed(`6`),this.needsUpdate=!0}getPredicationThreshold(){return this.predicationThreshold}setPredicationThreshold(e){this.predicationThreshold=e}get predicationScale(){return Number(this.defines.PREDICATION_SCALE)}set predicationScale(e){this.defines.PREDICATION_SCALE=e.toFixed(`6`),this.needsUpdate=!0}getPredicationScale(){return this.predicationScale}setPredicationScale(e){this.predicationScale=e}get predicationStrength(){return Number(this.defines.PREDICATION_STRENGTH)}set predicationStrength(e){this.defines.PREDICATION_STRENGTH=e.toFixed(`6`),this.needsUpdate=!0}getPredicationStrength(){return this.predicationStrength}setPredicationStrength(e){this.predicationStrength=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},rf=`#define sampleLevelZeroOffset(t, coord, offset) texture2D(t, coord + offset * texelSize) +#if __VERSION__ < 300 +#define round(v) floor(v + 0.5) +#endif +#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +uniform lowp sampler2D areaTexture;uniform lowp sampler2D searchTexture;uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}vec2 decodeDiagBilinearAccess(in vec2 e){e.r=e.r*abs(5.0*e.r-5.0*0.75);return round(e);}vec4 decodeDiagBilinearAccess(in vec4 e){e.rb=e.rb*abs(5.0*e.rb-5.0*0.75);return round(e);}vec2 searchDiag1(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);vec3 t=vec3(texelSize,1.0);for(int i=0;i0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 searchDiag2(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);coord.x+=0.25*texelSize.x;vec3 t=vec3(texelSize,1.0);for(int i=0;i0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;e=decodeDiagBilinearAccess(e);coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 areaDiag(const in vec2 dist,const in vec2 e,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE_DIAG,AREATEX_MAX_DISTANCE_DIAG)*e+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.x+=0.5;texCoord.y+=AREATEX_SUBTEX_SIZE*offset;return texture2D(areaTexture,texCoord).rg;}vec2 calculateDiagWeights(const in vec2 texCoord,const in vec2 e,const in vec4 subsampleIndices){vec2 weights=vec2(0.0);vec4 d;vec2 end;if(e.r>0.0){d.xz=searchDiag1(texCoord,vec2(-1.0,1.0),end);d.x+=float(end.y>0.9);}else{d.xz=vec2(0.0);}d.yw=searchDiag1(texCoord,vec2(1.0,-1.0),end);if(d.x+d.y>2.0){vec4 coords=vec4(-d.x+0.25,d.x,d.y,-d.y-0.25)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.xy=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).rg;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).rg;c.yxwz=decodeDiagBilinearAccess(c.xyzw);vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.z);}d.xz=searchDiag2(texCoord,vec2(-1.0,-1.0),end);if(sampleLevelZeroOffset(inputBuffer,texCoord,vec2(1,0)).r>0.0){d.yw=searchDiag2(texCoord,vec2(1.0),end);d.y+=float(end.y>0.9);}else{d.yw=vec2(0.0);}if(d.x+d.y>2.0){vec4 coords=vec4(-d.x,-d.x,d.y,d.y)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.x=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).g;c.y=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(0,-1)).r;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).gr;vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.w).gr;}return weights;}float searchLength(const in vec2 e,const in float offset){vec2 scale=SEARCHTEX_SIZE*vec2(0.5,-1.0);vec2 bias=SEARCHTEX_SIZE*vec2(offset,1.0);scale+=vec2(-1.0,1.0);bias+=vec2(0.5,-0.5);scale*=1.0/SEARCHTEX_PACKED_SIZE;bias*=1.0/SEARCHTEX_PACKED_SIZE;return texture2D(searchTexture,scale*e+bias).r;}float searchXLeft(in vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;iend&&e.g>0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(-2.0,0.0)*texelSize+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.0)+3.25;return texelSize.x*offset+texCoord.x;}float searchXRight(vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;i0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(2.0,0.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.5)+3.25;return-texelSize.x*offset+texCoord.x;}float searchYUp(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;iend&&e.r>0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=-vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.0)+3.25;return texelSize.y*offset+texCoord.y;}float searchYDown(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;i0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.5)+3.25;return-texelSize.y*offset+texCoord.y;}vec2 area(const in vec2 dist,const in float e1,const in float e2,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE)*round(4.0*vec2(e1,e2))+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.y=AREATEX_SUBTEX_SIZE*offset+texCoord.y;return texture2D(areaTexture,texCoord).rg;}void detectHorizontalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){ +#if !defined(DISABLE_CORNER_DETECTION) +vec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,1)).r;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).r;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,-2)).r;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,-2)).r;weights*=clamp(factor,0.0,1.0); +#endif +}void detectVerticalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){ +#if !defined(DISABLE_CORNER_DETECTION) +vec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(1,0)).g;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).g;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(-2,0)).g;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(-2,1)).g;weights*=clamp(factor,0.0,1.0); +#endif +}void main(){vec4 weights=vec4(0.0);vec4 subsampleIndices=vec4(0.0);vec2 e=texture2D(inputBuffer,vUv).rg;if(e.g>0.0){ +#if !defined(DISABLE_DIAG_DETECTION) +weights.rg=calculateDiagWeights(vUv,e,subsampleIndices);if(weights.r==-weights.g){ +#endif +vec2 d;vec3 coords;coords.x=searchXLeft(vOffset[0].xy,vOffset[2].x);coords.y=vOffset[1].y;d.x=coords.x;float e1=texture2D(inputBuffer,coords.xy).r;coords.z=searchXRight(vOffset[0].zw,vOffset[2].y);d.y=coords.z;d=round(resolution.xx*d+-vPixCoord.xx);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.zy,vec2(1,0)).r;weights.rg=area(sqrtD,e1,e2,subsampleIndices.y);coords.y=vUv.y;detectHorizontalCornerPattern(weights.rg,coords.xyzy,d); +#if !defined(DISABLE_DIAG_DETECTION) +}else{e.r=0.0;} +#endif +}if(e.r>0.0){vec2 d;vec3 coords;coords.y=searchYUp(vOffset[1].xy,vOffset[2].z);coords.x=vOffset[0].x;d.x=coords.y;float e1=texture2D(inputBuffer,coords.xy).g;coords.z=searchYDown(vOffset[1].zw,vOffset[2].w);d.y=coords.z;d=round(resolution.yy*d-vPixCoord.yy);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.xz,vec2(0,1)).g;weights.ba=area(sqrtD,e1,e2,subsampleIndices.x);coords.x=vUv.x;detectVerticalCornerPattern(weights.ba,coords.xyxz,d);}gl_FragColor=weights;}`,af=`uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void main(){vUv=position.xy*0.5+0.5;vPixCoord=vUv*resolution;vOffset[0]=vUv.xyxy+texelSize.xyxy*vec4(-0.25,-0.125,1.25,-0.125);vOffset[1]=vUv.xyxy+texelSize.xyxy*vec4(-0.125,-0.25,-0.125,1.25);vOffset[2]=vec4(vOffset[0].xz,vOffset[1].yw)+vec4(-2.0,2.0,-2.0,2.0)*texelSize.xxyy*MAX_SEARCH_STEPS_FLOAT;gl_Position=vec4(position.xy,1.0,1.0);}`,of=class extends Ni{constructor(e=new V,t=new V){super({name:`SMAAWeightsMaterial`,defines:{MAX_SEARCH_STEPS_INT:`16`,MAX_SEARCH_STEPS_FLOAT:`16.0`,MAX_SEARCH_STEPS_DIAG_INT:`8`,MAX_SEARCH_STEPS_DIAG_FLOAT:`8.0`,CORNER_ROUNDING:`25`,CORNER_ROUNDING_NORM:`0.25`,AREATEX_MAX_DISTANCE:`16.0`,AREATEX_MAX_DISTANCE_DIAG:`20.0`,AREATEX_PIXEL_SIZE:`(1.0 / vec2(160.0, 560.0))`,AREATEX_SUBTEX_SIZE:`(1.0 / 7.0)`,SEARCHTEX_SIZE:`vec2(66.0, 33.0)`,SEARCHTEX_PACKED_SIZE:`vec2(64.0, 16.0)`},uniforms:{inputBuffer:new K(null),searchTexture:new K(null),areaTexture:new K(null),resolution:new K(t),texelSize:new K(e)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:rf,vertexShader:af})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get searchTexture(){return this.uniforms.searchTexture.value}set searchTexture(e){this.uniforms.searchTexture.value=e}get areaTexture(){return this.uniforms.areaTexture.value}set areaTexture(e){this.uniforms.areaTexture.value=e}setLookupTextures(e,t){this.searchTexture=e,this.areaTexture=t}get orthogonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_INT)}set orthogonalSearchSteps(e){let t=Math.min(Math.max(e,0),112);this.defines.MAX_SEARCH_STEPS_INT=t.toFixed(`0`),this.defines.MAX_SEARCH_STEPS_FLOAT=t.toFixed(`1`),this.needsUpdate=!0}setOrthogonalSearchSteps(e){this.orthogonalSearchSteps=e}get diagonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_DIAG_INT)}set diagonalSearchSteps(e){let t=Math.min(Math.max(e,0),20);this.defines.MAX_SEARCH_STEPS_DIAG_INT=t.toFixed(`0`),this.defines.MAX_SEARCH_STEPS_DIAG_FLOAT=t.toFixed(`1`),this.needsUpdate=!0}setDiagonalSearchSteps(e){this.diagonalSearchSteps=e}get diagonalDetection(){return this.defines.DISABLE_DIAG_DETECTION===void 0}set diagonalDetection(e){e?delete this.defines.DISABLE_DIAG_DETECTION:this.defines.DISABLE_DIAG_DETECTION=`1`,this.needsUpdate=!0}isDiagonalDetectionEnabled(){return this.diagonalDetection}setDiagonalDetectionEnabled(e){this.diagonalDetection=e}get cornerRounding(){return Number(this.defines.CORNER_ROUNDING)}set cornerRounding(e){let t=Math.min(Math.max(e,0),100);this.defines.CORNER_ROUNDING=t.toFixed(`4`),this.defines.CORNER_ROUNDING_NORM=(t/100).toFixed(`4`),this.needsUpdate=!0}setCornerRounding(e){this.cornerRounding=e}get cornerDetection(){return this.defines.DISABLE_CORNER_DETECTION===void 0}set cornerDetection(e){e?delete this.defines.DISABLE_CORNER_DETECTION:this.defines.DISABLE_CORNER_DETECTION=`1`,this.needsUpdate=!0}isCornerRoundingEnabled(){return this.cornerDetection}setCornerRoundingEnabled(e){this.cornerDetection=e}setSize(e,t){let n=this.uniforms;n.texelSize.value.set(1/e,1/t),n.resolution.value.set(e,t)}},sf=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAQCAYAAACm53kpAAAAeElEQVRYR+2XSwqAMAxEJ168ePEqwRSKhIIiuHjJqiU0gWE+1CQdApcVAMUAuARaMGCX1MIL/Ow13++9lW2s3mW9MWvsnWc/2fvGygwPAN4E8QzAA4CXAB6AHjG4JTHYI1ey3pcx6FHnEfhLDOIBKAmUBK6/ANUDTlROXAHd9EC1AAAAAElFTkSuQmCC`,cf=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAYAAAABNmBHAAAgAElEQVR4Xuy9CbhlV1ktOvbpq09DkiIkUBI6kxASIH0DlAQiIK1wRfSJTx+i4JX7vKIigs8HXpXvqVcvrcC9agQ7IDTSSWgqCQQliDRBJKkkhDSkqVPNqVOnP+8b//rH3P+eZ+199tlznVTlvVrft7+1T7OaueZY42/m37QALKNk2wHg1pITlB17mC+Pp11W3X/LHyT32vhg48/5SOv+PnwpsHA70JoGlueB1iKApeqzvOzn44GatTB76Xzhd7suBR7+WWADgDEAwwCG/L54b/poDLrHuvvm70Z2Avhsc+PVcxscBU8F8C8ADg5+ipIjD/PlGwfgju8B924E5seARUfLsiNmqQW0IjL8+7L2NYD/7COBzfcCm+aB8SVgdAkYIRCXKyDax4EdAanL5PuNPllNvXDlAHwFgP8AcC2AhRIoDXbsYb48dl5WkVFTE3LGDcC9m4CZCWBuFFgeAZaGAYJQQCRqDHT+McJrVb8zwATUXH02MHYfMHEIG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ewesFt7Rc/Gx8iWjUCjGCT1YvWT1MwgUqrf3NG45tTbcu0aximWx9xENcEQHGbcYAEwtSXSqY0gnCdgeuMI0cvuGx/FUGgFhwEYrR80QckWN+X0fjm1DwAWv8RgJFilJZBznz0pQg+AZAAlVWh1GvGka0XzB0cCQi30aSGVa9AF62fLOB7MhrfnJoPwPER59Px+o3e76mL5Kwp2G57xPl0kxc3er+nLvyKtLmhfUC78RHn081ONnq/pzcAR5xPR9mRRu/31IVgvgUccT4dNaobvd/TGYAjzqejumqj93s6A3DE+XRUg2VSCjdaGr3fUw+I+VPwiPPpqJjO8J1Nw43e7ymHwHoAKMFd7QErAeEE5NNJMb3R+z3lsGcNzgfgiPPpomJ6o/d76oGwPgCOKJ8uKqY3er+nKwBHmE+noqRG7/fUA199U/AI8+kEwEbv93QHoEhZTnA+nYqSGr3fBoAtaiqBUImdm5hPJwA2er+nKwBHnE+X1gUzSbnR+z11wPj/AeCpPDD3t7rvAAAAAElFTkSuQmCC`,lf=`uniform sampler2D weightMap;varying vec2 vOffset0;varying vec2 vOffset1;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 a;a.x=texture2D(weightMap,vOffset0).a;a.y=texture2D(weightMap,vOffset1).g;a.wz=texture2D(weightMap,uv).rb;vec4 color=inputColor;if(dot(a,vec4(1.0))>=1e-5){bool h=max(a.x,a.z)>max(a.y,a.w);vec4 blendingOffset=vec4(0.0,a.y,0.0,a.w);vec2 blendingWeight=a.yw;movec(bvec4(h),blendingOffset,vec4(a.x,0.0,a.z,0.0));movec(bvec2(h),blendingWeight,a.xz);blendingWeight/=dot(blendingWeight,vec2(1.0));vec4 blendingCoord=blendingOffset*vec4(texelSize,-texelSize)+uv.xyxy;color=blendingWeight.x*texture2D(inputBuffer,blendingCoord.xy);color+=blendingWeight.y*texture2D(inputBuffer,blendingCoord.zw);}outputColor=color;}`,uf=`varying vec2 vOffset0;varying vec2 vOffset1;void mainSupport(const in vec2 uv){vOffset0=uv+texelSize*vec2(1.0,0.0);vOffset1=uv+texelSize*vec2(0.0,1.0);}`,df=class extends Hl{constructor({blendFunction:e=X.SRC,preset:t=xd.MEDIUM,edgeDetectionMode:n=yd.COLOR,predicationMode:r=bd.DISABLED}={}){super(`SMAAEffect`,lf,{vertexShader:uf,blendFunction:e,attributes:El.CONVOLUTION|El.DEPTH,uniforms:new Map([[`weightMap`,new K(null)]])});let a,o;arguments.length>1&&(a=arguments[0],o=arguments[1],arguments.length>2&&(t=arguments[2]),arguments.length>3&&(n=arguments[3])),this.renderTargetEdges=new W(1,1,{depthBuffer:!1}),this.renderTargetEdges.texture.name=`SMAA.Edges`,this.renderTargetWeights=this.renderTargetEdges.clone(),this.renderTargetWeights.texture.name=`SMAA.Weights`,this.uniforms.get(`weightMap`).value=this.renderTargetWeights.texture,this.clearPass=new yl(!0,!1,!1),this.clearPass.overrideClearColor=new G(0),this.clearPass.overrideClearAlpha=1,this.edgeDetectionPass=new Au(new nf),this.edgeDetectionMaterial.edgeDetectionMode=n,this.edgeDetectionMaterial.predicationMode=r,this.weightsPass=new Au(new of);let c=new aa;c.onLoad=()=>{let e=new jt(a);e.name=`SMAA.Search`,e.magFilter=i,e.minFilter=i,e.generateMipmaps=!1,e.needsUpdate=!0,e.flipY=!0,this.weightsMaterial.searchTexture=e;let t=new jt(o);t.name=`SMAA.Area`,t.magFilter=s,t.minFilter=s,t.generateMipmaps=!1,t.needsUpdate=!0,t.flipY=!1,this.weightsMaterial.areaTexture=t,this.dispatchEvent({type:`load`})},c.itemStart(`search`),c.itemStart(`area`),a!==void 0&&o!==void 0?(c.itemEnd(`search`),c.itemEnd(`area`)):typeof Image<`u`&&(a=new Image,o=new Image,a.addEventListener(`load`,()=>c.itemEnd(`search`)),o.addEventListener(`load`,()=>c.itemEnd(`area`)),a.src=sf,o.src=cf),this.applyPreset(t)}get edgesTexture(){return this.renderTargetEdges.texture}getEdgesTexture(){return this.edgesTexture}get weightsTexture(){return this.renderTargetWeights.texture}getWeightsTexture(){return this.weightsTexture}get edgeDetectionMaterial(){return this.edgeDetectionPass.fullscreenMaterial}get colorEdgesMaterial(){return this.edgeDetectionMaterial}getEdgeDetectionMaterial(){return this.edgeDetectionMaterial}get weightsMaterial(){return this.weightsPass.fullscreenMaterial}getWeightsMaterial(){return this.weightsMaterial}setEdgeDetectionThreshold(e){this.edgeDetectionMaterial.edgeDetectionThreshold=e}setOrthogonalSearchSteps(e){this.weightsMaterial.orthogonalSearchSteps=e}applyPreset(e){let t=this.edgeDetectionMaterial,n=this.weightsMaterial;switch(e){case xd.LOW:t.edgeDetectionThreshold=.15,n.orthogonalSearchSteps=4,n.diagonalDetection=!1,n.cornerDetection=!1;break;case xd.MEDIUM:t.edgeDetectionThreshold=.1,n.orthogonalSearchSteps=8,n.diagonalDetection=!1,n.cornerDetection=!1;break;case xd.HIGH:t.edgeDetectionThreshold=.1,n.orthogonalSearchSteps=16,n.diagonalSearchSteps=8,n.cornerRounding=25,n.diagonalDetection=!0,n.cornerDetection=!0;break;case xd.ULTRA:t.edgeDetectionThreshold=.05,n.orthogonalSearchSteps=32,n.diagonalSearchSteps=16,n.cornerRounding=25,n.diagonalDetection=!0,n.cornerDetection=!0}}setDepthTexture(e,t=L){this.edgeDetectionMaterial.depthBuffer=e,this.edgeDetectionMaterial.depthPacking=t}update(e,t,n){this.clearPass.render(e,this.renderTargetEdges),this.edgeDetectionPass.render(e,t,this.renderTargetEdges),this.weightsPass.render(e,this.renderTargetEdges,this.renderTargetWeights)}setSize(e,t){this.edgeDetectionMaterial.setSize(e,t),this.weightsMaterial.setSize(e,t),this.renderTargetEdges.setSize(e,t),this.renderTargetWeights.setSize(e,t)}dispose(){let{searchTexture:e,areaTexture:t}=this.weightsMaterial;e!==null&&t!==null&&(e.dispose(),t.dispose()),super.dispose()}static get searchImageDataURL(){return sf}static get areaImageDataURL(){return cf}};function ff(e,t,n){return e*(t-n)-t}function pf(e,t,n){return Math.min(Math.max((e+t)/(t-n),0),1)}var mf=`#include +#include +uniform vec2 cameraNearFar; +#define cameraNear cameraNearFar.x +#define cameraFar cameraNearFar.y +#ifdef NORMAL_DEPTH +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D normalDepthBuffer; +#else +uniform mediump sampler2D normalDepthBuffer; +#endif +float readDepth(const in vec2 uv){float depth=texture2D(normalDepthBuffer,uv).a; +#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH) +float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d; +#endif +return depth;} +#else +uniform lowp sampler2D normalBuffer; +#if DEPTH_PACKING == 3201 +uniform lowp sampler2D depthBuffer; +#elif defined(GL_FRAGMENT_PRECISION_HIGH) +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +float depth=unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +float depth=texture2D(depthBuffer,uv).r; +#endif +#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH) +float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d; +#endif +return depth;} +#endif +uniform lowp sampler2D noiseTexture;uniform mat4 inverseProjectionMatrix;uniform mat4 projectionMatrix;uniform vec2 texelSize;uniform float intensity;uniform float minRadiusScale;uniform float fade;uniform float bias;uniform vec2 distanceCutoff;uniform vec2 proximityCutoff;varying vec2 vUv;varying vec2 vUv2;float getViewZ(const in float depth){ +#ifdef PERSPECTIVE_CAMERA +return perspectiveDepthToViewZ(depth,cameraNear,cameraFar); +#else +return orthographicDepthToViewZ(depth,cameraNear,cameraFar); +#endif +}vec3 getViewPosition(const in vec2 screenPosition,const in float depth,const in float viewZ){vec4 clipPosition=vec4(vec3(screenPosition,depth)*2.0-1.0,1.0);float clipW=projectionMatrix[2][3]*viewZ+projectionMatrix[3][3];clipPosition*=clipW;return(inverseProjectionMatrix*clipPosition).xyz;}float getAmbientOcclusion(const in vec3 p,const in vec3 n,const in float depth,const in vec2 uv){float radiusScale=1.0-smoothstep(0.0,distanceCutoff.y,depth);radiusScale=radiusScale*(1.0-minRadiusScale)+minRadiusScale;float radius=RADIUS*radiusScale;float noise=texture2D(noiseTexture,vUv2).r;float baseAngle=noise*PI2;float rings=SPIRAL_TURNS*PI2;float occlusion=0.0;int taps=0;for(int i=0;i1.0||coords.t<0.0||coords.t>1.0){continue;}float sampleDepth=readDepth(coords);float viewZ=getViewZ(sampleDepth); +#ifdef PERSPECTIVE_CAMERA +float linearSampleDepth=viewZToOrthographicDepth(viewZ,cameraNear,cameraFar); +#else +float linearSampleDepth=sampleDepth; +#endif +float proximity=abs(depth-linearSampleDepth);if(proximity +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +#ifdef DOWNSAMPLE_NORMALS +uniform lowp sampler2D normalBuffer; +#endif +varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +return unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +return texture2D(depthBuffer,uv).r; +#endif +}int findBestDepth(const in float samples[4]){float c=(samples[0]+samples[1]+samples[2]+samples[3])*0.25;float distances[4];distances[0]=abs(c-samples[0]);distances[1]=abs(c-samples[1]);distances[2]=abs(c-samples[2]);distances[3]=abs(c-samples[3]);float maxDistance=max(max(distances[0],distances[1]),max(distances[2],distances[3]));int remaining[3];int rejected[3];int i,j,k;for(i=0,j=0,k=0;i<4;++i){if(distances[i]this.setSize(c.baseWidth,c.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}setDepthTexture(e,t=L){this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t}render(e,t,n,r,i){e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height),this.fullscreenMaterial.setSize(e,t)}initialize(e,t,n){let r=e.getContext();if(!(r.getExtension(`EXT_color_buffer_float`)||r.getExtension(`EXT_color_buffer_half_float`)))throw Error(`Rendering to float texture is not supported.`)}},xf=`uniform lowp sampler2D aoBuffer;uniform float luminanceInfluence;uniform float intensity; +#if defined(DEPTH_AWARE_UPSAMPLING) && defined(NORMAL_DEPTH) +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D normalDepthBuffer; +#else +uniform mediump sampler2D normalDepthBuffer; +#endif +#endif +#ifdef COLORIZE +uniform vec3 color; +#endif +void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){float aoLinear=texture2D(aoBuffer,uv).r; +#if defined(DEPTH_AWARE_UPSAMPLING) && defined(NORMAL_DEPTH) && __VERSION__ == 300 +vec4 normalDepth[4];normalDepth[0]=textureOffset(normalDepthBuffer,uv,ivec2(0,0));normalDepth[1]=textureOffset(normalDepthBuffer,uv,ivec2(0,1));normalDepth[2]=textureOffset(normalDepthBuffer,uv,ivec2(1,0));normalDepth[3]=textureOffset(normalDepthBuffer,uv,ivec2(1,1));float dot01=dot(normalDepth[0].rgb,normalDepth[1].rgb);float dot02=dot(normalDepth[0].rgb,normalDepth[2].rgb);float dot03=dot(normalDepth[0].rgb,normalDepth[3].rgb);float minDot=min(dot01,min(dot02,dot03));float s=step(THRESHOLD,minDot);float smallestDistance=1.0;int index;for(int i=0;i<4;++i){float distance=abs(depth-normalDepth[i].a);if(distancethis.setSize(ee.baseWidth,ee.baseHeight)),this.camera=e,this.depthDownsamplingPass=new bf({normalBuffer:n,resolutionScale:C}),this.depthDownsamplingPass.enabled=o===null,this.ssaoPass=new Au(new gf(e));let k=new Uu(Sf,Sf,T);k.wrapS=k.wrapT=t;let A=this.ssaoMaterial;A.normalBuffer=n,A.noiseTexture=k,A.minRadiusScale=g,A.samples=i,A.radius=v,A.rings=a,A.fade=x,A.bias=b,A.distanceThreshold=f,A.distanceFalloff=p,A.proximityThreshold=m,A.proximityFalloff=h,c!==void 0&&(A.worldDistanceThreshold=c),l!==void 0&&(A.worldDistanceFalloff=l),u!==void 0&&(A.worldProximityThreshold=u),d!==void 0&&(A.worldProximityFalloff=d),o!==null&&(this.ssaoMaterial.normalDepthBuffer=o,this.defines.set(`NORMAL_DEPTH`,`1`)),this.depthAwareUpsampling=s,this.color=S}set mainCamera(e){this.camera=e,this.ssaoMaterial.copyCameraSettings(e)}get normalBuffer(){return this.ssaoMaterial.normalBuffer}set normalBuffer(e){this.ssaoMaterial.normalBuffer=e,this.depthDownsamplingPass.fullscreenMaterial.normalBuffer=e}getResolution(){return this.resolution}get ssaoMaterial(){return this.ssaoPass.fullscreenMaterial}getSSAOMaterial(){return this.ssaoMaterial}get samples(){return this.ssaoMaterial.samples}set samples(e){this.ssaoMaterial.samples=e}get rings(){return this.ssaoMaterial.rings}set rings(e){this.ssaoMaterial.rings=e}get radius(){return this.ssaoMaterial.radius}set radius(e){this.ssaoMaterial.radius=e}get depthAwareUpsampling(){return this.defines.has(`DEPTH_AWARE_UPSAMPLING`)}set depthAwareUpsampling(e){this.depthAwareUpsampling!==e&&(e?this.defines.set(`DEPTH_AWARE_UPSAMPLING`,`1`):this.defines.delete(`DEPTH_AWARE_UPSAMPLING`),this.setChanged())}isDepthAwareUpsamplingEnabled(){return this.depthAwareUpsampling}setDepthAwareUpsamplingEnabled(e){this.depthAwareUpsampling=e}get distanceScaling(){return!0}set distanceScaling(e){}get color(){return this.uniforms.get(`color`).value}set color(e){let t=this.uniforms,n=this.defines;e===null?n.has(`COLORIZE`)&&(n.delete(`COLORIZE`),t.get(`color`).value=null,this.setChanged()):n.has(`COLORIZE`)?t.get(`color`).value.set(e):(n.set(`COLORIZE`,`1`),t.get(`color`).value=new G(e),this.setChanged())}get luminanceInfluence(){return this.uniforms.get(`luminanceInfluence`).value}set luminanceInfluence(e){this.uniforms.get(`luminanceInfluence`).value=e}get intensity(){return this.uniforms.get(`intensity`).value}set intensity(e){this.uniforms.get(`intensity`).value=e}getColor(){return this.color}setColor(e){this.color=e}setDistanceCutoff(e,t){this.ssaoMaterial.distanceThreshold=e,this.ssaoMaterial.distanceFalloff=t}setProximityCutoff(e,t){this.ssaoMaterial.proximityThreshold=e,this.ssaoMaterial.proximityFalloff=t}setDepthTexture(e,t=L){this.depthDownsamplingPass.setDepthTexture(e,t),this.ssaoMaterial.depthBuffer=e,this.ssaoMaterial.depthPacking=t}update(e,t,n){let r=this.renderTarget;this.depthDownsamplingPass.enabled&&this.depthDownsamplingPass.render(e),this.ssaoPass.render(e,null,r)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t);let r=n.width,i=n.height;this.ssaoMaterial.copyCameraSettings(this.camera),this.ssaoMaterial.setSize(r,i),this.renderTarget.setSize(r,i),this.depthDownsamplingPass.resolution.scale=n.scale,this.depthDownsamplingPass.setSize(e,t)}initialize(e,t,n){try{let r=this.uniforms.get(`normalDepthBuffer`).value;r===null&&(this.depthDownsamplingPass.initialize(e,t,n),r=this.depthDownsamplingPass.texture,this.uniforms.get(`normalDepthBuffer`).value=r,this.ssaoMaterial.normalDepthBuffer=r,this.defines.set(`NORMAL_DEPTH`,`1`))}catch{this.depthDownsamplingPass.enabled=!1}}},wf=`#ifdef TEXTURE_PRECISION_HIGH +uniform mediump sampler2D map; +#else +uniform lowp sampler2D map; +#endif +varying vec2 vUv2;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){ +#ifdef UV_TRANSFORM +vec4 texel=texture2D(map,vUv2); +#else +vec4 texel=texture2D(map,uv); +#endif +outputColor=TEXEL;outputColor.a=max(inputColor.a,outputColor.a);}`,Tf=`#ifdef ASPECT_CORRECTION +uniform float scale; +#else +uniform mat3 uvTransform; +#endif +varying vec2 vUv2;void mainSupport(const in vec2 uv){ +#ifdef ASPECT_CORRECTION +vUv2=uv*vec2(aspect,1.0)*scale; +#else +vUv2=(uvTransform*vec3(uv,1.0)).xy; +#endif +}`,Ef=class extends Hl{constructor({blendFunction:e,texture:t=null,aspectCorrection:n=!1}={}){super(`TextureEffect`,wf,{blendFunction:e,defines:new Map([[`TEXEL`,`texel`]]),uniforms:new Map([[`map`,new K(null)],[`scale`,new K(1)],[`uvTransform`,new K(null)]])}),this.texture=t,this.aspectCorrection=n}get texture(){return this.uniforms.get(`map`).value}set texture(e){let t=this.texture,n=this.uniforms,r=this.defines;t!==e&&(n.get(`map`).value=e,n.get(`uvTransform`).value=e.matrix,r.delete(`TEXTURE_PRECISION_HIGH`),e!==null&&(e.matrixAutoUpdate?(r.set(`UV_TRANSFORM`,`1`),this.setVertexShader(Tf)):(r.delete(`UV_TRANSFORM`),this.setVertexShader(null)),e.type!==1009&&r.set(`TEXTURE_PRECISION_HIGH`,`1`),(t===null||t.type!==e.type||t.encoding!==e.encoding)&&this.setChanged()))}getTexture(){return this.texture}setTexture(e){this.texture=e}get aspectCorrection(){return this.defines.has(`ASPECT_CORRECTION`)}set aspectCorrection(e){this.aspectCorrection!==e&&(e?this.defines.set(`ASPECT_CORRECTION`,`1`):this.defines.delete(`ASPECT_CORRECTION`),this.setChanged())}get uvTransform(){return this.texture!==null&&this.texture.matrixAutoUpdate}set uvTransform(e){this.texture!==null&&(this.texture.matrixAutoUpdate=e)}setTextureSwizzleRGBA(e,t=e,n=e,r=e){let i=`rgba`,a=``;(e!==Su.RED||t!==Su.GREEN||n!==Su.BLUE||r!==Su.ALPHA)&&(a=[`.`,i[e],i[t],i[n],i[r]].join(``)),this.defines.set(`TEXEL`,`texel`+a),this.setChanged()}update(e,t,n){let r=this.texture;r!==null&&r.matrixAutoUpdate&&r.updateMatrix()}},Df=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +uniform vec4 maskParams;varying vec2 vUv;varying vec2 vUv2;varying vec2 vOffset;float linearGradientMask(const in float x){return smoothstep(maskParams.x,maskParams.y,x)-smoothstep(maskParams.w,maskParams.z,x);}void main(){vec2 dUv=vOffset*(1.0-linearGradientMask(vUv2.y));vec4 sum=texture2D(inputBuffer,vec2(vUv.x-dUv.x,vUv.y+dUv.y));sum+=texture2D(inputBuffer,vec2(vUv.x+dUv.x,vUv.y+dUv.y));sum+=texture2D(inputBuffer,vec2(vUv.x+dUv.x,vUv.y-dUv.y));sum+=texture2D(inputBuffer,vec2(vUv.x-dUv.x,vUv.y-dUv.y));gl_FragColor=sum*0.25; +#include +}`,Of=`uniform vec4 texelSize;uniform float kernel;uniform float scale;uniform float aspect;uniform vec2 rotation;varying vec2 vUv;varying vec2 vUv2;varying vec2 vOffset;void main(){vec2 uv=position.xy*0.5+0.5;vUv=uv;vUv2=(uv-0.5)*2.0*vec2(aspect,1.0);vUv2=vec2(dot(rotation,vUv2),dot(rotation,vec2(vUv2.y,-vUv2.x)));vOffset=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;gl_Position=vec4(position.xy,1.0,1.0);}`,kf=class extends Yl{constructor({kernelSize:e=Gl.MEDIUM,offset:t=0,rotation:n=0,focusArea:r=.4,feather:i=.3}={}){super(),this.fragmentShader=Df,this.vertexShader=Of,this.kernelSize=e,this.uniforms.aspect=new K(1),this.uniforms.rotation=new K(new V),this.uniforms.maskParams=new K(new Mt),this._offset=t,this._focusArea=r,this._feather=i,this.rotation=n,this.updateParams()}updateParams(){let e=this.uniforms.maskParams.value,t=Math.max(this.focusArea,0),n=Math.max(t-this.feather,0);e.set(this.offset-t,this.offset-n,this.offset+t,this.offset+n)}get rotation(){return Math.acos(this.uniforms.rotation.value.x)}set rotation(e){this.uniforms.rotation.value.set(Math.cos(e),Math.sin(e))}get offset(){return this._offset}set offset(e){this._offset=e,this.updateParams()}get focusArea(){return this._focusArea}set focusArea(e){this._focusArea=e,this.updateParams()}get feather(){return this._feather}set feather(e){this._feather=e,this.updateParams()}setSize(e,t){super.setSize(e,t),this.uniforms.aspect.value=e/t}},Af=class extends Xl{constructor({offset:e=0,rotation:t=0,focusArea:n=.4,feather:r=.3,kernelSize:i=Gl.MEDIUM,resolutionScale:a=.5,resolutionX:o=Y.AUTO_SIZE,resolutionY:s=Y.AUTO_SIZE}={}){super({kernelSize:i,resolutionScale:a,resolutionX:o,resolutionY:s}),this.blurMaterial=new kf({kernelSize:i,offset:e,rotation:t,focusArea:n,feather:r})}},jf=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D map; +#else +uniform lowp sampler2D map; +#endif +uniform vec2 maskParams;varying vec2 vUv2;float linearGradientMask(const in float x){return step(maskParams.x,x)-step(maskParams.y,x);}void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){float mask=linearGradientMask(vUv2.y);vec4 texel=texture2D(map,uv);outputColor=mix(texel,inputColor,mask);}`,Mf=`uniform vec2 rotation;varying vec2 vUv2;void mainSupport(const in vec2 uv){vUv2=(uv-0.5)*2.0*vec2(aspect,1.0);vUv2=vec2(dot(rotation,vUv2),dot(rotation,vec2(vUv2.y,-vUv2.x)));}`,Nf=class extends Hl{constructor({blendFunction:e,offset:t=0,rotation:n=0,focusArea:r=.4,feather:i=.3,kernelSize:a=Gl.MEDIUM,resolutionScale:o=.5,resolutionX:s=Y.AUTO_SIZE,resolutionY:c=Y.AUTO_SIZE}={}){super(`TiltShiftEffect`,jf,{vertexShader:Mf,blendFunction:e,uniforms:new Map([[`rotation`,new K(new V)],[`maskParams`,new K(new V)],[`map`,new K(null)]])}),this._offset=t,this._focusArea=r,this._feather=i,this.renderTarget=new W(1,1,{depthBuffer:!1}),this.renderTarget.texture.name=`TiltShift.Target`,this.uniforms.get(`map`).value=this.renderTarget.texture,this.blurPass=new Af({kernelSize:a,resolutionScale:o,resolutionX:s,resolutionY:c,offset:t,rotation:n,focusArea:r,feather:i});let l=this.resolution=new Y(this,s,c,o);l.addEventListener(`change`,e=>this.setSize(l.baseWidth,l.baseHeight)),this.rotation=n,this.updateParams()}updateParams(){let e=this.uniforms.get(`maskParams`).value,t=Math.max(this.focusArea-this.feather,0);e.set(this.offset-t,this.offset+t)}get rotation(){return Math.acos(this.uniforms.get(`rotation`).value.x)}set rotation(e){this.uniforms.get(`rotation`).value.set(Math.cos(e),Math.sin(e)),this.blurPass.blurMaterial.rotation=e}get offset(){return this._offset}set offset(e){this._offset=e,this.blurPass.blurMaterial.offset=e,this.updateParams()}get focusArea(){return this._focusArea}set focusArea(e){this._focusArea=e,this.blurPass.blurMaterial.focusArea=e,this.updateParams()}get feather(){return this._feather}set feather(e){this._feather=e,this.blurPass.blurMaterial.feather=e,this.updateParams()}get bias(){return 0}set bias(e){}update(e,t,n){this.blurPass.render(e,t,this.renderTarget)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height),this.blurPass.resolution.copy(n)}initialize(e,t,n){this.blurPass.initialize(e,t,n),n!==void 0&&(this.renderTarget.texture.type=n,e!==null&&e.outputColorSpace===`srgb`&&(this.renderTarget.texture.colorSpace=Be))}},Pf=`#include +#define packFloatToRGBA(v) packDepthToRGBA(v) +#define unpackRGBAToFloat(v) unpackRGBAToDepth(v) +uniform lowp sampler2D luminanceBuffer0;uniform lowp sampler2D luminanceBuffer1;uniform float minLuminance;uniform float deltaTime;uniform float tau;varying vec2 vUv;void main(){float l0=unpackRGBAToFloat(texture2D(luminanceBuffer0,vUv)); +#if __VERSION__ < 300 +float l1=texture2DLodEXT(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r; +#else +float l1=textureLod(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r; +#endif +l0=max(minLuminance,l0);l1=max(minLuminance,l1);float adaptedLum=l0+(l1-l0)*(1.0-exp(-deltaTime*tau));gl_FragColor=(adaptedLum==1.0)?vec4(1.0):packFloatToRGBA(adaptedLum);}`,Ff=class extends Ni{constructor(){super({name:`AdaptiveLuminanceMaterial`,defines:{MIP_LEVEL_1X1:`0.0`},uniforms:{luminanceBuffer0:new K(null),luminanceBuffer1:new K(null),minLuminance:new K(.01),deltaTime:new K(0),tau:new K(1)},extensions:{shaderTextureLOD:!0},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Pf,vertexShader:hl})}set luminanceBuffer0(e){this.uniforms.luminanceBuffer0.value=e}setLuminanceBuffer0(e){this.uniforms.luminanceBuffer0.value=e}set luminanceBuffer1(e){this.uniforms.luminanceBuffer1.value=e}setLuminanceBuffer1(e){this.uniforms.luminanceBuffer1.value=e}set mipLevel1x1(e){this.defines.MIP_LEVEL_1X1=e.toFixed(1),this.needsUpdate=!0}setMipLevel1x1(e){this.mipLevel1x1=e}set deltaTime(e){this.uniforms.deltaTime.value=e}setDeltaTime(e){this.uniforms.deltaTime.value=e}get minLuminance(){return this.uniforms.minLuminance.value}set minLuminance(e){this.uniforms.minLuminance.value=e}getMinLuminance(){return this.uniforms.minLuminance.value}setMinLuminance(e){this.uniforms.minLuminance.value=e}get adaptationRate(){return this.uniforms.tau.value}set adaptationRate(e){this.uniforms.tau.value=e}getAdaptationRate(){return this.uniforms.tau.value}setAdaptationRate(e){this.uniforms.tau.value=e}},If=class extends fl{constructor(e,{minLuminance:t=.01,adaptationRate:n=1}={}){super(`AdaptiveLuminancePass`),this.fullscreenMaterial=new Ff,this.needsSwap=!1,this.renderTargetPrevious=new W(1,1,{minFilter:i,magFilter:i,depthBuffer:!1}),this.renderTargetPrevious.texture.name=`Luminance.Previous`;let r=this.fullscreenMaterial;r.luminanceBuffer0=this.renderTargetPrevious.texture,r.luminanceBuffer1=e,r.minLuminance=t,r.adaptationRate=n,this.renderTargetAdapted=this.renderTargetPrevious.clone(),this.renderTargetAdapted.texture.name=`Luminance.Adapted`,this.copyPass=new _l(this.renderTargetPrevious,!1)}get texture(){return this.renderTargetAdapted.texture}getTexture(){return this.renderTargetAdapted.texture}set mipLevel1x1(e){this.fullscreenMaterial.mipLevel1x1=e}get adaptationRate(){return this.fullscreenMaterial.adaptationRate}set adaptationRate(e){this.fullscreenMaterial.adaptationRate=e}render(e,t,n,r,i){this.fullscreenMaterial.deltaTime=r,e.setRenderTarget(this.renderToScreen?null:this.renderTargetAdapted),e.render(this.scene,this.camera),this.copyPass.render(e,this.renderTargetAdapted)}},Lf=`#include +uniform float whitePoint; +#if TONE_MAPPING_MODE == 2 || TONE_MAPPING_MODE == 3 +uniform float middleGrey; +#if TONE_MAPPING_MODE == 3 +uniform lowp sampler2D luminanceBuffer; +#else +uniform float averageLuminance; +#endif +vec3 Reinhard2ToneMapping(vec3 color){color*=toneMappingExposure;float l=luminance(color); +#if TONE_MAPPING_MODE == 3 +float lumAvg=unpackRGBAToFloat(texture2D(luminanceBuffer,vec2(0.5))); +#else +float lumAvg=averageLuminance; +#endif +float lumScaled=(l*middleGrey)/max(lumAvg,1e-6);float lumCompressed=lumScaled*(1.0+lumScaled/(whitePoint*whitePoint));lumCompressed/=(1.0+lumScaled);return clamp(lumCompressed*color,0.0,1.0);} +#elif TONE_MAPPING_MODE == 4 +#define A 0.15 +#define B 0.50 +#define C 0.10 +#define D 0.20 +#define E 0.02 +#define F 0.30 +vec3 Uncharted2Helper(const in vec3 x){return((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;}vec3 Uncharted2ToneMapping(vec3 color){color*=toneMappingExposure;return clamp(Uncharted2Helper(color)/Uncharted2Helper(vec3(whitePoint)),0.0,1.0);} +#endif +void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){ +#if TONE_MAPPING_MODE == 2 || TONE_MAPPING_MODE == 3 +outputColor=vec4(Reinhard2ToneMapping(inputColor.rgb),inputColor.a); +#elif TONE_MAPPING_MODE == 4 +outputColor=vec4(Uncharted2ToneMapping(inputColor.rgb),inputColor.a); +#else +outputColor=vec4(toneMapping(inputColor.rgb),inputColor.a); +#endif +}`,Rf=class extends Hl{constructor({blendFunction:e=X.SRC,adaptive:t=!1,mode:n=t?Sd.REINHARD2_ADAPTIVE:Sd.AGX,resolution:r=256,maxLuminance:i=4,whitePoint:a=i,middleGrey:o=.6,minLuminance:s=.01,averageLuminance:c=1,adaptationRate:u=1}={}){super(`ToneMappingEffect`,Lf,{blendFunction:e,uniforms:new Map([[`luminanceBuffer`,new K(null)],[`maxLuminance`,new K(i)],[`whitePoint`,new K(a)],[`middleGrey`,new K(o)],[`averageLuminance`,new K(c)]])}),this.renderTargetLuminance=new W(1,1,{minFilter:l,depthBuffer:!1}),this.renderTargetLuminance.texture.generateMipmaps=!0,this.renderTargetLuminance.texture.name=`Luminance`,this.luminancePass=new $l({renderTarget:this.renderTargetLuminance}),this.adaptiveLuminancePass=new If(this.luminancePass.texture,{minLuminance:s,adaptationRate:u}),this.uniforms.get(`luminanceBuffer`).value=this.adaptiveLuminancePass.texture,this.resolution=r,this.mode=n}get mode(){return Number(this.defines.get(`TONE_MAPPING_MODE`))}set mode(e){if(this.mode===e)return;let t=`186`.replace(/\D+/g,``)>=168?`CineonToneMapping(texel)`:`OptimizedCineonToneMapping(texel)`;switch(this.defines.clear(),this.defines.set(`TONE_MAPPING_MODE`,e.toFixed(0)),e){case Sd.LINEAR:this.defines.set(`toneMapping(texel)`,`LinearToneMapping(texel)`);break;case Sd.REINHARD:this.defines.set(`toneMapping(texel)`,`ReinhardToneMapping(texel)`);break;case Sd.CINEON:case Sd.OPTIMIZED_CINEON:this.defines.set(`toneMapping(texel)`,t);break;case Sd.ACES_FILMIC:this.defines.set(`toneMapping(texel)`,`ACESFilmicToneMapping(texel)`);break;case Sd.AGX:this.defines.set(`toneMapping(texel)`,`AgXToneMapping(texel)`);break;case Sd.NEUTRAL:this.defines.set(`toneMapping(texel)`,`NeutralToneMapping(texel)`);break;default:this.defines.set(`toneMapping(texel)`,`texel`)}this.adaptiveLuminancePass.enabled=e===Sd.REINHARD2_ADAPTIVE,this.setChanged()}getMode(){return this.mode}setMode(e){this.mode=e}get whitePoint(){return this.uniforms.get(`whitePoint`).value}set whitePoint(e){this.uniforms.get(`whitePoint`).value=e}get middleGrey(){return this.uniforms.get(`middleGrey`).value}set middleGrey(e){this.uniforms.get(`middleGrey`).value=e}get averageLuminance(){return this.uniforms.get(`averageLuminance`).value}set averageLuminance(e){this.uniforms.get(`averageLuminance`).value=e}get adaptiveLuminanceMaterial(){return this.adaptiveLuminancePass.fullscreenMaterial}getAdaptiveLuminanceMaterial(){return this.adaptiveLuminanceMaterial}get resolution(){return this.luminancePass.resolution.width}set resolution(e){let t=Math.max(0,Math.ceil(Math.log2(e))),n=2**t;this.luminancePass.resolution.setPreferredSize(n,n),this.adaptiveLuminanceMaterial.mipLevel1x1=t}getResolution(){return this.resolution}setResolution(e){this.resolution=e}get adaptive(){return this.mode===Sd.REINHARD2_ADAPTIVE}set adaptive(e){this.mode=e?Sd.REINHARD2_ADAPTIVE:Sd.REINHARD2}get adaptationRate(){return this.adaptiveLuminanceMaterial.adaptationRate}set adaptationRate(e){this.adaptiveLuminanceMaterial.adaptationRate=e}get distinction(){return console.warn(this.name,`distinction was removed.`),1}set distinction(e){console.warn(this.name,`distinction was removed.`)}update(e,t,n){this.adaptiveLuminancePass.enabled&&(this.luminancePass.render(e,t),this.adaptiveLuminancePass.render(e,null,null,n))}initialize(e,t,n){this.adaptiveLuminancePass.initialize(e,t,n)}},zf=`uniform float offset;uniform float darkness;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){const vec2 center=vec2(0.5);vec3 color=inputColor.rgb; +#if VIGNETTE_TECHNIQUE == 0 +float d=distance(uv,center);color*=smoothstep(0.8,offset*0.799,d*(darkness+offset)); +#else +vec2 coord=(uv-center)*vec2(offset);color=mix(color,vec3(1.0-darkness),dot(coord,coord)); +#endif +outputColor=vec4(color,inputColor.a);}`,Bf=class extends Hl{constructor({blendFunction:e,eskil:t=!1,technique:n=t?Cd.ESKIL:Cd.DEFAULT,offset:r=.5,darkness:i=.5}={}){super(`VignetteEffect`,zf,{blendFunction:e,defines:new Map([[`VIGNETTE_TECHNIQUE`,n.toFixed(0)]]),uniforms:new Map([[`offset`,new K(r)],[`darkness`,new K(i)]])})}get technique(){return Number(this.defines.get(`VIGNETTE_TECHNIQUE`))}set technique(e){this.technique!==e&&(this.defines.set(`VIGNETTE_TECHNIQUE`,e.toFixed(0)),this.setChanged())}get eskil(){return this.technique===Cd.ESKIL}set eskil(e){this.technique=e?Cd.ESKIL:Cd.DEFAULT}getTechnique(){return this.technique}setTechnique(e){this.technique=e}get offset(){return this.uniforms.get(`offset`).value}set offset(e){this.uniforms.get(`offset`).value=e}getOffset(){return this.offset}setOffset(e){this.offset=e}get darkness(){return this.uniforms.get(`darkness`).value}set darkness(e){this.uniforms.get(`darkness`).value=e}getDarkness(){return this.darkness}setDarkness(e){this.darkness=e}},Vf=class extends sa{load(e,t=()=>{},n=()=>{},r=null){let i=this.manager,a=new aa,o=new ua(a);o.setPath(this.path),o.setResponseType(`text`),i.itemStart(e),o.load(e,n=>{try{let r=this.parse(n);i.itemEnd(e),t(r)}catch(t){a.onError(e),r(t)}},n)}loadAsync(e,t=()=>{}){let n=this.manager,r=new aa;return new Promise((i,a)=>{r.onError=e=>{n.itemError(e),a(`Failed to load ${e}`)},this.load(e,i,t)})}parse(e){let t=/^[\d ]+$/m,n=/^([\d.e+-]+) +([\d.e+-]+) +([\d.e+-]+) *$/gm,r=t.exec(e);if(r===null)throw Error(`Missing grid information`);let i=r[0].trim().split(/\s+/g).map(e=>Number(e)),a=i[1]-i[0],o=i.length,s=o**2;for(let e=1,t=i.length;e{},n=()=>{},r=null){let i=this.manager,a=new aa,o=new ua(a);o.setPath(this.path),o.setResponseType(`text`),o.load(e,n=>{try{let r=this.parse(n);i.itemEnd(e),t(r)}catch(t){a.onError(e),r(t)}},n)}loadAsync(e,t=()=>{}){let n=this.manager,r=new aa;return new Promise((i,a)=>{r.onError=e=>{n.itemError(e),a(`Failed to load ${e}`)},this.load(e,i,t)})}parse(e){let t=/TITLE +"([^"]*)"/,n=/LUT_3D_SIZE +(\d+)/,r=/DOMAIN_MIN +([\d.]+) +([\d.]+) +([\d.]+)/,i=/DOMAIN_MAX +([\d.]+) +([\d.]+) +([\d.]+)/,a=/^([\d.e+-]+) +([\d.e+-]+) +([\d.e+-]+) *$/gm,o=t.exec(e),s=o===null?null:o[1];if(o=n.exec(e),o===null)throw Error(`Missing LUT_3D_SIZE information`);let c=Number(o[1]),l=new Float32Array(c**3*4),u=new H(0,0,0),d=new H(1,1,1);if(o=r.exec(e),o!==null&&u.set(Number(o[1]),Number(o[2]),Number(o[3])),o=i.exec(e),o!==null&&d.set(Number(o[1]),Number(o[2]),Number(o[3])),u.x>d.x||u.y>d.y||u.z>d.z)throw u.set(0,0,0),d.set(1,1,1),Error(`Invalid input domain`);let f=0;for(;(o=a.exec(e))!==null;)l[f++]=Number(o[1]),l[f++]=Number(o[2]),l[f++]=Number(o[3]),l[f++]=1;let p=new md(l,c);return p.domainMin.copy(u),p.domainMax.copy(d),s!==null&&(p.name=s),p}},Uf=class extends sa{load(e=()=>{},t=null){arguments.length===4?(e=arguments[1],t=arguments[3]):(arguments.length===3||typeof arguments[0]!=`function`)&&(e=arguments[1],t=null);let n=this.manager,r=new aa;return new Promise((i,a)=>{let o=new Image,s=new Image;r.onError=e=>{n.itemError(e),t===null?a(`Failed to load ${e}`):(t(`Failed to load ${e}`),i())},r.onLoad=()=>{let t=[o,s];e(t),i(t)},o.addEventListener(`error`,e=>{r.itemError(`smaa-search`)}),s.addEventListener(`error`,e=>{r.itemError(`smaa-area`)}),o.addEventListener(`load`,()=>{n.itemEnd(`smaa-search`),r.itemEnd(`smaa-search`)}),s.addEventListener(`load`,()=>{n.itemEnd(`smaa-area`),r.itemEnd(`smaa-area`)}),n.itemStart(`smaa-search`),n.itemStart(`smaa-area`),r.itemStart(`smaa-search`),r.itemStart(`smaa-area`),o.src=sf,s.src=cf})}},Wf=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#ifdef BILATERAL +#include +uniform vec2 cameraNearFar; +#define cameraNear cameraNearFar.x +#define cameraFar cameraNearFar.y +#ifdef NORMAL_DEPTH +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D normalDepthBuffer; +#else +uniform mediump sampler2D normalDepthBuffer; +#endif +float readDepth(const in vec2 uv){float depth=texture2D(normalDepthBuffer,uv).a; +#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH) +float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d; +#elif defined(USE_REVERSED_DEPTH_BUFFER) +depth=1.0-depth; +#endif +return depth;} +#else +#if DEPTH_PACKING == 3201 +uniform lowp sampler2D depthBuffer; +#elif defined(GL_FRAGMENT_PRECISION_HIGH) +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +float depth=unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +float depth=texture2D(depthBuffer,uv).r; +#endif +#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH) +float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d; +#elif defined(USE_REVERSED_DEPTH_BUFFER) +depth=1.0-depth; +#endif +return depth;} +#endif +float getViewZ(const in float depth){ +#ifdef PERSPECTIVE_CAMERA +return perspectiveDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); +#else +return orthographicDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); +#endif +} +#ifdef PERSPECTIVE_CAMERA +#define linearDepth(v) viewZToOrthographicDepth(getViewZ(readDepth(v)), cameraNearFar.x, cameraNearFar.y) +#else +#define linearDepth(v) readDepth(v) +#endif +#endif +#define getTexel(v) texture2D(inputBuffer, v) +#if KERNEL_SIZE == 3 +varying vec2 vUv00,vUv01,vUv02;varying vec2 vUv03,vUv04,vUv05;varying vec2 vUv06,vUv07,vUv08; +#elif KERNEL_SIZE == 5 && MAX_VARYING_VECTORS >= 13 +varying vec2 vUv00,vUv01,vUv02,vUv03,vUv04;varying vec2 vUv05,vUv06,vUv07,vUv08,vUv09;varying vec2 vUv10,vUv11,vUv12,vUv13,vUv14;varying vec2 vUv15,vUv16,vUv17,vUv18,vUv19;varying vec2 vUv20,vUv21,vUv22,vUv23,vUv24; +#else +uniform vec2 texelSize;uniform float scale;varying vec2 vUv; +#endif +void main(){ +#if KERNEL_SIZE == 3 +vec4 c[]=vec4[KERNEL_SIZE_SQ](getTexel(vUv00),getTexel(vUv01),getTexel(vUv02),getTexel(vUv03),getTexel(vUv04),getTexel(vUv05),getTexel(vUv06),getTexel(vUv07),getTexel(vUv08)); +#ifdef BILATERAL +float z[]=float[KERNEL_SIZE_SQ](linearDepth(vUv00),linearDepth(vUv01),linearDepth(vUv02),linearDepth(vUv03),linearDepth(vUv04),linearDepth(vUv05),linearDepth(vUv06),linearDepth(vUv07),linearDepth(vUv08)); +#endif +#elif KERNEL_SIZE == 5 && MAX_VARYING_VECTORS >= 13 +vec4 c[]=vec4[KERNEL_SIZE_SQ](getTexel(vUv00),getTexel(vUv01),getTexel(vUv02),getTexel(vUv03),getTexel(vUv04),getTexel(vUv05),getTexel(vUv06),getTexel(vUv07),getTexel(vUv08),getTexel(vUv09),getTexel(vUv10),getTexel(vUv11),getTexel(vUv12),getTexel(vUv13),getTexel(vUv14),getTexel(vUv15),getTexel(vUv16),getTexel(vUv17),getTexel(vUv18),getTexel(vUv19),getTexel(vUv20),getTexel(vUv21),getTexel(vUv22),getTexel(vUv23),getTexel(vUv24)); +#ifdef BILATERAL +float z[]=float[KERNEL_SIZE_SQ](linearDepth(vUv00),linearDepth(vUv01),linearDepth(vUv02),linearDepth(vUv03),linearDepth(vUv04),linearDepth(vUv05),linearDepth(vUv06),linearDepth(vUv07),linearDepth(vUv08),linearDepth(vUv09),linearDepth(vUv10),linearDepth(vUv11),linearDepth(vUv12),linearDepth(vUv13),linearDepth(vUv14),linearDepth(vUv15),linearDepth(vUv16),linearDepth(vUv17),linearDepth(vUv18),linearDepth(vUv19),linearDepth(vUv20),linearDepth(vUv21),linearDepth(vUv22),linearDepth(vUv23),linearDepth(vUv24)); +#endif +#endif +vec4 result=vec4(0.0); +#ifdef BILATERAL +float w=0.0; +#if KERNEL_SIZE == 3 || (KERNEL_SIZE == 5 && MAX_VARYING_VECTORS >= 13) +float centerDepth=z[KERNEL_SIZE_SQ_HALF];for(int i=0;i= 13) +for(int i=0;i= 13 +varying vec2 vUv00,vUv01,vUv02,vUv03,vUv04;varying vec2 vUv05,vUv06,vUv07,vUv08,vUv09;varying vec2 vUv10,vUv11,vUv12,vUv13,vUv14;varying vec2 vUv15,vUv16,vUv17,vUv18,vUv19;varying vec2 vUv20,vUv21,vUv22,vUv23,vUv24; +#else +varying vec2 vUv; +#endif +void main(){vec2 uv=position.xy*0.5+0.5; +#if KERNEL_SIZE == 3 +vec2 s=texelSize*scale;vUv00=uv+s*vec2(-1.0,-1.0);vUv01=uv+s*vec2(0.0,-1.0);vUv02=uv+s*vec2(1.0,-1.0);vUv03=uv+s*vec2(-1.0,0.0);vUv04=uv;vUv05=uv+s*vec2(1.0,0.0);vUv06=uv+s*vec2(-1.0,1.0);vUv07=uv+s*vec2(0.0,1.0);vUv08=uv+s*vec2(1.0,1.0); +#elif KERNEL_SIZE == 5 +vec2 s=texelSize*scale;vUv00=uv+s*vec2(-2.0,-2.0);vUv01=uv+s*vec2(-1.0,-2.0);vUv02=uv+s*vec2(0.0,-2.0);vUv03=uv+s*vec2(1.0,-2.0);vUv04=uv+s*vec2(2.0,-2.0);vUv05=uv+s*vec2(-2.0,-1.0);vUv06=uv+s*vec2(-1.0,-1.0);vUv07=uv+s*vec2(0.0,-1.0);vUv08=uv+s*vec2(1.0,-1.0);vUv09=uv+s*vec2(2.0,-1.0);vUv10=uv+s*vec2(-2.0,0.0);vUv11=uv+s*vec2(-1.0,0.0);vUv12=uv;vUv13=uv+s*vec2(1.0,0.0);vUv14=uv+s*vec2(2.0,0.0);vUv15=uv+s*vec2(-2.0,1.0);vUv16=uv+s*vec2(-1.0,1.0);vUv17=uv+s*vec2(0.0,1.0);vUv18=uv+s*vec2(1.0,1.0);vUv19=uv+s*vec2(2.0,1.0);vUv20=uv+s*vec2(-2.0,2.0);vUv21=uv+s*vec2(-1.0,2.0);vUv22=uv+s*vec2(0.0,2.0);vUv23=uv+s*vec2(1.0,2.0);vUv24=uv+s*vec2(2.0,2.0); +#else +vUv=uv; +#endif +gl_Position=vec4(position.xy,1.0,1.0);}`,Kf=class extends Ni{constructor({bilateral:e=!1,kernelSize:t=5}={}){super({name:`BoxBlurMaterial`,defines:{DEPTH_PACKING:`0`,DISTANCE_THRESHOLD:`0.1`},uniforms:{inputBuffer:new K(null),depthBuffer:new K(null),normalDepthBuffer:new K(null),texelSize:new K(new V),cameraNearFar:new K(new V),scale:new K(1)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Wf,vertexShader:Gf}),this.bilateral=e,this.kernelSize=t,this.maxVaryingVectors=8}set maxVaryingVectors(e){this.defines.MAX_VARYING_VECTORS=e.toFixed(0)}get kernelSize(){return Number(this.defines.KERNEL_SIZE)}set kernelSize(e){if(e%2==0)throw Error(`The kernel size must be an odd number`);this.defines.KERNEL_SIZE=e.toFixed(0),this.defines.KERNEL_SIZE_HALF=Math.floor(e/2).toFixed(0),this.defines.KERNEL_SIZE_SQ=(e**2).toFixed(0),this.defines.KERNEL_SIZE_SQ_HALF=Math.floor(e**2/2).toFixed(0),this.defines.INV_KERNEL_SIZE_SQ=(1/e**2).toFixed(6),this.needsUpdate=!0}get scale(){return this.uniforms.scale.value}set scale(e){this.uniforms.scale.value=e}get near(){return this.uniforms.cameraNearFar.value.x}get far(){return this.uniforms.cameraNearFar.value.y}set inputBuffer(e){this.uniforms.inputBuffer.value=e}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set normalDepthBuffer(e){this.uniforms.normalDepthBuffer.value=e,e===null?delete this.defines.NORMAL_DEPTH:this.defines.NORMAL_DEPTH=`1`,this.needsUpdate=!0}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}get bilateral(){return this.defines.BILATERAL!==void 0}set bilateral(e){e===null?delete this.defines.BILATERAL:this.defines.BILATERAL=`1`,this.needsUpdate=!0}get worldDistanceThreshold(){return-ff(Number(this.defines.DISTANCE_THRESHOLD),this.near,this.far)}set worldDistanceThreshold(e){let t=pf(-e,this.near,this.far);this.defines.DISTANCE_THRESHOLD=t.toFixed(12),this.needsUpdate=!0}copyCameraSettings(e){e&&(this.uniforms.cameraNearFar.value.set(e.near,e.far),e instanceof va?this.defines.PERSPECTIVE_CAMERA=`1`:delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},qf=`#include +varying vec2 vUv; +#ifdef NORMAL_DEPTH +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D normalDepthBuffer; +#else +uniform mediump sampler2D normalDepthBuffer; +#endif +float readDepth(const in vec2 uv){return texture2D(normalDepthBuffer,uv).a;} +#else +#if INPUT_DEPTH_PACKING == 3201 +uniform lowp sampler2D depthBuffer; +#elif defined(GL_FRAGMENT_PRECISION_HIGH) +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +float readDepth(const in vec2 uv){ +#if INPUT_DEPTH_PACKING == 3201 +return unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +return texture2D(depthBuffer,uv).r; +#endif +} +#endif +void main(){ +#if INPUT_DEPTH_PACKING == OUTPUT_DEPTH_PACKING +gl_FragColor=texture2D(depthBuffer,vUv); +#else +float depth=readDepth(vUv); +#if OUTPUT_DEPTH_PACKING == 3201 +gl_FragColor=(depth==1.0)?vec4(1.0):packDepthToRGBA(depth); +#else +gl_FragColor=vec4(vec3(depth),1.0); +#endif +#endif +}`,Jf=`varying vec2 vUv; +#if DEPTH_COPY_MODE == 1 +uniform vec2 texelPosition; +#endif +void main(){ +#if DEPTH_COPY_MODE == 1 +vUv=texelPosition; +#else +vUv=position.xy*0.5+0.5; +#endif +gl_Position=vec4(position.xy,1.0,1.0);}`,Yf=class extends Ni{constructor(){super({name:`DepthCopyMaterial`,defines:{INPUT_DEPTH_PACKING:`0`,OUTPUT_DEPTH_PACKING:`0`,DEPTH_COPY_MODE:`0`},uniforms:{depthBuffer:new K(null),texelPosition:new K(new V)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:qf,vertexShader:Jf}),this.depthCopyMode=_d.FULL}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set inputDepthPacking(e){this.defines.INPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}get outputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}set outputDepthPacking(e){this.defines.OUTPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=L){this.depthBuffer=e,this.inputDepthPacking=t}getInputDepthPacking(){return Number(this.defines.INPUT_DEPTH_PACKING)}setInputDepthPacking(e){this.defines.INPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}getOutputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}setOutputDepthPacking(e){this.defines.OUTPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}get texelPosition(){return this.uniforms.texelPosition.value}getTexelPosition(){return this.uniforms.texelPosition.value}setTexelPosition(e){this.uniforms.texelPosition.value=e}get mode(){return this.depthCopyMode}set mode(e){this.depthCopyMode=e,this.defines.DEPTH_COPY_MODE=e.toFixed(0),this.needsUpdate=!0}getMode(){return this.mode}setMode(e){this.mode=e}},Xf=`#include +#include +#include +#define packFloatToRGBA(v) packDepthToRGBA(v) +#define unpackRGBAToFloat(v) unpackRGBAToDepth(v) +#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#if DEPTH_PACKING == 3201 +uniform lowp sampler2D depthBuffer; +#elif defined(GL_FRAGMENT_PRECISION_HIGH) +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;vec4 sRGBToLinear(const in vec4 value){return vec4(mix(pow(value.rgb*0.9478672986+vec3(0.0521327014),vec3(2.4)),value.rgb*0.0773993808,vec3(lessThanEqual(value.rgb,vec3(0.04045)))),value.a);}float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +float depth=unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +float depth=texture2D(depthBuffer,uv).r; +#endif +#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH) +float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d; +#elif defined(USE_REVERSED_DEPTH_BUFFER) +depth=1.0-depth; +#endif +return depth;}float getViewZ(const in float depth){ +#ifdef PERSPECTIVE_CAMERA +return perspectiveDepthToViewZ(depth,cameraNear,cameraFar); +#else +return orthographicDepthToViewZ(depth,cameraNear,cameraFar); +#endif +}vec3 RGBToHCV(const in vec3 RGB){vec4 P=mix(vec4(RGB.bg,-1.0,2.0/3.0),vec4(RGB.gb,0.0,-1.0/3.0),step(RGB.b,RGB.g));vec4 Q=mix(vec4(P.xyw,RGB.r),vec4(RGB.r,P.yzx),step(P.x,RGB.r));float C=Q.x-min(Q.w,Q.y);float H=abs((Q.w-Q.y)/(6.0*C+EPSILON)+Q.z);return vec3(H,C,Q.x);}vec3 RGBToHSL(const in vec3 RGB){vec3 HCV=RGBToHCV(RGB);float L=HCV.z-HCV.y*0.5;float S=HCV.y/(1.0-abs(L*2.0-1.0)+EPSILON);return vec3(HCV.x,S,L);}vec3 HueToRGB(const in float H){float R=abs(H*6.0-3.0)-1.0;float G=2.0-abs(H*6.0-2.0);float B=2.0-abs(H*6.0-4.0);return clamp(vec3(R,G,B),0.0,1.0);}vec3 HSLToRGB(const in vec3 HSL){vec3 RGB=HueToRGB(HSL.x);float C=(1.0-abs(2.0*HSL.z-1.0))*HSL.y;return(RGB-0.5)*C+HSL.z;}FRAGMENT_HEAD void main(){FRAGMENT_MAIN_UV vec4 color0=texture2D(inputBuffer,UV);vec4 color1=vec4(0.0);FRAGMENT_MAIN_IMAGE color0.a=clamp(color0.a,0.0,1.0);gl_FragColor=color0; +#ifdef ENCODE_OUTPUT +#include +#endif +#include +}`,Zf=`uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEAD void main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORT gl_Position=vec4(position.xy,1.0,1.0);}`,Qf=class extends Ni{constructor(e,t,n,r,i=!1){super({name:`EffectMaterial`,defines:{THREE_REVISION:`186`.replace(/\D+/g,``),DEPTH_PACKING:`0`,ENCODE_OUTPUT:`1`},uniforms:{inputBuffer:new K(null),depthBuffer:new K(null),resolution:new K(new V),texelSize:new K(new V),cameraNear:new K(.3),cameraFar:new K(1e3),aspect:new K(1),time:new K(0)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,dithering:i}),e&&this.setShaderParts(e),t&&this.setDefines(t),n&&this.setUniforms(n),this.copyCameraSettings(r)}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){this.uniforms.depthBuffer.value=e}get depthPacking(){return Number(this.defines.DEPTH_PACKING)}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=L){this.depthBuffer=e,this.depthPacking=t}setShaderData(e){this.setShaderParts(e.shaderParts),this.setDefines(e.defines),this.setUniforms(e.uniforms),this.setExtensions(e.extensions)}setShaderParts(e){return this.fragmentShader=Xf.replace(Dl.FRAGMENT_HEAD,e.get(Dl.FRAGMENT_HEAD)||``).replace(Dl.FRAGMENT_MAIN_UV,e.get(Dl.FRAGMENT_MAIN_UV)||``).replace(Dl.FRAGMENT_MAIN_IMAGE,e.get(Dl.FRAGMENT_MAIN_IMAGE)||``),this.vertexShader=Zf.replace(Dl.VERTEX_HEAD,e.get(Dl.VERTEX_HEAD)||``).replace(Dl.VERTEX_MAIN_SUPPORT,e.get(Dl.VERTEX_MAIN_SUPPORT)||``),this.needsUpdate=!0,this}setDefines(e){for(let t of e.entries())this.defines[t[0]]=t[1];return this.needsUpdate=!0,this}setUniforms(e){for(let t of e.entries())this.uniforms[t[0]]=t[1];return this}setExtensions(e){this.extensions={};for(let t of e)this.extensions[t]=!0;return this}get encodeOutput(){return this.defines.ENCODE_OUTPUT!==void 0}set encodeOutput(e){this.encodeOutput!==e&&(e?this.defines.ENCODE_OUTPUT=`1`:delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}isOutputEncodingEnabled(e){return this.encodeOutput}setOutputEncodingEnabled(e){this.encodeOutput=e}get time(){return this.uniforms.time.value}set time(e){this.uniforms.time.value=e}setDeltaTime(e){this.uniforms.time.value+=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof va?this.defines.PERSPECTIVE_CAMERA=`1`:delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(e,t){let n=this.uniforms;n.resolution.value.set(e,t),n.texelSize.value.set(1/e,1/t),n.aspect.value=e/t}static get Section(){return Dl}},$f=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +uniform vec2 kernel[STEPS];varying vec2 vOffset;varying vec2 vUv;void main(){vec4 result=texture2D(inputBuffer,vUv)*kernel[0].y;for(int i=1;i +}`,ep=`uniform vec2 texelSize;uniform vec2 direction;uniform float scale;varying vec2 vOffset;varying vec2 vUv;void main(){vOffset=direction*texelSize*scale;vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}`,tp=class extends Ni{constructor({kernelSize:e=35}={}){super({name:`GaussianBlurMaterial`,uniforms:{inputBuffer:new K(null),texelSize:new K(new V),direction:new K(new V),kernel:new K(null),scale:new K(1)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:$f,vertexShader:ep}),this._kernelSize=0,this.kernelSize=e}set inputBuffer(e){this.uniforms.inputBuffer.value=e}get kernelSize(){return this._kernelSize}set kernelSize(e){this._kernelSize=e,this.generateKernel(e)}get direction(){return this.uniforms.direction.value}get scale(){return this.uniforms.scale.value}set scale(e){this.uniforms.scale.value=e}generateKernel(e){let t=new Al(e),n=t.linearSteps,r=new Float64Array(n*2);for(let e=0,i=0;ethis.setSize(o.baseWidth,o.baseHeight)),this.iterations=t}set mainCamera(e){this.blurMaterial.copyCameraSettings(e)}setDepthTexture(e,t=L){this.blurMaterial.depthBuffer=e,this.blurMaterial.depthPacking=t}render(e,t,n,r,i){let a=this.scene,o=this.camera,s=this.renderTargetA,c=this.renderTargetB,l=this.blurMaterial;this.fullscreenMaterial=l;let u=t;for(let t=0,n=Math.max(this.iterations,1);t=167?sp:op;return(e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3])/255}var lp=class extends rp{constructor({depthPacking:e=ze,mode:t=_d.SINGLE}={}){if(e!==3201&&e!==3200)throw Error(`Unsupported depth packing: ${e}`);super({depthPacking:e}),this.name=`DepthPickingPass`,this.fullscreenMaterial.mode=t,this.pixelBuffer=e===3201?new Uint8Array(4):new Float32Array(4),this.callback=null}readDepth(e){return this.fullscreenMaterial.texelPosition.set(e.x*.5+.5,e.y*.5+.5),new Promise(e=>{this.callback=e})}render(e,t,n,r,i){let a=this.fullscreenMaterial,o=a.mode;if(o===_d.FULL&&super.render(e),this.callback!==null){let t=this.renderTarget,n=this.pixelBuffer,r=t.texture.type!==g,i=0,s=0;if(o===_d.SINGLE)super.render(e);else{let e=a.texelPosition;i=Math.round(e.x*t.width),s=Math.round(e.y*t.height)}e.readRenderTargetPixels(t,i,s,1,1,n),this.callback(r?cp(n):n[0]),this.callback=null}}setSize(e,t){this.fullscreenMaterial.mode===_d.FULL&&super.setSize(e,t)}};function up(e,t,n){for(let r of t){let t=`$1`+e+r.charAt(0).toUpperCase()+r.slice(1),i=RegExp(`([^\\.])(\\b`+r+`\\b)`,`g`);for(let e of n.entries())e[1]!==null&&n.set(e[0],e[1].replace(i,t))}}function dp(e,t,n){let r=t.getFragmentShader(),i=t.getVertexShader(),a=r!==void 0&&/mainImage/.test(r),o=r!==void 0&&/mainUv/.test(r);if(n.attributes|=t.getAttributes(),r===void 0)throw Error(`Missing fragment shader (${t.name})`);if(o&&(n.attributes&El.CONVOLUTION)!==0)throw Error(`Effects that transform UVs are incompatible with convolution effects (${t.name})`);if(!a&&!o)throw Error(`Could not find mainImage or mainUv function (${t.name})`);{let s=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,c=n.shaderParts,l=c.get(Dl.FRAGMENT_HEAD)||``,u=c.get(Dl.FRAGMENT_MAIN_UV)||``,d=c.get(Dl.FRAGMENT_MAIN_IMAGE)||``,f=c.get(Dl.VERTEX_HEAD)||``,p=c.get(Dl.VERTEX_MAIN_SUPPORT)||``,m=new Set,h=new Set;if(o&&(u+=` ${e}MainUv(UV); +`,n.uvTransformation=!0),i!==null&&/mainSupport/.test(i)){let t=/mainSupport *\([\w\s]*?uv\s*?\)/.test(i);p+=` ${e}MainSupport(`,p+=t?`vUv); +`:`); +`;for(let e of i.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g))for(let t of e[1].split(/\s*,\s*/))n.varyings.add(t),m.add(t),h.add(t);for(let e of i.matchAll(s))h.add(e[1])}for(let e of r.matchAll(s))h.add(e[1]);for(let e of t.defines.keys())h.add(e.replace(/\([\w\s,]*\)/g,``));for(let e of t.uniforms.keys())h.add(e);h.delete(`while`),h.delete(`for`),h.delete(`if`),t.uniforms.forEach((t,r)=>n.uniforms.set(e+r.charAt(0).toUpperCase()+r.slice(1),t)),t.defines.forEach((t,r)=>n.defines.set(e+r.charAt(0).toUpperCase()+r.slice(1),t));let g=new Map([[`fragment`,r],[`vertex`,i]]);up(e,h,n.defines),up(e,h,g),r=g.get(`fragment`),i=g.get(`vertex`);let _=t.blendMode;if(n.blendModes.set(_.blendFunction,_),a){t.inputColorSpace!==null&&t.inputColorSpace!==n.colorSpace&&(d+=t.inputColorSpace===`srgb`?`color0 = sRGBTransferOETF(color0); + `:`color0 = sRGBToLinear(color0); + `),t.outputColorSpace===``?t.inputColorSpace!==null&&(n.colorSpace=t.inputColorSpace):n.colorSpace=t.outputColorSpace,d+=`${e}MainImage(color0, UV, `,(n.attributes&El.DEPTH)!==0&&/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/.test(r)&&(d+=`depth, `,n.readDepth=!0),d+=`color1); + `;let i=e+`BlendOpacity`;n.uniforms.set(i,_.opacity),d+=`color0 = blend${_.blendFunction}(color0, color1, ${i}); + + `,l+=`uniform float ${i}; + +`}if(l+=r+` +`,i!==null&&(f+=i+` +`),c.set(Dl.FRAGMENT_HEAD,l),c.set(Dl.FRAGMENT_MAIN_UV,u),c.set(Dl.FRAGMENT_MAIN_IMAGE,d),c.set(Dl.VERTEX_HEAD,f),c.set(Dl.VERTEX_MAIN_SUPPORT,p),t.extensions!==null)for(let e of t.extensions)n.extensions.add(e)}}var fp=class extends fl{constructor(e,...t){super(`EffectPass`),this.fullscreenMaterial=new Qf(null,null,null,e),this.listener=e=>this.handleEvent(e),this.effects=[],this.setEffects(t),this.skipRendering=!1,this.minTime=1,this.maxTime=1/0,this.timeScale=1}set mainScene(e){for(let t of this.effects)t.mainScene=e}set mainCamera(e){this.fullscreenMaterial.copyCameraSettings(e);for(let t of this.effects)t.mainCamera=e}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(e){this.fullscreenMaterial.encodeOutput=e}get dithering(){return this.fullscreenMaterial.dithering}set dithering(e){let t=this.fullscreenMaterial;t.dithering=e,t.needsUpdate=!0}setEffects(e){for(let e of this.effects)e.removeEventListener(`change`,this.listener);this.effects=e.sort((e,t)=>t.attributes-e.attributes);for(let e of this.effects)e.addEventListener(`change`,this.listener)}updateMaterial(){let e=new Ol,t=0;for(let n of this.effects)if(n.blendMode.blendFunction===X.DST)e.attributes|=n.getAttributes()&El.DEPTH;else if((e.attributes&n.getAttributes()&El.CONVOLUTION)!==0)throw Error(`Convolution effects cannot be merged (${n.name})`);else dp(`e`+t++,n,e);let n=e.shaderParts.get(Dl.FRAGMENT_HEAD),r=e.shaderParts.get(Dl.FRAGMENT_MAIN_IMAGE),i=e.shaderParts.get(Dl.FRAGMENT_MAIN_UV),a=/\bblend\b/g;for(let t of e.blendModes.values())n+=t.getShaderCode().replace(a,`blend${t.blendFunction}`)+` +`;(e.attributes&El.DEPTH)===0?this.needsDepthTexture=!1:(e.readDepth&&(r=`float depth = readDepth(UV); + + `+r),this.needsDepthTexture=this.getDepthTexture()===null),e.colorSpace===`srgb`&&(r+=`color0 = sRGBToLinear(color0); + `),e.uvTransformation?(i=`vec2 transformedUv = vUv; +`+i,e.defines.set(`UV`,`transformedUv`)):e.defines.set(`UV`,`vUv`),e.shaderParts.set(Dl.FRAGMENT_HEAD,n),e.shaderParts.set(Dl.FRAGMENT_MAIN_IMAGE,r),e.shaderParts.set(Dl.FRAGMENT_MAIN_UV,i);for(let[t,n]of e.shaderParts)n!==null&&e.shaderParts.set(t,n.trim().replace(/^#/,` +#`));this.skipRendering=t===0,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(e)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(e,t=L){this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t;for(let n of this.effects)n.setDepthTexture(e,t)}render(e,t,n,r,i){for(let n of this.effects)n.update(e,t,r);if(!this.skipRendering||this.renderToScreen){let i=this.fullscreenMaterial;i.inputBuffer=t.texture,i.time+=r*this.timeScale,e.setRenderTarget(this.renderToScreen?null:n),e.render(this.scene,this.camera)}}setSize(e,t){this.fullscreenMaterial.setSize(e,t);for(let n of this.effects)n.setSize(e,t)}initialize(e,t,n){this.renderer=e;for(let r of this.effects)r.initialize(e,t,n);this.updateMaterial(),n!==void 0&&n!==1009&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH=`1`)}dispose(){super.dispose();for(let e of this.effects)e.removeEventListener(`change`,this.listener),e.dispose()}handleEvent(e){e.type===`change`&&this.recompile()}},pp=class extends fl{constructor({kernelSize:e=35,iterations:t=1,resolutionScale:n=1,resolutionX:r=Y.AUTO_SIZE,resolutionY:i=Y.AUTO_SIZE}={}){super(`GaussianBlurPass`),this.renderTargetA=new W(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name=`Blur.Target.A`,this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name=`Blur.Target.B`,this.blurMaterial=new tp({kernelSize:e}),this.copyMaterial=new gl,this.copyMaterial.inputBuffer=this.renderTargetB.texture;let a=this.resolution=new Y(this,r,i,n);a.addEventListener(`change`,e=>this.setSize(a.baseWidth,a.baseHeight)),this.iterations=t}render(e,t,n,r,i){let a=this.scene,o=this.camera,s=this.renderTargetA,c=this.renderTargetB,l=this.blurMaterial;this.fullscreenMaterial=l;let u=t;for(let t=0,n=Math.max(this.iterations,1);t1&&(u=c);this.fullscreenMaterial=this.copyMaterial,e.setRenderTarget(this.renderToScreen?null:n),e.render(a,o)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t);let r=n.width,i=n.height;this.renderTargetA.setSize(r,i),this.renderTargetB.setSize(r,i),this.blurMaterial.setSize(e,t)}initialize(e,t,n){n!==void 0&&(this.renderTargetA.texture.type=n,this.renderTargetB.texture.type=n,n===1009?e!==null&&e.outputColorSpace===`srgb`&&(this.renderTargetA.texture.colorSpace=Be,this.renderTargetB.texture.colorSpace=Be):(this.blurMaterial.defines.FRAMEBUFFER_PRECISION_HIGH=`1`,this.copyMaterial.defines.FRAMEBUFFER_PRECISION_HIGH=`1`))}},mp=class extends fl{constructor(e){super(`LambdaPass`,null,null),this.needsSwap=!1,this.f=e}render(e,t,n,r,i){this.f()}},hp=class extends fl{constructor(e,t,{renderTarget:n,resolutionScale:r=1,width:a=Y.AUTO_SIZE,height:o=Y.AUTO_SIZE,resolutionX:s=a,resolutionY:c=o}={}){super(`NormalPass`),this.needsSwap=!1,this.renderPass=new Xu(e,t,new Fi);let l=this.renderPass;l.ignoreBackground=!0,l.skipShadowMapUpdate=!0;let u=l.getClearPass();u.overrideClearColor=new G(7829503),u.overrideClearAlpha=1,this.renderTarget=n,this.renderTarget===void 0&&(this.renderTarget=new W(1,1,{minFilter:i,magFilter:i}),this.renderTarget.texture.name=`NormalPass.Target`);let d=this.resolution=new Y(this,s,c,r);d.addEventListener(`change`,e=>this.setSize(d.baseWidth,d.baseHeight))}set mainScene(e){this.renderPass.mainScene=e}set mainCamera(e){this.renderPass.mainCamera=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,n,r,i){let a=this.renderToScreen?null:this.renderTarget;this.renderPass.render(e,a,a)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}},gp=[new Float32Array(3),new Float32Array(3)],_p=[new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3)],vp=[[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1])]];function yp(e,t,n,r){let i=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=e[0]-t[0],c=e[1]-t[1],l=e[2]-t[2],u=a*l-o*c,d=o*s-i*l,f=i*c-a*s,p=Math.sqrt(u*u+d*d+f*f),m=p*.5,h=u/p,g=d/p,_=f/p,v=-(e[0]*h+e[1]*g+e[2]*_),y=r[0]*h+r[1]*g+r[2]*_;return Math.abs(y+v)*m/3}function bp(e,t,n,r,i,a){let o=(n+r*t+i*t*t)*4;a[0]=e[o+0],a[1]=e[o+1],a[2]=e[o+2]}function xp(e,t,n,r,i,a){let o=n*(t-1),s=r*(t-1),c=i*(t-1),l=Math.floor(o),u=Math.floor(s),d=Math.floor(c),f=Math.ceil(o),p=Math.ceil(s),m=Math.ceil(c),h=o-l,g=s-u,_=c-d;if(l===o&&u===s&&d===c)bp(e,t,o,s,c,a);else{let n;h>=g&&g>=_?n=vp[0]:h>=_&&_>=g?n=vp[1]:_>=h&&h>=g?n=vp[2]:g>=h&&h>=_?n=vp[3]:g>=_&&_>=h?n=vp[4]:_>=g&&g>=h&&(n=vp[5]);let[r,i,o,s]=n,c=gp[0];c[0]=h,c[1]=g,c[2]=_;let v=gp[1],y=f-l,b=p-u,x=m-d;v[0]=y*r[0]+l,v[1]=b*r[1]+u,v[2]=x*r[2]+d,bp(e,t,v[0],v[1],v[2],_p[0]),v[0]=y*i[0]+l,v[1]=b*i[1]+u,v[2]=x*i[2]+d,bp(e,t,v[0],v[1],v[2],_p[1]),v[0]=y*o[0]+l,v[1]=b*o[1]+u,v[2]=x*o[2]+d,bp(e,t,v[0],v[1],v[2],_p[2]),v[0]=y*s[0]+l,v[1]=b*s[1]+u,v[2]=x*s[2]+d,bp(e,t,v[0],v[1],v[2],_p[3]);let S=yp(i,o,s,c)*6,C=yp(r,o,s,c)*6,w=yp(r,i,s,c)*6,T=yp(r,i,o,c)*6;_p[0][0]*=S,_p[0][1]*=S,_p[0][2]*=S,_p[1][0]*=C,_p[1][1]*=C,_p[1][2]*=C,_p[2][0]*=w,_p[2][1]*=w,_p[2][2]*=w,_p[3][0]*=T,_p[3][1]*=T,_p[3][2]*=T,a[0]=_p[0][0]+_p[1][0]+_p[2][0]+_p[3][0],a[1]=_p[0][1]+_p[1][1]+_p[2][1]+_p[3][1],a[2]=_p[0][2]+_p[1][2]+_p[2][2]+_p[3][2]}}var Sp=class{static expand(e,t){let n=Math.cbrt(e.length/4),r=new Float32Array(3),i=new e.constructor(t**3*4),a=e instanceof Uint8Array?255:1,o=t**2,s=1/(t-1);for(let c=0;c=e&&ce&&l<=n){if(Math.sign(u)===Math.sign(d)||Math.abs(u)<1e-4||Math.abs(d)<1e-4){let e=(u+d)/2;e<0?(a[0]=Math.abs(e),a[1]=0):(a[0]=0,a[1]=Math.abs(e))}else{let r=-t*o/s+e,i=Math.trunc(r),c=r>e?u*(r-i)/2:0,l=rMath.abs(l)?c:-l)<0?(a[0]=Math.abs(c),a[1]=Math.abs(l)):(a[0]=Math.abs(l),a[1]=Math.abs(c))}}else a[0]=0,a[1]=0;return a}function Ip(e,t,n,r,i){let a=Cp[0],o=Cp[1],s=.5+r,c=.5+r-1,l=t+n+1;switch(e){case 0:i[0]=0,i[1]=0;break;case 1:t<=n?Fp(0,c,l/2,0,t,i):(i[0]=0,i[1]=0);break;case 2:t>=n?Fp(l/2,0,l,c,t,i):(i[0]=0,i[1]=0);break;case 3:Fp(0,c,l/2,0,t,a),Fp(l/2,0,l,c,t,o),Pp(l,Cp),i[0]=a[0]+o[0],i[1]=a[1]+o[1];break;case 4:t<=n?Fp(0,s,l/2,0,t,i):(i[0]=0,i[1]=0);break;case 5:i[0]=0,i[1]=0;break;case 6:Math.abs(r)>0?(Fp(0,s,l,c,t,a),Fp(0,s,l/2,0,t,o),Fp(l/2,0,l,c,t,i),o[0]+=i[0],o[1]+=i[1],i[0]=(a[0]+o[0])/2,i[1]=(a[1]+o[1])/2):Fp(0,s,l,c,t,i);break;case 7:Fp(0,s,l,c,t,i);break;case 8:t>=n?Fp(l/2,0,l,s,t,i):(i[0]=0,i[1]=0);break;case 9:Math.abs(r)>0?(Fp(0,c,l,s,t,a),Fp(0,c,l/2,0,t,o),Fp(l/2,0,l,s,t,i),o[0]+=i[0],o[1]+=i[1],i[0]=(a[0]+o[0])/2,i[1]=(a[1]+o[1])/2):Fp(0,c,l,s,t,i);break;case 10:i[0]=0,i[1]=0;break;case 11:Fp(0,c,l,s,t,i);break;case 12:Fp(0,s,l/2,0,t,a),Fp(l/2,0,l,s,t,o),Pp(l,Cp),i[0]=a[0]+o[0],i[1]=a[1]+o[1];break;case 13:Fp(0,c,l,s,t,i);break;case 14:Fp(0,s,l,c,t,i);break;case 15:i[0]=0,i[1]=0}return i}function Lp(e,t,n,r,i,a){let o=e===n&&t===r;if(!o){let s=(e+n)/2,c=(t+r)/2,l=r-t,u=e-n;o=l*(i-s)+u*(a-c)>0}return o}function Rp(e,t,n,r,i,a){let o=0;for(let s=0;s0&&(t+=o[0],n+=o[1]),u>0&&(r+=o[0],i+=o[1]),s[0]=1-Rp(t,n,r,i,1+a,0+a),s[1]=Rp(t,n,r,i,1+a,1+a),s}function Bp(e,t,n,r,i){let a=Cp[0],o=Cp[1],s=t+n+1;switch(e){case 0:zp(e,1,1,1+s,1+s,t,r,a),zp(e,1,0,1+s,0+s,t,r,o),i[0]=(a[0]+o[0])/2,i[1]=(a[1]+o[1])/2;break;case 1:zp(e,1,0,0+s,0+s,t,r,a),zp(e,1,0,1+s,0+s,t,r,o),i[0]=(a[0]+o[0])/2,i[1]=(a[1]+o[1])/2;break;case 2:zp(e,0,0,1+s,0+s,t,r,a),zp(e,1,0,1+s,0+s,t,r,o),i[0]=(a[0]+o[0])/2,i[1]=(a[1]+o[1])/2;break;case 3:zp(e,1,0,1+s,0+s,t,r,i);break;case 4:zp(e,1,1,0+s,0+s,t,r,a),zp(e,1,1,1+s,0+s,t,r,o),i[0]=(a[0]+o[0])/2,i[1]=(a[1]+o[1])/2;break;case 5:zp(e,1,1,0+s,0+s,t,r,a),zp(e,1,0,1+s,0+s,t,r,o),i[0]=(a[0]+o[0])/2,i[1]=(a[1]+o[1])/2;break;case 6:zp(e,1,1,1+s,0+s,t,r,i);break;case 7:zp(e,1,1,1+s,0+s,t,r,a),zp(e,1,0,1+s,0+s,t,r,o),i[0]=(a[0]+o[0])/2,i[1]=(a[1]+o[1])/2;break;case 8:zp(e,0,0,1+s,1+s,t,r,a),zp(e,1,0,1+s,1+s,t,r,o),i[0]=(a[0]+o[0])/2,i[1]=(a[1]+o[1])/2;break;case 9:zp(e,1,0,1+s,1+s,t,r,i),zp(e,1,0,1+s,1+s,t,r,i);break;case 10:zp(e,0,0,1+s,1+s,t,r,a),zp(e,1,0,1+s,0+s,t,r,o),i[0]=(a[0]+o[0])/2,i[1]=(a[1]+o[1])/2;break;case 11:zp(e,1,0,1+s,1+s,t,r,a),zp(e,1,0,1+s,0+s,t,r,o),i[0]=(a[0]+o[0])/2,i[1]=(a[1]+o[1])/2;break;case 12:zp(e,1,1,1+s,1+s,t,r,i);break;case 13:zp(e,1,1,1+s,1+s,t,r,a),zp(e,1,0,1+s,1+s,t,r,o),i[0]=(a[0]+o[0])/2,i[1]=(a[1]+o[1])/2;break;case 14:zp(e,1,1,1+s,1+s,t,r,a),zp(e,1,1,1+s,0+s,t,r,o),i[0]=(a[0]+o[0])/2,i[1]=(a[1]+o[1])/2;break;case 15:zp(e,1,1,1+s,1+s,t,r,a),zp(e,1,0,1+s,0+s,t,r,o),i[0]=(a[0]+o[0])/2,i[1]=(a[1]+o[1])/2}return i}function Vp(e,t,n){let r=new Float32Array(2);for(let i=0,a=e.length;i{function q(t,a,s){let e=document.createElement("canvas"),n=e.getContext("2d");if(e.width=t,e.height=a,s instanceof Image)n.drawImage(s,0,0);else{let r=n.createImageData(t,a);r.data.set(s),n.putImageData(r,0,0)}return e}var F=class t{constructor(a=0,s=0,e=null){this.width=a,this.height=s,this.data=e}toCanvas(){return typeof document=="undefined"?null:q(this.width,this.height,this.data)}static from(a){let{width:s,height:e}=a,n;if(a instanceof Image){let r=q(s,e,a);r!==null&&(n=r.getContext("2d").getImageData(0,0,s,e).data)}else n=a.data;return new t(s,e,n)}};var M=[new Float32Array(2),new Float32Array(2)],D=16,W=20,I=30,j=32,v=new Float32Array([0,-.25,.25,-.125,.125,-.375,.375]),N=[new Float32Array([0,0]),new Float32Array([.25,-.25]),new Float32Array([-.25,.25]),new Float32Array([.125,-.125]),new Float32Array([-.125,.125])],z=[new Uint8Array([0,0]),new Uint8Array([3,0]),new Uint8Array([0,3]),new Uint8Array([3,3]),new Uint8Array([1,0]),new Uint8Array([4,0]),new Uint8Array([1,3]),new Uint8Array([4,3]),new Uint8Array([0,1]),new Uint8Array([3,1]),new Uint8Array([0,4]),new Uint8Array([3,4]),new Uint8Array([1,1]),new Uint8Array([4,1]),new Uint8Array([1,4]),new Uint8Array([4,4])],p=[new Uint8Array([0,0]),new Uint8Array([1,0]),new Uint8Array([0,2]),new Uint8Array([1,2]),new Uint8Array([2,0]),new Uint8Array([3,0]),new Uint8Array([2,2]),new Uint8Array([3,2]),new Uint8Array([0,1]),new Uint8Array([1,1]),new Uint8Array([0,3]),new Uint8Array([1,3]),new Uint8Array([2,1]),new Uint8Array([3,1]),new Uint8Array([2,3]),new Uint8Array([3,3])];function C(t,a,s){return t+(a-t)*s}function B(t){return Math.min(Math.max(t,0),1)}function _(t){let a=M[0],s=M[1],e=Math.sqrt(a[0]*2)*.5,n=Math.sqrt(a[1]*2)*.5,r=Math.sqrt(s[0]*2)*.5,o=Math.sqrt(s[1]*2)*.5,c=B(t/j);a[0]=C(e,a[0],c),a[1]=C(n,a[1],c),s[0]=C(r,s[0],c),s[1]=C(o,s[1],c)}function d(t,a,s,e,n,r){let o=s-t,c=e-a,h=n,i=n+1,w=a+c*(h-t)/o,b=a+c*(i-t)/o;if(h>=t&&ht&&i<=s)if(Math.sign(w)===Math.sign(b)||Math.abs(w)<1e-4||Math.abs(b)<1e-4){let g=(w+b)/2;g<0?(r[0]=Math.abs(g),r[1]=0):(r[0]=0,r[1]=Math.abs(g))}else{let g=-a*o/c+t,k=Math.trunc(g),m=g>t?w*(g-k)/2:0,U=gMath.abs(U)?m:-U)<0?(r[0]=Math.abs(m),r[1]=Math.abs(U)):(r[0]=Math.abs(U),r[1]=Math.abs(m))}else r[0]=0,r[1]=0;return r}function J(t,a,s,e,n){let r=M[0],o=M[1],c=.5+e,h=.5+e-1,i=a+s+1;switch(t){case 0:{n[0]=0,n[1]=0;break}case 1:{a<=s?d(0,h,i/2,0,a,n):(n[0]=0,n[1]=0);break}case 2:{a>=s?d(i/2,0,i,h,a,n):(n[0]=0,n[1]=0);break}case 3:{d(0,h,i/2,0,a,r),d(i/2,0,i,h,a,o),_(i,M),n[0]=r[0]+o[0],n[1]=r[1]+o[1];break}case 4:{a<=s?d(0,c,i/2,0,a,n):(n[0]=0,n[1]=0);break}case 5:{n[0]=0,n[1]=0;break}case 6:{Math.abs(e)>0?(d(0,c,i,h,a,r),d(0,c,i/2,0,a,o),d(i/2,0,i,h,a,n),o[0]=o[0]+n[0],o[1]=o[1]+n[1],n[0]=(r[0]+o[0])/2,n[1]=(r[1]+o[1])/2):d(0,c,i,h,a,n);break}case 7:{d(0,c,i,h,a,n);break}case 8:{a>=s?d(i/2,0,i,c,a,n):(n[0]=0,n[1]=0);break}case 9:{Math.abs(e)>0?(d(0,h,i,c,a,r),d(0,h,i/2,0,a,o),d(i/2,0,i,c,a,n),o[0]=o[0]+n[0],o[1]=o[1]+n[1],n[0]=(r[0]+o[0])/2,n[1]=(r[1]+o[1])/2):d(0,h,i,c,a,n);break}case 10:{n[0]=0,n[1]=0;break}case 11:{d(0,h,i,c,a,n);break}case 12:{d(0,c,i/2,0,a,r),d(i/2,0,i,c,a,o),_(i,M),n[0]=r[0]+o[0],n[1]=r[1]+o[1];break}case 13:{d(0,h,i,c,a,n);break}case 14:{d(0,c,i,h,a,n);break}case 15:{n[0]=0,n[1]=0;break}}return n}function K(t,a,s,e,n,r){let o=t===s&&a===e;if(!o){let c=(t+s)/2,h=(a+e)/2,i=e-a,w=t-s;o=i*(n-c)+w*(r-h)>0}return o}function G(t,a,s,e,n,r){let o=0;for(let c=0;c0&&(a+=o[0],s+=o[1]),w>0&&(e+=o[0],n+=o[1]),c[0]=1-G(a,s,e,n,1+r,0+r),c[1]=G(a,s,e,n,1+r,1+r),c}function Q(t,a,s,e,n){let r=M[0],o=M[1],c=a+s+1;switch(t){case 0:{A(t,1,1,1+c,1+c,a,e,r),A(t,1,0,1+c,0+c,a,e,o),n[0]=(r[0]+o[0])/2,n[1]=(r[1]+o[1])/2;break}case 1:{A(t,1,0,0+c,0+c,a,e,r),A(t,1,0,1+c,0+c,a,e,o),n[0]=(r[0]+o[0])/2,n[1]=(r[1]+o[1])/2;break}case 2:{A(t,0,0,1+c,0+c,a,e,r),A(t,1,0,1+c,0+c,a,e,o),n[0]=(r[0]+o[0])/2,n[1]=(r[1]+o[1])/2;break}case 3:{A(t,1,0,1+c,0+c,a,e,n);break}case 4:{A(t,1,1,0+c,0+c,a,e,r),A(t,1,1,1+c,0+c,a,e,o),n[0]=(r[0]+o[0])/2,n[1]=(r[1]+o[1])/2;break}case 5:{A(t,1,1,0+c,0+c,a,e,r),A(t,1,0,1+c,0+c,a,e,o),n[0]=(r[0]+o[0])/2,n[1]=(r[1]+o[1])/2;break}case 6:{A(t,1,1,1+c,0+c,a,e,n);break}case 7:{A(t,1,1,1+c,0+c,a,e,r),A(t,1,0,1+c,0+c,a,e,o),n[0]=(r[0]+o[0])/2,n[1]=(r[1]+o[1])/2;break}case 8:{A(t,0,0,1+c,1+c,a,e,r),A(t,1,0,1+c,1+c,a,e,o),n[0]=(r[0]+o[0])/2,n[1]=(r[1]+o[1])/2;break}case 9:{A(t,1,0,1+c,1+c,a,e,n),A(t,1,0,1+c,1+c,a,e,n);break}case 10:{A(t,0,0,1+c,1+c,a,e,r),A(t,1,0,1+c,0+c,a,e,o),n[0]=(r[0]+o[0])/2,n[1]=(r[1]+o[1])/2;break}case 11:{A(t,1,0,1+c,1+c,a,e,r),A(t,1,0,1+c,0+c,a,e,o),n[0]=(r[0]+o[0])/2,n[1]=(r[1]+o[1])/2;break}case 12:{A(t,1,1,1+c,1+c,a,e,n);break}case 13:{A(t,1,1,1+c,1+c,a,e,r),A(t,1,0,1+c,1+c,a,e,o),n[0]=(r[0]+o[0])/2,n[1]=(r[1]+o[1])/2;break}case 14:{A(t,1,1,1+c,1+c,a,e,r),A(t,1,1,1+c,0+c,a,e,o),n[0]=(r[0]+o[0])/2,n[1]=(r[1]+o[1])/2;break}case 15:{A(t,1,1,1+c,1+c,a,e,r),A(t,1,0,1+c,0+c,a,e,o),n[0]=(r[0]+o[0])/2,n[1]=(r[1]+o[1])/2;break}}return n}function R(t,a,s){let e=new Float32Array(2);for(let n=0,r=t.length;n{let a=S.generate(),s=E.generate();postMessage({areaImageData:a,searchImageData:s},[a.data.buffer,s.data.buffer]),close()});})(); +`;function Gp(e=!0){let t=URL.createObjectURL(new Blob([Wp],{type:`text/javascript`})),n=new Worker(t);return URL.revokeObjectURL(t),new Promise((t,r)=>{n.addEventListener(`error`,e=>r(e.error)),n.addEventListener(`message`,n=>{let r=dd.from(n.data.searchImageData),i=dd.from(n.data.areaImageData),a=[r.toCanvas().toDataURL(`image/png`,1),i.toCanvas().toDataURL(`image/png`,1)];e&&(localStorage.setItem(`smaa-search`,a[0]),localStorage.setItem(`smaa-area`,a[1])),t(a)}),n.postMessage(null)})}var Kp=class{constructor(){this.disableCache=!1}setCacheEnabled(e){this.disableCache=!e}generate(){let e=!this.disableCache&&window.localStorage!==void 0,t=e?[localStorage.getItem(`smaa-search`),localStorage.getItem(`smaa-area`)]:[null,null];return(t[0]!==null&&t[1]!==null?Promise.resolve(t):Gp(e)).then(e=>new Promise((t,n)=>{let r=new Image,i=new Image,a=new aa;a.onLoad=()=>t([r,i]),a.onError=n,r.addEventListener(`error`,e=>a.itemError(`smaa-search`)),i.addEventListener(`error`,e=>a.itemError(`smaa-area`)),r.addEventListener(`load`,()=>a.itemEnd(`smaa-search`)),i.addEventListener(`load`,()=>a.itemEnd(`smaa-area`)),a.itemStart(`smaa-search`),a.itemStart(`smaa-area`),r.src=e[0],i.src=e[1]}))}},qp=new Map([[Yp(0,0,0,0),new Float32Array([0,0,0,0])],[Yp(0,0,0,1),new Float32Array([0,0,0,1])],[Yp(0,0,1,0),new Float32Array([0,0,1,0])],[Yp(0,0,1,1),new Float32Array([0,0,1,1])],[Yp(0,1,0,0),new Float32Array([0,1,0,0])],[Yp(0,1,0,1),new Float32Array([0,1,0,1])],[Yp(0,1,1,0),new Float32Array([0,1,1,0])],[Yp(0,1,1,1),new Float32Array([0,1,1,1])],[Yp(1,0,0,0),new Float32Array([1,0,0,0])],[Yp(1,0,0,1),new Float32Array([1,0,0,1])],[Yp(1,0,1,0),new Float32Array([1,0,1,0])],[Yp(1,0,1,1),new Float32Array([1,0,1,1])],[Yp(1,1,0,0),new Float32Array([1,1,0,0])],[Yp(1,1,0,1),new Float32Array([1,1,0,1])],[Yp(1,1,1,0),new Float32Array([1,1,1,0])],[Yp(1,1,1,1),new Float32Array([1,1,1,1])]]);function Jp(e,t,n){return e+(t-e)*n}function Yp(e,t,n,r){return Jp(Jp(e,t,.75),Jp(n,r,.75),.875)}function Xp(e,t){let n=0;return t[3]===1&&(n+=1),n===1&&t[2]===1&&e[1]!==1&&e[3]!==1&&(n+=1),n}function Zp(e,t){let n=0;return t[3]===1&&e[1]!==1&&e[3]!==1&&(n+=1),n===1&&t[2]===1&&e[0]!==1&&e[2]!==1&&(n+=1),n}var Qp=class{static generate(){let e=new Uint8ClampedArray(2178),t=new Uint8ClampedArray(4096);for(let t=0;t<33;++t)for(let n=0;n<66;++n){let r=.03125*n,i=.03125*t;if(qp.has(r)&&qp.has(i)){let a=qp.get(r),o=qp.get(i),s=t*66+n;e[s]=127*Xp(a,o),e[s+33]=127*Zp(a,o)}}for(let n=0,r=17;r<33;++r)for(let i=0;i<64;++i,n+=4)t[n]=e[r*66+i],t[n+3]=255;return new dd(64,16,t)}},$p={LEFT:1,RIGHT:2,MIDDLE:4},Z=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,SCREEN_PAN:4,OFFSET:8,DOLLY:16,ZOOM:32,TOUCH_ROTATE:64,TOUCH_TRUCK:128,TOUCH_SCREEN_PAN:256,TOUCH_OFFSET:512,TOUCH_DOLLY:1024,TOUCH_ZOOM:2048,TOUCH_DOLLY_TRUCK:4096,TOUCH_DOLLY_SCREEN_PAN:8192,TOUCH_DOLLY_OFFSET:16384,TOUCH_DOLLY_ROTATE:32768,TOUCH_ZOOM_TRUCK:65536,TOUCH_ZOOM_OFFSET:131072,TOUCH_ZOOM_SCREEN_PAN:262144,TOUCH_ZOOM_ROTATE:524288}),em={NONE:0,IN:1,OUT:-1};function tm(e){return e.isPerspectiveCamera}function nm(e){return e.isOrthographicCamera}var rm=Math.PI*2,im=Math.PI/2,am=1e-5,om=Math.PI/180;function sm(e,t,n){return Math.max(t,Math.min(n,e))}function cm(e,t=am){return Math.abs(e)0==p>u&&(p=u,n.value=(p-u)/a),p}function mm(e,t,n,r,i=1/0,a,o){r=Math.max(1e-4,r);let s=2/r,c=s*a,l=1/(1+c+.48*c*c+.235*c*c*c),u=t.x,d=t.y,f=t.z,p=e.x-u,m=e.y-d,h=e.z-f,g=u,_=d,v=f,y=i*r,b=y*y,x=p*p+m*m+h*h;if(x>b){let e=Math.sqrt(x);p=p/e*y,m=m/e*y,h=h/e*y}u=e.x-p,d=e.y-m,f=e.z-h;let S=(n.x+s*p)*a,C=(n.y+s*m)*a,w=(n.z+s*h)*a;n.x=(n.x-s*S)*l,n.y=(n.y-s*C)*l,n.z=(n.z-s*w)*l,o.x=u+(p+S)*l,o.y=d+(m+C)*l,o.z=f+(h+w)*l;let T=g-e.x,E=_-e.y,D=v-e.z,O=o.x-g,ee=o.y-_,k=o.z-v;return T*O+E*ee+D*k>0&&(o.x=g,o.y=_,o.z=v,n.x=(o.x-g)/a,n.y=(o.y-_)/a,n.z=(o.z-v)/a),o}function hm(e,t){t.set(0,0),e.forEach(e=>{t.x+=e.clientX,t.y+=e.clientY}),t.x/=e.length,t.y/=e.length}function gm(e,t){return nm(e)?(console.warn(`${t} is not supported in OrthographicCamera`),!0):!1}var _m=class{_listeners={};addEventListener(e,t){let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners[e];if(n!==void 0){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){let t=this._listeners[e.type];if(t!==void 0){e.target=this;let n=t.slice(0);for(let t=0,r=n.length;t{};lockPointer;unlockPointer;_enabled=!0;_camera;_yAxisUpSpace;_yAxisUpSpaceInverse;_state=Z.NONE;_domElement;_viewport=null;_target;_targetEnd;_focalOffset;_focalOffsetEnd;_spherical;_sphericalEnd;_lastDistance;_zoom;_zoomEnd;_lastZoom;_cameraUp0;_target0;_position0;_zoom0;_focalOffset0;_dollyControlCoord;_changedDolly=0;_changedZoom=0;_nearPlaneCorners;_hasRested=!0;_boundary;_boundaryEnclosesCamera=!1;_needsUpdate=!0;_updatedLastTime=!1;_elementRect=new DOMRect;_isDragging=!1;_dragNeedsUpdate=!0;_activePointers=[];_lockedPointer=null;_interactiveArea=new DOMRect(0,0,1,1);_isUserControllingRotate=!1;_isUserControllingDolly=!1;_isUserControllingTruck=!1;_isUserControllingOffset=!1;_isUserControllingZoom=!1;_lastDollyDirection=em.NONE;_thetaVelocity={value:0};_phiVelocity={value:0};_radiusVelocity={value:0};_targetVelocity=new Q.Vector3;_focalOffsetVelocity=new Q.Vector3;_zoomVelocity={value:0};set verticalDragToForward(e){console.warn("camera-controls: `verticalDragToForward` was removed. Use `mouseButtons.left = CameraControls.ACTION.SCREEN_PAN` instead.")}constructor(t,n){super(),Q===void 0&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=t,this._yAxisUpSpace=new Q.Quaternion().setFromUnitVectors(this._camera.up,Sm),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=Z.NONE,this._target=new Q.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new Q.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new Q.Spherical().setFromVector3($.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new Q.Vector3,new Q.Vector3,new Q.Vector3,new Q.Vector3],this._updateNearPlaneCorners(),this._boundary=new Q.Box3(new Q.Vector3(-1/0,-1/0,-1/0),new Q.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new Q.Vector2,this.mouseButtons={left:Z.ROTATE,middle:Z.DOLLY,right:Z.TRUCK,wheel:tm(this._camera)?Z.DOLLY:nm(this._camera)?Z.ZOOM:Z.NONE},this.touches={one:Z.TOUCH_ROTATE,two:tm(this._camera)?Z.TOUCH_DOLLY_TRUCK:nm(this._camera)?Z.TOUCH_ZOOM_TRUCK:Z.NONE,three:Z.TOUCH_TRUCK};let r=new Q.Vector2,i=new Q.Vector2,a=new Q.Vector2,o=e=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){let t=this._domElement.getBoundingClientRect(),n=e.clientX/t.width,r=e.clientY/t.height;if(nthis._interactiveArea.right||rthis._interactiveArea.bottom)return}let t=e.pointerType===`mouse`?(e.buttons&$p.LEFT)===$p.LEFT?$p.LEFT:(e.buttons&$p.MIDDLE)===$p.MIDDLE?$p.MIDDLE:(e.buttons&$p.RIGHT)===$p.RIGHT?$p.RIGHT:null:null;if(t!==null){let e=this._findPointerByMouseButton(t);e&&this._disposePointer(e)}if((e.buttons&$p.LEFT)===$p.LEFT&&this._lockedPointer)return;let n={pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,deltaX:0,deltaY:0,mouseButton:t};this._activePointers.push(n),this._domElement.ownerDocument.removeEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.removeEventListener(`pointerup`,c),this._domElement.ownerDocument.addEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.addEventListener(`pointerup`,c),this._isDragging=!0,f(e)},s=e=>{e.cancelable&&e.preventDefault();let t=e.pointerId,n=this._lockedPointer||this._findPointerById(t);if(n){if(n.clientX=e.clientX,n.clientY=e.clientY,n.deltaX=e.movementX,n.deltaY=e.movementY,this._state=0,e.pointerType===`touch`)switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(e.buttons&$p.LEFT)===$p.LEFT)&&(this._state|=this.mouseButtons.left),this._isDragging&&(e.buttons&$p.MIDDLE)===$p.MIDDLE&&(this._state|=this.mouseButtons.middle),this._isDragging&&(e.buttons&$p.RIGHT)===$p.RIGHT&&(this._state|=this.mouseButtons.right);p()}},c=e=>{let t=this._findPointerById(e.pointerId);if(!(t&&t===this._lockedPointer)){if(t&&this._disposePointer(t),e.pointerType===`touch`)switch(this._activePointers.length){case 0:this._state=Z.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three}else this._state=Z.NONE;m()}},l=-1,u=e=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===Z.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){let t=this._domElement.getBoundingClientRect(),n=e.clientX/t.width,r=e.clientY/t.height;if(nthis._interactiveArea.right||rthis._interactiveArea.bottom)return}if(e.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===Z.ROTATE||this.mouseButtons.wheel===Z.TRUCK){let e=performance.now();l-e<1e3&&this._getClientRect(this._elementRect),l=e}let t=bm?-1:-3,n=e.deltaMode===1&&!e.ctrlKey?e.deltaY/t:e.deltaY/(t*10),r=this.dollyToCursor?(e.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,i=this.dollyToCursor?(e.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(e.ctrlKey?Z.ZOOM:this.mouseButtons.wheel){case Z.ROTATE:this._rotateInternal(e.deltaX,e.deltaY),this._isUserControllingRotate=!0;break;case Z.TRUCK:this._truckInternal(e.deltaX,e.deltaY,!1,!1),this._isUserControllingTruck=!0;break;case Z.SCREEN_PAN:this._truckInternal(e.deltaX,e.deltaY,!1,!0),this._isUserControllingTruck=!0;break;case Z.OFFSET:this._truckInternal(e.deltaX,e.deltaY,!0,!1),this._isUserControllingOffset=!0;break;case Z.DOLLY:this._dollyInternal(-n,r,i),this._isUserControllingDolly=!0;break;case Z.ZOOM:this._zoomInternal(-n,r,i),this._isUserControllingZoom=!0}this.dispatchEvent({type:`control`})},d=t=>{if(this._domElement&&this._enabled){if(this.mouseButtons.right===e.ACTION.NONE){let e=t instanceof PointerEvent?t.pointerId:0,n=this._findPointerById(e);n&&this._disposePointer(n),this._domElement.ownerDocument.removeEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.removeEventListener(`pointerup`,c);return}t.preventDefault()}},f=e=>{if(this._enabled){if(hm(this._activePointers,wm),this._getClientRect(this._elementRect),r.copy(wm),i.copy(wm),this._activePointers.length>=2){let e=wm.x-this._activePointers[1].clientX,t=wm.y-this._activePointers[1].clientY,n=Math.sqrt(e*e+t*t);a.set(0,n);let r=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,o=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;i.set(r,o)}if(this._state=0,!e)this._lockedPointer&&(this._state|=this.mouseButtons.left);else if(`pointerType`in e&&e.pointerType===`touch`)switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three}else!this._lockedPointer&&(e.buttons&$p.LEFT)===$p.LEFT&&(this._state|=this.mouseButtons.left),(e.buttons&$p.MIDDLE)===$p.MIDDLE&&(this._state|=this.mouseButtons.middle),(e.buttons&$p.RIGHT)===$p.RIGHT&&(this._state|=this.mouseButtons.right);((this._state&Z.ROTATE)===Z.ROTATE||(this._state&Z.TOUCH_ROTATE)===Z.TOUCH_ROTATE||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&Z.TRUCK)===Z.TRUCK||(this._state&Z.SCREEN_PAN)===Z.SCREEN_PAN||(this._state&Z.TOUCH_TRUCK)===Z.TOUCH_TRUCK||(this._state&Z.TOUCH_SCREEN_PAN)===Z.TOUCH_SCREEN_PAN||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_DOLLY_SCREEN_PAN)===Z.TOUCH_DOLLY_SCREEN_PAN||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK||(this._state&Z.TOUCH_ZOOM_SCREEN_PAN)===Z.TOUCH_DOLLY_SCREEN_PAN)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&Z.DOLLY)===Z.DOLLY||(this._state&Z.TOUCH_DOLLY)===Z.TOUCH_DOLLY||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_DOLLY_SCREEN_PAN)===Z.TOUCH_DOLLY_SCREEN_PAN||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&Z.ZOOM)===Z.ZOOM||(this._state&Z.TOUCH_ZOOM)===Z.TOUCH_ZOOM||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK||(this._state&Z.TOUCH_ZOOM_SCREEN_PAN)===Z.TOUCH_ZOOM_SCREEN_PAN||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&Z.OFFSET)===Z.OFFSET||(this._state&Z.TOUCH_OFFSET)===Z.TOUCH_OFFSET||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:`controlstart`})}},p=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,hm(this._activePointers,wm);let e=this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,t=e?-e.deltaX:i.x-wm.x,n=e?-e.deltaY:i.y-wm.y;if(i.copy(wm),((this._state&Z.ROTATE)===Z.ROTATE||(this._state&Z.TOUCH_ROTATE)===Z.TOUCH_ROTATE||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(t,n),this._isUserControllingRotate=!0),(this._state&Z.DOLLY)===Z.DOLLY||(this._state&Z.ZOOM)===Z.ZOOM){let e=this.dollyToCursor?(r.x-this._elementRect.x)/this._elementRect.width*2-1:0,t=this.dollyToCursor?(r.y-this._elementRect.y)/this._elementRect.height*-2+1:0,i=this.dollyDragInverted?-1:1;(this._state&Z.DOLLY)===Z.DOLLY?(this._dollyInternal(i*n*ym,e,t),this._isUserControllingDolly=!0):(this._zoomInternal(i*n*ym,e,t),this._isUserControllingZoom=!0)}if((this._state&Z.TOUCH_DOLLY)===Z.TOUCH_DOLLY||(this._state&Z.TOUCH_ZOOM)===Z.TOUCH_ZOOM||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK||(this._state&Z.TOUCH_DOLLY_SCREEN_PAN)===Z.TOUCH_DOLLY_SCREEN_PAN||(this._state&Z.TOUCH_ZOOM_SCREEN_PAN)===Z.TOUCH_ZOOM_SCREEN_PAN||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE){let e=wm.x-this._activePointers[1].clientX,t=wm.y-this._activePointers[1].clientY,n=Math.sqrt(e*e+t*t),r=a.y-n;a.set(0,n);let o=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,s=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&Z.TOUCH_DOLLY)===Z.TOUCH_DOLLY||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_DOLLY_SCREEN_PAN)===Z.TOUCH_DOLLY_SCREEN_PAN||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET?(this._dollyInternal(r*ym,o,s),this._isUserControllingDolly=!0):(this._zoomInternal(r*ym,o,s),this._isUserControllingZoom=!0)}((this._state&Z.TRUCK)===Z.TRUCK||(this._state&Z.TOUCH_TRUCK)===Z.TOUCH_TRUCK||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(t,n,!1,!1),this._isUserControllingTruck=!0),((this._state&Z.SCREEN_PAN)===Z.SCREEN_PAN||(this._state&Z.TOUCH_SCREEN_PAN)===Z.TOUCH_SCREEN_PAN||(this._state&Z.TOUCH_DOLLY_SCREEN_PAN)===Z.TOUCH_DOLLY_SCREEN_PAN||(this._state&Z.TOUCH_ZOOM_SCREEN_PAN)===Z.TOUCH_ZOOM_SCREEN_PAN)&&(this._truckInternal(t,n,!1,!0),this._isUserControllingTruck=!0),((this._state&Z.OFFSET)===Z.OFFSET||(this._state&Z.TOUCH_OFFSET)===Z.TOUCH_OFFSET||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(t,n,!0,!1),this._isUserControllingOffset=!0),this.dispatchEvent({type:`control`})},m=()=>{hm(this._activePointers,wm),i.copy(wm),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.removeEventListener(`pointerup`,c),this.dispatchEvent({type:`controlend`}))};this.lockPointer=()=>{this._enabled&&this._domElement&&(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.removeEventListener(`pointerup`,c),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener(`pointerlockchange`,h),this._domElement.ownerDocument.addEventListener(`pointerlockerror`,g),this._domElement.ownerDocument.addEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.addEventListener(`pointerup`,c),f())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),this._domElement?.ownerDocument.exitPointerLock(),this._domElement?.ownerDocument.removeEventListener(`pointerlockchange`,h),this._domElement?.ownerDocument.removeEventListener(`pointerlockerror`,g),this.cancel()};let h=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},g=()=>{this.unlockPointer()};this._addAllEventListeners=e=>{this._domElement=e,this._domElement.style.touchAction=`none`,this._domElement.style.userSelect=`none`,this._domElement.style.webkitUserSelect=`none`,this._domElement.addEventListener(`pointerdown`,o),this._domElement.addEventListener(`pointercancel`,c),this._domElement.addEventListener(`wheel`,u,{passive:!1}),this._domElement.addEventListener(`contextmenu`,d)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction=``,this._domElement.style.userSelect=``,this._domElement.style.webkitUserSelect=``,this._domElement.removeEventListener(`pointerdown`,o),this._domElement.removeEventListener(`pointercancel`,c),this._domElement.removeEventListener(`wheel`,u,{passive:!1}),this._domElement.removeEventListener(`contextmenu`,d),this._domElement.ownerDocument.removeEventListener(`pointermove`,s,{passive:!1}),this._domElement.ownerDocument.removeEventListener(`pointerup`,c),this._domElement.ownerDocument.removeEventListener(`pointerlockchange`,h),this._domElement.ownerDocument.removeEventListener(`pointerlockerror`,g))},this.cancel=()=>{this._state!==Z.NONE&&(this._state=Z.NONE,this._activePointers.length=0,m())},n&&this.connect(n),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction=`none`,this._domElement.style.userSelect=`none`,this._domElement.style.webkitUserSelect=`none`):(this.cancel(),this._domElement.style.touchAction=``,this._domElement.style.userSelect=``,this._domElement.style.webkitUserSelect=``))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){(this._spherical.radius!==e||this._sphericalEnd.radius!==e)&&(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){(this._spherical.theta!==e||this._sphericalEnd.theta!==e)&&(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){(this._spherical.phi!==e||this._sphericalEnd.phi!==e)&&(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=sm(e.width,0,1),this._interactiveArea.height=sm(e.height,0,1),this._interactiveArea.x=sm(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=sm(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,n=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,n)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,n=!1){this._isUserControllingRotate=!1;let r=sm(e,this.minAzimuthAngle,this.maxAzimuthAngle),i=sm(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=r,this._sphericalEnd.phi=i,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,n||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);let a=!n||lm(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&lm(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(a)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=em.NONE,this._changedDolly=0,this._dollyToNoClamp(sm(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){let n=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){let t=this._collisionTest(),r=lm(t,this._spherical.radius);if(!(n>e)&&r)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,t)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);let r=!t||lm(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(r)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(Dm).multiplyScalar(e)),t||this._target.copy(this._targetEnd);let n=!t||lm(this._target.x,this._targetEnd.x,this.restThreshold)&&lm(this._target.y,this._targetEnd.y,this.restThreshold)&&lm(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=sm(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);let n=!t||lm(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(n)}pan(e,t,n=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,n)}truck(e,t,n=!1){this._camera.updateMatrix(),Om.setFromMatrixColumn(this._camera.matrix,0),km.setFromMatrixColumn(this._camera.matrix,1),Om.multiplyScalar(e),km.multiplyScalar(-t);let r=$.copy(Om).add(km),i=Tm.copy(this._targetEnd).add(r);return this.moveTo(i.x,i.y,i.z,n)}forward(e,t=!1){$.setFromMatrixColumn(this._camera.matrix,0),$.crossVectors(this._camera.up,$),$.multiplyScalar(e);let n=Tm.copy(this._targetEnd).add($);return this.moveTo(n.x,n.y,n.z,t)}elevate(e,t=!1){return $.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+$.x,this._targetEnd.y+$.y,this._targetEnd.z+$.z,t)}moveTo(e,t,n,r=!1){this._isUserControllingTruck=!1;let i=$.set(e,t,n).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,i,this.boundaryFriction),this._needsUpdate=!0,r||this._target.copy(this._targetEnd);let a=!r||lm(this._target.x,this._targetEnd.x,this.restThreshold)&&lm(this._target.y,this._targetEnd.y,this.restThreshold)&&lm(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(a)}lookInDirectionOf(e,t,n,r=!1){let i=$.set(e,t,n).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius).add(this._targetEnd);return this.setPosition(i.x,i.y,i.z,r)}fitToBox(e,t,{cover:n=!1,paddingLeft:r=0,paddingRight:i=0,paddingBottom:a=0,paddingTop:o=0}={}){let s=[],c=e.isBox3?Fm.copy(e):Fm.setFromObject(e);c.isEmpty()&&(console.warn(`camera-controls: fitTo() cannot be used with an empty box. Aborting`),Promise.resolve());let l=um(this._sphericalEnd.theta,im),u=um(this._sphericalEnd.phi,im);s.push(this.rotateTo(l,u,t));let d=$.setFromSpherical(this._sphericalEnd).normalize(),f=Rm.setFromUnitVectors(d,Cm),p=lm(Math.abs(d.y),1);p&&f.multiply(zm.setFromAxisAngle(Sm,l)),f.multiply(this._yAxisUpSpaceInverse);let m=Im.makeEmpty();Tm.copy(c.min).applyQuaternion(f),m.expandByPoint(Tm),Tm.copy(c.min).setX(c.max.x).applyQuaternion(f),m.expandByPoint(Tm),Tm.copy(c.min).setY(c.max.y).applyQuaternion(f),m.expandByPoint(Tm),Tm.copy(c.max).setZ(c.min.z).applyQuaternion(f),m.expandByPoint(Tm),Tm.copy(c.min).setZ(c.max.z).applyQuaternion(f),m.expandByPoint(Tm),Tm.copy(c.max).setY(c.min.y).applyQuaternion(f),m.expandByPoint(Tm),Tm.copy(c.max).setX(c.min.x).applyQuaternion(f),m.expandByPoint(Tm),Tm.copy(c.max).applyQuaternion(f),m.expandByPoint(Tm),m.min.x-=r,m.min.y-=a,m.max.x+=i,m.max.y+=o,f.setFromUnitVectors(Cm,d),p&&f.premultiply(zm.invert()),f.premultiply(this._yAxisUpSpace);let h=m.getSize($),g=m.getCenter(Tm).applyQuaternion(f);if(tm(this._camera)){let e=this.getDistanceToFitBox(h.x,h.y,h.z,n);s.push(this.moveTo(g.x,g.y,g.z,t)),s.push(this.dollyTo(e,t)),s.push(this.setFocalOffset(0,0,0,t))}else if(nm(this._camera)){let e=this._camera,r=e.right-e.left,i=e.top-e.bottom,a=n?Math.max(r/h.x,i/h.y):Math.min(r/h.x,i/h.y);s.push(this.moveTo(g.x,g.y,g.z,t)),s.push(this.zoomTo(a,t)),s.push(this.setFocalOffset(0,0,0,t))}return Promise.all(s)}fitToSphere(t,n){let r=[],i=`isObject3D`in t?e.createBoundingSphere(t,Lm):Lm.copy(t);if(r.push(this.moveTo(i.center.x,i.center.y,i.center.z,n)),tm(this._camera)){let e=this.getDistanceToFitSphere(i.radius);r.push(this.dollyTo(e,n))}else if(nm(this._camera)){let e=this._camera.right-this._camera.left,t=this._camera.top-this._camera.bottom,a=2*i.radius,o=Math.min(e/a,t/a);r.push(this.zoomTo(o,n))}return r.push(this.setFocalOffset(0,0,0,n)),Promise.all(r)}setLookAt(e,t,n,r,i,a,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=em.NONE,this._changedDolly=0;let s=Tm.set(r,i,a),c=$.set(e,t,n);this._targetEnd.copy(s),this._sphericalEnd.setFromVector3(c.sub(s).applyQuaternion(this._yAxisUpSpace)),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));let l=!o||lm(this._target.x,this._targetEnd.x,this.restThreshold)&&lm(this._target.y,this._targetEnd.y,this.restThreshold)&&lm(this._target.z,this._targetEnd.z,this.restThreshold)&&lm(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&lm(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&lm(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(l)}lerp(e,t,n,r=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=em.NONE,this._changedDolly=0;let i=$.set(...e.target);if(`spherical`in e)Nm.set(...e.spherical);else{let t=Tm.set(...e.position);Nm.setFromVector3(t.sub(i).applyQuaternion(this._yAxisUpSpace))}let a=Em.set(...t.target);if(`spherical`in t)Pm.set(...t.spherical);else{let e=Tm.set(...t.position);Pm.setFromVector3(e.sub(a).applyQuaternion(this._yAxisUpSpace))}this._targetEnd.copy(i.lerp(a,n));let o=Pm.theta-Nm.theta,s=Pm.phi-Nm.phi,c=Pm.radius-Nm.radius;this._sphericalEnd.set(Nm.radius+c*n,Nm.phi+s*n,Nm.theta+o*n),this._needsUpdate=!0,r||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));let l=!r||lm(this._target.x,this._targetEnd.x,this.restThreshold)&&lm(this._target.y,this._targetEnd.y,this.restThreshold)&&lm(this._target.z,this._targetEnd.z,this.restThreshold)&&lm(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&lm(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&lm(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(l)}lerpLookAt(e,t,n,r,i,a,o,s,c,l,u,d,f,p=!1){return this.lerp({position:[e,t,n],target:[r,i,a]},{position:[o,s,c],target:[l,u,d]},f,p)}setPosition(e,t,n,r=!1){return this.setLookAt(e,t,n,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,r)}setTarget(e,t,n,r=!1){let i=this.getPosition($),a=this.setLookAt(i.x,i.y,i.z,e,t,n,r);return this._sphericalEnd.phi=sm(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),a}setFocalOffset(e,t,n,r=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,n),this._needsUpdate=!0,r||this._focalOffset.copy(this._focalOffsetEnd);let i=!r||lm(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&lm(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&lm(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(i)}setOrbitPoint(e,t,n){this._camera.updateMatrixWorld(),Om.setFromMatrixColumn(this._camera.matrixWorldInverse,0),km.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Am.setFromMatrixColumn(this._camera.matrixWorldInverse,2);let r=$.set(e,t,n),i=r.distanceTo(this._camera.position),a=r.sub(this._camera.position);Om.multiplyScalar(a.x),km.multiplyScalar(a.y),Am.multiplyScalar(a.z),$.copy(Om).add(km).add(Am),$.z+=i,this.dollyTo(i,!1),this.setFocalOffset(-$.x,$.y,-$.z,!1),this.moveTo(e,t,n,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,n,r){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new Q.Vector4,typeof e==`number`?this._viewport.set(e,t,n,r):this._viewport.copy(e)}getDistanceToFitBox(e,t,n,r=!1){if(gm(this._camera,`getDistanceToFitBox`))return this._spherical.radius;let i=e/t,a=this._camera.getEffectiveFOV()*om,o=this._camera.aspect;return((r?i>o:iMath.PI&&(this._sphericalEnd.theta-=rm),this._spherical.theta+=rm*Math.round((this._sphericalEnd.theta-this._spherical.theta)/rm),this}stop(){this._focalOffset.copy(this._focalOffsetEnd),this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd),this._zoom=this._zoomEnd}reset(e=!1){if(!lm(this._camera.up.x,this._cameraUp0.x)||!lm(this._camera.up.y,this._cameraUp0.y)||!lm(this._camera.up.z,this._cameraUp0.z)){this._camera.up.copy(this._cameraUp0);let e=this.getPosition($);this.updateCameraUp(),this.setPosition(e.x,e.y,e.z)}let t=[this.setLookAt(this._position0.x,this._position0.y,this._position0.z,this._target0.x,this._target0.y,this._target0.z,e),this.setFocalOffset(this._focalOffset0.x,this._focalOffset0.y,this._focalOffset0.z,e),this.zoomTo(this._zoom0,e)];return Promise.all(t)}saveState(){this._cameraUp0.copy(this._camera.up),this.getTarget(this._target0),this.getPosition(this._position0),this._zoom0=this._zoom,this._focalOffset0.copy(this._focalOffset)}updateCameraUp(){this._yAxisUpSpace.setFromUnitVectors(this._camera.up,Sm),this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert()}applyCameraUp(){let e=$.subVectors(this._target,this._camera.position).normalize(),t=Tm.crossVectors(e,this._camera.up);this._camera.up.crossVectors(t,e).normalize(),this._camera.updateMatrixWorld();let n=this.getPosition($);this.updateCameraUp(),this.setPosition(n.x,n.y,n.z)}update(e){let t=this._sphericalEnd.theta-this._spherical.theta,n=this._sphericalEnd.phi-this._spherical.phi,r=this._sphericalEnd.radius-this._spherical.radius,i=jm.subVectors(this._targetEnd,this._target),a=Mm.subVectors(this._focalOffsetEnd,this._focalOffset),o=this._zoomEnd-this._zoom;if(cm(t))this._thetaVelocity.value=0,this._spherical.theta=this._sphericalEnd.theta;else{let t=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.theta=pm(this._spherical.theta,this._sphericalEnd.theta,this._thetaVelocity,t,1/0,e),this._needsUpdate=!0}if(cm(n))this._phiVelocity.value=0,this._spherical.phi=this._sphericalEnd.phi;else{let t=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.phi=pm(this._spherical.phi,this._sphericalEnd.phi,this._phiVelocity,t,1/0,e),this._needsUpdate=!0}if(cm(r))this._radiusVelocity.value=0,this._spherical.radius=this._sphericalEnd.radius;else{let t=this._isUserControllingDolly?this.draggingSmoothTime:this.smoothTime;this._spherical.radius=pm(this._spherical.radius,this._sphericalEnd.radius,this._radiusVelocity,t,this.maxSpeed,e),this._needsUpdate=!0}if(cm(i.x)&&cm(i.y)&&cm(i.z))this._targetVelocity.set(0,0,0),this._target.copy(this._targetEnd);else{let t=this._isUserControllingTruck?this.draggingSmoothTime:this.smoothTime;mm(this._target,this._targetEnd,this._targetVelocity,t,this.maxSpeed,e,this._target),this._needsUpdate=!0}if(cm(a.x)&&cm(a.y)&&cm(a.z))this._focalOffsetVelocity.set(0,0,0),this._focalOffset.copy(this._focalOffsetEnd);else{let t=this._isUserControllingOffset?this.draggingSmoothTime:this.smoothTime;mm(this._focalOffset,this._focalOffsetEnd,this._focalOffsetVelocity,t,this.maxSpeed,e,this._focalOffset),this._needsUpdate=!0}if(cm(o))this._zoomVelocity.value=0,this._zoom=this._zoomEnd;else{let t=this._isUserControllingZoom?this.draggingSmoothTime:this.smoothTime;this._zoom=pm(this._zoom,this._zoomEnd,this._zoomVelocity,t,1/0,e)}if(this.dollyToCursor){if(tm(this._camera)&&this._changedDolly!==0){let e=this._spherical.radius-this._lastDistance,t=this._camera,n=this._getCameraDirection(Dm),r=$.copy(n).cross(t.up).normalize();r.lengthSq()===0&&(r.x=1);let i=Tm.crossVectors(r,n),a=this._sphericalEnd.radius*Math.tan(t.getEffectiveFOV()*om*.5),o=(this._sphericalEnd.radius-e-this._sphericalEnd.radius)/this._sphericalEnd.radius,s=Em.copy(this._targetEnd).add(r.multiplyScalar(this._dollyControlCoord.x*a*t.aspect)).add(i.multiplyScalar(this._dollyControlCoord.y*a)),c=$.copy(this._targetEnd).lerp(s,o),l=this._lastDollyDirection===em.IN&&this._spherical.radius<=this.minDistance,u=this._lastDollyDirection===em.OUT&&this.maxDistance<=this._spherical.radius;if(this.infinityDolly&&(l||u)){this._sphericalEnd.radius-=e,this._spherical.radius-=e;let t=Tm.copy(n).multiplyScalar(-e);c.add(t)}this._boundary.clampPoint(c,c);let d=Tm.subVectors(c,this._targetEnd);this._targetEnd.copy(c),this._target.add(d),this._changedDolly-=e,cm(this._changedDolly)&&(this._changedDolly=0)}else if(nm(this._camera)&&this._changedZoom!==0){let e=this._zoom-this._lastZoom,t=this._camera,n=$.set(this._dollyControlCoord.x,this._dollyControlCoord.y,(t.near+t.far)/(t.near-t.far)).unproject(t),r=Tm.set(0,0,-1).applyQuaternion(t.quaternion),i=Em.copy(n).add(r.multiplyScalar(-n.dot(t.up))),a=-(this._zoom-e-this._zoom)/this._zoom,o=this._getCameraDirection(Dm),s=this._targetEnd.dot(o),c=$.copy(this._targetEnd).lerp(i,a),l=c.dot(o),u=o.multiplyScalar(l-s);c.sub(u),this._boundary.clampPoint(c,c);let d=Tm.subVectors(c,this._targetEnd);this._targetEnd.copy(c),this._target.add(d),this._changedZoom-=e,cm(this._changedZoom)&&(this._changedZoom=0)}}this._camera.zoom!==this._zoom&&(this._camera.zoom=this._zoom,this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0),this._dragNeedsUpdate=!0;let s=this._collisionTest();this._spherical.radius=Math.min(this._spherical.radius,s),this._spherical.makeSafe(),this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target),this._camera.lookAt(this._target),(!cm(this._focalOffset.x)||!cm(this._focalOffset.y)||!cm(this._focalOffset.z))&&(this._camera.matrix.compose(this._camera.position,this._camera.quaternion,this._camera.scale),Om.setFromMatrixColumn(this._camera.matrix,0),km.setFromMatrixColumn(this._camera.matrix,1),Am.setFromMatrixColumn(this._camera.matrix,2),Om.multiplyScalar(this._focalOffset.x),km.multiplyScalar(-this._focalOffset.y),Am.multiplyScalar(this._focalOffset.z),$.copy(Om).add(km).add(Am),this._camera.position.add($),this._camera.updateMatrixWorld()),this._boundaryEnclosesCamera&&this._encloseToBoundary(this._camera.position.copy(this._target),$.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse),1);let c=this._needsUpdate;return c&&!this._updatedLastTime?(this._hasRested=!1,this.dispatchEvent({type:`wake`}),this.dispatchEvent({type:`update`})):c?(this.dispatchEvent({type:`update`}),cm(t,this.restThreshold)&&cm(n,this.restThreshold)&&cm(r,this.restThreshold)&&cm(i.x,this.restThreshold)&&cm(i.y,this.restThreshold)&&cm(i.z,this.restThreshold)&&cm(a.x,this.restThreshold)&&cm(a.y,this.restThreshold)&&cm(a.z,this.restThreshold)&&cm(o,this.restThreshold)&&!this._hasRested&&(this._hasRested=!0,this.dispatchEvent({type:`rest`}))):!c&&this._updatedLastTime&&this.dispatchEvent({type:`sleep`}),this._lastDistance=this._spherical.radius,this._lastZoom=this._zoom,this._updatedLastTime=c,this._needsUpdate=!1,c}toJSON(){return JSON.stringify({enabled:this._enabled,minDistance:this.minDistance,maxDistance:dm(this.maxDistance),minZoom:this.minZoom,maxZoom:dm(this.maxZoom),minPolarAngle:this.minPolarAngle,maxPolarAngle:dm(this.maxPolarAngle),minAzimuthAngle:dm(this.minAzimuthAngle),maxAzimuthAngle:dm(this.maxAzimuthAngle),smoothTime:this.smoothTime,draggingSmoothTime:this.draggingSmoothTime,dollySpeed:this.dollySpeed,truckSpeed:this.truckSpeed,dollyToCursor:this.dollyToCursor,target:this._targetEnd.toArray(),position:$.setFromSpherical(this._sphericalEnd).add(this._targetEnd).toArray(),zoom:this._zoomEnd,focalOffset:this._focalOffsetEnd.toArray(),target0:this._target0.toArray(),position0:this._position0.toArray(),zoom0:this._zoom0,focalOffset0:this._focalOffset0.toArray()})}fromJSON(e,t=!1){let n=JSON.parse(e);this.enabled=n.enabled,this.minDistance=n.minDistance,this.maxDistance=fm(n.maxDistance),this.minZoom=n.minZoom,this.maxZoom=fm(n.maxZoom),this.minPolarAngle=n.minPolarAngle,this.maxPolarAngle=fm(n.maxPolarAngle),this.minAzimuthAngle=fm(n.minAzimuthAngle),this.maxAzimuthAngle=fm(n.maxAzimuthAngle),this.smoothTime=n.smoothTime,this.draggingSmoothTime=n.draggingSmoothTime,this.dollySpeed=n.dollySpeed,this.truckSpeed=n.truckSpeed,this.dollyToCursor=n.dollyToCursor,this._target0.fromArray(n.target0),this._position0.fromArray(n.position0),this._zoom0=n.zoom0,this._focalOffset0.fromArray(n.focalOffset0),this.moveTo(n.target[0],n.target[1],n.target[2],t),Nm.setFromVector3($.fromArray(n.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)),this.rotateTo(Nm.theta,Nm.phi,t),this.dollyTo(Nm.radius,t),this.zoomTo(n.zoom,t),this.setFocalOffset(n.focalOffset[0],n.focalOffset[1],n.focalOffset[2],t),this._needsUpdate=!0}connect(e){if(this._domElement){console.warn(`camera-controls is already connected.`);return}e.setAttribute(`data-camera-controls-version`,vm),this._addAllEventListeners(e),this._getClientRect(this._elementRect)}disconnect(){this.cancel(),this._removeAllEventListeners(),this._domElement&&=(this._domElement.removeAttribute(`data-camera-controls-version`),void 0)}dispose(){this.removeAllEventListeners(),this.disconnect()}_getTargetDirection(e){return e.setFromSpherical(this._spherical).divideScalar(this._spherical.radius).applyQuaternion(this._yAxisUpSpaceInverse)}_getCameraDirection(e){return this._getTargetDirection(e).negate()}_findPointerById(e){return this._activePointers.find(t=>t.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(t=>t.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,n){let r=t.lengthSq();if(r===0)return e;let i=Tm.copy(t).add(e),a=this._boundary.clampPoint(i,Em).sub(i),o=a.lengthSq();if(o===0)return e.add(t);if(o===r)return e;if(n===0)return e.add(t).add(a);{let r=1+n*o/t.dot(a);return e.add(Tm.copy(t).multiplyScalar(r)).add(a.multiplyScalar(1-n))}}_updateNearPlaneCorners(){if(tm(this._camera)){let e=this._camera,t=e.near,n=e.getEffectiveFOV()*om,r=Math.tan(n*.5)*t,i=r*e.aspect;this._nearPlaneCorners[0].set(-i,-r,0),this._nearPlaneCorners[1].set(i,-r,0),this._nearPlaneCorners[2].set(i,r,0),this._nearPlaneCorners[3].set(-i,r,0)}else if(nm(this._camera)){let e=this._camera,t=1/e.zoom,n=e.left*t,r=e.right*t,i=e.top*t,a=e.bottom*t;this._nearPlaneCorners[0].set(n,i,0),this._nearPlaneCorners[1].set(r,i,0),this._nearPlaneCorners[2].set(r,a,0),this._nearPlaneCorners[3].set(n,a,0)}}_truckInternal=(e,t,n,r)=>{let i,a;if(tm(this._camera)){let n=$.copy(this._camera.position).sub(this._target),r=this._camera.getEffectiveFOV()*om,o=n.length()*Math.tan(r*.5);i=this.truckSpeed*e*o/this._elementRect.height,a=this.truckSpeed*t*o/this._elementRect.height}else if(nm(this._camera)){let n=this._camera;i=this.truckSpeed*e*(n.right-n.left)/n.zoom/this._elementRect.width,a=this.truckSpeed*t*(n.top-n.bottom)/n.zoom/this._elementRect.height}else return;r?(n?this.setFocalOffset(this._focalOffsetEnd.x+i,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(i,0,!0),this.forward(-a,!0)):n?this.setFocalOffset(this._focalOffsetEnd.x+i,this._focalOffsetEnd.y+a,this._focalOffsetEnd.z,!0):this.truck(i,a,!0)};_rotateInternal=(e,t)=>{let n=rm*this.azimuthRotateSpeed*e/this._elementRect.height,r=rm*this.polarRotateSpeed*t/this._elementRect.height;this.rotate(n,r,!0)};_dollyInternal=(e,t,n)=>{let r=.95**(-e*this.dollySpeed),i=this._sphericalEnd.radius,a=this._sphericalEnd.radius*r,o=sm(a,this.minDistance,this.maxDistance),s=o-a;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(a,!0):(this.infinityDolly&&!this.dollyToCursor&&this.dollyInFixed(s,!0),this._dollyToNoClamp(o,!0)),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?a:o)-i,this._dollyControlCoord.set(t,n)),this._lastDollyDirection=Math.sign(-e)};_zoomInternal=(e,t,n)=>{let r=.95**(e*this.dollySpeed),i=this._zoom,a=this._zoom*r;this.zoomTo(a,!0),this.dollyToCursor&&(this._changedZoom+=a-i,this._dollyControlCoord.set(t,n))};_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||gm(this._camera,`_collisionTest`))return e;let t=this._getTargetDirection(Dm);Bm.lookAt(xm,t,this._camera.up);for(let n=0;n<4;n++){let r=Tm.copy(this._nearPlaneCorners[n]);r.applyMatrix4(Bm);let i=Em.addVectors(this._target,r);Vm.set(i,t),Vm.far=this._spherical.radius+1;let a=Vm.intersectObjects(this.colliderMeshes);a.length!==0&&a[0].distance{let t=()=>{this.removeEventListener(`rest`,t),e()};this.addEventListener(`rest`,t)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(`.dampingFactor has been deprecated. use smoothTime (in seconds) instead.`),0}set dampingFactor(e){console.warn(`.dampingFactor has been deprecated. use smoothTime (in seconds) instead.`)}get draggingDampingFactor(){return console.warn(`.draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.`),0}set draggingDampingFactor(e){console.warn(`.draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.`)}static createBoundingSphere(e,t=new Q.Sphere){let n=t,r=n.center;Fm.makeEmpty(),e.traverseVisible(e=>{e.isMesh&&Fm.expandByObject(e)}),Fm.getCenter(r);let i=0;return e.traverseVisible(e=>{if(!e.isMesh)return;let t=e;if(!t.geometry)return;let n=t.geometry.clone();n.applyMatrix4(t.matrixWorld);let a=n.attributes.position;for(let e=0,t=a.count;e{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},o=(e=>e?a(e):a),s=e=>e;function c(e,t=s){let n=i.useSyncExternalStore(e.subscribe,i.useCallback(()=>t(e.getState()),[e,t]),i.useCallback(()=>t(e.getInitialState()),[e,t]));return i.useDebugValue(n),n}function l(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var u=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return u(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return u(t)(e)}}}},d=(e,t)=>(n,r,i)=>{let a={storage:l(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,d=new Set,f=a.storage;if(!f)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let p=()=>{let e=a.partialize({...r()});return f.setItem(a.name,{state:e,version:a.version})},m=i.setState;i.setState=(e,t)=>(m(e,t),p());let h=e((...e)=>(n(...e),p()),r,i);i.getInitialState=()=>h;let g,_=()=>{if(!f)return;let e=++s;o=!1,c.forEach(e=>e(r()??h));let t=a.onRehydrateStorage?.call(a,r()??h)||void 0;return u(f.getItem.bind(f))(a.name).then(e=>{if(e){if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state]}return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(g=a.merge(o,r()??h),n(g,!0),i)return p()}).then(()=>{e===s&&(t?.(r(),void 0),g=r(),o=!0,d.forEach(e=>e(g)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(f=e.storage)},clearStorage:()=>{++s,f?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>_(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},a.skipHydration||_(),g||h},f=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function p(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:f(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var m=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},h=e=>{let t=m(e);return t.charAt(0).toUpperCase()+t.slice(1)},g=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),_={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function v(e){return e!=null}function y(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??_.width,a=e.size??e.height??_.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?g(...c):g(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??_[`stroke-width`])*Number(e.size??e.width??_.width)/Number(t.size??t.width??_.width):t.strokeWidth??_[`stroke-width`];return[`svg`,{...Object.entries(_).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&v(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&v(t.width)&&{[r(`width`)]:t.width},...`height`in t&&v(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function ee(e,t={}){return y(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var b=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},te=(0,i.createContext)({}),ne=()=>(0,i.useContext)(te),x=(0,i.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:a,absoluteStrokeWidth:o,nonScalingStroke:s,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:_=!1,nonScalingStroke:v=!1,color:y=`currentColor`,className:te=``}=ne()??{},x=!!l||b(f),[S,C,w=[]]=ee(d,{color:e??y,width:n??t??m,height:r??t??m,strokeWidth:a??h,absoluteStrokeWidth:o??_,nonScalingStroke:s??v,className:g(te,c),hasA11yProp:x,attributes:f});return(0,i.createElement)(S,{ref:p,...C},[...w.map(([e,t])=>(0,i.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function S(e,t=[],n=[]){let r=typeof e==`string`?p(e,t,n):e,a=(0,i.forwardRef)(({className:e,...t},n)=>(0,i.createElement)(x,{ref:n,icon:r,className:e,...t}));return r.name&&(a.displayName=h(r.name)),a}var C={name:`boxes`,size:24,node:[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]};C.node;var w=S(C),T={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};T.node;var re=S(T),E={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};E.node;var D=S(E),ie={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};ie.node;var ae=S(ie),oe={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};oe.node;var se=S(oe),ce={name:`crosshair`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]};ce.node;var le=S(ce),ue={name:`eraser`,size:24,node:[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]};ue.node;var de=S(ue),fe={name:`expand`,size:24,node:[[`path`,{d:`m15 15 6 6`,key:`1s409w`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}],[`path`,{d:`M21 16v5h-5`,key:`1ck2sf`}],[`path`,{d:`M21 8V3h-5`,key:`1qoq8a`}],[`path`,{d:`M3 16v5h5`,key:`1t08am`}],[`path`,{d:`m3 21 6-6`,key:`wwnumi`}],[`path`,{d:`M3 8V3h5`,key:`1ln10m`}],[`path`,{d:`M9 9 3 3`,key:`v551iv`}]]};fe.node;var pe=S(fe),me={name:`focus`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}]]};me.node;var he=S(me),ge={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};ge.node;var _e=S(ge),ve={name:`maximize`,size:24,node:[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]};ve.node;var ye=S(ve),be={name:`network`,size:24,node:[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]};be.node;var xe=S(be),Se={name:`orbit`,size:24,node:[[`path`,{d:`M20.341 6.484A10 10 0 0 1 10.266 21.85`,key:`1enhxb`}],[`path`,{d:`M3.659 17.516A10 10 0 0 1 13.74 2.152`,key:`1crzgf`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`circle`,{cx:`19`,cy:`5`,r:`2`,key:`mhkx31`}],[`circle`,{cx:`5`,cy:`19`,r:`2`,key:`v8kfzx`}]]};Se.node;var Ce=S(Se),we={name:`panel-right-close`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]};we.node;var Te=S(we),Ee={name:`panel-right-open`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]};Ee.node;var De=S(Ee),Oe={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Oe.node;var ke=S(Oe),Ae={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};Ae.node;var je=S(Ae),Me={name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]};Me.node;var Ne=S(Me),Pe={name:`share-2`,size:24,node:[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]};Pe.node;var Fe=S(Pe),Ie={name:`target`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]};Ie.node;var Le=S(Ie),Re={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Re.node;var ze=S(Re),Be={name:`triangles-centerline-dashed-horizontal`,size:24,node:[[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M7.298 20.288A1 1 0 008 22h8a1 1 0 00.703-1.712l-3.991-3.99a1 1 0 00-1.424-.001z`,key:`15ue1v`}],[`path`,{d:`M7.298 3.712A1 1 0 018 2h8a1 1 0 01.703 1.712l-3.991 3.99a1 1 0 01-1.424.001z`,key:`lzh03e`}]],aliases:[`flip-horizontal-2`]};Be.node;var Ve=S(Be),He={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};He.node;var Ue=S(He),We=Object.defineProperty,Ge=(e,t)=>We(e,`name`,{value:t,configurable:!0});function Ke(e,[t,n]){return Math.min(n,Math.max(t,e))}Ge(Ke,`clamp`);var qe=Object.defineProperty,O=(e,t)=>qe(e,`name`,{value:t,configurable:!0}),Je=!!(typeof window<`u`&&window.document&&window.document.createElement);function k(e,t,{checkForDefaultPrevented:n=!0}={}){return O(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}O(k,`composeEventHandlers`);function Ye(e){if(!Je)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}O(Ye,`getOwnerWindow`);function A(e){if(!Je)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}O(A,`getOwnerDocument`);function Xe(e,t=!1){let{activeElement:n}=A(e);if(!n?.nodeName)return null;if(Ze(n)&&n.contentDocument)return Xe(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=A(n).getElementById(e);if(t)return t}}return n}O(Xe,`getActiveElement`);function Ze(e){return e.tagName===`IFRAME`}O(Ze,`isFrame`);var Qe=Object.defineProperty,j=(e,t)=>Qe(e,`name`,{value:t,configurable:!0});function $e(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}j($e,`setRef`);function et(...e){return t=>{let n=!1,r=e.map(e=>{let r=$e(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;ttt(e,`name`,{value:t,configurable:!0});function nt(e,t){let n=i.createContext(t);n.displayName=e+`Context`;let r=P(e=>{let{children:t,...r}=e,a=i.useMemo(()=>r,Object.values(r));return(0,N.jsx)(n.Provider,{value:a,children:t})},`Provider`);r.displayName=e+`Provider`;function a(r,a={}){let{optional:o=!1}=a,s=i.useContext(n);if(s)return s;if(t!==void 0)return t;if(!o)throw Error(`\`${r}\` must be used within \`${e}\``)}return P(a,`useContext`),[r,a]}P(nt,`createContext`);function F(e,t=[]){let n=[];function r(t,r){let a=i.createContext(r);a.displayName=t+`Context`;let o=n.length;n=[...n,r];let s=P(t=>{let{scope:n,children:r,...s}=t,c=n?.[e]?.[o]||a,l=i.useMemo(()=>s,Object.values(s));return(0,N.jsx)(c.Provider,{value:l,children:r})},`Provider`);s.displayName=t+`Provider`;function c(n,s,c={}){let{optional:l=!1}=c,u=s?.[e]?.[o]||a,d=i.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return P(c,`useContext`),[s,c]}P(r,`createContext`);let a=P(()=>{let t=n.map(e=>i.createContext(e));return P(function(n){let r=n?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return a.scopeName=e,[r,rt(a,...t)]}P(F,`createContextScope`);function rt(...e){let t=e[0];if(e.length===1)return t;let n=P(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return P(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}P(rt,`composeContextScopes`);var I=globalThis?.document?i.useLayoutEffect:()=>{},it=Object.defineProperty,at=(e,t)=>it(e,`name`,{value:t,configurable:!0}),ot=i.useEffectEvent,st=i.useInsertionEffect;function ct(e){if(typeof ot==`function`)return ot(e);let t=i.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof st==`function`?st(()=>{t.current=e}):I(()=>{t.current=e}),i.useMemo(()=>((...e)=>t.current?.(...e)),[])}at(ct,`useEffectEvent`);var lt=Object.defineProperty,L=(e,t)=>lt(e,`name`,{value:t,configurable:!0}),ut=i.useInsertionEffect||I;function dt({prop:e,defaultProp:t,onChange:n=L(()=>{},`onChange`),caller:r}){let[a,o,s]=ft({defaultProp:t,onChange:n}),c=e!==void 0;return[c?e:a,i.useCallback(t=>{if(c){let n=pt(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}L(dt,`useControllableState`);function ft({defaultProp:e,onChange:t}){let[n,r]=i.useState(e),a=i.useRef(n),o=i.useRef(t);return ut(()=>{o.current=t},[t]),i.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,r,o]}L(ft,`useUncontrolledState`);function pt(e){return typeof e==`function`}L(pt,`isFunction`);var mt=Symbol(`RADIX:SYNC_STATE`);function ht(e,t,n,r){let{prop:a,defaultProp:o,onChange:s,caller:c}=t,l=a!==void 0,u=ct(s),d=[{...n,state:o}];r&&d.push(r);let[f,p]=i.useReducer((t,n)=>{if(n.type===mt)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=i.useRef(m);i.useEffect(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=i.useMemo(()=>a===void 0?f:{...f,state:a},[f,a]);return i.useEffect(()=>{l&&!Object.is(a,f.state)&&p({type:mt,state:a})},[a,f.state,l]),[g,p]}L(ht,`useControllableStateReducer`);var gt=Object.defineProperty,_t=(e,t)=>gt(e,`name`,{value:t,configurable:!0}),vt=i.createContext(void 0);function yt(e){let t=i.useContext(vt);return e||t||`ltr`}_t(yt,`useDirection`);var bt=Object.defineProperty,xt=(e,t)=>bt(e,`name`,{value:t,configurable:!0});function St(e){let t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}xt(St,`usePrevious`);var Ct=Object.defineProperty,wt=(e,t)=>Ct(e,`name`,{value:t,configurable:!0});function Tt(e){let[t,n]=i.useState(void 0);return I(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}wt(Tt,`useSize`);var Et=e(n(),1),Dt=Object.defineProperty,R=(e,t)=>Dt(e,`name`,{value:t,configurable:!0});function z(e){let t=i.forwardRef((t,n)=>{let{children:r,...a}=t,o=null,s=!1,c=[];Ft(r)&&typeof B==`function`&&(r=B(r._payload)),i.Children.forEach(r,e=>{if(Nt(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Ft(n)&&typeof B==`function`&&(n=B(n._payload)),o=At(t,n),c.push(o?.props?.children)}else c.push(e)}),o?o=i.cloneElement(o,void 0,c):!s&&i.Children.count(r)===1&&i.isValidElement(r)&&(o=r);let l=o?Mt(o):void 0,u=M(n,l);if(!o){if(r||r===0)throw Error(s?Rt(e):Lt(e));return r}let d=jt(a,o.props??{});return o.type!==i.Fragment&&(d.ref=n?u:l),i.cloneElement(o,d)});return t.displayName=`${e}.Slot`,t}R(z,`createSlot`);var Ot=Symbol.for(`radix.slottable`);function kt(e){let t=R(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Ot,t}R(kt,`createSlottable`);var At=R((e,t)=>{if(`child`in e.props){let t=e.props.child;return i.isValidElement(t)?i.cloneElement(t,void 0,e.props.children(t.props.children)):null}return i.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function jt(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}R(jt,`mergeProps`);function Mt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}R(Mt,`getElementRef`);function Nt(e){return i.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ot}R(Nt,`isSlottable`);var Pt=Symbol.for(`react.lazy`);function Ft(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Pt&&`_payload`in e&&It(e._payload)}R(Ft,`isLazyComponent`);function It(e){return typeof e==`object`&&!!e&&`then`in e}R(It,`isPromiseLike`);var Lt=R(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Rt=R(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),B=i.use,zt=Object.defineProperty,Bt=(e,t)=>zt(e,`name`,{value:t,configurable:!0}),V=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=z(`Primitive.${t}`),r=i.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,N.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Vt(e,t){e&&Et.flushSync(()=>e.dispatchEvent(t))}Bt(Vt,`dispatchDiscreteCustomEvent`);var Ht=Object.defineProperty,H=(e,t)=>Ht(e,`name`,{value:t,configurable:!0});function Ut(e){let t=e+`CollectionProvider`,[n,r]=F(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=H(e=>{let{scope:t,children:n}=e,r=i.useRef(null),o=i.useRef(new Map).current;return(0,N.jsx)(a,{scope:t,itemMap:o,collectionRef:r,children:n})},`CollectionProvider`);s.displayName=t;let c=e+`CollectionSlot`,l=z(c),u=i.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=M(t,o(c,n).collectionRef);return(0,N.jsx)(l,{ref:i,children:r})});u.displayName=c;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,p=z(d),m=i.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,s=i.useRef(null),c=M(t,s),l=o(d,n);return i.useEffect(()=>(l.itemMap.set(s,{ref:s,...a}),()=>void l.itemMap.delete(s))),(0,N.jsx)(p,{[f]:``,ref:c,children:r})});m.displayName=d;function h(t){let n=o(e+`CollectionConsumer`,t);return i.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return H(h,`useCollection`),[{Provider:s,Slot:u,ItemSlot:m},h,r]}H(Ut,`createCollection`);var Wt=new WeakMap,U=class e extends Map{static{H(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],Wt.set(this,!0)}set(e,t){return Wt.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=G(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function W(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=Gt(e,t);return n===-1?void 0:e[n]}H(W,`at`);function Gt(e,t){let n=e.length,r=G(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}H(Gt,`toSafeIndex`);function G(e){return e!==e||e===0?0:Math.trunc(e)}H(G,`toSafeInteger`);function Kt(e){let t=e+`CollectionProvider`,[n,r]=F(t),[a,o]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new U,setItemMap:H(()=>void 0,`setItemMap`)}),s=H(({state:e,...t})=>e?(0,N.jsx)(l,{...t,state:e}):(0,N.jsx)(c,{...t}),`CollectionProvider`);s.displayName=t;let c=H(e=>{let t=g();return(0,N.jsx)(l,{...e,state:t})},`CollectionInit`);c.displayName=t+`Init`;let l=H(e=>{let{scope:t,children:n,state:r}=e,o=i.useRef(null),[s,c]=i.useState(null),l=M(o,c),[u,d]=r;return i.useEffect(()=>{if(!s)return;let e=Yt(()=>{});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s]),(0,N.jsx)(a,{scope:t,itemMap:u,setItemMap:d,collectionRef:l,collectionRefObject:o,collectionElement:s,children:n})},`CollectionProviderImpl`);l.displayName=t+`Impl`;let u=e+`CollectionSlot`,d=z(u),f=i.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=M(t,o(u,n).collectionRef);return(0,N.jsx)(d,{ref:i,children:r})});f.displayName=u;let p=e+`CollectionItemSlot`,m=z(p),h=i.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,s=i.useRef(null),[c,l]=i.useState(null),u=M(t,s,l),{setItemMap:d}=o(p,n),f=i.useRef(a);qt(f.current,a)||(f.current=a);let h=f.current;return i.useEffect(()=>{let e=h;return d(t=>c?t.has(c)?t.set(c,{...e,element:c}).toSorted(K):(t.set(c,{...e,element:c}),t.toSorted(K)):t),()=>{d(e=>!c||!e.has(c)?e:(e.delete(c),new U(e)))}},[c,h,d]),(0,N.jsx)(m,{"data-radix-collection-item":``,ref:u,children:r})});h.displayName=p;function g(){return i.useState(new U)}H(g,`useInitCollection`);function _(t){let{itemMap:n}=o(e+`CollectionConsumer`,t);return n}return H(_,`useCollection`),[{Provider:s,Slot:f,ItemSlot:h},{createCollectionScope:r,useCollection:_,useInitCollection:g}]}H(Kt,`createCollection`);function qt(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}H(qt,`shallowEqual`);function Jt(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}H(Jt,`isElementPreceding`);function K(e,t){return!e[1].element||!t[1].element?0:Jt(e[1].element,t[1].element)?-1:1}H(K,`sortByDocumentPosition`);function Yt(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}H(Yt,`getChildListObserver`);var Xt=Object.defineProperty,q=(e,t)=>Xt(e,`name`,{value:t,configurable:!0}),Zt=[`PageUp`,`PageDown`],Qt=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],$t={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},J=`Slider`,[Y,en,tn]=Ut(J),[X,nn]=F(J,[tn]),[rn,Z]=X(J),an=i.forwardRef(q(function(e,t){let{name:n,min:r=0,max:a=100,step:o=1,orientation:s=`horizontal`,disabled:c=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[r],value:d,onValueChange:f=q(()=>{},`onValueChange`),onValueCommit:p=q(()=>{},`onValueCommit`),inverted:m=!1,form:h,...g}=e,_=i.useRef(new Set),v=i.useRef(0),y=i.useRef(!1),ee=s===`horizontal`?cn:ln,[b,te]=i.useState(null),ne=M(t,te),[x=[],S]=dt({prop:d,defaultProp:u,onChange:q(e=>{[..._.current][v.current]?.focus({preventScroll:!0,focusVisible:y.current}),y.current=!1,f(e)},`onChange`)}),C=i.useRef(x),w=i.useRef(x);i.useEffect(()=>{let e=h?b?.ownerDocument.getElementById(h):b?.closest(`form`);if(e instanceof HTMLFormElement){let t=q(()=>S(w.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[b,h,S]);function T(e){D(e,Dn(x,e))}q(T,`handleSlideStart`);function re(e){D(e,v.current)}q(re,`handleSlideMove`);function E(){String(x)!==String(C.current)&&p(x)}q(E,`handleSlideEnd`);function D(e,t,{commit:n}={commit:!1}){let i=jn(o),s=Ke($(Math.round((e-r)/o)*o+r,i),[r,a]);S((e=[])=>{let r=wn(e,s,t);if(An(r,l*o)){v.current=r.indexOf(s);let t=String(r)!==String(e);return t&&n&&p(r),t?r:e}return e})}return q(D,`updateValues`),(0,N.jsx)(rn,{scope:e.__scopeSlider,name:n,disabled:c,min:r,max:a,valueIndexToChangeRef:v,thumbs:_.current,values:x,orientation:s,form:h,children:(0,N.jsx)(Y.Provider,{scope:e.__scopeSlider,children:(0,N.jsx)(Y.Slot,{scope:e.__scopeSlider,children:(0,N.jsx)(ee,{"aria-disabled":c,"data-disabled":c?``:void 0,...g,ref:ne,onPointerDown:k(g.onPointerDown,()=>{c||(C.current=x,y.current=!1)}),min:r,max:a,inverted:m,onSlideStart:c?void 0:T,onSlideMove:c?void 0:re,onSlideEnd:c?void 0:E,onHomeKeyDown:()=>{c||(y.current=!0,D(r,0,{commit:!0}))},onEndKeyDown:()=>{c||(y.current=!0,D(a,x.length-1,{commit:!0}))},onStepKeyDown:({event:e,direction:t})=>{if(!c){y.current=!0;let n=Zt.includes(e.key)||e.shiftKey&&Qt.includes(e.key)?10:1,i=v.current,a=x[i];D(Mn(a,{min:r,step:o,direction:t,multiplier:n}),i,{commit:!0})}}})})})})},`Slider`)),[on,sn]=X(J,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),cn=i.forwardRef(q(function(e,t){let{min:n,max:r,dir:a,inverted:o,onSlideStart:s,onSlideMove:c,onSlideEnd:l,onStepKeyDown:u,...d}=e,[f,p]=i.useState(null),m=M(t,p),h=i.useRef(void 0),g=yt(a),_=g===`ltr`,v=_&&!o||!_&&o;function y(e){let t=h.current||f.getBoundingClientRect(),i=Q([0,t.width],v?[n,r]:[r,n]);return h.current=t,i(e-t.left)}return q(y,`getValueFromPointer`),(0,N.jsx)(on,{scope:e.__scopeSlider,startEdge:v?`left`:`right`,endEdge:v?`right`:`left`,direction:v?1:-1,size:`width`,children:(0,N.jsx)(un,{dir:g,"data-orientation":`horizontal`,...d,ref:m,style:{...d.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=y(e.clientX);s?.(t)},onSlideMove:e=>{let t=y(e.clientX);c?.(t)},onSlideEnd:()=>{h.current=void 0,l?.()},onStepKeyDown:e=>{let t=$t[v?`from-left`:`from-right`].includes(e.key);u?.({event:e,direction:t?-1:1})}})})},`SliderHorizontal`)),ln=i.forwardRef(q(function(e,t){let{min:n,max:r,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,d=i.useRef(null),f=M(t,d),p=i.useRef(void 0),m=!a;function h(e){let t=p.current||d.current.getBoundingClientRect(),i=Q([0,t.height],m?[r,n]:[n,r]);return p.current=t,i(e-t.top)}return q(h,`getValueFromPointer`),(0,N.jsx)(on,{scope:e.__scopeSlider,startEdge:m?`bottom`:`top`,endEdge:m?`top`:`bottom`,size:`height`,direction:m?1:-1,children:(0,N.jsx)(un,{"data-orientation":`vertical`,...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=h(e.clientY);o?.(t)},onSlideMove:e=>{let t=h(e.clientY);s?.(t)},onSlideEnd:()=>{p.current=void 0,c?.()},onStepKeyDown:e=>{let t=$t[m?`from-bottom`:`from-top`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})},`SliderVertical`)),un=i.forwardRef(q(function(e,t){let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=Z(J,n);return(0,N.jsx)(V.span,{...l,ref:t,onKeyDown:k(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):Zt.concat(Qt).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:k(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus({preventScroll:!0,focusVisible:!1}):r(e)}),onPointerMove:k(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:k(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})},`SliderImpl`)),dn=`SliderTrack`,fn=i.forwardRef(q(function(e,t){let{__scopeSlider:n,...r}=e,i=Z(dn,n);return(0,N.jsx)(V.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})},`SliderTrack`)),pn=`SliderRange`,mn=i.forwardRef(q(function(e,t){let{__scopeSlider:n,...r}=e,a=Z(pn,n),o=sn(pn,n),s=M(t,i.useRef(null)),c=a.values.length,l=a.values.map(e=>Tn(e,a.min,a.max)),u=c>1?Math.min(...l):0,d=100-Math.max(...l);return(0,N.jsx)(V.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?``:void 0,...r,ref:s,style:{...e.style,[o.startEdge]:u+`%`,[o.endEdge]:d+`%`}})},`SliderRange`)),[hn,gn]=X(`SliderThumb`),_n=`SliderThumbProvider`;function vn(e){let{__scopeSlider:t,name:n,children:r,internal_do_not_use_render:a}=e,o=Z(_n,t),s=en(t),[c,l]=i.useState(null),u=i.useMemo(()=>c?s().findIndex(e=>e.ref.current===c):-1,[s,c]),d=Tt(c),f=!c||!!o.form||!!c.closest(`form`),p=o.values[u],m=n??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),h=p===void 0?0:Tn(p,o.min,o.max);i.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]);let g={value:p,name:m,form:o.form,isFormControl:f,index:u,thumb:c,onThumbChange:l,percent:h,size:d};return(0,N.jsx)(hn,{scope:t,...g,children:Nn(a)?a(g):r})}q(vn,`SliderThumbProvider`);var yn=`SliderThumbTrigger`,bn=i.forwardRef(q(function(e,t){let{__scopeSlider:n,...r}=e,i=Z(yn,n),a=sn(yn,n),{index:o,value:s,percent:c,size:l,onThumbChange:u}=gn(yn,n),d=M(t,u),f=En(o,i.values.length),p=l?.[a.size],m=p?On(p,c,a.direction):0;return(0,N.jsx)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[a.startEdge]:`calc(${c}% + ${m}px)`},children:(0,N.jsx)(Y.ItemSlot,{scope:n,children:(0,N.jsx)(V.span,{role:`slider`,"aria-label":e[`aria-label`]||f,"aria-valuemin":i.min,"aria-valuenow":s,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,tabIndex:i.disabled?void 0:0,...r,ref:d,style:s===void 0?{display:`none`}:e.style,onFocus:k(e.onFocus,()=>{i.valueIndexToChangeRef.current=o})})})})},`SliderThumbTrigger`)),xn=i.forwardRef(q(function(e,t){let{__scopeSlider:n,name:r,...i}=e;return(0,N.jsx)(vn,{__scopeSlider:n,name:r,internal_do_not_use_render:({index:e,isFormControl:r})=>(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(bn,{...i,ref:t,__scopeSlider:n}),r?(0,N.jsx)(Cn,{__scopeSlider:n},e):null]})})},`SliderThumb`)),Sn=`SliderBubbleInput`,Cn=i.forwardRef(q(function({__scopeSlider:e,...t},n){let{value:r,name:a,form:o}=gn(Sn,e),s=i.useRef(null),c=M(s,n),l=St(r);return i.useEffect(()=>{let e=s.current;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(l!==r&&n){let t=new Event(`input`,{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}},[l,r]),(0,N.jsx)(V.input,{style:{display:`none`},name:a,form:o,...t,ref:c,defaultValue:r})},`SliderBubbleInput`));function wn(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}q(wn,`getNextSortedValues`);function Tn(e,t,n){return Ke(100/(n-t)*(e-t),[0,100])}q(Tn,`convertValueToPercentage`);function En(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}q(En,`getLabel`);function Dn(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}q(Dn,`getClosestValueIndex`);function On(e,t,n){let r=e/2;return(r-Q([0,50],[0,r])(t)*n)*n}q(On,`getThumbInBoundsOffset`);function kn(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}q(kn,`getStepsBetweenValues`);function An(e,t){if(t>0){let n=kn(e);return Math.min(...n)>=t}return!0}q(An,`hasMinStepsBetweenValues`);function Q(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}q(Q,`linearScale`);function jn(e){if(!Number.isFinite(e))return 0;let t=e.toString();if(t.includes(`e`)){let[e,n]=t.split(`e`),r=e.split(`.`)[1]||``,i=Number(n);return Math.max(0,r.length-i)}let n=t.split(`.`)[1];return n?n.length:0}q(jn,`getDecimalCount`);function $(e,t){let n=10**t;return Math.round(e*n)/n}q($,`roundValue`);function Mn(e,{min:t,step:n,direction:r,multiplier:i}){let a=jn(n),o=(e-t)/n,s=Math.round(o),c=$(s*n+t,a)===$(e,a),l;return l=c?s+i*r:r>0?Math.ceil(o):Math.floor(o),$(l*n+t,a)}q(Mn,`getNextStepValue`);function Nn(e){return typeof e==`function`}q(Nn,`isFunction`);export{c as A,se as C,w as D,re as E,l as O,le as S,D as T,ye as _,Ue as a,pe as b,Le as c,je as d,ke as f,xe as g,Ce as h,fn as i,o as j,d as k,Fe as l,Te as m,mn as n,Ve as o,De as p,xn as r,ze as s,an as t,Ne as u,_e as v,ae as w,de as x,he as y}; \ No newline at end of file diff --git a/website/static/graph-viz/graph-viz-BA42Dzr2.js b/website/static/graph-viz/graph-viz-BA42Dzr2.js new file mode 100644 index 00000000..2391f343 --- /dev/null +++ b/website/static/graph-viz/graph-viz-BA42Dzr2.js @@ -0,0 +1 @@ +(function(e,t){let n=e();function r(e,t){return $(t- -969,e)}function i(e,t){return $(e- -492,t)}for(;;)try{if(-parseInt(r(-621,-237))/1*(parseInt(i(214,23))/2)+parseInt(i(939,581))/3+parseInt(r(-12,144))/4*(parseInt(i(887,651))/5)+-parseInt(i(899,1039))/6+parseInt(i(469,102))/7*(-parseInt(r(21,464))/8)+parseInt(i(437,25))/9*(-parseInt(i(562,575))/10)+parseInt(i(719,1126))/11===t)break;n.push(n.shift())}catch{n.push(n.shift())}})(nn,603139);import{r as e}from"./chunks/1rRgETmZ.js";import{i as t,n,t as r}from"./chunks/vendor-react-CwL591ZI.js";import{D as i,E as a,O as o,T as s,a as c,d as l,f as u,g as d,h as f,i as p,l as m,m as h,n as g,r as _,s as v,u as y,v as b,x}from"./chunks/DJgKbydu.js";import{A as S,C as ee,D as C,E as w,S as te,T,_ as ne,a as re,b as E,c as ie,d as D,f as ae,g as O,h as k,i as A,j,l as M,m as N,n as P,o as oe,p as se,r as ce,s as le,t as F,u as ue,v as de,w as fe,x as pe,y as me}from"./chunks/vendor-ui-seEwvUw-.js";import{A as I,C as he,D as L,E as ge,F as R,L as _e,O as ve,P as ye,S as be,_ as z,a as xe,c as Se,d as Ce,f as we,g as Te,h as B,i as Ee,k as V,l as De,m as Oe,n as ke,p as Ae,r as je,s as Me,u as Ne,v as Pe,w as Fe,x as Ie,y as Le,z as Re}from"./chunks/DtItaGi-.js";import{a as ze,i as Be,n as Ve,o as He,r as Ue,s as We,t as Ge}from"./chunks/Cb_SCBtG.js";import{n as Ke,t as qe}from"./chunks/BKnszYrW.js";import{t as Je}from"./chunks/S1gIOLJH.js";var Ye=e=>e;function H(e,t){function n(e,t){return $(t-59,e)}function r(e,t){return $(e- -482,t)}return t(e[r(540,936)])+`|`+e[r(392,612)]+`|`+e[n(1090,984)]}function Xe(e){function t(e,t){return $(t-385,e)}function n(e,t){return $(e-910,t)}return e[n(1457,1556)]!==void 0&&(typeof e[t(1008,932)][t(821,923)]===n(2359,2307)||typeof e[t(1183,932)][n(1806,2097)]===t(1272,1665))}function Ze(e,t=Ye){function n(e,t){return $(e- -532,t)}let r=new Map;for(let n of e[i(1494,1488)]){let e=H(n,t);r[i(1146,1631)](e,(r[i(2134,2128)](e)??0)+1)}function i(e,t){return $(t-914,e)}return{nodeIDs:new Set(e[n(322,700)][i(1727,1569)](e=>e.id)),edgeIDs:new Map(e[n(42,-273)][i(1115,1569)](e=>[e.id,H(e,t)])),classCounts:r}}function Qe(e,t,n,r,i=Ye){let a={};a[_(523,565)]=[...e[m(1572,1556)]],a[m(1292,1008)]=[...e[_(243,230)]];let o=a,s=new Set(t[_(761,1152)]),c=new Map(t[_(561,241)]),l=new Map(t[m(2043,2183)]),u=o[m(1572,1607)][_(1099,1543)]+o[m(1292,838)][m(2148,2533)],d=[],f=0,p=!1;for(let e of n[_(523,380)])if(!s[_(368,-25)](e.id)){if(u>=r){p=!0;break}s[m(2e3,1868)](e.id),o[m(1572,1656)][_(754,1044)](e),d[_(754,409)](e.id),u++}function m(e,t){return $(e-718,t)}let h=new Map;for(let e of n[_(243,-196)]){if(!s[m(1417,941)](e[_(543,826)])||!s[m(1417,1895)](e[_(594,119)]))continue;let t=H(e,i),n={};n[m(2183,2622)]=[],n[_(294,389)]=0;let r=h[m(1932,1801)](t)??n;c[m(1932,2331)](e.id)===t?r[m(1343,867)]++:r[m(2183,1833)][_(754,537)](e),h[m(1435,1226)](t,r)}for(let[e,t]of h){let n=l[m(1932,2366)](e)??0;t[_(1134,1215)][_(1119,937)]((e,t)=>Number(Xe(e))-Number(Xe(t)));let i=Math[_(894,681)](0,n-t[_(294,730)]),a=t[m(2183,2027)][m(1874,1695)](i)[m(2168,1695)]((e,t)=>Number(Xe(t))-Number(Xe(e)));for(let t of a){if(u>=r){p=!0;break}let n={...t};for(;c[m(1417,1638)](n.id);)n.id+=`~`;c[_(386,205)](n.id,e),l[_(386,22)](e,(l[_(883,423)](e)??0)+1),o[_(243,63)][_(754,1198)](n),u++,f++}}let g={};function _(e,t){return $(e- -331,t)}g[_(761,456)]=s,g[m(1610,1760)]=c,g[m(2043,2026)]=l;let v={};return v[_(533,260)]=o,v[m(1705,1889)]=g,v[_(1077,1290)]=d,v[_(350,756)]=f,v[_(200,548)]=p,v}function $e(e,t){function n(e,t){return $(e-864,t)}function r(e,t){return $(e- -620,t)}return{nodes:e[r(234,665)][r(530,348)](e=>!t[r(79,-154)](e.id)),edges:e[r(-46,-480)][n(2014,2398)](e=>!t[n(1563,1348)](e[r(254,368)])&&!t[r(79,-14)](e[n(1789,1888)]))}}var et=500,tt=4;const nt={};nt[Y(909,945)]=[],nt[Y(544,665)]=[];var rt=nt;function it(e){let t=e[l(300,701)]??et,{fetcher:n}=e,r=e[l(-189,-319)]??i;function a(e,t){return Y(e,t-891)}let o=e[l(308,66)]??Ye,s=(e,t)=>n[a(2186,2221)]?.(e,t)??(e instanceof Error&&e[l(428,419)]?l(524,183)+t+`: `+e[a(2281,2220)]:l(524,663)+t+`.`),c=Ze(rt,o);function l(e,t){return Y(t,e- -901)}let u=new Set,d=e=>e[a(1854,1836)][a(2044,2412)]+e[l(-236,-293)][l(620,553)];return j()((e,i)=>{function l(t,n={}){c=Ze(t,o);function r(e,t){return $(e-10,t)}function a(e,t){return $(e-551,t)}let s=i(),l=c[a(1643,2063)],u=e=>new Set([...e][r(1160,1426)](e=>l[r(709,742)](e))),f=s[r(767,640)]&&l[a(1250,1423)](s[a(1308,1507)][r(944,823)])?s[a(1308,858)]:null;e({doc:t,revision:s[a(1169,1126)]+1,roots:u(s[a(1793,1564)]),selected:u(s[r(1098,751)]),focus:f,budget:{used:d(t),max:s[r(538,308)][r(1235,1218)]},...n})}function f(t,n){let r=i(),a=Qe(r[f(1625,1661)],c,t,r[p(1396,1365)][f(1986,2345)],o);if(a[p(2337,2245)][f(2191,2196)]===0&&a[p(1983,1518)]===0){let t={};t[p(1482,1850)]=!0,a[p(1152,1368)]&&e(t);let n={};return n[f(2169,1952)]=0,n[p(1711,1518)]=0,n[p(1587,1368)]=a[p(1610,1368)],n}c=a[p(1802,1824)];let s=t[f(1615,1446)][p(1801,1492)](e=>e.id)[p(1866,1987)](e=>a[p(1557,1824)][f(1853,1497)][p(1205,1536)](e)),l=n?new Set([...r[p(1624,2079)],...s]):r[f(2003,2135)];e({doc:a[p(2133,1701)],revision:r[p(976,1455)]+1,roots:l,budget:{used:d(a[f(1625,1949)]),max:r[p(1200,1365)][p(2487,2062)]},limitReached:r[p(2275,1850)]||a[f(1292,1004)]});let u={};function f(e,t){return $(e-761,t)}u[f(2169,2609)]=a[p(1837,2245)][p(1785,2267)],u[f(1442,1022)]=a[f(1442,1369)],u[p(1799,1368)]=a[f(1292,907)];function p(e,t){return $(t-837,e)}return u}function p(e,t){return a(t,e- -639)}async function m(t,a){let o=i(),c=o[d(69,6)][d(59,-165)][l(610,274)](e=>e.id===t);function l(e,t){return $(e- -60,t)}if(!c||!r(c,o[l(648,354)])||o[d(218,-138)]||o[d(93,-17)][l(639,366)](t))return;function d(e,t){return $(e- -795,t)}let p=at(t,a);if(!u[d(-96,-323)](p)){e({loading:new Set([...i()[d(93,-376)],t])});try{let r=await n[l(1431,1740)](c,a),s={};s[d(662,406)]=null,e(s);let m=new Map(i()[l(511,52)]),h={};h[d(389,380)]=r?.[l(1124,1104)],h[d(-33,-425)]=r?.[l(702,403)]??!1,h[d(656,491)]=a[d(656,946)]??0,h[l(887,1362)]=a[d(152,-12)]??o[l(648,167)]?.[l(711,992)][d(700,248)]??0,h[l(1048,1413)]=a,m[l(657,949)](t,h);let g={};if(g[l(511,67)]=m,e(g),!r?.[l(804,324)]){u[d(487,744)](p);return}let{addedNodes:_,addedEdges:v,budgetHit:y}=f(r[d(69,-337)],!1);(_+v>0||!y)&&u[l(1222,982)](p)}catch(t){e({error:s(t,l(1177,1001))})}finally{let n=new Set(i()[l(828,1104)]);n[l(1366,1302)](t);let r={};r[d(93,-161)]=n,e(r)}}}let h={};h[p(1251,1377)]=0,h[g(1093,724)]=t;function g(e,t){return a(t,e- -1114)}return{doc:rt,revision:0,roots:new Set,selected:new Set,focus:null,budget:h,limitReached:!1,loading:new Set,expansions:new Map,error:null,schema:null,seed(n,r){u[f(1015,931)]();function a(e,t){return g(t- -732,e)}let s=new Set(n[a(-323,-10)][a(-664,-209)](e=>e.id)),l=(r??[])[a(-16,286)](e=>s[f(452,731)](e));l[f(1183,1669)]===0&&(l=n[f(607,265)][f(903,1028)](e=>e[f(300,-194)]?.[f(291,267)]===a(444,10))[a(-257,-209)](e=>e.id));function f(e,t){return g(e- -115,t)}l[a(789,566)]===0&&n[a(-401,-10)][a(559,566)]>0&&(l=[n[a(-7,-10)][0].id]),c=Ze(n,o),e({doc:n,revision:i()[a(-716,-246)]+1,roots:new Set(l),selected:new Set,focus:null,budget:{used:d(n),max:d(n)+t},limitReached:!1,expansions:new Map,error:null})},addResult(e,t){let n=i()[c(201,-52)][c(234,-62)][c(278,514)]===0;function r(e,t){return g(e-1085,t)}let{addedNodes:a,addedEdges:o}=f(e,t?.[r(1456,1770)]===!0||n),s={};function c(e,t){return g(t- -784,e)}return s[r(2361,2500)]=a,s[r(1634,1702)]=o,s},expand:(e,t={})=>m(e,t),async expandSelection(e={}){function t(e,t){return g(t-592,e)}function n(e,t){return g(e- -396,t)}let r=[...i()[t(1436,1548)]];for(let i=0;im(t,e)))},dismiss(e){function t(e,t){return p(t-212,e)}let n=new Set(e);if(n[t(1209,1101)]===0)return;let r={};r[t(1515,1568)]=!1,l($e(i()[t(1600,1419)],n),r)},dismissOthers(e){function t(e,t){return p(t- -241,e)}let n=new Set(e),r=new Set(i()[t(1299,966)][t(1149,956)][o(630,647)](e=>e.id)[t(868,1252)](e=>!n[o(674,909)](e)));if(r[t(1026,648)]===0)return;let a={};a[t(1558,1115)]=!1;function o(e,t){return p(e- -368,t)}l($e(i()[o(839,735)],r),a)},clear(){u[e(243,307)]();function e(e,t){return p(t- -1298,e)}l(rt,{expansions:new Map,limitReached:!1,error:null})},select(t,n){function r(e,t){return g(t-479,e)}let a=[...t][r(1948,1497)](e=>c[l(811,423)][l(418,382)](e));if(n===r(2041,1555)){e({selected:new Set(a)});return}let o=new Set(i()[r(1322,1435)]);for(let e of a)n===r(1473,1769)&&o[l(418,836)](e)?o[l(1145,934)](e):o[r(1695,1629)](e);let s={};s[l(807,415)]=o;function l(e,t){return g(e- -149,t)}e(s)},selectAll(){function t(e,t){return g(e-573,t)}function n(e,t){return g(t-516,e)}e({selected:new Set(i()[t(1305,1074)][n(1421,1238)][n(938,1039)](e=>e.id))})},invertSelection(){let t=i()[r(92,-182)];function n(e,t){return p(e-11,t)}function r(e,t){return p(e- -1339,t)}e({selected:new Set(i()[r(-132,-510)][n(1208,1424)][n(1009,1187)](e=>e.id)[n(1504,1384)](e=>!t[r(-297,-560)](e)))})},setRoots(t){function n(e,t){return g(t-425,e)}function r(e,t){return g(t-962,e)}e({roots:new Set([...t][n(1201,1443)](e=>c[r(2313,1922)][r(1282,1529)](e)))})},addRoots(t){function n(e,t){return p(t- -395,e)}function r(e,t){return p(e-199,t)}e({roots:new Set([...i()[r(1784,1572)],...[...t][n(1370,1098)](e=>c[n(638,1040)][r(1241,929)](e))])})},enterFocus(t,n){if(!c[s(788,300)][s(-155,-93)](t))return;let r=i()[o(249,615)],a={};a[o(426,204)]=t;function o(e,t){return g(e- -376,t)}a[s(-349,101)]=n?.[o(385,347)]??r?.[s(11,101)]??0,a[s(-60,-100)]=n?.[o(184,373)]??r?.[o(184,82)]??2;function s(e,t){return g(t- -660,e)}a[s(343,363)]=r?.[s(353,363)]??s(946,487);let l={};l[s(-420,-35)]=a,e(l)},setFocusRange(t,n){function r(e,t){return g(e-1120,t)}function a(e,t){return g(e- -705,t)}let o=i()[a(-80,-256)];o&&e({focus:{...o,minHops:Math[a(433,729)](t,n),maxHops:Math[r(2213,1844)](t,n)}})},setFocusDirection(t){let n=i()[r(30,-162)];function r(e,t){return p(e- -1070,t)}n&&e({focus:{...n,direction:t}})},exitFocus(){function t(e,t){return g(t-418,e)}let n={};n[t(1345,1043)]=null,e(n)},setSchema(t){let n={};function r(e,t){return g(e- -860,t)}n[r(-284,37)]=t,e(n)},setError(t){let n={};function r(e,t){return g(e- -178,t)}n[r(1147,1063)]=t,e(n)},canExpand(e){function t(e,t){return g(t- -315,e)}return r(e,i()[t(316,261)])}}})}function at(e,t){function n(e,t){return X(e- -107,t)}function r(e,t){return X(e- -271,t)}return[e,t[r(1351,1722)]??r(1475,1808),[...t[n(1803,2028)]??[]][n(1810,1375)]()[r(1387,1459)](`,`),[...t[r(746,800)]??[]][n(1810,1515)]()[n(1551,1239)](`,`),t[r(1647,1893)]??0][r(1387,940)](`|`)}var U=e(t(),1);function ot(e,t=null){function n(e,t){return X(e- -981,t)}let[r]=(0,U[n(884,868)])(()=>it(e));return(0,U[n(223,654)])(()=>{function e(e,t){return n(e-1296,t)}function i(e,t){return n(t-18,e)}r[i(377,331)]()[e(1965,2411)](t)},[r,t]),r}function st(e,t){let{defaultWidth:n,min:r,max:i}=t,a=y(t=>t[c(2269,1884)][e]);function o(e,t){return X(e- -1462,t)}let s=y(e=>e[o(-243,-246)]);function c(e,t){return X(e-365,t)}return{width:ct(a??n,r,i),setWidth:(0,U[o(351,-38)])(t=>s(e,ct(t,r,i)),[s,e,r,i]),reset:(0,U[c(2178,2205)])(()=>s(e,n),[s,e,n]),min:r,max:i}}function ct(e,t,n){function r(e,t){return Y(e,t-557)}function i(e,t){return Y(t,e-426)}return Math[i(1787,1959)](Math[r(2179,1873)](e,t),n)}var W=r(),lt=16;function ut({panel:e,side:t=Y(706,593),ariaLabel:n}){let r=(0,U[c(1003,962)])(null);function i(t){if(t[n(296,236)]!==0)return;function n(e,t){return c(t,e- -959)}t[i(619,896)]();function i(e,t){return c(e,t- -763)}let a={};a[i(1038,876)]=t[n(254,52)],a[i(49,131)]=e[i(-104,335)],r[i(956,645)]=a;try{t[n(448,936)][n(459,828)](t[i(798,405)])}catch{}}function a(n){let i=r[s(1628,1881)];if(!i)return;let a=n[s(1968,1686)]-i[s(2206,2112)];function o(e,t){return c(t,e- -1155)}function s(e,t){return c(e,t-473)}e[o(331,-29)](i[o(-261,76)]+(t===o(-439,-422)?a:-a))}function o(e){function t(e,t){return c(e,t- -1018)}if(!r[t(717,390)])return;function n(e,t){return c(e,t-48)}r[n(1131,1456)]=null;try{e[t(709,389)][n(745,1227)](e[n(771,1216)])&&e[t(703,389)][t(-265,214)](e[t(84,150)])}catch{}}function s(n){function r(e,t){return c(e,t-559)}function i(e,t){return c(t,e- -601)}let a=t===i(115,614)?1:-1;switch(n[i(502,717)]){case r(1673,1939):n[i(1058,992)](),e[r(1939,2045)](e[i(497,170)]-lt*a);break;case r(1099,1478):n[r(1907,2218)](),e[r(1779,2045)](e[r(1803,1657)]+lt*a);break;case i(971,1234):n[i(1058,1529)](),e[r(1377,1354)]()}}function c(e,t){return X(t- -253,e)}let l={};l[c(756,1043)]=-5;let u={};u[f(123,449)]=-5;let d={};d[c(1435,1176)]=f(677,226);function f(e,t){return X(e- -846,t)}return(0,W[c(1449,1427)])(f(750,567),{role:c(496,899),"aria-orientation":c(2040,1579),"aria-label":n,"aria-valuenow":Math[f(617,885)](e[c(1561,1098)]),"aria-valuemin":e[f(891,635)],"aria-valuemax":e[f(846,1101)],tabIndex:0,onPointerDown:i,onPointerMove:a,onPointerUp:o,onPointerCancel:o,onDoubleClick:e[c(459,795)],onKeyDown:s,title:f(725,693),className:f(391,331),style:t===f(123,-18)?l:u,children:(0,W[f(834,1052)])(c(1244,1343),d)})}function dt(e,t){let n=(0,U[i(884,1161)])(null),r=(0,U[i(1411,1161)])(t);(0,U[a(1618,1370)])(()=>{function e(e,t){return i(e,t- -860)}r[e(772,747)]=t},[t]);function i(e,t){return Y(e,t-322)}function a(e,t){return Y(e,t-542)}return(0,U[a(1831,1370)])(()=>{if(!e)return;function t(e,t){return a(t,e- -1249)}function i(e,t){return a(t,e- -190)}let o=e=>{function t(e,t){return $(e-557,t)}function i(e,t){return $(t-562,e)}n[t(1751,1652)]?.[i(1505,1954)](e[i(1217,1487)])||r[i(1367,1756)]()},s=e=>{function t(e,t){return $(e- -290,t)}function n(e,t){return $(t- -627,e)}e[n(-102,262)]===n(506,357)&&r[t(904,1183)]()};return document[t(643,329)](i(1107,1526),o),document[t(643,733)](t(825,604),s),()=>{document[e(848,614)](e(388,19),o);function e(e,t){return i(e- -719,t)}function t(e,t){return i(e- -567,t)}document[t(1e3,667)](e(1165,1448),s)}},[e]),n}var ft=224;function pt(e){function t(e,t){return Y(t,e- -159)}return e[t(1220,1236)]()}function mt(e){let{nodeId:t,x:n,y:r,bounds:i,scene:a,topology:o,schema:s,capabilities:c,selectionAction:l,onFit:u,onClose:d}=e,f=dt(!0,d),p=S(a,e=>e[k(1544,1373)]),m=S(a,e=>e[w(1456,1779)]),h=S(a,e=>e[k(1250,1522)]),g=S(a,e=>e[k(1021,1397)]),_=S(a,e=>t?e[w(939,552)][w(1582,1586)](t):void 0),[v,y]=(0,U[k(2077,1907)])(null),b={};b[w(870,473)]=n,b[k(1135,1105)]=r;let[x,C]=(0,U[k(1616,1907)])(b);function w(e,t){return Y(t,e-277)}let T=t?p[k(884,1363)][w(1038,1108)](e=>e.id===t):void 0,D=a[k(1202,1336)]();(0,U[w(1088,789)])(()=>{let e=f[o(-144,212)];if(!e)return;let t=e[o(-59,205)];function a(e,t){return k(t,e- -1200)}function o(e,t){return k(e,t- -1491)}C({left:n+ft>i[a(193,255)]?Math[a(534,951)](4,n-ft):n,top:r+t>i[a(-42,312)]?Math[o(352,243)](4,i[o(-710,-333)]-t-4):r})},[n,r,i[k(1504,1393)],i[k(1417,1158)],f]);function k(e,t){return Y(e,t-418)}(0,U[w(1105,959)])(()=>{function e(e,t){return k(t,e-11)}function t(e,t){return k(e,t- -314)}f[t(939,1389)]?.[e(1224,1349)](t(1303,1037))?.[e(1277,1483)]()},[f]);let A=[];if(T){let e=D[w(989,1473)](T)?h?k(1889,1992):g[k(1231,1208)](T.id)?k(2057,1575):!1:w(1003,1018),t=(e,t)=>t===void 0?e:e+` (`+pt(t)+`)`,n=e=>()=>void D[k(1940,2e3)](T.id,e),r=s?.[w(1164,1520)][k(990,1164)](e=>e[w(1390,1020)])??[],i={};i[k(622,1055)]=12;let a={};a[w(1523,1095)]=k(1964,1788);let u={};u[k(1022,1055)]=12;let d={};d[k(1876,1664)]=k(1196,1408);let f={};f[k(617,1055)]=12,f[k(1359,1471)]=w(1353,1310);let p={};p[k(1662,1664)]=`in`;let v=[{key:k(1767,1503),icon:(0,W[k(1492,1722)])(O,i),label:w(904,1304),run:n(a)},{key:w(1267,1550),icon:(0,W[k(1583,1722)])(fe,u),label:t(k(1988,1849),_?.[k(1997,1693)]?.[w(1267,1657)]),run:n(d)},{key:`in`,icon:(0,W[w(1581,1280)])(fe,f),label:t(w(1782,1763),_?.[w(1552,1875)]?.in),run:n(p)},...r[w(1023,1404)](e=>({key:k(1244,1643)+e,icon:(0,W[w(1581,1406)])(w(1402,1291),{className:w(1520,1055),children:`⟶`}),label:e,run:n({direction:w(1647,1218),relTypes:[e]})}))],y={};y[w(914,1037)]=12,A[w(1453,1864)]({key:w(1859,1860),icon:(0,W[w(1581,1297)])(E,y),label:k(1272,1008),disabled:e,submenu:v});let b={};b[k(1144,1055)]=12,_?.[w(1130,1580)]&&A[k(1167,1594)]({key:w(1705,2206),icon:(0,W[k(2211,1722)])(ae,b),label:k(1353,1780),disabled:e,run:()=>void D[w(1859,1847)](T.id,{..._[w(1476,1536)],offset:_[k(2368,1960)]+(_[k(1024,1456)]||50)})});let x={};if(x[k(1394,1055)]=12,c[k(1978,1832)]&&A[k(1543,1594)]({key:k(1663,1266),icon:(0,W[w(1581,1919)])(me,x),label:k(1016,1079),run:()=>D[w(1792,1820)](T.id)}),c[k(1415,1111)]){let e={};e[w(914,419)]=12,A[k(1189,1594)]({key:k(1522,1298),icon:(0,W[k(1737,1722)])(ie,e),label:w(1493,1367),run:()=>D[w(1573,1996)]([T.id])});let t={};t[k(622,1055)]=12,A[k(1558,1594)]({key:k(1454,1842),icon:(0,W[k(2055,1722)])(te,t),label:w(1124,728),run:()=>D[w(931,1391)]([T.id])})}let S={};S[k(1295,1055)]=12,A[k(1235,1594)]({key:w(1349,1195),icon:(0,W[w(1581,1384)])(O,S),label:k(956,1251),run:()=>{let e=o[t(346,566)][t(746,612)](T.id);function t(e,t){return w(t- -970,e)}if(e===void 0)return;let n=new Set([T.id]);for(let i=o[t(308,745)][e];iD[k(1490,1682)]([T.id])});let j={};j[k(1414,1055)]=12,A[w(1453,1612)]({key:k(808,1052),icon:(0,W[k(1556,1722)])(re,j),label:m[w(914,772)]>0?k(1263,1167)+pt(m[k(1288,1055)])+`)`:w(873,668),danger:!0,run:()=>D[k(1690,1445)](m[w(914,439)]>0?m:[T.id])});let M={};M[w(914,838)]=12,A[k(1172,1594)]({key:w(908,744),icon:(0,W[w(1581,1423)])(ee,M),label:w(1188,1435),run:()=>void navigator[k(1483,1448)]?.[w(1275,895)](T.id)});let N={};N[w(914,1059)]=12,A[k(1963,1594)]({key:k(1646,1184),icon:(0,W[w(1581,1498)])(ee,N),label:k(1292,1385),run:()=>void navigator[w(1307,1247)]?.[w(1275,982)](T[w(925,596)])});let P={};P[w(914,1218)]=12,l&&A[k(1468,1594)]({key:k(1558,1951),icon:(0,W[w(1581,1553)])(ue,P),label:l[w(925,897)](Math[k(2008,1734)](1,m[k(961,1055)])),run:()=>{function e(e,t){return k(e,t- -1051)}function t(e,t){return k(e,t-482)}m[t(1349,1537)]===0&&D[t(1345,1520)]([T.id],e(1050,666)),l[e(1107,692)]()}})}else{let e={};e[k(1547,1055)]=12,A[w(1453,1166)]({key:w(1091,1135),icon:(0,W[w(1581,1578)])(oe,e),label:w(1590,1728),run:D[k(1637,2003)]});let t={};t[k(1150,1055)]=12,A[w(1453,1259)]({key:k(1191,1440),icon:(0,W[k(1228,1722)])(ne,t),label:w(1183,682),run:u});let n={};n[w(914,511)]=12,A[k(1764,1594)]({key:k(1453,1922),icon:(0,W[w(1581,1858)])(E,n),label:w(1377,1080)+(m[k(1358,1055)]>0?` (`+pt(m[w(914,1043)])+`)`:``),disabled:m[w(914,850)]===0?k(1402,1285):h?w(1851,1497):!1,run:()=>void D[k(1182,1455)]()});let r={};r[k(907,1055)]=12,A[w(1453,1172)]({key:k(2082,1771),icon:(0,W[k(1793,1722)])(pe,r),label:k(1124,1224),danger:!0,run:D[k(1413,1771)]})}function j(e){let t=Array[n(1564,1714)](e[r(1684,1559)][n(1613,1340)](r(1333,1413)));function n(e,t){return w(t-427,e)}function r(e,t){return w(e-123,t)}let i=t[n(1519,1596)](e=>e===document[n(1310,1686)]);e[r(1380,1309)]===r(1920,1976)||e[n(1774,1684)]===r(1732,2021)?(e[n(2540,2240)](),t[e[n(1781,1684)]===n(1917,2224)?(i+1)%t[r(1921,2394)]:(i-1+t[r(1921,1940)])%t[n(2440,2225)]]?.[n(1412,1552)]()):e[n(1531,1684)]===r(1657,2044)&&v&&(e[n(2457,2240)](),y(null))}function M(e,t){function n(e,t){return k(t,e- -495)}let r=!!e[o(1185,798)],a={};function o(e,t){return k(t,e-172)}return a[o(1227,755)]=11,a[o(1643,1302)]=o(1293,1759),(0,W[n(1175,898)])(n(1143,872),{className:n(1075,1516),onMouseEnter:()=>!t&&y(e[n(548,803)]?e[o(1570,1957)]:null),children:[(0,W[o(1842,2018)])(n(1055,1020),{role:n(1078,1340),"aria-haspopup":e[o(1215,1177)]?o(1338,1315):void 0,"aria-expanded":e[o(1215,1354)]?v===e[n(903,616)]:void 0,disabled:r,title:typeof e[o(1185,971)]===o(2130,2360)?e[n(518,266)]:void 0,onKeyDown:t=>{function n(e,t){return o(e- -1113,t)}function r(e,t){return o(e- -1117,t)}e[n(102,-293)]&&(t[r(453,942)]===n(273,-67)||t[r(453,236)]===n(929,701))&&(t[r(1009,531)](),y(e[n(457,382)]),requestAnimationFrame(()=>f[r(758,780)]?.[n(272,310)](r(735,1193)+e[r(453,499)]+r(1053,621))?.[r(321,748)]()))},onClick:()=>{if(e[t(426,-32)]){y(v===e[r(967,1322)]?null:e[t(781,1098)]);return}function t(e,t){return n(e- -122,t)}d();function r(e,t){return n(t-419,e)}e[t(1126,1221)]?.()},className:o(2052,2275)+(e[n(1031,683)]?o(1395,1843):o(1697,1813)),children:[e[n(1151,1369)],(0,W[n(1227,1088)])(n(1048,800),{className:o(1807,1315),children:e[n(571,237)]}),e[o(1215,1202)]&&(0,W[o(1894,1817)])(fe,a)]}),e[n(548,975)]&&v===e[n(903,1151)]&&!r&&(0,W[o(1894,1657)])(o(1810,1450),{role:o(1338,1813),"data-sub":e[o(1570,1510)],className:n(701,976)+(x[o(1183,1470)]+448>i[o(1565,1176)]?n(1306,1148):n(683,226)),children:e[n(548,285)][o(1336,1808)](e=>M(e,!0))})]},e[o(1570,1562)])}let N={};return N[k(605,1011)]=x[w(870,1256)],N[k(1412,1105)]=x[w(964,528)],N[k(1864,1393)]=ft,(0,W[k(1186,1670)])(k(1719,1638),{ref:f,role:w(1025,737),"aria-label":T?k(1416,1589)+T[w(925,901)]:k(930,1240),onKeyDown:j,onContextMenu:e=>e[w(1813,2188)](),style:N,className:w(1162,1043),children:[T&&(0,W[k(1688,1670)])(w(1497,1076),{className:w(1383,1109),children:[T[k(1207,1531)],k(1137,1360),T[w(925,502)]]}),A[k(1135,1164)](e=>M(e,!1))]})}function G({groupKey:e,title:t,defaultOpen:n=!1,accent:r=!1,children:i}){let a=y(t=>t[f(302,382)][e]),o=y(e=>e[u(1938,2369)]),s=a??n,c=(0,U[u(1520,2003)])(),l={};l[f(-426,-287)]=12;function u(e,t){return X(e-33,t)}let d={};function f(e,t){return X(t- -1300,e)}return d[u(1046,1010)]=12,(0,W[u(1661,1163)])(f(-31,-14),{className:u(1312,813)+(r?f(-46,-105):``),children:[(0,W[f(258,328)])(u(1541,1339),{type:f(281,208),"aria-expanded":s,"aria-controls":c,onClick:()=>o(e,!s),className:u(1110,795),children:[s?(0,W[f(7,380)])(T,l):(0,W[u(1713,1630)])(fe,d),t]}),s&&(0,W[f(417,380)])(f(751,296),{id:c,className:f(197,-30),children:i})]})}function ht({label:e,description:t,children:n,htmlFor:r}){function i(e,t){return Y(t,e-369)}let a={};a[s(314,354)]=r,a[i(1422,1429)]=s(715,391),a[i(1096,1367)]=e;let o={};o[i(1422,1512)]=i(1588,2038),o[i(1096,1322)]=n;function s(e,t){return Y(e,t- -819)}return(0,W[i(1621,2038)])(i(1589,1408),{className:i(1879,1578),children:[(0,W[i(1621,1632)])(i(1589,1118),{className:s(-89,-37),children:[(0,W[s(385,485)])(i(1017,902),a),(0,W[s(407,485)])(s(790,401),o)]}),t&&(0,W[i(1673,1877)])(`p`,{className:s(483,108),children:t})]})}function K({label:e,checked:t,onChange:n,disabled:r,description:i}){let a=(0,U[s(1158,1455)])();function o(e,t){return X(t- -871,e)}function s(e,t){return X(e- -329,t)}return(0,W[o(328,809)])(ht,{label:e,htmlFor:a,description:i,children:(0,W[o(1236,809)])(s(1179,779),{id:a,type:s(1179,903),role:s(985,783),"aria-checked":t,disabled:r,onClick:()=>n(!t),className:o(937,713)+(t?o(818,355):o(-53,435)),children:(0,W[o(1143,809)])(s(1172,1405),{className:o(807,697)+(t?o(835,892):s(931,1007))})})})}function q({label:e,value:t,options:n,onChange:r,disabled:i,description:a}){function o(e,t){return X(t- -687,e)}let s=(0,U[o(1278,800)])(),c=n[l(439,472)](e=>e[o(1096,1140)]===t);function l(e,t){return X(e- -698,t)}return(0,W[o(1398,993)])(ht,{label:e,htmlFor:s,description:a??c?.[l(270,-163)],children:(0,W[o(984,993)])(l(298,301),{id:s,value:t,disabled:i,onChange:e=>{let t=n[a(492,13)](t=>t[i(1355,1513)]===e[a(747,546)][a(1182,995)]);function i(e,t){return o(t,e-215)}function a(e,t){return o(t,e-42)}t&&r(t[i(1355,1498)])},className:l(1139,972),children:n[l(424,923)](e=>(0,W[l(982,1312)])(l(780,522),{value:e[l(1129,1104)],children:e[l(326,555)]},e[o(1161,1140)]))})})}function J({label:e,value:t,min:n,max:r,step:i,onChange:a,disabled:o,format:s=e=>String(e),description:c}){function l(e,t){return Y(t,e-399)}function u(e,t){return Y(e,t- -980)}let d=(0,U[l(1510,1317)])();return(0,W[l(1651,1647)])(ht,{label:e,htmlFor:d,description:c,children:[(0,W[l(1703,2166)])(l(1390,948),{id:d,type:l(1009,676),min:n,max:r,step:i,value:t,disabled:o,onChange:e=>a(Number(e[u(149,36)][u(371,471)])),className:l(1351,1410)}),(0,W[u(472,324)])(u(177,145),{className:l(1870,1696),children:s(t)})]})}function gt({label:e,value:t,min:n,max:r,step:i=1,onChange:a,thumbLabels:o,format:s=e=>e[0]+Y(1402,1213)+e[1]}){function c(e,t){return X(e-22,t)}let l={};l[u(1368,1251)]=u(1546,1632);function u(e,t){return X(e- -61,t)}l[u(1042,963)]=e;let d={};return d[u(1368,906)]=c(1831,1990),(0,W[c(1650,2019)])(u(1535,1194),{className:u(1787,1765),children:[(0,W[c(1650,1438)])(u(1535,1555),{className:c(1949,1937),children:[(0,W[u(1619,1671)])(c(1523,1526),l),(0,W[u(1619,2114)])(c(1523,1087),{className:u(1650,2110),children:s(t)})]}),(0,W[c(1650,1932)])(F,{className:c(1242,1681),min:n,max:r,step:i,minStepsBetweenThumbs:0,value:t,onValueChange:e=>{function t(e,t){return u(t- -1223,e)}e[t(645,613)]===2&&a([e[0],e[1]])},children:[(0,W[c(1702,2088)])(A,{className:c(1081,1298),children:(0,W[u(1619,1226)])(P,d)}),o[c(1144,1270)](e=>(0,W[c(1702,1343)])(ce,{"aria-label":e,className:u(1862,1447)},e))]})]})}function _t({label:e,value:t,onChange:n,disabled:r}){function i(e,t){return Y(t,e- -23)}let a=(0,U[o(1043,1480)])();function o(e,t){return Y(t,e- -68)}return(0,W[i(1281,1360)])(ht,{label:e,htmlFor:a,children:(0,W[o(1236,985)])(i(968,1170),{id:a,type:i(730,829),value:t,disabled:r,onChange:e=>n(e[o(948,679)][i(1428,1115)]),className:i(918,900)})})}function vt({onClick:e,label:t=X(1155,958)}){function n(e,t){return X(e- -931,t)}function r(e,t){return X(t-398,e)}let i={};return i[r(1653,1411)]=11,(0,W[n(749,581)])(n(577,972),{type:n(577,432),onClick:e,title:t,"aria-label":t,className:n(874,383),children:(0,W[n(749,875)])(D,i)})}function yt({onClick:e,children:t,disabled:n}){function r(e,t){return Y(t,e- -826)}let i={};i[a(1431,1689)]=a(1691,1708),i[a(1852,1478)]=e;function a(e,t){return Y(e,t-576)}return i[r(-231,36)]=n,i[r(227,352)]=r(406,188),i[a(1309,1303)]=t,(0,W[r(478,522)])(r(306,523),i)}function bt(){function e(e,t){return Y(e,t- -1083)}let[t,n]=(0,U[e(89,406)])(null);return(0,U[e(-630,-255)])(()=>{function t(t,n){return e(t,n-527)}let r=!0;return _()[t(888,715)](e=>{r&&n(e)}),()=>{r=!1}},[]),t}function xt({set:e,name:t,size:n=16,color:r=X(1735,1943)}){let i=(0,U[s(755,340)])(null);(0,U[s(389,329)])(()=>{let a=i[o(1567,1156)];function o(e,t){return s(e,t-370)}if(!a)return;let c=window[u(2037,1723)]||1;a[o(632,846)]=n*c,a[o(1052,611)]=n*c;let l=a[o(1010,1094)](`2d`);function u(e,t){return s(t,e-1333)}l&&(l[u(2215,2306)](0,0,a[o(774,846)],a[o(1058,611)]),g(l,p(e,t),0,0,n*c,r))},[e,t,n,r]);let a={};a[s(352,476)]=n,a[c(-115,232)]=n;let o={};o[s(534,584)]=i,o[s(227,338)]=a;function s(e,t){return X(t- -875,e)}o[c(23,-336)]=!0;function c(e,t){return X(e- -1231,t)}return(0,W[s(326,805)])(c(185,141),o)}var St=60;function Ct({label:e,value:t,onChange:n}){let r=bt(),[i,a]=(0,U[u(720,755)])(!1),[o,s]=(0,U[d(1172,1159)])(``),c=(0,U[d(1094,1063)])(()=>{if(!r)return[];let e=o[i(912,621)]()[i(1380,1011)]();function t(e,t){return d(t,e-734)}let n=[];for(let a of r[t(1862,2085)]())if((e===``||a[t(1848,1695)](e))&&n[t(1580,1185)](a),n[i(842,1310)]>=St)break;function i(e,t){return d(e,t-119)}return n},[r,o]),l={};l[u(284,-194)]=d(705,497);function u(e,t){return Y(t,e- -769)}function d(e,t){return Y(e,t- -330)}return l[d(312,397)]=u(280,-133),(0,W[d(1239,922)])(d(649,890),{className:u(741,492),children:[(0,W[d(805,974)])(ht,{label:e,children:(0,W[u(483,299)])(d(919,802),{type:u(363,335),"aria-expanded":i,onClick:()=>a(e=>!e),className:d(709,1207),children:[r&&(0,W[u(535,269)])(xt,{set:r,name:t,size:12}),(0,W[d(1417,974)])(u(356,637),{className:d(583,535),children:t})]})}),i&&(0,W[u(483,811)])(u(451,-29),{className:d(1171,1189),children:[(0,W[d(1002,974)])(d(800,661),{autoFocus:!0,value:o,onChange:e=>s(e[u(247,619)][d(752,1121)]),placeholder:d(462,429),"aria-label":u(400,734),className:d(896,963)}),r?(0,W[d(900,974)])(u(451,664),{role:u(475,11),"aria-label":u(600,944),className:u(-139,-430),children:c[d(99,416)](e=>(0,W[u(535,827)])(d(614,802),{type:d(469,802),role:u(333,377),"aria-selected":e===t,title:e,onClick:()=>{n(e),a(!1)},className:u(260,302)+(e===t?u(248,22):``),children:(0,W[u(535,119)])(xt,{set:r,name:e,size:16})},e))}):(0,W[u(535,779)])(`p`,l)]})]})}const wt={};wt[X(1345,1115)]=X(977,1297),wt[Y(1299,1450)]=X(1119,1409),wt[Y(1215,915)]=X(1798,1615),wt[X(985,1160)]=X(1902,2149),wt[X(1604,1296)]=Y(1362,1559);var Tt=wt;function Et({scene:e,schema:t}){let n=S(e,e=>e[s(366,52)]),r=y(e=>e[s(-61,-66)]),i=y(e=>e[l(2192,1974)]),a=y(e=>e[s(234,-116)]),o=y(e=>e[s(30,-90)]);function s(e,t){return X(t- -1279,e)}let c=y(e=>e[s(-454,41)]);function l(e,t){return X(t-417,e)}let u=y(e=>e[s(274,464)]),{nodeTypes:p,relTypes:m,propsByType:h,relPropsByType:g}=(0,U[l(1758,2186)])(()=>{let e=new Set(t?.[o(981,537)][o(233,646)](e=>e[o(600,767)])??[]),r=new Set(t?.[o(374,287)][o(233,252)](e=>e[a(1996,2126)])??[]),i=new Map;function a(e,t){return l(t,e-90)}function o(e,t){return l(t,e- -1306)}let s=new Map;for(let e of t?.[a(2377,2828)]??[])i[a(1691,1495)](e[o(600,1022)],new Set([e[o(467,299)],...e[o(770,416)]]));for(let e of t?.[a(1770,2030)]??[])s[o(295,276)](e[o(600,752)],new Set(e[o(770,1195)]));for(let t of n[a(1828,1997)]){e[o(860,428)](t[a(1996,2114)]);let n=i[a(2188,1765)](t[o(600,760)])??new Set;for(let e of Object[a(2341,1882)](t[a(1521,1909)]??{}))n[a(2256,2447)](e);i[a(1691,2121)](t[a(1996,1944)],n)}for(let e of n[a(1548,2027)]){r[a(2256,1821)](e[a(1996,1736)]);let t=s[o(792,1163)](e[a(1996,2484)])??new Set;for(let n of Object[o(945,1370)](e[a(1521,1214)]??{}))t[a(2256,2305)](n);s[o(295,545)](e[a(1996,2279)],t)}let c={};return c[o(358,279)]=[...e],c[a(2417,2904)]=[...r],c[a(2294,2084)]=i,c[o(951,848)]=s,c},[n,t]),_={};return _[s(-248,-1)]=u,_[l(1150,1520)]=l(2009,1848),(0,W[l(2211,2045)])(G,{groupKey:l(1750,1630),title:s(263,415),children:[(0,W[s(703,401)])(s(292,317),{className:l(2392,2023),children:(0,W[s(43,401)])(yt,_)}),p[l(1869,1539)](e=>(0,W[s(834,401)])(Ot,{type:e,style:f(r,{type:e}),properties:[...h[s(642,402)](e)??[]][s(807,638)](),onPatch:t=>i(e,t),onReset:()=>o(e)},e)),m[s(-284,-157)](e=>(0,W[s(-22,401)])(kt,{type:e,style:d(r,{type:e}),properties:[...g[s(601,402)](e)??[]][s(188,638)](),onPatch:t=>a(e,t),onReset:()=>c(e)},e))]})}function Dt({title:e,kind:t,onReset:n}){function r(e,t){return X(e- -998,t)}let i={};i[r(431,914)]=a(1561,1239);function a(e,t){return X(t- -98,e)}return i[a(514,1005)]=t,(0,W[a(1783,1530)])(a(1058,1498),{className:a(2225,1726),children:[(0,W[a(1199,1530)])(a(1520,1403),{className:a(1469,1578),children:[e,` `,(0,W[r(682,1117)])(a(1626,1403),i)]}),(0,W[r(682,682)])(vt,{onClick:n,label:a(1562,1769)+e+a(2059,1627)})]})}function Ot({type:e,style:t,properties:n,onPatch:r,onReset:i}){let a=t[l(363,-34)],o=n[p(1592,1483)](e=>({value:e,label:e})),s={};s[p(1491,1730)]=e,s[p(1972,1794)]=p(2481,2205),s[p(2023,1666)]=i;let c={};c[p(1831,2188)]=p(1934,2245),c[p(1026,1385)]=l(-203,-50);function l(e,t){return Y(t,e- -1069)}let d={};d[p(1831,2188)]=l(-388,-417),d[l(-421,-67)]=p(1453,1828);let f={};f[p(2131,2188)]=l(-377,-101),f[l(-421,-318)]=p(2234,2234);function p(e,t){return Y(e,t-737)}let m={};m[p(2130,2188)]=l(-437,-784),m[l(-421,-266)]=p(1657,1517);let h={};return h[l(382,721)]=l(-453,35),h[p(1774,1385)]=p(1329,1705),(0,W[l(183,125)])(l(151,181),{className:l(-300,-64),children:[(0,W[l(235,452)])(Dt,s),(0,W[p(2255,2041)])(_t,{label:p(1699,1481),value:t[l(-316,-501)],onChange:e=>r({color:e})}),(0,W[l(235,-213)])(q,{label:p(1007,1437),value:t[l(458,346)],options:u[l(-323,33)](e=>({value:e,label:Tt[e]??e})),onChange:e=>r({shape:e})}),(0,W[l(235,340)])(Ct,{label:p(2049,2296),value:t[p(2429,1965)],onChange:e=>r({icon:e})}),(0,W[p(1611,2041)])(q,{label:p(2352,1861),value:a[l(-12,424)]===p(1053,1500)?p(2706,2245):a[p(2209,2255)],options:[c,...o],onChange:e=>r({sizeRule:e===p(2225,2245)?{kind:p(1498,1500)}:{kind:p(2197,2255),property:e,min:.6,max:2.5,scale:a[p(1953,1794)]===p(2026,2255)?a[l(71,432)]:p(1091,1429)}})}),a[p(2176,1794)]===p(1863,2255)&&(0,W[p(2006,1989)])(W[l(409,79)],{children:[(0,W[p(1638,2041)])(q,{label:p(1100,1360),value:a[l(71,512)],options:[d,f,m],onChange:e=>r({sizeRule:{...a,scale:e}})}),(0,W[p(2102,2041)])(J,{label:l(-10,206),value:a[l(292,161)],min:.2,max:2,step:.1,onChange:e=>r({sizeRule:{...a,min:e}})}),(0,W[l(235,-183)])(J,{label:p(1922,1462),value:a[p(2082,2053)],min:1,max:6,step:.1,onChange:e=>r({sizeRule:{...a,max:e}})})]}),(0,W[p(1601,2041)])(q,{label:l(-188,-618),value:t[l(-146,305)]??p(1012,1353),options:[h,...o],onChange:e=>r({caption:e===p(947,1353)?null:e})})]})}function kt({type:e,style:t,properties:n,onPatch:r,onReset:i}){let a=t[u(857,959)],o={};o[f(1462,1217)]=e,o[f(1526,1638)]=u(1136,853),o[f(1398,921)]=i;let s={};s[f(1920,2104)]=f(1232,875),s[u(530,639)]=f(1335,1619);let c={};c[u(1333,1747)]=u(847,1151);function u(e,t){return X(e- -494,t)}c[u(530,55)]=u(671,692);let d={};d[u(1333,1040)]=u(898,805),d[f(1117,958)]=f(1109,812);function f(e,t){return X(e-93,t)}let p={};p[f(1920,1657)]=f(1977,1798),p[u(530,924)]=f(1335,853);let m={};m[u(1333,1667)]=f(1761,1885),m[u(530,207)]=u(1425,1469);let h={};return h[u(1333,842)]=u(1222,1184),h[u(530,173)]=f(1646,1685),(0,W[f(1721,1259)])(u(1102,1424),{className:u(651,757),children:[(0,W[f(1773,1981)])(Dt,o),(0,W[u(1186,836)])(q,{label:f(1213,1648),value:t[f(2013,1951)],options:[s,c,d],onChange:e=>r({colorMode:e})}),t[u(1426,1007)]===f(1232,1226)&&(0,W[u(1186,1243)])(_t,{label:f(1730,1633),value:t[f(1222,911)],onChange:e=>r({color:e})}),(0,W[u(1186,1475)])(q,{label:f(1530,1522),value:a[u(939,866)]===u(645,144)?u(1390,931):a[f(1987,2159)],options:[p,...n[f(1215,1698)](e=>({value:e,label:e}))],onChange:e=>r({width:e===f(1977,1854)?{kind:u(645,556),value:1}:{kind:f(1987,1842),property:e,min:.5,max:4}})}),a[u(939,901)]===u(645,350)&&(0,W[u(1186,741)])(J,{label:f(1656,1788),value:a[f(1920,2368)],min:.2,max:4,step:.1,onChange:e=>r({width:{kind:u(645,1124),value:e}})}),(0,W[u(1186,1099)])(q,{label:u(903,640),value:t[f(1242,814)],options:l[f(1215,953)](e=>({value:e,label:e[0][f(1191,1228)]()+e[u(1129,1066)](1)})),onChange:e=>r({lineStyle:e})}),(0,W[f(1773,1779)])(q,{label:u(765,339),value:t[u(579,624)],options:[m,h],onChange:e=>r({flowDirection:e})})]})}function At(e){function t({rawOptions:t,...n}){function r(e,t){return $(t- -20,e)}function i(e,t){return $(t- -525,e)}let a=(0,U[i(1030,777)])(()=>e[r(1346,959)](t),[t]),o={};o[i(235,551)]=null;let s={...n};return s[r(1364,1134)]=a,(0,U[r(1485,1025)])(U[i(-248,204)],o,(0,U[i(48,520)])(e[i(514,477)],s))}t[i(1238,811)]=e.id+i(1189,1569);function n({rawOptions:t,rawDefaults:n,setRawOptions:r,scene:a,schema:o}){function s(e,t){return i(t-782,e)}let c=(0,U[s(2276,2008)])(()=>e[s(1224,1685)](t),[t]),l=(0,U[d(1360,1594)])(()=>e[d(1037,644)](n),[n]),u={};u[d(1212,910)]=c;function d(e,t){return i(e-134,t)}return u[d(914,587)]=l,u[s(2029,1839)]=r,u[d(1462,990)]=a,u[s(1909,1414)]=o,(0,U[s(2193,1751)])(e[d(681,188)],u)}function r(e,t){return X(e-111,t)}n[i(1238,1186)]=e.id+r(2047,2105);function i(e,t){return X(e- -543,t)}return{id:e.id,label:e[r(1135,1200)],description:e[r(1079,590)],Icon:e[i(1392,1745)],capabilities:e[i(431,40)],View:t,Panel:n,options:t=>e[r(1557,2023)](t)}}function jt({options:e,setOptions:t}){let n=n=>t({...e,...n}),r={};r[i(1483,1077)]=s(249,731);function i(e,t){return Y(e,t- -374)}r[s(-74,-369)]=i(1043,994),r[s(-130,-380)]=i(1304,1101);let a={};a[i(616,1077)]=i(644,1083),a[i(-100,274)]=s(456,27);let o={};o[s(729,1114)]=i(185,275),o[s(-74,264)]=s(-28,403);function s(e,t){return Y(t,e- -722)}return(0,W[i(417,878)])(G,{groupKey:i(495,283),title:s(674,869),defaultOpen:!0,children:[(0,W[i(1365,930)])(q,{label:i(77,279),value:e[i(1513,1178)],onChange:e=>n({labels:e}),options:[r,a,o]}),(0,W[s(582,725)])(K,{label:i(732,1002),checked:e[s(46,-158)],onChange:e=>n({arrows:e})}),(0,W[s(582,322)])(K,{label:i(292,747),checked:e[i(403,217)],onChange:e=>n({particles:e}),description:s(78,-31)}),(0,W[i(1203,930)])(K,{label:s(558,579),checked:e[i(468,706)],onChange:e=>n({dashContext:e})}),(0,W[s(582,144)])(K,{label:s(-71,153),checked:e[s(721,537)],onChange:e=>n({iconBadges:e})})]})}function Y(e,t){return $(t-91,e)}const Mt={};Mt[Y(1742,1455)]=1,Mt[Y(307,591)]=!0,Mt[X(1456,1513)]=!0,Mt[Y(351,768)]=!0,Mt[X(1928,2e3)]=Y(690,971),Mt[X(1819,1398)]=!0;var Nt=Mt;function Pt(e){let t=o(e)?e:{};function n(e,t){return Y(e,t- -669)}let r=(e,t)=>typeof e===i(1773,1779)?e:t;function i(e,t){return Y(e,t-815)}return{version:1,particles:r(t[n(-391,-78)],Nt[i(1524,1406)]),dashContext:r(t[n(912,411)],Nt[i(1755,1895)]),arrows:r(t[n(-22,99)],Nt[i(2023,1583)]),labels:t[i(1932,2367)]===i(1839,2272)||t[n(627,883)]===i(1351,1464)?t[n(876,883)]:n(-23,302),iconBadges:r(t[n(1252,774)],Nt[n(308,774)])}}const Ft={};Ft[Y(649,693)]=!1,Ft[Y(1335,1414)]=!1,Ft[X(1789,2278)]=!0,Ft[X(1472,1466)]=!1,Ft[Y(1299,1322)]=2500;var It=At({id:Y(779,815),label:X(1430,1021),description:Y(817,896),Icon:M,Component:(0,U[Y(1487,1237)])(()=>c(()=>import(`./chunks/ofo-YUoe.js`),[],import.meta.url)),OptionsPanel:jt,defaultOptions:Nt,migrateOptions:Pt,capabilities:Ft});function Lt({prefix:e,value:t,onChange:n}){function r(e,t){return X(e- -1090,t)}let i={};function a(e,t){return X(e- -666,t)}return i[a(763,644)]=a(537,897),i[a(437,184)]=r(409,744),(0,W[r(538,681)])(G,{groupKey:e+a(836,554),title:a(468,879),children:[(0,W[a(1014,630)])(K,{label:a(381,-86),checked:t[a(806,606)],onChange:e=>n({autoRotate:e})}),(0,W[a(1014,1158)])(J,{label:r(155,69),value:t[a(569,1e3)],min:0,max:1,step:.05,onChange:e=>n({autoRotateSpeed:e})}),(0,W[a(1014,929)])(J,{label:a(880,563),value:t[r(515,898)],min:-.5,max:.5,step:.05,onChange:e=>n({offsetX:e})}),(0,W[r(590,146)])(`p`,i)]})}function Rt({prefix:e,value:t,onChange:n,nodeMappings:r,edgeMappings:i,numericProps:a,numericEdgeProps:o}){function s(e,t){return Y(e,t- -103)}function c(e,t){return Y(e,t-492)}let l=t[s(738,842)];return(0,W[s(1525,1149)])(G,{groupKey:e+c(1577,1423),title:c(1146,1236),children:[(0,W[s(707,1201)])(zt,{title:c(773,1196),value:l,mappings:r,properties:a,defaultPropertyLabel:`—`,onChange:e=>n({...t,nodes:{...l,...e}}),children:l[c(2190,1816)]===s(1387,1072)&&(0,W[c(1517,1796)])(_t,{label:s(969,804),value:l[s(539,923)],onChange:e=>n({...t,nodes:{...l,uniformColor:e}})})}),(0,W[c(1846,1796)])(zt,{title:s(1540,1450),value:t[c(1648,1157)],mappings:i,properties:o,defaultPropertyLabel:s(953,503),onChange:e=>n({...t,edges:{...t[c(680,1157)],...e}})})]})}function zt({title:e,value:t,mappings:n,properties:r,defaultPropertyLabel:i,onChange:a,children:o}){function s(e,t){return Y(t,e-92)}let c=x(t[s(918,538)]),l=n[f(1245,1253)](e=>e[s(1543,1257)]===t[f(1672,1816)])?.[s(1178,834)]??!1,u={};u[f(1460,1545)]=s(1142,1194),u[f(728,1219)]=e;let d={};d[s(1543,1381)]=s(751,559);function f(e,t){return Y(e,t-492)}return d[f(1046,1140)]=i,(0,W[f(1603,1744)])(f(2061,1712),{className:f(974,1244),children:[(0,W[s(1396,1854)])(`p`,u),(0,W[s(1396,1336)])(q,{label:s(1212,1518),value:t[f(1890,1816)],options:n[s(838,1335)](e=>({value:e[f(1984,1943)],label:e[f(1548,1140)]})),onChange:e=>a({mapping:e})}),o,l&&(0,W[s(1344,1701)])(W[f(2418,1970)],{children:[(0,W[s(1396,1593)])(q,{label:s(705,740),value:t[s(918,1150)],options:b[f(1319,1238)](e=>({value:e.id,label:e[f(705,1140)]})),onChange:e=>a({palette:e})}),(0,W[s(1344,927)])(f(2185,1712),{className:f(1760,1961),children:[s(1073,613),(0,W[f(2124,1796)])(s(1217,1696),{className:f(901,1135),style:{background:s(692,645)+c[s(1054,1120)][f(1454,1774)](`, `)+`)`}}),f(2418,1977)]})]}),t[s(1416,1789)]===s(952,1236)&&(0,W[s(1396,1232)])(q,{label:f(2155,1836),value:t[s(849,757)]??f(876,1151),options:[d,...r[s(838,748)](e=>({value:e,label:e}))],onChange:e=>a({heatmapProperty:e===s(751,1227)?null:e})})]})}function Bt({prefix:e,value:t,onChange:n,schedulers:r}){let i=t[p(1188,1502)]===p(1665,1169),a={};a[u(586,964)]=u(550,703),a[p(1123,1532)]=u(497,725);let o={};o[u(1418,964)]=u(1297,972),o[u(-239,161)]=u(1163,1025);let s={};s[u(554,964)]=p(1784,2194),s[p(1123,755)]=p(1306,1033);let c={};c[p(1926,2064)]=p(1438,1669),c[u(-193,161)]=p(1087,1017);let l={};l[p(1926,1869)]=p(1392,1250),l[u(180,161)]=u(495,849);function u(e,t){return X(t- -863,e)}let d={};d[p(1926,2080)]=p(1243,1544),d[u(7,161)]=p(1477,1614);let f={};f[p(1926,2333)]=u(512,805),f[p(1123,808)]=p(2018,1649);function p(e,t){return X(e-99,t)}let m={};return m[p(1926,1594)]=u(1281,853),m[u(302,161)]=p(1652,1513),(0,W[u(908,765)])(G,{groupKey:e+p(1976,2473),title:u(1067,1066),children:[(0,W[u(1e3,817)])(q,{label:p(1114,1273),value:t[u(10,226)],options:[a,o],onChange:e=>n({mode:e})}),(0,W[u(743,817)])(q,{label:u(603,213),value:t[p(2002,1691)],options:[s,c,l,d],onChange:e=>n({shape:e}),disabled:i,description:i?u(482,197):void 0}),(0,W[u(1291,817)])(q,{label:u(832,999),value:t[p(1172,1283)],options:[f,m],onChange:e=>n({flowDirection:e})}),(0,W[p(1779,2039)])(J,{label:u(-227,236),value:t[p(1696,1835)],min:.1,max:3,step:.1,disabled:!i,format:e=>e[u(-79,280)](1)+`×`,onChange:e=>n({speed:e})}),(0,W[u(832,817)])(J,{label:p(1533,1484),value:t[u(597,761)],min:.1,max:1,step:.05,disabled:!i,format:e=>e[p(1242,1188)](2),onChange:e=>n({trailLength:e})}),(0,W[p(1779,1924)])(J,{label:u(745,574),value:t[u(458,488)],min:.2,max:6,step:.1,format:e=>e[u(-161,280)](1)+`px`,onChange:e=>n({width:e})}),(0,W[p(1779,1348)])(J,{label:p(2054,2170),value:t[u(711,228)],min:.25,max:8,step:.25,disabled:!i,format:e=>e[p(1242,1403)](2)+`×`,onChange:e=>n({cometWidth:e}),description:u(480,548)}),(0,W[u(552,817)])(K,{label:p(1657,2113),checked:t[p(1867,1583)],onChange:e=>n({widthByValue:e})}),(0,W[u(898,817)])(q,{label:u(628,827),value:t[u(416,510)],options:r[p(1221,913)](e=>({value:e.id,label:e[p(1123,1067)],description:e[p(1067,1286)]})),onChange:e=>n({scheduler:e}),disabled:!i}),(0,W[p(1779,1574)])(K,{label:u(1113,1084),checked:t[u(581,702)],onChange:e=>n({spreadTies:e}),disabled:!i}),(0,W[u(1273,817)])(K,{label:p(1859,1604),checked:t[p(1080,798)],onChange:e=>n({pickAnimatedEdges:e}),description:p(1489,1551)})]})}function Vt({prefix:e,value:t,onChange:n}){let r={};function i(e,t){return Y(e,t- -455)}function a(e,t){return Y(t,e-180)}r[a(1631,1648)]=a(1683,2148),r[i(117,193)]=i(1300,842);let o={};o[i(825,996)]=`on`,o[i(288,193)]=`On`;let s={};return s[a(1631,1840)]=i(1475,1129),s[i(110,193)]=i(795,980),(0,W[a(1432,1787)])(G,{groupKey:e+a(1737,1635),title:a(1735,2047),children:[(0,W[i(1261,849)])(K,{label:i(861,563),checked:t[a(849,395)],onChange:e=>n({glow:e}),description:i(375,752)}),(0,W[a(1484,1300)])(J,{label:i(628,661),value:t[i(1110,887)],min:0,max:4,step:.1,disabled:!t[a(849,997)],onChange:e=>n({glowIntensity:e})}),(0,W[i(633,849)])(K,{label:i(929,696),checked:t[a(917,1335)],onChange:e=>n({statsHud:e})}),(0,W[i(495,849)])(_t,{label:a(1329,853),value:t[a(1341,1189)],onChange:e=>n({background:e})}),(0,W[a(1484,1107)])(q,{label:a(1317,1433),value:t[a(1603,1166)],options:[r,o,s],onChange:e=>n({reducedMotion:e}),description:i(597,684)})]})}function Ht({prefix:e,value:t,onChange:n,scene:r}){let i=S(r,e=>e[f(497,516)]),a=S(r,e=>e[s(1720,1388)]?e[f(821,623)][s(1817,1568)][f(194,429)](t=>t.id===e[f(40,516)]?.[f(265,693)])?.[s(1520,1698)]:void 0),o={};o[f(689,721)]=s(1699,2002);function s(e,t){return X(e-496,t)}if(o[s(1599,1285)]=s(2453,2550),!i)return(0,W[s(2176,2016)])(G,{groupKey:e+f(426,285),title:f(212,270),children:(0,W[f(781,972)])(`p`,o)});let c=r[s(1790,1949)](),l={};l[f(666,721)]=f(648,1108),l[s(1599,1104)]=a??i[f(901,693)];let d={};d[f(894,1119)]=s(2242,2145),d[f(329,316)]=f(1177,1203);function f(e,t){return X(t- -708,e)}let p={};p[s(2323,2140)]=s(1862,1702),p[f(740,316)]=s(2383,1924);let m={};m[f(1137,1119)]=`in`,m[s(1520,1903)]=s(1601,1421);let h={};return h[s(2323,1881)]=f(758,638),h[f(148,316)]=f(716,1175),(0,W[f(629,920)])(G,{groupKey:e+f(611,376),title:f(141,270),defaultOpen:!0,accent:!0,children:[(0,W[s(2176,1975)])(`p`,l),(0,W[s(2176,1942)])(gt,{label:s(1547,1315),value:[i[f(575,652)],Math[f(630,1029)](i[f(131,451)],t[f(451,451)])],min:0,max:t[s(1655,2102)],thumbLabels:[f(1287,1009),s(1649,1503)],format:([e,t])=>e+f(448,881)+t+s(2261,1800),onChange:([e,t])=>c[s(1717,1751)](e,t)}),(0,W[s(2176,1982)])(J,{label:s(1977,2173),value:t[s(1539,1350)],min:0,max:1,step:.05,format:e=>e[s(1639,2059)](2),onChange:e=>n({dimming:e})}),(0,W[f(529,972)])(q,{label:s(2293,2096),value:i[f(946,914)],options:[d,p,m],onChange:e=>c[f(1437,1069)](e)}),(0,W[f(841,972)])(_t,{label:s(2198,2175),value:t[s(1881,1725)],onChange:e=>n({nodeColor:e})}),(0,W[f(1253,972)])(q,{label:f(905,934),value:t[f(1356,901)],options:[h,...u[f(721,909)](e=>e!==s(2100,2056))[s(1618,1633)](e=>({value:e,label:e}))],onChange:e=>n({nodeShape:e})}),(0,W[f(868,972)])(J,{label:f(-68,389),value:t[s(1655,1266)],min:1,max:20,step:1,onChange:e=>n({maxHops:e})}),(0,W[f(575,972)])(yt,{onClick:c[f(-16,346)],children:f(603,363)})]})}function Ut({prefix:e,value:t,onChange:n,numericProps:r}){function i(e,t){return X(t- -999,e)}function a(e,t){return X(e-33,t)}let o={};return o[a(1860,1821)]=i(-53,36),o[i(272,25)]=`—`,(0,W[a(1661,1423)])(G,{groupKey:e+a(1297,1190),title:a(1113,953),children:[(0,W[a(1713,1525)])(K,{label:a(1412,918),checked:t[i(-101,268)],onChange:e=>n({scaleByValue:e})}),t[a(1300,1753)]&&(0,W[i(437,681)])(q,{label:i(748,694),value:t[i(436,334)]??i(228,36),options:[o,...r[a(1155,749)](e=>({value:e,label:e}))],onChange:e=>n({valueProperty:e===a(1068,958)?null:e})}),(0,W[a(1713,1217)])(J,{label:a(1740,1981),value:t[a(1720,1854)],min:.2,max:8,step:.1,onChange:e=>n({baseSize:e})}),(0,W[i(879,681)])(K,{label:a(1083,1325),checked:t[a(1144,1250)],onChange:e=>n({showIcons:e})}),(0,W[i(1140,681)])(J,{label:i(494,303),value:t[i(592,640)],min:0,max:200,step:5,onChange:e=>n({labelBudget:e})}),(0,W[a(1713,1547)])(J,{label:a(1699,1718),value:t[i(768,749)],min:0,max:20,step:1,format:e=>e+`px`,onChange:e=>n({impostorThresholdPx:e}),description:a(1471,1718)})]})}var Wt=2e3;function Gt(e,t){let n=S(e,e=>e[r(347,-38)]);function r(e,t){return X(e- -984,t)}return(0,U[r(785,827)])(()=>{let e=new Set;for(let n of t?.[a(1167,944)]??[])for(let t of n[a(422,733)])e[a(751,823)](t);for(let t of n[i(956,1377)][i(1664,1679)](0,Wt))for(let n of Object[a(546,908)](t[i(1257,1070)]??{}))h(t[a(-10,88)],n)!==null&&e[a(513,823)](n);function i(e,t){return r(t-1040,e)}function a(e,t){return r(t-58,e)}let o=new Set;for(let e of t?.[i(1332,1319)]??[])for(let t of e[i(2163,1715)])o[a(478,823)](t);for(let e of n[a(-337,115)][i(1549,1679)](0,Wt))for(let t of Object[a(617,908)](e[i(1474,1070)]??{}))h(e[a(-290,88)],t)!==null&&o[i(2190,1805)](t);return{nodes:[...e][i(1623,1673)](e=>n[a(657,395)][i(1340,1473)](t=>h(t[i(1203,1070)],e)!==null))[i(2209,1973)](),edges:[...o][i(1593,1673)](e=>n[i(680,1097)][a(237,491)](t=>h(t[a(447,88)],e)!==null))[i(2049,1973)]()}},[n,t])}function Kt(e,t){function n(e,t){return X(e- -1275,t)}function r(e,t){return X(t-105,e)}let i=S(e,e=>e[n(56,-122)]);return(0,U[r(1434,1874)])(()=>{let e=new Set;for(let n of t?.[a(2305,1834)]??[])for(let t of n[r(763,306)])e[r(853,1223)](t);for(let t of i[a(1756,2025)][a(2058,1807)](0,Wt))for(let n of Object[a(2269,1997)](t[r(118,119)]??{}))e[a(2184,2285)](n);function r(e,t){return n(e-379,t)}function a(e,t){return n(e-1710,t)}return[...e][r(1021,1458)]()},[i,t])}var qt=Y(809,1085);function Jt(e){function t(e,t){return Y(e,t- -301)}function n(e,t){return Y(t,e- -639)}return e===`-1`?n(926,1272):e===`0`?t(529,852):n(346,652)+e}function Yt({options:e,defaults:t,setOptions:n,scene:r}){let i=S(r,e=>e[k(1574,1487)]),a=S(r,e=>e[k(2003,1865)]),{maxHop:o,unreached:s}=(0,U[O(757,658)])(()=>{let t=Re(i),n={};if(n[r(1711,1474)]=0,n[o(978,953)]=!1,a[r(1150,1403)]===0)return n;function r(e,t){return O(e-1149,t)}function o(e,t){return O(t-43,e)}let s=_e(t,a,e[o(-42,-4)][r(1367,1124)]),c=0,l=!1;for(let e of s)e>c&&(c=e),e<0&&(l=!0);let u={};return u[o(109,605)]=c,u[r(2059,2482)]=l,u},[i,a,e[k(910,1121)][O(218,283)]]),[c,l]=(0,U[k(2372,2021)])(qt),u={};u[k(2256,1983)]=qt,u[O(12,453)]=k(1057,1156);let d={};d[O(885,1212)]=o+1;let f=[u,...Array[O(374,33)](d,(e,t)=>({value:String(t),label:Jt(String(t))})),...s?[{value:`-1`,label:Jt(`-1`)}]:[]],p=f[O(405,901)](e=>e[k(2301,1983)]===c)?c:qt,m=p===qt,h=m?e[O(103,520)]:ze(e,Number(p)),g=Object[k(2163,1944)](e[k(1043,1225)])[O(605,530)](([,e])=>Object[k(2056,1990)](e)[k(2134,2053)]>0)[k(1741,1278)](([e])=>e)[O(905,1034)]((e,t)=>Number(e)-Number(t));function _(t){function r(e,t){return k(t,e- -222)}function i(e,t){return k(e,t- -109)}if(m){let a={};for(let[n,o]of Object[r(1722,1755)](e[r(1003,1370)])){let e={...o};for(let n of Object[r(1768,2211)](t))delete e[n];Object[r(1768,2124)](e)[i(1849,1944)]>0&&(a[n]=e)}let o={...e};o[i(1621,1162)]={...e[r(1049,817)],...t},o[r(1003,506)]=a,n(o)}else n({...e,hops:{...e[i(1035,1116)],[p]:{...e[i(1252,1116)][p]??{},...t}}})}function v(){function r(e,t){return k(t,e- -806)}let i={...e};i[r(465,901)]=t[a(126,-4)],i[a(-444,-50)]=t[r(419,176)];function a(e,t){return k(e,t- -1275)}if(m)n(i);else{let i={...e[a(146,-50)]};t[a(-329,-50)][p]?i[p]=t[r(419,464)][p]:delete i[p];let o={...e};o[r(419,603)]=i,n(o)}}let y=h[k(755,1131)]===k(1724,1503)?Ve(h[k(2596,2107)]):h[O(-37,347)],b=h[k(1719,1890)]===k(2172,2116),x=b||h[k(1845,2107)]===O(548,203),ee=e[O(117,-320)][O(309,-166)][O(688,1112)]===k(959,1179)&&Ue(e,m?0:Number(p))===void 0,C={};C[k(1594,1180)]=k(1681,1605),C[O(815,1101)]=p,C[O(609,1071)]=f,C[k(1784,1952)]=l;let w={};w[O(815,1108)]=k(1489,1503),w[k(1356,1180)]=O(942,714);let te={};te[k(1809,1983)]=`on`,te[O(12,-83)]=`On`;let T={};T[O(815,1259)]=O(948,560),T[k(1151,1180)]=O(799,940);let ne={};ne[k(1745,1983)]=k(1349,1716),ne[O(12,-199)]=O(514,273);let re={};re[O(815,1181)]=k(1499,1230),re[O(12,45)]=k(1997,1627);let E={};E[O(815,458)]=k(2030,1841),E[k(1236,1180)]=k(1371,1363);let ie={};ie[k(1904,1983)]=O(148,-139),ie[k(1147,1180)]=O(620,137);let D={};D[k(1773,1585)]=k(1967,1977),D[k(1131,1259)]=k(1343,1202);let ae={};function O(e,t){return X(e- -1012,t)}function k(e,t){return X(t-156,e)}ae[k(1757,1983)]=k(1139,1288),ae[O(12,321)]=O(-50,-138);let A={};A[O(815,1106)]=k(2351,1910),A[k(1488,1180)]=k(1550,1660);let j={};return j[O(815,920)]=O(312,328),j[k(695,1180)]=O(168,366),(0,W[O(616,741)])(G,{groupKey:k(1245,1505),title:k(1506,1785),children:[(0,W[O(616,534)])(O(584,504),{className:k(1345,1651),children:[(0,W[k(1764,1836)])(k(1513,1752),{className:O(71,97),children:(0,W[O(668,897)])(q,C)}),(0,W[O(668,330)])(vt,{onClick:v,label:m?O(739,1055):O(855,995)+Jt(p)})]}),m&&g[k(2376,2053)]>0&&(0,W[O(616,668)])(`p`,{className:O(809,530),children:[k(1629,1317),g[O(110,-64)](Jt)[O(646,933)](`, `),k(2136,1840)]}),(0,W[O(668,202)])(q,{label:O(318,-179),value:h[k(1395,1890)],options:[w,te,T],onChange:e=>_({visible:e}),description:h[k(1781,1890)]===k(1985,1503)?m?k(1602,1624):Number(p)===o?O(372,148):O(55,-62):void 0}),(0,W[k(2256,1836)])(K,{label:k(2297,2071),checked:h[O(544,50)],onChange:e=>_({showNodes:e})}),(0,W[O(668,559)])(q,{label:O(285,20),value:h[k(1744,2107)],options:[ne,re,E,ie],onChange:e=>_({surface:e}),disabled:b}),h[O(939,1087)]===O(62,67)&&(0,W[O(616,1010)])(W[O(842,1187)],{children:[(0,W[k(1397,1836)])(K,{label:k(1932,1889),checked:h[O(232,719)]===k(1692,1503),onChange:e=>_({density:e?O(335,421):32}),description:k(2050,1626),disabled:x}),h[O(232,76)]!==O(335,-49)&&(0,W[k(1371,1836)])(J,{label:O(843,1325),value:h[k(1607,1400)],min:8,max:128,step:4,onChange:e=>_({density:e}),disabled:x})]}),(0,W[k(1806,1836)])(_t,{label:k(1607,1276),value:h[O(117,-362)],onChange:e=>_({color:e}),disabled:x}),ee&&!x&&(0,W[k(1925,1836)])(`p`,D),h[k(2e3,2107)]===O(148,563)&&(0,W[k(1353,1784)])(W[O(842,796)],{children:[(0,W[k(1995,1836)])(_t,{label:k(1765,2094),value:h[k(2278,1805)],onChange:e=>_({colorB:e}),disabled:x}),(0,W[O(668,1160)])(q,{label:O(662,1145),value:h[k(902,1177)],options:[ae,A,j],onChange:e=>_({gradientAxis:e}),disabled:x})]}),(0,W[O(668,624)])(J,{label:k(2041,1654),value:y,min:0,max:1,step:.005,format:e=>h[O(-37,184)]===k(1412,1503)?k(1825,1503):e[O(131,236)](3),onChange:e=>_({opacity:e}),disabled:x}),!m&&(0,W[k(1662,1784)])(W[k(2267,2010)],{children:[(0,W[k(1431,1836)])(K,{label:O(323,813),checked:h[k(1727,1349)]===k(1329,1503),onChange:t=>_({radius:t?O(335,-111):e[O(-47,-493)][O(199,149)]*Math[k(1952,1848)](1,Number(p))})}),h[O(181,-29)]!==O(335,210)&&(0,W[k(2043,1836)])(J,{label:k(2308,1852),value:h[k(1034,1349)],min:1,max:e[O(-47,-277)][O(199,452)]*12,step:1,onChange:e=>_({radius:e})})]})]})}var Xt=Y(1493,1442);const Zt={};Zt[Y(1226,1451)]=X(1616,1119),Zt[X(1024,1178)]=Y(558,738);const Qt={};Qt[X(1827,1639)]=Y(1568,1175),Qt[X(1024,918)]=X(1611,2022);const $t={};$t[X(1827,1933)]=Y(1033,860),$t[Y(250,648)]=X(1594,1503),$t[Y(1571,1086)]=!0;const en={};en[Y(1905,1451)]=X(1023,882),en[Y(610,648)]=X(1231,787),en[X(1462,1454)]=!0;var tn=[Zt,Qt,$t,en];function nn(){let e=`qMfJA3nWywnL.ywjZ.u2HVD24GzM9YihnTywXSigDYyxbOCYWGD2HLBIb6B29TzwqGAw4Sig9YigfYB3vUzcb0AguGAg92zxjLzcbUB2rLlG.oIbUBYbNCMfWAcbKyxrH.C3vIC2nYAwjL.rNjHz21LBNq.v2LYzwzYyw1LigrLBNnPDhK.AxngAw5PDgu.ig5VignVB3jKAw5HDgvZ.ndm1ndy5mMLjufbXuW.y29UDgfPBNm.AgfZq29UDgv4Da.sgLNAa.rMXVDYbKAxjLy3rPB24.ywjZB2X1DguGBgvMDc0XlZiGDg9WltiGEI0XmcaTDhjHBNnSyxrLlxGTms8YihjVDw5KzwqTBwqGyM9YzgvYigjVCMrLCI1ZA3KTnZaWigjNlxnREs05ntaVotaGChGTmYbWEs0XihrLEhqTEhmGDgv4Dc1ZA3KTmJaWigHVDMvYoMjNlxnREs05mda.sgvPz2H0.DxnLu3rHDgu.AhLWB3q.uMvZzxqG.tM9KzxmGyxqGDgHLAxiGB3DUihGSihKSihOGy29VCMrPBMf0zxmSignVBg91CMvKigj5ignSDxn0zxiSihDPDgGGyw5PBwf0zwqGDMfSDwuGzMXVDY4.Dw5TB3vUDa.BM9Kzv90ExbLCW.C2nLBMu.B3v0BgLUzs1UB25L.u3f1yxjLihjVB3q.Aw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dc1Uzxv0CMfSltmWmcbZAgfKB3CTBgC.Ag9WrgvWDgG.u3rYAwn0tw9Kzq.BM9Kzq.zMXLEcbPDgvTCY1Jzw50zxiGz2fWltiGDgv4Dc1BmtbWEf0GDgv4Dc1Uzxv0CMfSltuWma.nvDUCNzZEa.DY0Xmcb0zxH0lxjPz2H0igzVBNqTBw9UBYb0zxH0lvSXmxb4xsb0zxH0lw5LDxrYywWTndaW.zMXLEcbMBgv4lwnVBcbNyxaTms41`.split(`.`);return nn=function(){return e},nn()}const rn={};rn[Y(1253,1451)]=X(1213,1056),rn[Y(193,648)]=Y(1412,1130);const an={};an[X(1827,2038)]=Y(1280,965),an[Y(471,648)]=X(1298,1784);const on={};on[Y(1089,1451)]=X(1392,1396),on[Y(202,648)]=Y(1638,1307);const sn={};sn[Y(1687,1451)]=X(1236,1572),sn[X(1024,709)]=Y(1663,1218),sn[X(1462,1510)]=!0;const cn={};cn[Y(1172,1451)]=X(1023,784),cn[X(1024,613)]=X(1231,1384),cn[Y(769,1086)]=!0;var ln=[rn,an,on,sn,cn];function un({options:e,defaults:t,setOptions:n,scene:r,schema:i}){let a=S(r,e=>e[u(1344,885)][u(802,497)]),o=Gt(r,i),s=(t,r)=>{let i=e[t];function a(e,t){return f(e,t-714)}typeof i===a(1124,827)&&i!==null&&n({...e,[t]:{...i,...r}})},c={};c[f(646,701)]=u(1535,1423),c[f(151,-102)]=f(380,408);let l={};l[u(1616,1943)]=u(1155,1378),l[f(-27,-102)]=u(939,1022);function u(e,t){return X(e- -211,t)}let d={};d[f(516,701)]=`in`;function f(e,t){return X(t- -1126,e)}d[f(27,-102)]=f(245,126);let p={};p[f(514,701)]=u(1033,926),p[u(813,687)]=f(324,257),p[u(757,270)]=u(1184,769);let m={};return m[u(1616,2075)]=u(1340,1484),m[f(-545,-102)]=u(1400,1247),m[f(18,-158)]=u(1038,825),(0,W[u(1417,948)])(W[u(1643,1179)],{children:[(0,W[u(1469,1775)])(Ht,{prefix:Xt,value:e[f(-386,98)],onChange:e=>s(u(1013,1129),e),scene:r}),(0,W[u(1417,920)])(G,{groupKey:u(1282,930),title:f(483,265),defaultOpen:!0,children:[(0,W[u(1469,1385)])(q,{label:u(1157,875),value:e[f(-653,-161)][f(171,658)],options:We[u(911,707)](e=>({value:e.id,label:e[u(813,322)],description:e[f(119,-158)]})),onChange:e=>s(u(754,884),{placement:e})}),(0,W[f(742,502)])(`p`,{className:f(720,274),children:[f(437,-20),He[u(1447,1711)](`; `),`.`]}),(0,W[f(484,554)])(q,{label:u(981,1385),value:e[u(754,948)][f(443,104)],options:[c,l,d],onChange:e=>s(f(-212,-161),{hopDirection:e})}),(0,W[u(1469,1188)])(q,{label:f(116,41),value:e[f(-432,-161)][f(91,129)],options:[p,m],onChange:e=>s(u(754,725),{radiusMode:e})}),(0,W[f(1029,554)])(J,{label:f(578,394),value:e[f(-485,-161)][u(1e3,624)],min:10,max:300,step:5,onChange:e=>s(u(754,679),{baseRadius:e})}),(0,W[f(884,554)])(K,{label:u(854,827),checked:e[f(-399,-161)][u(1565,1196)],onChange:e=>s(f(-586,-161),{animateTransitions:e})}),(0,W[u(1417,1217)])(yt,{disabled:a===0,onClick:()=>r[f(-208,168)]()[u(1461,1218)](r[u(1083,915)]()[f(266,429)]),children:[f(402,641),a>0?` (`+a+`)`:``]})]}),(0,W[f(565,554)])(Bt,{prefix:Xt,value:e[u(830,751)],onChange:e=>s(u(830,890),e),schedulers:ye}),(0,W[f(126,554)])(Rt,{prefix:Xt,value:e[u(918,1262)],onChange:t=>n({...e,color:t}),nodeMappings:tn,edgeMappings:ln,numericProps:o[f(-240,195)],numericEdgeProps:o[u(830,1201)]}),(0,W[f(573,554)])(Ut,{prefix:Xt,value:e[f(-119,195)],onChange:e=>s(f(70,195),e),numericProps:o[u(1110,1379)]}),(0,W[u(1469,1356)])(Lt,{prefix:Xt,value:e[f(13,-26)],onChange:e=>s(u(889,1205),e)}),(0,W[f(355,554)])(Yt,{options:e,defaults:t,setOptions:n,scene:r}),(0,W[u(1469,1321)])(Vt,{prefix:Xt,value:e[u(946,819)],onChange:e=>s(u(946,988),e)})]})}const dn={};dn[Y(1139,693)]=!0,dn[X(1790,2008)]=!0,dn[Y(1319,1413)]=!0;function X(e,t){return $(e-467,t)}dn[Y(1195,1096)]=!0,dn[Y(1422,1322)]=1e5;var fn=At({id:X(1210,1409),label:Y(543,793),description:X(1292,1721),Icon:k,Component:(0,U[Y(1436,1237)])(()=>c(()=>import(`./chunks/Bc5L5tt_.js`),[],import.meta.url)),OptionsPanel:un,defaultOptions:Ge,migrateOptions:Be,capabilities:dn}),pn=Y(1646,1319);const mn={};mn[X(1827,1426)]=Y(1240,1175),mn[X(1024,572)]=X(1611,1215);const hn={};hn[Y(1793,1451)]=Y(559,936),hn[Y(1005,648)]=Y(770,792),hn[Y(1375,1086)]=!0;const gn={};gn[Y(1416,1451)]=Y(776,1240),gn[Y(690,648)]=X(1114,1109);const _n={};_n[Y(1018,1451)]=Y(1229,860),_n[Y(219,648)]=X(1594,1392),_n[Y(672,1086)]=!0;var vn=[mn,hn,gn,_n];const yn={};yn[Y(1389,1451)]=Y(1196,837),yn[Y(369,648)]=X(1506,1404);const bn={};bn[Y(1266,1451)]=Y(519,965),bn[X(1024,802)]=X(1298,1143);const xn={};xn[Y(1946,1451)]=Y(692,1016),xn[X(1024,1361)]=X(1683,2106);const Sn={};Sn[Y(1363,1451)]=X(1312,1341),Sn[X(1024,1119)]=X(1168,985),Sn[Y(804,1086)]=!0;const Cn={};Cn[X(1827,2060)]=Y(1271,860),Cn[Y(485,648)]=Y(1094,1218),Cn[X(1462,1573)]=!0;var wn=[yn,bn,xn,Sn,Cn],Tn=ye[X(1617,1177)](e=>!e[X(1727,1529)]);function En(e,t){function n(e,t){return X(e-125,t)}function r(e,t){return X(e- -1077,t)}return(e[r(743,476)](t)?e:[t,...e])[n(1247,1057)](e=>({value:e,label:e}))}function Dn({options:e,setOptions:t,scene:n,schema:r}){let i=Gt(n,r);function a(e,t){return X(t- -1058,e)}let o=Kt(n,r),s=S(n,e=>e[d(2127,1677)]),c=(n,r)=>{function i(e,t){return d(t,e- -1276)}let a=e[n];typeof a===i(309,-152)&&a!==null&&t({...e,[n]:{...a,...r}})},l=e[d(1641,1311)],u=l[a(374,458)]===d(1947,1693)?1:l[d(2180,1862)];function d(e,t){return X(t-346,e)}let f=e=>c(a(400,-93),e),{noCoords:p,noCluster:m}=(0,U[a(925,711)])(()=>{let e=0;function t(e,t){return a(e,t-859)}let n=0;for(let r of s[i(1374,1173)]){(h(r[t(513,815)],l[i(1018,1259)])===null||h(r[t(784,815)],l[i(1037,1366)])===null||h(r[t(417,815)],l[t(1156,1592)])===null)&&e++;let a=r[i(956,866)]?.[l[t(1706,1383)]];typeof a===i(1781,1599)&&Number[t(1209,1657)](a)||typeof a===t(2017,1717)&&a!==``||n++}let r={};function i(e,t){return a(e,t-910)}return r[t(1927,1686)]=e,r[t(1295,1223)]=n,r},[s,l[d(1271,1753)],l[d(1955,1860)],l[a(477,733)],l[d(2113,1928)]]),g=l[d(1514,1687)]===a(887,484)||l[a(547,283)]===d(1907,1693)&&s[d(2162,1667)][d(2697,2243)]>0&&p===s[a(695,263)][d(2126,2243)],_=(e,t,n)=>e[a(425,697)]()+` `+(e===1?t:n),v={};v[d(2359,2173)]=a(307,289),v[a(120,-34)]=a(878,686);let y={};y[a(323,769)]=a(42,-64),y[d(1631,1370)]=d(1874,2045);let b={};return b[d(1697,2173)]=d(1812,1888),b[a(17,-34)]=d(1393,1355),(0,W[a(872,570)])(W[d(2484,2200)],{children:[(0,W[a(836,622)])(Ht,{prefix:pn,value:e[d(1217,1570)],onChange:e=>c(a(470,166),e),scene:n}),(0,W[a(493,570)])(G,{groupKey:a(648,307),title:a(347,333),defaultOpen:!0,children:[(0,W[a(136,622)])(q,{label:a(768,573),value:l[d(1851,1687)],options:[v,y,b],onChange:e=>f({source:e}),description:l[d(1312,1687)]===a(144,289)?g?a(696,604):d(1391,1427):l[a(528,283)]===d(1404,1888)?d(2247,1790):a(623,188)}),(0,W[d(2055,2026)])(q,{label:a(864,432),value:l[d(1433,1928)],options:En(o,l[a(45,524)]),onChange:e=>f({clusterProperty:e})}),m>0&&(0,W[a(759,570)])(`p`,{className:d(1680,2032),children:[_(m,d(1871,1564),d(1750,1372)),a(406,486)]}),g?(0,W[d(2336,1974)])(W[d(2134,2200)],{children:[(0,W[a(762,622)])(q,{label:a(-209,128),value:l[d(1657,1469)],options:Ke[a(-27,64)](e=>({value:e.id,label:e[a(13,-34)],description:e[a(-358,-90)]})),onChange:e=>f({separation:e})}),(0,W[a(1085,622)])(J,{label:a(-262,-40),value:l[d(1186,1520)],min:0,max:2,step:.05,format:e=>Math[a(824,405)](e*100)+`%`,onChange:e=>f({clusterSpacing:e}),description:a(753,891)})]}):(0,W[d(2371,1974)])(W[d(2138,2200)],{children:[(0,W[a(650,622)])(q,{label:a(44,-22),value:l[d(2183,1753)],options:En(i[d(1289,1667)],l[a(480,349)]),onChange:e=>f({xProperty:e})}),(0,W[a(405,622)])(q,{label:a(711,552),value:l[d(2137,1860)],options:En(i[a(339,263)],l[a(607,456)]),onChange:e=>f({yProperty:e})}),(0,W[d(1581,2026)])(q,{label:d(1680,2169),value:l[a(1052,733)],options:En(i[a(281,263)],l[a(835,733)]),onChange:e=>f({zProperty:e})}),p>0&&(0,W[d(2297,1974)])(`p`,{className:a(383,628),children:[_(p,a(-188,160),a(259,-32)),a(670,799),l[a(67,283)]===a(718,289)?d(2115,1710):`.`]})]}),(0,W[d(1663,2026)])(K,{label:d(1656,1961),checked:g||l[a(340,458)]===a(115,289),onChange:e=>f({scale:e?a(209,289):1}),disabled:g,description:g?a(-331,72):l[a(552,458)]===d(2112,1693)?d(1644,1439):void 0}),g||l[a(91,458)]===d(1464,1693)?(0,W[a(848,622)])(J,{label:d(2139,1799),value:l[a(389,506)],min:10,max:500,step:10,onChange:e=>f({worldRadius:e})}):(0,W[a(180,622)])(J,{label:d(1328,1345),value:Math[d(1679,1454)](u),min:-3,max:3,step:.1,format:()=>u[a(456,515)](2)+`×`,onChange:e=>f({scale:Number((10**e)[a(711,515)](3))})}),(0,W[d(2454,2026)])(K,{label:a(527,881),checked:l[d(1935,2276)],onChange:e=>f({center:e})}),!g&&(0,W[a(222,622)])(K,{label:d(1441,1366),checked:l[a(288,698)],onChange:e=>f({showUnplaced:e}),description:a(454,716)}),(0,W[a(792,622)])(K,{label:d(1206,1411),checked:l[d(2325,2122)],onChange:e=>f({animateTransitions:e})})]}),(0,W[d(2329,2026)])(Bt,{prefix:pn,value:e[a(-95,-17)],onChange:e=>c(d(1632,1387),e),schedulers:Tn}),(0,W[d(1953,2026)])(Rt,{prefix:pn,value:e[d(1017,1475)],onChange:n=>t({...e,color:n}),nodeMappings:vn,edgeMappings:wn,numericProps:i[a(597,263)],numericEdgeProps:i[d(1518,1387)]}),(0,W[d(1713,2026)])(Ut,{prefix:pn,value:e[d(1877,1667)],onChange:e=>c(d(1678,1667),e),numericProps:i[a(-152,263)]}),(0,W[a(738,622)])(Lt,{prefix:pn,value:e[a(-119,42)],onChange:e=>c(d(1226,1446),e)}),(0,W[d(2008,2026)])(Vt,{prefix:pn,value:e[a(592,99)],onChange:e=>c(a(320,99),e)})]})}var On=[...he,X(1312,1390)],kn=[...be,Y(1194,936)];const Z={};Z[X(1407,1388)]=`x`,Z[X(1514,1433)]=`y`,Z[X(1791,1885)]=`z`,Z[Y(803,1206)]=X(1901,2186),Z[X(1341,1050)]=Y(1248,971),Z[Y(957,747)]=qe,Z[Y(928,798)]=.25,Z[Y(898,1140)]=Y(1463,971),Z[X(1564,1806)]=100,Z[X(1930,2416)]=!0,Z[X(1756,2135)]=!0,Z[Y(1231,1400)]=!0;const Q={...Ie};Q[X(1831,1526)]=2,Q[X(1129,1484)]={},Q[X(1100,1250)]={...Ie[X(1100,1458)]},Q[X(965,674)]=Z,Q[X(1129,1484)][X(1321,1136)]={...Ie[Y(756,753)][X(1321,1734)]},Q[X(1129,1484)][Y(224,665)]={...Ie[X(1129,1279)][Y(889,665)]},Q[X(1129,1484)][X(1321,1136)][Y(1375,1324)]=Y(675,936),Q[X(1129,1484)][X(1321,1136)][Y(540,826)]=Y(1058,686),Q[X(1129,1484)][Y(224,665)][Y(1496,1324)]=X(1213,1630),Q[X(1129,1484)][Y(224,665)][Y(339,826)]=X(1062,1343),Q[X(1100,1250)][X(1472,1610)]=!1;var An=Q;function jn(e){let t=V(e),n=An,r=V(t[o(305,453)]),i=ge(t,n,On,kn);(t[o(1638,1319)]===void 0||t[o(1328,1319)]===1)&&i[o(793,617)][o(333,809)][o(1500,1188)]===a(814,1246)&&(i[o(925,617)][a(559,1016)][o(1390,1188)]=n[o(873,617)][o(944,809)][o(1362,1188)]);function a(e,t){return Y(e,t-71)}R(i[o(697,529)][a(789,1068)])[a(1738,1422)]&&(i[o(323,529)][a(1547,1068)]=n[a(1053,736)][o(1193,861)]);function o(e,t){return Y(e,t- -136)}return{...i,version:2,layout:{xProperty:I(r[o(716,895)],n[o(427,453)][o(1382,895)]),yProperty:I(r[o(901,1002)],n[a(782,660)][o(658,1002)]),zProperty:I(r[a(1385,1486)],n[o(67,453)][a(1162,1486)]),clusterProperty:I(r[o(1178,1070)],n[o(412,453)][a(1395,1277)]),source:ve(r[a(1179,1036)],[o(469,835),o(63,482),a(1565,1237)],n[o(933,453)][o(687,829)]),separation:Ke[o(645,905)](e=>e.id===r[o(1037,611)])?String(r[o(1019,611)]):n[o(735,453)][o(234,611)],clusterSpacing:L(r[a(975,869)],n[o(165,453)][a(733,869)],0,2),scale:r[o(875,1004)]===a(1369,1042)?a(1166,1042):typeof r[a(1038,1211)]===a(1103,1442)?L(r[o(939,1004)],1,1e-6,1e6):n[o(584,453)][a(1629,1211)],worldRadius:L(r[o(1469,1052)],n[o(70,453)][o(1157,1052)],10,1e3),center:Fe(r[a(1317,1625)],n[o(-27,453)][o(1426,1418)]),showUnplaced:Fe(r[o(1231,1244)],n[o(864,453)][o(1170,1244)]),animateTransitions:Fe(r[o(1391,1264)],n[o(640,453)][o(1308,1264)])}}}const Mn={};Mn[Y(517,693)]=!1,Mn[X(1790,1821)]=!0,Mn[Y(1253,1413)]=!0,Mn[X(1472,1014)]=!0,Mn[Y(1126,1322)]=1e5;var Nn=[It,fn,At({id:X(1736,1742),label:Y(1194,1439),description:Y(1934,1492),Icon:C,Component:(0,U[X(1613,1839)])(()=>c(()=>import(`./chunks/8rplBK4i.js`),[],import.meta.url)),OptionsPanel:Dn,defaultOptions:An,migrateOptions:jn,capabilities:Mn})];X(1191,1547);function Pn(e){function t(e,t){return X(t- -851,e)}function n(e,t){return X(e- -882,t)}return Nn[t(57,286)](t=>t.id===e)??Nn[n(255,278)](e=>e.id===t(80,340))??Nn[0]}function Fn({current:e,onChange:t,compact:n=!1}){let[r,i]=(0,U[l(877,1233)])(!1),a=dt(r,()=>i(!1)),o={};function s(e,t){return X(t- -605,e)}o[l(-74,381)]=12;let c={};c[s(632,408)]=11;function l(e,t){return X(t- -632,e)}return c[s(505,824)]=s(662,474),(0,W[l(503,996)])(s(1015,991),{ref:a,className:l(954,639),children:[(0,W[s(1482,1023)])(s(793,903),{type:s(703,903),"aria-haspopup":s(970,1015),"aria-expanded":r,"aria-label":l(1054,562),onClick:()=>i(e=>!e),className:l(1223,1126),children:[(0,W[s(879,1075)])(e[s(855,1330)],o),!n&&e[s(784,419)],(0,W[s(1247,1075)])(T,c)]}),r&&(0,W[l(1041,1048)])(l(640,964),{role:l(1099,988),"aria-label":s(726,589),className:s(626,1086),children:Nn[l(674,490)](n=>(0,W[l(896,996)])(l(1218,876),{type:l(561,876),role:l(962,846),"aria-selected":n.id===e.id,onClick:()=>{t(n.id),i(!1)},className:s(1132,1338)+(n.id===e.id?l(696,421):l(1199,1038)),children:[(0,W[s(1286,1075)])(n[s(1642,1330)],{size:14,className:s(710,669)}),(0,W[s(900,1023)])(l(1268,869),{className:s(552,578),children:[(0,W[l(676,1048)])(l(514,869),{className:s(1065,1039),children:n[s(193,419)]}),(0,W[s(674,1075)])(l(646,869),{className:s(248,698),children:n[s(779,363)]})]})]},n.id))})]})}var In=360;function Ln({x:e,y:t,bounds:n,node:r,edge:i,schema:a}){if(!r&&!i)return null;let o=e+14+In>n[u(1338,952)]?Math[c(1461,1681)](4,e-In-14):e+14,s=Math[c(2223,1726)](t+14,Math[c(1752,1681)](4,n[u(1103,1282)]-120));function c(e,t){return Y(e,t-365)}let l={};l[u(956,460)]=o;function u(e,t){return Y(t,e-363)}return l[u(1050,1255)]=s,l[u(1108,890)]=In,(0,W[u(1667,1579)])(u(1583,1487),{role:u(998,502),style:l,className:c(2106,1830),children:r?(0,W[c(1329,1669)])(Rn,{node:r}):i?(0,W[u(1667,1875)])(zn,{edge:i,schema:a}):null})}function Rn({node:e}){let{roleDescriptions:t}=m(),n=Je(e[o(1241,1729)]),r=Object[o(2015,1592)](e[i(712,362)]??{})[o(1844,1383)](([e])=>e!==o(1232,1235));function i(e,t){return X(e- -302,t)}let a={};a[o(1656,2145)]=i(1310,1235),a[o(1330,1391)]=[e[o(1716,2181)],n?i(1016,1411)+(t[n]??n):``];function o(e,t){return X(e-227,t)}let s={};return s[i(1127,1301)]=o(1280,1633),s[o(1330,992)]=e[i(722,762)]||e.id,(0,W[i(1326,872)])(o(1823,1375),{className:o(2010,1567),children:[(0,W[i(1326,1340)])(o(1823,2155),a),(0,W[o(1907,2213)])(i(1294,1045),s),e[o(1251,1045)]!==e.id&&(0,W[i(1378,1822)])(i(1294,1150),{className:i(777,933),children:e.id}),r[i(820,1233)](([e,t])=>(0,W[o(1855,1921)])(i(1294,1102),{className:i(1368,890),children:[e,`: `,String(t)]},e))]})}function zn({edge:e,schema:t}){let{roleDescriptions:n,formatValue:r}=m(),i=t?.[o(1778,1518)][o(1384,1027)]??s(1574,1749);function o(e,t){return Y(t,e-666)}function s(e,t){return Y(t,e-834)}let c=e[s(1472,1357)]?.[i]??e[s(1472,1718)]?.[s(1574,1322)],l=Je(e[o(1304,1714)]);return(0,W[o(1918,2282)])(s(2054,1955),{children:[(0,W[o(1918,1557)])(o(1886,1480),{className:s(1511,1075),children:[e[s(1947,1906)],e[o(2117,2080)]===void 0?``:o(1608,2096)+r(a(e)),c===void 0?``:s(2243,2146)+String(c)]}),l&&(0,W[s(2138,1702)])(o(1886,1881),{className:s(1537,1960),children:n[l]??l})]})}function Bn({shape:e,color:t}){let n={};n[a(614,442)]=t;let r=n,i={};if(i[o(1930,1653)]=a(951,1222),i[a(290,-117)]=r,e===a(903,1368))return(0,W[a(757,1008)])(o(1944,1725),i);function a(e,t){return X(e- -923,t)}function o(e,t){return X(t-224,e)}let s={};if(s[a(506,174)]=a(299,31),s[o(1298,1437)]=r,e===a(368,-53))return(0,W[o(1876,1904)])(o(2092,1725),s);let c={...r};c[a(346,517)]=o(2163,1858);let l={};if(l[o(1591,1653)]=o(1449,1446),l[o(1583,1437)]=c,e===o(1586,1209))return(0,W[o(1741,1904)])(o(1552,1725),l);let u={};return u[a(506,36)]=o(1652,1388),u[o(995,1437)]=r,(0,W[a(757,579)])(o(1544,1725),u)}function Vn({types:e,style:t,hasFlagged:n,hasContext:r,unreached:i,unplaced:a=0}){let{flaggedLabel:o}=m();if(e[d(1085,1563)]===0)return null;let s={};s[d(1257,1203)]=p(338,724);let c={};c[p(126,67)]=p(340,754);let l={};l[d(1043,1095)]=p(340,684);let u={};u[d(766,1095)]=d(1204,1496),u[d(1100,769)]=d(525,967);function d(e,t){return X(t- -334,e)}function p(e,t){return X(e- -1303,t)}return(0,W[d(992,1294)])(d(1683,1262),{className:d(791,851),children:[e[d(850,788)](e=>{let n={};n[o(1486,1962)]=e;let r=f(t,n),i={};i[a(801,960)]=r[a(979,960)];function a(e,t){return p(t-360,e)}i[o(1126,1617)]=r[o(1126,1030)];function o(e,t){return p(e-1300,t)}return(0,W[a(342,685)])(o(1498,1491),{className:a(353,333),children:[(0,W[o(1677,1830)])(Bn,i),e]},e)}),n&&(0,W[d(1452,1294)])(p(198,4),{className:p(-27,-389),children:[(0,W[d(892,1346)])(p(198,409),{className:p(-139,-526),style:s}),o]}),i>0&&(0,W[d(1733,1294)])(d(1482,1167),{className:d(1160,942),children:[(0,W[p(377,186)])(p(198,98),c),d(859,1020),i[d(1134,1421)](),`)`]}),a>0&&(0,W[d(1402,1294)])(d(1470,1167),{className:p(-27,-56),children:[(0,W[p(377,559)])(p(198,311),l),p(5,386),a[p(452,814)](),`)`]}),r&&(0,W[p(377,714)])(p(198,338),u)]})}const Hn={};Hn[Y(732,702)]=1,Hn[Y(991,1071)]=Y(952,687),Hn[X(1562,1751)]=X(1810,1631);const Un={};Un[X(1078,953)]=2,Un[Y(1401,1071)]=Y(1376,1142),Un[Y(1159,1186)]=X(1371,1642);const Wn={};Wn[X(1078,1206)]=0,Wn[X(1447,1651)]=X(1296,1325),Wn[X(1562,1579)]=Y(923,593);var Gn=[Hn,Un,Wn];function Kn(e,t=1e-6){function n(e,t){return X(t- -1272,e)}let r=e=>Math[n(999,578)](e)0?[0,0,-1]:[0,0,1]}function Jn(){let e=[];for(let r of[-1,0,1])for(let i of[-1,0,1])for(let a of[-1,0,1]){if(r===0&&i===0&&a===0)continue;let o=[r,i,a],s=Number(r!==0)+Number(i!==0)+Number(a!==0),c=[];for(let{axis:e,positive:r,negative:i}of Gn)o[e]>0?c[n(283,653)](r):o[e]<0&&c[t(654,1027)](i);let l=c[t(760,1106)](` `);e[t(654,244)]({key:Kn(o),kind:s===1?n(938,551):s===2?t(727,802):n(-57,241),grid:o,pose:{direction:B(o),up:qn(o)},label:s===1?l[n(298,199)]():``,name:l,aria:n(939,673)+l})}function t(e,t){return Y(t,e- -522)}function n(e,t){return Y(e,t- -523)}return e}var Yn=Jn(),Xn=new Map(Yn[Y(737,746)](e=>[e[Y(1366,980)],e]));function Zn(e){function t(e,t){return Y(e,t- -1025)}return Xn[t(-11,280)](Kn(e))}var Qn=.5,$n=.05,er=[[1,0,0],[-1,0,0],[0,1,0],[0,-1,0],[0,0,1],[0,0,-1]];function tr(e){return e[0]===0?e[1]===0?[[1,0,0],[0,1,0]]:[[1,0,0],[0,0,1]]:[[0,1,0],[0,0,1]]}var nr=[-1,-.5,Qn,1];function rr(e){function t(e,t){return X(e- -543,t)}function n(e,t){return X(e-430,t)}let r=Ne(e),i=e=>{let t=z(r,e);return[t.x,t.y]},a=[];for(let e of er){let n=Ae(r[2],e);if(n<=$n)continue;let o=Zn(e);if(!o)continue;let[s,c]=tr(e),l=(t,n)=>i([e[0]+s[0]*t+c[0]*n,e[1]+s[1]*t+c[1]*n,e[2]+s[2]*t+c[2]*n]),u=[];for(let n=0;n<3;n++)for(let r=0;r<3;r++){let i=Zn([e[0]+s[0]*(n-1)+c[0]*(r-1),e[1]+s[1]*(n-1)+c[1]*(r-1),e[2]+s[2]*(n-1)+c[2]*(r-1)]);if(!i)continue;let[a,o,d,f]=[nr[n],nr[n+1],nr[r],nr[r+1]];u[t(1009,720)]({preset:i,polygon:[l(a,d),l(o,d),l(o,f),l(a,f)],primary:!1})}let d=qn(e);a[t(1009,851)]({preset:o,facing:n,polygon:[l(-1,-1),l(1,-1),l(1,1),l(-1,1)],cells:u,label:{origin:i(e),right:i(we(d,e)),down:i(Le(d,-1))}})}a[n(2347,2654)]((e,r)=>e[t(786,924)]-r[n(1759,1514)]);let o=new Set;for(let e=a[t(1354,1409)]-1;e>=0;e--)for(let r of a[e][t(1134,967)])o[t(623,467)](r[n(1539,1206)][t(813,899)])||(o[n(2179,1849)](r[n(1539,1205)][t(813,1190)]),r[n(2e3,1835)]=!0);return a}var ir=1.3,ar=.24,or=.22,sr=1.6,cr=.18,lr=1.75,ur=-1.12,dr=1.18,fr=2.05,pr=2.55,mr=2.75;const hr={};hr[X(1117,1044)]=`up`,hr[Y(940,666)]=[0,-1];const gr={};gr[Y(944,741)]=Y(674,976),gr[Y(918,666)]=[0,1];const _r={};_r[Y(746,741)]=Y(297,593),_r[Y(536,666)]=[-1,0];const vr={};vr[X(1117,1351)]=Y(859,920),vr[X(1042,921)]=[1,0];var yr=[hr,gr,_r,vr];function br(e){function t(e,t){return X(e- -255,t)}return Oe(e)?yr[t(867,767)](({side:n,dir:r})=>{function i(e,n){return t(e- -835,n)}let[a,o]=r,s=[a*ir,o*ir],c=[s[0]+a*ar,s[1]+o*ar],l=-o*or,u=a*or,d=De(e,n),f=Zn(d[m(1704,1900)])?.[i(-8,-127)]??n,p={};function m(e,n){return t(e-337,n)}return p[m(1199,1093)]=n,p[m(1430,1427)]=[c,[s[0]+l,s[1]+u],[s[0]-l,s[1]-u]],p[m(1735,1387)]=d,p[i(318,592)]=i(291,-92)+f+i(477,59),p}):[]}var xr=(e,t)=>{function n(e,t){return X(t- -1179,e)}let r=e*Math.PI/180;return[Math[n(51,-93)](r)*t,Math[n(665,209)](r)*t]};function Sr(e,t,n,r){let[i,a]=xr(t,sr),[o,s]=xr(n,sr),c=+(n>t),l=n*Math.PI/180,u=n>t?1:-1;function d(e,t){return X(t-257,e)}let f=[-Math[p(-60,-456)](l)*u,Math[d(1214,1343)](l)*u];function p(e,t){return X(e- -1448,t)}let m=[Math[p(-362,-159)](l),Math[p(-60,390)](l)],h=[o+f[0]*cr,s+f[1]*cr],g=cr*.55;return{turn:e,arc:`M `+i[p(-305,-279)](4)+` `+a[p(-305,-764)](4)+d(2220,1909)+sr+` `+sr+d(2490,2010)+c+` `+o[p(-305,73)](4)+` `+s[d(938,1400)](4),head:[h,[o+m[0]*g,s+m[1]*g],[o-m[0]*g,s-m[1]*g]],pose:Pe(r,e),aria:e===1?d(1747,1313):p(-182,-234)}}function Cr(e){return Oe(e)?[Sr(1,-78,-55,e),Sr(-1,-12,-35,e)]:[]}var wr=72;const Tr={};Tr[X(963,737)]=`F`,Tr[Y(530,666)]=[0,0,1];const Er={};Er[X(963,1257)]=`R`,Er[X(1042,1231)]=[1,0,0];const Dr={};Dr[X(963,1457)]=`B`,Dr[Y(499,666)]=[0,0,-1];const Or={};Or[Y(910,587)]=`L`,Or[X(1042,1414)]=[-1,0,0];var kr=[Tr,Er,Dr,Or];const Ar={};Ar[X(1327,1604)]=[0,ur,0],Ar.a=[1,0,0],Ar.b=[0,0,1],Ar[Y(1161,817)]=lr;var jr=Ar;const Mr={};Mr[Y(481,951)]=[0,0,0],Mr.a=[0,1,0],Mr.b=[1,0,0],Mr[Y(442,817)]=fr;var Nr=Mr;function Pr(e){return we(e.b,e.a)}function Fr(e){let t=[],n=[],r=[],i=null;for(let a of e){let e=a[s(191,-61)]>=0,c=[a.x,a.y];i!==null&&e!==i&&(r[o(1482,1859)](c),(i?n:t)[s(739,671)](r),r=[]),r[s(739,587)](c),i=e}r[o(2057,2204)]>1&&i!==null&&(i?n:t)[o(1785,1859)](r);let a={};a[s(558,413)]=t,a[o(1601,1825)]=n;function o(e,t){return X(t-307,e)}function s(e,t){return X(e- -813,t)}return a}function Ir(e){let{centre:t,a:n,b:r,radius:i}=e;function a(e,t){return X(t- -1448,e)}let o={};return o[a(109,449)]=73,Array[a(343,-62)](o,(e,o)=>{let s=o/wr*Math.PI*2,c=Math[l(-14,206)](s)*i;function l(e,t){return a(e,t-568)}let u=Math[d(1297,1098)](s)*i;function d(e,t){return a(e,t-1158)}return[t[0]+n[0]*c+r[0]*u,t[1]+n[1]*c+r[1]*u,t[2]+n[2]*c+r[2]*u]})}function Lr(e,t){let n=Ne(e);function r(e,t){return Y(e,t-493)}return Fr(Ir(t)[r(1522,1239)](e=>z(n,e)))}function Rr(e,t){let n=Ne(e),r=z(n,t[c(881,977)]),i=z(n,Le(t.a,t[c(747,983)])),a=z(n,Le(t.b,t[c(747,1225)])),o=[i.x,i.y],s=[a.x,a.y];function c(e,t){return Y(t,e- -70)}function l(e,t){return Y(e,t-86)}return{centre:[r.x,r.y],ea:o,eb:s,openness:Math[c(1404,1201)](o[0]*s[1]-o[1]*s[0])/(t[l(462,903)]*t[l(1076,903)]),da:i[c(558,661)],db:a[c(558,310)]}}function $(e,t){e-=495;let n=nn(),r=n[e];$.WYhaQl===void 0&&($.fwfUIT=function(e){let t=``,n=``;for(let n=0,r,i,a=0;i=e.charAt(a++);~i&&(r=n%4?r*64+i:i,n++%4)&&(t+=String.fromCharCode(255&r>>(-2*n&6))))i=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=`.indexOf(i);for(let e=0,r=t.length;e{let t=e%(2*Math.PI);return t>Math.PI&&(t-=2*Math.PI),t<=-Math.PI&&(t+=2*Math.PI),t},Gr=(e,t)=>Math[Y(316,710)](t)*e.da+Math[X(1388,1491)](t)*e.db;function Kr(e,t){function n(e,t){return Y(t,e-830)}let r=Math[n(1540,1687)](t),i=Math[a(96,-26)](t);function a(e,t){return Y(t,e- -916)}return[e[a(35,45)][0]+r*e.ea[0]+i*e.eb[0],e[n(1781,2109)][1]+r*e.ea[1]+i*e.eb[1]]}function qr(e,t,n){let r=Rr(e,t);if(r[i(1026,1420)]>=.6){let e=zr(r,n);if(e!==null)return e}function i(e,t){return Y(t,e-66)}let a=0,o=1/0;for(let e=0;eGr(r,a))&&(o=Math[s(1254,921)](l,o),a=i)}function s(e,t){return Y(t,e- -107)}return Wr(a)}function Jr(e,t,n,r,i){let a=Rr(e,t);if(a[d(1480,1309)]>=.6){let e=zr(a,r),t=zr(a,i),n=e=>Math[s(2302,2556)](...Br(a,e))[-Math[s(1824,1907)](e)*a.ea[0]+Math[s(1522,1585)](e)*a.eb[0],-Math[s(1824,1924)](e)*a.ea[1]+Math[d(1230,761)](e)*a.eb[1]];function s(e,t){return Y(t,e-812)}let[c,l]=o(n),u=Math[s(2302,2111)](c,l);if(u<1e-6*t[d(1337,914)]){let e=Gr(a,n+Ur)>=Gr(a,n-Ur)?n+Ur:n-Ur;if([c,l]=o(e),u=Math[d(2010,2298)](c,l),u===0)return 0}function d(e,t){return Y(t,e-520)}let f=((i[0]-r[0])*c+(i[1]-r[1])*l)/u;return f===0?0:f/Math[d(1836,1553)](u,Hr*t[d(1337,1815)])}function Yr(e){let t=Ne(e);function n(e,t){return Y(e,t- -218)}let{back:r,front:i}=Lr(e,jr);function a(e,t){return Y(t,e- -395)}return{back:r,front:i,letters:kr[a(351,353)](({letter:e,dir:n})=>{let r=lr*dr,i=z(t,[n[0]*r,ur,n[2]*r]),o={};o[c(-446,-37)]=e;function s(e,t){return a(e- -11,t)}o[s(897,403)]=n;function c(e,t){return a(t- -229,e)}return o.at=[i.x,i.y],o[c(102,518)]=i[s(222,416)]>=0,o}),openness:Math[n(925,1256)](t[2][1])}}function Xr(e,t){let[n,,r]=e[a(773,575)];function i(e,t){return Y(t,e- -149)}function a(e,t){return Y(t,e- -473)}let o=Math[i(1341,1217)](n,r)>.001?Math[a(787,1174)](r,n):Math[a(787,759)](-e.up[2],-e.up[0]);return Te(e,Wr(o-Math[i(1111,753)](t[2],t[0])))}function Zr(e){function t(e,t){return X(e- -655,t)}let n=Lr(e,Nr),r=Rr(e,Nr)[t(681,1115)],i={};i[t(716,1147)]=[...n[a(826,1189)],...n[t(863,921)]],i[a(1327,1336)]=[];function a(e,t){return X(t- -182,e)}let o={...r<.3?i:n};return o[t(681,332)]=r,o}function Qr(){function e(e,t){return X(e- -1277,t)}return[0,1,2,3][e(-155,-262)](t=>{function n(t,n){return e(n-727,t)}let r=t*Math.PI/2;function i(t,n){return e(t-1075,n)}let a=2.42,o=2.6799999999999997;return[[Math[n(420,536)](r)*a,Math[n(375,838)](r)*a],[Math[n(315,536)](r)*o,Math[i(1186,863)](r)*o]]})}var $r=.5;function ei(e,t){function n(e,t){return Y(t,e-259)}function r(e,t){return Y(e,t- -430)}if(Math[n(1749,2174)](e[0],e[1])<$r||Math[r(712,1060)](t[0],t[1])<$r)return 0;let i=(Math[r(532,830)](t[1],t[0])-Math[n(1519,1686)](e[1],e[0]))%(2*Math.PI);return i>Math.PI&&(i-=2*Math.PI),i<=-Math.PI&&(i+=2*Math.PI),i===0?0:i}var ti=X(1548,1579),ni=e=>e[Y(341,746)](([e,t])=>e[Y(858,767)](4)+`,`+t[X(1143,1444)](4))[X(1658,1257)](` `);function ri({runs:e,layer:t,spec:n,hovered:r,target:i,cursor:a,children:o}){let s=r===n[c(943,1287)];function c(e,t){return Y(t,e- -37)}let l={};l[c(1205,1412)]=a;function u(e,t){return Y(t,e- -816)}return(0,W[u(436,725)])(`g`,{className:c(1459,1454),...i(n),style:l,children:[e[u(-70,430)]((e,n)=>(0,W[u(436,527)])(`g`,{children:[(0,W[u(488,720)])(u(317,721),{points:ni(e),fill:u(368,13),stroke:u(647,989),strokeWidth:.34}),(0,W[u(488,825)])(c(1096,873),{points:ni(e),fill:c(1147,1136),stroke:s?ti:t===u(179,501)?u(108,-91):u(217,-41),strokeWidth:.07,strokeLinecap:c(1050,1356)})]},n)),o]})}const ii={};ii.F=X(1443,1520),ii.R=Y(1777,1327),ii.B=Y(985,1154),ii.L=Y(559,673);var ai=ii;function oi({compass:e,layer:t,hovered:n,target:r,onHeading:i}){function a(e,t){return X(t- -70,e)}let o=Math[a(1650,1667)](1,Math[c(541,163)](0,(e[c(185,-84)]-.2)/.25)),s={};s[a(1511,1286)]=a(877,1207),s[c(257,-161)]=a(1760,1653),s[a(1653,1409)]=a(683,1183),s[a(1088,1183)]=jr;function c(e,t){return X(e- -1151,t)}return s[a(1407,1048)]=!1,(0,W[c(529,400)])(ri,{runs:t===c(220,402)?e[c(220,149)]:e[c(367,379)],layer:t,spec:s,hovered:n,target:r,cursor:c(-112,-606),children:o>0&&e[a(1753,1421)][a(1805,1547)](e=>e[c(367,293)]===(t===c(367,558)))[a(1317,1052)](e=>(0,W[c(529,567)])(c(666,735),{...r({key:c(307,798)+e[a(1341,893)],aria:c(248,155)+(ai[e[c(-188,112)]]??e[a(631,893)]),activate:()=>i(e[a(1963,1609)]),drag:c(102,303),ring:jr,focusable:!1}),x:e.at[0],y:e.at[1],textAnchor:c(144,-167),dominantBaseline:a(1327,1557),fontSize:.3,fontWeight:600,fill:n===a(1574,1388)+e[c(-188,301)]?c(397,21):t===c(367,243)?a(1427,1348):c(-64,312),opacity:o,className:a(1941,1802),style:{cursor:c(225,-120)},children:e[c(-188,-650)]},e[a(640,893)]))})}var si=e=>e[Y(358,746)](([e,t])=>e[Y(497,767)](4)+`,`+t[Y(1065,767)](4))[Y(890,1282)](` `),ci=X(1878,1424);function li({faces:e,hovered:t,target:n,look:r}){function i(e,t){return Y(t,e- -46)}function a(e,t){return Y(e,t-579)}return(0,W[a(1597,1883)])(`g`,{children:e[i(700,234)](e=>{function i(e,t){return a(e,t-111)}function o(e,t){return a(e,t- -594)}let s=.6+.3*e[o(783,938)],{origin:c,right:l,down:u}=e[i(1219,1338)];return(0,W[o(956,1237)])(`g`,{children:[(0,W[i(1943,1994)])(o(519,957),{points:si(e[i(2136,1662)]),fill:o(1670,1388)+s+`)`,stroke:i(2307,1940),strokeWidth:.035,strokeLinejoin:o(699,1072)}),(0,W[i(1849,1994)])(o(1498,1426),{transform:i(1370,1372)+l[0]+` `+l[1]+` `+u[0]+` `+u[1]+` `+c[0]+` `+c[1]+`)`,textAnchor:i(2080,1609),dominantBaseline:i(2346,1941),fontSize:.36,fontWeight:600,letterSpacing:.01,fill:i(1397,1348),pointerEvents:i(1463,1874),children:e[i(1536,1423)][i(1463,1338)]}),e[i(1962,1991)][i(980,1436)]((e,a)=>(0,W[i(1667,1994)])(o(1220,957),{points:si(e[o(691,957)]),fill:t===e[i(1431,1423)][o(547,965)]?ci:i(2001,2153),className:o(1606,1481),...n({key:e[i(1717,1423)][i(1607,1670)],aria:e[i(1921,1423)][o(971,1017)],activate:()=>r(e[o(459,718)][o(870,1262)]),drag:o(1509,1254),focusable:e[o(903,1179)]})},a))]},e[o(406,718)][o(472,965)])})})}var ui=Y(522,604),di=Qr();function fi({hovered:e,target:t}){let n=e===ui?ti:i(1173,1550),r={};r[a(1434,1473)]=ui,r[i(1376,884)]=i(1284,923);function i(e,t){return X(e- -32,t)}r[a(1557,1906)]=a(1248,1464);function a(e,t){return X(e-78,t)}r[i(1086,736)]=!1;let o={};o[a(1696,1580)]=a(1117,806);let s={};s.r=pr,s[i(1718,2178)]=i(1528,1641),s[i(1529,1097)]=i(1807,2171),s[i(1278,801)]=.34;let c={};return c.r=pr,c[a(1828,2161)]=i(1528,1295),c[a(1639,1635)]=n,c[i(1278,1056)]=.06,(0,W[a(1706,1744)])(`g`,{className:i(1840,1408),...t(r),style:o,children:[(0,W[i(1648,1817)])(a(1614,1450),s),(0,W[i(1648,1490)])(a(1614,1683),c),di[a(1200,1628)](([e,t],r)=>(0,W[a(1758,1612)])(i(1537,1562),{x1:e[0],y1:e[1],x2:t[0],y2:t[1],stroke:n,strokeWidth:.06,strokeLinecap:i(1431,1148)},r))]})}var pi=Y(969,1238),mi=X(1548,1274);function hi({arrows:e,rolls:t,hovered:n,target:r,look:i}){function a(e,t){return X(t- -618,e)}function o(e,t){return X(t- -1179,e)}return(0,W[a(739,1010)])(`g`,{children:[e[a(474,504)](e=>{let t=a(702,999)+e[a(667,374)];function a(e,t){return o(e,t-436)}function s(e,t){return o(e,t-286)}return(0,W[s(699,787)])(a(107,605),{points:si(e[s(118,455)]),fill:n===t?mi:pi,stroke:s(529,269),strokeWidth:.02,strokeLinejoin:a(1199,720),className:s(549,979),...r({key:t,aria:e[a(347,665)],activate:()=>i(e[a(462,910)]),drag:a(1121,902)})},t)}),t[o(-238,-57)](e=>{let t=s(173,206)+e[o(657,604)];function o(e,t){return a(t,e- -498)}function s(e,t){return a(t,e- -409)}let c=n===t?mi:pi;return(0,W[s(601,669)])(`g`,{className:s(845,917),...r({key:t,aria:e[o(292,-7)],activate:()=>i(e[o(537,107)]),drag:s(618,265)}),children:[(0,W[s(653,1047)])(s(385,881),{d:e[s(179,-20)],fill:s(533,926),stroke:s(812,1150),strokeWidth:.32}),(0,W[o(564,371)])(o(296,111),{d:e[s(179,-196)],fill:s(533,362),stroke:c,strokeWidth:.07,strokeLinecap:s(436,17)}),(0,W[s(653,959)])(o(232,-236),{points:si(e[o(-52,-104)]),fill:c})]},t)})]})}var gi=.012,_i=4;function vi(e,t){function n(e,t){return X(e- -744,t)}let[r,i]=(0,U[n(1121,1100)])(null),a=(0,U[n(471,827)])(null);function o(n,r,i){if(n[u(1076,1168)]!==0)return;n[u(1084,911)]();let o=i===u(663,913)&&r?.[u(857,913)]?s(n[d(687,613)],n[u(1634,1381)]):null,c=o&&r?.[u(486,913)]?qr(e[u(1370,1341)](),r[d(702,400)],o):null,l={};l.x=n[d(740,613)],l.y=n[d(553,868)],l[d(956,562)]=n[u(1306,1126)],l[u(1272,1348)]=n[d(487,868)],l[u(1127,1052)]=r,l[u(980,1139)]=i;function u(e,t){return f(t-867,e)}l[d(478,658)]=!1,l[u(1128,699)]=c,a[d(883,808)]=l;function d(e,t){return f(t-354,e)}t[u(1153,1321)]?.[u(858,1331)](n[u(1214,1081)])}function s(e,n){let r=t[i(1560,1983)]?.[a(665,320)]();function i(e,t){return f(e-1106,t)}function a(e,t){return f(t-62,e)}if(!r||r[i(1250,1407)]===0)return null;let o=2*mr/r[i(1250,1699)];return[(e-r[a(-203,-176)]-r[i(1250,1587)]/2)*o,(n-r[a(-393,-82)]-r[a(-284,-29)]/2)*o]}function c(t,n,r){let i=s(t[l(864,919)],t[o(691,350)]),a=s(n,r);if(!i||!a)return;function o(e,t){return f(e-210,t)}let c=t[l(841,828)]?.[o(256,-178)];function l(e,t){return f(e-656,t)}if(t[l(928,1357)]===l(702,1166)){if(!c||t[o(42,59)]===null)return;let n=Jr(e[l(1130,853)](),c,t[l(488,696)],i,a);n!==0&&e[l(1222,1243)](Pr(c),n)}else if(t[l(928,924)]===l(619,1043)){let t=ei(i,a);t!==0&&e[o(173,304)](t)}}let l={onPointerDown:e=>o(e,null,n(901,1348)),onPointerMove:t=>{let r=a[o(786,1246)];function o(e,t){return n(t-329,e)}if(!r)return;!r[o(1188,1096)]&&Math[s(1590,1909)](t[s(1190,1372)]-r.x,t[s(1445,992)]-r.y)>=_i&&(r[s(1235,1403)]=!0,i(r[o(1301,1064)]===o(1423,1230)?null:r[o(833,977)]?.[o(725,941)]??null));function s(e,t){return n(e-468,t)}if(!r[o(1085,1096)])return;let l=t[s(1190,727)]-r[o(1120,1e3)],u=t[s(1445,1093)]-r[o(1069,1273)];r[o(792,1064)]===o(1250,1230)?e[s(1369,1093)](-l*gi,-u*gi):c(r,t[o(720,1051)],t[o(1527,1306)]),r[o(1131,1e3)]=t[o(770,1051)],r[o(1716,1273)]=t[o(1471,1306)]},onPointerUp:e=>{function r(e,t){return n(e-1100,t)}let i=a[o(1252,1645)];a[o(1347,1645)]=null,t[r(2017,1884)]?.[r(1788,1390)](e[o(932,1405)])&&t[o(1904,1645)][o(1040,1469)](e[o(1201,1405)]);function o(e,t){return n(t-728,e)}i&&!i[o(1249,1495)]&&i[r(1748,1471)]?.[o(1902,1651)]?.()},onPointerCancel:()=>{function e(e,t){return f(t-821,e)}a[e(819,1275)]=null},onPointerLeave:()=>{function e(e,t){return n(t-363,e)}a[e(1735,1280)]||i(null)}};function u(e){let t=e[s(1094,1437)]??!!e[r(1640,1283)];function r(e,t){return n(e-717,t)}function s(e,t){return n(t-1063,e)}return{role:s(1803,1827),"aria-label":e[r(1381,1243)],tabIndex:t?0:-1,onPointerDown:t=>o(t,e,e[r(1452,1498)]),onPointerEnter:()=>{function t(e,t){return s(t,e- -710)}a[t(1270,973)]?.[t(1120,1231)]||i(e[t(965,637)])},onFocus:()=>i(e[r(1329,1036)]),onBlur:()=>i(null),onKeyDown:t=>{function n(e,t){return r(t-155,e)}if(t[n(1714,1484)]!==n(1875,1956)&&t[i(1040,641)]!==` `)return;t[n(1885,2040)]();function i(e,t){return r(t- -688,e)}t[n(1538,1379)](),e[i(452,952)]?.()}}}let d={};d[n(643,227)]=r;function f(e,t){return X(e- -1207,t)}return d[n(1204,1471)]=l,d[f(185,-256)]=u,d}function yi(e){let[t,n]=(0,U[i(1182,1320)])(()=>Ce(e[r(1794,1977)]()));(0,U[i(521,489)])(()=>{let t=null;function i(e,t){return r(e,t-172)}let a=null,o=e[i(2361,2321)](e=>{a=Ce(e),t===null&&(t=requestAnimationFrame(()=>{t=null,a&&n(a)}))});return()=>{o(),t!==null&&cancelAnimationFrame(t)}},[e]);function r(e,t){return X(t-296,e)}function i(e,t){return X(e- -683,t)}return t}function bi({ring:e,layer:t,hovered:n,target:r}){let i={};function a(e,t){return Y(t,e- -527)}i[a(453,783)]=a(929,986),i[o(546,52)]=o(-516,-72);function o(e,t){return Y(e,t- -980)}i[a(576,465)]=o(-353,-103),i[a(350,19)]=Nr,i[o(-99,-238)]=!1;let s={};return s[a(872,558)]=t===a(468,477)?e[o(348,15)]:e[o(367,162)],s[a(621,947)]=t,s[o(-226,48)]=i,s[a(484,182)]=n,s[a(489,599)]=r,s[o(685,262)]=a(136,614),(0,W[o(716,324)])(ri,s)}function xi({onHome:e,onSetHome:t,onClose:n}){function r(e,t){return Y(t,e- -145)}let i=dt(!0,n);function a(e,t){return Y(t,e- -617)}let o=(e,t)=>(0,W[a(687,815)])(r(987,1430),{type:a(515,164),role:r(1010,1183),onClick:()=>{n(),t()},className:a(557,206),children:e});return(0,W[a(635,610)])(a(603,900),{ref:i,role:a(131,-56),"aria-label":r(1209,899),className:r(658,995),children:[o(r(1304,1700),e),o(r(470,-28),t)]})}var Si=156;function Ci({view:e}){let t=yi(e),n=(0,U[y(-291,74)])(null);function r(e,t){return Y(t,e- -277)}let{hovered:i,svgProps:a,target:o}=vi(e,n),[s,c]=(0,U[y(550,724)])(!1),l=(0,U[y(351,628)])(()=>({faces:rr(t),arrows:br(t),rolls:Cr(t),ring:Yr(t),vertical:Zr(t)}),[t]),u=t=>e[r(622,750)](t),d=n=>e[y(138,134)](Xr(t,n)),f=mr,p={};p[r(360,566)]=13;let m={};m[y(-246,246)]=i,m[r(739,585)]=o;let h={};h[r(600,743)]=l[y(414,691)],h[r(871,1346)]=y(13,230),h[y(284,246)]=i,h[y(-225,251)]=o;let g={};g[y(115,136)]=l[r(600,427)],g[r(871,1211)]=r(718,1107),g[y(408,246)]=i,g[y(270,251)]=o,g[y(1052,645)]=d;let _={};_[y(304,279)]=l[r(767,551)],_[y(140,246)]=i,_[r(739,594)]=o,_[r(622,455)]=u;let v={};v[y(-93,136)]=l[y(-115,112)];function y(e,t){return Y(e,t- -765)}v[y(-114,383)]=r(865,1345),v[r(734,725)]=i,v[y(-170,251)]=o,v[r(1133,940)]=d;let b={};b[y(-188,112)]=l[y(410,691)],b[r(871,671)]=r(865,502),b[y(423,246)]=i,b[r(739,734)]=o;let x={};return x[y(-101,3)]=l[y(60,3)],x[r(1117,1512)]=l[y(277,629)],x[y(261,246)]=i,x[r(739,355)]=o,x[r(622,523)]=u,(0,W[y(572,487)])(y(69,455),{className:r(485,599),onContextMenu:e=>{e[t(465,626)]();function t(e,t){return y(e,t- -145)}e[t(-157,-35)](),c(!0)},children:[(0,W[y(675,487)])(r(943,764),{className:r(1254,1631),children:[(0,W[r(1027,907)])(y(518,367),{type:y(-56,367),onClick:()=>e[r(473,70)](),title:y(724,516),"aria-label":y(190,516),className:y(199,462),children:(0,W[r(1027,645)])(de,p)}),(0,W[y(355,487)])(r(1246,1218),{ref:n,width:Si,height:Si,viewBox:-f+` `+-f+` `+2*f+` `+2*f,role:r(811,572),"aria-label":y(120,366),className:y(139,572),...a,children:[(0,W[y(893,539)])(fi,m),(0,W[y(169,539)])(bi,h),(0,W[y(945,539)])(oi,g),(0,W[r(1027,1201)])(li,_),(0,W[y(712,539)])(oi,v),(0,W[y(999,539)])(bi,b),(0,W[y(732,539)])(hi,x)]})]}),s&&(0,W[r(1027,768)])(xi,{onHome:()=>e[y(398,-15)](),onSetHome:()=>e[y(-248,-89)](),onClose:()=>c(!1)})]})}const wi={};wi[Y(606,679)]=`⇧`,wi[X(1031,988)]=`⌥`,wi[X(1570,2043)]=`⌘`;const Ti={};Ti[X(1055,1010)]=X(1258,1637),Ti[Y(369,655)]=X(1151,1231),Ti[Y(1161,1194)]=X(1104,673);const Ei={};Ei[Y(945,1404)]=wi,Ei[Y(907,1386)]=Ti;var Di=Ei,Oi=[X(1570,1494),Y(947,655),Y(1041,679)];function ki(e,t){function n(e,t){return Y(e,t- -269)}function r(e,t){return Y(t,e-131)}return Oi[r(1372,1216)](t=>e[r(1575,1259)](t))[n(807,477)](e=>Di[t][e])[r(1413,1797)](n(550,328))}const Ai={};Ai[Y(962,593)]=Y(1573,1103),Ai[Y(572,919)]=Y(1686,1514);var ji=Ai;const Mi={};Mi[Y(1551,1269)]=X(1350,1696),Mi[X(1761,1367)]=X(1648,1286),Mi[X(1581,2061)]=X(1107,1484),Mi[Y(1095,1184)]=``;var Ni=Mi;function Pi(e){function t(e,t){return Y(t,e-601)}function n(e,t){return Y(e,t- -245)}return e[t(2122,1893)]===1?e[n(617,477)]():e}function Fi(e,t){function n(e,t){return X(e-24,t)}let r=(e,r)=>e[n(1921,1481)]>0?ki(e,t)+n(997,955)+r:r,i=e[n(1212,1636)][s(1339,1599)](e=>e[s(797,597)]!==n(1584,1363))[n(1146,945)](e=>({action:Ni[e[n(1099,698)]],input:r(e[s(1197,905)],ji[e[n(1532,1157)]]),origin:e[n(1312,1175)]})),a=e[s(1056,1422)][n(1146,1071)](e=>({action:e[s(1319,1443)]===1?n(1131,884):e[n(1621,1705)]>1?n(1201,1670):s(832,1266),input:r(e[n(1499,1427)],s(1056,1378)),origin:e[s(1010,1182)]})),o=e[s(1556,1934)][s(844,1082)](e=>({action:e[n(1048,1119)],input:r(e[n(1499,1980)],Pi(e[n(1380,1075)])),origin:e[n(1312,1555)]}));function s(e,t){return X(e- -278,t)}return[...i,...a,...o]}function Ii({scheme:e,platform:t,camera:n}){function r(e,t){return X(e- -1096,t)}function i(e,t){return X(e-102,t)}let a=(0,U[i(1871,2071)])(()=>{function r(e,t){return i(t- -283,e)}let a=Fi(e,t);function o(e,t){return i(e- -325,t)}return n?a:a[o(1394,1770)](e=>e[o(852,1060)][r(893,997)](r(1247,1238)))},[e,t,n]),o=a[i(1519,1064)](e=>e[i(1390,1454)]===r(618,981)),s={};return s[i(1531,1132)]=i(1502,1720),s[r(7,295)]=[e[i(1126,798)],i(1897,2177),o?r(601,381):``,`.`],(0,W[i(1730,1408)])(G,{groupKey:i(2016,1910),title:i(1142,868),children:[(0,W[r(584,1077)])(`dl`,{className:r(328,35),children:a[i(1224,1479)](e=>(0,W[i(1730,1974)])(r(500,235),{className:r(138,111),children:[(0,W[r(584,699)])(`dt`,{className:i(1168,1101),children:e[r(271,371)]}),(0,W[r(532,669)])(`dd`,{className:r(-17,-160),children:[e[r(-21,-133)],e[r(192,606)]===r(618,282)?` *`:``]})]},e[r(-21,27)]+`|`+e[r(271,247)]))}),(0,W[r(532,595)])(`p`,s)]})}function Li({scene:e,schema:t,selectionAction:n,panelDefaultOpen:r=!1,persistPanel:i=!1,panelExtra:a,emptyState:o,overlay:s,viewCube:c=!0,inputScheme:l=Me}){function u(e,t){return Y(e,t- -776)}let d=(0,U[u(52,63)])(null),[f,p]=(0,U[u(815,713)])(null),h=S(e,e=>e[V(-38,410)]),g=S(e,e=>e[u(424,403)]),_=S(e,e=>e[V(-145,-629)]),v=S(e,e=>e[V(111,-68)]),b=S(e,e=>e[u(502,772)]),x=S(e,e=>e[u(108,203)][u(208,-139)]),ee=y(e=>e[u(661,677)]),C=y(e=>e[V(20,-168)]),te=y(e=>e[u(740,619)][Pn(e[V(460,689)]).id]),T=y(e=>e[u(799,801)]),E=y(e=>e[V(-156,136)]),ie=y(e=>e[V(-96,-111)]),D=y(e=>e[V(-172,-103)]),[ae,O]=(0,U[u(1056,713)])(r),k=i?ie:ae,A=i?D:O,j={};j[u(894,654)]=320,j[u(756,585)]=260,j[V(323,684)]=480;let M=st(u(-445,-25),j),P=Pn(ee),oe=(0,U[u(670,617)])(()=>Re(h),[h]),ce=(0,U[u(1099,617)])(()=>new Map(h[V(-48,207)][u(-344,-30)](e=>[e.id,e])),[h]),le=(0,U[V(400,212)])(()=>new Map(h[u(-559,-111)][V(-247,-476)](e=>[e.id,e])),[h]),F=(0,U[V(-154,175)])(null),[ue,de]=(0,U[V(496,381)])(null),fe=(0,U[V(444,637)])(e=>{function t(e,t){return V(e-1751,t)}F[t(2043,2471)]=e,de(e)},[]),pe=(0,U[V(444,545)])(()=>F[u(215,509)]?.[V(29,-136)](u(99,309)),[]),me=(0,U[V(400,580)])(()=>xe(typeof navigator===u(407,612)?void 0:navigator),[]),I=(0,U[u(-17,63)])(null);function he(e){let t=F[n(1478,1703)];function n(e,t){return u(e,t-1194)}if(!t)return!1;if(e[i(304,643)]===n(1554,1440))return t[n(1319,1440)](e[n(940,1044)]),!0;let r=t[n(1260,1154)];function i(e,t){return u(t,e-23)}if(!r)return!1;switch(e[n(1332,1475)]){case i(365,245):return r[n(1526,1623)](e[n(1914,1808)]),!0;case n(1757,1317):{let t=Zn(e[n(1620,1618)]);return t&&r[n(1388,1317)](t[i(524,885)]),!!t}case n(840,1290):return r[n(1396,1290)](),!0;case n(1936,1499):return r[i(328,277)](),!0;case i(307,562):return I[n(1849,1703)]&&r[n(991,1384)](I[n(1955,1703)].x,I[i(532,649)].y),!0}}let[L,ge]=(0,U[u(324,713)])(null),[R,_e]=(0,U[u(551,713)])(null),[ve,ye]=(0,U[V(496,465)])({}),[be,z]=(0,U[u(750,713)])(null),Se=m();(0,U[V(-165,-185)])(()=>{let e=d[t(1546,1689)];if(!e)return;function t(e,t){return u(e,t-1180)}let n=new ResizeObserver(([e])=>{let{width:n,height:r}=e[a(968,1192)];function i(e,n){return t(e,n-83)}function a(e,n){return t(e,n- -718)}n>0&&r>0&&p({width:Math[i(1561,2036)](n),height:Math[i(1761,2036)](r)})});n[t(1926,1974)](e);function r(e,t){return u(t,e-841)}return()=>n[r(1429,1163)]()},[]),(0,U[V(-165,-43)])(()=>{if(be===null)return;let e=setTimeout(()=>z(null),2500);return()=>clearTimeout(e)},[be]);let Ce=(0,U[u(466,661)])(()=>{if(!n)return;let t=e[s(1881,1391)](),r=t[o(664,1063)][o(654,750)][o(950,544)](e=>t[o(888,1132)][o(499,616)](e.id));if(r[s(1609,1994)]===0)return;let i=t[s(1608,1428)][s(875,1138)][o(950,455)](e=>t[s(1408,1652)][s(1487,1263)](e[s(1078,1438)])&&t[o(888,1134)][s(1058,1263)](e[s(1362,1489)])),a={};function o(e,t){return u(t,e-485)}function s(e,t){return u(e,t-1249)}a[o(654,593)]=r,a[o(374,762)]=i,n[s(1738,1798)](a),z(r[o(1230,1260)]),n[o(1169,680)]!==!1&&t[s(1184,1093)]([],o(1008,609))},[n,e]),we=(0,U[u(-49,63)])(null),Te=(0,U[u(461,63)])(null);(0,U[u(104,52)])(()=>()=>{function e(e,t){return u(t,e-401)}we[e(910,835)]!==null&&cancelAnimationFrame(we[e(910,576)])},[]);let B=P[V(-395,-117)];function V(e,t){return Y(t,e- -993)}let De=(0,U[V(400,318)])(()=>({onHover(e,t){if(Te[r(1684,1232)]=e?{target:e,x:t.x,y:t.y}:null,we[n(626,804)]!==null)return;function n(e,t){return V(e-334,t)}function r(e,t){return V(t-940,e)}we[r(936,1232)]=requestAnimationFrame(()=>{function e(e,t){return n(e-102,t)}function t(e,t){return n(t-1254,e)}we[t(1391,1880)]=null,ge(Te[e(728,231)])})},onClick(t,n){_e(null);function r(e,t){return V(t-946,e)}let i=e[a(356,652)]();if(!t){i[r(890,573)]([],r(918,1252));return}function a(e,t){return V(t-727,e)}t[a(1074,791)]===r(1910,1421)&&i[r(918,573)]([t.id],n[a(-26,413)]||n[a(496,570)]||n[r(1298,939)]?a(1180,1247):r(942,1252))},onDoubleClick(t){let n=e[r(1119,1380)]();function r(e,t){return V(e-1194,t)}if(!t){F[r(1486,1510)]?.[i(1548,1357)]();return}function i(e,t){return V(e-1519,t)}t[r(1258,1175)]===r(1669,1980)&&(B[i(1940,2383)]?n[i(2041,1860)](t.id):n[r(1783,1446)](t.id))},onContextMenu(e,t){if(ge(null),e?.[i(1439,1195)]===r(406,-78))return;let n={};n[i(1482,1163)]=e?.id??null,n.x=t.x;function r(e,t){return u(t,e- -67)}n.y=t.y;function i(e,t){return u(e,t-914)}_e(n)},onInfo:ye}),[e,B[u(896,638)]]);function Oe(t){if(t[i(448,361)]instanceof HTMLInputElement||t[i(448,521)]instanceof HTMLTextAreaElement||t[o(86,367)]instanceof HTMLSelectElement||R)return;let n=e[o(60,269)](),r=t[i(511,848)]||t[i(345,714)];function i(e,t){return V(e-425,t)}let a=t[i(412,586)][o(913,573)]();if(t[o(142,331)]===o(135,426))n[i(280,719)]?n[o(-403,29)]():n[i(52,-317)]([],o(868,650));else if(t[o(-145,331)]===i(990,1328)||t[o(10,331)]===i(905,1345))n[i(611,984)][i(69,-26)]>0&&n[o(559,615)](n[o(590,530)]);else if(r&&a===`a`)n[i(595,621)]();else if(r&&a===`i`)n[o(1379,936)]();else if(!r&&a===`e`)n[o(462,388)]();else if(t[i(412,907)]===` `&&F[o(1031,636)]?.[o(-425,-46)])F[i(717,602)][i(35,42)]();else{let e=ke(l,je(t),Ee(t,me));if(!e||!he(e))return}function o(e,t){return V(t-344,e)}t[i(968,918)]()}let Ae=(0,U[u(954,617)])(()=>{let e=new Set,t=!1;for(let r of h[i(1032,1487)])e[n(2216,2017)](r[i(1371,1655)]),Se[n(1668,1421)](r)&&(t=!0);function n(e,t){return V(e-1836,t)}let r=h[n(1508,2009)][n(1884,2235)](e=>{function t(e,t){return i(e,t- -1281)}function n(e,t){return i(e,t- -76)}let r=Je(e[n(1087,1104)]);return r!==void 0&&Se[n(1700,1530)][t(-312,51)](r)});function i(e,t){return V(t-1535,e)}let a={};return a[n(2407,2853)]=[...e],a[i(2147,2125)]=t,a[i(1611,2026)]=r,a},[h,Se]),Ne=L?.[V(23,-125)][V(64,490)]===u(1155,692)?ce[V(312,69)](L[u(370,240)].id):void 0,Pe=L?.[u(-70,240)][u(236,281)]===u(63,473)?le[u(610,529)](L[V(23,299)].id):void 0,Fe=_?ce[V(312,310)](_[u(30,249)]):void 0,Ie=h[V(-48,-146)][u(258,745)]>B[u(915,546)],Le=[...g][V(48,331)](t=>{function n(e,t){return u(e,t-1455)}function r(e,t){return u(t,e- -47)}let i=ce[n(2461,1984)](t);return i?e[r(95,159)]()[n(1407,1391)](i):!1}),ze=h[u(175,169)][V(528,492)]===0,Be=[V(575,99),V(117,-285),B[V(421,332)]?u(429,225):V(-43,175),ue?.[V(-257,107)]?V(58,-132):V(13,227),B[u(19,320)]?u(-100,129):null][V(248,116)](Boolean),Ve={};Ve[V(60,419)]=u(526,450),Ve[u(32,-49)]=V(359,-97);let He={};He[V(60,431)]=u(-92,220),He[V(-266,5)]=u(-116,65);let Ue={};Ue[u(252,-139)]=11;let We={};We[V(-356,118)]=12;let Ge={};Ge[u(278,-139)]=12;let Ke={};Ke[V(-356,-721)]=12;let qe={};qe[u(-603,-139)]=12;let Ye={};Ye[u(200,199)]=M[u(149,199)];let H={};H[V(-89,-401)]=M,H[u(-446,-35)]=V(-73,32),H[V(-16,31)]=u(894,800);let Xe={};return Xe[V(-356,-440)]=13,(0,W[V(259,33)])(V(227,334),{className:u(21,358),children:[(0,W[u(125,476)])(V(227,391),{ref:d,tabIndex:0,role:u(347,-91),"aria-label":V(576,817)+h[u(401,169)][u(1103,745)]+V(163,168)+h[V(-328,142)][V(528,114)]+V(-386,9)+P[u(206,-128)]+`.`,onKeyDown:Oe,onPointerMove:e=>{let t=e[r(1455,1902)][i(1022,1296)](),n={};n.x=e[r(2080,1708)]-t[r(1047,1211)];function r(e,t){return u(e,t-1394)}function i(e,t){return u(e,t-983)}n.y=e[i(1872,1552)]-t[i(1259,894)],I[r(1632,1903)]=n},onPointerLeave:()=>I[u(776,509)]=null,onContextMenu:e=>e[V(543,772)](),className:u(588,159),children:[ze&&o?o:ze?(0,W[V(311,187)])(V(227,516),Ve):f&&(0,W[V(311,562)])(P[V(294,437)],{rawOptions:te,scene:e,topology:oe,schema:t,style:E,width:f[u(580,199)],height:f[V(-253,-709)],interactions:De,onHandle:fe,config:Se,inputScheme:l},P.id),(0,W[u(166,476)])(V(227,104),{className:V(295,737),children:[(0,W[V(311,605)])(Fn,{current:P,onChange:C,compact:(f?.[u(466,199)]??0)<420}),v&&(0,W[u(270,528)])(V(227,60),He),Ie&&(0,W[V(259,-27)])(u(110,444),{className:u(299,220),children:[h[V(-48,-501)][u(592,745)][V(386,699)](),u(172,-155),P[V(-345,-117)],V(-129,-166),B[V(329,176)][V(386,412)](),u(390,367)]}),b&&(0,W[u(960,476)])(u(828,444),{className:u(-290,-188),children:[b,(0,W[V(311,558)])(V(139,-27),{"aria-label":u(534,563),onClick:()=>e[V(-75,421)]()[u(263,258)](null),className:V(-84,-561),children:(0,W[u(42,528)])(re,Ue)})]})]}),_&&(0,W[u(703,476)])(u(-116,356),{onClick:()=>e[V(-75,-156)]()[u(246,-98)](),className:V(494,430),children:[u(-54,-81),Fe?u(419,166)+Fe[u(366,-128)][V(254,341)](0,18):``]}),(0,W[u(600,476)])(V(227,-149),{className:V(537,44),children:[(0,W[V(259,354)])(u(515,444),{className:u(716,641),children:[(0,W[V(259,27)])(u(356,444),{className:V(-50,92),children:[h[u(120,169)][u(363,745)][V(386,830)](),V(-142,-488),h[u(-509,-111)][u(328,745)][u(967,603)](),u(214,494),B[V(-300,-328)]&&ve[u(1027,690)]!==void 0?u(259,293)+ve[u(338,690)]:``,x>0?u(3,-108):``]}),(0,W[u(787,528)])(u(447,356),{onClick:pe,title:u(265,558),"aria-label":u(261,161),className:u(-554,-124),children:(0,W[V(311,87)])(ne,We)}),(0,W[V(311,609)])(u(526,356),{onClick:()=>A(!k),title:k?u(680,271):V(1,273),"aria-label":k?u(-4,64):u(847,642),"aria-pressed":k,className:V(-341,-720),children:k?(0,W[V(311,-159)])(N,Ge):(0,W[V(311,303)])(se,Ke)})]}),c&&!ze&&ue?.[V(-257,-70)]&&(f?.[V(-18,-102)]??0)>=420&&(0,W[u(259,528)])(Ci,{view:ue[u(145,-40)]},P.id),n&&g[u(-378,-139)]>0&&be===null&&(0,W[u(246,528)])(u(-6,356),{onClick:Ce,className:u(603,567),children:n[u(275,-128)](g[V(-356,-306)])}),n&&be!==null&&(0,W[u(968,476)])(u(865,444),{className:V(-297,-517),children:[(0,W[V(311,462)])(w,qe),n[V(171,-177)]?.(be)??u(642,570)+be+`)`]}),g[V(-356,96)]>0&&(0,W[V(259,430)])(u(907,444),{className:V(372,313),children:[g[V(-356,100)][V(386,-111)](),u(-75,353),Le?V(413,749):``]})]}),!ze&&(0,W[u(741,528)])(Vn,{types:Ae[u(696,788)],style:E,hasFlagged:Ae[V(590,881)],hasContext:Ae[V(491,739)],unreached:B[V(-300,132)]?ve[u(817,770)]??0:0,unplaced:B[V(-300,-108)]?0:ve[u(191,389)]??0}),!ze&&(f?.[u(-196,199)]??0)>520&&(0,W[u(357,528)])(u(673,444),{className:u(126,-165),children:Be[u(798,506)](V(-51,-415))}),L&&f&&!R&&(0,W[V(311,-121)])(Ln,{x:L.x,y:L.y,bounds:f,node:Ne,edge:Pe,schema:t}),R&&f&&(0,W[u(644,528)])(mt,{nodeId:R[V(32,163)],x:R.x,y:R.y,bounds:f,scene:e,topology:oe,schema:t,capabilities:B,selectionAction:n?{label:n[u(293,-128)],run:Ce}:void 0,onFit:pe,onClose:()=>_e(null)}),s]}),k&&(0,W[u(435,476)])(V(-155,163),{style:Ye,className:V(153,-223),"aria-label":u(-233,173),children:[(0,W[V(311,43)])(ut,H),(0,W[V(259,666)])(V(227,256),{className:V(-274,-142),children:[(0,W[V(311,368)])(Fn,{current:P,onChange:C}),(0,W[u(613,528)])(V(139,577),{onClick:()=>A(!1),"aria-label":V(573,1035),className:V(436,61),children:(0,W[V(311,-13)])(re,Xe)})]}),a,(0,W[u(340,528)])(P[V(-223,-35)],{rawOptions:te,rawDefaults:Se[V(148,222)][P.id],setRawOptions:e=>T(P.id,e),scene:e,schema:t},P.id),(0,W[V(311,808)])(Ii,{scheme:l,platform:me,camera:!!ue?.[u(292,-40)]}),(0,W[V(311,96)])(Et,{scene:e,schema:t}),(0,W[V(311,651)])(Ri,{})]})]})}function Ri(){let e=y(e=>e[r(1272,847)]),[t,n]=(0,U[a(2306,2167)])(!1);function r(e,t){return X(t- -1079,e)}(0,U[a(1366,1506)])(()=>{if(!t)return;let e=setTimeout(()=>n(!1),4e3);return()=>clearTimeout(e)},[t]);let i={};function a(e,t){return X(t-302,e)}return i[a(1578,1315)]=11,(0,W[a(2458,1982)])(r(268,517),{className:r(-122,146),children:(0,W[a(1440,1930)])(r(338,429),{type:r(304,429),onClick:()=>{if(!t)return n(!0);e(),n(!1)},onBlur:()=>n(!1),className:t?r(-95,301):r(997,699),children:[(0,W[a(2395,1982)])(D,i),t?a(1512,1762):r(7,62)]})})}var zi=n();const Bi={};Bi[X(1639,1215)]=0;const Vi={};Vi[Y(607,997)]=X(1441,1164);const Hi={};Hi[Y(1135,1229)]=.18;const Ui={};Ui[X(1537,1775)]=Y(823,720);const Wi={};Wi[X(1734,1294)]=`on`,Wi[Y(644,599)]=.25;const Gi={};Gi[Y(920,1358)]=`on`,Gi[Y(176,599)]=.1;const Ki={};Ki[0]=Wi,Ki[1]=Gi;const qi={};qi[Y(785,945)]=Bi,qi[Y(1134,665)]=Vi,qi[X(1100,780)]=Hi,qi[Y(884,781)]=Ui,qi[X(1069,956)]=Ki;const Ji={};Ji[Y(580,834)]=qi;const Yi={};Yi[Y(373,753)]=Y(1338,1211),Yi[X(1903,1711)]=Y(722,969),Yi[Y(883,1228)]=Y(1544,1348);const Xi={};Xi[Y(1130,753)]=X(1474,1163),Xi[X(1903,2148)]=X(1826,1994),Xi[Y(1573,1228)]=X(1322,845);const Zi={};Zi[Y(389,753)]=X(1265,1064),Zi[X(1903,1832)]=Y(790,915),Zi[Y(975,1228)]=Y(631,852);const Qi={};Qi[Y(1234,1426)]=Yi,Qi.tx=Xi,Qi[Y(1051,1289)]=Zi;var $i={storageKey:X(1473,1621),persist:!1,defaultRenderer:Y(1233,834),defaultRendererOptions:Ji,nodeStyles:Qi,formatValue:e=>(e/1e8)[Y(1587,1379)](void 0,{maximumFractionDigits:8})+Y(983,656)};const ea={};ea[X(1024,895)]=X(1332,1078),ea[Y(1076,980)]=X(1864,1860),ea[X(1290,1766)]=Y(398,886),ea[Y(1273,923)]=Y(1654,1488);const ta={};ta[Y(459,648)]=`Tx`,ta[Y(949,980)]=Y(857,1063),ta[Y(988,914)]=Y(2e3,1540),ta[Y(553,923)]=Y(1525,1063);const na={};na[Y(946,648)]=X(1538,1704),na[Y(1310,980)]=Y(1213,1159),na[X(1290,922)]=Y(1751,1540),na[X(1299,844)]=X(1921,2267);const ra={};ra[X(1665,1656)]=ea,ra.tx=ta,ra[Y(1163,1426)]=na;var ia=ra;const aa={};aa[X(1958,2021)]=async()=>({doc:null,hasMore:!1});const oa={};oa[X(1250,1591)]=aa,oa[Y(874,712)]=()=>!1;var sa=oa;function ca(e){function t(e,t){return Y(t,e- -840)}let n=new Map;for(let i of e){let e=n[r(948,1101)](i[t(273,-95)])??new Set;for(let n of Object[t(618,365)](i[t(-202,-253)]??{}))e[t(533,691)](n);n[r(830,604)](i[t(273,355)],e)}function r(e,t){return Y(e,t- -204)}return n}function la(e){let t={};t[n(156,287)]=n(956,994);function n(e,t){return X(e- -866,t)}t[n(228,691)]=r(1921,1422),t[r(1860,1726)]=r(1921,1468);function r(e,t){return X(e-57,t)}return{node_types:[...ca(e[n(455,483)])][n(256,534)](([e,t])=>{let r=ia[e]??{label:e,key:`id`,key_type:i(762,1141),caption:`id`};function i(e,t){return n(e- -288,t)}function a(e,t){return n(t-594,e)}return{type:e,...r,lookup:[r[i(202,80)]],properties:[...t][i(463,543)](e=>e!==r[a(1087,1084)])}}),relationship_types:[...ca(e[n(175,-241)])][r(1179,1359)](([e,t])=>({type:e,properties:[...t]})),semantics:t,identities:{},limits:{expand_per_direction:0,expand_max:0,query_default:0,query_max:0,lookup_max:0,pattern_max_hops:0,max_response_elements:e[n(455,556)][n(1031,928)]+e[r(1098,1339)][r(1954,2299)]},loaded_at:``}}function ua({doc:e,roots:t,schema:n}){let r=ot(sa,n);(0,U[a(1537,1268)])(()=>{function n(e,t){return a(t,e-37)}function i(e,t){return a(e,t- -795)}r[n(1395,1304)]()[i(114,354)]===0&&r[n(1395,1424)]()[n(1756,1568)](e,t)},[r,e,t]);let i={};function a(e,t){return X(t-64,e)}return i[a(2268,1935)]=r,i[a(1264,1239)]=n,(0,W[a(1750,1744)])(Li,i)}async function da(e,{dataUrl:t}){let n=await fetch(t);if(!n.ok)throw Error(t+u(2068,2165)+n[c(-397,-836)]);let r=await n[c(116,-81)](),i=s(r);if(!i)throw Error(t+u(2572,2080));let a=Array[u(1730,1818)](r[c(322,358)])?r[c(322,-137)]:[],o=e=>{function t(e,t){return u(t,e- -538)}!e[t(1145,1365)]&&e[t(1082,1581)]instanceof HTMLCanvasElement&&e[t(941,629)]()};function c(e,t){return Y(t,e- -1011)}let l={};l[u(2046,1705)]=!0;function u(e,t){return Y(e,t-604)}e[c(339,157)](c(-53,112),o,l);let d=(0,zi[c(55,-238)])(e);return d[u(969,1460)]((0,W[u(1589,1908)])(U[c(456,409)],{children:(0,W[u(1819,1908)])(v,{config:$i,children:(0,W[c(293,426)])(ua,{doc:i,roots:a,schema:la(i)})})})),()=>{function t(e,t){return u(t,e-234)}d[t(2331,2034)]();let n={};n[t(1939,2145)]=!0;function r(e,t){return u(e,t-53)}e[r(1647,1872)](r(1608,1615),o,n)}}export{da as mount}; \ No newline at end of file diff --git a/website/static/graph-viz/graph-viz-cNH1DNKR.css b/website/static/graph-viz/graph-viz-cNH1DNKR.css new file mode 100644 index 00000000..7cac7140 --- /dev/null +++ b/website/static/graph-viz/graph-viz-cNH1DNKR.css @@ -0,0 +1,2 @@ +/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */ +@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){.eba-graph *,.eba-graph :before,.eba-graph :after,.eba-graph ::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}.eba-graph{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-800:oklch(44.4% .177 26.899);--color-red-950:oklch(25.8% .092 26.042);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-950:oklch(27.9% .077 45.635);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-950:oklch(26.2% .051 172.552);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-700:oklch(50% .134 242.749);--color-sky-900:oklch(39.1% .09 240.876);--color-sky-950:oklch(29.3% .066 243.157);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-900:oklch(41% .159 10.272);--color-rose-950:oklch(27.1% .105 12.094);--color-neutral-100:oklch(97% 0 none);--color-neutral-200:oklch(92.2% 0 none);--color-neutral-300:oklch(87% 0 none);--color-neutral-400:oklch(70.8% 0 none);--color-neutral-500:oklch(55.6% 0 none);--color-neutral-600:oklch(43.9% 0 none);--color-neutral-700:oklch(37.1% 0 none);--color-neutral-800:oklch(26.9% 0 none);--color-neutral-900:oklch(20.5% 0 none);--color-neutral-950:oklch(14.5% 0 none);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--font-weight-normal:400;--font-weight-medium:500;--tracking-wide:.025em;--tracking-wider:.05em;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}.eba-graph *,.eba-graph :after,.eba-graph :before,.eba-graph ::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}.eba-graph ::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}.eba-graph{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}.eba-graph hr{height:0;color:inherit;border-top-width:1px}.eba-graph abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.eba-graph h1,.eba-graph h2,.eba-graph h3,.eba-graph h4,.eba-graph h5,.eba-graph h6{font-size:inherit;font-weight:inherit}.eba-graph a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}.eba-graph b,.eba-graph strong{font-weight:bolder}.eba-graph code,.eba-graph kbd,.eba-graph samp,.eba-graph pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}.eba-graph small{font-size:80%}.eba-graph sub,.eba-graph sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}.eba-graph sub{bottom:-.25em}.eba-graph sup{top:-.5em}.eba-graph table{text-indent:0;border-color:inherit;border-collapse:collapse}.eba-graph :-moz-focusring:where(:not(iframe)){outline:auto}.eba-graph progress{vertical-align:baseline}.eba-graph summary{display:list-item}.eba-graph ol,.eba-graph ul,.eba-graph menu{list-style:none}.eba-graph img,.eba-graph svg,.eba-graph video,.eba-graph canvas,.eba-graph audio,.eba-graph iframe,.eba-graph embed,.eba-graph object{vertical-align:middle;display:block}.eba-graph img,.eba-graph video{max-width:100%;height:auto}.eba-graph button,.eba-graph input,.eba-graph select,.eba-graph optgroup,.eba-graph textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.eba-graph ::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.eba-graph :where(select:is([multiple],[size])) optgroup{font-weight:bolder}.eba-graph :where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}.eba-graph ::file-selector-button{margin-inline-end:4px}.eba-graph ::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){.eba-graph ::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){.eba-graph ::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}.eba-graph textarea{resize:vertical}.eba-graph ::-webkit-search-decoration{-webkit-appearance:none}.eba-graph ::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}.eba-graph ::-webkit-datetime-edit{display:inline-flex}.eba-graph ::-webkit-datetime-edit-fields-wrapper{padding:0}.eba-graph ::-webkit-datetime-edit{padding-block:0}.eba-graph ::-webkit-datetime-edit-year-field{padding-block:0}.eba-graph ::-webkit-datetime-edit-month-field{padding-block:0}.eba-graph ::-webkit-datetime-edit-day-field{padding-block:0}.eba-graph ::-webkit-datetime-edit-hour-field{padding-block:0}.eba-graph ::-webkit-datetime-edit-minute-field{padding-block:0}.eba-graph ::-webkit-datetime-edit-second-field{padding-block:0}.eba-graph ::-webkit-datetime-edit-millisecond-field{padding-block:0}.eba-graph ::-webkit-datetime-edit-meridiem-field{padding-block:0}.eba-graph ::-webkit-calendar-picker-indicator{line-height:1}.eba-graph :-moz-ui-invalid{box-shadow:none}.eba-graph button,.eba-graph input:where([type=button],[type=reset],[type=submit]){appearance:button}.eba-graph ::file-selector-button{appearance:button}.eba-graph ::-webkit-inner-spin-button{height:auto}.eba-graph ::-webkit-outer-spin-button{height:auto}.eba-graph [hidden]:where(:not([hidden=until-found])){display:none!important}.eba-graph .pointer-events-auto{pointer-events:auto}.eba-graph .pointer-events-none{pointer-events:none}.eba-graph .invisible{visibility:hidden}.eba-graph .visible{visibility:visible}.eba-graph .absolute{position:absolute}.eba-graph .fixed{position:fixed}.eba-graph .relative{position:relative}.eba-graph .static{position:static}.eba-graph .inset-y-0{inset-block:0}.eba-graph .top-0{top:0}.eba-graph .top-0\.5{top:calc(var(--spacing) * .5)}.eba-graph .top-1\/2{top:50%}.eba-graph .top-2{top:calc(var(--spacing) * 2)}.eba-graph .top-full{top:100%}.eba-graph .right-0{right:0}.eba-graph .right-2{right:calc(var(--spacing) * 2)}.eba-graph .right-full{right:100%}.eba-graph .bottom-2{bottom:calc(var(--spacing) * 2)}.eba-graph .bottom-10{bottom:calc(var(--spacing) * 10)}.eba-graph .left-0{left:0}.eba-graph .left-0\.5{left:calc(var(--spacing) * .5)}.eba-graph .left-1\/2{left:50%}.eba-graph .left-2{left:calc(var(--spacing) * 2)}.eba-graph .left-3\.5{left:calc(var(--spacing) * 3.5)}.eba-graph .left-full{left:100%}.eba-graph .z-10{z-index:10}.eba-graph .z-20{z-index:20}.eba-graph .z-30{z-index:30}.eba-graph .z-40{z-index:40}.eba-graph .container{width:100%}@media (min-width:40rem){.eba-graph .container{max-width:40rem}}@media (min-width:48rem){.eba-graph .container{max-width:48rem}}@media (min-width:64rem){.eba-graph .container{max-width:64rem}}@media (min-width:80rem){.eba-graph .container{max-width:80rem}}@media (min-width:96rem){.eba-graph .container{max-width:96rem}}.eba-graph .mt-0\.5{margin-top:calc(var(--spacing) * .5)}.eba-graph .mt-1{margin-top:var(--spacing)}.eba-graph .mt-auto{margin-top:auto}.eba-graph .mr-1{margin-right:var(--spacing)}.eba-graph .mb-2{margin-bottom:calc(var(--spacing) * 2)}.eba-graph .ml-1{margin-left:var(--spacing)}.eba-graph .block{display:block}.eba-graph .contents{display:contents}.eba-graph .flex{display:flex}.eba-graph .grid{display:grid}.eba-graph .hidden{display:none}.eba-graph .inline{display:inline}.eba-graph .inline-block{display:inline-block}.eba-graph .h-0\.5{height:calc(var(--spacing) * .5)}.eba-graph .h-1{height:var(--spacing)}.eba-graph .h-2{height:calc(var(--spacing) * 2)}.eba-graph .h-3{height:calc(var(--spacing) * 3)}.eba-graph .h-3\.5{height:calc(var(--spacing) * 3.5)}.eba-graph .h-4{height:calc(var(--spacing) * 4)}.eba-graph .h-5{height:calc(var(--spacing) * 5)}.eba-graph .h-full{height:100%}.eba-graph .max-h-40{max-height:calc(var(--spacing) * 40)}.eba-graph .w-2{width:calc(var(--spacing) * 2)}.eba-graph .w-2\.5{width:calc(var(--spacing) * 2.5)}.eba-graph .w-3{width:calc(var(--spacing) * 3)}.eba-graph .w-3\.5{width:calc(var(--spacing) * 3.5)}.eba-graph .w-7{width:calc(var(--spacing) * 7)}.eba-graph .w-8{width:calc(var(--spacing) * 8)}.eba-graph .w-10{width:calc(var(--spacing) * 10)}.eba-graph .w-16{width:calc(var(--spacing) * 16)}.eba-graph .w-24{width:calc(var(--spacing) * 24)}.eba-graph .w-48{width:calc(var(--spacing) * 48)}.eba-graph .w-64{width:calc(var(--spacing) * 64)}.eba-graph .w-full{width:100%}.eba-graph .w-px{width:1px}.eba-graph .max-w-28{max-width:calc(var(--spacing) * 28)}.eba-graph .max-w-40{max-width:calc(var(--spacing) * 40)}.eba-graph .max-w-\[60\%\]{max-width:60%}.eba-graph .min-w-0{min-width:0}.eba-graph .flex-1{flex:1}.eba-graph .shrink-0{flex-shrink:0}.eba-graph .grow{flex-grow:1}.eba-graph .-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.eba-graph .-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.eba-graph .rotate-45{rotate:45deg}.eba-graph .rotate-180{rotate:180deg}.eba-graph .transform{transform:var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, )}.eba-graph .animate-spin{animation:var(--animate-spin)}.eba-graph .cursor-col-resize{cursor:col-resize}.eba-graph .cursor-default{cursor:default}.eba-graph .cursor-pointer{cursor:pointer}.eba-graph .touch-none{touch-action:none}.eba-graph .resize{resize:both}.eba-graph .grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.eba-graph .grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.eba-graph .flex-col{flex-direction:column}.eba-graph .items-center{align-items:center}.eba-graph .items-end{align-items:flex-end}.eba-graph .items-start{align-items:flex-start}.eba-graph .items-stretch{align-items:stretch}.eba-graph .justify-between{justify-content:space-between}.eba-graph .justify-center{justify-content:center}.eba-graph .justify-end{justify-content:flex-end}.eba-graph .gap-0\.5{gap:calc(var(--spacing) * .5)}.eba-graph .gap-1{gap:var(--spacing)}.eba-graph .gap-1\.5{gap:calc(var(--spacing) * 1.5)}.eba-graph .gap-2{gap:calc(var(--spacing) * 2)}.eba-graph .gap-2\.5{gap:calc(var(--spacing) * 2.5)}.eba-graph :where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}.eba-graph .gap-x-3{column-gap:calc(var(--spacing) * 3)}.eba-graph .gap-y-1{row-gap:var(--spacing)}.eba-graph .truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.eba-graph .overflow-hidden{overflow:hidden}.eba-graph .overflow-y-auto{overflow-y:auto}.eba-graph .rounded{border-radius:.25rem}.eba-graph .rounded-full{border-radius:3.40282e38px}.eba-graph .rounded-lg{border-radius:var(--radius-lg)}.eba-graph .rounded-md{border-radius:var(--radius-md)}.eba-graph .rounded-sm{border-radius:var(--radius-sm)}.eba-graph .border{border-style:var(--tw-border-style);border-width:1px}.eba-graph .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.eba-graph .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.eba-graph .border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.eba-graph .border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.eba-graph .border-amber-800{border-color:var(--color-amber-800)}.eba-graph .border-emerald-800{border-color:var(--color-emerald-800)}.eba-graph .border-neutral-300{border-color:var(--color-neutral-300)}.eba-graph .border-neutral-500{border-color:var(--color-neutral-500)}.eba-graph .border-neutral-700{border-color:var(--color-neutral-700)}.eba-graph .border-neutral-800{border-color:var(--color-neutral-800)}.eba-graph .border-red-800{border-color:var(--color-red-800)}.eba-graph .border-rose-700{border-color:var(--color-rose-700)}.eba-graph .border-sky-700{border-color:var(--color-sky-700)}.eba-graph .border-l-sky-500{border-left-color:var(--color-sky-500)}.eba-graph .bg-\[\#050505\]{background-color:#050505}.eba-graph .bg-amber-950\/80{background-color:#461901cc}@supports (color:color-mix(in lab, red, red)){.eba-graph .bg-amber-950\/80{background-color:color-mix(in oklab, var(--color-amber-950) 80%, transparent)}}.eba-graph .bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab, red, red)){.eba-graph .bg-black\/70{background-color:color-mix(in oklab, var(--color-black) 70%, transparent)}}.eba-graph .bg-emerald-950{background-color:var(--color-emerald-950)}.eba-graph .bg-emerald-950\/80{background-color:#002c22cc}@supports (color:color-mix(in lab, red, red)){.eba-graph .bg-emerald-950\/80{background-color:color-mix(in oklab, var(--color-emerald-950) 80%, transparent)}}.eba-graph .bg-neutral-200{background-color:var(--color-neutral-200)}.eba-graph .bg-neutral-700{background-color:var(--color-neutral-700)}.eba-graph .bg-neutral-800{background-color:var(--color-neutral-800)}.eba-graph .bg-neutral-900{background-color:var(--color-neutral-900)}.eba-graph .bg-neutral-900\/90{background-color:#171717e6}@supports (color:color-mix(in lab, red, red)){.eba-graph .bg-neutral-900\/90{background-color:color-mix(in oklab, var(--color-neutral-900) 90%, transparent)}}.eba-graph .bg-neutral-950{background-color:var(--color-neutral-950)}.eba-graph .bg-neutral-950\/95{background-color:#0a0a0af2}@supports (color:color-mix(in lab, red, red)){.eba-graph .bg-neutral-950\/95{background-color:color-mix(in oklab, var(--color-neutral-950) 95%, transparent)}}.eba-graph .bg-red-950\/80{background-color:#460809cc}@supports (color:color-mix(in lab, red, red)){.eba-graph .bg-red-950\/80{background-color:color-mix(in oklab, var(--color-red-950) 80%, transparent)}}.eba-graph .bg-rose-950\/60{background-color:#4d021899}@supports (color:color-mix(in lab, red, red)){.eba-graph .bg-rose-950\/60{background-color:color-mix(in oklab, var(--color-rose-950) 60%, transparent)}}.eba-graph .bg-sky-500{background-color:var(--color-sky-500)}.eba-graph .bg-sky-950\/90{background-color:#052f4ae6}@supports (color:color-mix(in lab, red, red)){.eba-graph .bg-sky-950\/90{background-color:color-mix(in oklab, var(--color-sky-950) 90%, transparent)}}.eba-graph .bg-transparent{background-color:#0000}.eba-graph .bg-white{background-color:var(--color-white)}.eba-graph .p-0\.5{padding:calc(var(--spacing) * .5)}.eba-graph .p-1{padding:var(--spacing)}.eba-graph .p-1\.5{padding:calc(var(--spacing) * 1.5)}.eba-graph .p-2{padding:calc(var(--spacing) * 2)}.eba-graph .p-3{padding:calc(var(--spacing) * 3)}.eba-graph .px-1{padding-inline:var(--spacing)}.eba-graph .px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.eba-graph .px-2{padding-inline:calc(var(--spacing) * 2)}.eba-graph .px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.eba-graph .px-3{padding-inline:calc(var(--spacing) * 3)}.eba-graph .py-0\.5{padding-block:calc(var(--spacing) * .5)}.eba-graph .py-1{padding-block:var(--spacing)}.eba-graph .py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.eba-graph .py-2{padding-block:calc(var(--spacing) * 2)}.eba-graph .pt-0\.5{padding-top:calc(var(--spacing) * .5)}.eba-graph .pt-1{padding-top:var(--spacing)}.eba-graph .pt-2{padding-top:calc(var(--spacing) * 2)}.eba-graph .pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.eba-graph .pb-3{padding-bottom:calc(var(--spacing) * 3)}.eba-graph .text-center{text-align:center}.eba-graph .text-left{text-align:left}.eba-graph .text-right{text-align:right}.eba-graph .font-mono{font-family:var(--font-mono)}.eba-graph .text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.eba-graph .text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.eba-graph .text-\[9px\]{font-size:9px}.eba-graph .text-\[10px\]{font-size:10px}.eba-graph .text-\[11px\]{font-size:11px}.eba-graph .leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.eba-graph .leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.eba-graph .font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.eba-graph .font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.eba-graph .tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.eba-graph .tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.eba-graph .break-all{word-break:break-all}.eba-graph .whitespace-nowrap{white-space:nowrap}.eba-graph .text-amber-300{color:var(--color-amber-300)}.eba-graph .text-amber-400{color:var(--color-amber-400)}.eba-graph .text-amber-400\/80{color:#fcbb00cc}@supports (color:color-mix(in lab, red, red)){.eba-graph .text-amber-400\/80{color:color-mix(in oklab, var(--color-amber-400) 80%, transparent)}}.eba-graph .text-emerald-300{color:var(--color-emerald-300)}.eba-graph .text-neutral-100{color:var(--color-neutral-100)}.eba-graph .text-neutral-200{color:var(--color-neutral-200)}.eba-graph .text-neutral-300{color:var(--color-neutral-300)}.eba-graph .text-neutral-400{color:var(--color-neutral-400)}.eba-graph .text-neutral-500{color:var(--color-neutral-500)}.eba-graph .text-neutral-600{color:var(--color-neutral-600)}.eba-graph .text-red-300{color:var(--color-red-300)}.eba-graph .text-red-400{color:var(--color-red-400)}.eba-graph .text-rose-200{color:var(--color-rose-200)}.eba-graph .text-sky-200{color:var(--color-sky-200)}.eba-graph .text-sky-300{color:var(--color-sky-300)}.eba-graph .uppercase{text-transform:uppercase}.eba-graph .accent-sky-500{accent-color:var(--color-sky-500)}.eba-graph .opacity-60{opacity:.6}.eba-graph .opacity-70{opacity:.7}.eba-graph .shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.eba-graph .shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.eba-graph .shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.eba-graph .ring,.eba-graph .ring-1{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.eba-graph .shadow-black\/40{--tw-shadow-color:#0006}@supports (color:color-mix(in lab, red, red)){.eba-graph .shadow-black\/40{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 40%, transparent) var(--tw-shadow-alpha), transparent)}}.eba-graph .ring-sky-500{--tw-ring-color:var(--color-sky-500)}.eba-graph .invert{--tw-invert:invert(100%);filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}.eba-graph .filter{filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}.eba-graph .transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.eba-graph .transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.eba-graph .transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.eba-graph .transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.eba-graph .outline-none{--tw-outline-style:none;outline-style:none}.eba-graph .select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.eba-graph .group-hover\:bg-neutral-600:is(:where(.group):hover *){background-color:var(--color-neutral-600)}}.eba-graph .group-focus-visible\:bg-neutral-400:is(:where(.group):focus-visible *){background-color:var(--color-neutral-400)}.eba-graph .placeholder\:text-neutral-600::placeholder{color:var(--color-neutral-600)}.eba-graph .first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.eba-graph .first\:pt-0:first-child{padding-top:0}.eba-graph .focus-within\:border-neutral-500:focus-within{border-color:var(--color-neutral-500)}.eba-graph .focus-within\:opacity-100:focus-within{opacity:1}@media (hover:hover){.eba-graph .hover\:bg-neutral-800:hover{background-color:var(--color-neutral-800)}.eba-graph .hover\:bg-rose-900\/60:hover{background-color:#8b083699}@supports (color:color-mix(in lab, red, red)){.eba-graph .hover\:bg-rose-900\/60:hover{background-color:color-mix(in oklab, var(--color-rose-900) 60%, transparent)}}.eba-graph .hover\:bg-sky-900:hover{background-color:var(--color-sky-900)}.eba-graph .hover\:text-neutral-100:hover{color:var(--color-neutral-100)}.eba-graph .hover\:text-neutral-200:hover{color:var(--color-neutral-200)}.eba-graph .hover\:text-red-100:hover{color:var(--color-red-100)}.eba-graph .hover\:opacity-100:hover{opacity:1}}.eba-graph .focus\:border-neutral-500:focus{border-color:var(--color-neutral-500)}.eba-graph .focus\:bg-neutral-800:focus{background-color:var(--color-neutral-800)}.eba-graph .focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.eba-graph .focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.eba-graph .focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.eba-graph .focus-visible\:ring-neutral-700:focus-visible{--tw-ring-color:var(--color-neutral-700)}.eba-graph .focus-visible\:ring-sky-500:focus-visible{--tw-ring-color:var(--color-sky-500)}.eba-graph .focus-visible\:ring-inset:focus-visible{--tw-ring-inset:inset}.eba-graph .disabled\:cursor-default:disabled{cursor:default}.eba-graph .disabled\:opacity-40:disabled{opacity:.4}@media (hover:hover){.eba-graph .disabled\:hover\:bg-transparent:disabled:hover{background-color:#0000}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}} \ No newline at end of file