@mapvx/web-components-ssr 1.6.1 → 1.7.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ import{i as u,n as s,t as r}from"./main.js";import"./chunk-CzASft0S.js";import"./chunk-BK2bFfek.js";import{B as pr,F as ne,G as st,_ as R,h as Ps,n as A$1,q as yp,y as Wm}from"./chunk-ConEJto8.js";var b=class{constructor(e){R(e.id,`id is required`),this.id=e.id,this.type=`custom`,this.renderingMode=e.renderingMode||`3d`,this.slot=e.slot,this.beforeId=e.beforeId,this.map=null}onAdd(e,r){this.map=e}render(e,r){this.map&&G(this.map.__deck,this.map,this,r)}};var M=`__UNDEFINED__`;function f(t){return t.props.beforeId?`deck-layer-group-before:${t.props.beforeId}`:t.props.slot?`deck-layer-group-slot:${t.props.slot}`:`deck-layer-group-last`}function A(t,e,r){if(!t||!t.style||!t.style._loaded)return;let i=ne(r,Boolean);if(e!==r){let a=ne(e,Boolean),n=new Set(a.map(l=>f(l))),c=new Set(i.map(l=>f(l)));for(let l of n)c.has(l)||t.getLayer(l)&&t.removeLayer(l)}let o={};for(let a of i){let n=f(a),c=t.getLayer(n);if(c)o[n]=c.implementation||c;else{let l=new b({id:n,slot:a.props.slot,beforeId:a.props.beforeId});o[n]=l,t.addLayer(l,a.props.beforeId)}}let s=t.style._order;for(let[a,n]of Object.entries(o)){let c=n.beforeId||M,l=c===M?s.length:s.indexOf(c);if(l===-1)continue;if(s.indexOf(a)!==l-1){let w=c===M?void 0:c;t.moveLayer(a,w)}}}var h=`mapbox`;var k=512;var T=Math.PI/180;function Z({map:t,deck:e}){if(t.__deck)return t.__deck;let r$1=e.props._customRender,i=e.props.onLoad,o=s(r({},e.props),{_customRender:()=>{t.triggerRepaint(),r$1?.(``)}});return o.views||(o.views=g(t)),Object.assign(o,{width:null,height:null,touchAction:`unset`,viewState:_(t)}),e.isInitialized?F(e,t):o.onLoad=()=>{i?.(),F(e,t)},e.setProps(o),t.__deck=e,t.on(`render`,()=>{e.isInitialized&&q(e,t)}),e}function F(t,e){let r=()=>{t.isInitialized?U(t,e):e.off(`move`,r)};e.on(`move`,r)}function B(t){t.__deck?.finalize(),t.__deck=null}function m(t,e){return e?{depthWriteEnabled:!0,depthCompare:`less-equal`,depthBias:0,blend:!0,blendColorSrcFactor:`src-alpha`,blendColorDstFactor:`one-minus-src-alpha`,blendAlphaSrcFactor:`one`,blendAlphaDstFactor:`one-minus-src-alpha`,blendColorOperation:`add`,blendAlphaOperation:`add`}:{}}function G(t,e,r,i){if(!t.isInitialized)return;let{currentViewport:o}=t.userData,s=!1;o||(o=X(t,e,i),t.userData.currentViewport=o,s=!0),o&&t._drawLayers(`mapbox-repaint`,{viewports:[o],layerFilter:a=>{if(t.props.layerFilter&&!t.props.layerFilter(a))return!1;let n=a.layer;return n.props.beforeId===r.beforeId&&n.props.slot===r.slot},clearStack:s,clearCanvas:!1})}function C(t){let e=t.getProjection?.(),r=e?.type||e?.name;if(r===`globe`)return`globe`;if(r&&r!==`mercator`)throw new Error(`Unsupported projection`);return`mercator`}function g(t){return C(t)===`globe`?new Wm({id:h}):new Ps({id:h})}function _(t){let{lng:e,lat:r}=t.getCenter(),i={longitude:(e+540)%360-180,latitude:r,zoom:t.getZoom(),bearing:t.getBearing(),pitch:t.getPitch(),padding:t.getPadding(),repeat:t.getRenderWorldCopies()};return t.getTerrain?.()&&$(t,i),i}function $(t,e){if(t.getFreeCameraOptions){let{position:r}=t.getFreeCameraOptions();if(!r||r.z===void 0)return;let i=t.transform.height,{longitude:o,latitude:s,pitch:a}=e,n=r.x*k,c=(1-r.y)*k,l=r.z*k,I=st([o,s]),w=n-I[0],D=c-I[1],N=Math.sqrt(w*w+D*D),y=a*T,x=1.5*i,L=y<.001?x*Math.cos(y)/l:x*Math.sin(y)/N;e.zoom=Math.log2(L);e.position=[0,0,(l-x*Math.cos(y)/L)/pr(s)]}else typeof t.transform.elevation==`number`&&(e.position=[0,0,t.transform.elevation])}function X(t,e,r){let i=_(e),o=t.getView(h)||g(e);r&&(o.props.nearZMultiplier=.2);let s=r?.nearZ??e.transform._nearZ,a=r?.farZ??e.transform._farZ;return Number.isFinite(s)&&(i.nearZ=s/e.transform.height,i.farZ=a/e.transform.height),o.makeViewport({width:t.width,height:t.height,viewState:i})}function q(t,e){let i=ne(t.props.layers,Boolean).some(n=>n&&!e.getLayer(f(n))),o=t.getViewports(),s=o.findIndex(n=>n.id===h),a=o.length>1||s<0;if(i||a){if(s>=0){o=o.slice();let n=X(t,e);n?o[s]=n:o.splice(s,1)}t._drawLayers(`mapbox-repaint`,{viewports:o,layerFilter:n=>(!t.props.layerFilter||t.props.layerFilter(n))&&(n.viewport.id!==h||!e.getLayer(f(n.layer))),clearCanvas:!1})}else{let n=t.device,c=n?.gl;t.props.onBeforeRender?.({device:n,gl:c}),t.props.onAfterRender?.({device:n,gl:c})}t.userData.currentViewport=null}function U(t,e){t.setProps({viewState:_(e)}),t.needsRedraw({clearRedrawFlags:!0})}var P=class{constructor(e){this._handleStyleChange=()=>{if(this._resolveLayers(this._map,this._deck,this._props.layers,this._props.layers),!this._map)return;C(this._map)&&this._deck?.setProps({views:this._getViews(this._map)})},this._updateContainerSize=()=>{if(this._map&&this._container){let{clientWidth:i,clientHeight:o}=this._map.getContainer();Object.assign(this._container.style,{width:`${i}px`,height:`${o}px`})}},this._updateViewState=()=>{let i=this._deck,o=this._map;i&&o&&(i.setProps({views:this._getViews(o),viewState:_(o)}),i.isInitialized&&i.redraw())},this._handleMouseEvent=i=>{let o=this._deck;if(!o||!o.isInitialized)return;let s$1={type:i.type,offsetCenter:i.point,srcEvent:i},a=this._lastMouseDownPoint;switch(!i.point&&a&&(s$1.deltaX=i.originalEvent.clientX-a.clientX,s$1.deltaY=i.originalEvent.clientY-a.clientY,s$1.offsetCenter={x:a.x+s$1.deltaX,y:a.y+s$1.deltaY}),s$1.type){case`mousedown`:o._onPointerDown(s$1),this._lastMouseDownPoint=s(r({},i.point),{clientX:i.originalEvent.clientX,clientY:i.originalEvent.clientY});break;case`dragstart`:s$1.type=`panstart`,o._onEvent(s$1);break;case`drag`:s$1.type=`panmove`,o._onEvent(s$1);break;case`dragend`:s$1.type=`panend`,o._onEvent(s$1);break;case`click`:s$1.tapCount=1,o._onEvent(s$1);break;case`dblclick`:s$1.type=`click`,s$1.tapCount=2,o._onEvent(s$1);break;case`mousemove`:s$1.type=`pointermove`,o._onPointerMove(s$1);break;case`mouseout`:s$1.type=`pointerleave`,o._onPointerMove(s$1);break;default:return}};let{interleaved:r$2=!1}=e;this._interleaved=r$2,this._props=this.filterProps(e)}filterProps(e){let s=e,{interleaved:r,useDevicePixels:i}=s,o=u(s,[`interleaved`,`useDevicePixels`]);return!this._interleaved&&i!==void 0&&(o.useDevicePixels=i),o}setProps(e){this._interleaved&&e.layers&&this._resolveLayers(this._map,this._deck,this._props.layers,e.layers),Object.assign(this._props,this.filterProps(e)),this._deck&&this._map&&this._deck.setProps(s(r({},this._props),{views:this._getViews(this._map),parameters:r(r({},m(this._map,this._interleaved)),this._props.parameters)}))}onAdd(e){return this._map=e,this._interleaved?this._onAddInterleaved(e):this._onAddOverlaid(e)}_onAddOverlaid(e){let r$3=document.createElement(`div`);return Object.assign(r$3.style,{position:`absolute`,left:0,top:0,textAlign:`initial`,pointerEvents:`none`}),this._container=r$3,this._deck=new yp(s(r({},this._props),{parent:r$3,deviceProps:s(r({},this._props.deviceProps),{createCanvasContext:s(r({},typeof this._props.deviceProps?.createCanvasContext==`object`?this._props.deviceProps.createCanvasContext:void 0),{pixelSizeSource:`css-dpr`})}),parameters:r(r({},m(e,!1)),this._props.parameters),views:this._getViews(e),viewState:_(e)})),e.on(`resize`,this._updateContainerSize),e.on(`render`,this._updateViewState),e.on(`mousedown`,this._handleMouseEvent),e.on(`dragstart`,this._handleMouseEvent),e.on(`drag`,this._handleMouseEvent),e.on(`dragend`,this._handleMouseEvent),e.on(`mousemove`,this._handleMouseEvent),e.on(`mouseout`,this._handleMouseEvent),e.on(`click`,this._handleMouseEvent),e.on(`dblclick`,this._handleMouseEvent),this._updateContainerSize(),r$3}_onAddInterleaved(e){let r$4=e.painter.context.gl;return r$4 instanceof WebGLRenderingContext&&A$1.warn(`Incompatible basemap library. See: https://deck.gl/docs/api-reference/mapbox/overview#compatibility`)(),this._deck=Z({map:e,deck:new yp(s(r({},this._props),{views:this._getViews(e),gl:r$4,parameters:r(r({},m(e,!0)),this._props.parameters)}))}),e.on(`styledata`,this._handleStyleChange),this._resolveLayers(e,this._deck,[],this._props.layers),document.createElement(`div`)}_resolveLayers(e,r,i,o){A(e,i,o)}onRemove(){let e=this._map;e&&(this._interleaved?this._onRemoveInterleaved(e):this._onRemoveOverlaid(e)),this._deck=void 0,this._map=void 0,this._container=void 0}_onRemoveOverlaid(e){e.off(`resize`,this._updateContainerSize),e.off(`render`,this._updateViewState),e.off(`mousedown`,this._handleMouseEvent),e.off(`dragstart`,this._handleMouseEvent),e.off(`drag`,this._handleMouseEvent),e.off(`dragend`,this._handleMouseEvent),e.off(`mousemove`,this._handleMouseEvent),e.off(`mouseout`,this._handleMouseEvent),e.off(`click`,this._handleMouseEvent),e.off(`dblclick`,this._handleMouseEvent),this._deck?.finalize()}_onRemoveInterleaved(e){e.off(`styledata`,this._handleStyleChange),this._resolveLayers(e,this._deck,this._props.layers,[]),B(e)}getDefaultPosition(){return`top-left`}pickObject(e){return R(this._deck),this._deck.pickObject(e)}pickMultipleObjects(e){return R(this._deck),this._deck.pickMultipleObjects(e)}pickObjects(e){return R(this._deck),this._deck.pickObjects(e)}finalize(){this._map&&this._map.removeControl(this)}getCanvas(){return this._map?this._interleaved?this._map.getCanvas():this._deck.getCanvas():null}_getViews(e){if(!this._props.views)return g(e);let r=Array.isArray(this._props.views)?this._props.views:[this._props.views];return r.some(o=>o.id===h)?this._props.views:[g(e),...r]}};export{P as MapboxOverlay};
2
+ //# debugId=bf77b44a-9877-5007-9077-3a5c422f135f
@@ -0,0 +1,13 @@
1
+ import{i as u,n as s,t as r}from"./main.js";var H=globalThis;globalThis.document;var K=globalThis.process||{};globalThis.console;var ht=globalThis.navigator||{};function Z(r){if(typeof window<`u`&&window.process?.type===`renderer`||typeof process<`u`&&process.versions?.electron)return!0;let e=typeof navigator<`u`&&navigator.userAgent,t=r||e;return!!(t&&t.indexOf(`Electron`)>=0)}function y(){return!(typeof process==`object`&&String(process)===`[object process]`&&!process?.browser)||Z()}function ir(r){return!r&&!y()?`Node`:Z(r)?`Electron`:(r||ht.userAgent||``).indexOf(`Edge`)>-1?`Edge`:globalThis.chrome?`Chrome`:globalThis.safari?`Safari`:globalThis.mozInnerScreenX?`Firefox`:`Unknown`}var Ee=`4.1.2`;function M(r,e){if(!r)throw new Error(e||`Assertion failed`)}function _e(r){if(!r)return 0;let e;switch(typeof r){case`number`:e=r;break;case`object`:e=r.logLevel||r.priority||0;break;default:return 0}return M(Number.isFinite(e)&&e>=0),e}function mt(r){let{logLevel:e,message:t}=r;r.logLevel=_e(e);let i=r.args?Array.from(r.args):[];for(;i.length&&i.shift()!==t;);switch(typeof e){case`string`:case`function`:t!==void 0&&i.unshift(t),r.message=e;break;case`object`:Object.assign(r,e);break;default:}typeof r.message==`function`&&(r.message=r.message());let s=typeof r.message;return M(s===`string`||s===`object`),Object.assign(r,{args:i},r.opts)}var U=()=>{};var ee=class{constructor({level:e=0}={}){this.userData={},this._onceCache=new Set,this._level=e}set level(e){this.setLevel(e)}get level(){return this.getLevel()}setLevel(e){return this._level=e,this}getLevel(){return this._level}warn(e,...t){return this._log(`warn`,0,e,t,{once:!0})}error(e,...t){return this._log(`error`,0,e,t)}log(e,t,...i){return this._log(`log`,e,t,i)}info(e,t,...i){return this._log(`info`,e,t,i)}once(e,t,...i){return this._log(`once`,e,t,i,{once:!0})}_log(e,t,i,s,n={}){let o=mt({logLevel:t,message:i,args:this._buildArgs(t,i,s),opts:n});return this._createLogFunction(e,o,n)}_buildArgs(e,t,i){return[e,t,...i]}_createLogFunction(e,t,i){if(!this._shouldLog(t.logLevel))return U;let s=this._getOnceTag(i.tag??t.tag??t.message);if((i.once||t.once)&&s!==void 0){if(this._onceCache.has(s))return U;this._onceCache.add(s)}return this._emit(e,t)}_shouldLog(e){return this.getLevel()>=_e(e)}_getOnceTag(e){if(e!==void 0)try{return typeof e==`string`?e:String(e)}catch{return}}};function nr(r){try{let e=window[r],t=`__storage_test__`;return e.setItem(t,t),e.removeItem(t),e}catch{return null}}var te=class{constructor(e,t,i=`sessionStorage`){this.storage=nr(i),this.id=e,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){let t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let e={};if(this.storage){let t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}};function pt(r){let e;return r<10?e=`${r.toFixed(2)}ms`:r<100?e=`${r.toFixed(1)}ms`:r<1e3?e=`${r.toFixed(0)}ms`:e=`${(r/1e3).toFixed(2)}s`,e}function gt(r,e=8){let t=Math.max(e-r.length,0);return`${` `.repeat(t)}${r}`}var xe=(function(r){return r[r.BLACK=30]=`BLACK`,r[r.RED=31]=`RED`,r[r.GREEN=32]=`GREEN`,r[r.YELLOW=33]=`YELLOW`,r[r.BLUE=34]=`BLUE`,r[r.MAGENTA=35]=`MAGENTA`,r[r.CYAN=36]=`CYAN`,r[r.WHITE=37]=`WHITE`,r[r.BRIGHT_BLACK=90]=`BRIGHT_BLACK`,r[r.BRIGHT_RED=91]=`BRIGHT_RED`,r[r.BRIGHT_GREEN=92]=`BRIGHT_GREEN`,r[r.BRIGHT_YELLOW=93]=`BRIGHT_YELLOW`,r[r.BRIGHT_BLUE=94]=`BRIGHT_BLUE`,r[r.BRIGHT_MAGENTA=95]=`BRIGHT_MAGENTA`,r[r.BRIGHT_CYAN=96]=`BRIGHT_CYAN`,r[r.BRIGHT_WHITE=97]=`BRIGHT_WHITE`,r})(xe||{});var or=10;function bt(r){return typeof r!=`string`?r:(r=r.toUpperCase(),xe[r]||xe.WHITE)}function yt(r,e,t){return!y&&typeof r==`string`&&(e&&(r=`\x1B[${bt(e)}m${r}\x1B[39m`),t&&(r=`\x1B[${bt(t)+or}m${r}\x1B[49m`)),r}function Et(r,e=[`constructor`]){let t=Object.getPrototypeOf(r),i=Object.getOwnPropertyNames(t),s=r;for(let n of i){let o=s[n];typeof o==`function`&&(e.find(a=>n===a)||(s[n]=o.bind(r)))}}var re=class{getHighResolutionTimer(){let e;if(y()&&H.performance)e=H?.performance?.now?.();else if(`hrtime`in K){let t=K?.hrtime?.();e=t[0]*1e3+t[1]/1e6}else e=Date.now();return e}getMemoryUsageMB(){let t=H?.performance?.memory?.usedJSHeapSize;return t==null?null:Math.trunc(t/1024/1024)}};var T=new re;globalThis.Probe=re;globalThis.probe=T;var W={debug:y()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error};var Te={enabled:!0,level:0};var $=(()=>{class r$1 extends ee{constructor({id:t}={id:``}){super({level:0}),this.VERSION=Ee,this._startTs=T.getHighResolutionTimer(),this._deltaTs=T.getHighResolutionTimer(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=t,this.userData={},this._storage=new te(`__probe-${this.id}__`,{[this.id]:Te}),this.timeStamp(`${this.id} started`),Et(this),Object.seal(this)}isEnabled(){return this._getConfiguration().enabled}getLevel(){return this._getConfiguration().level}getTotal(){return Number((T.getHighResolutionTimer()-this._startTs).toPrecision(10))}getDelta(){return Number((T.getHighResolutionTimer()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._updateConfiguration({enabled:t}),this}setLevel(t){return this._updateConfiguration({level:t}),this}get(t){return this._getConfiguration()[t]}set(t,i){this._updateConfiguration({[t]:i})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,i){if(!t)throw new Error(i||`Assertion failed`)}warn(t,...i){return this._log(`warn`,0,t,i,{method:W.warn,once:!0})}error(t,...i){return this._log(`error`,0,t,i,{method:W.error})}deprecated(t,i){return this.warn(`\`${t}\` is deprecated and will be removed in a later version. Use \`${i}\` instead`)}removed(t,i){return this.error(`\`${t}\` has been removed. Use \`${i}\` instead`)}probe(t,i,...s){let n=T.getMemoryUsageMB();if(n!==null){let o=`${n}MB `;typeof i==`function`?i=()=>`${o}${i()}`:typeof i==`string`&&(i=`${o}${i}`)}return this._log(`log`,t,i,s,{method:W.log,time:!0,once:!0})}log(t,i,...s){return this._log(`log`,t,i,s,{method:W.debug})}info(t,i,...s){return this._log(`info`,t,i,s,{method:console.info})}once(t,i,...s){return this._log(`once`,t,i,s,{method:W.debug||W.info,once:!0})}table(t,i,s){return i?this._log(`table`,t,i,s&&[s]||[],{method:console.table||U,tag:ur(i)}):U}time(t,i){return this._log(`time`,t,i,[],{method:console.time?console.time:console.info})}timeEnd(t,i){return this._log(`time`,t,i,[],{method:console.timeEnd?console.timeEnd:console.info})}timeStamp(t,i){return this._log(`time`,t,i,[],{method:console.timeStamp||U})}group(t,i,s={collapsed:!1}){let n=(s.collapsed?console.groupCollapsed:console.group)||console.info;return this._log(`group`,t,i,[],{method:n})}groupCollapsed(t,i,s={}){return this.group(t,i,Object.assign({},s,{collapsed:!0}))}groupEnd(t){return this._log(`groupEnd`,t,``,[],{method:console.groupEnd||U})}withGroup(t,i,s){this.group(t,i)();try{s()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&super._shouldLog(t)}_emit(t,i){let s=i.method;M(s),i.total=this.getTotal(),i.delta=this.getDelta(),this._deltaTs=T.getHighResolutionTimer();let n=ar(this.id,i.message,i);return s.bind(console,n,...i.args)}_getConfiguration(){return this._storage.config[this.id]||this._updateConfiguration(Te),this._storage.config[this.id]}_updateConfiguration(t){let i=this._storage.config[this.id]||r({},Te);this._storage.setConfiguration({[this.id]:r(r({},i),t)})}}return r$1.VERSION=Ee,r$1})();function ar(r,e,t){if(typeof e==`string`){let i=t.time?gt(pt(t.total)):``;e=t.time?`${r}: ${i} ${e}`:`${r}: ${e}`,e=yt(e,t.color,t.background)}return e}function ur(r){for(let e in r)for(let t in r[e])return t||`untitled`;return`empty`}globalThis.probe||(globalThis.probe=T);var ys=new $({id:`@probe.gl/log`});var f=new $({id:`luma.gl`});function V(){let r;if(typeof window<`u`&&window.performance)r=window.performance.now();else if(typeof process<`u`&&process.hrtime){let e=process.hrtime();r=e[0]*1e3+e[1]/1e6}else r=Date.now();return r}var G=class{constructor(e,t){this.sampleSize=1,this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this.name=e,this.type=t,this.reset()}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}setSampleSize(e){return this.sampleSize=e,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(e){return this._count+=e,this._samples++,this._checkSampling(),this}subtractCount(e){return this._count-=e,this._samples++,this._checkSampling(),this}addTime(e){return this._time+=e,this.lastTiming=e,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=V(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(V()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}};var j=class{constructor(e){this.stats={},this.id=e.id,this.stats={},this._initializeStats(e.stats),Object.seal(this)}get(e,t=`count`){return this._getOrCreate({name:e,type:t})}get size(){return Object.keys(this.stats).length}reset(){for(let e of Object.values(this.stats))e.reset();return this}forEach(e){for(let t of Object.values(this.stats))e(t)}getTable(){let e={};return this.forEach(t=>{e[t.name]={time:t.time||0,count:t.count||0,average:t.getAverageTime()||0,hz:t.getHz()||0}}),e}_initializeStats(e=[]){e.forEach(t=>this._getOrCreate(t))}_getOrCreate(e){let{name:t,type:i}=e,s=this.stats[t];return s||(e instanceof G?s=e:s=new G(t,i),this.stats[t]=s),s}};var cr=`GPU Time and Memory`;var fr=[`Adapter`,`GPU`,`GPU Type`,`GPU Backend`,`Frame Rate`,`CPU Time`,`GPU Time`,`GPU Memory`,`Buffer Memory`,`Texture Memory`,`External Buffer Memory`,`External Texture Memory`,`Swap Chain Texture`];var _t=new WeakMap;var xt=new WeakMap;var we=class{stats=new Map;getStats(e){return this.get(e)}get(e){this.stats.has(e)||this.stats.set(e,new j({id:e}));let t=this.stats.get(e);return e===cr&&lr(t,fr),t}};var ie=new we;function lr(r,e){let t=r.stats,i=!1;for(let c of e)t[c]||(r.get(c),i=!0);let s=Object.keys(t).length,n=_t.get(r);if(!i&&n?.orderedStatNames===e&&n.statCount===s)return;let o={},a=xt.get(e);a||(a=new Set(e),xt.set(e,a));for(let c of e)t[c]&&(o[c]=t[c]);for(let[c,h]of Object.entries(t))a.has(c)||(o[c]=h);for(let c of Object.keys(t))delete t[c];Object.assign(t,o),_t.set(r,{orderedStatNames:e,statCount:s})}var Pe={};function w(r=`id`){Pe[r]=Pe[r]||1;return`${r}-${Pe[r]++}`}var dr=`cpu-hotspot-profiler`;var Tt=`GPU Resource Counts`;var wt=`Resource Counts`;var Pt=`GPU Time and Memory`;var hr=[`Resources`,`Buffers`,`Textures`,`Samplers`,`TextureViews`,`Framebuffers`,`QuerySets`,`Shaders`,`RenderPipelines`,`ComputePipelines`,`PipelineLayouts`,`VertexArrays`,`RenderPasss`,`RenderBundleEncoders`,`RenderBundles`,`ComputePasss`,`CommandEncoders`,`CommandBuffers`];var mr=[`Resources`,`Buffers`,`Textures`,`Samplers`,`TextureViews`,`Framebuffers`,`QuerySets`,`Shaders`,`RenderPipelines`,`SharedRenderPipelines`,`ComputePipelines`,`PipelineLayouts`,`VertexArrays`,`RenderPasss`,`RenderBundleEncoders`,`RenderBundles`,`ComputePasss`,`CommandEncoders`,`CommandBuffers`];var pr=hr.flatMap(r=>[`${r} Created`,`${r} Active`]);var gr=mr.flatMap(r=>[`${r} Created`,`${r} Active`]);var Rt=new WeakMap;var St=new WeakMap;var l=(()=>{class r{static defaultProps={id:`undefined`,handle:void 0,_isHandleBorrowed:!1,userData:void 0};toString(){return`${this[Symbol.toStringTag]||this.constructor.name}:"${this.id}"`}toJSON(){return this.toString()}id;props;userData={};_device;destroyed=!1;allocatedBytes=0;allocatedBytesName=null;_attachedResources=new Set;get ownsHandle(){return(this.props.handle===void 0||this.props.handle===null)&&!this.isHandleBorrowed}get isHandleBorrowed(){return!!this.props._isHandleBorrowed}constructor(t,i,s){if(!t)throw new Error(`no device`);this._device=t,this.props=br(i,s);let n=this.props.id!==`undefined`?this.props.id:w(this[Symbol.toStringTag]);this.props.id=n,this.id=n,this.userData=this.props.userData||{},this.addStats()}destroy(){this.destroyed||this.destroyResource()}delete(){return this.destroy(),this}getProps(){return this.props}attachResource(t){this._attachedResources.add(t)}detachResource(t){this._attachedResources.delete(t)}destroyAttachedResource(t){this._attachedResources.delete(t)&&t.destroy()}destroyAttachedResources(){for(let t of this._attachedResources)t.destroy();this._attachedResources=new Set}destroyResource(){this.destroyed||(this.destroyAttachedResources(),this.removeStats(),this.destroyed=!0)}removeStats(){let t=Q(this._device),i=t?B():0,s=[this._device.statsManager.getStats(Tt),this._device.statsManager.getStats(wt)],n=Ct(this._device);for(let a of s)vt(a,n);let o=this.getStatsName();for(let a of s)a.get(`Resources Active`).decrementCount(),a.get(`${o}s Active`).decrementCount();t&&(t.statsBookkeepingCalls=(t.statsBookkeepingCalls||0)+1,t.statsBookkeepingTimeMs=(t.statsBookkeepingTimeMs||0)+(B()-i))}trackAllocatedMemory(t,i=this.getStatsName()){let s=Q(this._device),n=s?B():0,o=this._device.statsManager.getStats(Pt);this.allocatedBytes>0&&this.allocatedBytesName&&(o.get(`GPU Memory`).subtractCount(this.allocatedBytes),o.get(`${this.allocatedBytesName} Memory`).subtractCount(this.allocatedBytes)),o.get(`GPU Memory`).addCount(t),o.get(`${i} Memory`).addCount(t),s&&(s.statsBookkeepingCalls=(s.statsBookkeepingCalls||0)+1,s.statsBookkeepingTimeMs=(s.statsBookkeepingTimeMs||0)+(B()-n)),this.allocatedBytes=t,this.allocatedBytesName=i}trackReferencedMemory(t,i=this.getStatsName()){this.trackAllocatedMemory(t,`External ${i}`)}trackDeallocatedMemory(t=this.getStatsName()){if(this.allocatedBytes===0){this.allocatedBytesName=null;return}let i=Q(this._device),s=i?B():0,n=this._device.statsManager.getStats(Pt);n.get(`GPU Memory`).subtractCount(this.allocatedBytes),n.get(`${this.allocatedBytesName||t} Memory`).subtractCount(this.allocatedBytes),i&&(i.statsBookkeepingCalls=(i.statsBookkeepingCalls||0)+1,i.statsBookkeepingTimeMs=(i.statsBookkeepingTimeMs||0)+(B()-s)),this.allocatedBytes=0,this.allocatedBytesName=null}trackDeallocatedReferencedMemory(t=this.getStatsName()){this.trackDeallocatedMemory(`Referenced ${t}`)}addStats(){let t=this.getStatsName(),i=Q(this._device),s=i?B():0,n=[this._device.statsManager.getStats(Tt),this._device.statsManager.getStats(wt)],o=Ct(this._device);for(let a of n)vt(a,o);for(let a of n)a.get(`Resources Created`).incrementCount(),a.get(`Resources Active`).incrementCount(),a.get(`${t}s Created`).incrementCount(),a.get(`${t}s Active`).incrementCount();i&&(i.statsBookkeepingCalls=(i.statsBookkeepingCalls||0)+1,i.statsBookkeepingTimeMs=(i.statsBookkeepingTimeMs||0)+(B()-s)),yr(this._device,t)}getStatsName(){return Er(this)}}return r})();function br(r$2,e){let t=r({},e);for(let i in r$2)r$2[i]!==void 0&&(t[i]=r$2[i]);return t}function vt(r,e){let t=r.stats,i=!1;for(let c of e)t[c]||(r.get(c),i=!0);let s=Object.keys(t).length,n=Rt.get(r);if(!i&&n?.orderedStatNames===e&&n.statCount===s)return;let o={},a=St.get(e);a||(a=new Set(e),St.set(e,a));for(let c of e)t[c]&&(o[c]=t[c]);for(let[c,h]of Object.entries(t))a.has(c)||(o[c]=h);for(let c of Object.keys(t))delete t[c];Object.assign(t,o),Rt.set(r,{orderedStatNames:e,statCount:s})}function Ct(r){return r.type===`webgl`?gr:pr}function Q(r){let e=r.userData[dr];return e?.enabled?e:null}function B(){return globalThis.performance?.now?.()??Date.now()}function yr(r,e){let t=Q(r);if(!(!t||!t.activeDefaultFramebufferAcquireDepth))switch(t.transientCanvasResourceCreates=(t.transientCanvasResourceCreates||0)+1,e){case`Texture`:t.transientCanvasTextureCreates=(t.transientCanvasTextureCreates||0)+1;break;case`TextureView`:t.transientCanvasTextureViewCreates=(t.transientCanvasTextureViewCreates||0)+1;break;case`Sampler`:t.transientCanvasSamplerCreates=(t.transientCanvasSamplerCreates||0)+1;break;case`Framebuffer`:t.transientCanvasFramebufferCreates=(t.transientCanvasFramebufferCreates||0)+1;break;default:break}}function Er(r){let e=Object.getPrototypeOf(r);for(;e;){let t=Object.getPrototypeOf(e);if(!t||t===l.prototype)return _r(e)||r[Symbol.toStringTag]||r.constructor.name;e=t}return r[Symbol.toStringTag]||r.constructor.name}function _r(r){let e=Object.getOwnPropertyDescriptor(r,Symbol.toStringTag);return typeof e?.get==`function`?e.get.call(r):typeof e?.value==`string`?e.value:null}var P=class r$3 extends l{static INDEX=16;static VERTEX=32;static UNIFORM=64;static STORAGE=128;static INDIRECT=256;static QUERY_RESOLVE=512;static MAP_READ=1;static MAP_WRITE=2;static COPY_SRC=4;static COPY_DST=8;get[Symbol.toStringTag](){return`Buffer`}usage;indexType;updateTimestamp;constructor(e,t){let i=r({},t);(t.usage||0)&r$3.INDEX&&!t.indexType&&(t.data instanceof Uint32Array?i.indexType=`uint32`:t.data instanceof Uint16Array?i.indexType=`uint16`:t.data instanceof Uint8Array&&(i.indexType=`uint8`)),delete i.data,super(e,i,r$3.defaultProps),this.usage=i.usage||0,this.indexType=i.indexType,this.updateTimestamp=e.incrementTimestamp()}clone(e){return this.device.createBuffer(r(r({},this.props),e))}static DEBUG_DATA_MAX_LENGTH=32;debugData=new ArrayBuffer(0);_setDebugData(e,t,i){if(!this.device.props.debug)return;let s=null,n;ArrayBuffer.isView(e)?(s=e,n=e.buffer):n=e;let o=Math.min(e?e.byteLength:i,r$3.DEBUG_DATA_MAX_LENGTH);if(n===null)this.debugData=new ArrayBuffer(o);else{let a=Math.min(s?.byteOffset||0,n.byteLength),c=Math.max(0,n.byteLength-a),h=Math.min(o,c);this.debugData=new Uint8Array(n,a,h).slice().buffer}}static defaultProps=s(r({},l.defaultProps),{handle:void 0,usage:0,byteLength:0,byteOffset:0,data:null,indexType:`uint16`,onMapped:void 0})};var Re=globalThis.Float16Array;function Bt(){return Re??Uint16Array}function At(r){return!!(Re&&r===Re)}function Lt(r){let e=r.includes(`norm`),t=!e&&!r.startsWith(`float`),i=r.startsWith(`s`),[n,o,a]=ve[r]||[`uint8 `,`i32`,1];return{signedType:n,primitiveType:o,byteLength:a,normalized:e,integer:t,signed:i}}function Dt(r){let e=r;switch(e){case`uint8`:return`unorm8`;case`sint8`:return`snorm8`;case`uint16`:return`unorm16`;case`sint16`:return`snorm16`;default:return e}}function _(r,e){switch(e){case 1:return r;case 2:return r+r%2;default:return r+(4-r%4)%4}}function Ut(r){let e=ArrayBuffer.isView(r)?r.constructor:r;if(At(e))return`float16`;if(e===Uint8ClampedArray)return`uint8`;let t=Object.values(ve).find(i=>e===i[4]);if(!t)throw new Error(e.name);return t[0]}function It(r){return Ut(r)}function Mt(r){if(r===`float16`)return Bt();let e=ve[r];if(!e)throw new Error(r);let[,,,,t]=e;return t}function Se(r){return Mt(r)}var ve={uint8:[`uint8`,`u32`,1,!1,Uint8Array],sint8:[`sint8`,`i32`,1,!1,Int8Array],unorm8:[`uint8`,`f32`,1,!0,Uint8Array],snorm8:[`sint8`,`f32`,1,!0,Int8Array],uint16:[`uint16`,`u32`,2,!1,Uint16Array],sint16:[`sint16`,`i32`,2,!1,Int16Array],unorm16:[`uint16`,`u32`,2,!0,Uint16Array],snorm16:[`sint16`,`i32`,2,!0,Int16Array],float16:[`float16`,`f16`,2,!1,Uint16Array],float32:[`float32`,`f32`,4,!1,Float32Array],uint32:[`uint32`,`u32`,4,!1,Uint32Array],sint32:[`sint32`,`i32`,4,!1,Int32Array]};var Ce=class{getDataTypeInfo(e){return Lt(e)}getNormalizedDataType(e){return Dt(e)}alignTo(e,t){return _(e,t)}getDataType(e){return It(e)}getTypedArrayConstructor(e){return Se(e)}};var I=new Ce;var Be=class{getVertexFormatInfo(e){if(e===`unorm10-10-10-2`)return{type:`unorm8`,components:4,byteLength:4,integer:!1,signed:!1,normalized:!0};let t=e===`unorm8x4-bgra`?`unorm8x4`:e,i;t.endsWith(`-webgl`)&&(t=t.slice(0,-6),i=!0);let s=t.split(`x`);if(s.length>2)throw new Error(`Unsupported vertex format: ${e}`);let[n,o]=s,a=n,c=Tr(e,o),h=xr(e,a),p;try{p=i?wr(e,a,c):this.makeVertexFormat(h.signedType,c,h.normalized)}catch{throw new Error(`Unsupported vertex format: ${e}`)}if(p!==(i?e:t))throw new Error(`Unsupported vertex format: ${e}`);let g={type:a,components:c,byteLength:h.byteLength*c,integer:h.integer,signed:h.signed,normalized:h.normalized};return i&&(g.webglOnly=!0),g}makeVertexFormat(e,t,i){let s=i?I.getNormalizedDataType(e):e;switch(s){case`unorm8`:return t===1?`unorm8`:t===3?`unorm8x3-webgl`:`${s}x${t}`;case`snorm8`:return t===1?`snorm8`:t===3?`snorm8x3-webgl`:`${s}x${t}`;case`uint8`:case`sint8`:if(t===3)throw new Error(`size: ${t}`);return t===1?s:`${s}x${t}`;case`uint16`:return t===1?`uint16`:t===3?`uint16x3-webgl`:`${s}x${t}`;case`sint16`:return t===1?`sint16`:t===3?`sint16x3-webgl`:`${s}x${t}`;case`unorm16`:return t===1?`unorm16`:t===3?`unorm16x3-webgl`:`${s}x${t}`;case`snorm16`:return t===1?`snorm16`:t===3?`snorm16x3-webgl`:`${s}x${t}`;case`float16`:if(t===3)throw new Error(`size: ${t}`);return t===1?s:`${s}x${t}`;default:return t===1?s:`${s}x${t}`}}getVertexFormatFromAttribute(e,t,i){if(!t||t>4)throw new Error(`size ${t}`);let s=t,n=I.getDataType(e);return this.makeVertexFormat(n,s,i)}getCompatibleVertexFormat(e){let t;switch(e.primitiveType){case`f32`:t=`float32`;break;case`i32`:t=`sint32`;break;case`u32`:t=`uint32`;break;case`f16`:return e.components<=2?`float16x2`:`float16x4`}return e.components===1?t:`${t}x${e.components}`}};var R=new Be;function xr(r,e){try{return I.getDataTypeInfo(e)}catch{throw new Error(`Unsupported vertex format: ${r}`)}}function Tr(r,e){if(!e)return 1;let t=Number(e);if(t===2||t===3||t===4)return t;throw new Error(`Unsupported vertex format: ${r}`)}function wr(r,e,t){if(t!==3)throw new Error(`Unsupported vertex format: ${r}`);switch(e){case`uint8`:case`sint8`:case`unorm8`:case`snorm8`:case`uint16`:case`sint16`:case`unorm16`:case`snorm16`:return`${e}x3-webgl`;default:throw new Error(`Unsupported vertex format: ${r}`)}}var b=`texture-compression-bc`;var m=`texture-compression-astc`;var S=`texture-compression-etc2`;var Pr=`texture-compression-etc1-webgl`;var se=`texture-compression-pvrtc-webgl`;var Ae=`texture-compression-atc-webgl`;var ne=`float32-renderable-webgl`;var Le=`float16-renderable-webgl`;var Rr=`rgb9e5ufloat-renderable-webgl`;var De=`snorm8-renderable-webgl`;var A=`norm16-webgl`;var Ue=`norm16-renderable-webgl`;var Ie=`snorm16-renderable-webgl`;var oe=`float32-filterable`;var Wt=`float16-filterable-webgl`;function ae(r){let e=Gt[r];if(!e)throw new Error(`Unsupported texture format ${r}`);return e}function $t(){return Gt}var Sr={r8unorm:{webgpu:527},rg8unorm:{webgpu:527},"rgb8unorm-webgl":{},rgba8unorm:{webgpu:31},"rgba8unorm-srgb":{webgpu:15},r8snorm:{render:De,webgpu:837},rg8snorm:{render:De,webgpu:837},"rgb8snorm-webgl":{},rgba8snorm:{render:De,webgpu:341},r8uint:{webgpu:515},rg8uint:{webgpu:515},rgba8uint:{webgpu:19},r8sint:{webgpu:515},rg8sint:{webgpu:515},rgba8sint:{webgpu:19},bgra8unorm:{webgpu:15},"bgra8unorm-srgb":{webgpu:15360},r16unorm:{f:A,render:Ue,webgpu:992},rg16unorm:{f:A,render:Ue,webgpu:992},"rgb16unorm-webgl":{f:A,render:!1},rgba16unorm:{f:A,render:Ue,webgpu:992},r16snorm:{f:A,render:Ie,webgpu:992},rg16snorm:{f:A,render:Ie,webgpu:992},"rgb16snorm-webgl":{f:A,render:!1},rgba16snorm:{f:A,render:Ie,webgpu:992},r16uint:{webgpu:515},rg16uint:{webgpu:515},rgba16uint:{webgpu:19},r16sint:{webgpu:515},rg16sint:{webgpu:515},rgba16sint:{webgpu:19},r16float:{render:Le,filter:`float16-filterable-webgl`,webgpu:527},rg16float:{render:Le,filter:Wt,webgpu:527},rgba16float:{render:Le,filter:Wt,webgpu:31},r32uint:{webgpu:19},rg32uint:{webgpu:16387},rgba32uint:{webgpu:19},r32sint:{webgpu:19},rg32sint:{webgpu:16387},rgba32sint:{webgpu:19},r32float:{render:ne,filter:oe,webgpu:19},rg32float:{render:!1,filter:oe,webgpu:16387},"rgb32float-webgl":{render:ne,filter:oe},rgba32float:{render:ne,filter:oe,webgpu:19},"rgba4unorm-webgl":{channels:`rgba`,bitsPerChannel:[4,4,4,4],packed:!0},"rgb565unorm-webgl":{channels:`rgb`,bitsPerChannel:[5,6,5,0],packed:!0},"rgb5a1unorm-webgl":{channels:`rgba`,bitsPerChannel:[5,5,5,1],packed:!0},rgb9e5ufloat:{channels:`rgb`,packed:!0,render:Rr,webgpu:5},rg11b10ufloat:{channels:`rgb`,bitsPerChannel:[11,11,10,0],packed:!0,p:1,render:ne,webgpu:517},rgb10a2unorm:{channels:`rgba`,bitsPerChannel:[10,10,10,2],packed:!0,p:1,webgpu:527},rgb10a2uint:{channels:`rgba`,bitsPerChannel:[10,10,10,2],packed:!0,p:1,webgpu:515},stencil8:{attachment:`stencil`,bitsPerChannel:[8,0,0,0],dataType:`uint8`,webgpu:3},depth16unorm:{attachment:`depth`,bitsPerChannel:[16,0,0,0],dataType:`uint16`,webgpu:3},depth24plus:{attachment:`depth`,bitsPerChannel:[24,0,0,0],dataType:`uint32`,webgpu:3},depth32float:{attachment:`depth`,bitsPerChannel:[32,0,0,0],dataType:`float32`,webgpu:3},"depth24plus-stencil8":{attachment:`depth-stencil`,bitsPerChannel:[24,8,0,0],packed:!0,webgpu:3},"depth32float-stencil8":{attachment:`depth-stencil`,bitsPerChannel:[32,8,0,0],packed:!0,f:`depth32float-stencil8`,webgpu:3}};var vr={"bc1-rgb-unorm-webgl":{f:b},"bc1-rgb-unorm-srgb-webgl":{f:b},"bc1-rgba-unorm":{f:b},"bc1-rgba-unorm-srgb":{f:b},"bc2-rgba-unorm":{f:b},"bc2-rgba-unorm-srgb":{f:b},"bc3-rgba-unorm":{f:b},"bc3-rgba-unorm-srgb":{f:b},"bc4-r-unorm":{f:b},"bc4-r-snorm":{f:b},"bc5-rg-unorm":{f:b},"bc5-rg-snorm":{f:b},"bc6h-rgb-ufloat":{f:b},"bc6h-rgb-float":{f:b},"bc7-rgba-unorm":{f:b},"bc7-rgba-unorm-srgb":{f:b},"etc2-rgb8unorm":{f:S},"etc2-rgb8unorm-srgb":{f:S},"etc2-rgb8a1unorm":{f:S},"etc2-rgb8a1unorm-srgb":{f:S},"etc2-rgba8unorm":{f:S},"etc2-rgba8unorm-srgb":{f:S},"eac-r11unorm":{f:S},"eac-r11snorm":{f:S},"eac-rg11unorm":{f:S},"eac-rg11snorm":{f:S},"astc-4x4-unorm":{f:m},"astc-4x4-unorm-srgb":{f:m},"astc-5x4-unorm":{f:m},"astc-5x4-unorm-srgb":{f:m},"astc-5x5-unorm":{f:m},"astc-5x5-unorm-srgb":{f:m},"astc-6x5-unorm":{f:m},"astc-6x5-unorm-srgb":{f:m},"astc-6x6-unorm":{f:m},"astc-6x6-unorm-srgb":{f:m},"astc-8x5-unorm":{f:m},"astc-8x5-unorm-srgb":{f:m},"astc-8x6-unorm":{f:m},"astc-8x6-unorm-srgb":{f:m},"astc-8x8-unorm":{f:m},"astc-8x8-unorm-srgb":{f:m},"astc-10x5-unorm":{f:m},"astc-10x5-unorm-srgb":{f:m},"astc-10x6-unorm":{f:m},"astc-10x6-unorm-srgb":{f:m},"astc-10x8-unorm":{f:m},"astc-10x8-unorm-srgb":{f:m},"astc-10x10-unorm":{f:m},"astc-10x10-unorm-srgb":{f:m},"astc-12x10-unorm":{f:m},"astc-12x10-unorm-srgb":{f:m},"astc-12x12-unorm":{f:m},"astc-12x12-unorm-srgb":{f:m},"pvrtc-rgb4unorm-webgl":{f:se},"pvrtc-rgba4unorm-webgl":{f:se},"pvrtc-rgb2unorm-webgl":{f:se},"pvrtc-rgba2unorm-webgl":{f:se},"etc1-rbg-unorm-webgl":{f:Pr},"atc-rgb-unorm-webgl":{f:Ae},"atc-rgba-unorm-webgl":{f:Ae},"atc-rgbai-unorm-webgl":{f:Ae}};var Gt=r(r({},Sr),vr);var Cr=/^(r|rg|rgb|rgba|bgra)([0-9]*)([a-z]*)(-srgb)?(-webgl)?$/;var Br=[`rgb`,`rgba`,`bgra`];var Ar=[`depth`,`stencil`];var Lr=5;var Dr=[`bc1`,`bc2`,`bc3`,`bc4`,`bc5`,`bc6`,`bc7`,`etc1`,`etc2`,`eac`,`atc`,`astc`,`pvrtc`];var Me=class{isColor(e){return Br.some(t=>e.startsWith(t))}isDepthStencil(e){return Ar.some(t=>e.startsWith(t))}isCompressed(e){return Dr.some(t=>e.startsWith(t))}getInfo(e){return Ot(e)}getCapabilities(e){return Ir(e)}getWebGPUCapabilities(e){let t=ae(e);return t.webgpu!==void 0?t.webgpu:this.isCompressed(e)&&!e.endsWith(`-webgl`)?Lr:0}computeMemoryLayout(e){return Ur(e)}};var x=new Me;function Ur({format:r,width:e,height:t,depth:i,byteAlignment:s}){let{bytesPerPixel:o,bytesPerBlock:a=o,blockWidth:c=1,blockHeight:h=1,compressed:p=!1}=x.getInfo(r),g=p?Math.ceil(e/c):e,C=p?Math.ceil(t/h):t,be=g*a,E=Math.ceil(be/s)*s,k=C,z=E*k*i;return{bytesPerPixel:o,bytesPerRow:E,rowsPerImage:k,depthOrArrayLayers:i,bytesPerImage:E*k,byteLength:z}}function Ir(r){let e=ae(r),t={format:r,create:e.f??!0,render:e.render??!0,filter:e.filter??!0,blend:e.blend??!0,store:e.store??!0},i=Ot(r),s=r.startsWith(`depth`)||r.startsWith(`stencil`),n=i?.signed,o=i?.integer,a=i?.webgl,c=!!i?.compressed;return t.render&&=!s&&!c,t.filter&&=!s&&!n&&!o&&!a,t}function Ot(r){let e=Mr(r);if(x.isCompressed(r)){e.channels=`rgb`,e.components=3,e.bytesPerPixel=1,e.srgb=!1,e.compressed=!0,e.bytesPerBlock=$r(r);let i=Wr(r);i&&(e.blockWidth=i.blockWidth,e.blockHeight=i.blockHeight)}let t=e.packed?null:Cr.exec(r);if(t){let[,i,s,n,o,a]=t,c=`${n}${s}`,h=I.getDataTypeInfo(c),p=h.byteLength*8,g=i?.length??1,C=[p,g>=2?p:0,g>=3?p:0,g>=4?p:0];e={format:r,attachment:e.attachment,dataType:h.signedType,components:g,channels:i,integer:h.integer,signed:h.signed,normalized:h.normalized,bitsPerChannel:C,bytesPerPixel:h.byteLength*g,packed:e.packed,srgb:e.srgb},a===`-webgl`&&(e.webgl=!0),o===`-srgb`&&(e.srgb=!0)}return r.endsWith(`-webgl`)&&(e.webgl=!0),r.endsWith(`-srgb`)&&(e.srgb=!0),e}function Mr(r$4){let e=r({},ae(r$4)),t=e.bytesPerPixel||1,i=e.bitsPerChannel||[8,8,8,8];return delete e.bitsPerChannel,delete e.bytesPerPixel,delete e.f,delete e.render,delete e.filter,delete e.blend,delete e.store,delete e.webgpu,s(r({},e),{format:r$4,attachment:e.attachment||`color`,channels:e.channels||`r`,components:e.components||e.channels?.length||1,bytesPerPixel:t,bitsPerChannel:i,dataType:e.dataType||`uint8`,srgb:e.srgb??!1,packed:e.packed??!1,webgl:e.webgl??!1,integer:e.integer??!1,signed:e.signed??!1,normalized:e.normalized??!1,compressed:e.compressed??!1})}function Wr(r){let t=/.*-(\d+)x(\d+)-.*/.exec(r);if(t){let[,i,s]=t;return{blockWidth:Number(i),blockHeight:Number(s)}}return r.startsWith(`bc`)||r.startsWith(`etc1`)||r.startsWith(`etc2`)||r.startsWith(`eac`)||r.startsWith(`atc`)?{blockWidth:4,blockHeight:4}:r.startsWith(`pvrtc-rgb4`)||r.startsWith(`pvrtc-rgba4`)?{blockWidth:4,blockHeight:4}:r.startsWith(`pvrtc-rgb2`)||r.startsWith(`pvrtc-rgba2`)?{blockWidth:8,blockHeight:4}:null}function $r(r){return r.startsWith(`bc1`)||r.startsWith(`bc4`)||r.startsWith(`etc1`)||r.startsWith(`etc2-rgb8`)||r.startsWith(`etc2-rgb8a1`)||r.startsWith(`eac-r11`)||r===`atc-rgb-unorm-webgl`?8:r.startsWith(`bc2`)||r.startsWith(`bc3`)||r.startsWith(`bc5`)||r.startsWith(`bc6h`)||r.startsWith(`bc7`)||r.startsWith(`etc2-rgba8`)||r.startsWith(`eac-rg11`)||r.startsWith(`astc`)||r===`atc-rgba-unorm-webgl`||r===`atc-rgbai-unorm-webgl`?16:r.startsWith(`pvrtc`)?8:16}function We(r){return typeof ImageData<`u`&&r instanceof ImageData||typeof ImageBitmap<`u`&&r instanceof ImageBitmap||typeof HTMLImageElement<`u`&&r instanceof HTMLImageElement||typeof HTMLVideoElement<`u`&&r instanceof HTMLVideoElement||typeof VideoFrame<`u`&&r instanceof VideoFrame||typeof HTMLCanvasElement<`u`&&r instanceof HTMLCanvasElement||typeof OffscreenCanvas<`u`&&r instanceof OffscreenCanvas}function $e(r){if(typeof ImageData<`u`&&r instanceof ImageData||typeof ImageBitmap<`u`&&r instanceof ImageBitmap||typeof HTMLCanvasElement<`u`&&r instanceof HTMLCanvasElement||typeof OffscreenCanvas<`u`&&r instanceof OffscreenCanvas)return{width:r.width,height:r.height};if(typeof HTMLImageElement<`u`&&r instanceof HTMLImageElement)return{width:r.naturalWidth,height:r.naturalHeight};if(typeof HTMLVideoElement<`u`&&r instanceof HTMLVideoElement)return{width:r.videoWidth,height:r.videoHeight};if(typeof VideoFrame<`u`&&r instanceof VideoFrame)return{width:r.displayWidth,height:r.displayHeight};throw new Error(`Unknown image type`)}var ue={id:null,powerPreference:`high-performance`,failIfMajorPerformanceCaveat:!1,featureLevel:void 0,optionalFeatures:[],xrCompatible:!1,createCanvasContext:void 0,webgl:{},onError:(r,e)=>{},onResize:(r,e)=>{let[t,i]=r.getDevicePixelSize();f.log(1,`${r} resized => ${t}x${i}px`)()},onPositionChange:(r,e)=>{let[t,i]=r.getPosition();f.log(1,`${r} repositioned => ${t},${i}`)()},onVisibilityChange:r=>f.log(1,`${r} Visibility changed ${r.isVisible}`)(),onDevicePixelRatioChange:(r,e)=>f.log(1,`${r} DPR changed ${e.oldRatio} => ${r.devicePixelRatio}`)(),debug:Or(),debugGPUTime:!1,debugShaders:f.get(`debug-shaders`)||void 0,debugFramebuffers:!!f.get(`debug-framebuffers`),debugFactories:!!f.get(`debug-factories`),debugWebGL:!!f.get(`debug-webgl`),debugSpectorJS:void 0,debugSpectorJSUrl:void 0,_reuseDevices:!1,_cacheShaders:!0,_destroyShaders:!1,_cachePipelines:!0,_sharePipelines:!0,_destroyPipelines:!1,_initializeFeatures:!0,_disabledFeatures:{"compilation-status-async-webgl":!0},_handle:void 0};function Gr(r,e){return r!=null?!!r:e!==void 0?e!==`production`:!1}function Or(){return Gr(f.get(`debug`),Nr())}function Nr(){let r=globalThis.process;if(r?.env)return r.env.NODE_ENV}var Ge=class{};function Fr(r,e){return[Oe(r),...e.map(Oe).filter(s=>s!==void 0)].filter(s=>s!==void 0)}function Oe(r){if(r!==void 0){if(r===null||typeof r==`string`||typeof r==`number`||typeof r==`boolean`)return r;if(r instanceof Error)return r.message;if(Array.isArray(r))return r.map(Oe);if(typeof r==`object`){if(kr(r)){let e=String(r);if(e!==`[object Object]`)return e}return zr(r)?Hr(r):r.constructor?.name||`Object`}return String(r)}}function kr(r){return`toString`in r&&typeof r.toString==`function`&&r.toString!==Object.prototype.toString}function zr(r){return`message`in r&&`type`in r}function Hr(r){let e=typeof r.type==`string`?r.type:`message`,t=typeof r.message==`string`?r.message:``,i=typeof r.lineNum==`number`?r.lineNum:null,s=typeof r.linePos==`number`?r.linePos:null;return`${e}${i!==null&&s!==null?` @ ${i}:${s}`:i!==null?` @ ${i}`:``}: ${t}`.trim()}var Ne=class{features;disabledFeatures;constructor(e=[],t){this.features=new Set(e),this.disabledFeatures=t||{}}*[Symbol.iterator](){yield*this.features}has(e){return!this.disabledFeatures?.[e]&&this.features.has(e)}};function Vr(){if(typeof HTMLCanvasElement>`u`)return!1;let r=HTMLCanvasElement.prototype;return`layoutSubtree`in r&&typeof r.requestPaint==`function`}var Fe=class r$5{static defaultProps=r({},ue);get[Symbol.toStringTag](){return`Device`}toString(){return`Device(${this.id})`}toJSON(){return this.toString()}id;props;userData={};statsManager=ie;_factories={};timestamp=0;_reused=!1;_moduleData={};wgslLanguageFeatures=new Set;_textureCaps={};_debugGPUTimeQuery=null;constructor(e){this.props=r(r({},r$5.defaultProps),e),this.id=this.props.id||w(this[Symbol.toStringTag].toLowerCase())}getVertexFormatInfo(e){return R.getVertexFormatInfo(e)}isVertexFormatSupported(e){return!0}getTextureFormatInfo(e){return x.getInfo(e)}getTextureFormatCapabilities(e){let t=this._textureCaps[e];if(!t){let i=this._getDeviceTextureFormatCapabilities(e);t=this._getDeviceSpecificTextureFormatCapabilities(i),this._textureCaps[e]=t}return t}getMipLevelCount(e,t,i=1){return 1+Math.floor(Math.log2(Math.max(e,t,i)))}isExternalImage(e){return We(e)}getExternalImageSize(e){return $e(e)}isTextureFormatSupported(e){return this.getTextureFormatCapabilities(e).create}isTextureFormatFilterable(e){return this.getTextureFormatCapabilities(e).filter}isTextureFormatRenderable(e){return this.getTextureFormatCapabilities(e).render}isTextureFormatCompressed(e){return x.isCompressed(e)}getSupportedCompressedTextureFormats(){let e=[];for(let t of Object.keys($t()))this.isTextureFormatCompressed(t)&&this.isTextureFormatSupported(t)&&e.push(t);return e}pushDebugGroup(e){this.commandEncoder.pushDebugGroup(e)}popDebugGroup(){this.commandEncoder?.popDebugGroup()}insertDebugMarker(e){this.commandEncoder?.insertDebugMarker(e)}loseDevice(){return!1}incrementTimestamp(){return this.timestamp++}reportError(e,t,...i){if(!this.props.onError(e,t)){let n=Fr(t,i);return f.error(this.type===`webgl`?`%cWebGL`:`%cWebGPU`,`color: white; background: red; padding: 2px 6px; border-radius: 3px;`,e.message,...n)}return()=>{}}debug(){if(this.props.debug)debugger;else f.once(0,`'Type luma.log.set({debug: true}) in console to enable debug breakpoints',
2
+ or create a device with the 'debug: true' prop.`)()}getDefaultCanvasContext(){if(!this.canvasContext)throw new Error(`Device has no default CanvasContext. See props.createCanvasContext`);return this.canvasContext}createFence(){throw new Error(`createFence() not implemented`)}beginRenderPass(e){return this.commandEncoder.beginRenderPass(e)}beginComputePass(e){return this.commandEncoder.beginComputePass(e)}writeBufferViaCommandEncoder(e,t,i,s=0){throw new Error(`writeBufferViaCommandEncoder() not implemented`)}generateMipmapsWebGPU(e){throw new Error(`not implemented`)}_createSharedRenderPipelineWebGL(e){throw new Error(`_createSharedRenderPipelineWebGL() not implemented`)}_createBindGroupLayoutWebGPU(e,t){throw new Error(`_createBindGroupLayoutWebGPU() not implemented`)}_createBindGroupWebGPU(e,t,i,s,n){throw new Error(`_createBindGroupWebGPU() not implemented`)}_supportsDebugGPUTime(){return this.features.has(`timestamp-query`)&&!!(this.props.debug||this.props.debugGPUTime)}_enableDebugGPUTime(e=256){if(!this._supportsDebugGPUTime())return null;if(this._debugGPUTimeQuery)return this._debugGPUTimeQuery;try{this._debugGPUTimeQuery=this.createQuerySet({type:`timestamp`,count:e}),this.commandEncoder=this.createCommandEncoder({id:this.commandEncoder.props.id,timeProfilingQuerySet:this._debugGPUTimeQuery})}catch{this._debugGPUTimeQuery=null}return this._debugGPUTimeQuery}_disableDebugGPUTime(){this._debugGPUTimeQuery&&(this.commandEncoder.getTimeProfilingQuerySet()===this._debugGPUTimeQuery&&(this.commandEncoder=this.createCommandEncoder({id:this.commandEncoder.props.id})),this._debugGPUTimeQuery.destroy(),this._debugGPUTimeQuery=null)}_isDebugGPUTimeEnabled(){return this._debugGPUTimeQuery!==null}getCanvasContext(){return this.getDefaultCanvasContext()}readPixelsToArrayWebGL(e,t){throw new Error(`not implemented`)}readPixelsToBufferWebGL(e,t){throw new Error(`not implemented`)}setParametersWebGL(e){throw new Error(`not implemented`)}getParametersWebGL(e){throw new Error(`not implemented`)}withParametersWebGL(e,t){throw new Error(`not implemented`)}clearWebGL(e){throw new Error(`not implemented`)}resetWebGL(){throw new Error(`not implemented`)}getModuleData(e){return this._moduleData[e]||={},this._moduleData[e]}static _getCanvasContextProps(e){return e.createCanvasContext===!0?{}:e.createCanvasContext}_getDeviceTextureFormatCapabilities(e){let t=x.getCapabilities(e),i=n=>(typeof n==`string`?this.features.has(n):n)??!0,s=i(t.create);return{format:e,create:s,render:s&&i(t.render),filter:s&&i(t.filter),blend:s&&i(t.blend),store:s&&i(t.store)}}_normalizeBufferProps(e){(e instanceof ArrayBuffer||ArrayBuffer.isView(e))&&(e={data:e});let t=r({},e);if((e.usage||0)&P.INDEX&&(e.indexType||(e.data instanceof Uint32Array?t.indexType=`uint32`:e.data instanceof Uint16Array?t.indexType=`uint16`:e.data instanceof Uint8Array&&(t.data=new Uint16Array(e.data),t.indexType=`uint16`)),!t.indexType))throw new Error(`indices buffer content must be of type uint16 or uint32`);return t}};var jr=`set luma.log.level=1 (or higher) to trace rendering`;var Nt="No matching device found. Ensure `@luma.gl/webgl` and/or `@luma.gl/webgpu` modules are imported.";var Qr=new class r$6{static defaultProps=s(r({},ue),{type:`best-available`,adapters:void 0,waitForPageLoad:!0});stats=ie;log=f;VERSION=`9.4.1`;spector;preregisteredAdapters=new Map;constructor(){if(globalThis.luma){if(globalThis.luma.VERSION!==this.VERSION)throw f.error(`Found luma.gl ${globalThis.luma.VERSION} while initialzing ${this.VERSION}`)(),f.error(`'yarn why @luma.gl/core' can help identify the source of the conflict`)(),new Error(`luma.gl - multiple versions detected: see console log`);f.error(`This version of luma.gl has already been initialized`)()}f.log(1,`${this.VERSION} - ${jr}`)(),globalThis.luma=this}async createDevice(e={}){let t=r(r({},r$6.defaultProps),e),i=this.selectAdapter(t.type,t.adapters);if(!i)throw new Error(Nt);return t.waitForPageLoad&&await i.pageLoaded,await i.create(t)}async attachDevice(e,t){let i=this._getTypeFromHandle(e,t.adapters),s=i&&this.selectAdapter(i,t.adapters);if(!s)throw new Error(Nt);return await s?.attach?.(e,t)}registerAdapters(e){for(let t of e)this.preregisteredAdapters.set(t.type,t)}getSupportedAdapters(e=[]){let t=this._getAdapterMap(e);return Array.from(t).map(([,i])=>i).filter(i=>i.isSupported?.()).map(i=>i.type)}getBestAvailableAdapterType(e=[]){let t=[`webgpu`,`webgl`,`null`],i=this._getAdapterMap(e);for(let s of t)if(i.get(s)?.isSupported?.())return s;return null}selectAdapter(e,t=[]){let i=e;e===`best-available`&&(i=this.getBestAvailableAdapterType(t));let s=this._getAdapterMap(t);return i&&s.get(i)||null}enforceWebGL2(e=!0,t=[]){let s=this._getAdapterMap(t).get(`webgl`);s||f.warn(`enforceWebGL2: webgl adapter not found`)(),s?.enforceWebGL2?.(e)}setDefaultDeviceProps(e){Object.assign(r$6.defaultProps,e)}_getAdapterMap(e=[]){let t=new Map(this.preregisteredAdapters);for(let i of e)t.set(i.type,i);return t}_getTypeFromHandle(e,t=[]){return e instanceof WebGL2RenderingContext?`webgl`:typeof GPUDevice<`u`&&e instanceof GPUDevice||e?.queue?`webgpu`:e===null?`null`:(e instanceof WebGLRenderingContext?f.warn(`WebGL1 is not supported`,e)():f.warn(`Unknown handle type`,e)(),null)}};var ze=class{get pageLoaded(){return Jr()}};var Yr=y()&&typeof document<`u`;var Xr=()=>Yr&&document.readyState===`complete`;var ce=null;function Jr(){return ce||(Xr()||typeof window>`u`?ce=Promise.resolve():ce=new Promise(r=>window.addEventListener(`load`,()=>r()))),ce}var fe=class{props;_resizeObserver;_intersectionObserver;_observeDevicePixelRatioTimeout=null;_observeDevicePixelRatioMediaQuery=null;_handleDevicePixelRatioChange=()=>this._refreshDevicePixelRatio();_trackPositionInterval=null;_started=!1;get started(){return this._started}constructor(e){this.props=e}start(){if(this._started||!this.props.canvas)return;this._started=!0,this._intersectionObserver||=new IntersectionObserver(t=>this.props.onIntersection(t)),this._resizeObserver||=new ResizeObserver(t=>this.props.onResize(t)),this._intersectionObserver.observe(this.props.canvas);let e=this.props.resizeObserverBox;try{this._resizeObserver.observe(this.props.canvas,{box:e})}catch{this._resizeObserver.observe(this.props.canvas,{box:`content-box`})}this._observeDevicePixelRatioTimeout=setTimeout(()=>this._refreshDevicePixelRatio(),0),this.props.trackPosition&&this._trackPosition()}stop(){this._started&&(this._started=!1,this._observeDevicePixelRatioTimeout&&(clearTimeout(this._observeDevicePixelRatioTimeout),this._observeDevicePixelRatioTimeout=null),this._observeDevicePixelRatioMediaQuery&&(this._observeDevicePixelRatioMediaQuery.removeEventListener(`change`,this._handleDevicePixelRatioChange),this._observeDevicePixelRatioMediaQuery=null),this._trackPositionInterval&&(clearInterval(this._trackPositionInterval),this._trackPositionInterval=null),this._resizeObserver?.disconnect(),this._intersectionObserver?.disconnect())}_refreshDevicePixelRatio(){this._started&&(this.props.onDevicePixelRatioChange(),this._observeDevicePixelRatioMediaQuery?.removeEventListener(`change`,this._handleDevicePixelRatioChange),this._observeDevicePixelRatioMediaQuery=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._observeDevicePixelRatioMediaQuery.addEventListener(`change`,this._handleDevicePixelRatioChange,{once:!0}))}_trackPosition(e=100){this._trackPositionInterval||(this._trackPositionInterval=setInterval(()=>{this._started?this.props.onPositionChange():this._trackPositionInterval&&(clearInterval(this._trackPositionInterval),this._trackPositionInterval=null)},e))}};function Ft(){let r,e;return{promise:new Promise((i,s)=>{r=i,e=s}),resolve:r,reject:e}}function He(r,e){if(!r){let t=new Error(e??`luma.gl assertion failed.`);throw Error.captureStackTrace?.(t,He),t}}function le(r,e){return He(r,e),r}var O=(()=>{class r$7{static isHTMLCanvas(t){return typeof HTMLCanvasElement<`u`&&t instanceof HTMLCanvasElement}static isOffscreenCanvas(t){return typeof OffscreenCanvas<`u`&&t instanceof OffscreenCanvas}static defaultProps={id:void 0,canvas:null,width:800,height:600,useDevicePixels:!0,pixelSizeSource:`exact`,autoResize:!0,container:null,visible:!0,alphaMode:`opaque`,colorSpace:`srgb`,colorFormat:void 0,toneMapping:`standard`,trackPosition:!1};id;props;canvas;htmlCanvas;offscreenCanvas;type;initialized;isInitialized=!1;isVisible=!0;cssWidth;cssHeight;devicePixelRatio;devicePixelWidth;devicePixelHeight;drawingBufferWidth;drawingBufferHeight;_initializedResolvers=Ft();_canvasObserver;_position=[0,0];destroyed=!1;_needsDrawingBufferResize=!0;_configuredDrawingBufferSize=[0,0];toString(){return`${this[Symbol.toStringTag]}(${this.id})`}constructor(t){this.props=r(r({},r$7.defaultProps),t),t=this.props,this.initialized=this._initializedResolvers.promise,y()?t.canvas?typeof t.canvas==`string`?this.canvas=Kr(t.canvas):this.canvas=t.canvas:this.canvas=Zr(t):this.canvas={width:t.width||1,height:t.height||1},r$7.isHTMLCanvas(this.canvas)?(this.id=t.id||this.canvas.id,this.type=`html-canvas`,this.htmlCanvas=this.canvas):r$7.isOffscreenCanvas(this.canvas)?(this.id=t.id||`offscreen-canvas`,this.type=`offscreen-canvas`,this.offscreenCanvas=this.canvas):(this.id=t.id||`node-canvas-context`,this.type=`node`),this.cssWidth=this.htmlCanvas?.clientWidth||this.canvas.width,this.cssHeight=this.htmlCanvas?.clientHeight||this.canvas.height,this.devicePixelWidth=this.canvas.width,this.devicePixelHeight=this.canvas.height,this.drawingBufferWidth=this.canvas.width,this.drawingBufferHeight=this.canvas.height,this._configuredDrawingBufferSize=[this.canvas.width,this.canvas.height],this.devicePixelRatio=globalThis.devicePixelRatio||1,this._position=[0,0],this._canvasObserver=new fe({canvas:this.htmlCanvas,trackPosition:this.props.trackPosition,resizeObserverBox:this.props.pixelSizeSource===`css-dpr`?`content-box`:`device-pixel-content-box`,onResize:i=>this._handleResize(i),onIntersection:i=>this._handleIntersection(i),onDevicePixelRatioChange:()=>this._observeDevicePixelRatio(),onPositionChange:()=>this.updatePosition()})}destroy(){this.destroyed||(this.destroyed=!0,this._stopObservers(),this.device=null)}setProps(t){return`useDevicePixels`in t&&(this.props.useDevicePixels=t.useDevicePixels||!1,this._updateDrawingBufferSize()),this}getCurrentFramebuffer(t){return this._resizeDrawingBufferIfNeeded(),this._getCurrentFramebuffer(t)}getCSSSize(){return[this.cssWidth,this.cssHeight]}getPosition(){return this._position}getDevicePixelSize(){return[this.devicePixelWidth,this.devicePixelHeight]}getDrawingBufferSize(){return[this.drawingBufferWidth,this.drawingBufferHeight]}getMaxDrawingBufferSize(){let t=this.device.limits.maxTextureDimension2D;return[t,t]}setDrawingBufferSize(t,i){t=Math.floor(t),i=Math.floor(i),!(this.drawingBufferWidth===t&&this.drawingBufferHeight===i)&&(this.drawingBufferWidth=t,this.drawingBufferHeight=i,this._needsDrawingBufferResize=!0)}getDevicePixelRatio(){return typeof window<`u`&&window.devicePixelRatio||1}cssToDevicePixels(t,i=!0){let s=this.cssToDeviceRatio(),[n,o]=this.getDrawingBufferSize();return ei(t,s,n,o,i)}getPixelSize(){return this.getDevicePixelSize()}getAspect(){let[t,i]=this.getDrawingBufferSize();return t>0&&i>0?t/i:1}cssToDeviceRatio(){try{let[t]=this.getDrawingBufferSize(),[i]=this.getCSSSize();return i?t/i:1}catch{return 1}}resize(t){this.setDrawingBufferSize(t.width,t.height)}_setAutoCreatedCanvasId(t){this.htmlCanvas?.id===`lumagl-auto-created-canvas`&&(this.htmlCanvas.id=t)}_startObservers(){this.destroyed||this._canvasObserver.start()}_stopObservers(){this._canvasObserver.stop()}_handleIntersection(t){if(this.destroyed)return;let i=t.find(n=>n.target===this.canvas);if(!i)return;let s=i.isIntersecting;this.isVisible!==s&&(this.isVisible=s,this.device.props.onVisibilityChange(this))}_handleResize(t){if(this.destroyed)return;let i=t.find(o=>o.target===this.canvas);if(!i)return;let s=le(i.contentBoxSize?.[0]);this.cssWidth=s.inlineSize,this.cssHeight=s.blockSize;let n=this.getDevicePixelSize();this._setDevicePixelSize(this._getDevicePixelSizeFromResizeEntry(i)),this._updateDrawingBufferSize(),this.device.props.onResize(this,{oldPixelSize:n})}_updateDrawingBufferSize(){if(this.props.autoResize)if(typeof this.props.useDevicePixels==`number`){let t=this.props.useDevicePixels;this.setDrawingBufferSize(this.cssWidth*t,this.cssHeight*t)}else this.props.useDevicePixels?this.setDrawingBufferSize(this.devicePixelWidth,this.devicePixelHeight):this.setDrawingBufferSize(this.cssWidth,this.cssHeight);this._initializedResolvers.resolve(),this.isInitialized=!0,this.updatePosition()}_getDevicePixelSizeFromResizeEntry(t){let i=le(t.contentBoxSize?.[0]);return this.props.pixelSizeSource===`css-dpr`?this._getDevicePixelSizeFromCSSSize(i.inlineSize,i.blockSize):{devicePixelWidth:t.devicePixelContentBoxSize?.[0]?.inlineSize||i.inlineSize*devicePixelRatio,devicePixelHeight:t.devicePixelContentBoxSize?.[0]?.blockSize||i.blockSize*devicePixelRatio}}_getDevicePixelSizeFromCSSSize(t,i){let s=this.getDevicePixelRatio();return{devicePixelWidth:Math.floor(t*s),devicePixelHeight:Math.floor(i*s)}}_setDevicePixelSize({devicePixelWidth:t,devicePixelHeight:i}){let[s,n]=this.getMaxDrawingBufferSize();this.devicePixelWidth=Math.max(1,Math.min(t,s)),this.devicePixelHeight=Math.max(1,Math.min(i,n))}_resizeDrawingBufferIfNeeded(){if(this._needsDrawingBufferResize){this._needsDrawingBufferResize=!1,(this.drawingBufferWidth!==this.canvas.width||this.drawingBufferHeight!==this.canvas.height)&&(this.canvas.width=this.drawingBufferWidth,this.canvas.height=this.drawingBufferHeight);let[i,s]=this._configuredDrawingBufferSize;(this.drawingBufferWidth!==i||this.drawingBufferHeight!==s)&&(this._configureDevice(),this._configuredDrawingBufferSize=[this.drawingBufferWidth,this.drawingBufferHeight])}}_observeDevicePixelRatio(){if(this.destroyed||!this._canvasObserver.started)return;let t=this.devicePixelRatio;if(this.devicePixelRatio=window.devicePixelRatio,this.props.pixelSizeSource===`css-dpr`){let i=this.getDevicePixelSize();this._setDevicePixelSize(this._getDevicePixelSizeFromCSSSize(this.cssWidth,this.cssHeight)),this._updateDrawingBufferSize(),this.device.props.onResize(this,{oldPixelSize:i})}this.updatePosition(),this.device.props.onDevicePixelRatioChange?.(this,{oldRatio:t})}updatePosition(){if(this.destroyed)return;let t=this.htmlCanvas?.getBoundingClientRect();if(t){let i=[t.left,t.top];if(this._position??=i,i[0]!==this._position[0]||i[1]!==this._position[1]){let n=this._position;this._position=i,this.device.props.onPositionChange?.(this,{oldPosition:n})}}}}return r$7})();function qr(r){if(typeof r==`string`){let e=document.getElementById(r);if(!e)throw new Error(`${r} is not an HTML element`);return e}return r||document.body}function Kr(r){let e=document.getElementById(r);if(!O.isHTMLCanvas(e))throw new Error(`Object is not a canvas element`);return e}function Zr(r){let{width:e,height:t}=r,i=document.createElement(`canvas`);i.id=w(`lumagl-auto-created-canvas`),i.width=e||1,i.height=t||1,i.style.width=Number.isFinite(e)?`${e}px`:`100%`,i.style.height=Number.isFinite(t)?`${t}px`:`100%`,r?.visible||(i.style.visibility=`hidden`);let s=qr(r?.container||null);return s.insertBefore(i,s.firstChild),i}function ei(r,e,t,i,s){let n=r,o=kt(n[0],e,t),a=zt(n[1],e,i,s),c=kt(n[0]+1,e,t),h=c===t-1?c:c-1;c=zt(n[1]+1,e,i,s);let p;return s?(c=c===0?c:c+1,p=a,a=c):p=c===i-1?c:c-1,{x:o,y:a,width:Math.max(h-o+1,1),height:Math.max(p-a+1,1)}}function kt(r,e,t){return Math.min(Math.round(r*e),t-1)}function zt(r,e,t,i){return i?Math.max(0,t-1-Math.round(r*e)):Math.min(Math.round(r*e),t-1)}var ti=(()=>{class r extends O{static defaultProps=O.defaultProps}return r})();var Ve=class extends O{};var Y=class r$8 extends l{static defaultProps=s(r({},l.defaultProps),{type:`color-sampler`,addressModeU:`clamp-to-edge`,addressModeV:`clamp-to-edge`,addressModeW:`clamp-to-edge`,magFilter:`nearest`,minFilter:`nearest`,mipmapFilter:`none`,lodMinClamp:0,lodMaxClamp:32,compare:`less-equal`,maxAnisotropy:1});get[Symbol.toStringTag](){return`Sampler`}constructor(e,t){t=r$8.normalizeProps(e,t),super(e,t,r$8.defaultProps)}static normalizeProps(e,t){return t}};var ri={"1d":`1d`,"2d":`2d`,"2d-array":`2d`,cube:`2d`,"cube-array":`2d`,"3d":`3d`};var v=class r$9 extends l{static SAMPLE=4;static STORAGE=8;static RENDER=16;static COPY_SRC=1;static COPY_DST=2;static TEXTURE=4;static RENDER_ATTACHMENT=16;dimension;baseDimension;format;width;height;depth;mipLevels;samples;byteAlignment;ready=Promise.resolve(this);isReady=!0;updateTimestamp;get[Symbol.toStringTag](){return`Texture`}toString(){return`Texture(${this.id},${this.format},${this.width}x${this.height})`}constructor(e,t,i){if(t=r$9.normalizeProps(e,t),super(e,t,r$9.defaultProps),this.dimension=this.props.dimension,this.baseDimension=ri[this.dimension],this.format=this.props.format,this.width=this.props.width,this.height=this.props.height,this.depth=this.props.depth,this.mipLevels=this.props.mipLevels,this.samples=this.props.samples||1,this.dimension===`cube`&&(this.depth=6),this.props.width===void 0||this.props.height===void 0)if(e.isExternalImage(t.data)){let s=e.getExternalImageSize(t.data);this.width=s?.width||1,this.height=s?.height||1}else this.width=1,this.height=1,(this.props.width===void 0||this.props.height===void 0)&&f.warn(`${this} created with undefined width or height. This is deprecated. Use DynamicTexture instead.`)();this.byteAlignment=i?.byteAlignment||1,this.updateTimestamp=e.incrementTimestamp()}clone(e){return this.device.createTexture(r(r({},this.props),e))}setSampler(e){this.sampler=e instanceof Y?e:this.device.createSampler(e)}copyImageData(e){let n=e,{data:t,depth:i}=n,s$1=u(n,[`data`,`depth`]);this.writeData(t,s(r({},s$1),{depthOrArrayLayers:s$1.depthOrArrayLayers??i}))}computeMemoryLayout(e={}){let{width:i=this.width,height:s=this.height,depthOrArrayLayers:n=this.depth}=this._normalizeTextureReadOptions(e),{format:o,byteAlignment:a}=this;return x.computeMemoryLayout({format:o,width:i,height:s,depth:n,byteAlignment:a})}readBuffer(e,t){throw new Error(`readBuffer not implemented`)}readDataAsync(e){throw new Error(`readBuffer not implemented`)}writeBuffer(e,t){throw new Error(`readBuffer not implemented`)}writeData(e,t){throw new Error(`readBuffer not implemented`)}readDataSyncWebGL(e){throw new Error(`readDataSyncWebGL not available`)}generateMipmapsWebGL(){throw new Error(`generateMipmapsWebGL not available`)}static normalizeProps(e,t){let i=r({},t),{width:s,height:n}=i;return typeof s==`number`&&(i.width=Math.max(1,Math.ceil(s))),typeof n==`number`&&(i.height=Math.max(1,Math.ceil(n))),i}_initializeData(e){this.device.isExternalImage(e)?this.copyExternalImage({image:e,width:this.width,height:this.height,depth:this.depth,mipLevel:0,x:0,y:0,z:0,aspect:`all`,colorSpace:`srgb`,premultipliedAlpha:!1,flipY:!1}):e&&this.copyImageData({data:e,mipLevel:0,x:0,y:0,z:0,aspect:`all`})}_normalizeCopyImageDataOptions(e){let o=e,{data:t,depth:i}=o,s$2=u(o,[`data`,`depth`]),n=this._normalizeTextureWriteOptions(s(r({},s$2),{depthOrArrayLayers:s$2.depthOrArrayLayers??i}));return r({data:t,depth:n.depthOrArrayLayers},n)}_normalizeCopyExternalImageOptions(e){let t=r$9._omitUndefined(e),i=t.mipLevel??0,s=this._getMipLevelSize(i),n=this.device.getExternalImageSize(e.image),o=r(r(r(r({},r$9.defaultCopyExternalImageOptions),s),n),t);return o.width=Math.min(o.width,s.width-o.x),o.height=Math.min(o.height,s.height-o.y),o.depth=Math.min(o.depth,s.depthOrArrayLayers-o.z),o}_normalizeCopyElementImageOptions(e){let t=r$9._omitUndefined(e),i=t.mipLevel??0,s=this._getMipLevelSize(i),n=r(r(r({},r$9.defaultCopyElementImageOptions),s),t);return n.width=Math.min(n.width,s.width-n.x),n.height=Math.min(n.height,s.height-n.y),n.depth=Math.min(n.depth,s.depthOrArrayLayers-n.z),n}_normalizeTextureReadOptions(e){let t=r$9._omitUndefined(e),i=t.mipLevel??0,s=this._getMipLevelSize(i),n=r(r(r({},r$9.defaultTextureReadOptions),s),t);return n.width=Math.min(n.width,s.width-n.x),n.height=Math.min(n.height,s.height-n.y),n.depthOrArrayLayers=Math.min(n.depthOrArrayLayers,s.depthOrArrayLayers-n.z),n}_getSupportedColorReadOptions(e){let t=this._normalizeTextureReadOptions(e),i=x.getInfo(this.format);switch(this._validateColorReadAspect(t),this._validateColorReadFormat(i),this.dimension){case`2d`:case`cube`:case`cube-array`:case`2d-array`:case`3d`:return t;default:throw new Error(`${this} color readback does not support ${this.dimension} textures`)}}_validateColorReadAspect(e){if(e.aspect!==`all`)throw new Error(`${this} color readback only supports aspect 'all'`)}_validateColorReadFormat(e){if(e.compressed)throw new Error(`${this} color readback does not support compressed formats (${this.format})`);switch(e.attachment){case`color`:return;case`depth`:throw new Error(`${this} color readback does not support depth formats (${this.format})`);case`stencil`:throw new Error(`${this} color readback does not support stencil formats (${this.format})`);case`depth-stencil`:throw new Error(`${this} color readback does not support depth-stencil formats (${this.format})`);default:throw new Error(`${this} color readback does not support format ${this.format}`)}}_normalizeTextureWriteOptions(e){let t=r$9._omitUndefined(e),i=t.mipLevel??0,s=this._getMipLevelSize(i),n=r(r(r({},r$9.defaultTextureWriteOptions),s),t);n.width=Math.min(n.width,s.width-n.x),n.height=Math.min(n.height,s.height-n.y),n.depthOrArrayLayers=Math.min(n.depthOrArrayLayers,s.depthOrArrayLayers-n.z);let o=x.computeMemoryLayout({format:this.format,width:n.width,height:n.height,depth:n.depthOrArrayLayers,byteAlignment:this.byteAlignment}),a=o.bytesPerPixel*n.width;if(n.bytesPerRow=t.bytesPerRow??o.bytesPerRow,n.rowsPerImage=t.rowsPerImage??n.height,n.bytesPerRow<a)throw new Error(`bytesPerRow (${n.bytesPerRow}) must be at least ${a} for ${this.format}`);if(n.rowsPerImage<n.height)throw new Error(`rowsPerImage (${n.rowsPerImage}) must be at least ${n.height} for ${this.format}`);let c=this.device.getTextureFormatInfo(this.format).bytesPerPixel;if(c&&n.bytesPerRow%c!==0)throw new Error(`bytesPerRow (${n.bytesPerRow}) must be a multiple of bytesPerPixel (${c}) for ${this.format}`);return n}_getMipLevelSize(e){return{width:Math.max(1,this.width>>e),height:this.baseDimension===`1d`?1:Math.max(1,this.height>>e),depthOrArrayLayers:this.dimension===`3d`?Math.max(1,this.depth>>e):this.depth}}getAllocatedByteLength(){let e=0;for(let t=0;t<this.mipLevels;t++){let{width:i,height:s,depthOrArrayLayers:n}=this._getMipLevelSize(t);e+=x.computeMemoryLayout({format:this.format,width:i,height:s,depth:n,byteAlignment:1}).byteLength}return e*this.samples}static _omitUndefined(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}static defaultProps=s(r({},l.defaultProps),{data:null,dimension:`2d`,format:`rgba8unorm`,usage:r$9.SAMPLE|r$9.RENDER|r$9.COPY_DST,width:void 0,height:void 0,depth:1,mipLevels:1,samples:void 0,sampler:{},view:void 0});static defaultCopyDataOptions={data:void 0,byteOffset:0,bytesPerRow:void 0,rowsPerImage:void 0,width:void 0,height:void 0,depthOrArrayLayers:void 0,depth:1,mipLevel:0,x:0,y:0,z:0,aspect:`all`};static defaultCopyExternalImageOptions={image:void 0,sourceX:0,sourceY:0,width:void 0,height:void 0,depth:1,mipLevel:0,x:0,y:0,z:0,aspect:`all`,colorSpace:`srgb`,premultipliedAlpha:!1,flipY:!1};static defaultCopyElementImageOptions={element:void 0,width:void 0,height:void 0,sourceX:0,sourceY:0,sourceWidth:void 0,sourceHeight:void 0,depth:1,mipLevel:0,x:0,y:0,z:0,aspect:`all`,colorSpace:`srgb`,premultipliedAlpha:!1,flipY:!1};static defaultTextureReadOptions={x:0,y:0,z:0,width:void 0,height:void 0,depthOrArrayLayers:1,mipLevel:0,aspect:`all`};static defaultTextureWriteOptions={byteOffset:0,bytesPerRow:void 0,rowsPerImage:void 0,x:0,y:0,z:0,width:void 0,height:void 0,depthOrArrayLayers:1,mipLevel:0,aspect:`all`}};var je=class r$10 extends l{get[Symbol.toStringTag](){return`TextureView`}constructor(e,t){super(e,t,r$10.defaultProps)}static defaultProps=s(r({},l.defaultProps),{format:void 0,dimension:void 0,aspect:`all`,baseMipLevel:0,mipLevelCount:void 0,baseArrayLayer:0,arrayLayerCount:void 0})};var Qe=class r$11 extends l{width;height;updateTimestamp;get[Symbol.toStringTag](){return`ExternalTexture`}constructor(e,t){super(e,t,r$11.defaultProps);let i=this.props.source?e.getExternalImageSize(this.props.source):null;this.width=this.props.width||i?.width||0,this.height=this.props.height||i?.height||0,this.updateTimestamp=e.incrementTimestamp()}static defaultProps=s(r({},l.defaultProps),{source:void 0,width:0,height:0,colorSpace:`srgb`,sampler:{}})};function Ht(r$12,e,t){let i=``,s$3=e.split(/\r?\n/),n=r$12.slice().sort((o,a)=>o.lineNum-a.lineNum);switch(t?.showSourceCode||`no`){case`all`:let o=0;for(let a=1;a<=s$3.length;a++){let c=s$3[a-1],h=n[o];for(c&&h&&(i+=Vt(c,a,t));n.length>o&&h.lineNum===a;){let p=n[o++];p&&(i+=Ye(p,s$3,p.lineNum,s(r({},t),{inlineSource:!1})))}}for(;n.length>o;){let a=n[o++];a&&(i+=Ye(a,[],0,s(r({},t),{inlineSource:!1})))}return i;case`issues`:case`no`:for(let a of r$12)i+=Ye(a,s$3,a.lineNum,{inlineSource:t?.showSourceCode!==`no`});return i}}function Ye(r,e,t,i){if(i?.inlineSource)return`
3
+ ${ii(e,t)}${r.linePos>0?`${` `.repeat(r.linePos+5)}^^^
4
+ `:``}${r.type.toUpperCase()}: ${r.message}
5
+
6
+ `;let s=r.type===`error`?`red`:`orange`;return i?.html?`<div class='luma-compiler-log-${r.type}' style="color:${s};"><b> ${r.type.toUpperCase()}: ${r.message}</b></div>`:`${r.type.toUpperCase()}: ${r.message}`}function ii(r,e,t){let i=``;for(let s=e-2;s<=e;s++){let n=r[s-1];n!==void 0&&(i+=Vt(n,e,t))}return i}function Vt(r,e,t){let i=t?.html?ni(r):r;return`${si(String(e),4)}: ${i}${t?.html?`<br/>`:`
7
+ `}`}function si(r,e){let t=``;for(let i=r.length;i<e;++i)t+=` `;return t+r}function ni(r){return r.replaceAll(`&`,`&amp;`).replaceAll(`<`,`&lt;`).replaceAll(`>`,`&gt;`).replaceAll(`"`,`&quot;`).replaceAll(`'`,`&#039;`)}var X=class r$13 extends l{get[Symbol.toStringTag](){return`Shader`}stage;source;compilationStatus=`pending`;constructor(e,t){t=s(r({},t),{debugShaders:t.debugShaders||e.props.debugShaders||`errors`}),super(e,r({id:oi(t)},t),r$13.defaultProps),this.stage=this.props.stage,this.source=this.props.source}getCompilationInfoSync(){return null}getTranslatedSource(){return null}async debugShader(){let e=this.props.debugShaders;switch(e){case`never`:return;case`errors`:if(this.compilationStatus===`success`)return;break;case`warnings`:case`always`:break}try{let t=await this.getCompilationInfo();if(e===`warnings`&&t?.length===0)return;this._displayShaderLog(t,this.id)}catch(t){f.warn(`Shader ${this.id}: failed to fetch compilation info during debug logging`,t)()}}_displayShaderLog(e,t){if(typeof document>`u`||!document?.createElement)return;let i=t,s=`${this.stage} shader "${i}"`,n=Ht(e,this.source,{showSourceCode:`all`,html:!0}),o=this.getTranslatedSource(),a=document.createElement(`div`);a.innerHTML=`<h1>Compilation error in ${s}</h1>
8
+ <div style="display:flex;position:fixed;top:10px;right:20px;gap:2px;">
9
+ <button id="copy">Copy source</button><br/>
10
+ <button id="close">Close</button>
11
+ </div>
12
+ <code><pre>${n}</pre></code>`,o&&(a.innerHTML+=`<br /><h1>Translated Source</h1><br /><br /><code><pre>${o}</pre></code>`),a.style.top=`0`,a.style.left=`0`,a.style.background=`white`,a.style.position=`fixed`,a.style.zIndex=`9999`,a.style.maxWidth=`100vw`,a.style.maxHeight=`100vh`,a.style.overflowY=`auto`,document.body.appendChild(a),a.querySelector(`.luma-compiler-log-error`)?.scrollIntoView(),a.querySelector(`button#close`).onclick=()=>{a.remove()},a.querySelector(`button#copy`).onclick=()=>{navigator.clipboard.writeText(this.source)}}static defaultProps=s(r({},l.defaultProps),{language:`auto`,stage:void 0,source:``,sourceMap:null,entryPoint:`main`,debugShaders:void 0})};function oi(r){return ai(r.source)||r.id||w(`unnamed ${r.stage}-shader`)}function ai(r,e=`unnamed`){return/#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/.exec(r)?.[1]??e}var Xe=class r$14 extends l{get[Symbol.toStringTag](){return`Framebuffer`}width;height;constructor(e,t={}){super(e,t,r$14.defaultProps),this.width=this.props.width,this.height=this.props.height}clone(e){let t=this.colorAttachments.map(s=>s.texture.clone(e)),i=this.depthStencilAttachment&&this.depthStencilAttachment.texture.clone(e);return this.device.createFramebuffer(s(r(r({},this.props),e),{colorAttachments:t,depthStencilAttachment:i}))}resize(e){let t=!e;if(e){let[i,s]=Array.isArray(e)?e:[e.width,e.height];t=t||s!==this.height||i!==this.width,this.width=i,this.height=s}t&&(f.log(2,`Resizing framebuffer ${this.id} to ${this.width}x${this.height}`)(),this.resizeAttachments(this.width,this.height))}autoCreateAttachmentTextures(){if(this.props.colorAttachments.length===0&&!this.props.depthStencilAttachment)throw new Error(`Framebuffer has noattachments`);this.colorAttachments=this.props.colorAttachments.map((t,i)=>{if(typeof t==`string`){let s=this.createColorTexture(t,i);return this.attachResource(s),s.view}return t instanceof v?t.view:t});let e=this.props.depthStencilAttachment;if(e)if(typeof e==`string`){let t=this.createDepthStencilTexture(e);this.attachResource(t),this.depthStencilAttachment=t.view}else e instanceof v?this.depthStencilAttachment=e.view:this.depthStencilAttachment=e}createColorTexture(e,t){return this.device.createTexture({id:`${this.id}-color-attachment-${t}`,usage:v.RENDER_ATTACHMENT,format:e,width:this.width,height:this.height,sampler:{magFilter:`linear`,minFilter:`linear`}})}createDepthStencilTexture(e){return this.device.createTexture({id:`${this.id}-depth-stencil-attachment`,usage:v.RENDER_ATTACHMENT|v.SAMPLE,format:e,width:this.width,height:this.height})}resizeAttachments(e,t){if(this.colorAttachments.forEach((i,s)=>{let n=i.texture.clone({width:e,height:t});this.destroyAttachedResource(i),this.colorAttachments[s]=n.view,this.attachResource(n.view)}),this.depthStencilAttachment){let i=this.depthStencilAttachment.texture.clone({width:e,height:t});this.destroyAttachedResource(this.depthStencilAttachment),this.depthStencilAttachment=i.view,this.attachResource(i)}this.updateAttachments()}static defaultProps=s(r({},l.defaultProps),{width:1,height:1,colorAttachments:[],depthStencilAttachment:null})};var L=class r$15 extends l{get[Symbol.toStringTag](){return`RenderPipeline`}shaderLayout;bufferLayout;linkStatus=`pending`;hash=``;sharedRenderPipeline=null;get isPending(){return this.linkStatus===`pending`||this.vs.compilationStatus===`pending`||this.fs?.compilationStatus===`pending`}get isErrored(){return this.linkStatus===`error`||this.vs.compilationStatus===`error`||this.fs?.compilationStatus===`error`}constructor(e,t){super(e,t,r$15.defaultProps),this.shaderLayout=this.props.shaderLayout,this.bufferLayout=this.props.bufferLayout||[],this.sharedRenderPipeline=this.props._sharedRenderPipeline||null}static defaultProps=s(r({},l.defaultProps),{vs:null,vertexEntryPoint:`vertexMain`,vsConstants:{},fs:null,fragmentEntryPoint:`fragmentMain`,fsConstants:{},shaderLayout:null,bufferLayout:[],topology:`triangle-list`,colorAttachmentFormats:void 0,depthStencilAttachmentFormat:void 0,parameters:{},varyings:void 0,bufferMode:void 0,disableWarnings:!1,_sharedRenderPipeline:void 0,_uniformBlockLayouts:[],bindings:void 0,bindGroups:void 0})};var Je=class extends l{get[Symbol.toStringTag](){return`SharedRenderPipeline`}constructor(e,t){super(e,t,s(r({},l.defaultProps),{handle:void 0,vs:void 0,fs:void 0,varyings:void 0,bufferMode:void 0}))}};var N=class r$16 extends l{get[Symbol.toStringTag](){return`ComputePipeline`}hash=``;shaderLayout;constructor(e,t){super(e,t,r$16.defaultProps),this.shaderLayout=t.shaderLayout}static defaultProps=s(r({},l.defaultProps),{shader:void 0,entryPoint:void 0,constants:{},shaderLayout:void 0})};var qe=class r$17{static defaultProps=r({},L.defaultProps);static getDefaultPipelineFactory(e){let t=e.getModuleData(`@luma.gl/core`);return t.defaultPipelineFactory||=new r$17(e),t.defaultPipelineFactory}device;_hashCounter=0;_hashes={};_renderPipelineCache={};_computePipelineCache={};_sharedRenderPipelineCache={};get[Symbol.toStringTag](){return`PipelineFactory`}toString(){return`PipelineFactory(${this.device.id})`}constructor(e){this.device=e}createRenderPipeline(e){if(!this.device.props._cachePipelines)return this.device.createRenderPipeline(e);let t=r(r({},L.defaultProps),e),i=this._renderPipelineCache,s$4=this._hashRenderPipeline(t),n=i[s$4]?.resource;if(n)i[s$4].useCount++,this.device.props.debugFactories&&f.log(3,`${this}: ${i[s$4].resource} reused, count=${i[s$4].useCount}, (id=${e.id})`)();else{let o=this.device.type===`webgl`&&this.device.props._sharePipelines?this.createSharedRenderPipeline(t):void 0;n=this.device.createRenderPipeline(s(r({},t),{id:t.id?`${t.id}-cached`:w(`unnamed-cached`),_sharedRenderPipeline:o})),n.hash=s$4,i[s$4]={resource:n,useCount:1},this.device.props.debugFactories&&f.log(3,`${this}: ${n} created, count=${i[s$4].useCount}`)()}return n}createComputePipeline(e){if(!this.device.props._cachePipelines)return this.device.createComputePipeline(e);let t=r(r({},N.defaultProps),e),i=this._computePipelineCache,s$5=this._hashComputePipeline(t),n=i[s$5]?.resource;return n?(i[s$5].useCount++,this.device.props.debugFactories&&f.log(3,`${this}: ${i[s$5].resource} reused, count=${i[s$5].useCount}, (id=${e.id})`)()):(n=this.device.createComputePipeline(s(r({},t),{id:t.id?`${t.id}-cached`:void 0})),n.hash=s$5,i[s$5]={resource:n,useCount:1},this.device.props.debugFactories&&f.log(3,`${this}: ${n} created, count=${i[s$5].useCount}`)()),n}release(e){if(!this.device.props._cachePipelines){e.destroy();return}let t=this._getCache(e),i=e.hash;t[i].useCount--,t[i].useCount===0?(this._destroyPipeline(e),this.device.props.debugFactories&&f.log(3,`${this}: ${e} released and destroyed`)()):t[i].useCount<0?(f.error(`${this}: ${e} released, useCount < 0, resetting`)(),t[i].useCount=0):this.device.props.debugFactories&&f.log(3,`${this}: ${e} released, count=${t[i].useCount}`)()}createSharedRenderPipeline(e){let t=this._hashSharedRenderPipeline(e),i=this._sharedRenderPipelineCache[t];return i||(i={resource:this.device._createSharedRenderPipelineWebGL(e),useCount:0},this._sharedRenderPipelineCache[t]=i),i.useCount++,i.resource}releaseSharedRenderPipeline(e){if(!e.sharedRenderPipeline)return;let t=this._hashSharedRenderPipeline(e.sharedRenderPipeline.props),i=this._sharedRenderPipelineCache[t];i&&(i.useCount--,i.useCount===0&&(i.resource.destroy(),delete this._sharedRenderPipelineCache[t]))}_destroyPipeline(e){let t=this._getCache(e);return this.device.props._destroyPipelines?(delete t[e.hash],e.destroy(),e instanceof L&&this.releaseSharedRenderPipeline(e),!0):!1}_getCache(e){let t;if(e instanceof N&&(t=this._computePipelineCache),e instanceof L&&(t=this._renderPipelineCache),!t)throw new Error(`${this}`);if(!t[e.hash])throw new Error(`${this}: ${e} matched incorrect entry`);return t}_hashComputePipeline(e){let{type:t}=this.device;return`${t}/C/${this._getHash(e.shader.source)}SL${this._getHash(JSON.stringify(e.shaderLayout))}`}_hashRenderPipeline(e){let t=e.vs?this._getHash(e.vs.source):0,i=e.fs?this._getHash(e.fs.source):0,s=this._getWebGLVaryingHash(e),n=this._getHash(JSON.stringify(e.shaderLayout)),o=this._getHash(JSON.stringify(e._uniformBlockLayouts)),a=this._getHash(JSON.stringify(e.bufferLayout)),{type:c}=this.device;if(c===`webgl`){let h=this._getHash(JSON.stringify(e.parameters));return`${c}/R/${t}/${i}V${s}T${e.topology}P${h}SL${n}UBL${o}BL${a}`}else{let p=this._getHash(JSON.stringify({vertexEntryPoint:e.vertexEntryPoint,fragmentEntryPoint:e.fragmentEntryPoint})),g=this._getHash(JSON.stringify(e.parameters)),C=this._getWebGPUAttachmentHash(e);return`${c}/R/${t}/${i}V${s}T${e.topology}EP${p}P${g}SL${n}BL${a}A${C}`}}_hashSharedRenderPipeline(e){return`webgl/S/${e.vs?this._getHash(e.vs.source):0}/${e.fs?this._getHash(e.fs.source):0}V${this._getWebGLVaryingHash(e)}`}_getHash(e){return this._hashes[e]===void 0&&(this._hashes[e]=this._hashCounter++),this._hashes[e]}_getWebGLVaryingHash(e){let{varyings:t=[],bufferMode:i=null}=e;return this._getHash(JSON.stringify({varyings:t,bufferMode:i}))}_getWebGPUAttachmentHash(e){let t=e.colorAttachmentFormats??[this.device.preferredColorFormat],i=e.depthStencilAttachmentFormat??(e.parameters?.depthWriteEnabled?this.device.preferredDepthFormat:null);return this._getHash(JSON.stringify({colorAttachmentFormats:t,depthStencilAttachmentFormat:i}))}};var Ke=class r$18{static defaultProps=r({},X.defaultProps);static getDefaultShaderFactory(e){let t=e.getModuleData(`@luma.gl/core`);return t.defaultShaderFactory||=new r$18(e),t.defaultShaderFactory}device;_cache={};get[Symbol.toStringTag](){return`ShaderFactory`}toString(){return`${this[Symbol.toStringTag]}(${this.device.id})`}constructor(e){this.device=e}createShader(e){if(!this.device.props._cacheShaders)return this.device.createShader(e);let t=this._hashShader(e),i=this._cache[t];if(i)i.useCount++,this.device.props.debugFactories&&f.log(3,`${this}: Reusing shader ${i.resource.id} count=${i.useCount}`)();else{let s$6=this.device.createShader(s(r({},e),{id:e.id?`${e.id}-cached`:void 0}));this._cache[t]=i={resource:s$6,useCount:1},this.device.props.debugFactories&&f.log(3,`${this}: Created new shader ${s$6.id}`)()}return i.resource}release(e){if(!this.device.props._cacheShaders){e.destroy();return}let t=this._hashShader(e),i=this._cache[t];if(i)if(i.useCount--,i.useCount===0)this.device.props._destroyShaders&&(delete this._cache[t],i.resource.destroy(),this.device.props.debugFactories&&f.log(3,`${this}: Releasing shader ${e.id}, destroyed`)());else{if(i.useCount<0)throw new Error(`ShaderFactory: Shader ${e.id} released too many times`);this.device.props.debugFactories&&f.log(3,`${this}: Releasing shader ${e.id} count=${i.useCount}`)()}}_hashShader(e){return`${e.stage}:${e.source}`}};function jt(r,e,t){let i=r.bindings.find(s=>s.name===e||`${s.name.toLocaleLowerCase()}uniforms`===e.toLocaleLowerCase());return!i&&!t?.ignoreWarnings&&f.warn(`Binding ${e} not set: Not found in shader layout.`)(),i||null}function ui(r$19,e){if(!e)return{};if(fi(e))return Object.fromEntries(Object.entries(e).map(([s,n])=>[Number(s),r({},n)]));let t={};for(let[i,s]of Object.entries(e)){let o=jt(r$19,i)?.group??0;t[o]||={},t[o][i]=s}return t}function ci(r){let e={};for(let t of Object.values(r))Object.assign(e,t);return e}function fi(r){let e=Object.keys(r);return e.length>0&&e.every(t=>/^\d+$/.test(t))}var Ze=class r$20 extends l{static defaultClearColor=[0,0,0,1];static defaultClearDepth=1;static defaultClearStencil=0;get[Symbol.toStringTag](){return`RenderPass`}constructor(e,t,i=r$20.defaultProps){t=r$20.normalizeProps(e,t),super(e,t,i)}static normalizeProps(e,t){return t}static defaultProps=s(r({},l.defaultProps),{framebuffer:null,resolveTargets:void 0,parameters:void 0,clearColor:r$20.defaultClearColor,clearColors:void 0,clearDepth:r$20.defaultClearDepth,clearStencil:r$20.defaultClearStencil,depthReadOnly:!1,stencilReadOnly:!1,discard:!1,occlusionQuerySet:void 0,timestampQuerySet:void 0,beginTimestampIndex:void 0,endTimestampIndex:void 0})};var et=class r$21 extends l{get[Symbol.toStringTag](){return`CommandEncoder`}_timeProfilingQuerySet=null;_timeProfilingSlotCount=0;_gpuTimeMs;constructor(e,t){super(e,t,r$21.defaultProps),this._timeProfilingQuerySet=t.timeProfilingQuerySet??null,this._timeProfilingSlotCount=0,this._gpuTimeMs=void 0}async resolveTimeProfilingQuerySet(){if(this._gpuTimeMs=void 0,!this._timeProfilingQuerySet)return;let e=Math.floor(this._timeProfilingSlotCount/2);if(e<=0)return;let t=e*2,i=await this._timeProfilingQuerySet.readResults({firstQuery:0,queryCount:t}),s=0n;for(let n=0;n<t;n+=2)s+=i[n+1]-i[n];this._gpuTimeMs=Number(s)/1e6}getTimeProfilingSlotCount(){return this._timeProfilingSlotCount}getTimeProfilingQuerySet(){return this._timeProfilingQuerySet}_applyTimeProfilingToPassProps(e){let t=e||{};if(!this._supportsTimestampQueries()||!this._timeProfilingQuerySet||t.timestampQuerySet!==void 0||t.beginTimestampIndex!==void 0||t.endTimestampIndex!==void 0)return t;let i=this._timeProfilingSlotCount;return i+1>=this._timeProfilingQuerySet.props.count?t:(this._timeProfilingSlotCount+=2,s(r({},t),{timestampQuerySet:this._timeProfilingQuerySet,beginTimestampIndex:i,endTimestampIndex:i+1}))}_supportsTimestampQueries(){return this.device.features.has(`timestamp-query`)}static defaultProps=s(r({},l.defaultProps),{measureExecutionTime:void 0,timeProfilingQuerySet:void 0})};var tt=class r$22 extends l{get[Symbol.toStringTag](){return`CommandBuffer`}constructor(e,t){super(e,t,r$22.defaultProps)}static defaultProps=r({},l.defaultProps)};var rt=class r$23 extends l{static defaultProps=s(r({},l.defaultProps),{shaderLayout:void 0,bufferLayout:[]});get[Symbol.toStringTag](){return`VertexArray`}maxVertexAttributes;indexBuffer=null;attributes;constructor(e,t){super(e,t,r$23.defaultProps),this.maxVertexAttributes=e.limits.maxVertexAttributes,this.attributes=new Array(this.maxVertexAttributes).fill(null)}getBufferSlot(e){return null}getDrawValidationError(){return null}setConstantWebGL(e,t){this.device.reportError(new Error(`constant attributes not supported`),this)()}};var it=class r$24 extends l{static defaultProps=s(r({},l.defaultProps),{layout:void 0,buffers:{}});get[Symbol.toStringTag](){return`TransformFeedback`}constructor(e,t){super(e,t,r$24.defaultProps)}};var st=class r$25 extends l{get[Symbol.toStringTag](){return`QuerySet`}constructor(e,t){super(e,t,r$25.defaultProps)}static defaultProps=s(r({},l.defaultProps),{type:void 0,count:void 0})};var nt=class r$26 extends l{static defaultProps=r({},l.defaultProps);get[Symbol.toStringTag](){return`Fence`}constructor(e,t={}){super(e,t,r$26.defaultProps)}};function de(r){let t=mi[he(r)];if(!t)throw new Error(`Unsupported variable shader type: ${r}`);return t}function Qt(r){let t=hi[Yt(r)];if(!t)throw new Error(`Unsupported attribute shader type: ${r}`);let[i,s]=t,n=i===`i32`||i===`u32`,o=i!==`u32`;return{primitiveType:i,components:s,byteLength:di[i]*s,integer:n,signed:o}}var ot=class{getVariableShaderTypeInfo(e){return de(e)}getAttributeShaderTypeInfo(e){return Qt(e)}makeShaderAttributeType(e,t){return li(e,t)}resolveAttributeShaderTypeAlias(e){return Yt(e)}resolveVariableShaderTypeAlias(e){return he(e)}};function li(r,e){return e===1?r:`vec${e}<${r}>`}function Yt(r){return pi[r]||r}function he(r){return gi[r]||r}var J=new ot;var di={f32:4,f16:2,i32:4,u32:4};var hi={f32:[`f32`,1],"vec2<f32>":[`f32`,2],"vec3<f32>":[`f32`,3],"vec4<f32>":[`f32`,4],f16:[`f16`,1],"vec2<f16>":[`f16`,2],"vec3<f16>":[`f16`,3],"vec4<f16>":[`f16`,4],i32:[`i32`,1],"vec2<i32>":[`i32`,2],"vec3<i32>":[`i32`,3],"vec4<i32>":[`i32`,4],u32:[`u32`,1],"vec2<u32>":[`u32`,2],"vec3<u32>":[`u32`,3],"vec4<u32>":[`u32`,4]};var mi={f32:{type:`f32`,components:1},f16:{type:`f16`,components:1},i32:{type:`i32`,components:1},u32:{type:`u32`,components:1},"vec2<f32>":{type:`f32`,components:2},"vec3<f32>":{type:`f32`,components:3},"vec4<f32>":{type:`f32`,components:4},"vec2<f16>":{type:`f16`,components:2},"vec3<f16>":{type:`f16`,components:3},"vec4<f16>":{type:`f16`,components:4},"vec2<i32>":{type:`i32`,components:2},"vec3<i32>":{type:`i32`,components:3},"vec4<i32>":{type:`i32`,components:4},"vec2<u32>":{type:`u32`,components:2},"vec3<u32>":{type:`u32`,components:3},"vec4<u32>":{type:`u32`,components:4},"mat2x2<f32>":{type:`f32`,components:4},"mat2x3<f32>":{type:`f32`,components:6},"mat2x4<f32>":{type:`f32`,components:8},"mat3x2<f32>":{type:`f32`,components:6},"mat3x3<f32>":{type:`f32`,components:9},"mat3x4<f32>":{type:`f32`,components:12},"mat4x2<f32>":{type:`f32`,components:8},"mat4x3<f32>":{type:`f32`,components:12},"mat4x4<f32>":{type:`f32`,components:16},"mat2x2<f16>":{type:`f16`,components:4},"mat2x3<f16>":{type:`f16`,components:6},"mat2x4<f16>":{type:`f16`,components:8},"mat3x2<f16>":{type:`f16`,components:6},"mat3x3<f16>":{type:`f16`,components:9},"mat3x4<f16>":{type:`f16`,components:12},"mat4x2<f16>":{type:`f16`,components:8},"mat4x3<f16>":{type:`f16`,components:12},"mat4x4<f16>":{type:`f16`,components:16},"mat2x2<i32>":{type:`i32`,components:4},"mat2x3<i32>":{type:`i32`,components:6},"mat2x4<i32>":{type:`i32`,components:8},"mat3x2<i32>":{type:`i32`,components:6},"mat3x3<i32>":{type:`i32`,components:9},"mat3x4<i32>":{type:`i32`,components:12},"mat4x2<i32>":{type:`i32`,components:8},"mat4x3<i32>":{type:`i32`,components:12},"mat4x4<i32>":{type:`i32`,components:16},"mat2x2<u32>":{type:`u32`,components:4},"mat2x3<u32>":{type:`u32`,components:6},"mat2x4<u32>":{type:`u32`,components:8},"mat3x2<u32>":{type:`u32`,components:6},"mat3x3<u32>":{type:`u32`,components:9},"mat3x4<u32>":{type:`u32`,components:12},"mat4x2<u32>":{type:`u32`,components:8},"mat4x3<u32>":{type:`u32`,components:12},"mat4x4<u32>":{type:`u32`,components:16}};var pi={vec2i:`vec2<i32>`,vec3i:`vec3<i32>`,vec4i:`vec4<i32>`,vec2u:`vec2<u32>`,vec3u:`vec3<u32>`,vec4u:`vec4<u32>`,vec2f:`vec2<f32>`,vec3f:`vec3<f32>`,vec4f:`vec4<f32>`,vec2h:`vec2<f16>`,vec3h:`vec3<f16>`,vec4h:`vec4<f16>`};var gi={vec2i:`vec2<i32>`,vec3i:`vec3<i32>`,vec4i:`vec4<i32>`,vec2u:`vec2<u32>`,vec3u:`vec3<u32>`,vec4u:`vec4<u32>`,vec2f:`vec2<f32>`,vec3f:`vec3<f32>`,vec4f:`vec4<f32>`,vec2h:`vec2<f16>`,vec3h:`vec3<f16>`,vec4h:`vec4<f16>`,mat2x2f:`mat2x2<f32>`,mat2x3f:`mat2x3<f32>`,mat2x4f:`mat2x4<f32>`,mat3x2f:`mat3x2<f32>`,mat3x3f:`mat3x3<f32>`,mat3x4f:`mat3x4<f32>`,mat4x2f:`mat4x2<f32>`,mat4x3f:`mat4x3<f32>`,mat4x4f:`mat4x4<f32>`,mat2x2i:`mat2x2<i32>`,mat2x3i:`mat2x3<i32>`,mat2x4i:`mat2x4<i32>`,mat3x2i:`mat3x2<i32>`,mat3x3i:`mat3x3<i32>`,mat3x4i:`mat3x4<i32>`,mat4x2i:`mat4x2<i32>`,mat4x3i:`mat4x3<i32>`,mat4x4i:`mat4x4<i32>`,mat2x2u:`mat2x2<u32>`,mat2x3u:`mat2x3<u32>`,mat2x4u:`mat2x4<u32>`,mat3x2u:`mat3x2<u32>`,mat3x3u:`mat3x3<u32>`,mat3x4u:`mat3x4<u32>`,mat4x2u:`mat4x2<u32>`,mat4x3u:`mat4x3<u32>`,mat4x4u:`mat4x4<u32>`,mat2x2h:`mat2x2<f16>`,mat2x3h:`mat2x3<f16>`,mat2x4h:`mat2x4<f16>`,mat3x2h:`mat3x2<f16>`,mat3x3h:`mat3x3<f16>`,mat3x4h:`mat3x4<f16>`,mat4x2h:`mat4x2<f16>`,mat4x3h:`mat4x3<f16>`,mat4x4h:`mat4x4<f16>`};function ut(r$27,e={}){let t=r({},r$27),i=e.layout??`std140`,s={},n=0;for(let[o,a]of Object.entries(t))n=at(s,o,a,n,i);return n=_(n,D(t,i)),{layout:i,byteLength:n*4,uniformTypes:t,fields:s}}function q(r,e){let t=he(r),i=de(t),s=/^mat(\d)x(\d)<.+>$/.exec(t);if(s){let o=Number(s[1]),a=Number(s[2]),c=Xt(a,t,i.type,e),h=yi(c.size,c.alignment,e);return{alignment:c.alignment,size:o*h,components:o*a,columns:o,rows:a,columnStride:h,shaderType:t,type:i.type}}let n=/^vec(\d)<.+>$/.exec(t);return n?Xt(Number(n[1]),t,i.type,e):{alignment:1,size:1,components:1,columns:1,rows:1,columnStride:1,shaderType:t,type:i.type}}function ct(r){return!!r&&typeof r==`object`&&!Array.isArray(r)}function at(r$28,e,t,i,s){if(typeof t==`string`){let n=q(t,s),o=_(i,n.alignment);return r$28[e]=r({offset:o},n),o+n.size}if(Array.isArray(t)){if(Array.isArray(t[0]))throw new Error(`Nested arrays are not supported for ${e}`);let n=t[0],o=t[1],a=qt(n,s),c=_(i,D(t,s));for(let h=0;h<o;h++)at(r$28,`${e}[${h}]`,n,c+h*a,s);return c+a*o}if(ct(t)){let n=D(t,s),o=_(i,n);for(let[a,c]of Object.entries(t))o=at(r$28,`${e}.${a}`,c,o,s);return _(o,n)}throw new Error(`Unsupported CompositeShaderType for ${e}`)}function Jt(r,e){if(typeof r==`string`)return q(r,e).size;if(Array.isArray(r)){let i=r[0],s=r[1];if(Array.isArray(i))throw new Error(`Nested arrays are not supported`);return qt(i,e)*s}let t=0;for(let i of Object.values(r)){let s=i;t=_(t,D(s,e)),t+=Jt(s,e)}return _(t,D(r,e))}function D(r,e){if(typeof r==`string`)return q(r,e).alignment;if(Array.isArray(r)){let i=r[0],s=D(i,e);return Kt(e)?Math.max(s,4):s}let t=1;for(let i of Object.values(r)){let s=D(i,e);t=Math.max(t,s)}return Ei(e)?Math.max(t,4):t}function Xt(r,e,t,i){return{alignment:r===2?2:4,size:r===3?3:r,components:r,columns:1,rows:r,columnStride:r===3?3:r,shaderType:e,type:t}}function qt(r,e){return bi(Jt(r,e),D(r,e),e)}function bi(r,e,t){return _(r,Kt(t)?4:e)}function yi(r,e,t){return t===`std140`?4:_(r,e)}function Kt(r){return r===`std140`||r===`wgsl-uniform`}function Ei(r){return r===`std140`||r===`wgsl-uniform`}var me;function ft(r){return(!me||me.byteLength<r)&&(me=new ArrayBuffer(r)),me}function _i(r,e){return new r(ft(r.BYTES_PER_ELEMENT*e),0,e)}function xi(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function F(r){return Array.isArray(r)?r.length===0||typeof r[0]==`number`:xi(r)}var pe=class{layout;constructor(e){this.layout=e}has(e){return!!this.layout.fields[e]}get(e){let t=this.layout.fields[e];return t?{offset:t.offset,size:t.size}:void 0}getFlatUniformValues(e){let t={};for(let[i,s]of Object.entries(e)){let n=this.layout.uniformTypes[i];n?this._flattenCompositeValue(t,i,n,s):this.layout.fields[i]&&(t[i]=s)}return t}getData(e){let t=ft(this.layout.byteLength);new Uint8Array(t,0,this.layout.byteLength).fill(0);let i={i32:new Int32Array(t),u32:new Uint32Array(t),f32:new Float32Array(t),f16:new Uint16Array(t)},s=this.getFlatUniformValues(e);for(let[n,o]of Object.entries(s))this._writeLeafValue(i,n,o);return new Uint8Array(t,0,this.layout.byteLength)}_flattenCompositeValue(e,t,i,s){if(s!==void 0){if(typeof i==`string`||this.layout.fields[t]){e[t]=s;return}if(Array.isArray(i)){let n=i[0],o=i[1];if(Array.isArray(n))throw new Error(`Nested arrays are not supported for ${t}`);if(typeof n==`string`&&F(s)){this._flattenPackedArray(e,t,n,o,s);return}if(!Array.isArray(s)){f.warn(`Unsupported uniform array value for ${t}:`,s)();return}for(let a=0;a<Math.min(s.length,o);a++){let c=s[a];c!==void 0&&this._flattenCompositeValue(e,`${t}[${a}]`,n,c)}return}if(ct(i)&&Ti(s)){for(let[n,o]of Object.entries(s)){if(o===void 0)continue;let a=`${t}.${n}`;this._flattenCompositeValue(e,a,i[n],o)}return}f.warn(`Unsupported uniform value for ${t}:`,s)()}}_flattenPackedArray(e,t,i,s,n){let o=n,c=q(i,this.layout.layout).components;for(let h=0;h<s;h++){let p=h*c;if(p>=o.length)break;c===1?e[`${t}[${h}]`]=Number(o[p]):e[`${t}[${h}]`]=wi(n,p,p+c)}}_writeLeafValue(e,t,i){let s=this.layout.fields[t];if(!s){f.warn(`Uniform ${t} not found in layout`)();return}let{type:n,components:o,columns:a,rows:c,offset:h,columnStride:p}=s,g=e[n];if(o===1){g[h]=Number(i);return}let C=i;if(a===1){for(let E=0;E<o;E++)g[h+E]=Number(C[E]??0);return}let be=0;for(let E=0;E<a;E++){let k=h+E*p;for(let z=0;z<c;z++)g[k+z]=Number(C[be++]??0)}}};function Ti(r){return!!r&&typeof r==`object`&&!Array.isArray(r)&&!ArrayBuffer.isView(r)}function wi(r,e,t){return Array.prototype.slice.call(r,e,t)}var Pi=128;function Zt(r,e,t=16){if(r===e)return!0;let i=r,s=e;if(!F(i)||!F(s)||i.length!==s.length)return!1;let n=Math.min(t,Pi);if(i.length>n)return!1;for(let o=0;o<i.length;++o)if(s[o]!==i[o])return!1;return!0}function er(r){return F(r)?r.slice():r}var ge=class{name;uniforms={};modifiedUniforms={};modified=!0;bindingLayout={};needsRedraw=`initialized`;constructor(e){if(this.name=e?.name||`unnamed`,e?.name&&e?.shaderLayout){let t=e?.shaderLayout.bindings?.find(s=>s.type===`uniform`&&s.name===e?.name);if(!t)throw new Error(e?.name);let i=t;for(let s of i.uniforms||[])this.bindingLayout[s.name]=s}}setUniforms(e){for(let[t,i]of Object.entries(e))this._setUniform(t,i)&&!this.needsRedraw&&this.setNeedsRedraw(`${this.name}.${t}=${i}`)}setNeedsRedraw(e){this.needsRedraw=this.needsRedraw||e}getAllUniforms(){return this.modifiedUniforms={},this.needsRedraw=!1,this.uniforms||{}}_setUniform(e,t){return Zt(this.uniforms[e],t)?!1:(this.uniforms[e]=er(t),this.modifiedUniforms[e]=!0,this.modified=!0,!0)}};var Ri=1024;var lt=class{device;uniformBlocks=new Map;shaderBlockLayouts=new Map;shaderBlockWriters=new Map;uniformBuffers=new Map;constructor(e,t){this.device=e;for(let[i,s]of Object.entries(t)){let n=i,o=ut(s.uniformTypes??{},{layout:s.layout??Si(e)}),a=new pe(o);this.shaderBlockLayouts.set(n,o),this.shaderBlockWriters.set(n,a);let c=new ge({name:i});c.setUniforms(a.getFlatUniformValues(s.defaultUniforms||{})),this.uniformBlocks.set(n,c)}}destroy(){for(let e of this.uniformBuffers.values())e.destroy()}setUniforms(e,t){for(let[i,s]of Object.entries(e)){let n=i,a=this.shaderBlockWriters.get(n)?.getFlatUniformValues(s||{});this.uniformBlocks.get(n)?.setUniforms(a||{})}this.updateUniformBuffers(t)}getUniformBufferByteLength(e){let t=this.shaderBlockLayouts.get(e)?.byteLength||0;return Math.max(t,Ri)}getUniformBufferData(e){let t=this.uniformBlocks.get(e)?.getAllUniforms()||{};return this.shaderBlockWriters.get(e)?.getData(t)||new Uint8Array(0)}createUniformBuffer(e,t){t&&this.setUniforms(t);let i=this.getUniformBufferByteLength(e),s=this.device.createBuffer({usage:P.UNIFORM|P.COPY_DST,byteLength:i}),n=this.getUniformBufferData(e);return s.write(n),s}getManagedUniformBuffer(e){if(!this.uniformBuffers.get(e)){let t=this.getUniformBufferByteLength(e),i=this.device.createBuffer({usage:P.UNIFORM|P.COPY_DST,byteLength:t});this.uniformBuffers.set(e,i)}return this.uniformBuffers.get(e)}updateUniformBuffers(e){let t=!1;for(let i of this.uniformBlocks.keys()){let s=this.updateUniformBuffer(i,e);t||=s}return t&&f.log(3,`UniformStore.updateUniformBuffers(): ${t}`)(),t}updateUniformBuffer(e,t){let i=this.uniformBlocks.get(e),s=this.uniformBuffers.get(e),n=!1;if(s&&i?.needsRedraw){n||=i.needsRedraw;let o=this.getUniformBufferData(e);s=this.uniformBuffers.get(e),s&&(t?this.device.writeBufferViaCommandEncoder(t,s,o):s.write(o));let a=this.uniformBlocks.get(e)?.getAllUniforms();f.log(4,`Writing to uniform buffer ${String(e)}`,o,a)()}return n}};function Si(r){return r.type===`webgpu`?`wgsl-uniform`:`std140`}function vi(r){return r.attributes?r.attributes.map(e=>e.attribute):[r.name]}function Ci(r){return Object.fromEntries(r.attributes.map(e=>[e.name,e.location]))}function Bi(r){let e=Infinity;for(let t of r)t!==void 0&&(e=Math.min(e,t));return e}function dt(r,e,t){Ai(e);let i=new Map;for(let s of e){let n=Li(s);if(s.attributes)for(let o of s.attributes)i.has(o.attribute)||i.set(o.attribute,{bufferName:s.name,stepMode:s.stepMode,vertexFormat:o.format,byteOffset:o.byteOffset,byteStride:n});else s.format&&!i.has(s.name)&&i.set(s.name,{bufferName:s.name,stepMode:s.stepMode,vertexFormat:s.format,byteOffset:0,byteStride:n})}return r.attributes.map(s=>{let n=i.get(s.name);!n&&t?.warnOnMissingBufferLayout&&f.warn(`layout for attribute "${s.name}" not present in buffer layout`)();let o=J.getAttributeShaderTypeInfo(s.type),a=n?.vertexFormat||R.getCompatibleVertexFormat(o);return{attributeName:s.name,bufferName:n?.bufferName||s.name,location:s.location,vertexFormat:a,byteOffset:n?.byteOffset??0,byteStride:n?.byteStride??R.getVertexFormatInfo(a).byteLength,stepMode:n?.stepMode||s.stepMode||(s.name.startsWith(`instance`)?`instance`:`vertex`)}}).sort((s,n)=>s.location-n.location)}function Ai(r){for(let e of r)(e.attributes&&e.format||!e.attributes&&!e.format)&&f.warn(`BufferLayout ${e.name} must have either 'attributes' or 'format' field`)()}function Li(r){if(typeof r.byteStride==`number`)return r.byteStride;if(r.attributes){let e=0;for(let t of r.attributes)e+=R.getVertexFormatInfo(t.format).byteLength;return e}return R.getVertexFormatInfo(r.format).byteLength}function Di(r,e){let t={},i=dt(r,e,{warnOnMissingBufferLayout:!0});for(let s of i){let n=Ui(r,s);t[s.attributeName]=n}return t}function Ui(r,e){let t=Ii(r,e.attributeName),i=J.getAttributeShaderTypeInfo(t.type),s=e.vertexFormat,n=R.getVertexFormatInfo(s);return{attributeName:e.attributeName,bufferName:e.bufferName,location:t.location,shaderType:t.type,primitiveType:i.primitiveType,shaderComponents:i.components,vertexFormat:s,bufferDataType:n.type,bufferComponents:n.components,normalized:n.normalized,integer:i.integer,stepMode:e.stepMode,byteOffset:e.byteOffset,byteStride:e.byteStride}}function Ii(r,e){let t=r.attributes.find(i=>i.name===e);return t||f.warn(`shader layout attribute "${e}" not present in shader`)(),t||null}export{ys as $,_i as A,le as B,Ve as C,Xe as D,X as E,ir as F,st as G,nt as H,it as I,ui as J,ti as K,j as L,de as M,et as N,Y as O,f as P,x as Q,je as R,Ut as S,We as T,qe as U,lt as V,rt as W,v as X,ut as Y,vi as Z,P as _,Di as a,R as b,He as c,Je as d,ze as et,Ke as f,Ne as g,N as h,Ci as i,ci as j,Ze as k,I as l,Mt as m,$e as n,Fe as o,L as p,tt as q,Bi as r,Ge as s,$ as t,J as u,Qe as v,Vr as w,Se as x,Qr as y,jt as z};
13
+ //# debugId=f60cf6ff-8f8c-5abb-88d0-0bf65ed6c1b1
@@ -0,0 +1,3 @@
1
+ import"./main.js";import"./chunk-CzASft0S.js";import"./chunk-BK2bFfek.js";import"./chunk-ConEJto8.js";import{_ as xt,a as Xs,c as ce,d as fn,f as ut,g as xs,h as wt,i as Tn,m as wn,o as _e,p as we,r as St,s as br,t as At,u as en}from"./chunk-Cg9Nd_Mm.js";export{en as ArcLayer,fn as BitmapLayer,xt as ColumnLayer,br as GeoJsonLayer,xs as GridCellLayer,ce as IconLayer,wn as LineLayer,_e as PathLayer,Tn as PointCloudLayer,Xs as PolygonLayer,ut as ScatterplotLayer,we as SolidPolygonLayer,At as TextLayer,St as _MultiIconLayer,wt as _TextBackgroundLayer};
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ef0a0a2a-89a9-54ea-a734-8867933912a4")}catch(e){}}();
3
+ //# debugId=ef0a0a2a-89a9-54ea-a734-8867933912a4
@@ -0,0 +1,3 @@
1
+ import"./main.js";import"./chunk-CzASft0S.js";import"./chunk-BK2bFfek.js";import{$ as ae,Q as _e,X as Le,Y as Ce,Z as Se,at as ve,et as be,it as he,nt as de,ot as ye,rt as fe,tt as ce}from"./chunk-ConEJto8.js";export{ae as arithmetic,ce as dot,fe as equalAll,de as extent,he as fround,ye as gather,ve as interleave,Se as length,_e as segmentedMap,be as select,Le as sequence,Ce as swizzle};
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="056e37dc-c134-5159-a358-51cd79a59cf3")}catch(e){}}();
3
+ //# debugId=056e37dc-c134-5159-a358-51cd79a59cf3
@@ -1 +1,3 @@
1
- import"./main.js";import{$ as Fl,$a as lo,$i as fc,$n as Ti,$o as sa,$r as Zh,$s as yr,$t as Ml,A as Ct,Aa as jf,Ai as cg,An as Ql,Ao as ph,Ar as Ws,As as vr,At as Jf,B as Dt,Ba as ki,Bi as dh,Bn as Rn,Bo as qi,Br as Xu,Bs as xi,Bt as Kl,C as Ch,Ca as ig,Ci as bl,Cn as Pl,Co as oc,Cr as Vu,Cs as vc,Ct as Hu,D as Co,Da as is,Di as bu,Dn as Pu,Do as ot,Dr as Wm,Ds as vm,Dt as Io,E as Cn,Ea as ip,Ei as br,En as Pr,Eo as op,Er as Wl,Es as vl,Et as In,F as Dm,Fa as jn,Fi as cp,Fn as Qr,Fo as po,Fr as Xl,Fs as wn,Ft as Jo,G as Em,Ga as kr,Gi as ec,Gn as Si,Go as qs,Gr as Yl,Gs as xu,Gt as Kt,H as Eg,Ha as km,Hi as dp,Hn as Rr,Ho as qm,Hr as Yf,Hs as xm,Ht as Kn,I as Dn,Ia as jo,Ii as ct,In as Qt,Io as pp,Ir as Xm,Is as wo,It as K,J as Er,Ja as la,Ji as el,Jn as So,Jo as ra,Jr as Yr,Js as yi,Jt as Ln,K as Eo,Ka as kt,Ki as eg,Kn as Sl,Ko as qt,Kr as Ym,Ks as yc,Kt as Ll,L as Do,La as jr,Li as cu,Ln as Re,Lo as pu,Lr as Xr,Ls as wr,Lt as Kf,M as Df,Ma as ji,Mi as cl,Mn as Qn,Mo as pl,Mr as Xf,Ms as wh,Mt as Ji,N as Dh,Na as jl,Ni as cn,Nn as Qo,No as pm,Nr as Xh,Ns as wl,Nt as Jl,O as Cp,Oa as iu,Oi as ca,On as Qf,Oo as ou,Or as Wo,Os as vn,Ot as Ir,P as Dl,Pa as jm,Pi as co,Pn as Qp,Po as pn,Pr as Xi,Ps as wm,Pt as Jm,Q as Fh,Qa as ln,Qi as eu,Qn as Th,Qo as rp,Qr as Zf,Qs as yo,Qt as Mi,R as Dr,Ra as jt,Ri as dc,Rn as Rl,Ro as qf,Rr as Xs,Rs as wu,Rt as Kh,S as C,Sa as ic,Si as bi,Sn as Ou,So as oa,Sr as Vs,Ss as uu,St as Hs,T as Cm,Ta as il,Ti as bo,Tn as Pn,To as oo,Tr as Wh,Ts as vi,Tt as Im,U as Eh,Ua as kn,Ui as du,Un as Rt,Uo as qo,Ur as Yh,Us as xo,Ut as Ko,V as Du,Va as kl,Vi as dl,Vn as Ro,Vo as ql,Vr as Ye,Vs as xl,Vt as Km,W as El,Wa as ko,Wi as ea,Wn as Ru,Wo as qr,Wr as Yi,Ws as xr,Wt as Kr,X as Eu,Xa as lg,Xi as ep,Xn as Su,Xo as rg,Xr as Yt,Xs as ym,Xt as Lu,Y as Et,Ya as lc,Yi as en,Yn as Sr,Yo as rc,Yr as Ys,Ys as yl,Yt as Lr,Z as Ff,Za as ll,Zi as es,Zn as Te,Zo as rl,Zr as Yu,Zs as yn,Zt as Me,_ as Bm,_a as hn,_i as an,_n as Ol,_o as ni,_r as Vi,_s as uh,_t as Hh,a as $o,aa as gh,ac as zm,ai as Zt,an as Mu,ao as mh,ar as UM,as as su,at as Ft,b as Bs,ba as hu,bi as au,bn as Oo,bo as ns,br as Vo,bs as uo,bt as Ho,c as Ai,ca as go,cc as zs,ci as _l,cn as Nm,co as mm,cr as Ul,cs as tg,ct as Gi,d as Ao,da as gt,di as _r,dn as Nr,do as mr,dr as Uo,ds as tn,dt as Go,ea as fh,ec as yu,ei as Zl,en as Mm,eo as lp,er as Tl,es as sc,et as Fm,f as Ar,fa as gu,fi as _t,fn as Ns,fo as mt,fr as Ur,fs as tp,ft as Gr,g as Bl,ga as hl,gi as al,gn as Oh,go as ng,gr as Vf,gs as uc,gt as Hf,h as Bh,ha as hh,hi as ac,hn as Of,ho as nc,hr as Uu,hs as tu,ht as He,i as $m,ia as fu,ic as zl,ii as Zs,in as Mt,io as me,ir as Tu,is as ss,it as Fs,j as Cu,ja as jh,ji as ch,jn as Qm,jo as pi,jr as Wu,js as vu,jt as Jh,k as Cr,ka as je,ki as cc,kn as Qh,ko as pc,kr as Wr,ks as vo,kt as Iu,l as Al,la as gp,lc as zu,li as _m,ln as Nn,lo as mn,lr as Um,ls as ti,lt as Gl,m as Bf,ma as hc,mi as aa,mn as Nu,mo as na,mr as Ut,ms as tt,mt as Gu,n as $i,na as fo,nc as zf,ni as Zo,nn as Mo,no as lu,nr as To,ns as sl,nt as Fo,o as $r,oa as gl,oc as zn,oi as _h,on as Nf,oo as mi,or as Uf,os as ta,ot as Fu,p as Au,pa as ha,pi as _u,pn as Nt,po as mu,pr as Us,ps as ts,pt as Gs,q as Ep,qa as ku,qi as ei,qn as Sm,qo as qu,qr as Yo,qs as yh,qt as Lm,r as $l,ra as fp,rc as zh,ri as Zr,rn as Mr,ro as mc,rr as Tr,rs as sp,rt as Fr,s as Ah,sa as gm,sc as zo,si as _i,sn as Nl,so as ml,sr as Uh,ss as tc,st as Gf,t as $f,ta as fl,tc as ze,ti as Zm,tn as Mn,to as lt,tr as Tm,ts as sg,tt as Fn,u as Am,ua as gr,ui as _o,un as No,uo as mo,ur as Un,us as tl,ut as Gm,v as Bn,va as ho,vi as ao,vn as Om,vo as nl,vr as Vl,vs as ul,vt as Hl,w as Cl,wa as ii,wi as bm,wn as Pm,wo as ol,wr as Wf,ws as vh,wt as Il,x as Bu,xa as ia,xi as bh,xn as Os,xo as nu,xr as Vr,xs as up,xt as Hr,y as Bo,ya as hp,yi as ap,yn as On,yo as np,yr as Vm,ys as un,yt as Hm,z as Ds,za as kf,zi as de,zn as Rm,zo as qh,zr as Xt,zs as xh,zt as Ki}from"./chunk-LltjhLJU.js";export{Uu as ACESFilmicToneMapping,mi as AddEquation,np as AddOperation,qu as AdditiveAnimationBlendMode,Ru as AdditiveBlending,Ou as AgXToneMapping,Wu as AlphaFormat,pp as AlwaysCompare,ho as AlwaysDepth,uh as AlwaysStencilFunc,vl as AmbientLight,Il as AnimationAction,ns as AnimationClip,Uh as AnimationLoader,Qh as AnimationMixer,Kh as AnimationObjectGroup,Dh as AnimationUtils,ko as ArcCurve,El as ArrayCamera,bu as ArrowHelper,ch as AttachedBindMode,Cl as Audio,Jh as AudioAnalyser,Qr as AudioContext,Yh as AudioListener,Xh as AudioLoader,Tu as AxesHelper,Zt as BackSide,op as BasicDepthPacking,_m as BasicShadowMap,Io as BatchedMesh,fl as BezierInterpolant,wr as Bone,ei as BooleanKeyframeTrack,hu as Box2,Dt as Box3,Mu as Box3Helper,Ki as BoxGeometry,yu as BoxHelper,lt as BufferAttribute,Ye as BufferGeometry,Tl as BufferGeometryLoader,Vu as ByteType,In as Cache,Hs as Camera,vu as CameraHelper,wh as CanvasTexture,Oo as CapsuleGeometry,Go as CatmullRomCurve3,Nu as CineonToneMapping,Bo as CircleGeometry,Qt as ClampToEdgeWrapping,au as Clock,Me as Color,Yr as ColorKeyframeTrack,tt as ColorManagement,rg as Compatibility,Ah as CompressedArrayTexture,Eh as CompressedCubeTexture,Bs as CompressedTexture,Fh as CompressedTextureLoader,Pr as ConeGeometry,jf as ConstantAlphaFactor,Kf as ConstantColorFactor,Eu as Controls,Al as CubeCamera,Fo as CubeDepthTexture,On as CubeReflectionMapping,bi as CubeRefractionMapping,$i as CubeTexture,Oh as CubeTextureLoader,Xs as CubeUVReflectionMapping,Lr as CubicBezierCurve,Ho as CubicBezierCurve3,ul as CubicInterpolant,Cu as CullFaceBack,Uf as CullFaceFront,gm as CullFaceFrontBack,Nf as CullFaceNone,hn as Curve,qo as CurvePath,Of as CustomBlending,Fu as CustomToneMapping,Ir as CylinderGeometry,lu as Cylindrical,Ns as Data3DTexture,Ds as DataArrayTexture,ln as DataTexture,Bh as DataTextureLoader,ph as DataUtils,Fm as DecrementStencilOp,Bm as DecrementWrapStencilOp,Cp as DefaultLoadingManager,Pn as DepthFormat,Ti as DepthStencilFormat,jn as DepthTexture,ip as DetachedBindMode,xl as DirectionalLight,xu as DirectionalLightHelper,dl as DiscreteInterpolant,zo as DodecahedronGeometry,Un as DoubleSide,qf as DstAlphaFactor,Zf as DstColorFactor,jm as DynamicCopyUsage,Ym as DynamicDrawUsage,$m as DynamicReadUsage,Vo as EdgesGeometry,zs as EllipseCurve,up as EqualCompare,fo as EqualDepth,Gm as EqualStencilFunc,ta as EquirectangularReflectionMapping,na as EquirectangularRefractionMapping,_i as Euler,cn as EventDispatcher,Rr as ExternalTexture,Yo as ExtrudeGeometry,yn as FileLoader,yh as Float16BufferAttribute,Te as Float32BufferAttribute,Xt as FloatType,So as Fog,Mo as FogExp2,Th as FramebufferTexture,Qn as FrontSide,yi as Frustum,Ro as FrustumArray,iu as GLBufferAttribute,tg as GLSL1,Yu as GLSL3,dp as GreaterCompare,mo as GreaterDepth,mc as GreaterEqualCompare,po as GreaterEqualDepth,qm as GreaterEqualStencilFunc,Wm as GreaterStencilFunc,gu as GridHelper,pi as Group,Ch as HTMLTexture,zn as HalfFloatType,ml as HemisphereLight,mu as HemisphereLightHelper,Zo as IcosahedronGeometry,Wh as ImageBitmapLoader,is as ImageLoader,yo as ImageUtils,Um as IncrementStencilOp,Om as IncrementWrapStencilOp,vi as InstancedBufferAttribute,bl as InstancedBufferGeometry,nu as InstancedInterleavedBuffer,Co as InstancedMesh,xh as Int16BufferAttribute,vh as Int32BufferAttribute,mh as Int8BufferAttribute,Pl as IntType,Os as InterleavedBuffer,Ji as InterleavedBufferAttribute,Si as Interpolant,hh as InterpolateBezier,_r as InterpolateDiscrete,xo as InterpolateLinear,ao as InterpolateSmooth,sg as InterpolationSamplingMode,ig as InterpolationSamplingType,zm as InvertStencilOp,Vi as KeepStencilOp,en as KeyframeTrack,Ao as LOD,Jo as LatheGeometry,Us as Layers,hp as LessCompare,uo as LessDepth,pc as LessEqualCompare,qi as LessEqualDepth,Hm as LessEqualStencilFunc,km as LessStencilFunc,Nn as Light,Ml as LightProbe,Dn as Line,uu as Line3,Ft as LineBasicMaterial,Dr as LineCurve,Wo as LineCurve3,hl as LineDashedMaterial,Do as LineLoop,pn as LineSegments,_t as LinearFilter,qr as LinearInterpolant,Sm as LinearMipMapLinearFilter,Mm as LinearMipMapNearestFilter,Bn as LinearMipmapLinearFilter,ia as LinearMipmapNearestFilter,vr as LinearSRGBColorSpace,Lu as LinearToneMapping,yr as LinearTransfer,un as Loader,Kr as LoaderUtils,Zr as LoadingManager,sp as LoopOnce,ap as LoopPingPong,rp as LoopRepeat,pm as MOUSE,Nt as Material,xm as MaterialBlending,Sl as MaterialLoader,Eg as MathUtils,cu as Matrix2,He as Matrix3,ze as Matrix4,kf as MaxEquation,Mt as Mesh,Ln as MeshBasicMaterial,Wr as MeshDepthMaterial,Xr as MeshDistanceMaterial,ll as MeshLambertMaterial,cl as MeshMatcapMaterial,ol as MeshNormalMaterial,rl as MeshPhongMaterial,sl as MeshPhysicalMaterial,Hr as MeshStandardMaterial,al as MeshToonMaterial,Vf as MinEquation,gr as MirroredRepeatWrapping,tp as MixOperation,Pu as MultiplyBlending,ea as MultiplyOperation,Et as NearestFilter,ym as NearestMipMapLinearFilter,vm as NearestMipMapNearestFilter,qs as NearestMipmapLinearFilter,zu as NearestMipmapNearestFilter,Bu as NeutralToneMapping,cp as NeverCompare,co as NeverDepth,Vm as NeverStencilFunc,Fn as NoBlending,ii as NoColorSpace,Im as NoNormalPacking,Mn as NoToneMapping,fc as NormalAnimationBlendMode,Xi as NormalBlending,Lm as NormalGAPacking,Pm as NormalRGPacking,fp as NotEqualCompare,go as NotEqualDepth,Xm as NotEqualStencilFunc,ji as NumberKeyframeTrack,gt as Object3D,Hh as ObjectLoader,lp as ObjectSpaceNormalMap,Vr as OctahedronGeometry,Hf as OneFactor,ep as OneMinusConstantAlphaFactor,Qf as OneMinusConstantColorFactor,Yf as OneMinusDstAlphaFactor,Jf as OneMinusDstColorFactor,lo as OneMinusSrcAlphaFactor,Xf as OneMinusSrcColorFactor,ss as OrthographicCamera,jr as PCFShadowMap,Ff as PCFSoftShadowMap,vc as PMREMGenerator,Vs as Path,Ct as PerspectiveCamera,wn as Plane,Gs as PlaneGeometry,Su as PlaneHelper,_l as PointLight,pu as PointLightHelper,No as Points,Cr as PointsMaterial,_u as PolarGridHelper,Mi as PolyhedronGeometry,Zh as PositionalAudio,mt as PropertyBinding,Rl as PropertyMixer,Nr as QuadraticBezierCurve,Ur as QuadraticBezierCurve3,Ut as Quaternion,es as QuaternionKeyframeTrack,pl as QuaternionLinearInterpolant,Wl as R11_EAC_Format,ha as RED_GREEN_RGTC2_Format,hc as RED_RGTC1_Format,Df as REVISION,ca as RG11_EAC_Format,wm as RGBADepthPacking,qt as RGBAFormat,Fl as RGBAIntegerFormat,sc as RGBA_ASTC_10x10_Format,tc as RGBA_ASTC_10x5_Format,nc as RGBA_ASTC_10x6_Format,ic as RGBA_ASTC_10x8_Format,rc as RGBA_ASTC_12x10_Format,ac as RGBA_ASTC_12x12_Format,Yl as RGBA_ASTC_4x4_Format,Zl as RGBA_ASTC_5x4_Format,Jl as RGBA_ASTC_5x5_Format,$l as RGBA_ASTC_6x5_Format,Kl as RGBA_ASTC_6x6_Format,Ql as RGBA_ASTC_8x5_Format,jl as RGBA_ASTC_8x6_Format,ec as RGBA_ASTC_8x8_Format,oc as RGBA_BPTC_Format,Hl as RGBA_ETC2_EAC_Format,Vl as RGBA_PVRTC_2BPPV1_Format,zl as RGBA_PVRTC_4BPPV1_Format,aa as RGBA_S3TC_DXT1_Format,oa as RGBA_S3TC_DXT3_Format,la as RGBA_S3TC_DXT5_Format,Cm as RGBDepthPacking,Xu as RGBFormat,bm as RGBIntegerFormat,lc as RGB_BPTC_SIGNED_Format,cc as RGB_BPTC_UNSIGNED_Format,kl as RGB_ETC1_Format,Gl as RGB_ETC2_Format,Bl as RGB_PVRTC_2BPPV1_Format,Ol as RGB_PVRTC_4BPPV1_Format,ra as RGB_S3TC_DXT1_Format,Rm as RGDepthPacking,Ai as RGFormat,Ul as RGIntegerFormat,Gr as RawShaderMaterial,xi as Ray,su as Raycaster,yl as RectAreaLight,Nl as RedFormat,sa as RedIntegerFormat,Du as ReinhardToneMapping,br as RenderTarget,jh as RenderTarget3D,mr as RepeatWrapping,Nm as ReplaceStencilOp,zf as ReverseSubtractEquation,$o as RingGeometry,Xl as SIGNED_R11_EAC_Format,dc as SIGNED_RED_GREEN_RGTC2_Format,uc as SIGNED_RED_RGTC1_Format,ql as SIGNED_RG11_EAC_Format,Kt as SRGBColorSpace,ot as SRGBTransfer,bo as Scene,je as ShaderChunk,kn as ShaderLib,jt as ShaderMaterial,il as ShadowMaterial,Kn as Shape,Ko as ShapeGeometry,Au as ShapePath,vn as ShapeUtils,ku as ShortType,wo as Skeleton,fu as SkeletonHelper,Eo as SkinnedMesh,Rn as Source,Rt as Sphere,kr as SphereGeometry,ou as Spherical,$r as SphericalHarmonics3,Fr as SplineCurve,gl as SpotLight,du as SpotLightHelper,To as Sprite,Er as SpriteMaterial,oo as SrcAlphaFactor,$f as SrcAlphaSaturateFactor,Wf as SrcColorFactor,Qm as StaticCopyUsage,Mr as StaticDrawUsage,Jm as StaticReadUsage,qh as StereoCamera,eg as StreamCopyUsage,Zm as StreamDrawUsage,Km as StreamReadUsage,ti as StringKeyframeTrack,Bf as SubtractEquation,Iu as SubtractiveBlending,mm as TOUCH,ni as TangentSpaceNormalMap,Qo as TetrahedronGeometry,kt as Texture,zh as TextureLoader,wu as TextureUtils,wl as Timer,ng as TimestampQuery,jo as TorusGeometry,el as TorusKnotGeometry,Cn as Triangle,Em as TriangleFanDrawMode,Am as TriangleStripDrawMode,Tm as TrianglesDrawMode,tl as TubeGeometry,_o as UVMapping,Tr as Uint16BufferAttribute,Ar as Uint32BufferAttribute,gh as Uint8BufferAttribute,_h as Uint8ClampedBufferAttribute,eu as Uniform,tu as UniformsGroup,me as UniformsLib,Ep as UniformsUtils,tn as UnsignedByteType,Hu as UnsignedInt101111Type,Zs as UnsignedInt248Type,Gu as UnsignedInt5999Type,mn as UnsignedIntType,Ll as UnsignedShort4444Type,Dl as UnsignedShort5551Type,Ys as UnsignedShortType,Ws as VSMShadowMap,K as Vector2,C as Vector3,ct as Vector4,ts as VectorKeyframeTrack,bh as VideoFrameTexture,Uo as VideoTexture,fh as WebGL3DRenderTarget,dh as WebGLArrayRenderTarget,an as WebGLCoordinateSystem,yc as WebGLCubeRenderTarget,Yt as WebGLRenderTarget,Qp as WebGLRenderer,UM as WebGLUtils,Yi as WebGPUCoordinateSystem,Fs as WebXRController,nl as WireframeGeometry,xr as WrapAroundEnding,ki as ZeroCurvatureEnding,Gf as ZeroFactor,Gi as ZeroSlopeEnding,Dm as ZeroStencilOp,gp as createCanvasElement,Re as error,cg as getConsoleFunction,Sr as log,lg as setConsoleFunction,de as warn,vo as warnOnce};
1
+ import"./main.js";import{$ as Fl,$a as lo,$i as fc,$n as Ti,$o as sa,$r as Zh,$s as yr,$t as Ml,A as Ct,Aa as jf,Ai as cg,An as Ql,Ao as ph,Ar as Ws,As as vr,At as Jf,B as Dt,Ba as ki,Bi as dh,Bn as Rn,Bo as qi,Br as Xu,Bs as xi,Bt as Kl,C as Ch,Ca as ig,Ci as bl,Cn as Pl,Co as oc,Cr as Vu,Cs as vc,Ct as Hu,D as Co,Da as is,Di as bu,Dn as Pu,Do as ot,Dr as Wm,Ds as vm,Dt as Io,E as Cn,Ea as ip,Ei as br,En as Pr,Eo as op,Er as Wl,Es as vl,Et as In,F as Dm,Fa as jn,Fi as cp,Fn as Qr,Fo as po,Fr as Xl,Fs as wn,Ft as Jo,G as Em,Ga as kr,Gi as ec,Gn as Si,Go as qs,Gr as Yl,Gs as xu,Gt as Kt,H as Eg,Ha as km,Hi as dp,Hn as Rr,Ho as qm,Hr as Yf,Hs as xm,Ht as Kn,I as Dn,Ia as jo,Ii as ct,In as Qt,Io as pp,Ir as Xm,Is as wo,It as K,J as Er,Ja as la,Ji as el,Jn as So,Jo as ra,Jr as Yr,Js as yi,Jt as Ln,K as Eo,Ka as kt,Ki as eg,Kn as Sl,Ko as qt,Kr as Ym,Ks as yc,Kt as Ll,L as Do,La as jr,Li as cu,Ln as Re,Lo as pu,Lr as Xr,Ls as wr,Lt as Kf,M as Df,Ma as ji,Mi as cl,Mn as Qn,Mo as pl,Mr as Xf,Ms as wh,Mt as Ji,N as Dh,Na as jl,Ni as cn,Nn as Qo,No as pm,Nr as Xh,Ns as wl,Nt as Jl,O as Cp,Oa as iu,Oi as ca,On as Qf,Oo as ou,Or as Wo,Os as vn,Ot as Ir,P as Dl,Pa as jm,Pi as co,Pn as Qp,Po as pn,Pr as Xi,Ps as wm,Pt as Jm,Q as Fh,Qa as ln,Qi as eu,Qn as Th,Qo as rp,Qr as Zf,Qs as yo,Qt as Mi,R as Dr,Ra as jt,Ri as dc,Rn as Rl,Ro as qf,Rr as Xs,Rs as wu,Rt as Kh,S as C,Sa as ic,Si as bi,Sn as Ou,So as oa,Sr as Vs,Ss as uu,St as Hs,T as Cm,Ta as il,Ti as bo,Tn as Pn,To as oo,Tr as Wh,Ts as vi,Tt as Im,U as Eh,Ua as kn,Ui as du,Un as Rt,Uo as qo,Ur as Yh,Us as xo,Ut as Ko,V as Du,Va as kl,Vi as dl,Vn as Ro,Vo as ql,Vr as Ye,Vs as xl,Vt as Km,W as El,Wa as ko,Wi as ea,Wn as Ru,Wo as qr,Wr as Yi,Ws as xr,Wt as Kr,X as Eu,Xa as lg,Xi as ep,Xn as Su,Xo as rg,Xr as Yt,Xs as ym,Xt as Lu,Y as Et,Ya as lc,Yi as en,Yn as Sr,Yo as rc,Yr as Ys,Ys as yl,Yt as Lr,Z as Ff,Za as ll,Zi as es,Zn as Te,Zo as rl,Zr as Yu,Zs as yn,Zt as Me,_ as Bm,_a as hn,_i as an,_n as Ol,_o as ni,_r as Vi,_s as uh,_t as Hh,a as $o,aa as gh,ac as zm,ai as Zt,an as Mu,ao as mh,ar as UM,as as su,at as Ft,b as Bs,ba as hu,bi as au,bn as Oo,bo as ns,br as Vo,bs as uo,bt as Ho,c as Ai,ca as go,cc as zs,ci as _l,cn as Nm,co as mm,cr as Ul,cs as tg,ct as Gi,d as Ao,da as gt,di as _r,dn as Nr,do as mr,dr as Uo,ds as tn,dt as Go,ea as fh,ec as yu,ei as Zl,en as Mm,eo as lp,er as Tl,es as sc,et as Fm,f as Ar,fa as gu,fi as _t,fn as Ns,fo as mt,fr as Ur,fs as tp,ft as Gr,g as Bl,ga as hl,gi as al,gn as Oh,go as ng,gr as Vf,gs as uc,gt as Hf,h as Bh,ha as hh,hi as ac,hn as Of,ho as nc,hr as Uu,hs as tu,ht as He,i as $m,ia as fu,ic as zl,ii as Zs,in as Mt,io as me,ir as Tu,is as ss,it as Fs,j as Cu,ja as jh,ji as ch,jn as Qm,jo as pi,jr as Wu,js as vu,jt as Jh,k as Cr,ka as je,ki as cc,kn as Qh,ko as pc,kr as Wr,ks as vo,kt as Iu,l as Al,la as gp,lc as zu,li as _m,ln as Nn,lo as mn,lr as Um,ls as ti,lt as Gl,m as Bf,ma as hc,mi as aa,mn as Nu,mo as na,mr as Ut,ms as tt,mt as Gu,n as $i,na as fo,nc as zf,ni as Zo,nn as Mo,no as lu,nr as To,ns as sl,nt as Fo,o as $r,oa as gl,oc as zn,oi as _h,on as Nf,oo as mi,or as Uf,os as ta,ot as Fu,p as Au,pa as ha,pi as _u,pn as Nt,po as mu,pr as Us,ps as ts,pt as Gs,q as Ep,qa as ku,qi as ei,qn as Sm,qo as qu,qr as Yo,qs as yh,qt as Lm,r as $l,ra as fp,rc as zh,ri as Zr,rn as Mr,ro as mc,rr as Tr,rs as sp,rt as Fr,s as Ah,sa as gm,sc as zo,si as _i,sn as Nl,so as ml,sr as Uh,ss as tc,st as Gf,t as $f,ta as fl,tc as ze,ti as Zm,tn as Mn,to as lt,tr as Tm,ts as sg,tt as Fn,u as Am,ua as gr,ui as _o,un as No,uo as mo,ur as Un,us as tl,ut as Gm,v as Bn,va as ho,vi as ao,vn as Om,vo as nl,vr as Vl,vs as ul,vt as Hl,w as Cl,wa as ii,wi as bm,wn as Pm,wo as ol,wr as Wf,ws as vh,wt as Il,x as Bu,xa as ia,xi as bh,xn as Os,xo as nu,xr as Vr,xs as up,xt as Hr,y as Bo,ya as hp,yi as ap,yn as On,yo as np,yr as Vm,ys as un,yt as Hm,z as Ds,za as kf,zi as de,zn as Rm,zo as qh,zr as Xt,zs as xh,zt as Ki}from"./chunk-LltjhLJU.js";export{Uu as ACESFilmicToneMapping,mi as AddEquation,np as AddOperation,qu as AdditiveAnimationBlendMode,Ru as AdditiveBlending,Ou as AgXToneMapping,Wu as AlphaFormat,pp as AlwaysCompare,ho as AlwaysDepth,uh as AlwaysStencilFunc,vl as AmbientLight,Il as AnimationAction,ns as AnimationClip,Uh as AnimationLoader,Qh as AnimationMixer,Kh as AnimationObjectGroup,Dh as AnimationUtils,ko as ArcCurve,El as ArrayCamera,bu as ArrowHelper,ch as AttachedBindMode,Cl as Audio,Jh as AudioAnalyser,Qr as AudioContext,Yh as AudioListener,Xh as AudioLoader,Tu as AxesHelper,Zt as BackSide,op as BasicDepthPacking,_m as BasicShadowMap,Io as BatchedMesh,fl as BezierInterpolant,wr as Bone,ei as BooleanKeyframeTrack,hu as Box2,Dt as Box3,Mu as Box3Helper,Ki as BoxGeometry,yu as BoxHelper,lt as BufferAttribute,Ye as BufferGeometry,Tl as BufferGeometryLoader,Vu as ByteType,In as Cache,Hs as Camera,vu as CameraHelper,wh as CanvasTexture,Oo as CapsuleGeometry,Go as CatmullRomCurve3,Nu as CineonToneMapping,Bo as CircleGeometry,Qt as ClampToEdgeWrapping,au as Clock,Me as Color,Yr as ColorKeyframeTrack,tt as ColorManagement,rg as Compatibility,Ah as CompressedArrayTexture,Eh as CompressedCubeTexture,Bs as CompressedTexture,Fh as CompressedTextureLoader,Pr as ConeGeometry,jf as ConstantAlphaFactor,Kf as ConstantColorFactor,Eu as Controls,Al as CubeCamera,Fo as CubeDepthTexture,On as CubeReflectionMapping,bi as CubeRefractionMapping,$i as CubeTexture,Oh as CubeTextureLoader,Xs as CubeUVReflectionMapping,Lr as CubicBezierCurve,Ho as CubicBezierCurve3,ul as CubicInterpolant,Cu as CullFaceBack,Uf as CullFaceFront,gm as CullFaceFrontBack,Nf as CullFaceNone,hn as Curve,qo as CurvePath,Of as CustomBlending,Fu as CustomToneMapping,Ir as CylinderGeometry,lu as Cylindrical,Ns as Data3DTexture,Ds as DataArrayTexture,ln as DataTexture,Bh as DataTextureLoader,ph as DataUtils,Fm as DecrementStencilOp,Bm as DecrementWrapStencilOp,Cp as DefaultLoadingManager,Pn as DepthFormat,Ti as DepthStencilFormat,jn as DepthTexture,ip as DetachedBindMode,xl as DirectionalLight,xu as DirectionalLightHelper,dl as DiscreteInterpolant,zo as DodecahedronGeometry,Un as DoubleSide,qf as DstAlphaFactor,Zf as DstColorFactor,jm as DynamicCopyUsage,Ym as DynamicDrawUsage,$m as DynamicReadUsage,Vo as EdgesGeometry,zs as EllipseCurve,up as EqualCompare,fo as EqualDepth,Gm as EqualStencilFunc,ta as EquirectangularReflectionMapping,na as EquirectangularRefractionMapping,_i as Euler,cn as EventDispatcher,Rr as ExternalTexture,Yo as ExtrudeGeometry,yn as FileLoader,yh as Float16BufferAttribute,Te as Float32BufferAttribute,Xt as FloatType,So as Fog,Mo as FogExp2,Th as FramebufferTexture,Qn as FrontSide,yi as Frustum,Ro as FrustumArray,iu as GLBufferAttribute,tg as GLSL1,Yu as GLSL3,dp as GreaterCompare,mo as GreaterDepth,mc as GreaterEqualCompare,po as GreaterEqualDepth,qm as GreaterEqualStencilFunc,Wm as GreaterStencilFunc,gu as GridHelper,pi as Group,Ch as HTMLTexture,zn as HalfFloatType,ml as HemisphereLight,mu as HemisphereLightHelper,Zo as IcosahedronGeometry,Wh as ImageBitmapLoader,is as ImageLoader,yo as ImageUtils,Um as IncrementStencilOp,Om as IncrementWrapStencilOp,vi as InstancedBufferAttribute,bl as InstancedBufferGeometry,nu as InstancedInterleavedBuffer,Co as InstancedMesh,xh as Int16BufferAttribute,vh as Int32BufferAttribute,mh as Int8BufferAttribute,Pl as IntType,Os as InterleavedBuffer,Ji as InterleavedBufferAttribute,Si as Interpolant,hh as InterpolateBezier,_r as InterpolateDiscrete,xo as InterpolateLinear,ao as InterpolateSmooth,sg as InterpolationSamplingMode,ig as InterpolationSamplingType,zm as InvertStencilOp,Vi as KeepStencilOp,en as KeyframeTrack,Ao as LOD,Jo as LatheGeometry,Us as Layers,hp as LessCompare,uo as LessDepth,pc as LessEqualCompare,qi as LessEqualDepth,Hm as LessEqualStencilFunc,km as LessStencilFunc,Nn as Light,Ml as LightProbe,Dn as Line,uu as Line3,Ft as LineBasicMaterial,Dr as LineCurve,Wo as LineCurve3,hl as LineDashedMaterial,Do as LineLoop,pn as LineSegments,_t as LinearFilter,qr as LinearInterpolant,Sm as LinearMipMapLinearFilter,Mm as LinearMipMapNearestFilter,Bn as LinearMipmapLinearFilter,ia as LinearMipmapNearestFilter,vr as LinearSRGBColorSpace,Lu as LinearToneMapping,yr as LinearTransfer,un as Loader,Kr as LoaderUtils,Zr as LoadingManager,sp as LoopOnce,ap as LoopPingPong,rp as LoopRepeat,pm as MOUSE,Nt as Material,xm as MaterialBlending,Sl as MaterialLoader,Eg as MathUtils,cu as Matrix2,He as Matrix3,ze as Matrix4,kf as MaxEquation,Mt as Mesh,Ln as MeshBasicMaterial,Wr as MeshDepthMaterial,Xr as MeshDistanceMaterial,ll as MeshLambertMaterial,cl as MeshMatcapMaterial,ol as MeshNormalMaterial,rl as MeshPhongMaterial,sl as MeshPhysicalMaterial,Hr as MeshStandardMaterial,al as MeshToonMaterial,Vf as MinEquation,gr as MirroredRepeatWrapping,tp as MixOperation,Pu as MultiplyBlending,ea as MultiplyOperation,Et as NearestFilter,ym as NearestMipMapLinearFilter,vm as NearestMipMapNearestFilter,qs as NearestMipmapLinearFilter,zu as NearestMipmapNearestFilter,Bu as NeutralToneMapping,cp as NeverCompare,co as NeverDepth,Vm as NeverStencilFunc,Fn as NoBlending,ii as NoColorSpace,Im as NoNormalPacking,Mn as NoToneMapping,fc as NormalAnimationBlendMode,Xi as NormalBlending,Lm as NormalGAPacking,Pm as NormalRGPacking,fp as NotEqualCompare,go as NotEqualDepth,Xm as NotEqualStencilFunc,ji as NumberKeyframeTrack,gt as Object3D,Hh as ObjectLoader,lp as ObjectSpaceNormalMap,Vr as OctahedronGeometry,Hf as OneFactor,ep as OneMinusConstantAlphaFactor,Qf as OneMinusConstantColorFactor,Yf as OneMinusDstAlphaFactor,Jf as OneMinusDstColorFactor,lo as OneMinusSrcAlphaFactor,Xf as OneMinusSrcColorFactor,ss as OrthographicCamera,jr as PCFShadowMap,Ff as PCFSoftShadowMap,vc as PMREMGenerator,Vs as Path,Ct as PerspectiveCamera,wn as Plane,Gs as PlaneGeometry,Su as PlaneHelper,_l as PointLight,pu as PointLightHelper,No as Points,Cr as PointsMaterial,_u as PolarGridHelper,Mi as PolyhedronGeometry,Zh as PositionalAudio,mt as PropertyBinding,Rl as PropertyMixer,Nr as QuadraticBezierCurve,Ur as QuadraticBezierCurve3,Ut as Quaternion,es as QuaternionKeyframeTrack,pl as QuaternionLinearInterpolant,Wl as R11_EAC_Format,ha as RED_GREEN_RGTC2_Format,hc as RED_RGTC1_Format,Df as REVISION,ca as RG11_EAC_Format,wm as RGBADepthPacking,qt as RGBAFormat,Fl as RGBAIntegerFormat,sc as RGBA_ASTC_10x10_Format,tc as RGBA_ASTC_10x5_Format,nc as RGBA_ASTC_10x6_Format,ic as RGBA_ASTC_10x8_Format,rc as RGBA_ASTC_12x10_Format,ac as RGBA_ASTC_12x12_Format,Yl as RGBA_ASTC_4x4_Format,Zl as RGBA_ASTC_5x4_Format,Jl as RGBA_ASTC_5x5_Format,$l as RGBA_ASTC_6x5_Format,Kl as RGBA_ASTC_6x6_Format,Ql as RGBA_ASTC_8x5_Format,jl as RGBA_ASTC_8x6_Format,ec as RGBA_ASTC_8x8_Format,oc as RGBA_BPTC_Format,Hl as RGBA_ETC2_EAC_Format,Vl as RGBA_PVRTC_2BPPV1_Format,zl as RGBA_PVRTC_4BPPV1_Format,aa as RGBA_S3TC_DXT1_Format,oa as RGBA_S3TC_DXT3_Format,la as RGBA_S3TC_DXT5_Format,Cm as RGBDepthPacking,Xu as RGBFormat,bm as RGBIntegerFormat,lc as RGB_BPTC_SIGNED_Format,cc as RGB_BPTC_UNSIGNED_Format,kl as RGB_ETC1_Format,Gl as RGB_ETC2_Format,Bl as RGB_PVRTC_2BPPV1_Format,Ol as RGB_PVRTC_4BPPV1_Format,ra as RGB_S3TC_DXT1_Format,Rm as RGDepthPacking,Ai as RGFormat,Ul as RGIntegerFormat,Gr as RawShaderMaterial,xi as Ray,su as Raycaster,yl as RectAreaLight,Nl as RedFormat,sa as RedIntegerFormat,Du as ReinhardToneMapping,br as RenderTarget,jh as RenderTarget3D,mr as RepeatWrapping,Nm as ReplaceStencilOp,zf as ReverseSubtractEquation,$o as RingGeometry,Xl as SIGNED_R11_EAC_Format,dc as SIGNED_RED_GREEN_RGTC2_Format,uc as SIGNED_RED_RGTC1_Format,ql as SIGNED_RG11_EAC_Format,Kt as SRGBColorSpace,ot as SRGBTransfer,bo as Scene,je as ShaderChunk,kn as ShaderLib,jt as ShaderMaterial,il as ShadowMaterial,Kn as Shape,Ko as ShapeGeometry,Au as ShapePath,vn as ShapeUtils,ku as ShortType,wo as Skeleton,fu as SkeletonHelper,Eo as SkinnedMesh,Rn as Source,Rt as Sphere,kr as SphereGeometry,ou as Spherical,$r as SphericalHarmonics3,Fr as SplineCurve,gl as SpotLight,du as SpotLightHelper,To as Sprite,Er as SpriteMaterial,oo as SrcAlphaFactor,$f as SrcAlphaSaturateFactor,Wf as SrcColorFactor,Qm as StaticCopyUsage,Mr as StaticDrawUsage,Jm as StaticReadUsage,qh as StereoCamera,eg as StreamCopyUsage,Zm as StreamDrawUsage,Km as StreamReadUsage,ti as StringKeyframeTrack,Bf as SubtractEquation,Iu as SubtractiveBlending,mm as TOUCH,ni as TangentSpaceNormalMap,Qo as TetrahedronGeometry,kt as Texture,zh as TextureLoader,wu as TextureUtils,wl as Timer,ng as TimestampQuery,jo as TorusGeometry,el as TorusKnotGeometry,Cn as Triangle,Em as TriangleFanDrawMode,Am as TriangleStripDrawMode,Tm as TrianglesDrawMode,tl as TubeGeometry,_o as UVMapping,Tr as Uint16BufferAttribute,Ar as Uint32BufferAttribute,gh as Uint8BufferAttribute,_h as Uint8ClampedBufferAttribute,eu as Uniform,tu as UniformsGroup,me as UniformsLib,Ep as UniformsUtils,tn as UnsignedByteType,Hu as UnsignedInt101111Type,Zs as UnsignedInt248Type,Gu as UnsignedInt5999Type,mn as UnsignedIntType,Ll as UnsignedShort4444Type,Dl as UnsignedShort5551Type,Ys as UnsignedShortType,Ws as VSMShadowMap,K as Vector2,C as Vector3,ct as Vector4,ts as VectorKeyframeTrack,bh as VideoFrameTexture,Uo as VideoTexture,fh as WebGL3DRenderTarget,dh as WebGLArrayRenderTarget,an as WebGLCoordinateSystem,yc as WebGLCubeRenderTarget,Yt as WebGLRenderTarget,Qp as WebGLRenderer,UM as WebGLUtils,Yi as WebGPUCoordinateSystem,Fs as WebXRController,nl as WireframeGeometry,xr as WrapAroundEnding,ki as ZeroCurvatureEnding,Gf as ZeroFactor,Gi as ZeroSlopeEnding,Dm as ZeroStencilOp,gp as createCanvasElement,Re as error,cg as getConsoleFunction,Sr as log,lg as setConsoleFunction,de as warn,vo as warnOnce};
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ea5e5c33-3841-5ecd-91ef-504480d1ab17")}catch(e){}}();
3
+ //# debugId=ea5e5c33-3841-5ecd-91ef-504480d1ab17
@@ -4112,4 +4112,5 @@ three/build/three.module.js:
4112
4112
  * SPDX-License-Identifier: MIT
4113
4113
  *)
4114
4114
  */
4115
- export{Fl as $,lo as $a,fc as $i,Ti as $n,sa as $o,Zh as $r,yr as $s,Ml as $t,Ct as A,jf as Aa,cg as Ai,Ql as An,ph as Ao,Ws as Ar,vr as As,Jf as At,Dt as B,ki as Ba,dh as Bi,Rn as Bn,qi as Bo,Xu as Br,xi as Bs,Kl as Bt,Ch as C,ig as Ca,bl as Ci,Pl as Cn,oc as Co,Vu as Cr,vc as Cs,Hu as Ct,Co as D,is as Da,bu as Di,Pu as Dn,ot as Do,Wm as Dr,vm as Ds,Io as Dt,Cn as E,ip as Ea,br as Ei,Pr as En,op as Eo,Wl as Er,vl as Es,In as Et,Dm as F,jn as Fa,cp as Fi,Qr as Fn,po as Fo,Xl as Fr,wn as Fs,Jo as Ft,Em as G,kr as Ga,ec as Gi,Si as Gn,qs as Go,Yl as Gr,xu as Gs,Kt as Gt,Eg as H,km as Ha,dp as Hi,Rr as Hn,qm as Ho,Yf as Hr,xm as Hs,Kn as Ht,Dn as I,jo as Ia,ct as Ii,Qt as In,pp as Io,Xm as Ir,wo as Is,K as It,Er as J,la as Ja,el as Ji,So as Jn,ra as Jo,Yr as Jr,yi as Js,Ln as Jt,Eo as K,kt as Ka,eg as Ki,Sl as Kn,qt as Ko,Ym as Kr,yc as Ks,Ll as Kt,Do as L,jr as La,cu as Li,Re as Ln,pu as Lo,Xr as Lr,wr as Ls,Kf as Lt,Df as M,ji as Ma,cl as Mi,Qn as Mn,pl as Mo,Xf as Mr,wh as Ms,Ji as Mt,Dh as N,jl as Na,cn as Ni,Qo as Nn,pm as No,Xh as Nr,wl as Ns,Jl as Nt,Cp as O,iu as Oa,ca as Oi,Qf as On,ou as Oo,Wo as Or,vn as Os,Ir as Ot,Dl as P,jm as Pa,co as Pi,Qp as Pn,pn as Po,Xi as Pr,wm as Ps,Jm as Pt,Fh as Q,ln as Qa,eu as Qi,Th as Qn,rp as Qo,Zf as Qr,yo as Qs,Mi as Qt,Dr as R,jt as Ra,dc as Ri,Rl as Rn,qf as Ro,Xs as Rr,wu as Rs,Kh as Rt,C as S,ic as Sa,bi as Si,Ou as Sn,oa as So,Vs as Sr,uu as Ss,Hs as St,Cm as T,il as Ta,bo as Ti,Pn as Tn,oo as To,Wh as Tr,vi as Ts,Im as Tt,Eh as U,kn as Ua,du as Ui,Rt as Un,qo as Uo,Yh as Ur,xo as Us,Ko as Ut,Du as V,kl as Va,dl as Vi,Ro as Vn,ql as Vo,Ye as Vr,xl as Vs,Km as Vt,El as W,ko as Wa,ea as Wi,Ru as Wn,qr as Wo,Yi as Wr,xr as Ws,Kr as Wt,Eu as X,lg as Xa,ep as Xi,Su as Xn,rg as Xo,Yt as Xr,ym as Xs,Lu as Xt,Et as Y,lc as Ya,en as Yi,Sr as Yn,rc as Yo,Ys as Yr,yl as Ys,Lr as Yt,Ff as Z,ll as Za,es as Zi,Te as Zn,rl as Zo,Yu as Zr,yn as Zs,Me as Zt,Bm as _,hn as _a,an as _i,Ol as _n,ni as _o,Vi as _r,uh as _s,Hh as _t,$o as a,gh as aa,zm as ac,Zt as ai,Mu as an,mh as ao,UM as ar,su as as,Ft as at,Bs as b,hu as ba,au as bi,Oo as bn,ns as bo,Vo as br,uo as bs,Ho as bt,Ai as c,go as ca,zs as cc,_l as ci,Nm as cn,mm as co,Ul as cr,tg as cs,Gi as ct,Ao as d,gt as da,_r as di,Nr as dn,mr as do,Uo as dr,tn as ds,Go as dt,fh as ea,yu as ec,Zl as ei,Mm as en,lp as eo,Tl as er,sc as es,Fm as et,Ar as f,gu as fa,_t as fi,Ns as fn,mt as fo,Ur as fr,tp as fs,Gr as ft,Bl as g,hl as ga,al as gi,Oh as gn,ng as go,Vf as gr,uc as gs,Hf as gt,Bh as h,hh as ha,ac as hi,Of as hn,nc as ho,Uu as hr,tu as hs,He as ht,$m as i,fu as ia,zl as ic,Zs as ii,Mt as in,me as io,Tu as ir,ss as is,Fs as it,Cu as j,jh as ja,ch as ji,Qm as jn,pi as jo,Wu as jr,vu as js,Jh as jt,Cr as k,je as ka,cc as ki,Qh as kn,pc as ko,Wr as kr,vo as ks,Iu as kt,Al as l,gp as la,zu as lc,_m as li,Nn as ln,mn as lo,Um as lr,ti as ls,Gl as lt,Bf as m,hc as ma,aa as mi,Nu as mn,na as mo,Ut as mr,tt as ms,Gu as mt,$i as n,fo as na,zf as nc,Zo as ni,Mo as nn,lu as no,To as nr,sl as ns,Fo as nt,$r as o,gl as oa,zn as oc,_h as oi,Nf as on,mi as oo,Uf as or,ta as os,Fu as ot,Au as p,ha as pa,_u as pi,Nt as pn,mu as po,Us as pr,ts as ps,Gs as pt,Ep as q,ku as qa,ei as qi,Sm as qn,qu as qo,Yo as qr,yh as qs,Lm as qt,$l as r,fp as ra,zh as rc,Zr as ri,Mr as rn,mc as ro,Tr as rr,sp as rs,Fr as rt,Ah as s,gm as sa,zo as sc,_i as si,Nl as sn,ml as so,Uh as sr,tc as ss,Gf as st,$f as t,fl as ta,ze as tc,Zm as ti,Mn as tn,lt as to,Tm as tr,sg as ts,Fn as tt,Am as u,gr as ua,_o as ui,No as un,mo as uo,Un as ur,tl as us,Gm as ut,Bn as v,ho as va,ao as vi,Om as vn,nl as vo,Vl as vr,ul as vs,Hl as vt,Cl as w,ii as wa,bm as wi,Pm as wn,ol as wo,Wf as wr,vh as ws,Il as wt,Bu as x,ia as xa,bh as xi,Os as xn,nu as xo,Vr as xr,up as xs,Hr as xt,Bo as y,hp as ya,ap as yi,On as yn,np as yo,Vm as yr,un as ys,Hm as yt,Ds as z,kf as za,de as zi,Rm as zn,qh as zo,Xt as zr,xh as zs,Ki as zt};
4115
+ export{Fl as $,lo as $a,fc as $i,Ti as $n,sa as $o,Zh as $r,yr as $s,Ml as $t,Ct as A,jf as Aa,cg as Ai,Ql as An,ph as Ao,Ws as Ar,vr as As,Jf as At,Dt as B,ki as Ba,dh as Bi,Rn as Bn,qi as Bo,Xu as Br,xi as Bs,Kl as Bt,Ch as C,ig as Ca,bl as Ci,Pl as Cn,oc as Co,Vu as Cr,vc as Cs,Hu as Ct,Co as D,is as Da,bu as Di,Pu as Dn,ot as Do,Wm as Dr,vm as Ds,Io as Dt,Cn as E,ip as Ea,br as Ei,Pr as En,op as Eo,Wl as Er,vl as Es,In as Et,Dm as F,jn as Fa,cp as Fi,Qr as Fn,po as Fo,Xl as Fr,wn as Fs,Jo as Ft,Em as G,kr as Ga,ec as Gi,Si as Gn,qs as Go,Yl as Gr,xu as Gs,Kt as Gt,Eg as H,km as Ha,dp as Hi,Rr as Hn,qm as Ho,Yf as Hr,xm as Hs,Kn as Ht,Dn as I,jo as Ia,ct as Ii,Qt as In,pp as Io,Xm as Ir,wo as Is,K as It,Er as J,la as Ja,el as Ji,So as Jn,ra as Jo,Yr as Jr,yi as Js,Ln as Jt,Eo as K,kt as Ka,eg as Ki,Sl as Kn,qt as Ko,Ym as Kr,yc as Ks,Ll as Kt,Do as L,jr as La,cu as Li,Re as Ln,pu as Lo,Xr as Lr,wr as Ls,Kf as Lt,Df as M,ji as Ma,cl as Mi,Qn as Mn,pl as Mo,Xf as Mr,wh as Ms,Ji as Mt,Dh as N,jl as Na,cn as Ni,Qo as Nn,pm as No,Xh as Nr,wl as Ns,Jl as Nt,Cp as O,iu as Oa,ca as Oi,Qf as On,ou as Oo,Wo as Or,vn as Os,Ir as Ot,Dl as P,jm as Pa,co as Pi,Qp as Pn,pn as Po,Xi as Pr,wm as Ps,Jm as Pt,Fh as Q,ln as Qa,eu as Qi,Th as Qn,rp as Qo,Zf as Qr,yo as Qs,Mi as Qt,Dr as R,jt as Ra,dc as Ri,Rl as Rn,qf as Ro,Xs as Rr,wu as Rs,Kh as Rt,C as S,ic as Sa,bi as Si,Ou as Sn,oa as So,Vs as Sr,uu as Ss,Hs as St,Cm as T,il as Ta,bo as Ti,Pn as Tn,oo as To,Wh as Tr,vi as Ts,Im as Tt,Eh as U,kn as Ua,du as Ui,Rt as Un,qo as Uo,Yh as Ur,xo as Us,Ko as Ut,Du as V,kl as Va,dl as Vi,Ro as Vn,ql as Vo,Ye as Vr,xl as Vs,Km as Vt,El as W,ko as Wa,ea as Wi,Ru as Wn,qr as Wo,Yi as Wr,xr as Ws,Kr as Wt,Eu as X,lg as Xa,ep as Xi,Su as Xn,rg as Xo,Yt as Xr,ym as Xs,Lu as Xt,Et as Y,lc as Ya,en as Yi,Sr as Yn,rc as Yo,Ys as Yr,yl as Ys,Lr as Yt,Ff as Z,ll as Za,es as Zi,Te as Zn,rl as Zo,Yu as Zr,yn as Zs,Me as Zt,Bm as _,hn as _a,an as _i,Ol as _n,ni as _o,Vi as _r,uh as _s,Hh as _t,$o as a,gh as aa,zm as ac,Zt as ai,Mu as an,mh as ao,UM as ar,su as as,Ft as at,Bs as b,hu as ba,au as bi,Oo as bn,ns as bo,Vo as br,uo as bs,Ho as bt,Ai as c,go as ca,zs as cc,_l as ci,Nm as cn,mm as co,Ul as cr,tg as cs,Gi as ct,Ao as d,gt as da,_r as di,Nr as dn,mr as do,Uo as dr,tn as ds,Go as dt,fh as ea,yu as ec,Zl as ei,Mm as en,lp as eo,Tl as er,sc as es,Fm as et,Ar as f,gu as fa,_t as fi,Ns as fn,mt as fo,Ur as fr,tp as fs,Gr as ft,Bl as g,hl as ga,al as gi,Oh as gn,ng as go,Vf as gr,uc as gs,Hf as gt,Bh as h,hh as ha,ac as hi,Of as hn,nc as ho,Uu as hr,tu as hs,He as ht,$m as i,fu as ia,zl as ic,Zs as ii,Mt as in,me as io,Tu as ir,ss as is,Fs as it,Cu as j,jh as ja,ch as ji,Qm as jn,pi as jo,Wu as jr,vu as js,Jh as jt,Cr as k,je as ka,cc as ki,Qh as kn,pc as ko,Wr as kr,vo as ks,Iu as kt,Al as l,gp as la,zu as lc,_m as li,Nn as ln,mn as lo,Um as lr,ti as ls,Gl as lt,Bf as m,hc as ma,aa as mi,Nu as mn,na as mo,Ut as mr,tt as ms,Gu as mt,$i as n,fo as na,zf as nc,Zo as ni,Mo as nn,lu as no,To as nr,sl as ns,Fo as nt,$r as o,gl as oa,zn as oc,_h as oi,Nf as on,mi as oo,Uf as or,ta as os,Fu as ot,Au as p,ha as pa,_u as pi,Nt as pn,mu as po,Us as pr,ts as ps,Gs as pt,Ep as q,ku as qa,ei as qi,Sm as qn,qu as qo,Yo as qr,yh as qs,Lm as qt,$l as r,fp as ra,zh as rc,Zr as ri,Mr as rn,mc as ro,Tr as rr,sp as rs,Fr as rt,Ah as s,gm as sa,zo as sc,_i as si,Nl as sn,ml as so,Uh as sr,tc as ss,Gf as st,$f as t,fl as ta,ze as tc,Zm as ti,Mn as tn,lt as to,Tm as tr,sg as ts,Fn as tt,Am as u,gr as ua,_o as ui,No as un,mo as uo,Un as ur,tl as us,Gm as ut,Bn as v,ho as va,ao as vi,Om as vn,nl as vo,Vl as vr,ul as vs,Hl as vt,Cl as w,ii as wa,bm as wi,Pm as wn,ol as wo,Wf as wr,vh as ws,Il as wt,Bu as x,ia as xa,bh as xi,Os as xn,nu as xo,Vr as xr,up as xs,Hr as xt,Bo as y,hp as ya,ap as yi,On as yn,np as yo,Vm as yr,un as ys,Hm as yt,Ds as z,kf as za,de as zi,Rm as zn,qh as zo,Xt as zr,xh as zs,Ki as zt};
4116
+ //# debugId=3f9ddae2-2757-5024-b102-914dfae37a12